代码合并
This commit is contained in:
commit
168665eebc
|
|
@ -22,7 +22,7 @@
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-ios"
|
"type" : "uni-app:app-ios"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
10
main.js
10
main.js
|
|
@ -34,7 +34,6 @@ Vue.use(httpApi, app)
|
||||||
|
|
||||||
app.$mount()
|
app.$mount()
|
||||||
|
|
||||||
|
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
|
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
|
|
@ -43,15 +42,10 @@ let isIos = sysInfo.platform == 'ios'
|
||||||
if (isIos) {
|
if (isIos) {
|
||||||
const originNavigateTo = uni.navigateTo
|
const originNavigateTo = uni.navigateTo
|
||||||
|
|
||||||
uni.navigateTo = (params) => {
|
uni.navigateTo = (params) => {
|
||||||
|
|
||||||
console.log("自定义 navigate 。。。。。。。。。。");
|
|
||||||
|
|
||||||
let jsonParam = JSON.parse(JSON.stringify(params))
|
let jsonParam = JSON.parse(JSON.stringify(params))
|
||||||
|
|
||||||
|
|
||||||
if (isIos && jsonParam.url.includes('/me/detail/detail')) {
|
if (isIos && jsonParam.url.includes('/me/detail/detail')) {
|
||||||
console.log('iOS 跳转视频也');
|
|
||||||
jsonParam.url = jsonParam.url.replace('/me/detail/detail', '/me/detail/detailIOS')
|
jsonParam.url = jsonParam.url.replace('/me/detail/detail', '/me/detail/detailIOS')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@
|
||||||
"VideoPlayer" : {},
|
"VideoPlayer" : {},
|
||||||
"Camera" : {},
|
"Camera" : {},
|
||||||
"Record" : {},
|
"Record" : {},
|
||||||
"Push" : {},
|
"OAuth" : {},
|
||||||
"OAuth" : {}
|
"Push" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
|
|
@ -63,7 +63,12 @@
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {
|
"ios" : {
|
||||||
"dSYMs" : false
|
"dSYMs" : false,
|
||||||
|
"urltypes" : "com.hnsiyao.duanju",
|
||||||
|
"privacyDescription" : {
|
||||||
|
"NSPhotoLibraryUsageDescription" : "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像",
|
||||||
|
"NSCameraUsageDescription" : "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
</view>
|
</view>
|
||||||
<text class=""
|
<text class=""
|
||||||
style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;">
|
style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;">
|
||||||
{{this.courseDetailsId}}
|
{{getRedEnvelopeTips}}
|
||||||
</text>
|
</text>
|
||||||
<view class="pay-content">
|
<view class="pay-content">
|
||||||
<view class="pay-content-item" @click="payVideo(1)">
|
<view class="pay-content-item" @click="payVideo(1)">
|
||||||
|
|
@ -154,7 +154,7 @@
|
||||||
{{countPrice*scale}}金币解锁整部视频
|
{{countPrice*scale}}金币解锁整部视频
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pay-content-item" @click="payVideo(2)">
|
<view v-if="isShowMoneyPay" class="pay-content-item" @click="payVideo(2)">
|
||||||
<text class="pay-content-items">
|
<text class="pay-content-items">
|
||||||
{{countPrice}}元解锁单集视频
|
{{countPrice}}元解锁单集视频
|
||||||
</text>
|
</text>
|
||||||
|
|
@ -369,6 +369,7 @@
|
||||||
getRedEnvelopeTips: '',
|
getRedEnvelopeTips: '',
|
||||||
scale: 1,
|
scale: 1,
|
||||||
paddingBottom: '0',
|
paddingBottom: '0',
|
||||||
|
isShowMoneyPay: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -492,6 +493,13 @@
|
||||||
|
|
||||||
console.log('this bottom padding = ' + this.paddingBottom);
|
console.log('this bottom padding = ' + this.paddingBottom);
|
||||||
|
|
||||||
|
httpsRequest.getT("app/common/type/919", {}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
|
let isIos = sysInfo.platform == 'ios'
|
||||||
|
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -711,7 +719,10 @@
|
||||||
// #endif
|
// #endif
|
||||||
// APP支付宝支付
|
// APP支付宝支付
|
||||||
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
|
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
|
||||||
plus.runtime.openURL(ret.data.h5Url)
|
// plus.runtime.openURL(ret.data.h5Url)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
|
||||||
|
});
|
||||||
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
|
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
|
||||||
});
|
});
|
||||||
} else if (this.openWay == 3) {
|
} else if (this.openWay == 3) {
|
||||||
|
|
@ -1051,7 +1062,7 @@
|
||||||
// const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
// const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
||||||
// this.videoList = [this.meunList[index]]
|
// this.videoList = [this.meunList[index]]
|
||||||
this.current = index
|
this.current = index
|
||||||
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
if (this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type) {
|
||||||
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1399,8 +1410,8 @@
|
||||||
} else { //不能播放则需要购买
|
} else { //不能播放则需要购买
|
||||||
this.openPay()
|
this.openPay()
|
||||||
}
|
}
|
||||||
if ( t == 'select') {
|
if (t == 'select') {
|
||||||
this.selectPlay(this.videoList[this.current],this.current,true)
|
this.selectPlay(this.videoList[this.current], this.current, true)
|
||||||
}
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
//插入历史记录
|
//插入历史记录
|
||||||
|
|
|
||||||
|
|
@ -185,8 +185,8 @@
|
||||||
<!-- 追剧悬浮 -->
|
<!-- 追剧悬浮 -->
|
||||||
<!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
|
<!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
|
||||||
:existTabBar="true" @btnClick="btnClick" /> -->
|
:existTabBar="true" @btnClick="btnClick" /> -->
|
||||||
<u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/red-pack-new.gif`"
|
<u-image v-if="isShowMoneyPay" @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/red-pack-new.gif`"
|
||||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 30rpx;bottom: 180rpx;"></u-image>
|
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;"></u-image>
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<div v-if="isWeixin"
|
<div v-if="isWeixin"
|
||||||
style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;">
|
style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;">
|
||||||
|
|
@ -209,6 +209,7 @@
|
||||||
import recommendVideo from '../../components/recommendVideo/recommendVideo.vue'
|
import recommendVideo from '../../components/recommendVideo/recommendVideo.vue'
|
||||||
import activityComp from '../../components/activityComp/activityComp.vue'
|
import activityComp from '../../components/activityComp/activityComp.vue'
|
||||||
import dragButton from "@/components/drag-button/drag-button.vue";
|
import dragButton from "@/components/drag-button/drag-button.vue";
|
||||||
|
import httpsRequest from '../../common/httpRequest.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
videoList,
|
videoList,
|
||||||
|
|
@ -260,6 +261,7 @@
|
||||||
isWeixin: false,
|
isWeixin: false,
|
||||||
isIos: true,
|
isIos: true,
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
|
isShowMoneyPay: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
|
|
@ -279,7 +281,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
console.log(e);
|
|
||||||
this.scrollTop = e.scrollTop
|
this.scrollTop = e.scrollTop
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|
@ -293,6 +294,7 @@
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
console.log(options, '22222222222222222')
|
||||||
if (uni.getStorageSync('qdCode')) {
|
if (uni.getStorageSync('qdCode')) {
|
||||||
this.qdCode = uni.getStorageSync('qdCode')
|
this.qdCode = uni.getStorageSync('qdCode')
|
||||||
}
|
}
|
||||||
|
|
@ -435,6 +437,14 @@
|
||||||
this.shodrag = false
|
this.shodrag = false
|
||||||
this.videoInfo = []
|
this.videoInfo = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
httpsRequest.getT("app/common/type/919", {}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
|
let isIos = sysInfo.platform == 'ios'
|
||||||
|
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.page < this.pages) {
|
if (this.page < this.pages) {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
我的积分
|
我的积分
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="statistics-box-item" @click="goNav('/me/invite/cashDetail')">
|
<view v-if="isShowMoneyPay" class="statistics-box-item" @click="goNav('/me/invite/cashDetail')">
|
||||||
<view class="statistics-box-item-top">
|
<view class="statistics-box-item-top">
|
||||||
{{userInfo.amount || '0.00'}}
|
{{userInfo.amount || '0.00'}}
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
转盘抽奖
|
转盘抽奖
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="tool-box-content-item flex align-center justify-center flex-wrap"
|
<view v-if="isShowMoneyPay" class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||||
@click="goNav('/me/invite/index')">
|
@click="goNav('/me/invite/index')">
|
||||||
<view class="tool-box-content-item-img">
|
<view class="tool-box-content-item-img">
|
||||||
<image src="../../static/images/me/vfx.png" mode=""></image>
|
<image src="../../static/images/me/vfx.png" mode=""></image>
|
||||||
|
|
@ -184,7 +184,7 @@
|
||||||
观看历史
|
观看历史
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="rate>0" class="tool-box-content-item flex align-center justify-center flex-wrap"
|
<view v-if="rate>0 && isShowMoneyPay" class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||||
@click="goNav('/me/invite/inviteDet')">
|
@click="goNav('/me/invite/inviteDet')">
|
||||||
<view class="tool-box-content-item-img">
|
<view class="tool-box-content-item-img">
|
||||||
<image src="../../static/images/me/vtd.png" mode=""></image>
|
<image src="../../static/images/me/vtd.png" mode=""></image>
|
||||||
|
|
@ -257,6 +257,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ttMsg from '../../components/ttMsg/ttMsg.vue'
|
import ttMsg from '../../components/ttMsg/ttMsg.vue'
|
||||||
|
import httpsRequest from '../../common/httpRequest.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ttMsg
|
ttMsg
|
||||||
|
|
@ -292,6 +293,7 @@
|
||||||
kmPaySel: '否',
|
kmPaySel: '否',
|
||||||
isWxIosPay: true, //微信下是否显示支付功能
|
isWxIosPay: true, //微信下是否显示支付功能
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
|
isShowMoneyPay: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -354,6 +356,15 @@
|
||||||
this.rate = 0
|
this.rate = 0
|
||||||
}
|
}
|
||||||
this.avatar = uni.getStorageSync('avatar') ? uni.getStorageSync('avatar') : '../../static/images/logo.png'
|
this.avatar = uni.getStorageSync('avatar') ? uni.getStorageSync('avatar') : '../../static/images/logo.png'
|
||||||
|
|
||||||
|
httpsRequest.getT("app/common/type/919", {}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 0) {
|
||||||
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
|
let isIos = sysInfo.platform == 'ios'
|
||||||
|
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//兑换卡密
|
//兑换卡密
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ordersId:'',
|
ordersId: '',
|
||||||
timer:null,
|
timer: null,
|
||||||
maxAjaxNum:5,
|
maxAjaxNum: 5,
|
||||||
ajaxNum:0,
|
ajaxNum: 0,
|
||||||
url: null, //要打开的外部链接
|
url: null, //要打开的外部链接
|
||||||
viewerUrl: '/hybrid/html/web/viewer.html',
|
viewerUrl: '/hybrid/html/web/viewer.html',
|
||||||
webviewStyles: {
|
webviewStyles: {
|
||||||
|
|
@ -22,38 +22,41 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {},
|
||||||
// #ifdef APP-PLUS
|
|
||||||
// console.log('App plus2')
|
|
||||||
// var currentWebview = this.$mp.page.$getAppWebview() //获取当前页面的webview对象
|
|
||||||
// setTimeout(function() {
|
|
||||||
// wv = currentWebview.children()[0]
|
|
||||||
// wv.setStyle({
|
|
||||||
// scalable: true
|
|
||||||
// })
|
|
||||||
// }, 1000); //如果是页面初始化调用时,需要延时一下
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
onShow() {
|
onShow() {
|
||||||
console.log(this.ordersId);
|
console.log(this.ordersId);
|
||||||
|
|
||||||
httpsRequest.getT("/app/wuyou/queryOrder/"+this.ordersId, {}).then(res => {
|
httpsRequest.getT("/app/wuyou/queryOrder/" + this.ordersId, {}).then(res => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
|
|
||||||
if(res.data ==1){
|
if (res.data == 1) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
title:'支付成功',
|
let isIos = sysInfo.platform == 'ios'
|
||||||
icon:'none'
|
console.log("is ios ", isIos);
|
||||||
})
|
if (isIos) {
|
||||||
this.timer= setTimeout(()=>{
|
|
||||||
clearTimeout(this.timer)
|
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},500)
|
uni.showToast({
|
||||||
}else{
|
title: '支付成功',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1500)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '支付成功',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
clearTimeout(this.timer)
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:'支付中'
|
title: '支付中'
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
@ -69,29 +72,8 @@
|
||||||
onLoad: function(option) {
|
onLoad: function(option) {
|
||||||
console.log(option)
|
console.log(option)
|
||||||
this.url = option.url
|
this.url = option.url
|
||||||
this.ordersId=option.ordersId
|
this.ordersId = option.ordersId
|
||||||
console.log('this.ordersId'+this.ordersId);
|
console.log('this.ordersId' + this.ordersId);
|
||||||
|
|
||||||
// this.url="https://jiaoyu.xianmxkj.com/file/uploadPath/2023/03/08/b6c0dd4821cc9ce70c897adca3ad22c2.pdf"
|
|
||||||
// h5,使用h5访问的时候记得跨域
|
|
||||||
// #ifdef H5
|
|
||||||
// this.url="https://jiaoyu.xianmxkj.com/file/uploadPath/2023/03/08/b6c0dd4821cc9ce70c897adca3ad22c2.pdf"
|
|
||||||
// this.url = `${this.viewerUrl}?file=${encodeURIComponent(option.url)}`;
|
|
||||||
// this.url = `${this.viewerUrl}?file=${'https://jiaoyu.xianmxkj.com/file/uploadPath/2023/03/08/b6c0dd4821cc9ce70c897adca3ad22c2.pdf'}`;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// 在安卓和ios手机上
|
|
||||||
// 判断是手机系统:安卓,使用pdf.js
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
// if(plus.os.name === 'Android') {
|
|
||||||
// this.url = `${this.viewerUrl}?file=${encodeURIComponent(option.url)}`;
|
|
||||||
// }
|
|
||||||
// // ios,直接访问pdf所在路径
|
|
||||||
// else {
|
|
||||||
// this.url = encodeURIComponent(option.url);
|
|
||||||
// }
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -11,27 +11,36 @@
|
||||||
<u-image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></u-image>
|
<u-image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></u-image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content signIn margin-lr padding bg-white u-relative" v-if="list.length" style="margin-bottom: 32rpx;">
|
<view class="content signIn margin-lr padding bg-white u-relative" v-if="isShowMoneyPay" style="margin-bottom: 32rpx;">
|
||||||
<view class="title flex justify-between">
|
<view class="title flex justify-between">
|
||||||
<view>已连续签到 <text class="num">3</text> 天</view>
|
<view>已连续签到 <text class="num">{{signDays}}</text> 天</view>
|
||||||
<view class="dk flex">
|
<!-- <view class="dk flex">
|
||||||
<text style="margin-right: 20rpx;">打卡提醒</text>
|
<text style="margin-right: 20rpx;">打卡提醒</text>
|
||||||
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
|
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="signInList flex justify-between">
|
<view class="signInList flex justify-between">
|
||||||
<text class="line"></text>
|
<text class="line"></text>
|
||||||
<view class="signIn-Item" v-for="(item,index) in signInList" :key="index">
|
<view class="signIn-Item"
|
||||||
<image class="signIn_icon" src="../../static/images/signIn_icon1.png" mode="">
|
:class="{active: item.showText == '待签到'||item.showText == '未签到'||item.showText == '已签到'}"
|
||||||
|
v-for="(item,index) in signInList" :key="index"
|
||||||
|
>
|
||||||
|
<image class="signIn_icon" v-if="item.showText == '未签到'" src="../../static/images/signIn_icon2.png" mode="">
|
||||||
|
<image class="signIn_icon" v-if="item.showText == '已签到'" src="../../static/images/signIn_icon3.png" mode="">
|
||||||
|
<image class="signIn_icon" v-if="item.showText != '未签到'&&item.showText != '已签到'" src="../../static/images/signIn_icon1.png" mode="">
|
||||||
<view class="radius"></view>
|
<view class="radius"></view>
|
||||||
<view class="_label">{{item.name}}</view>
|
<view class="_label">{{item.showText}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<viwe>连续签到7天即可享受惊喜大礼包</viwe>
|
<view class="tishi">连续签到7天即可获得7元奖励</view>
|
||||||
|
|
||||||
<view class="signInBtn">
|
<view class="signInBtn" v-if="signInBtn=='已签到'">
|
||||||
<view>点击签到</view>
|
<view>{{signInBtn}}</view>
|
||||||
|
<view class="signInBtnBg"></view>
|
||||||
|
</view>
|
||||||
|
<view class="signInBtn" v-else @click="taskReceive(15)">
|
||||||
|
<view>{{signInBtn}}</view>
|
||||||
<view class="signInBtnBg"></view>
|
<view class="signInBtnBg"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -39,7 +48,9 @@
|
||||||
|
|
||||||
<view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
<view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
||||||
|
|
||||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index">
|
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index"
|
||||||
|
v-if="(item.buttonUrl=='/me/invite/index'&&isShowMoneyPay)||item.buttonUrl!='/me/invite/index'"
|
||||||
|
>
|
||||||
<view class="cell_left flex">
|
<view class="cell_left flex">
|
||||||
<view class="cell_title flex">
|
<view class="cell_title flex">
|
||||||
<view class="u-font-28 text-bold title" :style="{alignSelf: item.rewardImg?'center':'flex-start'}">{{ item.title}}</view>
|
<view class="u-font-28 text-bold title" :style="{alignSelf: item.rewardImg?'center':'flex-start'}">{{ item.title}}</view>
|
||||||
|
|
@ -72,6 +83,7 @@
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
checked:false,
|
checked:false,
|
||||||
|
signDays: 0,
|
||||||
signInList: [
|
signInList: [
|
||||||
{ name: '第一天' },
|
{ name: '第一天' },
|
||||||
{ name: '第二天' },
|
{ name: '第二天' },
|
||||||
|
|
@ -81,12 +93,50 @@
|
||||||
{ name: '第六天' },
|
{ name: '第六天' },
|
||||||
{ name: '第七天' },
|
{ name: '第七天' },
|
||||||
],
|
],
|
||||||
|
signInBtn: '点击签到',
|
||||||
|
isShowMoneyPay: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getTaskdata()
|
this.getTaskdata()
|
||||||
|
this.getsignIn()
|
||||||
|
this.$Request.getT("app/common/type/919", {}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
|
let isIos = sysInfo.platform == 'ios'
|
||||||
|
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getsignIn() {
|
||||||
|
this.$Request.getT('app/userSignRecord/getUserSignData', {}).then(res => {
|
||||||
|
if (res.code == 0 ) {
|
||||||
|
this.signInList = res.data.recordList
|
||||||
|
this.signDays = res.data.signDays
|
||||||
|
this.signInList.map((item,index)=>{
|
||||||
|
if (item.showText == '待签到'&&index>0) {
|
||||||
|
this.signInBtn = this.signInList[index-1].status == 0 ? '重新签到' : '点击签到'
|
||||||
|
}
|
||||||
|
let someDate = new Date(item.signDay); // 假设这是需要判断的日期
|
||||||
|
if (item.signDay && this.isToday(someDate)) {
|
||||||
|
this.signInBtn = '已签到'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
isToday (date) {
|
||||||
|
const today = new Date();
|
||||||
|
return date.getDate() === today.getDate() // 比较日期
|
||||||
|
&& date.getMonth() === today.getMonth() // 比较月份
|
||||||
|
&& date.getFullYear() === today.getFullYear(); // 比较年份
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转
|
* 跳转
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
|
|
@ -123,16 +173,16 @@
|
||||||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
||||||
if (res.code == 0 ) {
|
if (res.code == 0 ) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '领取成功',
|
title: id==15?'签到成功':'领取成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.getTaskdata()
|
this.getTaskdata()
|
||||||
|
this.getsignIn()
|
||||||
},1000)
|
},1000)
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.switchTab({
|
||||||
title: res.msg,
|
url: "/pages/index/index"
|
||||||
icon: 'none'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -312,8 +362,20 @@
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.signIn-Item.active{
|
||||||
|
.radius{
|
||||||
|
background-color: #EA9EA8;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tishi{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #7F7F7F;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signInBtn{
|
.signInBtn{
|
||||||
width: 355rpx;
|
width: 355rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue