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