|
|
@@ -638,6 +638,8 @@ export default {
|
|
|
closeStrategyListPoup() {
|
|
|
this.$refs.strategyListPoup.close()
|
|
|
//关闭弹窗
|
|
|
+ let expandParam = uni.getStorageSync('expandParam')
|
|
|
+ let that = this
|
|
|
console.log('拓客端推广用户绑定失败!')
|
|
|
console.log('+++++++++++++++expandParam+++++++++++++++++++++++', expandParam)
|
|
|
that.$api.addRecordForAttach({
|
|
|
@@ -655,6 +657,22 @@ export default {
|
|
|
userBindMember() {
|
|
|
let expandParam = uni.getStorageSync('expandParam')
|
|
|
let that = this
|
|
|
+
|
|
|
+ // 直接从 Storage 获取最新的 userInfo,避免 this.userInfo 未正确赋值
|
|
|
+ const userInfo = uni.getStorageSync('userInfo') || {}
|
|
|
+ const memberId = userInfo.id
|
|
|
+ console.log('========userBindMember memberId=======', memberId)
|
|
|
+ console.log('========userBindMember userInfo=======', userInfo)
|
|
|
+
|
|
|
+ if (!memberId) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '用户信息获取失败,请重新登录',
|
|
|
+ duration: 2000,
|
|
|
+ icon: "error"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
this.$refs.form1.validate().then(res => {
|
|
|
let couponIds = []
|
|
|
for (const strategy of this.rule.strategyList) {
|
|
|
@@ -676,7 +694,7 @@ export default {
|
|
|
that.$api.userBindMember(
|
|
|
{
|
|
|
...expandParam,
|
|
|
- memberId: this.userInfo.id,
|
|
|
+ memberId: memberId,
|
|
|
memberPhone: this.phoneParam.phonenumber,
|
|
|
smsCode: this.phoneParam.smsCode,
|
|
|
couponIds: couponIds
|