|
@@ -1,5 +1,5 @@
|
|
|
// import { formatMoney } from '@/utils/index'
|
|
|
-import { getFailList } from '@/api/accountCenter/openInfoManage'
|
|
|
+import { getFailList, reGetAuthQrcode } from '@/api/accountCenter/openInfoManage'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -130,7 +130,8 @@ export default {
|
|
|
prop: 'reason',
|
|
|
showTooltip: true
|
|
|
}],
|
|
|
- reasonList: []
|
|
|
+ reasonList: [],
|
|
|
+ timeReduce: 48 * 60 * 60 * 1000
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -139,7 +140,7 @@ export default {
|
|
|
const { rowPower } = item
|
|
|
if (rowPower) {
|
|
|
if (item.category === 'auth') {
|
|
|
- return row.customerStatus === '生效' && rowPower.includes(row.userAtuhSts)
|
|
|
+ return row.qrCode && row.customerStatus === '生效' && rowPower.includes(row.userAtuhSts)
|
|
|
} else if (item.category === 'reason') {
|
|
|
return rowPower.includes(row.customerStatus)
|
|
|
} else {
|
|
@@ -164,12 +165,19 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else if (type === 'auth') {
|
|
|
- // 授权逻辑
|
|
|
- this.$refs.authorizationRef.openDialog(true)
|
|
|
- this.authActiveInfo = {
|
|
|
- name: this.companyList[row.parentIdx].authenticator,
|
|
|
- qrcodeUrl: row.qrCode,
|
|
|
- effectTime: row.qrCodeEffectTime
|
|
|
+ // 去授权 -- 这里做一个判断,如果二维码认证时间过期 需要重新调用生成二维码接口
|
|
|
+ const nowTimeTemp = new Date().getTime()
|
|
|
+ const qrCodeValidTime = new Date(row.qrCodeEffectTime).getTime() + this.timeReduce
|
|
|
+
|
|
|
+ if (qrCodeValidTime - nowTimeTemp <= 0) {
|
|
|
+ this.resetQrCodeUri(row)
|
|
|
+ } else {
|
|
|
+ this.authActiveInfo = {
|
|
|
+ name: row.authenticator,
|
|
|
+ qrcodeUrl: row.qrCode,
|
|
|
+ effectTime: row.qrCodeEffectTime
|
|
|
+ }
|
|
|
+ this.$refs.authorizationRef.openDialog(true)
|
|
|
}
|
|
|
} else if (type === 'reason') {
|
|
|
// 核验失败原因
|
|
@@ -182,6 +190,18 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ async resetQrCodeUri(curRow) {
|
|
|
+ const res = await reGetAuthQrcode({ id: curRow.id })
|
|
|
+
|
|
|
+ if (res.success) {
|
|
|
+ this.authActiveInfo = {
|
|
|
+ name: res.data.authenticator,
|
|
|
+ qrcodeUrl: res.data.qrCode,
|
|
|
+ effectTime: res.data.qrCodeEffectTime
|
|
|
+ }
|
|
|
+ this.$refs.authorizationRef.openDialog(true)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|