c9bf47f3 by lttnew

6.5 认证重新排版

1 parent e28234aa
...@@ -1570,14 +1570,15 @@ export function creditCodeExist(code) { ...@@ -1570,14 +1570,15 @@ export function creditCodeExist(code) {
1570 } 1570 }
1571 1571
1572 // 生成单位订单renewYear 1572 // 生成单位订单renewYear
1573 export function certifiedNew(data) { 1573 export function certifiedNew(data) {
1574 let url = '/system/certifiedNew/commit' 1574 let url = '/system/certifiedNew/commit'
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.contactPerson) params.push(`contactPerson=${data.contactPerson}`) 1578 if (data.payType) params.push(`payType=${data.payType}`)
1579 if (data.contactTel) params.push(`contactTel=${data.contactTel}`) 1579 if (data.contactPerson) params.push(`contactPerson=${data.contactPerson}`)
1580 if (params.length > 0) { 1580 if (data.contactTel) params.push(`contactTel=${data.contactTel}`)
1581 if (params.length > 0) {
1581 url += '?' + params.join('&') 1582 url += '?' + params.join('&')
1582 } 1583 }
1583 return request({ 1584 return request({
......
...@@ -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({})
...@@ -120,11 +127,13 @@ const preferentialData = ref({ ...@@ -120,11 +127,13 @@ const preferentialData = ref({
120 }) 127 })
121 const payType = ref('2') 128 const payType = ref('2')
122 const isPaying = ref(false) 129 const isPaying = ref(false)
123 const payName = ref('') 130 const payName = ref('')
124 const assoName = ref('') 131 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,19 +176,55 @@ const fillPayDisplayInfo = (data = {}, content = {}, option = {}) => { ...@@ -172,19 +176,55 @@ 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) {
183 return (total - memberFee.value).toFixed(2)
184 }
185 return total.toFixed(2)
186 }) 222 })
187 223
224 const preferentialModalContent = computed(() => {
225 return `根据中国跆协${preferentialData.value.name || '优惠'}政策减免一年费用,每个单位在政策有效期内只享受一次。`
226 })
227
188 // 年限减 228 // 年限减
189 const minusYear = () => { 229 const minusYear = () => {
190 if (form.value.renewYear > 1) { 230 if (form.value.renewYear > 1) {
...@@ -205,16 +245,16 @@ const onPayTypeChange = (e) => { ...@@ -205,16 +245,16 @@ 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'
212 }) 252 })
213 return 253 return
214 } 254 }
215 255
216 // 对公转账校验 256 // 对公转账校验
217 if (payType.value === '3') { 257 if (payType.value === '3') {
218 if (!form.value.contactPerson) { 258 if (!form.value.contactPerson) {
219 uni.showToast({ 259 uni.showToast({
220 title: '请输入联系人', 260 title: '请输入联系人',
...@@ -267,12 +307,13 @@ const handelPay = async () => { ...@@ -267,12 +307,13 @@ const handelPay = async () => {
267 } 307 }
268 data = res.data 308 data = res.data
269 } else { 309 } else {
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,
273 type: payType.value, 313 payType: payType.value,
274 contactPerson: form.value.contactPerson, 314 type: payType.value,
275 contactTel: form.value.contactTel 315 contactPerson: form.value.contactPerson,
316 contactTel: form.value.contactTel
276 })) 317 }))
277 if (err || res.code !== 200) { 318 if (err || res.code !== 200) {
278 uni.hideLoading() 319 uni.hideLoading()
...@@ -283,12 +324,12 @@ const handelPay = async () => { ...@@ -283,12 +324,12 @@ const handelPay = async () => {
283 }) 324 })
284 return 325 return
285 } 326 }
286 data = res.data 327 data = res.data
287 } 328 }
288 markPerfectNeedRefresh() 329 markPerfectNeedRefresh()
289 330
290 // 无需支付,直接成功 331 // 无需支付,直接成功
291 if (data.payFlag == 0) { 332 if (data.payFlag == 0) {
292 uni.hideLoading() 333 uni.hideLoading()
293 isPaying.value = false 334 isPaying.value = false
294 uni.redirectTo({ 335 uni.redirectTo({
...@@ -306,8 +347,7 @@ const handelPay = async () => { ...@@ -306,8 +347,7 @@ const handelPay = async () => {
306 }) 347 })
307 return 348 return
308 } 349 }
309 350 // 民生支付
310 // 民生支付
311 if (data.payResult && data.payResult.encryptedData) { 351 if (data.payResult && data.payResult.encryptedData) {
312 uni.hideLoading() 352 uni.hideLoading()
313 try { 353 try {
...@@ -328,10 +368,10 @@ const handelPay = async () => { ...@@ -328,10 +368,10 @@ const handelPay = async () => {
328 isPaying.value = false 368 isPaying.value = false
329 } 369 }
330 370
331 onLoad((option) => { 371 onLoad((option) => {
332 console.log(66, option) 372 console.log(66, option)
333 sourcePage.value = option.source || '' 373 sourcePage.value = option.source || ''
334 fillPayDisplayInfo({}, {}, option) 374 fillPayDisplayInfo({}, {}, option)
335 // 接收订单ID(再次支付时) 375 // 接收订单ID(再次支付时)
336 if (option.orderId) { 376 if (option.orderId) {
337 payForm.value.id = option.orderId 377 payForm.value.id = option.orderId
...@@ -351,13 +391,13 @@ onLoad((option) => { ...@@ -351,13 +391,13 @@ onLoad((option) => {
351 } 391 }
352 // 初始化获取费用和优惠 392 // 初始化获取费用和优惠
353 init() 393 init()
354 }) 394 })
355 395
356 function markPerfectNeedRefresh() { 396 function markPerfectNeedRefresh() {
357 if (sourcePage.value === 'perfect') { 397 if (sourcePage.value === 'perfect') {
358 uni.setStorageSync(PERFECT_PAY_REFRESH_KEY, '1') 398 uni.setStorageSync(PERFECT_PAY_REFRESH_KEY, '1')
359 } 399 }
360 } 400 }
361 401
362 // 初始化接口 402 // 初始化接口
363 async function init() { 403 async function init() {
...@@ -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;
......
...@@ -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;
......
...@@ -9,38 +9,25 @@ ...@@ -9,38 +9,25 @@
9 </view> 9 </view>
10 <view class="pdbox"> 10 <view class="pdbox">
11 11
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 class="flexbox" style="flex: 1 1 auto;"> 16 <view v-if="isNormalMember(n)" class="normal-corner">正常会员</view>
17 <view class="photobox"> 17 <view class="flexbox" style="flex: 1 1 auto;">
18 <image class="photo" v-if="n.photo" :src="n.photo" mode='aspectFill'></image> 18 <view class="photobox">
19 <view class="colorful" v-else>{{n.name.slice(0,1)}}</view> 19 <image class="photo" v-if="n.photo" :src="n.photo" mode='aspectFill'></image>
20 </view> 20 <view class="colorful" v-else>{{n.name.slice(0,1)}}</view>
21 <view> 21 </view>
22 {{n.name}} <text class="date">({{n.perCode}})</text> 22 <view class="member-info">
23 </view> 23 <view class="member-name">
24 </view> 24 {{n.name}} <text class="date">({{n.perCode || '--'}})</text>
25 <view class="flexbox" style="flex:0 0 auto"> 25 </view>
26 <text v-if="n.certStage==0" class="text-primary"> 26 <view class="validity-line">有效期:{{ formatValidityDate(n.validityDate) }}</view>
27 新会员 27 </view>
28 </text> 28 </view>
29 <text v-if="n.certStage==1" class="text-warning"> 29
30 待提交 30 </view>
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>
42
43 </view>
44 <template v-slot:right> 31 <template v-slot:right>
45 <view class="slot-button"> 32 <view class="slot-button">
46 <!-- <view class="edit-button" @click="handleUpdate(n)"> 33 <!-- <view class="edit-button" @click="handleUpdate(n)">
...@@ -160,11 +147,19 @@ ...@@ -160,11 +147,19 @@
160 }) 147 })
161 } 148 }
162 149
163 function handleInfo(n) { 150 function handleInfo(n) {
164 uni.navigateTo({ 151 uni.navigateTo({
165 url: `/personalVip/detail?perId=${n.perId}` 152 url: `/personalVip/detail?perId=${n.perId}`
166 }) 153 })
167 } 154 }
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 }
168 163
169 function goVipList() { 164 function goVipList() {
170 let path = '/personalVip/addVip'; 165 let path = '/personalVip/addVip';
...@@ -202,10 +197,44 @@ ...@@ -202,10 +197,44 @@
202 } 197 }
203 } 198 }
204 199
205 .content-box {
206 background: #fff;
207 .photobox{margin-right: 20rpx;
208 }
209 }
210 .pdbox{padding: 0 20rpx;}
211 </style>
...\ No newline at end of file ...\ No newline at end of file
200 .content-box {
201 position: relative;
202 background: #fff;
203 overflow: hidden;
204 .photobox{margin-right: 20rpx;
205 }
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 }
239 .pdbox{padding: 0 20rpx;}
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!