90c0a58b by lttnew

认证缴费

1 parent 982620f9
...@@ -157,17 +157,18 @@ function groupMemberRegister(data) { ...@@ -157,17 +157,18 @@ function groupMemberRegister(data) {
157 } 157 }
158 158
159 // 获取道馆信息 159 // 获取道馆信息
160 function getMyOwnMemberInfo() { 160 function getMyOwnMemberInfo() {
161 return request({ 161 return request({
162 url: '/member/info/getMyOwnMemberInfo', 162 url: '/member/info/getMyOwnMemberInfo',
163 method: 'get' 163 method: 'get'
164 }).then(res => { 164 }).then(res => {
165 const app = getApp() 165 const app = getApp()
166 app.globalData.authenticationStatus = res.data.authenticationStatus 166 app.globalData.authenticationStatus = res.data.authenticationStatus
167 app.globalData.memberInfo = res.data.memberInfo 167 app.globalData.memberInfo = res.data.memberInfo
168 app.globalData.isExam = res.data?.memberInfo?.isPoints 168 app.globalData.isExam = res.data?.memberInfo?.isPoints
169 }) 169 return res
170 } 170 })
171 }
171 172
172 function pcLoginOpenId() { 173 function pcLoginOpenId() {
173 uni.login({ 174 uni.login({
......
1 <template> 1 <template>
2 <view :class="{ 'lock-scroll': popupShow }"> 2 <view :class="{ 'lock-scroll': popupShow }">
3 <view v-if="showDirectly&&directUnderFlag==0"> 3 <view v-if="showDirectly&&directUnderFlag==0 &&associateId==0">
4 <view class="head-box"> 4 <view class="head-box">
5 <view class="flexbox "> 5 <view class="flexbox ">
6 <view class="title">{{ form.name }}</view> 6 <view class="title">{{ form.name }}</view>
...@@ -172,6 +172,7 @@ const userType = ref() ...@@ -172,6 +172,7 @@ const userType = ref()
172 const activeStatus = ref(0) 172 const activeStatus = ref(0)
173 const directUnderFlag = ref(0) 173 const directUnderFlag = ref(0)
174 const showDirectly = ref(true) 174 const showDirectly = ref(true)
175 const associateId = ref(0)
175 const authenticationStatusa = ref() 176 const authenticationStatusa = ref()
176 const result = ref(false) 177 const result = ref(false)
177 const resultNoProvince = ref(false) 178 const resultNoProvince = ref(false)
...@@ -218,6 +219,7 @@ function init() { ...@@ -218,6 +219,7 @@ function init() {
218 resultNoProvince.value = res.data.resultNoProvince2 219 resultNoProvince.value = res.data.resultNoProvince2
219 authenticationStatusa.value = res.data.authenticationStatus 220 authenticationStatusa.value = res.data.authenticationStatus
220 showDirectly.value = !res.data.memberInfo.associateId 221 showDirectly.value = !res.data.memberInfo.associateId
222 associateId.value = res.data.memberInfo.associateId
221 activeStatus.value = res.data.memberInfo.activeStatus 223 activeStatus.value = res.data.memberInfo.activeStatus
222 pr.value = res.data.pr 224 pr.value = res.data.pr
223 directUnderFlag.value = res.data.memberInfo.directUnderFlag 225 directUnderFlag.value = res.data.memberInfo.directUnderFlag
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 <!-- <image :src="config.loginImage_api + '/fs/static/dg/icon02@3x.png'" class="btn-icon"></image>--> 25 <!-- <image :src="config.loginImage_api + '/fs/static/dg/icon02@3x.png'" class="btn-icon"></image>-->
26 <!-- <text>基本信息</text>--> 26 <!-- <text>基本信息</text>-->
27 <!-- </view>--> 27 <!-- </view>-->
28 <view class="unit-btn" @click="goPath('/myCenter/perfect')"> 28 <view class="unit-btn" @click="goAuthPayV2">
29 <image :src="config.loginImage_api + '/fs/static/dg/icon03@3x.png'" class="btn-icon"></image> 29 <image :src="config.loginImage_api + '/fs/static/dg/icon03@3x.png'" class="btn-icon"></image>
30 <text>认证缴费</text> 30 <text>认证缴费</text>
31 </view> 31 </view>
...@@ -564,6 +564,18 @@ ...@@ -564,6 +564,18 @@
564 </view> 564 </view>
565 </view> 565 </view>
566 </uni-popup> 566 </uni-popup>
567
568 <uni-popup ref="authPayPopup" :mask-click="false" type="center">
569 <view class="dialog-wrapper auth-pay-dialog">
570 <view class="dialog-title">提示</view>
571 <view class="dialog-message">
572 <text>{{ authPayPopupMsg }}</text>
573 </view>
574 <view class="dialog-footer">
575 <button class="dialog-btn confirm" @click="closeAuthPayDialog">确定</button>
576 </view>
577 </view>
578 </uni-popup>
567 </view> 579 </view>
568 </template> 580 </template>
569 581
...@@ -597,10 +609,17 @@ const deptInfo = ref({}) ...@@ -597,10 +609,17 @@ const deptInfo = ref({})
597 let proId; 609 let proId;
598 const svId = ref(null); 610 const svId = ref(null);
599 const numData = ref({}); 611 const numData = ref({});
612 const authPayDisabled = ref(true)
613 const authPayPopup = ref(null)
614 const authPayPopupMsg = ref('')
615 const showDirectlyForAuthPay = ref(false)
616 const directUnderFlagForAuthPay = ref(0)
617 const associateIdForAuthPay = ref(0)
600 618
601 // 是否是道馆用户 619 // 是否是道馆用户
602 const isDaoGuan = computed(() => { 620 const isDaoGuan = computed(() => {
603 return userType.value == '4' || app.globalData.deptType == '6' 621 console.log('isDaoGuan', app.globalData.deptType,userType.value)
622 return userType.value == '4' || app.globalData.deptType == '6' || app.globalData.deptType == '3'
604 }) 623 })
605 624
606 const messageList = ref([]) 625 const messageList = ref([])
...@@ -753,16 +772,79 @@ function goPath(path) { ...@@ -753,16 +772,79 @@ function goPath(path) {
753 772
754 } 773 }
755 774
775 function updateAuthPayDisabled(data = {}) {
776 const authStatus = data.authenticationStatus
777 const resultNoProvince = data.resultNoProvince2
778 if (authStatus == 0) {
779 authPayDisabled.value = false
780 } else if (authStatus == 1) {
781 authPayDisabled.value = true
782 } else {
783 const canPay = resultNoProvince === true || resultNoProvince == 1
784 authPayDisabled.value = !canPay
785 }
786 }
787
788 function updateAuthPayRule(data = {}) {
789 const memberInfoData = data.memberInfo || {}
790 const associateId = Number(memberInfoData.associateId || 0)
791 showDirectlyForAuthPay.value = !associateId
792 directUnderFlagForAuthPay.value = Number(memberInfoData.directUnderFlag || 0)
793 associateIdForAuthPay.value = associateId
794 }
795
796 function canAuthPayByAccountStatus() {
797 return showDirectlyForAuthPay.value &&
798 directUnderFlagForAuthPay.value === 0 &&
799 associateIdForAuthPay.value === 0
800 }
801
802 function showAuthPayDialog(message) {
803 authPayPopupMsg.value = message
804 authPayPopup.value.open()
805 }
806
807 function closeAuthPayDialog() {
808 authPayPopup.value.close()
809 }
810
811 function goAuthPayV2() {
812 if (!canAuthPayByAccountStatus()) {
813 showAuthPayDialog('当前账号状态暂无法办理缴费业务')
814 return
815 }
816 if (authPayDisabled.value) {
817 showAuthPayDialog('您有一笔缴费正在审核中,请勿重复缴费。您可前往【认证详情】查看审核进度。')
818 return
819 }
820 goPath('/myCenter/perfect')
821 }
822
823 function goAuthPay() {
824 if (authPayDisabled.value) {
825 uni.showToast({
826 title: '当前状态不可缴费',
827 icon: 'none'
828 })
829 return
830 }
831 goPath('/myCenter/perfect')
832 }
833
756 function init() { 834 function init() {
757 isInit.value = true 835 isInit.value = true
758 836
759 837
760 loginServer.getMyOwnMemberInfo().then(res => { 838 loginServer.getMyOwnMemberInfo().then(res => {
839 console.log(43, res)
761 userType.value = app.globalData.userType 840 userType.value = app.globalData.userType
762 memberInfo.value = app.globalData.memberInfo 841 memberInfo.value = app.globalData.memberInfo
842 const memberResData = res && res.data ? res.data : {}
843 updateAuthPayDisabled(memberResData)
844 updateAuthPayRule(memberResData)
763 // deptInfo.value = app.globalData.dept || {} 845 // deptInfo.value = app.globalData.dept || {}
764 // app.globalData.deptInfo = res.dept || {} 846 // app.globalData.deptInfo = res.dept || {}
765 console.log(43, res) 847
766 if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData.authenticationStatus != '4') { 848 if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData.authenticationStatus != '4') {
767 // 注册引导 849 // 注册引导
768 uni.navigateTo({ 850 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!