Commit e4cda068 authored by mengcuiguang's avatar mengcuiguang

邀请好友id修改,代码优化

parent b04a2ad6
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;"> <view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;">
订单中如有疑问,请在个人中心联系客服</view> 订单中如有疑问,请跳转【我的】页面</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -199,10 +199,10 @@ ...@@ -199,10 +199,10 @@
this.handlePay(); this.handlePay();
}, },
handlePay() { handlePay() {
if (this.os == 'ios') { // if (this.os == 'ios') {
message.notify('暂不支持ios支付'); // message.notify('暂不支持ios支付');
return // return
} // }
let that = this; let that = this;
let vipBean = this.vipList[this.selectedIndex]; let vipBean = this.vipList[this.selectedIndex];
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
} }
message.notify(res.errMsg); // message.notify(res.errMsg);
}, },
}); });
} else { } else {
......
...@@ -227,6 +227,10 @@ ...@@ -227,6 +227,10 @@
<view class="box-wrap"> <view class="box-wrap">
<image class="img1" @click="handleTaskPage" :src="boxImgUrl"></image> <image class="img1" @click="handleTaskPage" :src="boxImgUrl"></image>
</view>
<view v-if="false" class="box-cebianlan">
<image class="img2" @click="handleCebianlan" :src="ceImgUrl"></image>
</view> </view>
<!-- <uni-popup type="center" ref="select"> <!-- <uni-popup type="center" ref="select">
...@@ -286,7 +290,8 @@ ...@@ -286,7 +290,8 @@
showMask: false, showMask: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png', maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png', maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png',
boxImgUrl: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png', boxImgUrl: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png',
ceImgUrl: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png',
statusBarHeight: app.globalData.statusBarHeight, statusBarHeight: app.globalData.statusBarHeight,
}; };
}, },
...@@ -422,6 +427,19 @@ ...@@ -422,6 +427,19 @@
}, },
handleTaskPage() { handleTaskPage() {
navigateTo(`/pagesA/task/task`) navigateTo(`/pagesA/task/task`)
},
handleCebianlan() {
tt.navigateToScene({
scene: 'sidebar',
activity: '7377634523393769484', // 需改成自己小程序生效中的activity id。activity 为可选项,不填或者填写错误 id,会表现为兜底样式
success: (data) => {
console.log(data)
},
fail: (data) => {
console.log(data)
}
})
}, },
showFirstDialog() { showFirstDialog() {
let that = this; let that = this;
...@@ -529,5 +547,19 @@ ...@@ -529,5 +547,19 @@
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
} }
}
.box-cebianlan {
height: 100rpx;
width: 120rpx;
right: 0;
bottom: 400rpx;
position: absolute;
z-index: 999;
.img2 {
width: 100rpx;
height: 100rpx;
}
} }
</style> </style>
\ No newline at end of file
<template> <template>
<z-paging class="container"> <z-paging class="container">
<view class="item-content"> <view class="item-content">
<view class="flex1 task-title-wrap"> <view class="flex1 task-title-wrap">
<text class="task-title">签到任务</text> <text class="task-title">签到任务</text>
<text class="task-label">领取看点免费看</text> <text class="task-label">领取看点免费看</text>
<text class="sign-rule" @click="showRule">规则</text> <text class="sign-rule" @click="showRule">规则</text>
</view> </view>
<view class="task-line"></view> <view class="task-line"></view>
<view class="task-wrap flex"> <view class="task-wrap flex">
<view class="flex1" style="justify-content: space-between"> <view class="flex1" style="justify-content: space-between">
<block v-for="(item,key) in signList" :key="key"> <block v-for="(item,key) in signList" :key="key">
<view class="flex ml-10"> <view class="flex ml-10">
<view :class="item.compleled?'sign-item':'sign-item2'"> <view :class="item.compleled?'sign-item':'sign-item2'">
<image :src="item.compleled?signOkImg:signNoneImg"></image> <image :src="item.compleled?signOkImg:signNoneImg"></image>
<text class="text1">{{ '+' + item.reward }}</text> <text class="text1">{{ '+' + item.reward }}</text>
</view> </view>
<text :style="item.text == '今天'?'color:#f84a57;':''">{{ item.text }}</text> <text :style="item.text == '今天'?'color:#f84a57;':''">{{ item.text }}</text>
</view> </view>
</block> </block>
</view> </view>
<button v-if="signData.list[signData.todayMsgIndexInWeek].rewardMoreType==2" open-type="share" <button v-if="signData.list[signData.todayMsgIndexInWeek].rewardMoreType==2" open-type="share"
:class="signBtnStyle" @click="sign">{{signData.buttonText}}</button> :class="signBtnStyle" @click="sign">{{signData.buttonText}}</button>
<button v-else :class="signBtnStyle" @click="sign">{{signData.buttonText}}</button> <button v-else :class="signBtnStyle" @click="sign">{{signData.buttonText}}</button>
</view> </view>
</view> </view>
<view class="item-content"> <view class="item-content">
<block v-for="(item,key) in taskList" :key="key"> <block v-for="(item,key) in taskList" :key="key">
<view class="flex1 task-title-wrap"> <view class="flex1 task-title-wrap">
<text class="task-title">{{ item.title }}</text> <text class="task-title">{{ item.title }}</text>
<text v-if="item.title == '日常任务'" class="task-label">每日0点重置</text> <text v-if="item.title == '日常任务'" class="task-label">每日0点重置</text>
</view> </view>
<view class="task-line"></view> <view class="task-line"></view>
<view class="flex task-wrap"> <view class="flex task-wrap">
<block v-for="(item2,key2) in item.taskList" :key="key2"> <block v-for="(item2,key2) in item.taskList" :key="key2">
<view class="flex1" <view class="flex1"
style="width: 96%;justify-content: space-between;margin-top: 10rpx;margin-bottom: 20rpx;"> style="width: 96%;justify-content: space-between;margin-top: 10rpx;margin-bottom: 20rpx;">
<view class="flex" style="width: 70%; align-items: flex-start"> <view class="flex" style="width: 70%; align-items: flex-start">
<view class="flex1"> <view class="flex1">
<text <text
style="color: #000000;font-size: 30rpx;font-weight: bold;margin-right: 10rpx;">{{ item2.title }}</text> style="color: #000000;font-size: 30rpx;font-weight: bold;margin-right: 10rpx;">{{ item2.title }}</text>
<image style="width: 36rpx; height: 36rpx; margin: 0 10rpx" :src="taskCoinImg"> <image style="width: 36rpx; height: 36rpx; margin: 0 10rpx" :src="taskCoinImg">
</image> </image>
<text <text
style="color: #f84a57;font-size: 30rpx;font-weight: bold;">{{ '+' + item2.rewardPoint }}</text> style="color: #f84a57;font-size: 30rpx;font-weight: bold;">{{ '+' + item2.rewardPoint }}</text>
</view> </view>
<view> <view>
<text style="font-size: 24rpx">{{ item2.content }}</text> <text style="font-size: 24rpx">{{ item2.content }}</text>
</view> </view>
<view class="flex1" v-if="item2.runingMax>0" style="margin-top: 10rpx"> <view class="flex1" v-if="item2.runingMax>0" style="margin-top: 10rpx">
<view style="width: 120rpx"> <view style="width: 120rpx">
<progress style="stroke-width: 8rpx; color: #ffa500" type="horizontal" <progress style="stroke-width: 8rpx; color: #ffa500" type="horizontal"
:percent=" item2.runing / item2.runingMax * 100 " /> :percent=" item2.runing / item2.runingMax * 100 " />
</view> </view>
<text style="margin-left: 20rpx; font-size: 20rpx">{{ <text style="margin-left: 20rpx; font-size: 20rpx">{{
item2.runing + item2.runing +
'/' + '/' +
item2.runingMax + item2.runingMax +
' ' + ' ' +
item2.runingMaxText item2.runingMaxText
}}</text> }}</text>
</view> </view>
</view> </view>
<text :class="(item2.status==0)?'task-btn':((item2.status==1)?'task-btn2':'task-btn3')" <text :class="(item2.status==0)?'task-btn':((item2.status==1)?'task-btn2':'task-btn3')"
@click="doTask(item2)">{{ item2.buttonText }}</text> @click="doTask(item2)">{{ item2.buttonText }}</text>
</view> </view>
</block> </block>
</view> </view>
</block> </block>
</view> </view>
<reward-popup :show="showRewardPopup" :dot="signData.list[signData.todayMsgIndexInWeek].reward" <reward-popup :show="showRewardPopup" :dot="signData.list[signData.todayMsgIndexInWeek].reward"
@rewardClose="rewardClose"></reward-popup> @rewardClose="rewardClose"></reward-popup>
<signsuc-popup :show="showSignPopup" :moreDot="signData.list[signData.todayMsgIndexInWeek].rewardMore" <signsuc-popup :show="showSignPopup" :moreDot="signData.list[signData.todayMsgIndexInWeek].rewardMore"
:stype="signData.list[signData.todayMsgIndexInWeek].rewardMoreType" :stype="signData.list[signData.todayMsgIndexInWeek].rewardMoreType"
:dot="signData.list[signData.todayMsgIndexInWeek].reward" @submit="sign" :dot="signData.list[signData.todayMsgIndexInWeek].reward" @submit="sign"
@signClose="signClose"></signsuc-popup> @signClose="signClose"></signsuc-popup>
</z-paging> </z-paging>
</template> </template>
<script> <script>
import rewardPopup from '@/components/reward-popup/reward-popup.vue'; import rewardPopup from '@/components/reward-popup/reward-popup.vue';
import signsucPopup from '@/components/signsuc-popup/signsuc-popup.vue'; import signsucPopup from '@/components/signsuc-popup/signsuc-popup.vue';
import { import {
REWARD_ID REWARD_ID
} from '../../utils/adConstant.js'; } from '../../utils/adConstant.js';
import common from '@/mixins/common'; import common from '@/mixins/common';
import { import {
message, message,
navigateBack, navigateBack,
navigateTo, navigateTo,
redirectTo redirectTo
} from '@/utils/fun'; } from '@/utils/fun';
import { import {
TaskConstant TaskConstant
} from '../../utils/taskConstant.js' } from '../../utils/taskConstant.js'
export default { export default {
name: 'task', name: 'task',
mixins: [common], mixins: [common],
components: { components: {
rewardPopup, rewardPopup,
signsucPopup signsucPopup
}, },
data() { data() {
return { return {
signData: '', signData: '',
signList: [], signList: [],
taskList: [], taskList: [],
showRewardPopup: false, showRewardPopup: false,
showSignPopup: false, showSignPopup: false,
currentDot: '', currentDot: '',
signBtnStyle: 'sign-btn', signBtnStyle: 'sign-btn',
signOkImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_receive.png', signOkImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_receive.png',
signNoneImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_unreceive.png', signNoneImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_unreceive.png',
taskCoinImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_unreceive_little.png', taskCoinImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_unreceive_little.png',
signRule: '1、每7天为一个签到周期,用户连续签满7天,完成一个签到周期,下次签到开始重新计算新的签到周期。\r\n2、用户每次签到均可获得相应的奖励连续签到7天可获得更高奖励。\r\n3、若途中漏签,则从第一天开始重新计算新的签到周期。\r\n4、签到及任务赠送看点的有效期均为5天,过期自动作废,请及时使用。', signRule: '1、每7天为一个签到周期,用户连续签满7天,完成一个签到周期,下次签到开始重新计算新的签到周期。\r\n2、用户每次签到均可获得相应的奖励连续签到7天可获得更高奖励。\r\n3、若途中漏签,则从第一天开始重新计算新的签到周期。\r\n4、签到及任务赠送看点的有效期均为5天,过期自动作废,请及时使用。',
share: { share: {
title: '更多好剧,等你来看', title: '更多好剧,等你来看',
imageUrl: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png', imageUrl: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png',
path: '/pages/loading?shareId=' path: '/pages/loading?shareId='
} }
} }
}, },
mounted() { mounted() {
this.getSignList() this.getSignList()
this.getTaskList() this.getTaskList()
this.preloadAd() this.preloadAd()
}, },
onUnload() { onUnload() {
this.ad.offClose(this.ad.closeHandler); this.ad.offClose(this.ad.closeHandler);
}, },
methods: { methods: {
async onShareAppMessage(option) { async onShareAppMessage(option) {
const title = this.share.title; const title = this.share.title;
let that = this let that = this
return { return {
title, // 这是要转发的小程序标题 title, // 这是要转发的小程序标题
desc: '', desc: '',
path: this.share.path + getApp().globalData.userId, path: this.share.path + getApp().globalData.userId,
imageUrl: this.share.imageUrl, imageUrl: this.share.imageUrl,
templateId: "920405b4ghj2fla2gc", templateId: "l71480kcg8lhn19i5b",
success() { success() {
message.notify('分享成功'); message.notify('分享成功');
if (that.signData.list[signData.todayMsgIndexInWeek].rewardMoreType) { if (that.signData.list[signData.todayMsgIndexInWeek].rewardMoreType) {
that.reportTaskPointMore(that.signData.list[signData.todayMsgIndexInWeek]) that.reportTaskPointMore(that.signData.list[signData.todayMsgIndexInWeek])
} }
}, },
fail() { fail() {
message.notify('分享失败'); message.notify('分享失败');
}, },
}; };
}, },
preloadAd() { preloadAd() {
this.ad = tt.createRewardedVideoAd({ this.ad = tt.createRewardedVideoAd({
adUnitId: REWARD_ID, adUnitId: REWARD_ID,
}); });
// 监听错误 // 监听错误
this.ad.onError((err) => { this.ad.onError((err) => {
tt.hideLoading(); tt.hideLoading();
message.notify('广告拉取失败,请稍候再试'); message.notify('广告拉取失败,请稍候再试');
switch (err.errCode) { switch (err.errCode) {
case 1004: case 1004:
// 无合适的广告 // 无合适的广告
break; break;
default: default:
// 更多请参考错误码文档 // 更多请参考错误码文档
} }
}); });
// 预加载资源 // 预加载资源
this.ad.load(); this.ad.load();
}, },
showAd(item, isSign) { showAd(item, isSign) {
let that = this let that = this
this.ad.closeHandler = function(res) { this.ad.closeHandler = function(res) {
tt.hideLoading(); tt.hideLoading();
if (data.isEnded) { if (data.isEnded) {
if (isSign) { if (isSign) {
that.reportTaskPointMore(item) that.reportTaskPointMore(item)
} else { } else {
that.reportCompleteTask(item.taskId) that.reportCompleteTask(item.taskId)
} }
} else { } else {
message.notify('未观看完视频'); message.notify('未观看完视频');
} }
}; };
this.ad.onClose(this.ad.closeHandler) this.ad.onClose(this.ad.closeHandler)
this.ad.show(); this.ad.show();
}, },
getSignList() { getSignList() {
let that = this let that = this
this.post({ this.post({
url: '/vTask/sign/pageMsg', url: '/vTask/sign/pageMsg',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
that.signData = data that.signData = data
that.signList = [] that.signList = []
that.signList = data.list that.signList = data.list
if (that.signData.buttonStatus == 0 || that.signData.buttonStatus == 1) { if (that.signData.buttonStatus == 0 || that.signData.buttonStatus == 1) {
that.signBtnStyle = "sign-btn" that.signBtnStyle = "sign-btn"
} else { } else {
that.signBtnStyle = "sign-btn2" that.signBtnStyle = "sign-btn2"
} }
} }
}); });
}, },
getTaskList() { getTaskList() {
// 任务信息 // 任务信息
let that = this let that = this
this.post({ this.post({
url: '/vTask/taskList/pageMsg', url: '/vTask/taskList/pageMsg',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
that.taskList = data.pageMsg that.taskList = data.pageMsg
// for (var i = 0; i < that.taskList.length; i++) { // for (var i = 0; i < that.taskList.length; i++) {
// for (var j = 0; j < that.taskList[i].taskList.length; j++) { // for (var j = 0; j < that.taskList[i].taskList.length; j++) {
// if (that.taskList[i].taskList[j].listCode == TaskConstant.openForHome && // if (that.taskList[i].taskList[j].listCode == TaskConstant.openForHome &&
// that.taskList[i].taskList[j].status == 0 // that.taskList[i].taskList[j].status == 0
// ) { // ) {
// that.isFromForHome() // that.isFromForHome()
// return // return
// } // }
// } // }
// } // }
// this.$refs.paging.complete(data.pageMsg); // this.$refs.paging.complete(data.pageMsg);
} }
}); });
}, },
hasShortCut(taskId) { hasShortCut(taskId) {
let that = this let that = this
shortcut.hasInstalled({ shortcut.hasInstalled({
success: function() { success: function() {
$utils.showToast('桌面图标已创建!') $utils.showToast('桌面图标已创建!')
that.reportCompleteTask(taskId) that.reportCompleteTask(taskId)
}, },
fail: function() { fail: function() {
that.createShortCut(taskId) that.createShortCut(taskId)
} }
}) })
}, },
createShortCut(taskId) { createShortCut(taskId) {
let that = this let that = this
// 创建桌面图标 // 创建桌面图标
shortcut.install({ shortcut.install({
success: function() { success: function() {
$utils.showToast('创建桌面图标成功!') $utils.showToast('创建桌面图标成功!')
that.reportCompleteTask(taskId) that.reportCompleteTask(taskId)
}, },
fail: function(data, code) { fail: function(data, code) {
$utils.showToast('创建桌面图标失败!') $utils.showToast('创建桌面图标失败!')
} }
}) })
}, },
sign() { sign() {
let buttonStatus = this.signData.buttonStatus let buttonStatus = this.signData.buttonStatus
if (this.signData == '' || this.signData.buttonStatus == 2) { if (this.signData == '' || this.signData.buttonStatus == 2) {
return return
} }
if (this.signData.buttonStatus == 0) { if (this.signData.buttonStatus == 0) {
let item = this.signList[this.signData.todayMsgIndexInWeek] let item = this.signList[this.signData.todayMsgIndexInWeek]
this.reportTaskPoint(item, true) this.reportTaskPoint(item, true)
return return
} }
let rewardMoreType = this.signList[this.signData.todayMsgIndexInWeek].rewardMoreType let rewardMoreType = this.signList[this.signData.todayMsgIndexInWeek].rewardMoreType
if (rewardMoreType == 1) { if (rewardMoreType == 1) {
let item = this.signList[this.signData.todayMsgIndexInWeek] let item = this.signList[this.signData.todayMsgIndexInWeek]
this.showAd(item, true) this.showAd(item, true)
} else if (ewardMoreType == 2) { } else if (ewardMoreType == 2) {
// 分享 // 分享
this.myShare(this.signList[this.signData.todayMsgIndexInWeek]) this.myShare(this.signList[this.signData.todayMsgIndexInWeek])
} }
}, },
reportTaskPoint(item, isSign) { reportTaskPoint(item, isSign) {
// 领取奖励 // 领取奖励
let that = this let that = this
this.post({ this.post({
url: '/vTask/common/addTaskPoint', url: '/vTask/common/addTaskPoint',
data: { data: {
taskId: item.taskId taskId: item.taskId
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
if (isSign) { if (isSign) {
that.currentDot = item.reward that.currentDot = item.reward
that.getSignList() that.getSignList()
that.showSignPopup = true that.showSignPopup = true
} else { } else {
that.currentDot = item.rewardPoint that.currentDot = item.rewardPoint
that.getTaskList() that.getTaskList()
that.showRewardPopup = true that.showRewardPopup = true
} }
}, },
}); });
}, },
reportTaskPointMore(item) { reportTaskPointMore(item) {
// 领取奖励 // 领取奖励
let that = this let that = this
this.post({ this.post({
url: '/vTask/common/addTaskPoint/more', url: '/vTask/common/addTaskPoint/more',
data: { data: {
taskId: item.taskId taskId: item.taskId
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
message.notify('已成功领取' + item.reward + '看点'); message.notify('已成功领取' + item.reward + '看点');
that.currentDot = item.reward that.currentDot = item.reward
that.getSignList() that.getSignList()
}, },
}); });
}, },
reportCompleteTask(taskId) { reportCompleteTask(taskId) {
// 上报完成任务 // 上报完成任务
let that = this let that = this
this.post({ this.post({
url: '/vTask/common/reportCompleteMsg', url: '/vTask/common/reportCompleteMsg',
data: { data: {
taskId: taskId taskId: taskId
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
that.getSignList() that.getSignList()
that.getTaskList() that.getTaskList()
} }
}); });
}, },
showRule() { showRule() {
uni.showModal({ uni.showModal({
title: '签到规则', title: '签到规则',
content: this.signRule, content: this.signRule,
showCancel: false, showCancel: false,
confirmColor: '#33dd44', confirmColor: '#33dd44',
confirmText: '确定' confirmText: '确定'
}) })
}, },
doTask(item) { doTask(item) {
if (item.status == 3) { if (item.status == 3) {
// 已领取金币 // 已领取金币
message.notify('请稍后再试') message.notify('请稍后再试')
return return
} else if (item.status == 2) { } else if (item.status == 2) {
// 已领取金币 // 已领取金币
message.notify('已领取金币') message.notify('已领取金币')
return return
} else if (item.status == 1) { } else if (item.status == 1) {
// 已完成任务,领取看点 // 已完成任务,领取看点
this.reportTaskPoint(item, false) this.reportTaskPoint(item, false)
} else { } else {
// 去完成任务 // 去完成任务
if ( if (
item.listCode == TaskConstant.seeVedioListPage item.listCode == TaskConstant.seeVedioListPage
) { ) {
this.reportCompleteTask(item.taskId) this.reportCompleteTask(item.taskId)
navigateTo(`/pages/home`) navigateTo(`/pages/home`)
} else if ( } else if (
item.listCode == TaskConstant.firstToHomePage || item.listCode == TaskConstant.firstToHomePage ||
item.listCode == TaskConstant.seeVedio || item.listCode == TaskConstant.seeVedio ||
item.listCode == TaskConstant.seeOneNewVedio || item.listCode == TaskConstant.seeOneNewVedio ||
item.listCode == TaskConstant.compeleOneVedio || item.listCode == TaskConstant.compeleOneVedio ||
item.listCode == TaskConstant.compeleVedios || item.listCode == TaskConstant.compeleVedios ||
item.listCode == TaskConstant.completeSeeDays item.listCode == TaskConstant.completeSeeDays
) { ) {
redirectTo(`/pages/home`) redirectTo(`/pages/home`)
} else if ( } else if (
item.listCode == TaskConstant.firstPay || item.listCode == TaskConstant.firstPay ||
item.listCode == TaskConstant.payBack || item.listCode == TaskConstant.payBack ||
item.listCode == TaskConstant.completePay item.listCode == TaskConstant.completePay
) { ) {
navigateTo(`/pagesA/vipPay/vipPay`) navigateTo(`/pagesA/vipPay/vipPay`)
} else if ( } else if (
item.listCode == TaskConstant.saveToPhonePage item.listCode == TaskConstant.saveToPhonePage
) { ) {
this.hasShortCut(item.taskId) this.hasShortCut(item.taskId)
} else if ( } else if (
item.listCode == TaskConstant.openForHome item.listCode == TaskConstant.openForHome
) { ) {
redirectTo(`/pages/home`) redirectTo(`/pages/home`)
} else if ( } else if (
item.listCode == TaskConstant.loginByMobie item.listCode == TaskConstant.loginByMobie
) { ) {
redirectTo(`/pages/loading`) redirectTo(`/pages/loading`)
} else if ( } else if (
item.listCode == TaskConstant.seeAd item.listCode == TaskConstant.seeAd
) { ) {
// TODO 看广告 // TODO 看广告
this.showAd(item, false) this.showAd(item, false)
} else { } else {
redirectTo(`/pages/home`) redirectTo(`/pages/home`)
} }
} }
}, },
myShare(item) { myShare(item) {
// TODO 分享 // TODO 分享
}, },
signMoreReward(item) { signMoreReward(item) {
// 签到-广告或者分享后领取更多 // 签到-广告或者分享后领取更多
let that = this let that = this
this.post({ this.post({
url: '/vTask/common/addTaskPoint/more', url: '/vTask/common/addTaskPoint/more',
data: { data: {
taskId: item.taskId taskId: item.taskId
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
that.currentDot = item.reward that.currentDot = item.reward
that.getSignList() that.getSignList()
that.showSignPopup = true that.showSignPopup = true
} }
}); });
}, },
rewardClose() { rewardClose() {
this.showRewardPopup = false this.showRewardPopup = false
}, },
signClose() { signClose() {
this.showSignPopup = false this.showSignPopup = false
}, },
isFromForHome() { isFromForHome() {
let that = this let that = this
if (uni.getEnterOptionsSync().launcher == 'shortcut') { if (uni.getEnterOptionsSync().launcher == 'shortcut') {
if (that.taskList.length > 0) { if (that.taskList.length > 0) {
for (var i = 0; i < that.taskList.length; i++) { for (var i = 0; i < that.taskList.length; i++) {
for (var j = 0; j < that.taskList[i].taskList.length; j++) { for (var j = 0; j < that.taskList[i].taskList.length; j++) {
if (that.taskList[i].taskList[j].listCode == TaskConstant.openForHome && if (that.taskList[i].taskList[j].listCode == TaskConstant.openForHome &&
that.taskList[i].taskList[j].status == 0 that.taskList[i].taskList[j].status == 0
) { ) {
that.reportCompleteTask(that.taskList[i].taskList[j].taskId) that.reportCompleteTask(that.taskList[i].taskList[j].taskId)
return return
} }
} }
} }
} }
} }
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.container { .container {
background: linear-gradient(#fcddba, #fff5ea); background: linear-gradient(#fcddba, #fff5ea);
flex: 1; flex: 1;
} }
.item-content { .item-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 100%; width: 100%;
margin-top: 20rpx; margin-top: 20rpx;
} }
.flex { .flex {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.flex1 { .flex1 {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.task-wrap { .task-wrap {
width: 92%; width: 92%;
background-color: #ffffff; background-color: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
image { image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
} }
.task-title-wrap { .task-title-wrap {
width: 92%; width: 92%;
background-color: #ffffff; background-color: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
height: 100rpx; height: 100rpx;
} }
.task-line { .task-line {
width: 85%; width: 85%;
height: 1rpx; height: 1rpx;
background: repeating-linear-gradient(to right, background: repeating-linear-gradient(to right,
transparent 15%, transparent 15%,
#fcddba 20%, #fcddba 20%,
transparent 25%); transparent 25%);
/* background: linear-gradient( /* background: linear-gradient(
to left, to left,
transparent 0%, transparent 0%,
transparent 50%, transparent 50%,
#ffa500 50%, #ffa500 50%,
#ffa500 100% #ffa500 100%
); );
background-size: 10rpx 1rpx; background-size: 10rpx 1rpx;
background-repeat: repeat-x; */ background-repeat: repeat-x; */
} }
.task-title { .task-title {
margin-left: 30rpx; margin-left: 30rpx;
color: #fb4c39; color: #fb4c39;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.task-label { .task-label {
border-radius: 6rpx; border-radius: 6rpx;
font-size: 20rpx; font-size: 20rpx;
height: 36rpx; height: 36rpx;
line-height: 36rpx; line-height: 36rpx;
background-color: #fef9ea; background-color: #fef9ea;
border: 1rpx solid #fb3309; border: 1rpx solid #fb3309;
color: #b67e17; color: #b67e17;
margin-left: 20rpx; margin-left: 20rpx;
padding: 0 10rpx; padding: 0 10rpx;
} }
.sign-rule { .sign-rule {
margin-left: auto; margin-left: auto;
background-color: #ffa500; background-color: #ffa500;
text-align: center; text-align: center;
font-size: 22rpx; font-size: 22rpx;
color: #ffffff; color: #ffffff;
padding-left: 26rpx; padding-left: 26rpx;
padding-right: 20rpx; padding-right: 20rpx;
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
border-top-left-radius: 40rpx; border-top-left-radius: 40rpx;
border-bottom-left-radius: 40rpx; border-bottom-left-radius: 40rpx;
} }
.sign-btn { .sign-btn {
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
border-radius: 80rpx; border-radius: 80rpx;
font-size: 34rpx; font-size: 34rpx;
width: 90%; width: 90%;
line-height: 80rpx; line-height: 80rpx;
height: 80rpx; height: 80rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background: repeating-linear-gradient(to right, #fb6c3a, #fc473a); background: repeating-linear-gradient(to right, #fb6c3a, #fc473a);
button::after { button::after {
border: none; border: none;
} }
} }
.sign-btn2 { .sign-btn2 {
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
border-radius: 80rpx; border-radius: 80rpx;
font-size: 30rpx; font-size: 30rpx;
width: 90%; width: 90%;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #dcdcdc; background-color: #dcdcdc;
button::after { button::after {
border: none; border: none;
} }
} }
.task-btn { .task-btn {
font-size: 26rpx; font-size: 26rpx;
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
border-radius: 70rpx; border-radius: 70rpx;
background-color: #fb3309; background-color: #fb3309;
width: 180rpx; width: 180rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
} }
.task-btn2 { .task-btn2 {
color: #ffa500; color: #ffa500;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
border: 1rpx solid #fb3309; border: 1rpx solid #fb3309;
border-radius: 70rpx; border-radius: 70rpx;
background-color: #ffffff; background-color: #ffffff;
width: 180rpx; width: 180rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
} }
.task-btn3 { .task-btn3 {
color: #808080; color: #808080;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
border: 1rpx solid #808080; border: 1rpx solid #808080;
border-radius: 70rpx; border-radius: 70rpx;
background-color: #ffffff; background-color: #ffffff;
width: 180rpx; width: 180rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
} }
.sign-item { .sign-item {
padding: 10rpx 0; padding: 10rpx 0;
width: 78rpx; width: 78rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
border-radius: 8rpx; border-radius: 8rpx;
border: 1rpx solid #ffa500; border: 1rpx solid #ffa500;
margin: 10rpx 0; margin: 10rpx 0;
image { image {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
} }
.text1 { .text1 {
margin-top: 4rpx; margin-top: 4rpx;
color: #ffa500; color: #ffa500;
} }
} }
.sign-item2 { .sign-item2 {
padding: 10rpx 0; padding: 10rpx 0;
width: 78rpx; width: 78rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
border-radius: 8rpx; border-radius: 8rpx;
background-color: #fb3309; background-color: #fb3309;
border: 1rpx solid #fb3309; border: 1rpx solid #fb3309;
margin: 10rpx 0; margin: 10rpx 0;
image { image {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
} }
.text1 { .text1 {
margin-top: 4rpx; margin-top: 4rpx;
color: #ffa500; color: #ffa500;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -263,10 +263,10 @@ ...@@ -263,10 +263,10 @@
// this.$refs.alertDialog.open(); // this.$refs.alertDialog.open();
}, },
handlePay() { handlePay() {
if (this.os == 'ios') { // if (this.os == 'ios') {
message.notify('暂不支持ios支付'); // message.notify('暂不支持ios支付');
return // return
} // }
let that = this; let that = this;
let vipBean = this.pointList[this.selectedIndex]; let vipBean = this.pointList[this.selectedIndex];
if (this.selectedIndex == -1) { if (this.selectedIndex == -1) {
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
that.ttPay(largeType, res.orderId, ttData); that.ttPay(largeType, res.orderId, ttData);
}, },
fail(res) { fail(res) {
message.notify(res.errMsg); // message.notify(res.errMsg);
console.log('requestOrder res.errMsg', res) console.log('requestOrder res.errMsg', res)
}, },
}); });
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
desc: '', desc: '',
path: this.share.path + getApp().globalData.userId, path: this.share.path + getApp().globalData.userId,
imageUrl: this.share.imageUrl, imageUrl: this.share.imageUrl,
templateId: "920405b4ghj2fla2gc", templateId: "l71480kcg8lhn19i5b",
success() { success() {
message.notify('分享成功'); message.notify('分享成功');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment