|
@@ -12,8 +12,12 @@
|
|
|
</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>
|
|
|
</template>
|
|
</template>
|
|
@@ -24,11 +28,21 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
userInfo: {},
|
|
userInfo: {},
|
|
|
- giveUser: {}
|
|
|
|
|
|
|
+ giveUser: {},
|
|
|
|
|
+ count:null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onShow(){
|
|
|
|
|
+ this.presentCount()
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
handleGive() {
|
|
handleGive() {
|
|
|
|
|
+
|
|
|
|
|
+ if (this.count == 0){
|
|
|
|
|
+ uni.$u.toast('可赠送次数不足!')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
this.giveUser.memberNo = "Vip." + this.userInfo.memberNo
|
|
this.giveUser.memberNo = "Vip." + this.userInfo.memberNo
|
|
|
this.giveUser.memberPhone = this.userInfo.memberPhone
|
|
this.giveUser.memberPhone = this.userInfo.memberPhone
|
|
|
this.$api.giveFamilyCard(this.giveUser).then((res) => {
|
|
this.$api.giveFamilyCard(this.giveUser).then((res) => {
|
|
@@ -40,6 +54,11 @@ export default {
|
|
|
uni.navigateBack({delta : 1})
|
|
uni.navigateBack({delta : 1})
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
+ },
|
|
|
|
|
+ presentCount(){
|
|
|
|
|
+ this.$api.presentCount().then(res=>{
|
|
|
|
|
+ this.count = res.data.data
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -59,4 +78,8 @@ export default {
|
|
|
border-radius: 27px;
|
|
border-radius: 27px;
|
|
|
line-height: 42px;
|
|
line-height: 42px;
|
|
|
}
|
|
}
|
|
|
|
|
+.presentCount{
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #666666;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|