c9bf47f3 by lttnew

6.5 认证重新排版

1 parent e28234aa
...@@ -1575,6 +1575,7 @@ export function certifiedNew(data) { ...@@ -1575,6 +1575,7 @@ export function certifiedNew(data) {
1575 const params = [] 1575 const params = []
1576 if (data.renewYear) params.push(`renewYear=${data.renewYear}`) 1576 if (data.renewYear) params.push(`renewYear=${data.renewYear}`)
1577 params.push(`type=${data.type}`) 1577 params.push(`type=${data.type}`)
1578 if (data.payType) params.push(`payType=${data.payType}`)
1578 if (data.contactPerson) params.push(`contactPerson=${data.contactPerson}`) 1579 if (data.contactPerson) params.push(`contactPerson=${data.contactPerson}`)
1579 if (data.contactTel) params.push(`contactTel=${data.contactTel}`) 1580 if (data.contactTel) params.push(`contactTel=${data.contactTel}`)
1580 if (params.length > 0) { 1581 if (params.length > 0) {
......
...@@ -51,12 +51,12 @@ ...@@ -51,12 +51,12 @@
51 <form v-if="isActive==0"> 51 <form v-if="isActive==0">
52 <view class="round-input-item"> 52 <view class="round-input-item">
53 <image :src="config.baseUrl_api+'/fs/static/lg/tag01.png'" class="icon"></image> 53 <image :src="config.baseUrl_api+'/fs/static/lg/tag01.png'" class="icon"></image>
54 <uni-easyinput v-model="form.username" :styles="inputstyle" placeholder="账号"/> 54 <uni-easyinput v-model="form.username" :styles="inputstyle" placeholder="新用户请注册后进行登陆"/>
55 </view> 55 </view>
56 <view class="round-input-item"> 56 <view class="round-input-item">
57 <image :src="config.baseUrl_api+'/fs/static/lg/tag02.png'" class="icon"></image> 57 <image :src="config.baseUrl_api+'/fs/static/lg/tag02.png'" class="icon"></image>
58 <uni-easyinput v-model="form.password" :styles="inputstyle" 58 <uni-easyinput v-model="form.password" :styles="inputstyle"
59 placeholder="初次登录请联系省级协会获取初始密码" 59 placeholder="新用户请注册后进行登陆"
60 type="password"/> 60 type="password"/>
61 </view> 61 </view>
62 <view class="round-input-item"> 62 <view class="round-input-item">
...@@ -104,6 +104,10 @@ ...@@ -104,6 +104,10 @@
104 </view> 104 </view>
105 <view class="fixedagree"> 105 <view class="fixedagree">
106 <!-- <text>仅供中国跆拳道协会会员单位登录使用</text> --> 106 <!-- <text>仅供中国跆拳道协会会员单位登录使用</text> -->
107 <view class="">
108 中国跆拳道协会
109 <text @click="call('010-87188971')">010-87188971</text>
110 </view>
107 <view class="wNumber"> 111 <view class="wNumber">
108 技术服务热线: 112 技术服务热线:
109 <text @click="call('15606190026')">15606190026</text> 113 <text @click="call('15606190026')">15606190026</text>
......
...@@ -21,8 +21,11 @@ ...@@ -21,8 +21,11 @@
21 21
22 <!-- 温馨提示 --> 22 <!-- 温馨提示 -->
23 <view class="tip-box"> 23 <view class="tip-box">
24 <text class="tip-text">温馨提示: 24 <text class="tip-text">温馨提示:
25 您可以自行录入考官信息,如果暂时没有考官,可以选择由省跆协指派进行考点申报,请尽快完成考点考官的认证。 25 根据中国跆拳道协会考点管理办法请添加考点考官
26 如若已有考官:点击【录入考官信息】,根据相关信息填写考官资料进行录入。
27 如若没有考官:点击【申请省跆协指派考官】,选择省内相关考官并及时参加考官培训
28 完成考官设置后,才能继续提交考点申报。请您尽快操作,以免影响后续考试安排。
26 </text> 29 </text>
27 </view> 30 </view>
28 31
......
...@@ -34,13 +34,15 @@ ...@@ -34,13 +34,15 @@
34 <!-- 费用合计 --> 34 <!-- 费用合计 -->
35 <view class="row "> 35 <view class="row ">
36 <text class="label">费用合计</text> 36 <text class="label">费用合计</text>
37 <text class="value red">{{ (form.renewYear * memberFee).toFixed(2) }}</text> 37 <text class="value red">{{ originalTotalFee }}</text>
38 </view> 38 </view>
39 39
40 <view v-if="preferentialPolicy" class="hintRow"> 40 <view v-if="preferentialPolicy" class="discountPolicy">
41 <text 41 <!-- <view class="discountPolicyTitle">减免政策</view> -->
42 class="hintText">温馨提示:根据中国跆协{{ preferentialData.name || '优惠' }}政策减免一年费用,每个单位在政策有效期内只享受一次 42 <view class="discountPolicyRow">
43 </text> 43 <text class="discountLabel">{{ preferentialData.name || '减免费用' }}</text>
44 <text class="discountValue">-{{ discountAmount }}</text>
45 </view>
44 </view> 46 </view>
45 </view> 47 </view>
46 48
...@@ -83,14 +85,18 @@ ...@@ -83,14 +85,18 @@
83 </view> 85 </view>
84 86
85 <view class="bottomBtn"> 87 <view class="bottomBtn">
86 <view v-if="preferentialPolicy" class="deductRow">
87 <text class="label">减免费用</text>
88 <text class="value red">-{{ memberFee.toFixed(2) }}</text>
89 </view>
90 <button :loading="isPaying" class="payBtn" @click="handelPay">立即支付 ¥{{ memberTotalFee }}</button> 88 <button :loading="isPaying" class="payBtn" @click="handelPay">立即支付 ¥{{ memberTotalFee }}</button>
91 </view> 89 </view>
92 90
93 </view> 91 </view>
92
93 <custom-modal
94 ref="preferentialModalRef"
95 title="优惠政策"
96 :content="preferentialModalContent"
97 :showCancel="false"
98 confirmText="我知道了"
99 />
94 </template> 100 </template>
95 101
96 <script setup> 102 <script setup>
...@@ -105,6 +111,7 @@ import to from 'await-to-js' ...@@ -105,6 +111,7 @@ import to from 'await-to-js'
105 import * as api from '@/common/api.js' 111 import * as api from '@/common/api.js'
106 import {minShengPay} from '@/common/pay.js' 112 import {minShengPay} from '@/common/pay.js'
107 import config from '@/config.js' 113 import config from '@/config.js'
114 import customModal from '@/components/custom-modal.vue'
108 115
109 // 订单信息(再次支付时传入) 116 // 订单信息(再次支付时传入)
110 const payForm = ref({}) 117 const payForm = ref({})
...@@ -125,6 +132,8 @@ const assoName = ref('') ...@@ -125,6 +132,8 @@ const assoName = ref('')
125 const app = getApp() 132 const app = getApp()
126 const sourcePage = ref('') 133 const sourcePage = ref('')
127 const PERFECT_PAY_REFRESH_KEY = 'perfectNeedRefreshAfterPay' 134 const PERFECT_PAY_REFRESH_KEY = 'perfectNeedRefreshAfterPay'
135 const preferentialModalRef = ref(null)
136 const hasShownPreferentialModal = ref(false)
128 137
129 const pickFirst = (...values) => { 138 const pickFirst = (...values) => {
130 const value = values.find(item => item !== undefined && item !== null && String(item).trim() !== '') 139 const value = values.find(item => item !== undefined && item !== null && String(item).trim() !== '')
...@@ -144,25 +153,20 @@ const getOrderContent = (content) => { ...@@ -144,25 +153,20 @@ const getOrderContent = (content) => {
144 const fillPayDisplayInfo = (data = {}, content = {}, option = {}) => { 153 const fillPayDisplayInfo = (data = {}, content = {}, option = {}) => {
145 const memberInfo = app.globalData?.memberInfo || {} 154 const memberInfo = app.globalData?.memberInfo || {}
146 const deptInfo = app.globalData?.dept || app.globalData?.userInfo?.dept || {} 155 const deptInfo = app.globalData?.dept || app.globalData?.userInfo?.dept || {}
147 payName.value = pickFirst( 156 const optionPayName = option.payName ? decodeURIComponent(option.payName) : ''
148 memberInfo.name, 157 const optionAssoName = option.assoName ? decodeURIComponent(option.assoName) : ''
158 const hasOrderId = !!option.orderId
159 const orderPayNames = [
160 data.orderName,
161 content.orderName,
149 content.memberName, 162 content.memberName,
150 data.memberName, 163 data.memberName,
151 data.payDeptName, 164 data.payDeptName,
152 content.payDeptName, 165 content.payDeptName,
153 data.payMemName, 166 data.payMemName,
154 content.payMemName, 167 content.payMemName
155 option.payName ? decodeURIComponent(option.payName) : '', 168 ]
156 data.orderName, 169 const orderAssoNames = [
157 content.orderName,
158 deptInfo.deptName
159 )
160 assoName.value = pickFirst(
161 memberInfo.aname,
162 memberInfo.associateName,
163 memberInfo.assoName,
164 deptInfo.aname,
165 deptInfo.associateName,
166 data.assoName, 170 data.assoName,
167 data.associateName, 171 data.associateName,
168 data.associationName, 172 data.associationName,
...@@ -172,17 +176,53 @@ const fillPayDisplayInfo = (data = {}, content = {}, option = {}) => { ...@@ -172,17 +176,53 @@ const fillPayDisplayInfo = (data = {}, content = {}, option = {}) => {
172 content.associateName, 176 content.associateName,
173 content.associationName, 177 content.associationName,
174 content.aname, 178 content.aname,
175 content.parentName, 179 content.parentName
176 option.assoName ? decodeURIComponent(option.assoName) : '' 180 ]
177 ) 181 const cachePayNames = [
182 memberInfo.name,
183 deptInfo.deptName
184 ]
185 const cacheAssoNames = [
186 memberInfo.aname,
187 memberInfo.associateName,
188 memberInfo.assoName,
189 deptInfo.aname,
190 deptInfo.associateName
191 ]
192
193 // 再次支付以订单详情为准;新认证缴费没有订单详情,以入口页面最新传参为准。
194 payName.value = hasOrderId
195 ? pickFirst(...orderPayNames, optionPayName, ...cachePayNames)
196 : pickFirst(optionPayName, ...orderPayNames, ...cachePayNames)
197
198 assoName.value = hasOrderId
199 ? pickFirst(...orderAssoNames, optionAssoName, ...cacheAssoNames)
200 : pickFirst(optionAssoName, ...orderAssoNames, ...cacheAssoNames)
178 } 201 }
179 202
203 const originalTotal = computed(() => {
204 return Number(memberFee.value || 0) * Number(form.value.renewYear || 0)
205 })
206
207 const originalTotalFee = computed(() => {
208 return originalTotal.value.toFixed(2)
209 })
210
211 const discountValue = computed(() => {
212 if (!preferentialPolicy.value) return 0
213 return Math.min(Number(memberFee.value || 0), originalTotal.value)
214 })
215
216 const discountAmount = computed(() => {
217 return discountValue.value.toFixed(2)
218 })
219
180 const memberTotalFee = computed(() => { 220 const memberTotalFee = computed(() => {
181 const total = memberFee.value * form.value.renewYear 221 return Math.max(originalTotal.value - discountValue.value, 0).toFixed(2)
182 if (preferentialPolicy.value) { 222 })
183 return (total - memberFee.value).toFixed(2) 223
184 } 224 const preferentialModalContent = computed(() => {
185 return total.toFixed(2) 225 return `根据中国跆协${preferentialData.value.name || '优惠'}政策减免一年费用,每个单位在政策有效期内只享受一次。`
186 }) 226 })
187 227
188 // 年限减 228 // 年限减
...@@ -205,7 +245,7 @@ const onPayTypeChange = (e) => { ...@@ -205,7 +245,7 @@ const onPayTypeChange = (e) => {
205 245
206 // 支付操作 246 // 支付操作
207 const handelPay = async () => { 247 const handelPay = async () => {
208 if (memberTotalFee.value < 0) { 248 if (Number(memberTotalFee.value || 0) < 0) {
209 uni.showToast({ 249 uni.showToast({
210 title: '支付金额异常', 250 title: '支付金额异常',
211 icon: 'none' 251 icon: 'none'
...@@ -270,6 +310,7 @@ const handelPay = async () => { ...@@ -270,6 +310,7 @@ const handelPay = async () => {
270 // 第一次下单 310 // 第一次下单
271 const [err, res] = await to(api.certifiedNew({ 311 const [err, res] = await to(api.certifiedNew({
272 renewYear: form.value.renewYear, 312 renewYear: form.value.renewYear,
313 payType: payType.value,
273 type: payType.value, 314 type: payType.value,
274 contactPerson: form.value.contactPerson, 315 contactPerson: form.value.contactPerson,
275 contactTel: form.value.contactTel 316 contactTel: form.value.contactTel
...@@ -306,7 +347,6 @@ const handelPay = async () => { ...@@ -306,7 +347,6 @@ const handelPay = async () => {
306 }) 347 })
307 return 348 return
308 } 349 }
309
310 // 民生支付 350 // 民生支付
311 if (data.payResult && data.payResult.encryptedData) { 351 if (data.payResult && data.payResult.encryptedData) {
312 uni.hideLoading() 352 uni.hideLoading()
...@@ -372,7 +412,18 @@ async function init() { ...@@ -372,7 +412,18 @@ async function init() {
372 uni.hideLoading() 412 uni.hideLoading()
373 if (err) { 413 if (err) {
374 console.error('初始化失败:', err) 414 console.error('初始化失败:', err)
415 return
375 } 416 }
417 showPreferentialPolicyModal()
418 }
419
420 function showPreferentialPolicyModal() {
421 // 已享受过优惠时 canUseDiscount 返回 false,不再提示。
422 if (!preferentialPolicy.value || hasShownPreferentialModal.value) return
423 hasShownPreferentialModal.value = true
424 setTimeout(() => {
425 preferentialModalRef.value?.open()
426 }, 100)
376 } 427 }
377 428
378 // 获取会员单价 429 // 获取会员单价
...@@ -524,12 +575,33 @@ async function getZtxDiscountPolicyApi() { ...@@ -524,12 +575,33 @@ async function getZtxDiscountPolicyApi() {
524 font-weight: 500; 575 font-weight: 500;
525 } 576 }
526 577
527 /* 优惠提示 */ 578 .discountPolicy {
528 .hintRow { 579 margin-top: 18rpx;
529 display: flex; 580 padding-top: 18rpx;
530 align-items: flex-start; 581 border-top: 1rpx solid #f1f1f1;
582 }
583
584 .discountPolicyTitle {
531 font-size: 24rpx; 585 font-size: 24rpx;
532 line-height: 1.4; 586 color: #999;
587 margin-bottom: 12rpx;
588 }
589
590 .discountPolicyRow {
591 display: flex;
592 justify-content: space-between;
593 align-items: center;
594 }
595
596 .discountLabel {
597 font-size: 26rpx;
598 color: #666;
599 }
600
601 .discountValue {
602 font-size: 30rpx;
603 color: #C4121B;
604 font-weight: 600;
533 } 605 }
534 606
535 /* 对公转账表单 */ 607 /* 对公转账表单 */
...@@ -584,33 +656,6 @@ async function getZtxDiscountPolicyApi() { ...@@ -584,33 +656,6 @@ async function getZtxDiscountPolicyApi() {
584 font-size: 16rpx; 656 font-size: 16rpx;
585 } 657 }
586 658
587 .hintRow .hintText {
588 color: #FF8124;
589 flex: 1;
590 margin-top: 10rpx;
591 }
592
593 /* 减免费用 */
594 .deductRow {
595 background: #fff;
596 padding: 20rpx 20rpx;
597 display: flex;
598 justify-content: space-between;
599 align-items: center;
600 margin-bottom: 10rpx;
601 border-radius: 8rpx;
602 }
603
604 .deductRow .label {
605 font-size: 28rpx;
606 color: #333;
607 }
608
609 .deductRow .value {
610 font-size: 30rpx;
611 color: #C4121B;
612 }
613
614 /* 支付方式行 */ 659 /* 支付方式行 */
615 .payRow { 660 .payRow {
616 background: #fff; 661 background: #fff;
......
...@@ -3,52 +3,35 @@ ...@@ -3,52 +3,35 @@
3 <view class="pd30" style="padding: 30rpx 30rpx 180rpx;"> 3 <view class="pd30" style="padding: 30rpx 30rpx 180rpx;">
4 <view class="wBox"> 4 <view class="wBox">
5 <uni-forms ref="baseForm" label-width="100"> 5 <uni-forms ref="baseForm" label-width="100">
6 <uni-forms-item label="所属协会" required> 6 <uni-forms-item label="营业执照" required>
7 <view style="width: 60vw;overflow:auto;"> 7 <uni-file-picker limit="1" v-model="businessLicenseArr" file-mediatype="image" mode="grid"
8 <uni-data-picker v-model="form.parentId" :localdata="tree" 8 :image-styles="businessLicenseImageStyles" @select="selectFile"
9 :readonly="type&&parentId!=-1&&parentId!=0" :clear-icon="false" placeholder="请选择协会" 9 @delete="delSupplementFile"></uni-file-picker>
10 :map="{text:'label',value:'id'}" popup-title="" @change="changCase">
11 </uni-data-picker>
12 </view>
13 </uni-forms-item> 10 </uni-forms-item>
14 <uni-forms-item v-if="form.memCode" label="会员编号" required> 11 <uni-forms-item label="营业执照名称" required>
15 <uni-easyinput v-model="form.memCode" disabled /> 12 <uni-easyinput v-model="form.companyName" :disabled="isFieldDisabled('companyName')" />
16 </uni-forms-item> 13 </uni-forms-item>
17
18 <uni-forms-item label="机构名称" required>
19 <uni-easyinput v-model="form.name" :disabled="type" placeholder="机构名称" /></uni-forms-item>
20
21 <!-- <uni-forms-item label="所属省份" required>
22 <uni-data-select :clear="false" :disabled="type&&(belongProvinceId||belongProvinceId==0)"
23 v-model="form.belongProvinceId" :localdata="regionsList"></uni-data-select>
24 </uni-forms-item> -->
25 <uni-forms-item label="社会信用代码" required> 14 <uni-forms-item label="社会信用代码" required>
26 <uni-easyinput v-model="form.creditCode" :disabled="type&&!!creditCode&&newResult" /> 15 <uni-easyinput v-model="form.creditCode" :disabled="isFieldDisabled('creditCode')" />
27 </uni-forms-item> 16 </uni-forms-item>
28 <uni-forms-item label="联系人" required> 17 <uni-forms-item label="机构名称" required>
29 <uni-easyinput v-model="form.siteContact" /> 18 <uni-easyinput v-model="form.name" :disabled="type" placeholder="机构名称" />
30 </uni-forms-item>
31 <uni-forms-item label="联系方式" required>
32 <uni-easyinput v-model="form.siteTel" />
33 </uni-forms-item> 19 </uni-forms-item>
34 <uni-forms-item label="认证地址" required> 20 <uni-forms-item label="认证地址" required>
35 <uni-data-picker v-model="form.coordinates1" @change="changeCoordinates1" placeholder="请选择认证地址" 21 <uni-data-picker v-model="form.coordinates1" @change="changeCoordinates1" placeholder="请选择认证地址"
36 :localdata="regionsList"></uni-data-picker> 22 :localdata="regionsList"></uni-data-picker>
37 </uni-forms-item> 23 </uni-forms-item>
38 <uni-forms-item label="详细地址" required> 24 <uni-forms-item label="认证详细地址" required>
39 <uni-easyinput v-model="form.adress" placeholder="请输入详细地址" type='textarea' /></uni-forms-item> 25 <uni-easyinput v-model="form.adress" :disabled="isFieldDisabled('adress')" placeholder="请输入详细地址" type='textarea' />
40 <uni-forms-item label="法人姓名" required>
41 <uni-easyinput v-model="form.legal" />
42 </uni-forms-item> 26 </uni-forms-item>
43 <uni-forms-item label="法人证件号" required> 27 <uni-forms-item label="所属协会" required>
44 <uni-easyinput v-model="form.legalIdcCode" /> 28 <view style="width: 60vw;overflow:auto;">
29 <uni-data-picker v-model="form.parentId" :localdata="tree"
30 :readonly="type&&parentId!=-1&&parentId!=0" :clear-icon="false" placeholder="请选择协会"
31 :map="{text:'label',value:'id'}" popup-title="" @change="changCase">
32 </uni-data-picker>
33 </view>
45 </uni-forms-item> 34 </uni-forms-item>
46
47
48 <!-- <uni-forms-item v-if="form.deptType==6&&activeStatus!= 0" label="是否申请考点" required>
49 <uni-data-checkbox v-model="form.applyPoints" :localdata="yesno" />
50 </uni-forms-item> -->
51
52 <uni-forms-item label="法人身份证" required> 35 <uni-forms-item label="法人身份证" required>
53 <view class="imgArea"> 36 <view class="imgArea">
54 <uni-file-picker v-model="imgfront" @delete="delimgFont" return-type="object" limit="1" 37 <uni-file-picker v-model="imgfront" @delete="delimgFont" return-type="object" limit="1"
...@@ -61,22 +44,26 @@ ...@@ -61,22 +44,26 @@
61 </uni-file-picker> 44 </uni-file-picker>
62 </view> 45 </view>
63 </uni-forms-item> 46 </uni-forms-item>
64 <uni-forms-item label="营业执照名称" required> 47 <uni-forms-item label="法人姓名" required>
65 <uni-easyinput v-model="form.companyName" /> 48 <uni-easyinput v-model="form.legal" :disabled="isFieldDisabled('legal')" />
66 </uni-forms-item> 49 </uni-forms-item>
67 <uni-forms-item label="营业执照" required> 50 <uni-forms-item label="法人证件号" required>
68 <uni-file-picker limit="1" v-model="businessLicenseArr" file-extname="png,jpg,jpeg,pdf" 51 <uni-easyinput v-model="form.legalIdcCode" />
69 file-mediatype="all" @select="selectFile" @delete="delSupplementFile"></uni-file-picker>
70 </uni-forms-item> 52 </uni-forms-item>
71 <!-- <uni-forms-item label="社会信用代码" required> 53 <uni-forms-item label="联系人" required>
72 <uni-file-picker limit="1" v-model="businessLicenseArr" file-extname="png,jpg,jpeg,pdf" 54 <uni-easyinput v-model="form.siteContact" />
73 file-mediatype="all" @select="selectFile" @delete="delSupplementFile"></uni-file-picker> 55 </uni-forms-item>
74 </uni-forms-item> --> 56 <uni-forms-item label="联系方式" required>
75 <uni-forms-item label="机构照片" required> 57 <uni-easyinput v-model="form.siteTel" />
58 </uni-forms-item>
59 <uni-forms-item label="上传机构照片" required>
76 <uni-file-picker v-model="picArrR" limit="3" mode="grid" file-mediatype="image" 60 <uni-file-picker v-model="picArrR" limit="3" mode="grid" file-mediatype="image"
77 @select="upPicArr" @delete="delpicArr"> 61 @select="upPicArr" @delete="delpicArr">
78 </uni-file-picker> 62 </uni-file-picker>
79 </uni-forms-item> 63 </uni-forms-item>
64 <!-- <uni-forms-item v-if="form.memCode" label="会员编号" required>
65 <uni-easyinput v-model="form.memCode" disabled />
66 </uni-forms-item> -->
80 <view class="notice-box"> 67 <view class="notice-box">
81 <checkbox-group @change="onNoticeChange"> 68 <checkbox-group @change="onNoticeChange">
82 <label class="notice-label"> 69 <label class="notice-label">
...@@ -173,6 +160,7 @@ ...@@ -173,6 +160,7 @@
173 const memberFee = ref('') 160 const memberFee = ref('')
174 const preferentialPolicy = ref(false) 161 const preferentialPolicy = ref(false)
175 const preferentialData = ref({}) 162 const preferentialData = ref({})
163 const ocrLockedFields = ref({})
176 const typeList = ref([{ 164 const typeList = ref([{
177 value: '1', 165 value: '1',
178 text: '企业' 166 text: '企业'
...@@ -226,6 +214,10 @@ ...@@ -226,6 +214,10 @@
226 width: '400rpx', 214 width: '400rpx',
227 height: '253rpx' 215 height: '253rpx'
228 }); 216 });
217 const businessLicenseImageStyles = ref({
218 width: '240rpx',
219 height: '160rpx'
220 });
229 const indicatorStyle = ref(`height: 50px;`) 221 const indicatorStyle = ref(`height: 50px;`)
230 const imgfront = ref({}) 222 const imgfront = ref({})
231 const imgBack = ref({}) 223 const imgBack = ref({})
...@@ -236,6 +228,20 @@ ...@@ -236,6 +228,20 @@
236 const legalIdcPhoto2 = ref('') 228 const legalIdcPhoto2 = ref('')
237 const companyName = ref('') 229 const companyName = ref('')
238 230
231 function isFieldDisabled(field) {
232 return type.value || !!ocrLockedFields.value[field]
233 }
234
235 function lockOcrField(field, value) {
236 if (value !== undefined && value !== null && String(value).trim() !== '') {
237 ocrLockedFields.value[field] = true
238 }
239 }
240
241 function unlockOcrFields() {
242 ocrLockedFields.value = {}
243 }
244
239 onLoad(option => { 245 onLoad(option => {
240 if (app.globalData.isLogin) { 246 if (app.globalData.isLogin) {
241 init() 247 init()
...@@ -312,12 +318,12 @@ ...@@ -312,12 +318,12 @@
312 318
313 if (form.value.businessLicense) { 319 if (form.value.businessLicense) {
314 try { 320 try {
315 businessLicenseArr.value = JSON.parse(form.value.businessLicense) || [] 321 businessLicenseArr.value = formatBusinessLicensePickerFiles(JSON.parse(form.value.businessLicense) || [])
316 } catch (e) { 322 } catch (e) {
317 businessLicenseArr.value = [{ 323 businessLicenseArr.value = formatBusinessLicensePickerFiles([{
318 url: form.value.businessLicense, 324 url: form.value.businessLicense,
319 name: '营业执照' 325 name: '营业执照'
320 }] 326 }])
321 } 327 }
322 } 328 }
323 329
...@@ -401,58 +407,58 @@ ...@@ -401,58 +407,58 @@
401 // 核心:修改submit方法,改用自定义弹窗 407 // 核心:修改submit方法,改用自定义弹窗
402 async function submit() { 408 async function submit() {
403 // 基础表单验证 409 // 基础表单验证
404 if (form.value.name == '') { 410 if (!form.value.businessLicense) {
405 uni.showToast({ 411 uni.showToast({
406 title: '请填写机构名称', 412 title: '请上传营业执照',
407 icon: 'none' 413 icon: 'none'
408 }) 414 })
409 return 415 return
410 } 416 }
411 if (form.value.creditCode == '') { 417 if (form.value.companyName == '') {
412 uni.showToast({ 418 uni.showToast({
413 title: '请填写社会信用代码', 419 title: '请填写营业执照名称',
414 icon: 'none' 420 icon: 'none'
415 }) 421 })
416 return 422 return
417 } 423 }
418 if (form.value.companyName == '') { 424 if (form.value.creditCode == '') {
419 uni.showToast({ 425 uni.showToast({
420 title: '请填写营业执照名称', 426 title: '请填写社会信用代码',
421 icon: 'none' 427 icon: 'none'
422 }) 428 })
423 return 429 return
424 } 430 }
425 if (form.value.legalIdcCode == '') { 431 if (form.value.name == '') {
426 uni.showToast({ 432 uni.showToast({
427 title: '请填写法人证件号', 433 title: '请填写机构名称',
428 icon: 'none' 434 icon: 'none'
429 }) 435 })
430 return 436 return
431 } 437 }
432 if (form.value.siteContact == '') { 438 if (form.value.coordinates1 == '') {
433 uni.showToast({ 439 uni.showToast({
434 title: '请填写联系人', 440 title: '请选择认证地址',
435 icon: 'none' 441 icon: 'none'
436 }) 442 })
437 return 443 return
438 } 444 }
439 if (form.value.siteTel == '') { 445 if (form.value.adress == '') {
440 uni.showToast({ 446 uni.showToast({
441 title: '请填写联系方式', 447 title: '请填写认证详细地址',
442 icon: 'none' 448 icon: 'none'
443 }) 449 })
444 return 450 return
445 } 451 }
446 if (form.value.coordinates1 == '') { 452 if (form.value.parentId == -1 || form.value.parentId == 0) {
447 uni.showToast({ 453 uni.showToast({
448 title: '请选择认证地址', 454 title: '请选择所属协会',
449 icon: 'none' 455 icon: 'none'
450 }) 456 })
451 return 457 return
452 } 458 }
453 if (form.value.adress == '') { 459 if (legalIdcPhoto1.value == '' || legalIdcPhoto2.value == '') {
454 uni.showToast({ 460 uni.showToast({
455 title: '请填写详细地址', 461 title: '请上传法人身份证',
456 icon: 'none' 462 icon: 'none'
457 }) 463 })
458 return 464 return
...@@ -464,37 +470,37 @@ ...@@ -464,37 +470,37 @@
464 }) 470 })
465 return 471 return
466 } 472 }
467 if (legalIdcPhoto1.value == '' || legalIdcPhoto2.value == '') { 473 if (form.value.legalIdcCode == '') {
468 uni.showToast({ 474 uni.showToast({
469 title: '请上传法人身份证', 475 title: '请填写法人证件号',
470 icon: 'none' 476 icon: 'none'
471 }) 477 })
472 return 478 return
473 } 479 }
474 if (!form.value.businessLicense) { 480 if (form.value.siteContact == '') {
475 uni.showToast({ 481 uni.showToast({
476 title: '请上传营业执照', 482 title: '请填写联系人',
477 icon: 'none' 483 icon: 'none'
478 }) 484 })
479 return 485 return
480 } 486 }
481 if (picArr.value.length == 0) { 487 if (form.value.siteTel == '') {
482 uni.showToast({ 488 uni.showToast({
483 title: '请上传机构照片', 489 title: '请填写联系方式',
484 icon: 'none' 490 icon: 'none'
485 }) 491 })
486 return 492 return
487 } 493 }
488 if (!form.value.notice) { 494 if (picArr.value.length == 0) {
489 uni.showToast({ 495 uni.showToast({
490 title: '请阅读并同意注册须知、入会须知、免责声明', 496 title: '请上传机构照片',
491 icon: 'none' 497 icon: 'none'
492 }) 498 })
493 return 499 return
494 } 500 }
495 if (form.value.parentId == -1 || form.value.parentId == 0) { 501 if (!form.value.notice) {
496 uni.showToast({ 502 uni.showToast({
497 title: '请选择所属协会', 503 title: '请阅读并同意注册须知、入会须知、免责声明',
498 icon: 'none' 504 icon: 'none'
499 }) 505 })
500 return 506 return
...@@ -817,32 +823,84 @@ ...@@ -817,32 +823,84 @@
817 823
818 let selectFileValue = {} 824 let selectFileValue = {}
819 825
820 function selectFile(e) { 826 async function selectFile(e) {
821 let file = e.tempFiles[0] 827 let file = e.tempFiles[0]
822 if (!file) return 828 if (!file) return
823 uni.showLoading({ 829 uni.showLoading({
824 title: '上传中' 830 title: '上传中'
825 }) 831 })
826 api.uploadFile(e).then(data => { 832 try {
833 const data = await api.uploadFile(e)
834 const ocrData = await getBusinessLicenseOcr(file.url || file.path || e.tempFilePaths?.[0])
835 if (ocrData) {
836 form.value.companyName = ocrData.companyName || form.value.companyName
837 form.value.creditCode = ocrData.creditCode || form.value.creditCode
838 form.value.legal = ocrData.legalPerson || form.value.legal
839 form.value.adress = ocrData.businessAddress || form.value.adress
840 lockOcrField('companyName', form.value.companyName)
841 lockOcrField('creditCode', form.value.creditCode)
842 lockOcrField('legal', form.value.legal)
843 lockOcrField('adress', form.value.adress)
844 }
827 selectFileValue = { 845 selectFileValue = {
828 url: data.msg, 846 url: data.msg,
829 name: file.name, 847 name: ocrData?.name || file.name || '营业执照',
830 extname: file.extname 848 extname: file.extname
831 } 849 }
850 businessLicenseArr.value = formatBusinessLicensePickerFiles([selectFileValue])
832 form.value.businessLicense = JSON.stringify([selectFileValue]) 851 form.value.businessLicense = JSON.stringify([selectFileValue])
833 uni.hideLoading() 852 uni.hideLoading()
834 }).catch(err => { 853 } catch (err) {
835 uni.hideLoading() 854 uni.hideLoading()
836 uni.showToast({ 855 uni.showToast({
837 title: '上传失败', 856 title: '上传失败',
838 icon: 'none' 857 icon: 'none'
839 }) 858 })
840 }) 859 }
841 } 860 }
842 861
843 function delSupplementFile() { 862 function delSupplementFile() {
844 selectFileValue = {} 863 selectFileValue = {}
845 form.value.businessLicense = '' 864 form.value.businessLicense = ''
865 unlockOcrFields()
866 }
867
868 function getBusinessLicenseOcr(filePath) {
869 if (!filePath) return Promise.resolve(null)
870 return new Promise((resolve) => {
871 uni.uploadFile({
872 url: config.baseUrl_api + '/member/info/getBusinessLicense',
873 filePath,
874 name: 'pic',
875 header: {
876 'Authorization': uni.getStorageSync('token')
877 },
878 success: (res) => {
879 try {
880 const data = JSON.parse(res.data || '{}')
881 resolve(data.code === 200 ? data.data : null)
882 } catch (e) {
883 resolve(null)
884 }
885 },
886 fail: () => resolve(null)
887 })
888 })
889 }
890
891 function normalizeFileUrl(url) {
892 if (!url) return ''
893 if (url.indexOf('http') === 0) return url
894 if (url.indexOf('/') === 0) return config.baseUrl_api + url
895 return `${config.baseUrl_api}/fileServer/download?file=${encodeURIComponent(url)}&downFlag=0`
896 }
897
898 function formatBusinessLicensePickerFiles(files = []) {
899 return files.map(item => ({
900 ...item,
901 rawUrl: item.url,
902 url: normalizeFileUrl(item.url)
903 }))
846 } 904 }
847 905
848 function upPicArr(e) { 906 function upPicArr(e) {
......
...@@ -19,12 +19,11 @@ ...@@ -19,12 +19,11 @@
19 <view class="member-left"> 19 <view class="member-left">
20 <view class="hello">您好!</view> 20 <view class="hello">您好!</view>
21 <view class="member-name">{{ memberName }}</view> 21 <view class="member-name">{{ memberName }}</view>
22 <view class="member-desc">您已经是中国跆拳道协会的金牌会员了</view> 22 <!-- <view class="member-desc">您已经是中国跆拳道协会的金牌会员了</view> -->
23 <view class="name-line"></view>
24 </view> 23 </view>
25 <view class="level-box" @click="goPath('/myCenter/reviewList')"> 24 <view class="level-box" @click="goPath('/myCenter/reviewList')">
26 <image class="star" :src="config.baseUrl_api + '/fs/static/img/star.png'" mode="aspectFit"></image> 25 <image class="star" :src="examPointIcon" mode="aspectFit"></image>
27 <view class="level-title">晋级考点</view> 26 <view class="level-title" :class="{ disabled: !isExamPoint }">晋级考点</view>
28 <view class="detail-btn">查看详情</view> 27 <view class="detail-btn">查看详情</view>
29 </view> 28 </view>
30 </view> 29 </view>
...@@ -154,6 +153,13 @@ const validityDate = computed(() => { ...@@ -154,6 +153,13 @@ const validityDate = computed(() => {
154 return value ? String(value).slice(0, 10) : '--' 153 return value ? String(value).slice(0, 10) : '--'
155 }) 154 })
156 155
156 const isExamPoint = computed(() => String(memberInfo.value?.isPoints) === '0')
157
158 const examPointIcon = computed(() => {
159 const fileName = isExamPoint.value ? 'star.png' : 'star_g.png'
160 return `${config.baseUrl_api}/fs/static/img/${fileName}`
161 })
162
157 onLoad((option) => { 163 onLoad((option) => {
158 const userName = uni.getStorageSync('userName') 164 const userName = uni.getStorageSync('userName')
159 if (!userName) { 165 if (!userName) {
...@@ -412,7 +418,7 @@ function closeExamPointDialog() { ...@@ -412,7 +418,7 @@ function closeExamPointDialog() {
412 418
413 function goExamPointApply() { 419 function goExamPointApply() {
414 closeExamPointDialog() 420 closeExamPointDialog()
415 uni.navigateTo({ url: '/myCenter/examPointApplyList' }) 421 uni.navigateTo({ url: '/pages/index/notice-examPointApply' })
416 } 422 }
417 423
418 async function handleNoDisplay() { 424 async function handleNoDisplay() {
...@@ -509,10 +515,23 @@ function handelCancelOrder() { ...@@ -509,10 +515,23 @@ function handelCancelOrder() {
509 515
510 function handelGetMyRecent() { 516 function handelGetMyRecent() {
511 return new Promise(async (resolve) => { 517 return new Promise(async (resolve) => {
512 const res = await to(api.getMyRecent()) 518 const [err, res] = await to(api.getMyRecent())
513 if (res[0] || !res[1]?.data) return resolve(false) 519 if (err) {
514 payForm.value = res[1].data?.comOrder || {} 520 uni.showToast({ title: '获取缴费状态失败,请稍后重试', icon: 'none' })
515 if (payForm.value.content) payForm.value.content = JSON.parse(payForm.value.content) 521 return resolve(false)
522 }
523 const recentData = res?.data
524 if (!recentData) {
525 payForm.value = {}
526 return resolve(true)
527 }
528 payForm.value = recentData?.comOrder || {}
529 if (!payForm.value.id) return resolve(true)
530 if (payForm.value.content && typeof payForm.value.content === 'string') {
531 try {
532 payForm.value.content = JSON.parse(payForm.value.content)
533 } catch (e) {}
534 }
516 if (payForm.value.payStatus === '0') { 535 if (payForm.value.payStatus === '0') {
517 unpaidPopup.value?.open() 536 unpaidPopup.value?.open()
518 return resolve(false) 537 return resolve(false)
...@@ -609,6 +628,7 @@ function handelGetMyRecent() { ...@@ -609,6 +628,7 @@ function handelGetMyRecent() {
609 color: #181818; 628 color: #181818;
610 font-size: 34rpx; 629 font-size: 34rpx;
611 font-weight: 700; 630 font-weight: 700;
631 // border-bottom:6rpx solid #111;
612 } 632 }
613 633
614 .member-desc { 634 .member-desc {
...@@ -617,13 +637,7 @@ function handelGetMyRecent() { ...@@ -617,13 +637,7 @@ function handelGetMyRecent() {
617 font-size: 22rpx; 637 font-size: 22rpx;
618 } 638 }
619 639
620 .name-line { 640
621 width: 112rpx;
622 height: 6rpx;
623 margin-top: 14rpx;
624 background: #111;
625 border-radius: 8rpx;
626 }
627 641
628 .level-box { 642 .level-box {
629 display: flex; 643 display: flex;
...@@ -644,6 +658,10 @@ function handelGetMyRecent() { ...@@ -644,6 +658,10 @@ function handelGetMyRecent() {
644 font-weight: 700; 658 font-weight: 700;
645 } 659 }
646 660
661 .level-title.disabled {
662 color: #9a9a9a;
663 }
664
647 .detail-btn { 665 .detail-btn {
648 margin-top: 8rpx; 666 margin-top: 8rpx;
649 padding: 4rpx 14rpx; 667 padding: 4rpx 14rpx;
......
...@@ -77,10 +77,14 @@ ...@@ -77,10 +77,14 @@
77 <text v-if="authenticationStatus == 0 || !authenticationStatus" class="text-danger">未认证</text> 77 <text v-if="authenticationStatus == 0 || !authenticationStatus" class="text-danger">未认证</text>
78 <text v-if="authenticationStatus == 1" class="text-warning">认证中</text> 78 <text v-if="authenticationStatus == 1" class="text-warning">认证中</text>
79 <text v-if="authenticationStatus == 2" class="text-success">已认证</text> 79 <text v-if="authenticationStatus == 2" class="text-success">已认证</text>
80 <text v-if="authenticationStatus == 3" class="text-danger">认证未通过</text> 80 <text v-if="authenticationStatus == 3" class="text-danger">审核未通过</text>
81 <text v-if="authenticationStatus == 4" class="text-warning">即将过期</text> 81 <text v-if="authenticationStatus == 4" class="text-warning">即将过期</text>
82 <text v-if="authenticationStatus == 5" class="text-danger">已过期</text> 82 <text v-if="authenticationStatus == 5" class="text-danger">已过期</text>
83 </view> 83 </view>
84 <view v-if="authenticationStatus == 3 && rejectReason" class="reject-reason">
85 <text class="reject-label">未通过理由:</text>
86 <text class="reject-text">{{ rejectReason }}</text>
87 </view>
84 <!-- <view class="logout-btn" @click="handleLogout"> 88 <!-- <view class="logout-btn" @click="handleLogout">
85 <text class="logout-icon"></text> 89 <text class="logout-icon"></text>
86 <text class="logout-text">退出</text> 90 <text class="logout-text">退出</text>
...@@ -88,47 +92,6 @@ ...@@ -88,47 +92,6 @@
88 </view> 92 </view>
89 93
90 <uni-forms ref="certForm" :modelValue="form" label-width="90"> 94 <uni-forms ref="certForm" :modelValue="form" label-width="90">
91 <uni-forms-item label="选择所属协会" required>
92 <view class="picker-wrapper">
93 <uni-data-picker
94 v-model="form.parentId"
95 :disabled="!editIng"
96 :level="3"
97 :localdata="assoList"
98 class="custom-picker"
99 popup-title="请选择所属协会"
100 @change="changCase"
101 ></uni-data-picker>
102 </view>
103 </uni-forms-item>
104 <uni-forms-item label="机构名称" required>
105 <uni-easyinput v-model="form.name" :disabled="!editIng" class="input-with-border"
106 placeholder="请输入机构名称"/>
107 </uni-forms-item>
108 <uni-forms-item label="认证地址" required>
109 <view class="picker-wrapper">
110 <uni-data-picker
111 v-model="coordinates1"
112 :disabled="!editIng"
113 :localdata="regionOptions"
114 class="custom-picker"
115 popup-title="请选择所在地区"
116 @change="changeAddress"
117 ></uni-data-picker>
118 </view>
119 </uni-forms-item>
120 <uni-forms-item label="认证详细地址" required>
121 <uni-easyinput v-model="form.adress" :disabled="!editIng" class="input-with-border"
122 placeholder="请输入详细地址"/>
123 </uni-forms-item>
124 <uni-forms-item label="联系人" required>
125 <uni-easyinput v-model="form.siteContact" :disabled="!editIng" class="input-with-border"
126 placeholder="请输入联系人"/>
127 </uni-forms-item>
128 <uni-forms-item label="联系方式" required>
129 <uni-easyinput v-model="form.siteTel" :disabled="!editIng" class="input-with-border"
130 placeholder="请输入联系方式"/>
131 </uni-forms-item>
132 <uni-forms-item label="营业执照" required> 95 <uni-forms-item label="营业执照" required>
133 <view class="upload-box"> 96 <view class="upload-box">
134 <view v-if="!form.businessLicense" class="upload-placeholder" @click="onBusinessLicenseSelect"> 97 <view v-if="!form.businessLicense" class="upload-placeholder" @click="onBusinessLicenseSelect">
...@@ -142,19 +105,52 @@ ...@@ -142,19 +105,52 @@
142 </view> 105 </view>
143 </uni-forms-item> 106 </uni-forms-item>
144 <uni-forms-item label="营业执照名称" required> 107 <uni-forms-item label="营业执照名称" required>
145 <uni-easyinput v-model="form.companyName" :disabled="!editIng" class="input-with-border" 108 <uni-easyinput v-model="form.companyName" :disabled="isFieldDisabled('companyName')" class="input-with-border"
146 placeholder="请输入营业执照名称"/> 109 placeholder="请输入营业执照名称"/>
147 </uni-forms-item> 110 </uni-forms-item>
148 <uni-forms-item label="社会信用代码" required> 111 <uni-forms-item label="社会信用代码" required>
149 <uni-easyinput 112 <uni-easyinput
150 v-model="form.creditCode" 113 v-model="form.creditCode"
151 :disabled="!editIng" 114 :disabled="isFieldDisabled('creditCode')"
152 class="input-with-border" 115 class="input-with-border"
153 placeholder="请输入社会信用代码" 116 placeholder="请输入社会信用代码"
154 @blur="onCreditCodeBlur" 117 @blur="onCreditCodeBlur"
155 @change="onCreditCodeBlur" 118 @change="onCreditCodeBlur"
156 /> 119 />
157 </uni-forms-item> 120 </uni-forms-item>
121 <uni-forms-item label="机构名称" required>
122 <uni-easyinput v-model="form.name" :disabled="isFieldDisabled('name')" class="input-with-border"
123 placeholder="请输入机构名称"/>
124 </uni-forms-item>
125 <uni-forms-item label="认证地址" required>
126 <view class="picker-wrapper">
127 <uni-data-picker
128 v-model="coordinates1"
129 :disabled="isFieldDisabled('address')"
130 :localdata="regionOptions"
131 class="custom-picker"
132 popup-title="请选择所在地区"
133 @change="changeAddress"
134 ></uni-data-picker>
135 </view>
136 </uni-forms-item>
137 <uni-forms-item label="认证详细地址" required>
138 <uni-easyinput v-model="form.adress" :disabled="isFieldDisabled('adress')" class="input-with-border"
139 placeholder="请输入详细地址"/>
140 </uni-forms-item>
141 <uni-forms-item label="所属协会" required>
142 <view class="picker-wrapper">
143 <uni-data-picker
144 v-model="form.parentId"
145 :disabled="isFieldDisabled('parentId')"
146 :level="3"
147 :localdata="assoList"
148 class="custom-picker"
149 popup-title="请选择所属协会"
150 @change="changCase"
151 ></uni-data-picker>
152 </view>
153 </uni-forms-item>
158 <uni-forms-item label="法人身份证" required> 154 <uni-forms-item label="法人身份证" required>
159 <view class="idcard-box"> 155 <view class="idcard-box">
160 <view class="idcard-item"> 156 <view class="idcard-item">
...@@ -182,13 +178,21 @@ ...@@ -182,13 +178,21 @@
182 </view> 178 </view>
183 </uni-forms-item> 179 </uni-forms-item>
184 <uni-forms-item label="法人姓名" required> 180 <uni-forms-item label="法人姓名" required>
185 <uni-easyinput v-model="form.legal" :disabled="!editIng" class="input-with-border" 181 <uni-easyinput v-model="form.legal" :disabled="isFieldDisabled('legal')" class="input-with-border"
186 placeholder="请输入法人姓名"/> 182 placeholder="请输入法人姓名"/>
187 </uni-forms-item> 183 </uni-forms-item>
188 <uni-forms-item label="法人证件号" required> 184 <uni-forms-item label="法人证件号" required>
189 <uni-easyinput v-model="form.legalIdcCode" :disabled="!editIng" class="input-with-border" 185 <uni-easyinput v-model="form.legalIdcCode" :disabled="isFieldDisabled('legalIdcCode')" class="input-with-border"
190 placeholder="请输入法人证件号"/> 186 placeholder="请输入法人证件号"/>
191 </uni-forms-item> 187 </uni-forms-item>
188 <uni-forms-item label="联系人" required>
189 <uni-easyinput v-model="form.siteContact" :disabled="!editIng" class="input-with-border"
190 placeholder="请输入联系人"/>
191 </uni-forms-item>
192 <uni-forms-item label="联系方式" required>
193 <uni-easyinput v-model="form.siteTel" :disabled="!editIng" class="input-with-border"
194 placeholder="请输入联系方式"/>
195 </uni-forms-item>
192 <uni-forms-item label="上传机构照片" required> 196 <uni-forms-item label="上传机构照片" required>
193 <view class="pictures-box"> 197 <view class="pictures-box">
194 <view v-if="!form.pictures" class="picture-placeholder" @click="onPicturesSelect"> 198 <view v-if="!form.pictures" class="picture-placeholder" @click="onPicturesSelect">
...@@ -412,10 +416,28 @@ const auditStatus = ref('0') ...@@ -412,10 +416,28 @@ const auditStatus = ref('0')
412 // 审核详情 416 // 审核详情
413 const auditList = ref([]) 417 const auditList = ref([])
414 const auditLoading = ref(false) 418 const auditLoading = ref(false)
419 const rejectReason = ref('')
415 420
416 // 社会信用代码校验状态(true=校验通过,false=校验失败/已存在) 421 // 社会信用代码校验状态(true=校验通过,false=校验失败/已存在)
417 const creditCodeValid = ref(true) 422 const creditCodeValid = ref(true)
418 423
424 // OCR 自动带出的字段默认不可编辑,避免手动改动导致和营业执照信息不一致。
425 const ocrLockedFields = ref({})
426
427 function isFieldDisabled(field) {
428 return !editIng.value || !!ocrLockedFields.value[field]
429 }
430
431 function lockOcrField(field, value) {
432 if (value !== undefined && value !== null && String(value).trim() !== '') {
433 ocrLockedFields.value[field] = true
434 }
435 }
436
437 function unlockOcrFields() {
438 ocrLockedFields.value = {}
439 }
440
419 // 须知勾选 441 // 须知勾选
420 function onNoticeChange(e) { 442 function onNoticeChange(e) {
421 if (!editIng.value) return 443 if (!editIng.value) return
...@@ -500,7 +522,7 @@ function handelGetMyRecent() { ...@@ -500,7 +522,7 @@ function handelGetMyRecent() {
500 confirmText: '去支付', 522 confirmText: '去支付',
501 onConfirm: () => { 523 onConfirm: () => {
502 // 去支付,跳转到缴费页面 524 // 去支付,跳转到缴费页面
503 const assoName = assoFullName.value 525 const assoName = getCurrentAssoName()
504 uni.navigateTo({ 526 uni.navigateTo({
505 url: `/myCenter/goPay?payName=${encodeURIComponent(payForm.value.orderName || form.value.name || '')}&assoName=${encodeURIComponent(assoName)}&orderId=${payForm.value.id}&source=perfect` 527 url: `/myCenter/goPay?payName=${encodeURIComponent(payForm.value.orderName || form.value.name || '')}&assoName=${encodeURIComponent(assoName)}&orderId=${payForm.value.id}&source=perfect`
506 }) 528 })
...@@ -552,27 +574,51 @@ function getMyCertStageFN() { ...@@ -552,27 +574,51 @@ function getMyCertStageFN() {
552 auditLoading.value = true 574 auditLoading.value = true
553 api.getMyRecent({showLoading: false}).then(res => { 575 api.getMyRecent({showLoading: false}).then(res => {
554 auditLoading.value = false 576 auditLoading.value = false
577 const directReason = getRejectReasonFromData(res.data)
555 if (res.data && res.data.auditLogs) { 578 if (res.data && res.data.auditLogs) {
556 try { 579 try {
557 auditList.value = JSON.parse(res.data.auditLogs) 580 auditList.value = JSON.parse(res.data.auditLogs)
581 updateRejectReason(directReason)
558 } catch (e) { 582 } catch (e) {
559 auditList.value = [] 583 auditList.value = []
584 rejectReason.value = directReason
560 } 585 }
561 } else { 586 } else {
562 auditList.value = [] 587 auditList.value = []
588 rejectReason.value = directReason
563 } 589 }
564 }).catch(() => { 590 }).catch(() => {
565 auditLoading.value = false 591 auditLoading.value = false
566 auditList.value = [] 592 auditList.value = []
593 rejectReason.value = ''
567 }) 594 })
568 } 595 }
569 596
597 function getRejectReasonFromData(data = {}) {
598 return data?.auditReason || data?.auditMsg || data?.reason || data?.rejectReason || data?.refuseReason || ''
599 }
600
601 function getRejectReasonFromLog(item = {}) {
602 return item.auditMsg || item.auditReason || item.reason || item.rejectReason || item.refuseReason || item.remark || ''
603 }
604
605 function isRejectAuditLog(item = {}) {
606 return item.auditResult == 2 || item.auditResult == 3 || item.auditStatus == 3 || item.status == 3
607 }
608
609 function updateRejectReason(fallbackReason = '') {
610 const logs = Array.isArray(auditList.value) ? auditList.value : []
611 const rejectItem = [...logs].reverse().find(item => isRejectAuditLog(item) && getRejectReasonFromLog(item))
612 const latestReasonItem = [...logs].reverse().find(item => getRejectReasonFromLog(item))
613 rejectReason.value = getRejectReasonFromLog(rejectItem) || fallbackReason || getRejectReasonFromLog(latestReasonItem) || ''
614 }
615
570 // 审核状态文字 616 // 审核状态文字
571 function getAuditStatusText(status) { 617 function getAuditStatusText(status) {
572 const map = { 618 const map = {
573 0: '待审核', 619 0: '待审核',
574 1: '审核通过', 620 1: '审核通过',
575 2: '审核拒绝' 621 2: '审核未通过'
576 } 622 }
577 return map[status] || '待审核' 623 return map[status] || '待审核'
578 } 624 }
...@@ -664,7 +710,7 @@ function getDetail() { ...@@ -664,7 +710,7 @@ function getDetail() {
664 form.value.type = String(form.value.type) 710 form.value.type = String(form.value.type)
665 } 711 }
666 authenticationStatus.value = res.data.authenticationStatus 712 authenticationStatus.value = res.data.authenticationStatus
667 switch (res.data.authenticationStatus) { 713 switch (String(res.data.authenticationStatus ?? '')) {
668 case '0' : 714 case '0' :
669 activeStep.value = 2 715 activeStep.value = 2
670 break 716 break
...@@ -676,6 +722,7 @@ function getDetail() { ...@@ -676,6 +722,7 @@ function getDetail() {
676 break 722 break
677 case '3': 723 case '3':
678 activeStep.value = 2 724 activeStep.value = 2
725 getMyCertStageFN()
679 break 726 break
680 default: 727 default:
681 activeStep.value = 1 728 activeStep.value = 1
...@@ -746,6 +793,10 @@ function getDetail() { ...@@ -746,6 +793,10 @@ function getDetail() {
746 editIng.value = true 793 editIng.value = true
747 } 794 }
748 795
796 if (authenticationStatus.value != 3) {
797 rejectReason.value = ''
798 }
799
749 // creditCode.value = form.value.creditCode 800 // creditCode.value = form.value.creditCode
750 // legal.value = form.value.legal 801 // legal.value = form.value.legal
751 // legalIdcCode.value = form.value.legalIdcCode 802 // legalIdcCode.value = form.value.legalIdcCode
...@@ -769,7 +820,7 @@ function formatRegionTree(node) { ...@@ -769,7 +820,7 @@ function formatRegionTree(node) {
769 820
770 // 获取地区列表 821 // 获取地区列表
771 function getRegionsList() { 822 function getRegionsList() {
772 api.regionsList(null, {showLoading: false}).then(res => { 823 return api.regionsList(null, {showLoading: false}).then(res => {
773 options.value = res.data 824 options.value = res.data
774 // 转换为级联选择器格式 825 // 转换为级联选择器格式
775 regionOptions.value = res.data 826 regionOptions.value = res.data
...@@ -779,7 +830,7 @@ function getRegionsList() { ...@@ -779,7 +830,7 @@ function getRegionsList() {
779 830
780 // 获取协会树 831 // 获取协会树
781 function getTree() { 832 function getTree() {
782 api.certifiedDeptTreeRegister({ 833 return api.certifiedDeptTreeRegister({
783 selfDeptId: -1, // 修复:传数字类型,避免后端类型转换错误 834 selfDeptId: -1, // 修复:传数字类型,避免后端类型转换错误
784 webSiteShow: 1, 835 webSiteShow: 1,
785 showDisabled: 1, 836 showDisabled: 1,
...@@ -837,7 +888,7 @@ function findAssoNodeWithPath(list, targetId, currentPath) { ...@@ -837,7 +888,7 @@ function findAssoNodeWithPath(list, targetId, currentPath) {
837 888
838 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID) 889 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID)
839 function changCase(e) { 890 function changCase(e) {
840 if (!editIng.value) return 891 if (isFieldDisabled('parentId')) return
841 const valueArr = e.detail?.value || e; 892 const valueArr = e.detail?.value || e;
842 // 取最后一级的value(纯ID) 893 // 取最后一级的value(纯ID)
843 const lastNode = valueArr[valueArr.length - 1]; 894 const lastNode = valueArr[valueArr.length - 1];
...@@ -848,7 +899,7 @@ function changCase(e) { ...@@ -848,7 +899,7 @@ function changCase(e) {
848 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式) 899 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式)
849 // 地址选择(还原成你之前能用的版本:纯ID数组赋值) 900 // 地址选择(还原成你之前能用的版本:纯ID数组赋值)
850 function changeAddress(e) { 901 function changeAddress(e) {
851 if (!editIng.value) return 902 if (isFieldDisabled('address')) return
852 const selectedValue = e.detail?.value ?? e; 903 const selectedValue = e.detail?.value ?? e;
853 904
854 // 直接赋值纯ID,不要再取 .value 905 // 直接赋值纯ID,不要再取 .value
...@@ -936,30 +987,6 @@ function submitStep1() { ...@@ -936,30 +987,6 @@ function submitStep1() {
936 // 步骤2提交 987 // 步骤2提交
937 async function submitStep2() { 988 async function submitStep2() {
938 // 验证必填项 989 // 验证必填项
939 if (!form.value.parentId || form.value.parentId == 0 || form.value.parentId == -1) {
940 uni.showToast({title: '请选择所属协会', duration: 2000, icon: 'none'})
941 return
942 }
943 if (!form.value.name) {
944 uni.showToast({title: '请输入机构名称', duration: 2000, icon: 'none'})
945 return
946 }
947 if (coordinates1.value.length === 0) {
948 uni.showToast({title: '请选择认证地址', duration: 2000, icon: 'none'})
949 return
950 }
951 if (!form.value.adress) {
952 uni.showToast({title: '请输入认证详细地址', duration: 2000, icon: 'none'})
953 return
954 }
955 if (!form.value.siteContact) {
956 uni.showToast({title: '请输入联系人', duration: 2000, icon: 'none'})
957 return
958 }
959 if (!form.value.siteTel) {
960 uni.showToast({title: '请输入联系方式', duration: 2000, icon: 'none'})
961 return
962 }
963 if (!form.value.businessLicense) { 990 if (!form.value.businessLicense) {
964 uni.showToast({title: '请上传营业执照', duration: 2000, icon: 'none'}) 991 uni.showToast({title: '请上传营业执照', duration: 2000, icon: 'none'})
965 return 992 return
...@@ -976,6 +1003,22 @@ async function submitStep2() { ...@@ -976,6 +1003,22 @@ async function submitStep2() {
976 uni.showToast({title: '社会信用代码已存在,请联系中跆协修改', icon: 'none', duration: 3000}) 1003 uni.showToast({title: '社会信用代码已存在,请联系中跆协修改', icon: 'none', duration: 3000})
977 return 1004 return
978 } 1005 }
1006 if (!form.value.name) {
1007 uni.showToast({title: '请输入机构名称', duration: 2000, icon: 'none'})
1008 return
1009 }
1010 if (coordinates1.value.length === 0) {
1011 uni.showToast({title: '请选择认证地址', duration: 2000, icon: 'none'})
1012 return
1013 }
1014 if (!form.value.adress) {
1015 uni.showToast({title: '请输入认证详细地址', duration: 2000, icon: 'none'})
1016 return
1017 }
1018 if (!form.value.parentId || form.value.parentId == 0 || form.value.parentId == -1) {
1019 uni.showToast({title: '请选择所属协会', duration: 2000, icon: 'none'})
1020 return
1021 }
979 if (!form.value.legalIdcPhoto1 || !form.value.legalIdcPhoto2) { 1022 if (!form.value.legalIdcPhoto1 || !form.value.legalIdcPhoto2) {
980 uni.showToast({title: '请上传身份证正反面', duration: 2000, icon: 'none'}) 1023 uni.showToast({title: '请上传身份证正反面', duration: 2000, icon: 'none'})
981 return 1024 return
...@@ -988,6 +1031,14 @@ async function submitStep2() { ...@@ -988,6 +1031,14 @@ async function submitStep2() {
988 uni.showToast({title: '请输入法人证件号', duration: 2000, icon: 'none'}) 1031 uni.showToast({title: '请输入法人证件号', duration: 2000, icon: 'none'})
989 return 1032 return
990 } 1033 }
1034 if (!form.value.siteContact) {
1035 uni.showToast({title: '请输入联系人', duration: 2000, icon: 'none'})
1036 return
1037 }
1038 if (!form.value.siteTel) {
1039 uni.showToast({title: '请输入联系方式', duration: 2000, icon: 'none'})
1040 return
1041 }
991 if (!form.value.pictures) { 1042 if (!form.value.pictures) {
992 uni.showToast({title: '请上传机构照片', duration: 2000, icon: 'none'}) 1043 uni.showToast({title: '请上传机构照片', duration: 2000, icon: 'none'})
993 return 1044 return
...@@ -1079,7 +1130,7 @@ function submitCertification() { ...@@ -1079,7 +1130,7 @@ function submitCertification() {
1079 uni.showToast({title: '提交成功', duration: 1500, icon: 'success'}) 1130 uni.showToast({title: '提交成功', duration: 1500, icon: 'success'})
1080 // 跳转缴费页面 1131 // 跳转缴费页面
1081 setTimeout(() => { 1132 setTimeout(() => {
1082 const assoName = assoFullName.value 1133 const assoName = getCurrentAssoName()
1083 // 跳转到缴费页面 1134 // 跳转到缴费页面
1084 uni.navigateTo({ 1135 uni.navigateTo({
1085 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}&source=perfect` 1136 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}&source=perfect`
...@@ -1120,13 +1171,25 @@ function onBusinessLicenseSelect() { ...@@ -1120,13 +1171,25 @@ function onBusinessLicenseSelect() {
1120 }).then(ocrRes => { 1171 }).then(ocrRes => {
1121 return {url, ocrRes} 1172 return {url, ocrRes}
1122 }) 1173 })
1123 }).then(({url, ocrRes}) => { 1174 }).then(async ({url, ocrRes}) => {
1124 uni.hideLoading() 1175 uni.hideLoading()
1125 const data = JSON.parse(ocrRes.data) 1176 const data = JSON.parse(ocrRes.data)
1126 let name = '营业执照' 1177 let name = '营业执照'
1127 if (data.code === 200 && data.data) { 1178 if (data.code === 200 && data.data) {
1128 form.value.creditCode = data.data.creditCode 1179 const ocrData = data.data
1129 form.value.companyName = data.data.companyName 1180 form.value.creditCode = ocrData.creditCode || form.value.creditCode
1181 form.value.companyName = ocrData.companyName || form.value.companyName
1182 form.value.legal = ocrData.legalPerson || form.value.legal
1183 lockOcrField('creditCode', form.value.creditCode)
1184 lockOcrField('companyName', form.value.companyName)
1185 lockOcrField('legal', form.value.legal)
1186 if (!regionOptions.value?.length) {
1187 await getRegionsList().catch(() => {})
1188 }
1189 if (!assoList.value?.length) {
1190 await getTree().catch(() => {})
1191 }
1192 applyBusinessAddress(ocrData.businessAddress)
1130 name = data.data.name || '营业执照' 1193 name = data.data.name || '营业执照'
1131 onCreditCodeBlur() 1194 onCreditCodeBlur()
1132 } 1195 }
...@@ -1150,6 +1213,121 @@ function removeBusinessLicense() { ...@@ -1150,6 +1213,121 @@ function removeBusinessLicense() {
1150 if (!editIng.value) return 1213 if (!editIng.value) return
1151 form.value.businessLicense = '' 1214 form.value.businessLicense = ''
1152 form.value.businessLicenseName = '' 1215 form.value.businessLicenseName = ''
1216 unlockOcrFields()
1217 }
1218
1219 function getNodeValue(node) {
1220 return node?.value ?? node?.id ?? ''
1221 }
1222
1223 function getNodeText(node) {
1224 return node?.text ?? node?.label ?? node?.name ?? ''
1225 }
1226
1227 function normalizeAddressText(text) {
1228 return String(text || '').replace(/\s/g, '')
1229 }
1230
1231 function getAddressKeywords(name) {
1232 const fullName = normalizeAddressText(name)
1233 const shortName = fullName.replace(/省|市|区|县|自治区|壮族自治区|回族自治区|维吾尔自治区|地区|自治州|盟|旗/g, '')
1234 return [...new Set([fullName, shortName].filter(keyword => keyword && keyword.length > 1))]
1235 }
1236
1237 function addressIncludes(target, name) {
1238 return getAddressKeywords(name).some(keyword => target.includes(keyword))
1239 }
1240
1241 function findRegionPathByAddress(address) {
1242 const target = normalizeAddressText(address)
1243 if (!target || !regionOptions.value?.length) return null
1244 const candidates = []
1245
1246 for (const province of regionOptions.value) {
1247 const provinceMatched = addressIncludes(target, getNodeText(province))
1248 const provincePath = [province]
1249 const cities = province.children || []
1250 for (const city of cities) {
1251 const cityMatched = addressIncludes(target, getNodeText(city))
1252 const cityPath = [province, city]
1253 const regions = city.children || []
1254 for (const region of regions) {
1255 const regionMatched = addressIncludes(target, getNodeText(region))
1256 if (provinceMatched || cityMatched || regionMatched) {
1257 const score = (provinceMatched ? 1 : 0) + (cityMatched ? 2 : 0) + (regionMatched ? 4 : 0)
1258 candidates.push({path: [province, city, region], score})
1259 }
1260 }
1261 if (provinceMatched || cityMatched) {
1262 const score = (provinceMatched ? 1 : 0) + (cityMatched ? 2 : 0)
1263 candidates.push({path: cityPath, score})
1264 }
1265 }
1266 if (provinceMatched) {
1267 candidates.push({path: provincePath, score: 1})
1268 }
1269 }
1270 candidates.sort((a, b) => b.score - a.score || b.path.length - a.path.length)
1271 return candidates[0]?.path || null
1272 }
1273
1274 function applyRegionPath(path) {
1275 if (!path?.length) return false
1276 const valuePath = path.map(node => ({
1277 value: getNodeValue(node),
1278 text: getNodeText(node)
1279 }))
1280 coordinates1.value = valuePath
1281 form.value.provinceId = getNodeValue(path[0]) || ''
1282 form.value.cityId = getNodeValue(path[1]) || ''
1283 form.value.regionId = getNodeValue(path[2]) || ''
1284 lockOcrField('address', form.value.provinceId || form.value.cityId || form.value.regionId)
1285 return true
1286 }
1287
1288 function findAssoPathByRegionNames(regionPath) {
1289 if (!regionPath?.length || !assoList.value?.length) return null
1290 const names = regionPath.map(node => normalizeAddressText(getNodeText(node))).filter(Boolean)
1291 const candidates = []
1292
1293 function walk(list, path) {
1294 for (const item of list || []) {
1295 const itemName = normalizeAddressText(getNodeText(item))
1296 const nextPath = [...path, item]
1297 const score = names.reduce((total, name, index) => {
1298 const shortName = name.replace(/省|市|区|县|自治区|壮族自治区|回族自治区|维吾尔自治区|地区|自治州|盟|旗/g, '')
1299 return total + (itemName.includes(name) || (shortName.length > 1 && itemName.includes(shortName)) ? index + 1 : 0)
1300 }, 0)
1301 if (score > 0) candidates.push({path: nextPath, score})
1302 if (item.children?.length) walk(item.children, nextPath)
1303 }
1304 }
1305
1306 walk(assoList.value, [])
1307 candidates.sort((a, b) => b.score - a.score || b.path.length - a.path.length)
1308 return candidates[0]?.path || null
1309 }
1310
1311 function applyAssoPath(path) {
1312 if (!path?.length) return false
1313 const lastNode = path[path.length - 1]
1314 form.value.parentId = getNodeValue(lastNode) || ''
1315 assoFullName.value = getAssoFullName(path.map(node => ({value: getNodeValue(node)})))
1316 lockOcrField('parentId', form.value.parentId)
1317 return !!form.value.parentId
1318 }
1319
1320 function applyBusinessAddress(address) {
1321 const businessAddress = String(address || '').trim()
1322 if (!businessAddress) return
1323 form.value.adress = businessAddress
1324 lockOcrField('adress', businessAddress)
1325
1326 const regionPath = findRegionPathByAddress(businessAddress)
1327 if (applyRegionPath(regionPath)) {
1328 const assoPath = findAssoPathByRegionNames(regionPath)
1329 applyAssoPath(assoPath)
1330 }
1153 } 1331 }
1154 1332
1155 // 删除身份证正面 1333 // 删除身份证正面
...@@ -1292,7 +1470,7 @@ function goPay() { ...@@ -1292,7 +1470,7 @@ function goPay() {
1292 return 1470 return
1293 } 1471 }
1294 // 使用完整的协会路径名称 1472 // 使用完整的协会路径名称
1295 const assoName = assoFullName.value || getAssoName(form.value.parentId) 1473 const assoName = getCurrentAssoName()
1296 // 跳转到缴费页面 1474 // 跳转到缴费页面
1297 uni.navigateTo({ 1475 uni.navigateTo({
1298 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}&source=perfect` 1476 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}&source=perfect`
...@@ -1322,6 +1500,10 @@ function getAssoName(parentId) { ...@@ -1322,6 +1500,10 @@ function getAssoName(parentId) {
1322 return findInTree(assoList.value) || '' 1500 return findInTree(assoList.value) || ''
1323 } 1501 }
1324 1502
1503 function getCurrentAssoName() {
1504 return assoFullName.value || getAssoName(form.value.parentId)
1505 }
1506
1325 // 根据选择的值数组获取完整的协会路径名称 1507 // 根据选择的值数组获取完整的协会路径名称
1326 function getAssoFullName(valueArr) { 1508 function getAssoFullName(valueArr) {
1327 if (!valueArr || valueArr.length === 0 || !assoList.value || assoList.value.length === 0) { 1509 if (!valueArr || valueArr.length === 0 || !assoList.value || assoList.value.length === 0) {
...@@ -1574,8 +1756,8 @@ watch(activeStep, (newVal) => { ...@@ -1574,8 +1756,8 @@ watch(activeStep, (newVal) => {
1574 1756
1575 .status-box { 1757 .status-box {
1576 display: flex; 1758 display: flex;
1577 align-items: center; 1759 flex-direction: column;
1578 justify-content: space-between; 1760 align-items: flex-start;
1579 padding: 20rpx 0; 1761 padding: 20rpx 0;
1580 margin-bottom: 20rpx; 1762 margin-bottom: 20rpx;
1581 } 1763 }
...@@ -1593,6 +1775,26 @@ watch(activeStep, (newVal) => { ...@@ -1593,6 +1775,26 @@ watch(activeStep, (newVal) => {
1593 width: 100px; 1775 width: 100px;
1594 } 1776 }
1595 1777
1778 .reject-reason {
1779 width: 100%;
1780 margin-top: 14rpx;
1781 padding: 16rpx 18rpx;
1782 box-sizing: border-box;
1783 background: #fff1f1;
1784 border-radius: 12rpx;
1785 color: #AD181F;
1786 line-height: 1.5;
1787 font-size: 24rpx;
1788 }
1789
1790 .reject-label {
1791 font-weight: 600;
1792 }
1793
1794 .reject-text {
1795 word-break: break-all;
1796 }
1797
1596 .logout-btn { 1798 .logout-btn {
1597 display: flex; 1799 display: flex;
1598 align-items: center; 1800 align-items: center;
......
...@@ -12,32 +12,19 @@ ...@@ -12,32 +12,19 @@
12 <view class="personitem" v-for="(n,index) in list" :key="index"> 12 <view class="personitem" v-for="(n,index) in list" :key="index">
13 <uni-swipe-action> 13 <uni-swipe-action>
14 <uni-swipe-action-item> 14 <uni-swipe-action-item>
15 <view class="content-box" @click="handleInfo(n)"> 15 <view class="content-box" :class="{ normal: isNormalMember(n) }" @click="handleInfo(n)">
16 <view v-if="isNormalMember(n)" class="normal-corner">正常会员</view>
16 <view class="flexbox" style="flex: 1 1 auto;"> 17 <view class="flexbox" style="flex: 1 1 auto;">
17 <view class="photobox"> 18 <view class="photobox">
18 <image class="photo" v-if="n.photo" :src="n.photo" mode='aspectFill'></image> 19 <image class="photo" v-if="n.photo" :src="n.photo" mode='aspectFill'></image>
19 <view class="colorful" v-else>{{n.name.slice(0,1)}}</view> 20 <view class="colorful" v-else>{{n.name.slice(0,1)}}</view>
20 </view> 21 </view>
21 <view> 22 <view class="member-info">
22 {{n.name}} <text class="date">({{n.perCode}})</text> 23 <view class="member-name">
24 {{n.name}} <text class="date">({{n.perCode || '--'}})</text>
23 </view> 25 </view>
26 <view class="validity-line">有效期:{{ formatValidityDate(n.validityDate) }}</view>
24 </view> 27 </view>
25 <view class="flexbox" style="flex:0 0 auto">
26 <text v-if="n.certStage==0" class="text-primary">
27 新会员
28 </text>
29 <text v-if="n.certStage==1" class="text-warning">
30 待提交
31 </text>
32 <text v-if="n.certStage==2" class="text-red">
33 缴费中
34 </text>
35 <text v-if="n.certStage==3" class="text-success">
36 正常
37 </text>
38 <text v-if="n.certStage==4" class="text-gray">
39 过期
40 </text>
41 </view> 28 </view>
42 29
43 </view> 30 </view>
...@@ -166,6 +153,14 @@ ...@@ -166,6 +153,14 @@
166 }) 153 })
167 } 154 }
168 155
156 function isNormalMember(item) {
157 return String(item.certStage) === '3'
158 }
159
160 function formatValidityDate(value) {
161 return value ? String(value).slice(0, 10) : '--'
162 }
163
169 function goVipList() { 164 function goVipList() {
170 let path = '/personalVip/addVip'; 165 let path = '/personalVip/addVip';
171 uni.navigateTo({ 166 uni.navigateTo({
...@@ -203,9 +198,43 @@ ...@@ -203,9 +198,43 @@
203 } 198 }
204 199
205 .content-box { 200 .content-box {
201 position: relative;
206 background: #fff; 202 background: #fff;
203 overflow: hidden;
207 .photobox{margin-right: 20rpx; 204 .photobox{margin-right: 20rpx;
208 } 205 }
209 } 206 }
207 .content-box.normal {
208 background: linear-gradient(135deg, #fff3f4 0%, #ffffff 58%, #fff0f1 100%);
209 border: 1rpx solid rgba(196, 18, 27, 0.22);
210 box-shadow: 0 10rpx 26rpx rgba(196, 18, 27, 0.12);
211 }
212 .normal-corner {
213 position: absolute;
214 top: 0;
215 right: 0;
216 padding: 8rpx 18rpx;
217 border-radius: 0 0 0 20rpx;
218 background: linear-gradient(135deg, #C4121B 0%, #e24a52 100%);
219 color: #fff;
220 font-size: 22rpx;
221 font-weight: 600;
222 }
223 .member-info {
224 min-width: 0;
225 padding-right: 120rpx;
226 }
227 .member-name {
228 color: #222;
229 font-size: 30rpx;
230 font-weight: 600;
231 line-height: 1.4;
232 }
233 .validity-line {
234 margin-top: 8rpx;
235 color: #777;
236 font-size: 24rpx;
237 line-height: 1.4;
238 }
210 .pdbox{padding: 0 20rpx;} 239 .pdbox{padding: 0 20rpx;}
211 </style> 240 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!