pull/12/head
xiaozhiyong 1 year ago
parent aaa0058528
commit 27b6f29c00
  1. 7
      BagMoney/components/oil-card/oil-card.vue
  2. 10
      BagStation/pages/oilQRcode/index.vue
  3. 22
      components/transBlock/index.vue
  4. 11
      pages/tabbar/home/home.vue
  5. 2
      utils/request.js

@ -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 => {
this.time = 60
this.params.verifyCodeToken = res.data.verifyCodeToken
this.timefn()
this.isFocus = true
this.$refs.smscodePopup.open()
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 => {
this.$refs.indexPopup.close()
this.$refs.smscodePopup.close()
this.$refs.successPopupt.open()
this.$emit('reloadCard')
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: "登录星油加油才可以加油 |˛˙꒳˙)♡",
@ -885,7 +885,7 @@
}
}
})
return
return
}
uni.scanCode({
scanType: 'qrCode',
@ -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()
}
}
}

Loading…
Cancel
Save