| | |
| | | <view class="card-decoration"></view> |
| | | <view class="talent-head"><text class="talent-name">{{customerName}}</text><text class="talent-level">{{cardLevel}}</text></view> |
| | | <text class="talent-mobile">{{displayMobile(customerMobile)}}</text> |
| | | <view class="current-benefit"><text class="benefit-label">当前权益</text><text class="benefit-text">免费入住{{totalCount}}天</text></view> |
| | | <view class="current-benefit"><text class="benefit-label">当前权益</text><text class="benefit-text">免费入住{{totalCount}}天</text><text v-if="discountText.length > 0" class="benefit-text benefit-extra">超过天数{{discountText}}</text></view> |
| | | </view> |
| | | <view class="method-card"> |
| | | <text class="section-label">优惠方式</text> |
| | |
| | | success: (modal: any) => { |
| | | if (!modal.confirm) return |
| | | submitting.value = true |
| | | confirmVerificationCode(verificationId.value, 'merchant-free-stay-' + verificationId.value + '-' + Date.now(), (_result: any, _traceId: string) => { |
| | | confirmVerificationCode(verificationId.value, 'merchant-free-stay-' + verificationId.value + '-' + Date.now(), (result: any, _traceId: string) => { |
| | | submitting.value = false |
| | | uni.redirectTo({ url: '/pages/verification-success/verification-success?orderNo=' + encodeURIComponent('免费入住券') }) |
| | | const verifyNo = result != null && result.verifyNo != null ? '' + result.verifyNo : '' |
| | | uni.redirectTo({ url: '/pages/verification-success/verification-success?orderNo=' + encodeURIComponent(verifyNo) + '&credentialType=FREE_STAY_CODE' }) |
| | | }, (error: any) => { |
| | | submitting.value = false |
| | | uni.showToast({ title: error != null && error.message != null ? '' + error.message : '核销失败,请重试', icon: 'none' }) |
| | |
| | | customerMobile.value = textOption(options, 'customerMobile', '') |
| | | cardLevel.value = textOption(options, 'cardLevel', '人才卡') |
| | | totalCount.value = Math.max(Number(textOption(options, 'freeStayTotalCount', '5')), 1) |
| | | discountText.value = parseDiscount(textOption(options, 'benefitText', '')) |
| | | // 优先用服务端按门店到店消费折扣算出来的文案;老版本没带这个参数时,仍从权益文案里兜底解析。 |
| | | discountText.value = textOption(options, 'discountText', '') |
| | | if (discountText.value.length == 0) discountText.value = parseDiscount(textOption(options, 'benefitText', '')) |
| | | if (verificationId.value.length == 0) loadError.value = '核销凭证无效,请返回重新扫码' |
| | | }) |
| | | </script> |
| | |
| | | page { background-color: #F7F8FA; } |
| | | .page { display: flex; width: 100%; height: 100vh; flex-direction: column; overflow: hidden; background-color: #F7F8FA; } |
| | | .navigation-bar { display: flex; height: 174rpx; flex: none; justify-content: center; align-items: flex-end; padding-bottom: 25rpx; box-sizing: border-box; position: relative; } |
| | | .navigation-title { color: #1F2937; font-size: 35rpx; line-height: 49rpx; font-weight: 700; } |
| | | /* 标题绝对定位居中:bottom 取值让标题中线与返回按钮/胶囊中线对齐(与核销输入页保持一致)。 */ |
| | | .navigation-title { position: absolute; right: 0; bottom: 30rpx; left: 0; z-index: 1; color: #1F2937; font-size: 35rpx; line-height: 49rpx; font-weight: 700; text-align: center; } |
| | | .back-button { display: flex; width: 72rpx; height: 72rpx; justify-content: center; align-items: center; position: absolute; top: 82rpx; left: 28rpx; } |
| | | .back-icon { width: 40rpx; height: 40rpx; } |
| | | .content { height: 0; flex: 1; padding: 20rpx 34rpx 0; box-sizing: border-box; } |
| | |
| | | .current-benefit { display: flex; margin-top: 22rpx; flex-direction: row; align-items: center; position: relative; } |
| | | .benefit-label { color: rgba(255, 255, 255, 0.78); font-size: 23rpx; line-height: 33rpx; } |
| | | .benefit-text { margin-left: 18rpx; color: #FFFFFF; font-size: 23rpx; line-height: 33rpx; font-weight: 600; } |
| | | /* 「超过天数门市价X折 / 立减X元」跟在免费额度后面,间隔比标签再大一点。 */ |
| | | .benefit-extra { margin-left: 14rpx; font-weight: 500; } |
| | | .method-card { padding: 31rpx 34rpx; margin-top: 22rpx; border-radius: 30rpx; background-color: #FFFFFF; box-shadow: 0 14rpx 30rpx rgba(57, 67, 80, 0.06); } |
| | | .section-label { display: block; color: #8D99AA; font-size: 27rpx; line-height: 38rpx; } |
| | | .tag-list { display: flex; margin-top: 20rpx; flex-direction: row; flex-wrap: wrap; } |