|
@@ -9,7 +9,7 @@
|
|
|
:is-left="false"
|
|
|
:customNavbarInfo='{}'>
|
|
|
<view slot="right">
|
|
|
- <image v-if="isShowQrcode" @click="getRetailQrcode()" style="width: 44rpx;height: 44rpx;" :src="fengxiang" mode=""></image>
|
|
|
+ <image @click="getRetailQrcode()" style="width: 44rpx;height: 44rpx;" :src="fengxiang" mode=""></image>
|
|
|
</view>
|
|
|
</customNavbar>
|
|
|
<u-search
|
|
@@ -66,7 +66,7 @@
|
|
|
:title="title1"
|
|
|
:content='content'
|
|
|
cancelText='取消'
|
|
|
- confirmText='去认证'
|
|
|
+ :confirmText='confirmText'
|
|
|
showCancelButton
|
|
|
confirmColor='#ED0000'
|
|
|
@confirm='networkConfirm'
|
|
@@ -90,10 +90,11 @@
|
|
|
fengxiang: this.$commonConfig.staticUrl+'index/fengxiang.png',
|
|
|
|
|
|
// 入网认证
|
|
|
- isShowQrcode: false, // 是否展示 推广码
|
|
|
- show: true,
|
|
|
+ isShowQrcode: -1, // 是否展示 推广码
|
|
|
+ show: false,
|
|
|
title1:'入网提示',
|
|
|
content:'你还未进行银联支付入网签约认证,请先完成签约认证!',
|
|
|
+ confirmText: '去认证',
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -190,17 +191,33 @@
|
|
|
*/
|
|
|
async getRetailQrcode(){
|
|
|
try{
|
|
|
- let res = await this.$u.api.getRetailQrcode({
|
|
|
- noSign: 1,
|
|
|
- userid: this.distribution_user_info.userId
|
|
|
- })
|
|
|
+ await this.getUserInfo()
|
|
|
+ if(this.isShowQrcode != 1) {
|
|
|
+ if(this.isShowQrcode == 0) {
|
|
|
+ this.content = '你还未进行银联支付入网签约认证,请先完成签约认证!'
|
|
|
+ this.confirmText = '去认证'
|
|
|
+ }else if(this.isShowQrcode == 2) {
|
|
|
+ this.content = '银联支付入网签约认证中,请耐心等待!'
|
|
|
+ this.confirmText = '去查看'
|
|
|
+ }else if(this.isShowQrcode == 3) {
|
|
|
+ this.content = '银联支付入网签约认证失败,请重新认证!'
|
|
|
+ this.confirmText = '重新认证'
|
|
|
+ }
|
|
|
+ this.show = true
|
|
|
+ }else {
|
|
|
+ let res = await this.$u.api.getRetailQrcode({
|
|
|
+ noSign: 1,
|
|
|
+ userid: this.distribution_user_info.userId
|
|
|
+ })
|
|
|
+
|
|
|
+ if(res && res.code ===200) {
|
|
|
+ this.$refs.customPromotionCode.initData(res.data)
|
|
|
+ // #ifdef H5
|
|
|
+ //window.history.pushState(null, null, document.URL)
|
|
|
+ // #endif
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if(res && res.code ===200) {
|
|
|
- this.$refs.customPromotionCode.initData(res.data)
|
|
|
- // #ifdef H5
|
|
|
- //window.history.pushState(null, null, document.URL)
|
|
|
- // #endif
|
|
|
- }
|
|
|
}catch(e){
|
|
|
//TODO handle the exception
|
|
|
console.error("e===",e)
|
|
@@ -210,10 +227,49 @@
|
|
|
/** 入网认证 */
|
|
|
networkConfirm() {
|
|
|
this.show = false
|
|
|
+ this.navigateToFun('/pages/networkAuth/index')
|
|
|
+ //this.getUnionAccessUrlFun()
|
|
|
},
|
|
|
networkCancel() {
|
|
|
this.show = false
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 获取用户信息
|
|
|
+ */
|
|
|
+ async getUserInfo() {
|
|
|
+ try{
|
|
|
+ let res = await this.$u.api.getInfo({
|
|
|
+ noSign: 1,
|
|
|
+ userid: this.distribution_user_info.userId
|
|
|
+ })
|
|
|
+ if(res && res.code ===200) {
|
|
|
+ this.isShowQrcode = res.data.unionFlag
|
|
|
+ }
|
|
|
+ }catch(e){
|
|
|
+ //TODO handle the exception
|
|
|
+ console.error("e===",e)
|
|
|
+ this.isShowQrcode = -1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 银联签约入网地址 */
|
|
|
+ async getUnionAccessUrlFun(){
|
|
|
+ try{
|
|
|
+ let res = await this.$u.api.getUnionAccessUrl({
|
|
|
+ userid: this.distribution_user_info.userId
|
|
|
+ })
|
|
|
+
|
|
|
+ if(res && res.code ===200) {
|
|
|
+ this.show = false
|
|
|
+ location.href = res.data.jumpUrl
|
|
|
+ } else {
|
|
|
+ this.show = true
|
|
|
+ }
|
|
|
+ }catch(e){
|
|
|
+ //TODO handle the exception
|
|
|
+ this.show = true
|
|
|
+ console.error("e===",e)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|