977e4581 by lttnew

注册引导

1 parent cfdea69e
...@@ -1321,10 +1321,11 @@ export function checkBusinessLicense(data) { ...@@ -1321,10 +1321,11 @@ export function checkBusinessLicense(data) {
1321 } 1321 }
1322 1322
1323 // 生成单位订单renewYear 1323 // 生成单位订单renewYear
1324 export function certifiedNew(renewYear) { 1324 export function certifiedNew(data) {
1325 return request({ 1325 return request({
1326 url: `/system/certifiedNew/commit?renewYear=${renewYear}`, 1326 url: `/system/certifiedNew/commit`,
1327 method: 'post' 1327 method: 'post',
1328 params: data
1328 }) 1329 })
1329 } 1330 }
1330 1331
......
1 <template> 1 <template>
2 <view class="container"> 2 <view class="container">
3 <view class="content"> 3 <view class="content">
4 <!-- 缴费单位和所属协会 -->
5 <view class="card info-card">
6 <view class="info-row">
7 <text class="info-label">缴费单位</text>
8 <text class="info-value">{{ payName || '-' }}</text>
9 </view>
10 <view class="info-row" v-if="assoName">
11 <text class="info-label">所属协会</text>
12 <text class="info-value">{{ assoName || '-' }}</text>
13 </view>
14 </view>
15
4 <view class="card"> 16 <view class="card">
5 <view class="yearRow"> 17 <view class="yearRow">
6 <view class="label">缴费年限</view> 18 <view class="label">缴费年限</view>
7 <view class="control"> 19 <view class="control">
8 <image v-if="form.renewYear > 1" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/dd_02.png'" 20 <image v-if="form.renewYear > 1" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/dd_02.png'"
9 @click="minusYear"></image> 21 @click="minusYear"></image>
10 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/dd_02_g.png'"></image> 22 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/dd_02_g.png'"></image>
11 <text class="num">{{ form.renewYear }}</text> 23 <text class="num">{{ form.renewYear }}</text>
12 <image v-if="form.renewYear < 5" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/btn_03.png'" 24 <image v-if="form.renewYear < 5" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/btn_03.png'"
13 @click="plusYear"></image> 25 @click="plusYear"></image>
14 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/btn_03_g.png'"></image> 26 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/btn_03_g.png'"></image>
15 </view> 27 </view>
16 </view> 28 </view>
17 </view> 29 </view>
...@@ -35,7 +47,7 @@ ...@@ -35,7 +47,7 @@
35 <label class="radioItem"> 47 <label class="radioItem">
36 <radio :checked="payType === '1'" class="custom-radio" value="1"/> 48 <radio :checked="payType === '1'" class="custom-radio" value="1"/>
37 <view class="payInfo"> 49 <view class="payInfo">
38 <image class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/min.png'"></image> 50 <image class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/min.png'"></image>
39 <text>民生付</text> 51 <text>民生付</text>
40 </view> 52 </view>
41 </label> 53 </label>
...@@ -82,6 +94,8 @@ const preferentialData = ref({ ...@@ -82,6 +94,8 @@ const preferentialData = ref({
82 }) 94 })
83 const payType = ref('1') 95 const payType = ref('1')
84 const isPaying = ref(false) 96 const isPaying = ref(false)
97 const payName = ref('')
98 const assoName = ref('')
85 99
86 const memberTotalFee = computed(() => { 100 const memberTotalFee = computed(() => {
87 if (preferentialPolicy.value) { 101 if (preferentialPolicy.value) {
...@@ -118,26 +132,30 @@ const handelPay = async () => { ...@@ -118,26 +132,30 @@ const handelPay = async () => {
118 }) 132 })
119 return 133 return
120 } 134 }
121 135
122 // 显示 loading 136 // 显示 loading
123 uni.showLoading({ 137 uni.showLoading({
124 title: '支付中...', 138 title: '支付中...',
125 mask: true 139 mask: true
126 }) 140 })
127 isPaying.value = true 141 isPaying.value = true
128 142
129 // 创建订单 143 // 创建订单 - 参考PC端逻辑
130 const [orderErr, orderRes] = await to(api.certifiedNew(form.value.renewYear)) 144 const [orderErr, orderRes] = await to(api.certifiedNew({
145 renewYear: form.value.renewYear,
146 type: '1',
147 url: ''
148 }))
131 if (orderErr) { 149 if (orderErr) {
132 uni.hideLoading() 150 uni.hideLoading()
133 isPaying.value = false 151 isPaying.value = false
134 // uni.showToast({ 152 uni.showToast({
135 // title: '创建订单失败', 153 title: '创建订单失败',
136 // icon: 'none' 154 icon: 'none'
137 // }) 155 })
138 return 156 return
139 } 157 }
140 158
141 const data = orderRes.data 159 const data = orderRes.data
142 // 无需支付,直接成功 160 // 无需支付,直接成功
143 if (data.payFlag == 0) { 161 if (data.payFlag == 0) {
...@@ -148,27 +166,32 @@ const handelPay = async () => { ...@@ -148,27 +166,32 @@ const handelPay = async () => {
148 }) 166 })
149 return 167 return
150 } 168 }
151 if (data.payResult.encryptedData) { 169 if (data.payResult && data.payResult.encryptedData) {
152 const res = minShengPay(data.orderId, data.payResult.encryptedData) 170 try {
153 console.log(res) 171 await minShengPay(data.orderId, data.payResult.encryptedData)
172 // 支付成功,跳转到成功页面
173 uni.redirectTo({
174 url: `/myCenter/sucPay?orderId=${data.orderId}`
175 })
176 } catch (e) {
177 console.error('支付失败', e)
178 uni.hideLoading()
179 isPaying.value = false
180 }
181 return
154 } 182 }
155 // 需要支付回调 183 uni.hideLoading()
156 // if (data.orderId) { 184 isPaying.value = false
157 // await to(api.callBack2(data.orderId))
158 // uni.hideLoading()
159 // isPaying.value = false
160 //
161 // uni.redirectTo({
162 // url: `/myCenter/sucPay?orderId=${data.orderId}`
163 // })
164 // }
165
166
167 } 185 }
168 186
169 onLoad((option) => { 187 onLoad((option) => {
188 console.log(66,option)
170 // 接收年限 189 // 接收年限
171 form.value.renewYear = Number(option.renewYear || 1) 190 form.value.renewYear = Number(option.renewYear || 1)
191 // 接收缴费单位和所属协会
192 payName.value = decodeURIComponent(option.payName || '')
193 console.log(77,payName.value)
194 assoName.value = decodeURIComponent(option.assoName || '')
172 // 初始化获取费用和优惠 195 // 初始化获取费用和优惠
173 init() 196 init()
174 }) 197 })
...@@ -214,7 +237,7 @@ async function getZtxDiscountPolicyApi() { ...@@ -214,7 +237,7 @@ async function getZtxDiscountPolicyApi() {
214 } 237 }
215 </script> 238 </script>
216 239
217 <style scoped> 240 <style scoped lang="scss">
218 /* 整体容器 */ 241 /* 整体容器 */
219 .container { 242 .container {
220 min-height: 100vh; 243 min-height: 100vh;
...@@ -234,6 +257,32 @@ async function getZtxDiscountPolicyApi() { ...@@ -234,6 +257,32 @@ async function getZtxDiscountPolicyApi() {
234 margin-bottom: 20rpx; 257 margin-bottom: 20rpx;
235 } 258 }
236 259
260 /* 缴费单位和所属协会信息 */
261 .info-card {
262 .info-row {
263 display: flex;
264 justify-content: space-between;
265 align-items: center;
266 padding: 16rpx 0;
267 border-bottom: 1rpx solid #f5f5f5;
268
269 &:last-child {
270 border-bottom: none;
271 }
272
273 .info-label {
274 font-size: 28rpx;
275 color: #666;
276 }
277
278 .info-value {
279 font-size: 28rpx;
280 color: #333;
281 font-weight: 500;
282 }
283 }
284 }
285
237 /* 缴费年限行 */ 286 /* 缴费年限行 */
238 .yearRow { 287 .yearRow {
239 display: flex; 288 display: flex;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <view style="width: 60vw;overflow:auto;"> 7 <view style="width: 60vw;overflow:auto;">
8 <uni-data-picker v-model="form.parentId" :localdata="tree" 8 <uni-data-picker v-model="form.parentId" :localdata="tree"
9 :readonly="type&&parentId!=-1&&parentId!=0" :clear-icon="false" 9 :readonly="type&&parentId!=-1&&parentId!=0" :clear-icon="false"
10 :map="{text:'label',value:'id'}" popup-title="请选择"> 10 :map="{text:'label',value:'id'}" popup-title="请选择" @change="changCase">
11 </uni-data-picker> 11 </uni-data-picker>
12 </view> 12 </view>
13 </uni-forms-item> 13 </uni-forms-item>
...@@ -195,6 +195,7 @@ ...@@ -195,6 +195,7 @@
195 const imgBack = ref({}) 195 const imgBack = ref({})
196 const creditCode = ref() 196 const creditCode = ref()
197 const parentId = ref() 197 const parentId = ref()
198 const assoFullName = ref('') // 协会完整路径名称
198 const legalIdcPhoto1 = ref('') 199 const legalIdcPhoto1 = ref('')
199 const legalIdcPhoto2 = ref('') 200 const legalIdcPhoto2 = ref('')
200 const companyName = ref('') 201 const companyName = ref('')
...@@ -338,6 +339,7 @@ ...@@ -338,6 +339,7 @@
338 } 339 }
339 api.certifiedDeptTree(obj).then(res => { 340 api.certifiedDeptTree(obj).then(res => {
340 tree.value = res.data 341 tree.value = res.data
342 restoreAssoFullName()
341 }) 343 })
342 } else { 344 } else {
343 var obj = { 345 var obj = {
...@@ -348,6 +350,7 @@ ...@@ -348,6 +350,7 @@
348 } 350 }
349 api.deptTreeSelect(obj).then(res => { 351 api.deptTreeSelect(obj).then(res => {
350 tree.value = res.data 352 tree.value = res.data
353 restoreAssoFullName()
351 }) 354 })
352 } 355 }
353 } 356 }
...@@ -573,8 +576,9 @@ ...@@ -573,8 +576,9 @@
573 }) 576 })
574 } else { 577 } else {
575 api.editMyMemberCertifiedInfo(dataInfo).then(res => { 578 api.editMyMemberCertifiedInfo(dataInfo).then(res => {
579 // 使用完整的协会路径名称
576 uni.navigateTo({ 580 uni.navigateTo({
577 url: `/myCenter/goPay` 581 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoFullName.value)}`
578 }) 582 })
579 583
580 }).catch(err => { 584 }).catch(err => {
...@@ -586,6 +590,84 @@ ...@@ -586,6 +590,84 @@
586 } 590 }
587 } 591 }
588 592
593 // 根据协会ID获取协会名称
594 function getAssoName(parentId) {
595 if (!parentId || !tree.value || tree.value.length === 0) {
596 return ''
597 }
598 // 递归查找协会名称
599 function findInTree(list) {
600 for (const item of list) {
601 if (item.id === parentId) {
602 return item.label || ''
603 }
604 if (item.children && item.children.length > 0) {
605 const found = findInTree(item.children)
606 if (found) return found
607 }
608 }
609 return null
610 }
611 return findInTree(tree.value) || ''
612 }
613
614 // 协会选择 - 获取完整路径名称
615 function changCase(e) {
616 const valueArr = e.detail?.value || e;
617 // 取最后一级的value(纯ID)
618 const lastNode = valueArr[valueArr.length - 1];
619 form.value.parentId = lastNode?.value || '';
620 console.log('最终提交的parentId:', form.value.parentId);
621 assoFullName.value = getAssoFullName(valueArr)
622 console.log('协会完整路径:', assoFullName.value);
623 }
624
625 // 获取协会完整路径名称
626 function getAssoFullName(valueArr) {
627 if (!valueArr || valueArr.length === 0) return ''
628 // valueArr 是 {value: id} 数组
629 const names = []
630 let currentLevel = tree.value
631 for (const item of valueArr) {
632 const found = currentLevel?.find(v => v.id === item.value || v.value === item.value)
633 if (found) {
634 names.push(found.label)
635 currentLevel = found.children
636 } else {
637 break
638 }
639 }
640 return names.join('/')
641 }
642
643 // 查找协会节点及其父路径
644 function findAssoNodeWithPath(list, targetId, currentPath) {
645 for (const item of list) {
646 const newPath = [...currentPath, item.value || item.id]
647 if ((item.value || item.id) === targetId) {
648 return { node: item, path: newPath }
649 }
650 if (item.children && item.children.length > 0) {
651 const found = findAssoNodeWithPath(item.children, targetId, newPath)
652 if (found) return found
653 }
654 }
655 return null
656 }
657
658 // 恢复协会完整路径名称
659 function restoreAssoFullName() {
660 if (!form.value.parentId || !tree.value || tree.value.length === 0) {
661 return
662 }
663 // 查找节点及其路径
664 const result = findAssoNodeWithPath(tree.value, form.value.parentId, [])
665 if (result) {
666 // 使用路径数组重建完整名称
667 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id })))
668 }
669 }
670
589 function changeCoordinates1(e) { 671 function changeCoordinates1(e) {
590 form.value.provinceId = e?.[0]?.toString() 672 form.value.provinceId = e?.[0]?.toString()
591 form.value.cityId = e?.[1]?.toString() 673 form.value.cityId = e?.[1]?.toString()
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <view class="success-subtitle">支付成功,请等待审核</view> 12 <view class="success-subtitle">支付成功,请等待审核</view>
13 13
14 <!-- 订单信息卡片(带阴影) --> 14 <!-- 订单信息卡片(带阴影) -->
15 <view class="info-card"> 15 <!-- <view class="info-card">
16 <view class="info-item"> 16 <view class="info-item">
17 <text class="label">交易流水号</text> 17 <text class="label">交易流水号</text>
18 <text class="value">{{ orderInfo.tradeNo || '--' }}</text> 18 <text class="value">{{ orderInfo.tradeNo || '--' }}</text>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 <text class="label">订单金额</text> 25 <text class="label">订单金额</text>
26 <text class="value amount">{{ orderInfo.price ? orderInfo.price + '元' : '--' }}</text> 26 <text class="value amount">{{ orderInfo.price ? orderInfo.price + '元' : '--' }}</text>
27 </view> 27 </view>
28 </view> 28 </view> -->
29 29
30 <!-- 确定按钮(渐变+动效) --> 30 <!-- 确定按钮(渐变+动效) -->
31 <view class="confirm-btn-area"> 31 <view class="confirm-btn-area">
...@@ -58,14 +58,14 @@ ...@@ -58,14 +58,14 @@
58 } 58 }
59 59
60 onLoad(async (option) => { 60 onLoad(async (option) => {
61 if (option.orderId) { 61 // if (option.orderId) {
62 const [err, res] = await to(api.getOrderInfo(option.orderId)) 62 // const [err, res] = await to(api.getOrderInfo(option.orderId))
63 if (!err && res.data) { 63 // if (!err && res.data) {
64 orderInfo.value = res.data 64 // orderInfo.value = res.data
65 } else { 65 // } else {
66 orderInfo.value.orderId = option.orderId 66 // orderInfo.value.orderId = option.orderId
67 } 67 // }
68 } 68 // }
69 }) 69 })
70 </script> 70 </script>
71 71
......
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
201 201
202 // 协会树 202 // 协会树
203 const assoList = ref([]) 203 const assoList = ref([])
204 const assoFullName = ref('') // 协会完整路径名称
204 205
205 // 步骤相关 206 // 步骤相关
206 const active = ref(0) 207 const active = ref(0)
...@@ -255,18 +256,36 @@ ...@@ -255,18 +256,36 @@
255 // 获取详情 256 // 获取详情
256 function getDetail() { 257 function getDetail() {
257 api.getMyOwnMemberInfo().then(res => { 258 api.getMyOwnMemberInfo().then(res => {
258 if (res.data.memberInfo) { 259 // if (res.data.memberInfo) {
259 Object.assign(form.value, res.data.memberInfo) 260 // Object.assign(form.value, res.data.memberInfo)
260 } 261 // }
262 form.value = { ...res.data.dept, ...res.data.memberInfo }
261 authenticationStatusa.value = res.data.authenticationStatus 263 authenticationStatusa.value = res.data.authenticationStatus
262 result.value = res.data.result 264 result.value = res.data.result
263 265
264 // 处理地址 266 // 处理地址 - 需要用对象数组格式
265 coordinates1.value = [] 267 coordinates1.value = []
266 if (form.value.provinceId) coordinates1.value.push(form.value.provinceId) 268 if (form.value.provinceId) coordinates1.value.push(form.value.provinceId)
267 if (form.value.cityId) coordinates1.value.push(form.value.cityId) 269 if (form.value.cityId) coordinates1.value.push(form.value.cityId)
268 if (form.value.regionId) coordinates1.value.push(form.value.regionId) 270 if (form.value.regionId) coordinates1.value.push(form.value.regionId)
269 271
272 // 处理协会 - 设置完整路径名称
273 if (form.value.parentId) {
274 // 尝试从协会树中查找完整路径
275 const result = findAssoNodeWithPath(assoList.value, form.value.parentId, [])
276 if (result) {
277 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id })))
278 } else {
279 // 如果树还没加载完,延迟设置
280 setTimeout(() => {
281 const res = findAssoNodeWithPath(assoList.value, form.value.parentId, [])
282 if (res) {
283 assoFullName.value = getAssoFullName(res.path.map(id => ({ value: id })))
284 }
285 }, 500)
286 }
287 }
288
270 // 处理身份证 289 // 处理身份证
271 if (form.value.legalIdcPhoto) { 290 if (form.value.legalIdcPhoto) {
272 const photos = form.value.legalIdcPhoto.split(',') 291 const photos = form.value.legalIdcPhoto.split(',')
...@@ -292,12 +311,11 @@ ...@@ -292,12 +311,11 @@
292 btn.value = !result.value 311 btn.value = !result.value
293 } 312 }
294 313
295 creditCode.value = form.value.creditCode 314 creditCode.value = form.value.creditCode
296 legal.value = form.value.legal 315 legal.value = form.value.legal
297 legalIdcCode.value = form.value.legalIdcCode 316 legalIdcCode.value = form.value.legalIdcCode
298 coordinates1.value = form.value.provinceId 317 coordinates1.value = form.value.provinceId
299 adress.value = form.value.adress 318 adress.value = form.value.adress
300 form.value.deptType = res.data.dept.deptType
301 form.value.name = form.value.baseName 319 form.value.name = form.value.baseName
302 }) 320 })
303 } 321 }
...@@ -334,6 +352,12 @@ ...@@ -334,6 +352,12 @@
334 isBlack: 0 352 isBlack: 0
335 }).then(res => { 353 }).then(res => {
336 assoList.value = res.data.map(item => formatTree(item)) 354 assoList.value = res.data.map(item => formatTree(item))
355 // 树加载完成后,如果有parentId,设置完整路径名称
356 if (form.value.parentId) {
357 setTimeout(() => {
358 restoreAssoFullName()
359 }, 100)
360 }
337 }) 361 })
338 } 362 }
339 363
...@@ -349,6 +373,34 @@ ...@@ -349,6 +373,34 @@
349 return result 373 return result
350 } 374 }
351 375
376 // 恢复协会完整路径名称
377 function restoreAssoFullName() {
378 if (!form.value.parentId || !assoList.value || assoList.value.length === 0) {
379 return
380 }
381 // 查找节点及其路径
382 const result = findAssoNodeWithPath(assoList.value, form.value.parentId, [])
383 if (result) {
384 // 使用路径数组重建完整名称
385 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id })))
386 }
387 }
388
389 // 查找协会节点及其父路径
390 function findAssoNodeWithPath(list, targetId, currentPath) {
391 for (const item of list) {
392 const newPath = [...currentPath, item.value]
393 if (item.value === targetId) {
394 return { node: item, path: newPath }
395 }
396 if (item.children && item.children.length > 0) {
397 const found = findAssoNodeWithPath(item.children, targetId, newPath)
398 if (found) return found
399 }
400 }
401 return null
402 }
403
352 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID) 404 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID)
353 function changCase(e) { 405 function changCase(e) {
354 const valueArr = e.detail?.value || e; 406 const valueArr = e.detail?.value || e;
...@@ -356,6 +408,8 @@ ...@@ -356,6 +408,8 @@
356 const lastNode = valueArr[valueArr.length - 1]; 408 const lastNode = valueArr[valueArr.length - 1];
357 form.value.parentId = lastNode?.value || ''; 409 form.value.parentId = lastNode?.value || '';
358 console.log('最终提交的parentId:', form.value.parentId); 410 console.log('最终提交的parentId:', form.value.parentId);
411 assoFullName.value = getAssoFullName(valueArr)
412 console.log('协会完整路径:', assoFullName.value);
359 } 413 }
360 414
361 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式) 415 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式)
...@@ -564,7 +618,7 @@ ...@@ -564,7 +618,7 @@
564 cityId: form.value.cityId.value, 618 cityId: form.value.cityId.value,
565 provinceId: form.value.provinceId.value, 619 provinceId: form.value.provinceId.value,
566 adress: form.value.adress, 620 adress: form.value.adress,
567 deptType: form.value.deptType, 621 deptType: app.globalData.deptType,
568 legalIdcPhoto: [form.value.legalIdcPhoto1, form.value.legalIdcPhoto2].join(','), 622 legalIdcPhoto: [form.value.legalIdcPhoto1, form.value.legalIdcPhoto2].join(','),
569 applyPoints: '0', 623 applyPoints: '0',
570 siteContact: form.value.siteContact, 624 siteContact: form.value.siteContact,
...@@ -577,8 +631,11 @@ ...@@ -577,8 +631,11 @@
577 uni.showToast({ title: '提交成功', duration: 1500, icon: 'success' }) 631 uni.showToast({ title: '提交成功', duration: 1500, icon: 'success' })
578 // 跳转缴费页面 632 // 跳转缴费页面
579 setTimeout(() => { 633 setTimeout(() => {
634 const assoName = assoFullName.value
635 console.log(888,assoName)
636 // 跳转到缴费页面
580 uni.navigateTo({ 637 uni.navigateTo({
581 url: '/myCenter/goPay' 638 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}`
582 }) 639 })
583 }, 1500) 640 }, 1500)
584 } else { 641 } else {
...@@ -727,12 +784,57 @@ ...@@ -727,12 +784,57 @@
727 }) 784 })
728 return 785 return
729 } 786 }
787 // 使用完整的协会路径名称
788 const assoName = assoFullName.value || getAssoName(form.value.parentId)
730 // 跳转到缴费页面 789 // 跳转到缴费页面
731 uni.navigateTo({ 790 uni.navigateTo({
732 url: '/myCenter/goPay' 791 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}`
733 }) 792 })
734 } 793 }
735 794
795 // 根据协会ID获取协会名称(只获取最后一级)
796 function getAssoName(parentId) {
797 if (!parentId || !assoList.value || assoList.value.length === 0) {
798 return ''
799 }
800 // 递归查找协会名称
801 function findInTree(list) {
802 for (const item of list) {
803 if (item.value === parentId) {
804 return item.text || ''
805 }
806 if (item.children && item.children.length > 0) {
807 const found = findInTree(item.children)
808 if (found) return found
809 }
810 }
811 return null
812 }
813 return findInTree(assoList.value) || ''
814 }
815
816 // 根据选择的值数组获取完整的协会路径名称
817 function getAssoFullName(valueArr) {
818 if (!valueArr || valueArr.length === 0 || !assoList.value || assoList.value.length === 0) {
819 return ''
820 }
821 const pathNames = []
822 let currentList = assoList.value
823 for (let i = 0; i < valueArr.length; i++) {
824 const node = valueArr[i]
825 const found = currentList.find(item => item.value === node?.value || item.value === node)
826 if (found) {
827 pathNames.push(found.text || found.label || '')
828 if (found.children) {
829 currentList = found.children
830 }
831 } else {
832 break
833 }
834 }
835 return pathNames.join('/')
836 }
837
736 // 去认证 - 提交认证信息 838 // 去认证 - 提交认证信息
737 function doCertification() { 839 function doCertification() {
738 submitStep2() 840 submitStep2()
...@@ -770,8 +872,9 @@ ...@@ -770,8 +872,9 @@
770 width: 48rpx; 872 width: 48rpx;
771 height: 48rpx; 873 height: 48rpx;
772 border-radius: 50%; 874 border-radius: 50%;
773 background: rgba(173, 24, 31, 0.3); 875 background: #fff;
774 color: #AD181F; 876 border: 2rpx solid #999;
877 color: #999;
775 font-size: 24rpx; 878 font-size: 24rpx;
776 display: flex; 879 display: flex;
777 align-items: center; 880 align-items: center;
...@@ -787,8 +890,9 @@ ...@@ -787,8 +890,9 @@
787 } 890 }
788 891
789 &.active .step-circle { 892 &.active .step-circle {
790 background: #AD181F; 893 background: #fff;
791 color: #fff; 894 color: #AD181F;
895 border-color: #AD181F;
792 } 896 }
793 897
794 &.active .step-text { 898 &.active .step-text {
...@@ -835,7 +939,6 @@ ...@@ -835,7 +939,6 @@
835 align-items: center; 939 align-items: center;
836 justify-content: space-between; 940 justify-content: space-between;
837 padding: 20rpx 0; 941 padding: 20rpx 0;
838 border-bottom: 1rpx solid #eee;
839 margin-bottom: 20rpx; 942 margin-bottom: 20rpx;
840 } 943 }
841 944
...@@ -1087,6 +1190,9 @@ ...@@ -1087,6 +1190,9 @@
1087 overflow: hidden; 1190 overflow: hidden;
1088 text-overflow: ellipsis; 1191 text-overflow: ellipsis;
1089 } 1192 }
1193 :deep(.selected-list) {
1194 justify-content: start;
1195 }
1090 1196
1091 /* 修复高度统一 */ 1197 /* 修复高度统一 */
1092 .custom-picker { 1198 .custom-picker {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!