Compare commits
4
Commits
d1e87498f5
...
3049b2a1b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3049b2a1b9 | ||
|
|
59dfd5897c | ||
|
|
5777fbf9ea | ||
|
|
69a42cd6fc |
+3
-1
@@ -1,7 +1,9 @@
|
||||
// xuchao: 账号级本地缓存集中管理。权益页首屏会读这些缓存做兜底展示,
|
||||
// 换账号/退出时漏清就会把上一个账号的中奖状态、卡号、到期时间当成当前账号的数据展示。
|
||||
// xuchao: loginWay 记录登录方式(ysf=云闪付免密 / sms=手机验证码)——付款码仅对免密登录开放,
|
||||
// 换账号/退出后必须清掉,否则会把上个账号的免密状态带给新账号
|
||||
const ACCOUNT_KEYS = ['token', 'phone', 'isAuth', 'hasWin', 'cardNumber', 'expiresTime',
|
||||
'rightsCount', 'totalValueFen', 'authFlowStarted', 'authName', 'authIdNo']
|
||||
'rightsCount', 'totalValueFen', 'authFlowStarted', 'authName', 'authIdNo', 'loginWay']
|
||||
|
||||
export default {
|
||||
// 清空当前账号的本地会话与权益缓存(定位 lng/lat 属于设备信息,不在此列)
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<view class="hfb-item" v-if="districtReady" :class="{ 'hfb-item--on': !!districtId }" @click="toggle('district')">
|
||||
<text class="hfb-text">{{ districtText }}</text>
|
||||
<view class="hfb-caret" :class="{ 'hfb-caret--up': openKey === 'district' }">
|
||||
<u-icon name="arrow-down-fill" size="20" :color="districtId ? '#0088ff' : '#bbbbbb'"></u-icon>
|
||||
<u-icon name="arrow-down-fill" size="20" :color="districtId ? '#E0342B' : '#bbbbbb'"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hfb-item" v-if="categoryReady" :class="{ 'hfb-item--on': !!category }" @click="toggle('category')">
|
||||
<text class="hfb-text">{{ categoryText }}</text>
|
||||
<view class="hfb-caret" :class="{ 'hfb-caret--up': openKey === 'category' }">
|
||||
<u-icon name="arrow-down-fill" size="20" :color="category ? '#0088ff' : '#bbbbbb'"></u-icon>
|
||||
<u-icon name="arrow-down-fill" size="20" :color="category ? '#E0342B' : '#bbbbbb'"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -132,7 +132,7 @@
|
||||
}
|
||||
|
||||
.hfb-item--on {
|
||||
color: #0088ff;
|
||||
color: #E0342B;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
|
||||
.hfb-opt--sel {
|
||||
background: #e6f2ff;
|
||||
color: #0088ff;
|
||||
color: #E0342B;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ export default {
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
font-size: 13px;
|
||||
padding: 3px 10px;
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
// 就会变成 Bearer [object Object],把所有鉴权接口全打挂
|
||||
const issued = typeof res.data.accessToken === 'string' ? res.data.accessToken : ''
|
||||
if (issued) uni.setStorageSync('token', issued)
|
||||
// xuchao: 标记本次会话为云闪付免密登录——商户详情付款码按此放行
|
||||
uni.setStorageSync('loginWay', 'ysf')
|
||||
this.$u.api.getEligibility({ phone: res.data.mobile, identityNo: res.data.idNo || '', name: res.data.name || '' }).then(eRes => {
|
||||
if (eRes.errcode === 0) {
|
||||
uni.setStorageSync('isAuth', eRes.data.isAuth)
|
||||
|
||||
@@ -131,6 +131,8 @@ export default {
|
||||
const issued = [payload.accessToken, payload.token].find(v => typeof v === 'string' && v.length > 0)
|
||||
uni.setStorageSync('token', issued || '')
|
||||
uni.setStorageSync('phone', this.phone)
|
||||
// xuchao: 标记登录方式为手机验证码——付款码仅放行云闪付免密登录(ysf),验证码登录会被引导
|
||||
uni.setStorageSync('loginWay', 'sms')
|
||||
this.$u.api.getEligibility({ phone: this.phone, identityNo: '', name: '' }).then(eRes => {
|
||||
if (eRes.errcode === 0) {
|
||||
uni.setStorageSync('isAuth', eRes.data.isAuth)
|
||||
@@ -242,7 +244,7 @@ export default {
|
||||
|
||||
.code-btn {
|
||||
font-size: 26rpx;
|
||||
color: #0088FF;
|
||||
color: #E0342B;
|
||||
padding: 0 24rpx;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
@@ -257,7 +259,7 @@ export default {
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
background-color: #0088FF;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
@@ -275,7 +277,7 @@ export default {
|
||||
.checkbox {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border: 2rpx solid #0088FF;
|
||||
border: 2rpx solid #E8542F;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -285,7 +287,7 @@ export default {
|
||||
}
|
||||
|
||||
.checkbox.checked {
|
||||
background-color: #0088FF;
|
||||
background-color: #E8542F;
|
||||
}
|
||||
|
||||
.check-icon {
|
||||
@@ -300,7 +302,7 @@ export default {
|
||||
|
||||
.agreement-link {
|
||||
font-size: 24rpx;
|
||||
color: #0088FF;
|
||||
color: #E0342B;
|
||||
}
|
||||
|
||||
/* xuchao: 顶部返回导航条(负外边距抵消页面左右 padding,通栏展示) */
|
||||
|
||||
@@ -282,7 +282,7 @@ export default {
|
||||
.section-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
@@ -314,8 +314,8 @@ export default {
|
||||
}
|
||||
|
||||
.date-card.active {
|
||||
background-color: #0088ff;
|
||||
border-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
border-color: #E8542F;
|
||||
}
|
||||
|
||||
.date-card.disabled {
|
||||
@@ -380,8 +380,8 @@ export default {
|
||||
}
|
||||
|
||||
.time-slot-card.active {
|
||||
background-color: #0088ff;
|
||||
border-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
border-color: #E8542F;
|
||||
}
|
||||
|
||||
.slot-name {
|
||||
@@ -422,7 +422,7 @@ export default {
|
||||
|
||||
.discount-tag-icon {
|
||||
font-size: 16px;
|
||||
color: #0088ff;
|
||||
color: #E0342B;
|
||||
}
|
||||
|
||||
.discount-title {
|
||||
@@ -461,7 +461,7 @@ export default {
|
||||
}
|
||||
|
||||
.book-btn {
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -648,7 +648,7 @@
|
||||
.title-bar {
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
border-radius: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
@@ -710,7 +710,7 @@
|
||||
|
||||
.auth-btn {
|
||||
margin: 24px 0;
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
@@ -739,7 +739,7 @@
|
||||
|
||||
/* 权益信息 - 蓝色横幅 */
|
||||
.banner-area {
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
padding: 80px 16px 96px;
|
||||
border-radius: 0 0 50px 50px;
|
||||
}
|
||||
@@ -764,7 +764,7 @@
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: #ffffff;
|
||||
color: #0088ff;
|
||||
color: #E0342B;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 18px;
|
||||
@@ -876,7 +876,7 @@
|
||||
transform: translateX(-50%);
|
||||
width: 24px;
|
||||
height: 3px;
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
@@ -886,7 +886,7 @@
|
||||
}
|
||||
|
||||
.tab-item.active .tab-text {
|
||||
color: #0088ff;
|
||||
color: #E0342B;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
+15
-21
@@ -146,35 +146,21 @@
|
||||
else uni.reLaunch({ url: '/pages/index/index' })
|
||||
},
|
||||
// xuchao: 付款码——对齐 ysf 项目首页做法:upsdk.qrCodePay() 由云闪付容器原生拉起付款码,无 web 跳转。
|
||||
// SDK 加载复用加油页验证过的注入模式;非云闪付环境(微信/普通浏览器)给使用引导。
|
||||
// SDK 加载复用加油页验证过的注入模式;拉不起的场景(非容器/加载失败/非免密登录)统一弹 payGuide
|
||||
onPayCode() {
|
||||
this.loadUpSdk().then(ready => {
|
||||
if (!ready) {
|
||||
uni.showModal({
|
||||
title: '请在云闪付App内使用',
|
||||
content: '付款码需在云闪付App中打开本页面后使用:打开云闪付App → 搜索怀化社保卡活动进入 → 点击付款码。',
|
||||
showCancel: false,
|
||||
confirmText: '知道了'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!ready) { this.payGuide(); return }
|
||||
try {
|
||||
// xuchao: 微信等普通浏览器里 upsdk 脚本能加载但桥永不就绪,pluginReady 回调不到;
|
||||
// 3 秒无响应即判定非云闪付容器,给使用引导(容器内通常 <1s 已拉起付款码)
|
||||
// 3 秒无响应即判定非云闪付容器(容器内通常 <1s 已拉起付款码)
|
||||
let bridged = false
|
||||
const timer = setTimeout(() => {
|
||||
if (!bridged) {
|
||||
uni.showModal({
|
||||
title: '请在云闪付App内使用',
|
||||
content: '付款码需在云闪付App中打开本页面后使用:打开云闪付App → 搜索怀化社保卡活动进入 → 点击付款码。',
|
||||
showCancel: false,
|
||||
confirmText: '知道了'
|
||||
})
|
||||
}
|
||||
}, 3000)
|
||||
const timer = setTimeout(() => { if (!bridged) this.payGuide() }, 3000)
|
||||
window.upsdk.pluginReady(() => {
|
||||
bridged = true
|
||||
clearTimeout(timer)
|
||||
// xuchao: 付款码依赖云闪付账号与社保卡的绑定关系——只对免密登录(ysf)会话开放;
|
||||
// 验证码登录/未登录时容器钱包账号与本活动身份可能不一致,提示而不是拉起
|
||||
if (uni.getStorageSync('loginWay') !== 'ysf') { this.payGuide(); return }
|
||||
try { window.upsdk.qrCodePay() }
|
||||
catch (e) { uni.showToast({ title: '拉起付款码失败,请重试', icon: 'none' }) }
|
||||
})
|
||||
@@ -183,6 +169,14 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// xuchao: 付款码不可用时的统一提示(运营定稿文案;按反馈改为轻提示两行显示,不用确认弹窗)
|
||||
payGuide() {
|
||||
uni.showToast({
|
||||
title: '暂时无法使用付款码\n请登录云闪付 app 打开付款码进行使用',
|
||||
icon: 'none',
|
||||
duration: 2500
|
||||
})
|
||||
},
|
||||
// xuchao: upsdk 运行时注入并返回就绪 Promise(与 petrol/orderConfirm 同一模式,全局只注入一次;
|
||||
// 不能依赖 index.html 静态标签——HBuilderX 构建的 H5 模板不吃根 index.html)
|
||||
loadUpSdk(timeout = 9000) {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- 商户电话(取商铺客服电话字段,多个用,分隔,点击拨号) -->
|
||||
<view class="discount-section" v-if="servicePhoneList.length">
|
||||
<view class="section-title">
|
||||
<u-icon name="phone-fill" color="#1296DB" size="34"></u-icon>
|
||||
<u-icon name="phone-fill" color="#E0342B" size="34"></u-icon>
|
||||
<text class="discount-title">商户电话</text>
|
||||
</view>
|
||||
<view class="discount-list">
|
||||
@@ -337,7 +337,7 @@ export default {
|
||||
|
||||
.discount-tag-icon {
|
||||
font-size: 16px;
|
||||
color: #0088ff;
|
||||
color: #E0342B;
|
||||
}
|
||||
|
||||
.discount-title {
|
||||
@@ -360,7 +360,7 @@ export default {
|
||||
|
||||
/* xuchao: 可点击拨号的电话样式 */
|
||||
.phone-link {
|
||||
color: #0088ff;
|
||||
color: #E0342B;
|
||||
}
|
||||
|
||||
/* xuchao: 石油汽油券购买模块 */
|
||||
@@ -374,7 +374,7 @@ export default {
|
||||
.voucher-ticket {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(135deg, #0d6fe0, #2f9bff);
|
||||
background: linear-gradient(135deg, #D8431F, #F0703C);
|
||||
border-radius: 8px;
|
||||
padding: 14px;
|
||||
color: #ffffff;
|
||||
@@ -389,7 +389,7 @@ export default {
|
||||
height: 42px;
|
||||
margin-top: 12px;
|
||||
border-radius: 8px;
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
font-size: 15px;
|
||||
display: flex;
|
||||
|
||||
@@ -219,7 +219,7 @@ export default {
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
padding: 4px 10px;
|
||||
|
||||
@@ -282,7 +282,7 @@ export default {
|
||||
}
|
||||
|
||||
.banner-title {
|
||||
color: #0D387D;
|
||||
color: #C0301B;
|
||||
font-weight: 700;
|
||||
font-size: 32px;
|
||||
line-height: normal;
|
||||
@@ -306,7 +306,7 @@ export default {
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(-135deg, #4981D2 0%, #1853AF 100%);
|
||||
background: linear-gradient(-135deg, #E8542F 0%, #C0301B 100%);
|
||||
}
|
||||
|
||||
.stats-gift {
|
||||
@@ -371,7 +371,7 @@ export default {
|
||||
|
||||
.tab-item.active .tab-label,
|
||||
.tab-item.active .tab-date {
|
||||
color: #3d85ff;
|
||||
color: #E0342B;
|
||||
}
|
||||
|
||||
.tab-indicator {
|
||||
@@ -379,7 +379,7 @@ export default {
|
||||
bottom: 0;
|
||||
width: 24px;
|
||||
height: 4px;
|
||||
background-color: #3d85ff;
|
||||
background-color: #E0342B;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ export default {
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
background-color: #0088ff;
|
||||
background-color: #E8542F;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
padding: 4px 10px;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/* 行为相关颜色 */
|
||||
@import 'uview-ui/theme.scss';
|
||||
$uni-color-primary: #007aff;
|
||||
$uni-color-primary: #E8542F;
|
||||
$uni-color-success: #4cd964;
|
||||
$uni-color-warning: #f0ad4e;
|
||||
$uni-color-error: #dd524d;
|
||||
|
||||
+4
-4
@@ -9,10 +9,10 @@ $u-light-color: #c0c4cc;
|
||||
$u-border-color: #e4e7ed;
|
||||
$u-bg-color: #f3f4f6;
|
||||
|
||||
$u-type-primary: #2979ff;
|
||||
$u-type-primary-light: #ecf5ff;
|
||||
$u-type-primary-disabled: #a0cfff;
|
||||
$u-type-primary-dark: #2b85e4;
|
||||
$u-type-primary: #E8542F;
|
||||
$u-type-primary-light: #FDEFEA;
|
||||
$u-type-primary-disabled: #F5B8A3;
|
||||
$u-type-primary-dark: #D8431F;
|
||||
|
||||
$u-type-warning: #ff9900;
|
||||
$u-type-warning-disabled: #fcbd71;
|
||||
|
||||
Reference in New Issue
Block a user