90c0a58b by lttnew

认证缴费

1 parent 982620f9
......@@ -166,6 +166,7 @@ function getMyOwnMemberInfo() {
app.globalData.authenticationStatus = res.data.authenticationStatus
app.globalData.memberInfo = res.data.memberInfo
app.globalData.isExam = res.data?.memberInfo?.isPoints
return res
})
}
......
<template>
<view :class="{ 'lock-scroll': popupShow }">
<view v-if="showDirectly&&directUnderFlag==0">
<view v-if="showDirectly&&directUnderFlag==0 &&associateId==0">
<view class="head-box">
<view class="flexbox ">
<view class="title">{{ form.name }}</view>
......@@ -172,6 +172,7 @@ const userType = ref()
const activeStatus = ref(0)
const directUnderFlag = ref(0)
const showDirectly = ref(true)
const associateId = ref(0)
const authenticationStatusa = ref()
const result = ref(false)
const resultNoProvince = ref(false)
......@@ -218,6 +219,7 @@ function init() {
resultNoProvince.value = res.data.resultNoProvince2
authenticationStatusa.value = res.data.authenticationStatus
showDirectly.value = !res.data.memberInfo.associateId
associateId.value = res.data.memberInfo.associateId
activeStatus.value = res.data.memberInfo.activeStatus
pr.value = res.data.pr
directUnderFlag.value = res.data.memberInfo.directUnderFlag
......
......@@ -25,7 +25,7 @@
<!-- <image :src="config.loginImage_api + '/fs/static/dg/icon02@3x.png'" class="btn-icon"></image>-->
<!-- <text>基本信息</text>-->
<!-- </view>-->
<view class="unit-btn" @click="goPath('/myCenter/perfect')">
<view class="unit-btn" @click="goAuthPayV2">
<image :src="config.loginImage_api + '/fs/static/dg/icon03@3x.png'" class="btn-icon"></image>
<text>认证缴费</text>
</view>
......@@ -564,6 +564,18 @@
</view>
</view>
</uni-popup>
<uni-popup ref="authPayPopup" :mask-click="false" type="center">
<view class="dialog-wrapper auth-pay-dialog">
<view class="dialog-title">提示</view>
<view class="dialog-message">
<text>{{ authPayPopupMsg }}</text>
</view>
<view class="dialog-footer">
<button class="dialog-btn confirm" @click="closeAuthPayDialog">确定</button>
</view>
</view>
</uni-popup>
</view>
</template>
......@@ -597,10 +609,17 @@ const deptInfo = ref({})
let proId;
const svId = ref(null);
const numData = ref({});
const authPayDisabled = ref(true)
const authPayPopup = ref(null)
const authPayPopupMsg = ref('')
const showDirectlyForAuthPay = ref(false)
const directUnderFlagForAuthPay = ref(0)
const associateIdForAuthPay = ref(0)
// 是否是道馆用户
const isDaoGuan = computed(() => {
return userType.value == '4' || app.globalData.deptType == '6'
console.log('isDaoGuan', app.globalData.deptType,userType.value)
return userType.value == '4' || app.globalData.deptType == '6' || app.globalData.deptType == '3'
})
const messageList = ref([])
......@@ -753,16 +772,79 @@ function goPath(path) {
}
function updateAuthPayDisabled(data = {}) {
const authStatus = data.authenticationStatus
const resultNoProvince = data.resultNoProvince2
if (authStatus == 0) {
authPayDisabled.value = false
} else if (authStatus == 1) {
authPayDisabled.value = true
} else {
const canPay = resultNoProvince === true || resultNoProvince == 1
authPayDisabled.value = !canPay
}
}
function updateAuthPayRule(data = {}) {
const memberInfoData = data.memberInfo || {}
const associateId = Number(memberInfoData.associateId || 0)
showDirectlyForAuthPay.value = !associateId
directUnderFlagForAuthPay.value = Number(memberInfoData.directUnderFlag || 0)
associateIdForAuthPay.value = associateId
}
function canAuthPayByAccountStatus() {
return showDirectlyForAuthPay.value &&
directUnderFlagForAuthPay.value === 0 &&
associateIdForAuthPay.value === 0
}
function showAuthPayDialog(message) {
authPayPopupMsg.value = message
authPayPopup.value.open()
}
function closeAuthPayDialog() {
authPayPopup.value.close()
}
function goAuthPayV2() {
if (!canAuthPayByAccountStatus()) {
showAuthPayDialog('当前账号状态暂无法办理缴费业务')
return
}
if (authPayDisabled.value) {
showAuthPayDialog('您有一笔缴费正在审核中,请勿重复缴费。您可前往【认证详情】查看审核进度。')
return
}
goPath('/myCenter/perfect')
}
function goAuthPay() {
if (authPayDisabled.value) {
uni.showToast({
title: '当前状态不可缴费',
icon: 'none'
})
return
}
goPath('/myCenter/perfect')
}
function init() {
isInit.value = true
loginServer.getMyOwnMemberInfo().then(res => {
console.log(43, res)
userType.value = app.globalData.userType
memberInfo.value = app.globalData.memberInfo
const memberResData = res && res.data ? res.data : {}
updateAuthPayDisabled(memberResData)
updateAuthPayRule(memberResData)
// deptInfo.value = app.globalData.dept || {}
// app.globalData.deptInfo = res.dept || {}
console.log(43, res)
if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData.authenticationStatus != '4') {
// 注册引导
uni.navigateTo({
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!