更新
This commit is contained in:
@@ -112,6 +112,13 @@
|
|||||||
let result = JSON.parse(res.result)
|
let result = JSON.parse(res.result)
|
||||||
if (result.qrcodeText) {
|
if (result.qrcodeText) {
|
||||||
serve.checkQrStr(result.giveCustomerId, result.qrcodeText).then(res => {
|
serve.checkQrStr(result.giveCustomerId, result.qrcodeText).then(res => {
|
||||||
|
if (res.code !== 20000) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '',
|
||||||
|
content: res.msg
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
let currentCard = this.card || []
|
let currentCard = this.card || []
|
||||||
this.$emit('buttomPopup', {
|
this.$emit('buttomPopup', {
|
||||||
...currentCard,
|
...currentCard,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view>{{user.name || ''}}</view>
|
<view>{{user.name || ''}}</view>
|
||||||
<view>{{user.userPhone || ''}}</view>
|
<view>{{phoneHandle}}</view>
|
||||||
</view>
|
</view>
|
||||||
<tki-qrcode ref="qrcode" cid="2" :val="qrcodeText" :size="400" :isHaveBg="false" pdground="#000"
|
<tki-qrcode ref="qrcode" cid="2" :val="qrcodeText" :size="400" :isHaveBg="false" pdground="#000"
|
||||||
foreground="#000" background="#fff" onval showLoading loadMake />
|
foreground="#000" background="#fff" onval showLoading loadMake />
|
||||||
@@ -36,6 +36,14 @@
|
|||||||
created() {
|
created() {
|
||||||
this.getQrStr()
|
this.getQrStr()
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
phoneHandle() {
|
||||||
|
let phone = this.user.userPhone
|
||||||
|
console.log('user',this.user)
|
||||||
|
if(!phone) return ''
|
||||||
|
return `${phone.substr(0,3)}****${phone.substr(-4)}`
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQrStr(reset = 0) {
|
getQrStr(reset = 0) {
|
||||||
console.log('this.user', this.user)
|
console.log('this.user', this.user)
|
||||||
|
|||||||
@@ -94,11 +94,13 @@
|
|||||||
serve.giveCard({
|
serve.giveCard({
|
||||||
phone: this.user.userPhone
|
phone: this.user.userPhone
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
if(res.code === 20000) {
|
||||||
this.time = 60
|
this.time = 60
|
||||||
this.params.verifyCodeToken = res.data.verifyCodeToken
|
this.params.verifyCodeToken = res.data.verifyCodeToken
|
||||||
this.timefn()
|
this.timefn()
|
||||||
this.isFocus = true
|
this.isFocus = true
|
||||||
this.$refs.smscodePopup.open()
|
this.$refs.smscodePopup.open()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -145,10 +147,12 @@
|
|||||||
accountCardCode,
|
accountCardCode,
|
||||||
...this.params
|
...this.params
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
if(res.code === 20000) {
|
||||||
this.$refs.indexPopup.close()
|
this.$refs.indexPopup.close()
|
||||||
this.$refs.smscodePopup.close()
|
this.$refs.smscodePopup.close()
|
||||||
this.$refs.successPopupt.open()
|
this.$refs.successPopupt.open()
|
||||||
this.$emit('reloadCard')
|
this.$emit('reloadCard')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -905,6 +905,13 @@
|
|||||||
}
|
}
|
||||||
accountApi.checkQrStr(result.giveCustomerId, result.qrcodeText).then(
|
accountApi.checkQrStr(result.giveCustomerId, result.qrcodeText).then(
|
||||||
res => {
|
res => {
|
||||||
|
if (res.code !== 20000) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '',
|
||||||
|
content: res.msg
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
let currentCard = accountResult.data[0] || []
|
let currentCard = accountResult.data[0] || []
|
||||||
this.$refs.transBlcok._open({
|
this.$refs.transBlcok._open({
|
||||||
...currentCard,
|
...currentCard,
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ service.interceptors.response.use(
|
|||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
return Promise.reject()
|
// return Promise.reject()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user