|
@@ -166,13 +166,13 @@
|
|
|
</view>
|
|
|
任务列表
|
|
|
</view>
|
|
|
- <view class="content_hongbao">
|
|
|
+ <view class="content_hongbao" v-if="registAmount">
|
|
|
<view class="hongbao_left">
|
|
|
<image class="icon_hongbao" src="https://dm.static.elab-plus.com/yezhu/icon_hongbao.png"
|
|
|
mode=""></image>
|
|
|
<view class="hongbao_left_info">
|
|
|
<text class="hongbao_title">邀请好友注册</text>
|
|
|
- <text class="hongbao_money">完成邀请,可获得 ¥1/人</text>
|
|
|
+ <text class="hongbao_money">完成邀请,可获得 ¥{{registAmount}}/人</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="hongbao_right" @click="toShareCard('',1)">
|
|
@@ -261,7 +261,8 @@
|
|
|
city:"城市",
|
|
|
type:"",
|
|
|
typeName:"类型",
|
|
|
- optionType:1
|
|
|
+ optionType:1,
|
|
|
+ registAmount:null,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -302,6 +303,7 @@
|
|
|
this.pageNo = 1;
|
|
|
this.getUserInfo();
|
|
|
this.getHomePage();
|
|
|
+ this.getRegistTask();
|
|
|
},
|
|
|
chooiceType(e){
|
|
|
this.city = e.city==''?"城市":(e.city).split('市')[0];
|
|
@@ -310,6 +312,21 @@
|
|
|
this.pageNo = 1;
|
|
|
this.getHomePage();
|
|
|
},
|
|
|
+ async getRegistTask(){
|
|
|
+ if(app.globalData.userId){
|
|
|
+ let res = await this.$myRequest({
|
|
|
+ url: "/task/registTask",
|
|
|
+ data: {
|
|
|
+ "userId":app.globalData.userId,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(res.data.success){
|
|
|
+ this.registAmount = res.data.single.amount||null
|
|
|
+ }else{
|
|
|
+ this.registAmount = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
async getHomePage() {
|
|
|
let ret = await this.$myRequest({
|
|
|
url: "/project/homePage",
|
|
@@ -318,7 +335,7 @@
|
|
|
"pageNo": this.pageNo,
|
|
|
"pageSize": this.pageSize,
|
|
|
"taskCategoryId": this.type,
|
|
|
- "userId":this.userInfo.userId,
|
|
|
+ "userId":app.globalData.userId,
|
|
|
}
|
|
|
})
|
|
|
if (ret.data.success) {
|