mirror of
https://gitee.com/liuxioabin/fengketrade.git
synced 2026-04-17 21:03:17 +08:00
'样式调整'
This commit is contained in:
parent
2ecb1eca63
commit
d6f90228c0
@ -216,11 +216,29 @@
|
||||
if (result.code === 1) {
|
||||
console.log('[CCB] 登录成功');
|
||||
|
||||
// 设置token和用户信息
|
||||
sheep.$store('user').setToken(result.data.token);
|
||||
// 获取用户store
|
||||
const userStore = sheep.$store('user');
|
||||
|
||||
// ⭐ 立即同步设置用户信息到store,避免页面显示延迟
|
||||
if (result.data.user_info) {
|
||||
userStore.userInfo = result.data.user_info;
|
||||
console.log('[CCB] 用户信息已同步到store:', result.data.user_info.nickname);
|
||||
}
|
||||
|
||||
// ⭐ 如果后端返回了订单数据,也立即同步(避免页面显示'--')
|
||||
if (result.data.num_data) {
|
||||
userStore.numData = result.data.num_data;
|
||||
console.log('[CCB] 订单数据已同步到store:', result.data.num_data);
|
||||
}
|
||||
|
||||
// 保存到本地存储
|
||||
uni.setStorageSync('userInfo', result.data.user_info);
|
||||
uni.setStorageSync('lastCcbParamSJ', ccbParamSJ);
|
||||
|
||||
// 设置token(这会触发loginAfter异步加载完整数据)
|
||||
// 注意:不使用await,让它在后台加载,不阻塞UI
|
||||
userStore.setToken(result.data.token);
|
||||
|
||||
// 显示欢迎提示
|
||||
uni.showToast({
|
||||
title: `登录成功`,
|
||||
|
||||
@ -321,7 +321,7 @@
|
||||
position: relative;
|
||||
margin-bottom: 120rpx;
|
||||
background: v-bind(headerBg) center/750rpx 100% no-repeat,
|
||||
linear-gradient(115deg, #f44739 0%, #ff6600 100%);
|
||||
linear-gradient(115deg, #0081ff 0%, #4da6ff 100%);
|
||||
border-radius: 0 0 5% 5%;
|
||||
height: 100rpx;
|
||||
|
||||
@ -362,7 +362,7 @@
|
||||
padding: 0 4rpx;
|
||||
margin-left: 16rpx;
|
||||
height: 40rpx;
|
||||
background: linear-gradient(90deg, #ff6000 0%, #fe832a 100%);
|
||||
background: linear-gradient(90deg, #0081ff 0%, #4da6ff 100%);
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.countdown-num {
|
||||
@ -372,7 +372,7 @@
|
||||
color: #ffffff;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: linear-gradient(90deg, #ff6000 0%, #fe832a 100%);
|
||||
background: linear-gradient(90deg, #0081ff 0%, #4da6ff 100%);
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
@ -399,7 +399,7 @@
|
||||
}
|
||||
|
||||
.num {
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
}
|
||||
}
|
||||
|
||||
@ -474,8 +474,8 @@
|
||||
.join-btn {
|
||||
width: 668rpx;
|
||||
height: 70rpx;
|
||||
background: linear-gradient(90deg, #ff6000 0%, #fe832a 100%);
|
||||
box-shadow: 0px 8rpx 6rpx 0px rgba(255, 104, 4, 0.22);
|
||||
background: linear-gradient(90deg, #0081ff 0%, #4da6ff 100%);
|
||||
box-shadow: 0px 8rpx 6rpx 0px rgba(0, 129, 255, 0.22);
|
||||
border-radius: 35rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
|
||||
@ -71,8 +71,9 @@
|
||||
const { screenHeight, safeAreaInsets, screenWidth, safeArea } = sheep.$platform.device;
|
||||
const sys_navBar = sheep.$platform.navbar;
|
||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||
// ⭐ 导航栏已全局隐藏,statusBarHeight和sys_navBar都为0
|
||||
const pageHeight =
|
||||
(safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sys_navBar - 350;
|
||||
(safeArea.height + safeAreaInsets.bottom) * 2 - 350;
|
||||
const headerBg = sheep.$url.css('/assets/addons/shopro/uniapp/goods/groupon-header.png');
|
||||
|
||||
const state = reactive({
|
||||
@ -252,7 +253,7 @@
|
||||
border-radius: 25rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%);
|
||||
background: linear-gradient(90deg, #0081ff 0%, #4da6ff 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -269,8 +269,8 @@
|
||||
.invite-btn {
|
||||
width: 210rpx;
|
||||
height: 66rpx;
|
||||
background: linear-gradient(90deg, #fe832a, #ff6600);
|
||||
box-shadow: 0px 8rpx 6rpx 0px rgba(255, 104, 4, 0.22);
|
||||
background: linear-gradient(90deg, #4da6ff, #0081ff);
|
||||
box-shadow: 0px 8rpx 6rpx 0px rgba(0, 129, 255, 0.22);
|
||||
border-radius: 33rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
|
||||
@ -174,13 +174,13 @@
|
||||
.type-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
.tip-content {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,8 +71,9 @@
|
||||
const { screenHeight, safeAreaInsets, screenWidth, safeArea } = sheep.$platform.device;
|
||||
const sys_navBar = sheep.$platform.navbar;
|
||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||
// ⭐ 导航栏已全局隐藏,statusBarHeight和sys_navBar都为0
|
||||
const pageHeight =
|
||||
(safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sys_navBar - 350;
|
||||
(safeArea.height + safeAreaInsets.bottom) * 2 - 350;
|
||||
const headerBg = sheep.$url.css('/assets/addons/shopro/uniapp/goods/seckill-header.png');
|
||||
|
||||
const state = reactive({
|
||||
@ -251,7 +252,7 @@
|
||||
border-radius: 25rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%);
|
||||
background: linear-gradient(90deg, #0081ff 0%, #4da6ff 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ const handleCalendar = (type) => {
|
||||
.sign-num {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
padding: 0 10rpx;
|
||||
font-family: OPPOSANS;
|
||||
}
|
||||
@ -411,8 +411,8 @@ const handleCalendar = (type) => {
|
||||
border-radius: 35rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 0.2em 0.5em rgba(#ff6000, 0.4);
|
||||
background: linear-gradient(90deg, #ff6000, #fe832a);
|
||||
box-shadow: 0 0.2em 0.5em rgba(#0081ff, 0.4);
|
||||
background: linear-gradient(90deg, #0081ff, #4da6ff);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ const handleCalendar = (type) => {
|
||||
.model-box {
|
||||
width: 520rpx;
|
||||
// height: 590rpx;
|
||||
background: linear-gradient(177deg, #ff6000 0%, #fe832a 100%);
|
||||
background: linear-gradient(177deg, #0081ff 0%, #4da6ff 100%);
|
||||
// background: linear-gradient(177deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
border-radius: 10rpx;
|
||||
|
||||
@ -474,11 +474,11 @@ const handleCalendar = (type) => {
|
||||
.cancel-btn {
|
||||
width: 220rpx;
|
||||
height: 70rpx;
|
||||
border: 2rpx solid #ff6000;
|
||||
border: 2rpx solid #0081ff;
|
||||
border-radius: 35rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
line-height: normal;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
@ -486,8 +486,8 @@ const handleCalendar = (type) => {
|
||||
.confirm-btn {
|
||||
width: 220rpx;
|
||||
height: 70rpx;
|
||||
background: linear-gradient(90deg, #ff6000, #fe832a);
|
||||
box-shadow: 0 0.2em 0.5em rgba(#ff6000, 0.4);
|
||||
background: linear-gradient(90deg, #0081ff, #4da6ff);
|
||||
box-shadow: 0 0.2em 0.5em rgba(#0081ff, 0.4);
|
||||
border-radius: 35rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
|
||||
@ -317,7 +317,8 @@
|
||||
const chatConfig = computed(() => sheep.$store('app').chat);
|
||||
|
||||
const { screenHeight, safeAreaInsets, safeArea, screenWidth } = sheep.$platform.device;
|
||||
const pageHeight = safeArea.height - 44 - 35 - 50;
|
||||
// ⭐ 导航栏已全局隐藏,不需要减去导航栏高度(44)
|
||||
const pageHeight = safeArea.height - 35 - 50;
|
||||
|
||||
const chatStatus = {
|
||||
online: {
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
|
||||
.progerss-active {
|
||||
height: 24rpx;
|
||||
background: linear-gradient(90deg, #ff6000 0%, #fe832a 100%);
|
||||
background: linear-gradient(90deg, #0081ff 0%, #4da6ff 100%);
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
|
||||
.user-info-box {
|
||||
.tag-box {
|
||||
background: #ff6000;
|
||||
background: #0081ff;
|
||||
border-radius: 18rpx;
|
||||
line-height: 36rpx;
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
font-size: 24rpx;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@
|
||||
color: #666666;
|
||||
|
||||
.num {
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
.go-btn {
|
||||
width: 140rpx;
|
||||
height: 60rpx;
|
||||
background: linear-gradient(90deg, #ff6000 0%, #fe832a 100%);
|
||||
background: linear-gradient(90deg, #0081ff 0%, #4da6ff 100%);
|
||||
border-radius: 30rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
</view>
|
||||
<view class="md-goods-content ss-flex-col ss-row-around">
|
||||
<view class="md-goods-title ss-line-2 ss-m-x-20 ss-m-t-6 ss-m-b-16">{{ title }}</view>
|
||||
<view class="md-goods-subtitle ss-line-1 ss-p-y-10 ss-p-20">{{ subTitle }}</view>
|
||||
<view class="md-goods-subtitle ss-line-1 ss-p-y-10 ss-p-20">至高90%积分抵扣</view>
|
||||
<view class="ss-flex ss-col-center ss-row-between ss-m-b-16 ss-m-x-20">
|
||||
<view class="md-goods-price text-price">{{ price }}</view>
|
||||
<view class="goods-origin-price text-price">{{ originPrice }}</view>
|
||||
<view class="sales-text">已售{{ sales }}件</view>
|
||||
<view class="sales-text">{{ maxScoreText }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -47,6 +47,16 @@
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
// 计算最高可使用积分
|
||||
const maxScoreText = computed(() => {
|
||||
if (props.price && !isNaN(props.price)) {
|
||||
const maxScore = (parseFloat(props.price) * 0.9).toFixed(3);
|
||||
return `最高可使用${maxScore}积分`;
|
||||
}
|
||||
return '最高可使用0积分';
|
||||
});
|
||||
|
||||
const emits = defineEmits(['click']);
|
||||
const onClick = () => {
|
||||
emits('click');
|
||||
@ -61,8 +71,12 @@
|
||||
}
|
||||
|
||||
.sales-text {
|
||||
display: inline-block;
|
||||
font-size: 20rpx;
|
||||
color: #c4c4c4;
|
||||
background: #FF3000;
|
||||
color: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
}
|
||||
|
||||
.goods-origin-price {
|
||||
@ -90,9 +104,14 @@
|
||||
color: #333;
|
||||
}
|
||||
.md-goods-subtitle {
|
||||
background-color: var(--ui-BG-Main-tag);
|
||||
color: var(--ui-BG-Main);
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
color: #FF3000 !important;
|
||||
background: #ffffff;
|
||||
border: 1px solid #FF3000;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.md-goods-price {
|
||||
|
||||
@ -511,7 +511,7 @@
|
||||
width: 236rpx;
|
||||
height: 80rpx;
|
||||
background: rgba(#ff5651, 0.1);
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
border-radius: 40rpx 0px 0px 40rpx;
|
||||
line-height: normal;
|
||||
font-size: 24rpx;
|
||||
@ -539,7 +539,7 @@
|
||||
}
|
||||
.more-item-hover {
|
||||
background: rgba(#ffefe5, 0.32);
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -580,7 +580,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
font-size: 24rpx;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
font-size: 24rpx;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
@ -466,7 +466,7 @@
|
||||
width: 236rpx;
|
||||
height: 80rpx;
|
||||
background: rgba(#ff5651, 0.1);
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
border-radius: 40rpx 0px 0px 40rpx;
|
||||
line-height: normal;
|
||||
font-size: 24rpx;
|
||||
@ -517,7 +517,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6000;
|
||||
color: #0081ff;
|
||||
font-size: 24rpx;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<s-layout title="分类" tabbar="/pages/index/category" :bgStyle="{ color: '#fff' }">
|
||||
<view class="s-category">
|
||||
<view class="three-level-wrap ss-flex ss-col-top">
|
||||
<view class="side-menu-wrap" :style="[{ top: Number(statusBarHeight + 88) + 'rpx' }]">
|
||||
<view class="side-menu-wrap">
|
||||
<scroll-view scroll-y :style="[{ height: pageHeight + 'px' }]">
|
||||
<view
|
||||
class="menu-item ss-flex"
|
||||
|
||||
@ -27,11 +27,44 @@
|
||||
const template = computed(() => sheep.$store('app').template.user);
|
||||
const isLogin = computed(() => sheep.$store('user').isLogin);
|
||||
|
||||
// ⭐ 页面首次加载时也更新用户数据
|
||||
onMounted(() => {
|
||||
console.log('[用户页面] onMounted - 检查登录状态:', isLogin.value);
|
||||
if (isLogin.value) {
|
||||
const userStore = sheep.$store('user');
|
||||
|
||||
// 检查用户信息是否为空
|
||||
const isUserInfoEmpty = !userStore.userInfo || !userStore.userInfo.nickname;
|
||||
|
||||
// 检查订单数据是否为默认值(待付款数量为0或'--')
|
||||
const isNumDataEmpty = !userStore.numData ||
|
||||
userStore.numData.coupons_num === '--' ||
|
||||
!userStore.numData.order_num;
|
||||
|
||||
console.log('[用户页面] 用户信息状态:', {
|
||||
nickname: userStore.userInfo?.nickname,
|
||||
coupons_num: userStore.numData?.coupons_num,
|
||||
unpaid: userStore.numData?.order_num?.unpaid
|
||||
});
|
||||
|
||||
// 如果已登录但用户信息或订单数据为空,强制更新(绕过限流)
|
||||
if (isUserInfoEmpty || isNumDataEmpty) {
|
||||
console.log('[用户页面] 数据不完整,强制更新');
|
||||
console.log('[用户页面] 用户信息为空:', isUserInfoEmpty);
|
||||
console.log('[用户页面] 订单数据为空:', isNumDataEmpty);
|
||||
userStore.lastUpdateTime = 0; // 重置限流时间
|
||||
userStore.updateUserData();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
console.log('[用户页面] onShow - 更新用户数据');
|
||||
sheep.$store('user').updateUserData();
|
||||
});
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
console.log('[用户页面] onPullDownRefresh - 刷新用户数据');
|
||||
sheep.$store('user').updateUserData();
|
||||
setTimeout(function () {
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
@ -120,33 +120,50 @@
|
||||
async function getOrderInfo(orderId) {
|
||||
let checkPayResult;
|
||||
state.counter++;
|
||||
console.log(`[支付结果] 查询订单状态 ${state.counter}/5 次, orderId:`, orderId);
|
||||
|
||||
if (state.orderType === 'recharge') {
|
||||
checkPayResult = sheep.$api.trade.order;
|
||||
} else {
|
||||
checkPayResult = sheep.$api.order.detail;
|
||||
}
|
||||
|
||||
try {
|
||||
const { data, code } = await checkPayResult(orderId);
|
||||
if (code === 1) {
|
||||
console.log('[支付结果] 订单查询结果:', { code, status: data?.status });
|
||||
|
||||
if (code === 1 && data) {
|
||||
state.orderInfo = data;
|
||||
if (state.orderInfo.status === 'closed') {
|
||||
console.log('[支付结果] 订单已关闭');
|
||||
state.result = 'closed';
|
||||
return;
|
||||
}
|
||||
if (state.orderInfo.status !== 'unpaid') {
|
||||
console.log('[支付结果] 订单已支付,状态:', state.orderInfo.status);
|
||||
state.result = 'paid';
|
||||
// #ifdef MP
|
||||
subscribeMessage();
|
||||
// #endif
|
||||
return;
|
||||
}
|
||||
console.log('[支付结果] 订单仍未支付');
|
||||
} else {
|
||||
console.error('[支付结果] 查询订单失败:', code);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[支付结果] 查询订单异常:', error);
|
||||
}
|
||||
|
||||
if (state.counter < 5 && state.result === 'unpaid') {
|
||||
console.log('[支付结果] 1.5秒后继续查询...');
|
||||
setTimeout(() => {
|
||||
getOrderInfo(orderId);
|
||||
}, 1500);
|
||||
}
|
||||
// 超过五次检测才判断为支付失败
|
||||
if (state.counter >= 5) {
|
||||
if (state.counter >= 5 && state.result === 'unpaid') {
|
||||
console.warn('[支付结果] 轮询5次后仍未支付,判定为失败');
|
||||
state.result = 'failed';
|
||||
showRepayModal();
|
||||
}
|
||||
@ -172,6 +189,8 @@
|
||||
// #endif
|
||||
|
||||
onLoad(async (options) => {
|
||||
console.log('[支付结果] onLoad 参数:', options);
|
||||
|
||||
let id = '';
|
||||
// 支付订单号
|
||||
if (options.orderSN) {
|
||||
@ -188,9 +207,15 @@
|
||||
|
||||
// 支付结果传值过来是失败,则直接显示失败界面
|
||||
if (options.payState === 'fail') {
|
||||
console.log('[支付结果] 支付失败,直接显示失败界面');
|
||||
state.result = 'failed';
|
||||
} else if (options.payState === 'success') {
|
||||
// 支付成功,立即查询一次
|
||||
console.log('[支付结果] 支付成功,开始查询订单状态');
|
||||
getOrderInfo(state.orderId);
|
||||
} else {
|
||||
// 轮询五次检测订单支付结果
|
||||
// 其他情况也查询
|
||||
console.log('[支付结果] 未知支付状态,开始查询订单');
|
||||
getOrderInfo(state.orderId);
|
||||
}
|
||||
});
|
||||
|
||||
@ -182,12 +182,12 @@
|
||||
count++;
|
||||
}
|
||||
|
||||
// 购买按钮样式
|
||||
// 购买按钮样式 - ⭐ 写死为蓝色,不再使用后端配置
|
||||
const buyStyle = computed(() => {
|
||||
if (buyNowStyle.mode == 1) {
|
||||
// button
|
||||
// button - 固定使用蓝色渐变
|
||||
return {
|
||||
background: `linear-gradient(to right, ${buyNowStyle.color1}, ${buyNowStyle.color2})`,
|
||||
background: 'linear-gradient(to right, #0081ff, #4da6ff)',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
class="md-goods-subtitle ss-m-t-16 ss-line-1"
|
||||
:style="[{ color: subTitleColor, background: subTitleBackground }]"
|
||||
>
|
||||
{{ data.subtitle }}
|
||||
至高90%积分抵扣
|
||||
</view>
|
||||
<slot name="activity">
|
||||
<view v-if="data.promos?.length" class="tag-box ss-flex-wrap ss-flex ss-col-center">
|
||||
@ -128,7 +128,7 @@
|
||||
</view>
|
||||
|
||||
<view class="ss-m-t-16 ss-flex ss-col-center ss-flex-wrap">
|
||||
<view class="sales-text">{{ salesAndStock }}</view>
|
||||
<view class="sales-text">{{ maxScoreText }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -164,7 +164,7 @@
|
||||
class="lg-goods-subtitle ss-m-t-10 ss-line-1"
|
||||
:style="[{ color: subTitleColor, background: subTitleBackground }]"
|
||||
>
|
||||
{{ data.subtitle }}
|
||||
至高90%积分抵扣
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
@ -194,7 +194,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="ss-m-t-8 ss-flex ss-col-center ss-flex-wrap">
|
||||
<view class="sales-text">{{ salesAndStock }}</view>
|
||||
<view class="sales-text">{{ maxScoreText }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -226,7 +226,7 @@
|
||||
class="sl-goods-subtitle ss-m-t-16"
|
||||
:style="[{ color: subTitleColor, background: subTitleBackground }]"
|
||||
>
|
||||
{{ data.subtitle }}
|
||||
至高90%积分抵扣
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
@ -256,7 +256,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="ss-m-t-16 ss-flex ss-flex-wrap">
|
||||
<view class="sales-text">{{ salesAndStock }}</view>
|
||||
<view class="sales-text">{{ maxScoreText }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -422,6 +422,17 @@
|
||||
return text.join(' | ');
|
||||
});
|
||||
|
||||
// 计算最高可使用积分
|
||||
const maxScoreText = computed(() => {
|
||||
// 计算价格的90%作为最高可使用积分
|
||||
const price = isArray(props.data.price) ? props.data.price[0] : props.data.price;
|
||||
if (price && !isNaN(price)) {
|
||||
const maxScore = (parseFloat(price) * 0.9).toFixed(3);
|
||||
return `最高可使用${maxScore}积分`;
|
||||
}
|
||||
return '最高可使用0积分';
|
||||
});
|
||||
|
||||
// 返回事件
|
||||
const emits = defineEmits(['click', 'getHeight']);
|
||||
|
||||
@ -517,11 +528,12 @@
|
||||
}
|
||||
|
||||
.sales-text {
|
||||
display: table;
|
||||
font-size: 24rpx;
|
||||
transform: scale(0.8);
|
||||
margin-left: 0rpx;
|
||||
color: #c4c4c4;
|
||||
display: inline-block;
|
||||
font-size: 20rpx;
|
||||
background: #FF3000;
|
||||
color: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
}
|
||||
|
||||
.activity-tag {
|
||||
@ -618,7 +630,13 @@
|
||||
.md-goods-subtitle {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
color: #FF3000 !important;
|
||||
background: #ffffff;
|
||||
border: 1px solid #FF3000;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.md-goods-price {
|
||||
@ -630,7 +648,7 @@
|
||||
.cart-box {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
background: linear-gradient(90deg, #fe8900, #ff5e00);
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
bottom: 50rpx;
|
||||
@ -669,7 +687,12 @@
|
||||
.lg-goods-subtitle {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
color: #FF3000 !important;
|
||||
background: #ffffff;
|
||||
border: 1px solid #FF3000;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: inline-block;
|
||||
// line-height: 30rpx;
|
||||
// width: 410rpx;
|
||||
}
|
||||
@ -687,7 +710,7 @@
|
||||
z-index: 2;
|
||||
width: 120rpx;
|
||||
height: 50rpx;
|
||||
background: linear-gradient(90deg, #fe8900, #ff5e00);
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
border-radius: 25rpx;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
@ -726,7 +749,12 @@
|
||||
.sl-goods-subtitle {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
color: #FF3000 !important;
|
||||
background: #ffffff;
|
||||
border: 1px solid #FF3000;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: inline-block;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
||||
@ -743,7 +771,7 @@
|
||||
z-index: 2;
|
||||
width: 148rpx;
|
||||
height: 50rpx;
|
||||
background: linear-gradient(90deg, #fe8900, #ff5e00);
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
border-radius: 25rpx;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
|
||||
@ -96,12 +96,12 @@
|
||||
let { mode, tagStyle, buyNowStyle, goodsFields, space } = props.data;
|
||||
let { marginLeft, marginRight } = props.styles;
|
||||
|
||||
// 购买按钮样式
|
||||
// 购买按钮样式 - ⭐ 写死为蓝色,不再使用后端配置
|
||||
const buyStyle = computed(() => {
|
||||
let buyNowStyle = props.data.buyNowStyle;
|
||||
if (buyNowStyle.mode == 1) {
|
||||
return {
|
||||
background: `linear-gradient(to right, ${buyNowStyle.color1}, ${buyNowStyle.color2})`,
|
||||
background: 'linear-gradient(to right, #0081ff, #4da6ff)',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -140,12 +140,12 @@
|
||||
}
|
||||
count++;
|
||||
}
|
||||
// 购买按钮样式
|
||||
// 购买按钮样式 - ⭐ 写死为蓝色,不再使用后端配置
|
||||
const buyStyle = computed(() => {
|
||||
if (buyNowStyle.mode == 1) {
|
||||
// button
|
||||
// button - 固定使用蓝色渐变
|
||||
return {
|
||||
background: `linear-gradient(to right, ${buyNowStyle.color1}, ${buyNowStyle.color2})`,
|
||||
background: 'linear-gradient(to right, #0081ff, #4da6ff)',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
class="md-goods-subtitle ss-m-t-16 ss-line-1"
|
||||
:style="[{ color: subTitleColor }]"
|
||||
>
|
||||
{{ data.subtitle }}
|
||||
至高90%积分抵扣
|
||||
</view>
|
||||
<view class="ss-col-bottom">
|
||||
<view
|
||||
@ -51,7 +51,7 @@
|
||||
</view>
|
||||
|
||||
<view class="ss-m-t-16 ss-flex ss-col-center ss-flex-wrap">
|
||||
<view class="sales-text">{{ salesAndStock }}</view>
|
||||
<view class="sales-text">{{ maxScoreText }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
class="lg-goods-subtitle ss-m-t-10 ss-line-1"
|
||||
:style="[{ color: subTitleColor }]"
|
||||
>
|
||||
{{ data.subtitle }}
|
||||
至高90%积分抵扣
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
@ -108,7 +108,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="ss-m-t-16 ss-flex ss-col-center ss-flex-wrap">
|
||||
<view class="sales-text">{{ salesAndStock }}</view>
|
||||
<view class="sales-text">{{ maxScoreText }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -270,6 +270,22 @@
|
||||
text.push(formatStock(props.data.stock_show_type, props.data.stock));
|
||||
return text.join(' | ');
|
||||
});
|
||||
|
||||
// 计算最高可使用积分(针对积分商品)
|
||||
const maxScoreText = computed(() => {
|
||||
// 优先使用商品的score字段(积分价格)
|
||||
if (props.data.score && !isNaN(props.data.score)) {
|
||||
const maxScore = (parseFloat(props.data.score) * 0.9).toFixed(3);
|
||||
return `最高可使用${maxScore}积分`;
|
||||
}
|
||||
// 如果没有score字段,用价格计算
|
||||
const price = Array.isArray(props.data.price) ? props.data.price[0] : props.data.price;
|
||||
if (price && !isNaN(price)) {
|
||||
const maxScore = (parseFloat(price) * 0.9).toFixed(3);
|
||||
return `最高可使用${maxScore}积分`;
|
||||
}
|
||||
return '最高可使用0积分';
|
||||
});
|
||||
// 获取实时卡片高度
|
||||
const { proxy } = getCurrentInstance();
|
||||
const elId = `sheep_${Math.ceil(Math.random() * 10e5).toString(36)}`;
|
||||
@ -294,11 +310,12 @@
|
||||
margin-right: -4px;
|
||||
}
|
||||
.sales-text {
|
||||
display: table;
|
||||
font-size: 24rpx;
|
||||
transform: scale(0.8);
|
||||
margin-left: -16rpx;
|
||||
color: #c4c4c4;
|
||||
display: inline-block;
|
||||
font-size: 20rpx;
|
||||
background: #FF3000;
|
||||
color: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
}
|
||||
|
||||
// md
|
||||
@ -322,7 +339,13 @@
|
||||
.md-goods-subtitle {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
color: #FF3000 !important;
|
||||
background: #ffffff;
|
||||
border: 1px solid #FF3000;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.md-goods-price {
|
||||
@ -372,7 +395,12 @@
|
||||
.lg-goods-subtitle {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
color: #FF3000 !important;
|
||||
background: #ffffff;
|
||||
border: 1px solid #FF3000;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: inline-block;
|
||||
line-height: 30rpx;
|
||||
// width: 410rpx;
|
||||
}
|
||||
@ -420,7 +448,12 @@
|
||||
.sl-goods-subtitle {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
color: #FF3000 !important;
|
||||
background: #ffffff;
|
||||
border: 1px solid #FF3000;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: inline-block;
|
||||
line-height: 30rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
@ -438,7 +471,7 @@
|
||||
z-index: 2;
|
||||
width: 148rpx;
|
||||
height: 50rpx;
|
||||
background: linear-gradient(90deg, #fe8900, #ff5e00);
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
border-radius: 25rpx;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
|
||||
@ -96,12 +96,12 @@
|
||||
let { mode, tagStyle, buyNowStyle, goodsFields, space } = props.data;
|
||||
let { marginLeft, marginRight } = props.styles;
|
||||
|
||||
// 购买按钮样式
|
||||
// 购买按钮样式 - ⭐ 写死为蓝色,不再使用后端配置
|
||||
const buyStyle = computed(() => {
|
||||
let buyNowStyle = props.data.buyNowStyle;
|
||||
if (buyNowStyle.mode == 1) {
|
||||
return {
|
||||
background: `linear-gradient(to right, ${buyNowStyle.color1}, ${buyNowStyle.color2})`,
|
||||
background: 'linear-gradient(to right, #0081ff, #4da6ff)',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
:placeholder="true"
|
||||
:safeAreaInsetBottom="true"
|
||||
:inactiveColor="tabbar.inactiveColor"
|
||||
:activeColor="tabbar.activeColor"
|
||||
activeColor="#0081ff"
|
||||
:midTabBar="tabbar.mode === 2"
|
||||
:customStyle="tabbarStyle"
|
||||
>
|
||||
|
||||
@ -21,6 +21,9 @@ import Pay from './pay';
|
||||
|
||||
const device = uni.getSystemInfoSync();
|
||||
|
||||
// ⭐ 强制设置状态栏高度为0(导航栏已全局隐藏)
|
||||
device.statusBarHeight = 0;
|
||||
|
||||
const os = device.platform;
|
||||
|
||||
let name = '';
|
||||
|
||||
@ -348,17 +348,20 @@ export default class SheepPay {
|
||||
|
||||
// 获取订单ID(从订单号查询)
|
||||
console.log('[建行支付] 步骤1: 查询订单信息...');
|
||||
let orderId;
|
||||
let paymentResult;
|
||||
|
||||
try {
|
||||
const orderInfo = await sheep.$api.order.detail(this.orderSN);
|
||||
console.log('[建行支付] 订单查询结果:', orderInfo);
|
||||
|
||||
if (!orderInfo || orderInfo.code !== 1) {
|
||||
if (!orderInfo || orderInfo.code !== 1 || !orderInfo.data) {
|
||||
console.error('[建行支付] ❌ 获取订单信息失败:', orderInfo);
|
||||
sheep.$helper.toast('获取订单信息失败');
|
||||
return;
|
||||
}
|
||||
|
||||
const orderId = orderInfo.data.id;
|
||||
orderId = orderInfo.data.id;
|
||||
console.log('[建行支付] ✅ 订单ID:', orderId);
|
||||
console.log('[建行支付] 订单金额:', orderInfo.data.pay_fee);
|
||||
console.log('[建行支付] 订单状态:', orderInfo.data.status);
|
||||
@ -367,21 +370,28 @@ export default class SheepPay {
|
||||
console.log('[建行支付] 步骤2: 调用后端生成支付串...');
|
||||
console.log('[建行支付] 请求参数:', { order_id: orderId });
|
||||
|
||||
const paymentResult = await ccbApi.createPayment(orderId);
|
||||
paymentResult = await ccbApi.createPayment(orderId);
|
||||
console.log('[建行支付] 支付串生成结果:', paymentResult);
|
||||
|
||||
if (paymentResult.code !== 1) {
|
||||
if (!paymentResult || paymentResult.code !== 1 || !paymentResult.data) {
|
||||
console.error('[建行支付] ❌ 生成支付串失败:', paymentResult);
|
||||
console.error('[建行支付] 错误信息:', paymentResult.msg);
|
||||
console.error('[建行支付] 错误信息:', paymentResult?.msg);
|
||||
console.error('[建行支付] 完整响应:', JSON.stringify(paymentResult));
|
||||
sheep.$helper.toast(paymentResult.msg || '生成支付串失败');
|
||||
sheep.$helper.toast(paymentResult?.msg || '生成支付串失败');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[建行支付] ✅ 支付串生成成功');
|
||||
console.log('[建行支付] 支付串长度:', paymentResult.data.payment_string?.length);
|
||||
console.log('[建行支付] 支付流水号:', paymentResult.data.pay_flow_id);
|
||||
console.log('[建行支付] 支付金额:', paymentResult.data.amount);
|
||||
console.log('[建行支付] 支付串长度:', paymentResult.data?.payment_string?.length);
|
||||
console.log('[建行支付] 支付流水号:', paymentResult.data?.pay_flow_id);
|
||||
console.log('[建行支付] 支付金额:', paymentResult.data?.amount);
|
||||
|
||||
// 验证支付串是否存在
|
||||
if (!paymentResult.data.payment_string) {
|
||||
console.error('[建行支付] ❌ 支付串为空');
|
||||
sheep.$helper.toast('支付串生成失败');
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[建行支付] ❌ 异常:', error);
|
||||
console.error('[建行支付] 错误堆栈:', error.stack);
|
||||
@ -406,7 +416,7 @@ export default class SheepPay {
|
||||
const result = await CcbLifePlatform.payment(paymentParams);
|
||||
console.log('[建行支付] 收银台调起结果:', result);
|
||||
|
||||
if (result.code === 0) {
|
||||
if (result && result.code === 0) {
|
||||
// ✅ 支付调起成功,开始轮询查询订单状态
|
||||
console.log('[建行支付] ✅ 支付调起成功,开始轮询查询订单状态');
|
||||
|
||||
@ -429,7 +439,7 @@ export default class SheepPay {
|
||||
const statusResult = await ccbApi.queryPaymentStatus(orderId);
|
||||
console.log('[建行支付] 查询结果:', statusResult);
|
||||
|
||||
if (statusResult.code === 1 && statusResult.data.is_paid) {
|
||||
if (statusResult && statusResult.code === 1 && statusResult.data && statusResult.data.is_paid) {
|
||||
// ✅ 支付成功
|
||||
uni.hideLoading();
|
||||
console.log('[建行支付] ✅ 订单已支付 order_id:' + orderId);
|
||||
@ -438,8 +448,8 @@ export default class SheepPay {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[建行支付] 订单状态:', statusResult.data.status);
|
||||
console.log('[建行支付] 是否已支付:', statusResult.data.is_paid);
|
||||
console.log('[建行支付] 订单状态:', statusResult?.data?.status);
|
||||
console.log('[建行支付] 是否已支付:', statusResult?.data?.is_paid);
|
||||
|
||||
// 未支付,继续轮询
|
||||
if (pollCount < MAX_POLL_COUNT) {
|
||||
@ -481,12 +491,26 @@ export default class SheepPay {
|
||||
} else {
|
||||
// 支付失败或取消
|
||||
console.error('[建行支付] ❌ 支付未成功:', result);
|
||||
if (result.msg && result.msg.includes('取消')) {
|
||||
|
||||
// 确保关闭可能存在的loading
|
||||
uni.hideLoading();
|
||||
|
||||
if (result && result.msg && result.msg.includes('取消')) {
|
||||
console.log('[建行支付] 用户取消支付');
|
||||
sheep.$helper.toast('支付已取消');
|
||||
// ⭐ 用户取消支付,返回支付页面(而不是跳转到失败页面)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
fail: () => {
|
||||
// 如果返回失败,跳转到订单列表
|
||||
sheep.$router.redirect('/pages/order/list');
|
||||
}
|
||||
});
|
||||
}, 1500);
|
||||
} else {
|
||||
console.error('[建行支付] 支付失败原因:', result.msg);
|
||||
sheep.$helper.toast(result.msg || '支付失败');
|
||||
console.error('[建行支付] 支付失败原因:', result?.msg);
|
||||
sheep.$helper.toast(result?.msg || '支付失败');
|
||||
that.payResult('fail');
|
||||
}
|
||||
}
|
||||
@ -495,6 +519,10 @@ export default class SheepPay {
|
||||
console.error('[建行支付] 错误类型:', error.name);
|
||||
console.error('[建行支付] 错误信息:', error.message);
|
||||
console.error('[建行支付] 错误堆栈:', error.stack);
|
||||
|
||||
// 确保关闭loading
|
||||
uni.hideLoading();
|
||||
|
||||
sheep.$helper.toast('支付失败: ' + error.message);
|
||||
that.payResult('fail');
|
||||
}
|
||||
|
||||
@ -487,10 +487,12 @@ const CcbLifePlatform = {
|
||||
console.log('[建行收银台] 设备类型:', isIOS ? 'iOS' : 'Android');
|
||||
|
||||
if (isIOS) {
|
||||
// iOS: 使用 URL Scheme 调起支付
|
||||
console.log('[建行收银台] iOS: 使用URL Scheme调起');
|
||||
const payUrl = 'mbspay://direct?' + options.payment_string;
|
||||
// ⭐ iOS: 使用官方文档的URL Scheme(5.3.1章节)
|
||||
console.log('[建行收银台] iOS: 使用官方URL Scheme调起');
|
||||
// 注意:需要对支付串进行encodeURIComponent编码
|
||||
const payUrl = 'ccbpayment://openCashier?params=' + encodeURIComponent(options.payment_string);
|
||||
console.log('[建行收银台] 跳转URL长度:', payUrl.length);
|
||||
console.log('[建行收银台] URL前100字符:', payUrl.substring(0, 100));
|
||||
|
||||
window.location.href = payUrl;
|
||||
|
||||
@ -503,14 +505,17 @@ const CcbLifePlatform = {
|
||||
});
|
||||
}, 500);
|
||||
} else {
|
||||
// Android: 调用 JSBridge 方法
|
||||
console.log('[建行收银台] Android: 检查mbspay对象...');
|
||||
console.log('[建行收银台] window.mbspay存在:', !!window.mbspay);
|
||||
console.log('[建行收银台] mbspay.directpay存在:', !!(window.mbspay && window.mbspay.directpay));
|
||||
// ⭐ Android: 使用官方文档的JSBridge方法(5.3.1章节)
|
||||
console.log('[建行收银台] Android: 检查CCBAndroid对象...');
|
||||
console.log('[建行收银台] window.CCBAndroid存在:', !!window.CCBAndroid);
|
||||
console.log('[建行收银台] CCBAndroid.callCashier存在:', !!(window.CCBAndroid && window.CCBAndroid.callCashier));
|
||||
|
||||
if (window.mbspay && typeof window.mbspay.directpay === 'function') {
|
||||
console.log('[建行收银台] 调用mbspay.directpay()...');
|
||||
window.mbspay.directpay(options.payment_string);
|
||||
if (window.CCBAndroid && typeof window.CCBAndroid.callCashier === 'function') {
|
||||
console.log('[建行收银台] 调用CCBAndroid.callCashier()...');
|
||||
console.log('[建行收银台] 支付串长度:', options.payment_string.length);
|
||||
|
||||
// 调用官方文档指定的方法
|
||||
window.CCBAndroid.callCashier(options.payment_string);
|
||||
|
||||
// Android调起后认为成功(实际支付结果通过异步通知获取)
|
||||
setTimeout(() => {
|
||||
@ -521,14 +526,28 @@ const CcbLifePlatform = {
|
||||
});
|
||||
}, 500);
|
||||
} else {
|
||||
console.error('[建行收银台] ❌ mbspay对象不存在或directpay方法不存在');
|
||||
console.error('[建行收银台] window对象键:', Object.keys(window).filter(k => k.toLowerCase().includes('pay') || k.toLowerCase().includes('ccb')));
|
||||
console.error('[建行收银台] ❌ CCBAndroid对象不存在或callCashier方法不存在');
|
||||
console.error('[建行收银台] window对象包含的键:', Object.keys(window).filter(k => k.toLowerCase().includes('pay') || k.toLowerCase().includes('ccb') || k.toLowerCase().includes('android')));
|
||||
|
||||
// 降级尝试:旧版本可能使用mbspay
|
||||
if (window.mbspay && typeof window.mbspay.directpay === 'function') {
|
||||
console.warn('[建行收银台] ⚠️ 降级使用mbspay.directpay()(旧版本)');
|
||||
window.mbspay.directpay(options.payment_string);
|
||||
setTimeout(() => {
|
||||
console.log('[建行收银台] ✅ Android收银台已调起(降级方式)');
|
||||
resolve({
|
||||
code: 0,
|
||||
msg: '已调起建行支付'
|
||||
});
|
||||
}, 500);
|
||||
} else {
|
||||
reject({
|
||||
code: -1,
|
||||
msg: '建行支付环境异常,请更新建行生活App'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
|
||||
@ -4,7 +4,7 @@ import app from './app';
|
||||
const sys = defineStore({
|
||||
id: 'sys',
|
||||
state: () => ({
|
||||
theme: '', // 主题,
|
||||
theme: 'blue', // ⭐ 主题强制设置为蓝色
|
||||
mode: 'light', // 明亮模式、暗黑模式(暂未支持)
|
||||
modeAuto: false, // 跟随系统
|
||||
fontSize: 1, // 设置默认字号等级(0-4)
|
||||
@ -12,11 +12,8 @@ const sys = defineStore({
|
||||
getters: {},
|
||||
actions: {
|
||||
setTheme(theme = '') {
|
||||
if (theme === '') {
|
||||
this.theme = app().template?.basic.theme || 'orange';
|
||||
} else {
|
||||
this.theme = theme;
|
||||
}
|
||||
// ⭐ 强制使用蓝色主题,忽略所有参数
|
||||
this.theme = 'blue';
|
||||
},
|
||||
},
|
||||
persist: {
|
||||
|
||||
@ -81,7 +81,9 @@ const user = defineStore({
|
||||
const { code, data } = await userApi.data();
|
||||
if (code === 1) {
|
||||
this.numData = data;
|
||||
console.log('[User Store] 订单数据已更新:', data);
|
||||
}
|
||||
return Promise.resolve(data);
|
||||
},
|
||||
|
||||
// 添加分享记录
|
||||
@ -112,7 +114,7 @@ const user = defineStore({
|
||||
const nowTime = new Date().getTime();
|
||||
if (this.lastUpdateTime + 5000 > nowTime) return;
|
||||
await this.getInfo();
|
||||
this.getNumData();
|
||||
await this.getNumData(); // ⭐ 添加await,确保订单数据加载完成
|
||||
this.lastUpdateTime = nowTime;
|
||||
return this.userInfo;
|
||||
},
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
type: [String, Number],
|
||||
// #ifdef H5
|
||||
// H5端的导航栏属于“自定义”导航栏的范畴,因为它是非原生的,与普通元素一致
|
||||
default: 44,
|
||||
default: 0,
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
default: sheep.$platform.navbar,
|
||||
|
||||
@ -131,7 +131,7 @@
|
||||
--sa-title: #262626;
|
||||
--sa-subtitle: #434343;
|
||||
--sa-font: #595959;
|
||||
--sa-subfont: #8c8c8c;
|
||||
--sa-subfont: #FF3000 !important;
|
||||
--sa-place: #bfbfbf;
|
||||
|
||||
--sa-border: #d9d9d9;
|
||||
@ -17289,7 +17289,7 @@
|
||||
--sa-title: #262626;
|
||||
--sa-subtitle: #434343;
|
||||
--sa-font: #595959;
|
||||
--sa-subfont: #8c8c8c;
|
||||
--sa-subfont: #FF3000 !important;
|
||||
--sa-place: #bfbfbf;
|
||||
--sa-border: #d9d9d9;
|
||||
--sa-border-secondary: #f0f0f0;
|
||||
|
||||
@ -789,8 +789,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
buyNowStyle: {
|
||||
mode: 1,
|
||||
text: '立即购买',
|
||||
color1: Controller.data().themeColor[theme].color1,
|
||||
color2: Controller.data().themeColor[theme].color2,
|
||||
color1: '#0081ff',
|
||||
color2: '#4da6ff',
|
||||
src: '',
|
||||
},
|
||||
tagStyle: {
|
||||
@ -927,7 +927,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
},
|
||||
subtitle: {
|
||||
text: '副标题',
|
||||
color: '#8c8c8c',
|
||||
color: '#FF3000',
|
||||
textFontSize: 12,
|
||||
other: [], // bold=加粗 italic=倾斜
|
||||
},
|
||||
@ -1099,8 +1099,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
buyNowStyle: {
|
||||
mode: 1,
|
||||
text: '立即拼团',
|
||||
color1: Controller.data().themeColor[theme].color1,
|
||||
color2: Controller.data().themeColor[theme].color2,
|
||||
color1: '#0081ff',
|
||||
color2: '#4da6ff',
|
||||
src: '',
|
||||
},
|
||||
borderRadiusTop: 0,
|
||||
@ -1158,8 +1158,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
buyNowStyle: {
|
||||
mode: 1,
|
||||
text: '去抢购',
|
||||
color1: Controller.data().themeColor[theme].color1,
|
||||
color2: Controller.data().themeColor[theme].color2,
|
||||
color1: '#0081ff',
|
||||
color2: '#4da6ff',
|
||||
src: '',
|
||||
},
|
||||
borderRadiusTop: 0,
|
||||
@ -1208,8 +1208,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
buyNowStyle: {
|
||||
mode: 1,
|
||||
text: '去兑换',
|
||||
color1: Controller.data().themeColor[theme].color1,
|
||||
color2: Controller.data().themeColor[theme].color2,
|
||||
color1: '#0081ff',
|
||||
color2: '#4da6ff',
|
||||
src: '',
|
||||
},
|
||||
borderRadiusTop: 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user