|
@@ -26,13 +26,13 @@
|
|
|
<view class="phone">{{ userInfo.ncikName || '' }}</view>
|
|
<view class="phone">{{ userInfo.ncikName || '' }}</view>
|
|
|
<!-- <view class="welcome">尊敬的{{ userInfo.ncikName || ''}},下午好~</view>-->
|
|
<!-- <view class="welcome">尊敬的{{ userInfo.ncikName || ''}},下午好~</view>-->
|
|
|
</view>
|
|
</view>
|
|
|
- <view @click="goQrCode" class="arrow-right">
|
|
|
|
|
|
|
+ <view v-if="myActivityList.length > 0" @click="goQrCode" class="arrow-right">
|
|
|
<!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
|
|
<!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
|
|
|
<!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
|
|
<!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
|
|
|
<view class="h-text">会员码</view> -->
|
|
<view class="h-text">会员码</view> -->
|
|
|
- <view class="coupon-wrap">
|
|
|
|
|
|
|
+ <view class="coupon-wrap">
|
|
|
<!-- <u-icon name="/static/me/u5.png" color="#ffb83d" size="22"></u-icon>-->
|
|
<!-- <u-icon name="/static/me/u5.png" color="#ffb83d" size="22"></u-icon>-->
|
|
|
- <text>邀请有礼</text>
|
|
|
|
|
|
|
+ <text>邀约有礼</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -237,9 +237,12 @@
|
|
|
<!-- </view>-->
|
|
<!-- </view>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
- <uni-popup ref="strategyListPoup">
|
|
|
|
|
|
|
+ <uni-popup :mask-click="false" ref="strategyListPoup">
|
|
|
|
|
|
|
|
- <view class="flex-col justify-start expirePopup" >
|
|
|
|
|
|
|
+ <view class="flex-col justify-start expirePopup" style="position: relative;">
|
|
|
|
|
+ <view class="flex-row justify-between" style="position: absolute;top: 20rpx;right: 20rpx" @click="closeStrategyListPoup">
|
|
|
|
|
+ <u-icon size="20" name="close-circle-fill"></u-icon>
|
|
|
|
|
+ </view>
|
|
|
<view class="flex-row justify-center">
|
|
<view class="flex-row justify-center">
|
|
|
<text class="popupTitle">新人专享</text>
|
|
<text class="popupTitle">新人专享</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -432,10 +435,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ myActivityList:[],
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ // this.getRuleById()
|
|
|
|
|
+ this.myActivity()
|
|
|
this.updateApp()
|
|
this.updateApp()
|
|
|
this.userInfo = uni.getStorageSync('userInfo');
|
|
this.userInfo = uni.getStorageSync('userInfo');
|
|
|
if (this.userInfo.selfPhoto) {
|
|
if (this.userInfo.selfPhoto) {
|
|
@@ -560,6 +567,29 @@ export default {
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
+ myActivity(){
|
|
|
|
|
+ this.$api.myActivity({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ }).then(res=>{
|
|
|
|
|
+ this.myActivityList = res.data.rows
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ closeStrategyListPoup(){
|
|
|
|
|
+ this.$refs.strategyListPoup.close()
|
|
|
|
|
+ //关闭弹窗
|
|
|
|
|
+ console.log('拓客端推广用户绑定失败!')
|
|
|
|
|
+ console.log('+++++++++++++++expandParam+++++++++++++++++++++++',expandParam)
|
|
|
|
|
+ that.$api.addRecordForAttach({
|
|
|
|
|
+ ...expandParam,
|
|
|
|
|
+ isNew:1,
|
|
|
|
|
+ isBindSuccess:0,
|
|
|
|
|
+ }).then(res=>{
|
|
|
|
|
+ console.log('+++++++++新用户,扫码推广失败记录!++++++++++++++++')
|
|
|
|
|
+ })
|
|
|
|
|
+ uni.removeStorageSync('expandParam');
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
userBindMember (){
|
|
userBindMember (){
|
|
|
let expandParam = uni.getStorageSync('expandParam')
|
|
let expandParam = uni.getStorageSync('expandParam')
|
|
@@ -572,18 +602,42 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (couponIds.length !== this.rule.receivedCount){
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '请选择' + this.rule.receivedCount + '张优惠券',
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ icon:"error"
|
|
|
|
|
+ });
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//用户扫码拓客端进入小程序
|
|
//用户扫码拓客端进入小程序
|
|
|
that.$api.userBindMember(
|
|
that.$api.userBindMember(
|
|
|
{
|
|
{
|
|
|
...expandParam,
|
|
...expandParam,
|
|
|
memberId: this.userInfo.id,
|
|
memberId: this.userInfo.id,
|
|
|
memberPhone:this.phoneParam.phonenumber,
|
|
memberPhone:this.phoneParam.phonenumber,
|
|
|
- code:this.phoneParam.code,
|
|
|
|
|
|
|
+ smsCode:this.phoneParam.smsCode,
|
|
|
couponIds: couponIds
|
|
couponIds: couponIds
|
|
|
}
|
|
}
|
|
|
).then(res1 => {
|
|
).then(res1 => {
|
|
|
- console.log('拓客端推广用户绑定成功!')
|
|
|
|
|
|
|
|
|
|
|
|
+ //关闭弹窗
|
|
|
|
|
+ this.$refs.strategyListPoup.close()
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '领取成功',
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ icon:"success"
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url:"/orderPages/myCoupon/index"
|
|
|
|
|
+ })
|
|
|
|
|
+ },2000)
|
|
|
|
|
+
|
|
|
|
|
+ console.log('拓客端推广用户绑定成功!')
|
|
|
|
|
+ console.log('+++++++++++++++expandParam+++++++++++++++++++++++',expandParam)
|
|
|
that.$api.addRecordForAttach({
|
|
that.$api.addRecordForAttach({
|
|
|
...expandParam,
|
|
...expandParam,
|
|
|
isNew:1,
|
|
isNew:1,
|
|
@@ -591,18 +645,6 @@ export default {
|
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
|
console.log('+++++++++新用户,扫码推广成功记录!++++++++++++++++')
|
|
console.log('+++++++++新用户,扫码推广成功记录!++++++++++++++++')
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
- uni.removeStorageSync('expandParam');
|
|
|
|
|
- }).catch(err=>{
|
|
|
|
|
-
|
|
|
|
|
- that.$api.addRecordForAttach({
|
|
|
|
|
- ...expandParam,
|
|
|
|
|
- isNew:1,
|
|
|
|
|
- isBindSuccess:0,
|
|
|
|
|
- }).then(res=>{
|
|
|
|
|
- console.log('+++++++++新用户,扫码推广失败记录!++++++++++++++++')
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
uni.removeStorageSync('expandParam');
|
|
uni.removeStorageSync('expandParam');
|
|
|
})
|
|
})
|
|
|
|
|
|