|
@@ -12,7 +12,9 @@
|
|
|
</u--form>
|
|
</u--form>
|
|
|
<view class="op-btn-wrap">
|
|
<view class="op-btn-wrap">
|
|
|
<view class="h-btn" @click="handleGive">
|
|
<view class="h-btn" @click="handleGive">
|
|
|
- <text>确定</text>
|
|
|
|
|
|
|
+ <text>确定
|
|
|
|
|
+ <text class="presentCount" v-if="count !== null">(剩余可赠送{{count}}次)</text>
|
|
|
|
|
+ </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -24,9 +26,13 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
userInfo: {},
|
|
userInfo: {},
|
|
|
- giveUser: {}
|
|
|
|
|
|
|
+ giveUser: {},
|
|
|
|
|
+ count:null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onShow(){
|
|
|
|
|
+ this.presentCount()
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
handleGive() {
|
|
handleGive() {
|
|
|
this.giveUser.memberNo = "Vip." + this.userInfo.memberNo
|
|
this.giveUser.memberNo = "Vip." + this.userInfo.memberNo
|
|
@@ -40,6 +46,11 @@ export default {
|
|
|
uni.navigateBack({delta : 1})
|
|
uni.navigateBack({delta : 1})
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
+ },
|
|
|
|
|
+ presentCount(){
|
|
|
|
|
+ this.$api.presentCount().then(res=>{
|
|
|
|
|
+ this.count = res.data.data
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -59,4 +70,8 @@ export default {
|
|
|
border-radius: 27px;
|
|
border-radius: 27px;
|
|
|
line-height: 42px;
|
|
line-height: 42px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .presentCount{
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #666666;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|