|
|
@@ -21,9 +21,9 @@
|
|
|
<div class="box-item">
|
|
|
<img src="@assets/icon_yaoqing.png" alt="" />
|
|
|
<div class="box-info">
|
|
|
- <div class="text1">好友助力({{ taskInfo.isInvited ? 1 : 0 }}/1)</div>
|
|
|
+ <div class="text1">好友助力({{ inviteCount > 2 ? 2 : inviteCount }}/2)</div>
|
|
|
|
|
|
- <div class="text2">邀请好友助力可获得1点能量,每天可邀请助力上限1点能量</div>
|
|
|
+ <div class="text2">邀请好友助力可获得1点能量,每天可邀请助力上限2点能量</div>
|
|
|
</div>
|
|
|
<van-button class="not" v-if="taskInfo.isInvited" type="primary" round>已完成</van-button>
|
|
|
<van-button v-else type="primary" round @click="share">邀请</van-button>
|
|
|
@@ -31,9 +31,9 @@
|
|
|
<div class="box-item">
|
|
|
<img src="@assets/icon_zhuli.png" alt="" />
|
|
|
<div class="box-info">
|
|
|
- <div class="text1">乐善好施({{ helpCount > 2 ? 2 : helpCount }}/2)</div>
|
|
|
+ <div class="text1">乐善好施({{ helpCount > 3 ? 3 : helpCount }}/3)</div>
|
|
|
|
|
|
- <div class="text2">帮助2名好友助力可获得1点能量,每天上限可获得1点能量</div>
|
|
|
+ <div class="text2">帮助1名好友助力可获得1点能量,每天上限3点能量</div>
|
|
|
</div>
|
|
|
<van-button class="not" v-if="helpCount >= 2" type="primary" round>已完成</van-button>
|
|
|
<van-button v-else type="primary" round @click="show = false">去助力</van-button>
|
|
|
@@ -114,12 +114,14 @@ function sign() {
|
|
|
const taskInfo = ref({});
|
|
|
const helpCount = ref(0);
|
|
|
const selfScore = ref(0);
|
|
|
+const inviteCount = ref(0);
|
|
|
function getTask() {
|
|
|
http.http.get('/rice/taskInitialization').then(res => {
|
|
|
taskInfo.value = res.map;
|
|
|
});
|
|
|
http.http.get('/rice/current').then(res => {
|
|
|
// this.info = res.data;
|
|
|
+ inviteCount.value = Number(res.data.inviteCount || 0);
|
|
|
helpCount.value = Number(res.data.helpCount);
|
|
|
selfScore.value = Number(res.data.selfScore);
|
|
|
});
|