|
|
@@ -11,8 +11,8 @@
|
|
|
<view v-else-if="taskData && taskData.length > 0">
|
|
|
<view class="task-list">
|
|
|
<view
|
|
|
- v-for="task in taskData"
|
|
|
- :key="task.activityId"
|
|
|
+ v-for="(task,index) in taskData"
|
|
|
+ :key="index"
|
|
|
class="task-item">
|
|
|
<view class="task-item-left">
|
|
|
<view class="task-icon">
|
|
|
@@ -28,12 +28,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="task-item-right">
|
|
|
+ <text class="progress-text">{{ task.completedCount }}/{{ task.triggerValue }}</text>
|
|
|
<button
|
|
|
- :class="task.completedStatus == 1 ? 'task-btn' : 'no-task-btn'"
|
|
|
+ :class="Number(task.completedCount) >= Number(task.triggerValue) ? 'task-btn' : 'no-task-btn'"
|
|
|
@click.stop="handleTask(task)"
|
|
|
- :disabled="task.completedStatus == 1"
|
|
|
+ :disabled="Number(task.completedCount) >= Number(task.triggerValue)"
|
|
|
>
|
|
|
- {{ task.completedStatus == 1 ? '已完成' : '去完成' }}
|
|
|
+ {{Number(task.completedCount) >= Number(task.triggerValue) ? '已完成' : '去完成' }}
|
|
|
</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -51,7 +52,7 @@
|
|
|
|
|
|
<script>
|
|
|
import ImageItem from "@/components/swiper/components/image.vue";
|
|
|
-
|
|
|
+import { handleServiceShare } from '@/utils/share'
|
|
|
export default {
|
|
|
components: { ImageItem },
|
|
|
props: {
|
|
|
@@ -98,7 +99,7 @@ export default {
|
|
|
if (taskName.includes('商户')) return this.taskConfig.merchant.icon;
|
|
|
if (taskName.includes('动态')) return this.taskConfig.dynamic.icon;
|
|
|
if (taskName.includes('服务号')) return this.taskConfig.service.icon;
|
|
|
- if (taskName.includes('账号充值')) return this.taskConfig.recharge.icon;
|
|
|
+ if (taskName.includes('充值')) return this.taskConfig.recharge.icon;
|
|
|
return '';
|
|
|
},
|
|
|
|
|
|
@@ -114,7 +115,7 @@ export default {
|
|
|
this.taskConfig.dynamic.action();
|
|
|
} else if (task.taskName.includes('服务号')) {
|
|
|
this.taskConfig.service.action();
|
|
|
- } else if (task.taskName.includes('账号充值')) {
|
|
|
+ } else if (task.taskName.includes('充值')) {
|
|
|
this.taskConfig.recharge.action();
|
|
|
}
|
|
|
},
|
|
|
@@ -140,7 +141,13 @@ export default {
|
|
|
|
|
|
// 处理服务号任务
|
|
|
handleServiceTask() {
|
|
|
- // 服务号任务处理逻辑
|
|
|
+ // 调用微信服务号分享功能
|
|
|
+ handleServiceShare({
|
|
|
+ title: '广誉远 - 关注服务号',
|
|
|
+ desc: '关注广誉远服务号,获取更多积分和优惠',
|
|
|
+ link: window.location.href,
|
|
|
+ imgUrl: '/static/points/task_wx.png'
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// 处理账号充值任务
|
|
|
@@ -242,6 +249,17 @@ export default {
|
|
|
}
|
|
|
|
|
|
.task-item-right {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ .progress-text{
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #999999;
|
|
|
+ line-height: 28rpx;
|
|
|
+ margin-right: 8rpx;
|
|
|
+ margin-top: 10rpx;
|
|
|
+ }
|
|
|
.task-btn {
|
|
|
height: 48rpx;
|
|
|
background: #EEEEEE;
|