修正了 pages 名为拼音的问题
This commit is contained in:
37
app.js
37
app.js
@@ -1,11 +1,10 @@
|
|||||||
// app.js - 稳健生产版本(修复 GoEasy 初始化错误 + 配置100%加载)
|
// app.js
|
||||||
import GoEasy from './static/lib/goeasy-2.13.24.esm.min';
|
import GoEasy from './static/lib/goeasy-2.13.24.esm.min';
|
||||||
const ChatCore = require('./utils/chat-core');
|
const ChatCore = require('./utils/chat-core');
|
||||||
import { check } from './utils/phone-auth';
|
import { check } from './utils/phone-auth';
|
||||||
import { getPrimaryRole, lockPrimaryRole, migrateLegacyCenterRole, PRIMARY_DEFAULT_PAGES } from './utils/primary-role';
|
import { getPrimaryRole, lockPrimaryRole, migrateLegacyCenterRole, PRIMARY_DEFAULT_PAGES } from './utils/primary-role';
|
||||||
|
|
||||||
|
// 三端固定首页
|
||||||
// ===== 三端固定首页(与 custom-tab-bar 一致) =====
|
|
||||||
const roleDefaultPage = PRIMARY_DEFAULT_PAGES;
|
const roleDefaultPage = PRIMARY_DEFAULT_PAGES;
|
||||||
|
|
||||||
App({
|
App({
|
||||||
@@ -163,20 +162,20 @@ App({
|
|||||||
primaryRole: 'normal'
|
primaryRole: 'normal'
|
||||||
},
|
},
|
||||||
|
|
||||||
// ========== 核心启动流程 ==========
|
// 核心启动流程
|
||||||
async onLaunch() {
|
async onLaunch() {
|
||||||
// ---------- ① 立即隐藏“返回首页”按钮 ----------
|
// ① 隐藏返回首页按钮
|
||||||
wx.hideHomeButton();
|
wx.hideHomeButton();
|
||||||
wx.onAppRoute((res) => {
|
wx.onAppRoute((res) => {
|
||||||
wx.hideHomeButton();
|
wx.hideHomeButton();
|
||||||
const path = (res && res.path) || '';
|
const path = (res && res.path) || '';
|
||||||
if (path === 'pages/guanshiduan/guanshiduan' || path === 'pages/zuzhangduan/zuzhangduan') {
|
if (path === 'pages/manager/manager' || path === 'pages/leader/leader') {
|
||||||
migrateLegacyCenterRole(this);
|
migrateLegacyCenterRole(this);
|
||||||
lockPrimaryRole('dashou', this);
|
lockPrimaryRole('dashou', this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// ---------- ② 恢复主端并跳转(旧管事/组长标识自动归打手端) ----------
|
// ② 恢复主端并跳转
|
||||||
migrateLegacyCenterRole(this);
|
migrateLegacyCenterRole(this);
|
||||||
const savedRole = getPrimaryRole(this);
|
const savedRole = getPrimaryRole(this);
|
||||||
lockPrimaryRole(savedRole, this);
|
lockPrimaryRole(savedRole, this);
|
||||||
@@ -188,18 +187,18 @@ App({
|
|||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- ③ 立刻应用本地缓存配置 ----------
|
// ③ 应用本地缓存配置
|
||||||
const cachedConfig = this.readConfigFromStorage();
|
const cachedConfig = this.readConfigFromStorage();
|
||||||
if (cachedConfig) {
|
if (cachedConfig) {
|
||||||
this.applyDynamicConfig(cachedConfig);
|
this.applyDynamicConfig(cachedConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- ④ 初始化基础设施 ----------
|
// ④ 初始化
|
||||||
this.initGoEasyWithConfig(); // 只有appkey有效时才真正初始化
|
this.initGoEasyWithConfig(); // 只有appkey有效时才真正初始化
|
||||||
ChatCore.initGlobalMessageSystem(this);
|
ChatCore.initGlobalMessageSystem(this);
|
||||||
this.initCurrentUser();
|
this.initCurrentUser();
|
||||||
|
|
||||||
// ---------- ⑤ 建立连接 ----------
|
// ⑤ 建立连接
|
||||||
const saved = this.getSavedConnection();
|
const saved = this.getSavedConnection();
|
||||||
console.log('【启动】缓存身份:', saved ? saved.identityType : '无',
|
console.log('【启动】缓存身份:', saved ? saved.identityType : '无',
|
||||||
'userId:', saved ? saved.userId : '无');
|
'userId:', saved ? saved.userId : '无');
|
||||||
@@ -208,7 +207,7 @@ App({
|
|||||||
else if (this.ensureConnection) this.ensureConnection();
|
else if (this.ensureConnection) this.ensureConnection();
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
// ---------- ⑥ 后台静默获取最新配置 ----------
|
// ⑥ 获取远程配置
|
||||||
this.fetchConfigSafely()
|
this.fetchConfigSafely()
|
||||||
.then(latestConfig => {
|
.then(latestConfig => {
|
||||||
this.saveConfigToStorage(latestConfig);
|
this.saveConfigToStorage(latestConfig);
|
||||||
@@ -223,7 +222,7 @@ App({
|
|||||||
console.warn('远程配置获取失败,继续使用本地缓存', err);
|
console.warn('远程配置获取失败,继续使用本地缓存', err);
|
||||||
});
|
});
|
||||||
|
|
||||||
// ---------- ⑦ 手机号认证检查 ----------
|
// ⑦ 手机号认证检查
|
||||||
try {
|
try {
|
||||||
const needAuth = await check();
|
const needAuth = await check();
|
||||||
if (needAuth) {
|
if (needAuth) {
|
||||||
@@ -233,7 +232,7 @@ App({
|
|||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
|
|
||||||
// ========== 连接管理方法 ==========
|
// 连接管理方法
|
||||||
getSavedConnection() {
|
getSavedConnection() {
|
||||||
try {
|
try {
|
||||||
const saved = wx.getStorageSync(
|
const saved = wx.getStorageSync(
|
||||||
@@ -245,7 +244,7 @@ App({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// ========== 配置缓存读写 ==========
|
// 配置缓存读写
|
||||||
CONFIG_CACHE_KEY: 'app_dynamic_config',
|
CONFIG_CACHE_KEY: 'app_dynamic_config',
|
||||||
|
|
||||||
readConfigFromStorage() {
|
readConfigFromStorage() {
|
||||||
@@ -266,7 +265,7 @@ App({
|
|||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
|
|
||||||
// ========== 安全获取远程配置(永不报错) ==========
|
// 获取远程配置
|
||||||
fetchConfigSafely() {
|
fetchConfigSafely() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
wx.request({
|
wx.request({
|
||||||
@@ -289,7 +288,7 @@ App({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// ========== 原有方法(保留,仅增强) ==========
|
// 获取远程配置
|
||||||
fetchDynamicConfig() {
|
fetchDynamicConfig() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.request({
|
wx.request({
|
||||||
@@ -340,7 +339,7 @@ App({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 🔥 关键修复:只在有效 appkey 时初始化,且避免重复初始化
|
// 仅在有效 appkey 时初始化
|
||||||
initGoEasyWithConfig() {
|
initGoEasyWithConfig() {
|
||||||
const cfg = this.globalData.goEasyConfig;
|
const cfg = this.globalData.goEasyConfig;
|
||||||
if (!cfg || !cfg.appkey) {
|
if (!cfg || !cfg.appkey) {
|
||||||
@@ -348,7 +347,7 @@ App({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果已经初始化过,就不再重复创建实例
|
// 避免重复初始化
|
||||||
if (wx.goEasy && wx.GoEasy) {
|
if (wx.goEasy && wx.GoEasy) {
|
||||||
console.log('GoEasy 已初始化,跳过');
|
console.log('GoEasy 已初始化,跳过');
|
||||||
return;
|
return;
|
||||||
@@ -389,7 +388,7 @@ App({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 切换当前角色并通知 custom-tab-bar 立即刷新(Storage + globalData + 事件) */
|
/** 切换角色并通知刷新 */
|
||||||
setCurrentRole(role) {
|
setCurrentRole(role) {
|
||||||
if (!role) return;
|
if (!role) return;
|
||||||
this.globalData.currentRole = role;
|
this.globalData.currentRole = role;
|
||||||
|
|||||||
116
app.json
116
app.json
@@ -1,68 +1,68 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
"pages/index/index",
|
"pages/index/index",
|
||||||
"pages/fenlei/fenlei",
|
"pages/category/category",
|
||||||
"pages/xuanren/xuanren",
|
"pages/pick-user/pick-user",
|
||||||
"pages/xiaoxi/xiaoxi",
|
"pages/messages/messages",
|
||||||
"pages/wode/wode",
|
"pages/mine/mine",
|
||||||
"pages/shangpinxiangqing/shangpinxiangqing",
|
"pages/product-detail/product-detail",
|
||||||
"pages/tijiao/tijiao",
|
"pages/submit/submit",
|
||||||
"pages/xiugai/xiugai",
|
"pages/edit/edit",
|
||||||
"pages/dashouduan/dashouduan",
|
"pages/fighter/fighter",
|
||||||
"pages/shangjiaduan/shangjiaduan",
|
"pages/merchant/merchant",
|
||||||
"pages/guanshiduan/guanshiduan",
|
"pages/manager/manager",
|
||||||
"pages/dingdan/dingdan",
|
"pages/orders/orders",
|
||||||
"pages/dingdanxiangqing/dingdanxiangqing",
|
"pages/order-detail/order-detail",
|
||||||
"pages/dashouguize/dashouguize",
|
"pages/fighter-rules/fighter-rules",
|
||||||
"pages/dashouxiugai/dashouxiugai",
|
"pages/fighter-edit/fighter-edit",
|
||||||
"pages/dashoupaihang/dashoupaihang",
|
"pages/fighter-rank/fighter-rank",
|
||||||
"pages/dashouchongzhi/dashouchongzhi",
|
"pages/fighter-recharge/fighter-recharge",
|
||||||
"pages/dashouxiaoxi/dashouxiaoxi",
|
"pages/fighter-msg/fighter-msg",
|
||||||
"pages/dashoudingdan/dashoudingdan",
|
"pages/fighter-orders/fighter-orders",
|
||||||
"pages/jiedan/jiedan",
|
"pages/accept-order/accept-order",
|
||||||
"pages/tixian/tixian",
|
"pages/withdraw/withdraw",
|
||||||
"pages/yaoqingdashou/yaoqingdashou",
|
"pages/invite-fighter/invite-fighter",
|
||||||
"pages/wodedashou/wodedashou",
|
"pages/my-fighter/my-fighter",
|
||||||
"pages/czjilu/czjilu",
|
"pages/recharge-log/recharge-log",
|
||||||
"pages/guanshipaihang/guanshipaihang",
|
"pages/manager-rank/manager-rank",
|
||||||
"pages/sjpaidan/sjpaidan",
|
"pages/merchant-dispatch/merchant-dispatch",
|
||||||
"pages/sjdingdan/sjdingdan",
|
"pages/merchant-orders/merchant-orders",
|
||||||
"pages/sjxiaoxi/sjxiaoxi",
|
"pages/merchant-msg/merchant-msg",
|
||||||
"pages/sjpaihang/sjpaihang",
|
"pages/merchant-rank/merchant-rank",
|
||||||
"pages/sjchongzhi/sjchongzhi",
|
"pages/merchant-recharge/merchant-recharge",
|
||||||
"pages/sjddxq/sjddxq",
|
"pages/merchant-order-detail/merchant-order-detail",
|
||||||
"pages/dsddxq/dsddxq",
|
"pages/fighter-order-detail/fighter-order-detail",
|
||||||
"pages/liaotian/liaotian",
|
"pages/chat/chat",
|
||||||
"pages/jisufd/jisufd",
|
"pages/express-order/express-order",
|
||||||
"pages/jiedanchi/jiedanchi",
|
"pages/order-pool/order-pool",
|
||||||
"pages/haibao/haibao",
|
"pages/poster/poster",
|
||||||
"pages/jinpaids/jinpaids",
|
"pages/gold-fighter/gold-fighter",
|
||||||
"pages/zuzhangduan/zuzhangduan",
|
"pages/leader/leader",
|
||||||
"pages/guanzhual/guanzhual",
|
"pages/manager-assign/manager-assign",
|
||||||
"pages/zzfhjilu/zzfhjilu",
|
"pages/leader-bonus-log/leader-bonus-log",
|
||||||
"pages/yqguanshi/yqguanshi",
|
"pages/invite-manager/invite-manager",
|
||||||
"pages/jiedanchi2/jiedanchi2",
|
"pages/order-pool2/order-pool2",
|
||||||
"pages/qunliaotian/qunliaotian",
|
"pages/group-chat/group-chat",
|
||||||
"pages/kefuliaotian/kefuliaotian",
|
"pages/cs-chat/cs-chat",
|
||||||
"pages/renzheng/renzheng",
|
"pages/verify/verify",
|
||||||
"components/global-notification/global-notification",
|
"components/global-notification/global-notification",
|
||||||
"components/popup-notice/popup-notice",
|
"components/popup-notice/popup-notice",
|
||||||
"components/order-card/order-card",
|
"components/order-card/order-card",
|
||||||
"components/order-sender/order-sender",
|
"components/order-sender/order-sender",
|
||||||
"pages/cfss/cfss/cfss",
|
"pages/penalty/penalty/penalty",
|
||||||
"pages/cfss/components/fakuan-list/fakuan-list",
|
"pages/penalty/components/fakuan-list/fakuan-list",
|
||||||
"pages/cfss/components/jifen-list/jifen-list",
|
"pages/penalty/components/jifen-list/jifen-list",
|
||||||
"pages/cfss/components/fakuan-pay/fakuan-pay",
|
"pages/penalty/components/fakuan-pay/fakuan-pay",
|
||||||
"pages/phone-auth/phone-auth",
|
"pages/phone-auth/phone-auth",
|
||||||
"components/chenghao-tag/chenghao-tag",
|
"components/chenghao-tag/chenghao-tag",
|
||||||
"pages/kaoheguan/kaoheguan",
|
"pages/assessor/assessor",
|
||||||
"pages/kaohe_dafen/kaohe_dafen",
|
"pages/assess-score/assess-score",
|
||||||
"pages/kaohe_jilu/kaohe_jilu",
|
"pages/assess-log/assess-log",
|
||||||
"pages/kaohe_zhongxin/kaohe_zhongxin",
|
"pages/assess-center/assess-center",
|
||||||
"pages/kaohe_jinpai/kaohe_jinpai",
|
"pages/assess-gold/assess-gold",
|
||||||
"pages/peihuDingdan/peihuDingdan",
|
"pages/escort-orders/escort-orders",
|
||||||
"pages/tixian/components/mode1/mode1",
|
"pages/withdraw/components/mode1/mode1",
|
||||||
"pages/tixian/components/mode2/mode2"
|
"pages/withdraw/components/mode2/mode2"
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
@@ -85,13 +85,13 @@
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"pagePath": "pages/jiedanchi/jiedanchi",
|
"pagePath": "pages/order-pool/order-pool",
|
||||||
"text": "接单池",
|
"text": "接单池",
|
||||||
"iconPath": "/images/jiedanchi.png",
|
"iconPath": "/images/jiedanchi.png",
|
||||||
"selectedIconPath": "/images/jiedanchi.png"
|
"selectedIconPath": "/images/jiedanchi.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/jiedanchi2/jiedanchi2",
|
"pagePath": "pages/order-pool2/order-pool2",
|
||||||
"text": "接单池",
|
"text": "接单池",
|
||||||
"iconPath": "/images/jiedanchi.png",
|
"iconPath": "/images/jiedanchi.png",
|
||||||
"selectedIconPath": "/images/jiedanchi.png"
|
"selectedIconPath": "/images/jiedanchi.png"
|
||||||
|
|||||||
891
app.wxss
891
app.wxss
@@ -1,10 +1,889 @@
|
|||||||
/**app.wxss**/
|
/* app.wxss — 全局共享样式 */
|
||||||
.container {
|
|
||||||
height: 100%;
|
/* ========== CSS 变量 ========== */
|
||||||
|
page {
|
||||||
|
--color-price: #ff4444;
|
||||||
|
--color-text-main: #333;
|
||||||
|
--color-text-gray: #999;
|
||||||
|
--color-border-light: #f0f0f0;
|
||||||
|
--bg-white: #ffffff;
|
||||||
|
--bg-gray-hover: #f5f5f5;
|
||||||
|
|
||||||
|
--radius-lg: 30rpx;
|
||||||
|
--radius-normal: 25rpx;
|
||||||
|
--radius-full: 50%;
|
||||||
|
|
||||||
|
--padding-base: 40rpx;
|
||||||
|
--shadow-modal: 0 20rpx 60rpx rgba(0, 0, 0, 0.2);
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 动画 ========== */
|
||||||
|
@keyframes spin {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0%, 100% { opacity: 0.8; transform: scale(1); }
|
||||||
|
50% { opacity: 1; transform: scale(1.2); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modalShow {
|
||||||
|
from { opacity: 0; transform: scale(0.9); }
|
||||||
|
to { opacity: 1; transform: scale(1); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes marquee {
|
||||||
|
0% { transform: translateX(100%); }
|
||||||
|
100% { transform: translateX(-100%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeOut {
|
||||||
|
from { opacity: 1; }
|
||||||
|
to { opacity: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideUp {
|
||||||
|
from { transform: translateY(100%); }
|
||||||
|
to { transform: translateY(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideDown {
|
||||||
|
from { transform: translateY(0); }
|
||||||
|
to { transform: translateY(100%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 加载提示 ========== */
|
||||||
|
.loading-toast {
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
padding: 30rpx 50rpx;
|
||||||
|
border-radius: var(--radius-normal);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
z-index: 999;
|
||||||
padding: 200rpx 0;
|
}
|
||||||
box-sizing: border-box;
|
|
||||||
|
.loading-spinner {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border: 6rpx solid rgba(255, 255, 255, 0.3);
|
||||||
|
border-top-color: #fff;
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 价格组件 ========== */
|
||||||
|
.price-wrap {
|
||||||
|
color: var(--color-price);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.price-icon {
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-right: 2rpx;
|
||||||
|
}
|
||||||
|
.price-integer {
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
.price-decimal {
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 弹窗基础 ========== */
|
||||||
|
.modal-mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
backdrop-filter: blur(5px);
|
||||||
|
z-index: 1000;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
width: 600rpx;
|
||||||
|
background: var(--bg-white);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: var(--shadow-modal);
|
||||||
|
z-index: 1001;
|
||||||
|
animation: modalShow 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
padding: var(--padding-base);
|
||||||
|
border-bottom: 2rpx solid var(--color-border-light);
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--color-text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-close {
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: var(--color-text-gray);
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.modal-close:active {
|
||||||
|
background: var(--bg-gray-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
max-height: 600rpx;
|
||||||
|
padding: var(--padding-base);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: var(--color-text-main);
|
||||||
|
line-height: 1.6;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Flex 工具类 ========== */
|
||||||
|
.flex-center {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-between {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-column-center {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-1 {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-shrink-0 {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-wrap {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 文本工具类 ========== */
|
||||||
|
.text-ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-ellipsis-2 {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-ellipsis-3 {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-bold {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-gray {
|
||||||
|
color: var(--color-text-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-main {
|
||||||
|
color: var(--color-text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 安全区域 ========== */
|
||||||
|
.safe-bottom {
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
.safe-bottom-fixed {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 通用卡片 ========== */
|
||||||
|
.card {
|
||||||
|
background: var(--bg-white);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-padding {
|
||||||
|
padding: var(--padding-base);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 毛玻璃 ========== */
|
||||||
|
.glass {
|
||||||
|
background: rgba(255, 255, 255, 0.72);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
-webkit-backdrop-filter: blur(20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-dark {
|
||||||
|
background: rgba(0, 0, 0, 0.55);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
-webkit-backdrop-filter: blur(20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 圆形头像 ========== */
|
||||||
|
.avatar-circle {
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
border: 2rpx solid #fff;
|
||||||
|
object-fit: cover;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-sm {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-md {
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-lg {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 红点/角标 ========== */
|
||||||
|
.badge-dot {
|
||||||
|
position: absolute;
|
||||||
|
top: -6rpx;
|
||||||
|
right: -6rpx;
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
background: #fa5151;
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
border: 2rpx solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-num {
|
||||||
|
position: absolute;
|
||||||
|
top: -10rpx;
|
||||||
|
right: -10rpx;
|
||||||
|
min-width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
line-height: 32rpx;
|
||||||
|
padding: 0 8rpx;
|
||||||
|
background: #fa5151;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
text-align: center;
|
||||||
|
border: 2rpx solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 空状态 ========== */
|
||||||
|
.empty-state {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 120rpx 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-icon {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: var(--color-text-gray);
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-subtext {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 分割线 ========== */
|
||||||
|
.divider {
|
||||||
|
height: 2rpx;
|
||||||
|
background: var(--color-border-light);
|
||||||
|
margin: 20rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider-light {
|
||||||
|
height: 1rpx;
|
||||||
|
background: rgba(0, 0, 0, 0.04);
|
||||||
|
margin: 16rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider-gradient {
|
||||||
|
height: 2rpx;
|
||||||
|
background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
|
||||||
|
margin: 20rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 固定底部按钮区 ========== */
|
||||||
|
.fixed-bottom {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||||
|
background: linear-gradient(transparent, rgba(255, 255, 255, 0.95) 30%);
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 列表项 ========== */
|
||||||
|
.list-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 24rpx 28rpx;
|
||||||
|
border-bottom: 1rpx solid rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-icon {
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-text {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: var(--color-text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-arrow {
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
opacity: 0.4;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 标签 ========== */
|
||||||
|
.tag {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 4rpx 14rpx;
|
||||||
|
border-radius: 999rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-primary {
|
||||||
|
background: rgba(64, 156, 255, 0.1);
|
||||||
|
color: #409cff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-success {
|
||||||
|
background: rgba(82, 196, 26, 0.1);
|
||||||
|
color: #52c41a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-warning {
|
||||||
|
background: rgba(250, 173, 20, 0.1);
|
||||||
|
color: #faad14;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-danger {
|
||||||
|
background: rgba(255, 77, 79, 0.1);
|
||||||
|
color: #ff4d4f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-gold {
|
||||||
|
background: rgba(201, 169, 98, 0.1);
|
||||||
|
color: #C9A962;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 页面容器 ========== */
|
||||||
|
.page-container {
|
||||||
|
min-height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-bg {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 按钮 ========== */
|
||||||
|
.btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 48rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
border: none;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主按钮(全宽) */
|
||||||
|
.btn-primary {
|
||||||
|
width: 100%;
|
||||||
|
height: 96rpx;
|
||||||
|
line-height: 96rpx;
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary--gold {
|
||||||
|
background: linear-gradient(135deg, #C9A962, #D4B56A);
|
||||||
|
box-shadow: 0 8rpx 20rpx rgba(201, 169, 98, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary--green {
|
||||||
|
background: linear-gradient(135deg, #52c41a, #389e0d);
|
||||||
|
box-shadow: 0 8rpx 20rpx rgba(82, 196, 26, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary--blue {
|
||||||
|
background: linear-gradient(135deg, #409cff, #3080e0);
|
||||||
|
box-shadow: 0 8rpx 20rpx rgba(64, 156, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary--orange {
|
||||||
|
background: linear-gradient(135deg, #ffb347, #ff8c1a);
|
||||||
|
box-shadow: 0 8rpx 20rpx rgba(255, 140, 26, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary--purple {
|
||||||
|
background: linear-gradient(135deg, #6a11cb, #2575fc);
|
||||||
|
box-shadow: 0 8rpx 20rpx rgba(106, 17, 203, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary--red {
|
||||||
|
background: linear-gradient(135deg, #ff4d4f, #cf1322);
|
||||||
|
box-shadow: 0 8rpx 20rpx rgba(255, 77, 79, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 次要按钮 */
|
||||||
|
.btn-secondary {
|
||||||
|
background: rgba(0, 0, 0, 0.04);
|
||||||
|
color: var(--color-text-main);
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding: 16rpx 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary:active {
|
||||||
|
background: rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 小型按钮 */
|
||||||
|
.btn-sm {
|
||||||
|
padding: 14rpx 32rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm--gold {
|
||||||
|
background: linear-gradient(135deg, #ffcc00, #ffaa00);
|
||||||
|
box-shadow: 0 6rpx 16rpx rgba(255, 170, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm--green {
|
||||||
|
background: linear-gradient(135deg, #52c41a, #389e0d);
|
||||||
|
box-shadow: 0 6rpx 16rpx rgba(82, 196, 26, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm--blue {
|
||||||
|
background: linear-gradient(135deg, #409cff, #3080e0);
|
||||||
|
box-shadow: 0 6rpx 16rpx rgba(64, 156, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm--red {
|
||||||
|
background: linear-gradient(135deg, #ff4d4f, #cf1322);
|
||||||
|
box-shadow: 0 6rpx 16rpx rgba(255, 77, 79, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm--dark {
|
||||||
|
background: linear-gradient(135deg, #3d4f66, #2c3e50);
|
||||||
|
box-shadow: 0 6rpx 16rpx rgba(44, 62, 80, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 幽灵按钮(描边) */
|
||||||
|
.btn-ghost {
|
||||||
|
background: transparent;
|
||||||
|
border: 2rpx solid currentColor;
|
||||||
|
padding: 14rpx 32rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-ghost--primary {
|
||||||
|
color: #409cff;
|
||||||
|
border-color: #409cff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-ghost--gold {
|
||||||
|
color: #C9A962;
|
||||||
|
border-color: #C9A962;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 禁用状态 */
|
||||||
|
.btn[disabled],
|
||||||
|
.btn-disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 输入框 ========== */
|
||||||
|
.input-rounded {
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 44rpx;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: var(--color-text-main);
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-rounded--dark {
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
color: #fff;
|
||||||
|
border: 1rpx solid rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-rounded--dark::placeholder {
|
||||||
|
color: rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-inline {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: var(--color-text-main);
|
||||||
|
height: 50rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-box {
|
||||||
|
background: #F7F3ED;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 搜索框 ========== */
|
||||||
|
.search-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box--glass {
|
||||||
|
background: rgba(255, 255, 255, 0.85);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
border: 1rpx solid rgba(255, 255, 255, 0.3);
|
||||||
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||||
|
height: 84rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
padding: 0 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-icon {
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
opacity: 0.5;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Tab 标签栏 ========== */
|
||||||
|
.tab-bar {
|
||||||
|
display: flex;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 24rpx 0;
|
||||||
|
position: relative;
|
||||||
|
color: #666;
|
||||||
|
font-size: 28rpx;
|
||||||
|
transition: color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item--active {
|
||||||
|
color: var(--color-price);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-indicator {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 60rpx;
|
||||||
|
height: 6rpx;
|
||||||
|
background: var(--color-price);
|
||||||
|
border-radius: 3rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 胶囊式 Tab */
|
||||||
|
.tab-capsule {
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 60rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
background: #f5f5f5;
|
||||||
|
color: #666;
|
||||||
|
font-size: 28rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-capsule--active {
|
||||||
|
background: #e8f5e9;
|
||||||
|
color: #2e7d32;
|
||||||
|
font-weight: 500;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(46, 125, 50, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 加载遮罩 ========== */
|
||||||
|
.loading-mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-mask--dark {
|
||||||
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-mask--light {
|
||||||
|
background: rgba(255, 255, 255, 0.85);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 旋转器尺寸变体 */
|
||||||
|
.spinner {
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
animation: spin 0.8s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner--sm {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border: 3rpx solid rgba(0, 0, 0, 0.08);
|
||||||
|
border-top-color: var(--color-text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner--md {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border: 5rpx solid rgba(0, 0, 0, 0.08);
|
||||||
|
border-top-color: var(--color-text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner--lg {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border: 6rpx solid rgba(0, 0, 0, 0.08);
|
||||||
|
border-top-color: var(--color-text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner--white {
|
||||||
|
border-color: rgba(255, 255, 255, 0.3);
|
||||||
|
border-top-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 刷新按钮 ========== */
|
||||||
|
.refresh-btn {
|
||||||
|
position: fixed;
|
||||||
|
top: 36rpx;
|
||||||
|
right: 32rpx;
|
||||||
|
width: 56rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh-btn--light {
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
backdrop-filter: blur(12rpx);
|
||||||
|
border: 1rpx solid rgba(255, 255, 255, 0.6);
|
||||||
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh-btn--dark {
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
backdrop-filter: blur(10rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh-icon {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 状态标签 ========== */
|
||||||
|
.status-tag {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6rpx 16rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-tag--danger {
|
||||||
|
background: #fff5f5;
|
||||||
|
color: #ff6b6b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-tag--success {
|
||||||
|
background: #f0fff0;
|
||||||
|
color: #52c41a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-tag--warning {
|
||||||
|
background: #fffbe6;
|
||||||
|
color: #faad14;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-tag--info {
|
||||||
|
background: #e6f7ff;
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-tag--default {
|
||||||
|
background: #f5f5f5;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== 加载更多 ========== */
|
||||||
|
.load-more {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-more-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: var(--color-text-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-more {
|
||||||
|
text-align: center;
|
||||||
|
padding: 40rpx 0;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ Component({
|
|||||||
progressInterval: null,
|
progressInterval: null,
|
||||||
positionClass: 'top',
|
positionClass: 'top',
|
||||||
|
|
||||||
// 滑动相关
|
|
||||||
touchStartY: 0,
|
touchStartY: 0,
|
||||||
touchStartX: 0,
|
touchStartX: 0,
|
||||||
currentY: 0,
|
currentY: 0,
|
||||||
@@ -317,20 +316,17 @@ Component({
|
|||||||
let path = '';
|
let path = '';
|
||||||
let queryParam = null;
|
let queryParam = null;
|
||||||
|
|
||||||
// 根据 notificationType 或消息字段判断
|
|
||||||
if (data.notificationType === 'cs' || msg.teamId) {
|
if (data.notificationType === 'cs' || msg.teamId) {
|
||||||
// 客服消息
|
|
||||||
const teamId = data.teamId || msg.teamId;
|
const teamId = data.teamId || msg.teamId;
|
||||||
path = '/pages/kefuliaotian/kefuliaotian';
|
path = '/pages/cs-chat/cs-chat';
|
||||||
queryParam = { teamId: teamId };
|
queryParam = { teamId: teamId };
|
||||||
} else if (data.notificationType === 'group' || msg.groupId) {
|
} else if (data.notificationType === 'group' || msg.groupId) {
|
||||||
// 群聊消息
|
|
||||||
const groupId = data.groupId || msg.groupId;
|
const groupId = data.groupId || msg.groupId;
|
||||||
const orderId = data.orderId || msg.orderId || '';
|
const orderId = data.orderId || msg.orderId || '';
|
||||||
const groupName = data.groupName || '订单群聊';
|
const groupName = data.groupName || '订单群聊';
|
||||||
const groupAvatar = data.groupAvatar || '';
|
const groupAvatar = data.groupAvatar || '';
|
||||||
const isCross = data.isCross || msg.isCross || 0;
|
const isCross = data.isCross || msg.isCross || 0;
|
||||||
path = '/pages/qunliaotian/qunliaotian';
|
path = '/pages/group-chat/group-chat';
|
||||||
queryParam = {
|
queryParam = {
|
||||||
groupId,
|
groupId,
|
||||||
orderId,
|
orderId,
|
||||||
@@ -339,11 +335,10 @@ Component({
|
|||||||
isCross
|
isCross
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// 默认私聊
|
|
||||||
const toUserId = data.senderId || msg.senderId;
|
const toUserId = data.senderId || msg.senderId;
|
||||||
const toName = data.senderName || '用户';
|
const toName = data.senderName || '用户';
|
||||||
const toAvatar = data.avatar || '';
|
const toAvatar = data.avatar || '';
|
||||||
path = '/pages/liaotian/liaotian';
|
path = '/pages/chat/chat';
|
||||||
queryParam = {
|
queryParam = {
|
||||||
toUserId,
|
toUserId,
|
||||||
toName,
|
toName,
|
||||||
@@ -357,11 +352,11 @@ Component({
|
|||||||
url: `${path}?data=${encoded}`,
|
url: `${path}?data=${encoded}`,
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('通知跳转失败:', err);
|
console.error('通知跳转失败:', err);
|
||||||
wx.switchTab({ url: '/pages/xiaoxi/xiaoxi' });
|
wx.switchTab({ url: '/pages/messages/messages' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
wx.switchTab({ url: '/pages/xiaoxi/xiaoxi' });
|
wx.switchTab({ url: '/pages/messages/messages' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ Component({
|
|||||||
isFullscreen: false,
|
isFullscreen: false,
|
||||||
timer: null,
|
timer: null,
|
||||||
|
|
||||||
// 悬浮窗相关数据
|
|
||||||
isMinimized: false,
|
isMinimized: false,
|
||||||
floatX: 20,
|
floatX: 20,
|
||||||
floatY: 200,
|
floatY: 200,
|
||||||
@@ -163,7 +162,7 @@ Component({
|
|||||||
this.setData({ muteChecked: e.detail.value.length > 0 });
|
this.setData({ muteChecked: e.detail.value.length > 0 });
|
||||||
},
|
},
|
||||||
|
|
||||||
// 🆕 替换原有的 onPreviewImage,改用自定义预览(不触发 onShow)
|
// 自定义图片预览
|
||||||
onCustomPreview(e) {
|
onCustomPreview(e) {
|
||||||
const index = e.currentTarget.dataset.index;
|
const index = e.currentTarget.dataset.index;
|
||||||
const urls = this.data.processedImages.map(img => img.url);
|
const urls = this.data.processedImages.map(img => img.url);
|
||||||
@@ -174,7 +173,6 @@ Component({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 🆕 关闭自定义预览
|
|
||||||
onCloseCustomPreview() {
|
onCloseCustomPreview() {
|
||||||
this.setData({
|
this.setData({
|
||||||
showCustomPreview: false,
|
showCustomPreview: false,
|
||||||
@@ -225,7 +223,7 @@ Component({
|
|||||||
if (app.globalData.morentouxiang) {
|
if (app.globalData.morentouxiang) {
|
||||||
avatarUrl = app.globalData.morentouxiang;
|
avatarUrl = app.globalData.morentouxiang;
|
||||||
} else {
|
} else {
|
||||||
// 使用内嵌的默认头像 base64(灰色圆形),确保绝对显示,不依赖外部图片
|
// 默认头像
|
||||||
avatarUrl = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSI1MCIgZmlsbD0iI2NjY2NjYyIvPjxwYXRoIGQ9Ik01MCAyNWMtMTMuOCAwLTI1IDExLjItMjUgMjUgMCAzLjIgMS4yIDYuMSAzLjIgOC4zQzM0LjQgNzAuNyA0Mi4xIDc1IDUwIDc1czE1LjYtNC4zIDIxLjgtMTEuN0M3My44IDU2LjEgNzUgNTMuMiA3NSA1MGMwLTEzLjgtMTEuMi0yNS0yNS0yNXoiIGZpbGw9IiNmZmZmZmYiLz48L3N2Zz4=';
|
avatarUrl = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSI1MCIgZmlsbD0iI2NjY2NjYyIvPjxwYXRoIGQ9Ik01MCAyNWMtMTMuOCAwLTI1IDExLjItMjUgMjUgMCAzLjIgMS4yIDYuMSAzLjIgOC4zQzM0LjQgNzAuNyA0Mi4xIDc1IDUwIDc1czE1LjYtNC4zIDIxLjgtMTEuN0M3My44IDU2LjEgNzUgNTMuMiA3NSA1MGMwLTEzLjgtMTEuMi0yNS0yNS0yNXoiIGZpbGw9IiNmZmZmZmYiLz48L3N2Zz4=';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +317,7 @@ Component({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 🆕 阻止事件冒泡(用于预览遮罩内部点击不关闭)
|
// 阻止事件冒泡
|
||||||
stopPropagation() {}
|
stopPropagation() {}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<!-- components/popup-notice/popup-notice.wxml -->
|
<!-- components/popup-notice/popup-notice.wxml -->
|
||||||
|
|
||||||
<!-- 全屏弹窗遮罩层(完全不变) -->
|
|
||||||
<view class="popup-mask" wx:if="{{visible}}" catchtouchmove="preventMove">
|
<view class="popup-mask" wx:if="{{visible}}" catchtouchmove="preventMove">
|
||||||
<view class="popup-container {{isFullscreen ? 'fullscreen' : ''}}">
|
<view class="popup-container {{isFullscreen ? 'fullscreen' : ''}}">
|
||||||
<!-- 右上角操作按钮组 -->
|
<!-- 右上角操作按钮组 -->
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 以下原有 movable-view 相关样式已弃用,但保留以维持代码完整(用户要求不删代码) */
|
/* 弃用样式 */
|
||||||
.floating-area {
|
.floating-area {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,26 +7,26 @@ const roleCfg = {
|
|||||||
name: '点单老板',
|
name: '点单老板',
|
||||||
tabList: [
|
tabList: [
|
||||||
{ pagePath: 'pages/index/index', text: '商城', iconPath: '/images/zhuye.png', selectedIconPath: '/images/zhuye.png' },
|
{ pagePath: 'pages/index/index', text: '商城', iconPath: '/images/zhuye.png', selectedIconPath: '/images/zhuye.png' },
|
||||||
{ pagePath: 'pages/fenlei/fenlei', text: '分类', iconPath: '/images/fenlei.png', selectedIconPath: '/images/fenlei.png' },
|
{ pagePath: 'pages/category/category', text: '分类', iconPath: '/images/fenlei.png', selectedIconPath: '/images/fenlei.png' },
|
||||||
{ pagePath: 'pages/xiaoxi/xiaoxi', text: '消息', iconPath: '/images/xiaoxi.png', selectedIconPath: '/images/xiaoxi.png' },
|
{ pagePath: 'pages/messages/messages', text: '消息', iconPath: '/images/xiaoxi.png', selectedIconPath: '/images/xiaoxi.png' },
|
||||||
{ pagePath: 'pages/wode/wode', text: '我的', iconPath: '/images/wode.png', selectedIconPath: '/images/wode.png' },
|
{ pagePath: 'pages/mine/mine', text: '我的', iconPath: '/images/wode.png', selectedIconPath: '/images/wode.png' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
dashou: {
|
dashou: {
|
||||||
name: '打手',
|
name: '打手',
|
||||||
tabList: [
|
tabList: [
|
||||||
{ pagePath: 'pages/jiedan/jiedan', text: '接单池', iconPath: '/images/jiedanchi.png', selectedIconPath: '/images/jiedanchi.png' },
|
{ pagePath: 'pages/accept-order/accept-order', text: '接单池', iconPath: '/images/jiedanchi.png', selectedIconPath: '/images/jiedanchi.png' },
|
||||||
{ pagePath: 'pages/dashoudingdan/dashoudingdan', text: '订单', iconPath: '/images/dingdan.png', selectedIconPath: '/images/dingdan.png' },
|
{ pagePath: 'pages/fighter-orders/fighter-orders', text: '订单', iconPath: '/images/dingdan.png', selectedIconPath: '/images/dingdan.png' },
|
||||||
{ pagePath: 'pages/xiaoxi/xiaoxi', text: '消息', iconPath: '/images/xiaoxi.png', selectedIconPath: '/images/xiaoxi.png' },
|
{ pagePath: 'pages/messages/messages', text: '消息', iconPath: '/images/xiaoxi.png', selectedIconPath: '/images/xiaoxi.png' },
|
||||||
{ pagePath: 'pages/dashouduan/dashouduan', text: '我的', iconPath: '/images/wode.png', selectedIconPath: '/images/wode.png' },
|
{ pagePath: 'pages/fighter/fighter', text: '我的', iconPath: '/images/wode.png', selectedIconPath: '/images/wode.png' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
shangjia: {
|
shangjia: {
|
||||||
name: '商家',
|
name: '商家',
|
||||||
tabList: [
|
tabList: [
|
||||||
{ pagePath: 'pages/sjdingdan/sjdingdan', text: '订单', iconPath: '/images/dingdan.png', selectedIconPath: '/images/dingdan.png' },
|
{ pagePath: 'pages/merchant-orders/merchant-orders', text: '订单', iconPath: '/images/dingdan.png', selectedIconPath: '/images/dingdan.png' },
|
||||||
{ pagePath: 'pages/xiaoxi/xiaoxi', text: '消息', iconPath: '/images/xiaoxi.png', selectedIconPath: '/images/xiaoxi.png' },
|
{ pagePath: 'pages/messages/messages', text: '消息', iconPath: '/images/xiaoxi.png', selectedIconPath: '/images/xiaoxi.png' },
|
||||||
{ pagePath: 'pages/shangjiaduan/shangjiaduan', text: '我的', iconPath: '/images/wode.png', selectedIconPath: '/images/wode.png' },
|
{ pagePath: 'pages/merchant/merchant', text: '我的', iconPath: '/images/wode.png', selectedIconPath: '/images/wode.png' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
data-index="{{index}}"
|
data-index="{{index}}"
|
||||||
catchtap="switchTab"
|
catchtap="switchTab"
|
||||||
>
|
>
|
||||||
<view class="badge-container" wx:if="{{item.pagePath === 'pages/xiaoxi/xiaoxi' && badgeText}}">
|
<view class="badge-container" wx:if="{{item.pagePath === 'pages/messages/messages' && badgeText}}">
|
||||||
<view class="tab-badge">{{badgeText}}</view>
|
<view class="tab-badge">{{badgeText}}</view>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ Page({
|
|||||||
|
|
||||||
// 跳转到充值页面(原封不动)
|
// 跳转到充值页面(原封不动)
|
||||||
goToChongzhiPage(failureType, huiyuanId = null, requiredYajin = 0) {
|
goToChongzhiPage(failureType, huiyuanId = null, requiredYajin = 0) {
|
||||||
let url = '/pages/dashouchongzhi/dashouchongzhi';
|
let url = '/pages/fighter-recharge/fighter-recharge';
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
switch (failureType) {
|
switch (failureType) {
|
||||||
@@ -193,7 +193,7 @@ Page({
|
|||||||
success: (modalRes) => {
|
success: (modalRes) => {
|
||||||
if (modalRes.confirm) {
|
if (modalRes.confirm) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/kaohe_dafen/kaohe_dafen?jilu_id=' + jiluId
|
url: '/pages/assess-score/assess-score?jilu_id=' + jiluId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,6 @@
|
|||||||
animation: spin 0.8s linear infinite;
|
animation: spin 0.8s linear infinite;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
@keyframes spin { to { transform: rotate(360deg); } }
|
|
||||||
|
|
||||||
/* 弹窗 */
|
/* 弹窗 */
|
||||||
.modal-mask {
|
.modal-mask {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/kaohe_jinpai/kaohe_jinpai.js
|
// pages/assess-gold/assess-gold.js
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
import request from '../../utils/request.js';
|
import request from '../../utils/request.js';
|
||||||
|
|
||||||
@@ -433,7 +433,7 @@ Page({
|
|||||||
toAvatar: fullAvatar
|
toAvatar: fullAvatar
|
||||||
};
|
};
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/liaotian/liaotian?data=' + encodeURIComponent(JSON.stringify(param)),
|
url: '/pages/chat/chat?data=' + encodeURIComponent(JSON.stringify(param)),
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
wx.showToast({ title: '打开聊天失败', icon: 'none' });
|
wx.showToast({ title: '打开聊天失败', icon: 'none' });
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- pages/kaohe_jinpai/kaohe_jinpai.wxml -->
|
<!-- pages/assess-gold/assess-gold.wxml -->
|
||||||
<view class="page-root">
|
<view class="page-root">
|
||||||
<!-- 顶部Tab切换 -->
|
<!-- 顶部Tab切换 -->
|
||||||
<view class="tab-bar">
|
<view class="tab-bar">
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/kaohe_jinpai/kaohe_jinpai.wxss - 晨雾微光风格 */
|
/* pages/assess-gold/assess-gold.wxss - 晨雾微光风格 */
|
||||||
.page-root {
|
.page-root {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: linear-gradient(135deg, #F5F7FA 0%, #E4E8F0 100%);
|
background: linear-gradient(135deg, #F5F7FA 0%, #E4E8F0 100%);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/kaohe_jilu/kaohe_jilu.js
|
// pages/assess-log/assess-log.js
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
import request from '../../utils/request.js';
|
import request from '../../utils/request.js';
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ Page({
|
|||||||
goJudge(e) {
|
goJudge(e) {
|
||||||
const item = e.currentTarget.dataset.item;
|
const item = e.currentTarget.dataset.item;
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
wx.navigateTo({ url: '/pages/kaohe_dafen/kaohe_dafen?jilu_id=' + item.jilu_id });
|
wx.navigateTo({ url: '/pages/assess-score/assess-score?jilu_id=' + item.jilu_id });
|
||||||
},
|
},
|
||||||
|
|
||||||
// 阻止冒泡
|
// 阻止冒泡
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- pages/kaohe_jilu/kaohe_jilu.wxml -->
|
<!-- pages/assess-log/assess-log.wxml -->
|
||||||
<view class="page-root">
|
<view class="page-root">
|
||||||
<!-- 顶部筛选区 -->
|
<!-- 顶部筛选区 -->
|
||||||
<view class="filter-bar">
|
<view class="filter-bar">
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/kaohe_jilu/kaohe_jilu.wxss - 晨露微光风格(左右均等边距) */
|
/* pages/assess-log/assess-log.wxss - 晨露微光风格(左右均等边距) */
|
||||||
page {
|
page {
|
||||||
background: linear-gradient(135deg, #FDFBF7 0%, #F2EFE9 100%);
|
background: linear-gradient(135deg, #FDFBF7 0%, #F2EFE9 100%);
|
||||||
color: #4A4A4A;
|
color: #4A4A4A;
|
||||||
@@ -260,4 +260,3 @@ page {
|
|||||||
animation: spin 0.8s linear infinite;
|
animation: spin 0.8s linear infinite;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
@keyframes spin { to { transform: rotate(360deg); } }
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/kaohe_dafen/kaohe_dafen.js
|
// pages/assess-score/assess-score.js
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
import request from '../../utils/request.js';
|
import request from '../../utils/request.js';
|
||||||
import { openPrivateChat, buildDashouPeerId } from '../../utils/im-user.js';
|
import { openPrivateChat, buildDashouPeerId } from '../../utils/im-user.js';
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- pages/kaohe_dafen/kaohe_dafen.wxml -->
|
<!-- pages/assess-score/assess-score.wxml -->
|
||||||
<view class="root-page">
|
<view class="root-page">
|
||||||
<view class="scroll-container" scroll-y="true" bindscrolltolower="onReachBottom">
|
<view class="scroll-container" scroll-y="true" bindscrolltolower="onReachBottom">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/kaoheguan/kaoheguan.js
|
// pages/assessor/assessor.js
|
||||||
// 只新增了两个字段的接收,其余所有代码未变
|
// 只新增了两个字段的接收,其余所有代码未变
|
||||||
import request from '../../utils/request.js';
|
import request from '../../utils/request.js';
|
||||||
import {
|
import {
|
||||||
@@ -48,7 +48,7 @@ Page({
|
|||||||
_planetTimers: {},
|
_planetTimers: {},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
wx.redirectTo({ url: '/pages/dashouduan/dashouduan' });
|
wx.redirectTo({ url: '/pages/fighter/fighter' });
|
||||||
return;
|
return;
|
||||||
const ossUrl = app.globalData.ossImageUrl || '';
|
const ossUrl = app.globalData.ossImageUrl || '';
|
||||||
const iconBase = 'beijing/kaohe/';
|
const iconBase = 'beijing/kaohe/';
|
||||||
@@ -191,12 +191,12 @@ Page({
|
|||||||
goToWithdraw() {
|
goToWithdraw() {
|
||||||
const yue = this.data.kaoheData.yue || 0;
|
const yue = this.data.kaoheData.yue || 0;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/tixian/tixian?amount=${yue}&from=kaoheguan`
|
url: `/pages/withdraw/withdraw?amount=${yue}&from=kaoheguan`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goToDafen() { wx.navigateTo({ url: '/pages/kaohe_dafen/kaohe_dafen' }); },
|
goToDafen() { wx.navigateTo({ url: '/pages/assess-score/assess-score' }); },
|
||||||
goToJilu() { wx.navigateTo({ url: '/pages/kaohe_jilu/kaohe_jilu' }); },
|
goToJilu() { wx.navigateTo({ url: '/pages/assess-log/assess-log' }); },
|
||||||
goToZhongxin() { wx.navigateTo({ url: '/pages/kaohe_zhongxin/kaohe_zhongxin' }); },
|
goToZhongxin() { wx.navigateTo({ url: '/pages/assess-center/assess-center' }); },
|
||||||
|
|
||||||
onPlanetTouch(e) {
|
onPlanetTouch(e) {
|
||||||
const id = e.currentTarget.dataset.id;
|
const id = e.currentTarget.dataset.id;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- pages/kaoheguan/kaoheguan.wxml -->
|
<!-- pages/assessor/assessor.wxml -->
|
||||||
<view class="universe-root">
|
<view class="universe-root">
|
||||||
<!-- 全屏弱化背景图 -->
|
<!-- 全屏弱化背景图 -->
|
||||||
<image class="full-bg" src="{{icons.bgImage}}" mode="aspectFill" />
|
<image class="full-bg" src="{{icons.bgImage}}" mode="aspectFill" />
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/kaoheguan/kaoheguan.wxss — 完整版:适度背景 + 整体下移 */
|
/* pages/assessor/assessor.wxss — 完整版:适度背景 + 整体下移 */
|
||||||
|
|
||||||
page {
|
page {
|
||||||
background: #0a0c14;
|
background: #0a0c14;
|
||||||
@@ -1,80 +1,52 @@
|
|||||||
// pages/fenlei/fenlei.js
|
// pages/category/category.js
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
/**
|
|
||||||
* 页面的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
data: {
|
||||||
// 全局变量引用
|
|
||||||
ossImageUrl: '',
|
ossImageUrl: '',
|
||||||
|
|
||||||
// 搜索相关
|
|
||||||
searchText: '',
|
searchText: '',
|
||||||
showSearchResult: false,
|
showSearchResult: false,
|
||||||
searchResults: [],
|
searchResults: [],
|
||||||
isSearching: false,
|
isSearching: false,
|
||||||
|
|
||||||
// 页面数据
|
|
||||||
shangpinleixing: [],
|
shangpinleixing: [],
|
||||||
shangpinzhuanqu: [],
|
shangpinzhuanqu: [],
|
||||||
shangpinliebiao: [],
|
shangpinliebiao: [],
|
||||||
|
|
||||||
// 状态控制
|
|
||||||
selectedLeixingId: null,
|
selectedLeixingId: null,
|
||||||
selectedZhuanquId: null,
|
selectedZhuanquId: null,
|
||||||
filteredZhuanquList: [], // 当前类型下的专区列表
|
filteredZhuanquList: [],
|
||||||
filteredShangpinList: [], // 当前专区下的商品列表
|
filteredShangpinList: [],
|
||||||
zhuanquByLeixing: {}, // 类型->专区映射对象
|
zhuanquByLeixing: {},
|
||||||
shangpinByZhuanqu: {}, // 专区->商品映射对象
|
shangpinByZhuanqu: {},
|
||||||
zhuanquGoodsCount: {}, // 专区商品数量统计
|
zhuanquGoodsCount: {},
|
||||||
|
|
||||||
// UI状态
|
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
hasInitialized: false
|
hasInitialized: false
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面加载
|
|
||||||
*/
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 获取全局变量
|
|
||||||
this.setData({
|
this.setData({
|
||||||
ossImageUrl: app.globalData.ossImageUrl
|
ossImageUrl: app.globalData.ossImageUrl
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化数据
|
|
||||||
this.initPageData()
|
this.initPageData()
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
// 原有代码...
|
|
||||||
|
|
||||||
// 🆕 注册通知组件
|
|
||||||
this.registerNotificationComponent();
|
this.registerNotificationComponent();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 🆕 新增:注册通知组件
|
registerNotificationComponent() {
|
||||||
registerNotificationComponent() {
|
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
const notificationComp = this.selectComponent('#global-notification');
|
const notificationComp = this.selectComponent('#global-notification');
|
||||||
|
|
||||||
if (notificationComp && notificationComp.showNotification) {
|
if (notificationComp && notificationComp.showNotification) {
|
||||||
console.log('🏪 商城页面注册通知组件');
|
|
||||||
app.globalData.globalNotification = {
|
app.globalData.globalNotification = {
|
||||||
show: (data) => notificationComp.showNotification(data),
|
show: (data) => notificationComp.showNotification(data),
|
||||||
hide: () => notificationComp.hideNotification()
|
hide: () => notificationComp.hideNotification()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始化页面数据
|
|
||||||
*/
|
|
||||||
initPageData() {
|
initPageData() {
|
||||||
const that = this
|
const that = this
|
||||||
this.setData({ isLoading: true })
|
this.setData({ isLoading: true })
|
||||||
|
|
||||||
// 检查全局变量是否已有数据
|
|
||||||
if (app.globalData.shangpinleixing && app.globalData.shangpinleixing.length > 0) {
|
if (app.globalData.shangpinleixing && app.globalData.shangpinleixing.length > 0) {
|
||||||
this.initFromGlobalData()
|
this.initFromGlobalData()
|
||||||
} else {
|
} else {
|
||||||
@@ -82,20 +54,15 @@ registerNotificationComponent() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 从全局变量初始化数据
|
|
||||||
*/
|
|
||||||
initFromGlobalData() {
|
initFromGlobalData() {
|
||||||
const leixingList = app.globalData.shangpinleixing || []
|
const leixingList = app.globalData.shangpinleixing || []
|
||||||
const zhuanquList = app.globalData.shangpinzhuanqu || []
|
const zhuanquList = app.globalData.shangpinzhuanqu || []
|
||||||
const shangpinList = app.globalData.shangpinliebiao || []
|
const shangpinList = app.globalData.shangpinliebiao || []
|
||||||
|
|
||||||
// 构建映射关系对象
|
|
||||||
const zhuanquByLeixing = {}
|
const zhuanquByLeixing = {}
|
||||||
const shangpinByZhuanqu = {}
|
const shangpinByZhuanqu = {}
|
||||||
const zhuanquGoodsCount = {}
|
const zhuanquGoodsCount = {}
|
||||||
|
|
||||||
// 1. 构建专区映射 (按类型分组)
|
|
||||||
zhuanquList.forEach(zhuanqu => {
|
zhuanquList.forEach(zhuanqu => {
|
||||||
const leixingId = zhuanqu.leixing_id
|
const leixingId = zhuanqu.leixing_id
|
||||||
if (!zhuanquByLeixing[leixingId]) {
|
if (!zhuanquByLeixing[leixingId]) {
|
||||||
@@ -104,7 +71,6 @@ registerNotificationComponent() {
|
|||||||
zhuanquByLeixing[leixingId].push(zhuanqu)
|
zhuanquByLeixing[leixingId].push(zhuanqu)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 2. 构建商品映射 (按专区分组)并统计数量
|
|
||||||
shangpinList.forEach(shangpin => {
|
shangpinList.forEach(shangpin => {
|
||||||
const zhuanquId = shangpin.zhuanqu_id
|
const zhuanquId = shangpin.zhuanqu_id
|
||||||
if (zhuanquId) {
|
if (zhuanquId) {
|
||||||
@@ -112,17 +78,13 @@ registerNotificationComponent() {
|
|||||||
shangpinByZhuanqu[zhuanquId] = []
|
shangpinByZhuanqu[zhuanquId] = []
|
||||||
zhuanquGoodsCount[zhuanquId] = 0
|
zhuanquGoodsCount[zhuanquId] = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理价格显示
|
|
||||||
const jiage = parseFloat(shangpin.jiage) || 0
|
const jiage = parseFloat(shangpin.jiage) || 0
|
||||||
const priceInteger = Math.floor(jiage)
|
const priceInteger = Math.floor(jiage)
|
||||||
let priceDecimal = '00'
|
let priceDecimal = '00'
|
||||||
|
|
||||||
const decimalPart = (jiage - priceInteger).toFixed(2)
|
const decimalPart = (jiage - priceInteger).toFixed(2)
|
||||||
if (decimalPart > 0) {
|
if (decimalPart > 0) {
|
||||||
priceDecimal = decimalPart.toString().split('.')[1]
|
priceDecimal = decimalPart.toString().split('.')[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
shangpinByZhuanqu[zhuanquId].push({
|
shangpinByZhuanqu[zhuanquId].push({
|
||||||
id: shangpin.id,
|
id: shangpin.id,
|
||||||
biaoqian: shangpin.biaoqian,
|
biaoqian: shangpin.biaoqian,
|
||||||
@@ -132,15 +94,12 @@ registerNotificationComponent() {
|
|||||||
tupian_url: shangpin.tupian_url,
|
tupian_url: shangpin.tupian_url,
|
||||||
duiwai_xiaoliang: shangpin.duiwai_xiaoliang || 0
|
duiwai_xiaoliang: shangpin.duiwai_xiaoliang || 0
|
||||||
})
|
})
|
||||||
|
|
||||||
zhuanquGoodsCount[zhuanquId] += 1
|
zhuanquGoodsCount[zhuanquId] += 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 设置初始选中状态(第一个类型和第一个专区)
|
|
||||||
const firstLeixing = leixingList[0]
|
const firstLeixing = leixingList[0]
|
||||||
let firstZhuanquId = null
|
let firstZhuanquId = null
|
||||||
|
|
||||||
if (firstLeixing && zhuanquByLeixing[firstLeixing.id]) {
|
if (firstLeixing && zhuanquByLeixing[firstLeixing.id]) {
|
||||||
firstZhuanquId = zhuanquByLeixing[firstLeixing.id][0]?.id || null
|
firstZhuanquId = zhuanquByLeixing[firstLeixing.id][0]?.id || null
|
||||||
}
|
}
|
||||||
@@ -155,15 +114,11 @@ registerNotificationComponent() {
|
|||||||
selectedLeixingId: firstLeixing?.id || null,
|
selectedLeixingId: firstLeixing?.id || null,
|
||||||
selectedZhuanquId: firstZhuanquId
|
selectedZhuanquId: firstZhuanquId
|
||||||
}, () => {
|
}, () => {
|
||||||
// 筛选数据
|
|
||||||
this.filterData()
|
this.filterData()
|
||||||
this.setData({ isLoading: false, hasInitialized: true })
|
this.setData({ isLoading: false, hasInitialized: true })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 加载所有商品数据
|
|
||||||
*/
|
|
||||||
loadAllShangpinData() {
|
loadAllShangpinData() {
|
||||||
const that = this
|
const that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
@@ -175,13 +130,9 @@ registerNotificationComponent() {
|
|||||||
success(res) {
|
success(res) {
|
||||||
if (res.statusCode === 200 && res.data) {
|
if (res.statusCode === 200 && res.data) {
|
||||||
const data = res.data
|
const data = res.data
|
||||||
|
|
||||||
// 存储到全局变量
|
|
||||||
app.globalData.shangpinleixing = data.shangpinleixing || []
|
app.globalData.shangpinleixing = data.shangpinleixing || []
|
||||||
app.globalData.shangpinzhuanqu = data.shangpinzhuanqu || []
|
app.globalData.shangpinzhuanqu = data.shangpinzhuanqu || []
|
||||||
app.globalData.shangpinliebiao = data.shangpinliebiao || []
|
app.globalData.shangpinliebiao = data.shangpinliebiao || []
|
||||||
|
|
||||||
// 从全局变量初始化
|
|
||||||
that.initFromGlobalData()
|
that.initFromGlobalData()
|
||||||
} else {
|
} else {
|
||||||
that.handleLoadError()
|
that.handleLoadError()
|
||||||
@@ -194,9 +145,6 @@ registerNotificationComponent() {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理加载错误
|
|
||||||
*/
|
|
||||||
handleLoadError() {
|
handleLoadError() {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '加载失败,请重试',
|
title: '加载失败,请重试',
|
||||||
@@ -205,46 +153,30 @@ registerNotificationComponent() {
|
|||||||
this.setData({ isLoading: false })
|
this.setData({ isLoading: false })
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 筛选数据
|
|
||||||
*/
|
|
||||||
filterData() {
|
filterData() {
|
||||||
const { selectedLeixingId, selectedZhuanquId, zhuanquByLeixing, shangpinByZhuanqu } = this.data
|
const { selectedLeixingId, selectedZhuanquId, zhuanquByLeixing, shangpinByZhuanqu } = this.data
|
||||||
|
|
||||||
// 1. 筛选专区列表
|
|
||||||
const filteredZhuanquList = zhuanquByLeixing[selectedLeixingId] || []
|
const filteredZhuanquList = zhuanquByLeixing[selectedLeixingId] || []
|
||||||
|
|
||||||
// 2. 筛选商品列表
|
|
||||||
let filteredShangpinList = []
|
let filteredShangpinList = []
|
||||||
if (selectedZhuanquId) {
|
if (selectedZhuanquId) {
|
||||||
filteredShangpinList = shangpinByZhuanqu[selectedZhuanquId] || []
|
filteredShangpinList = shangpinByZhuanqu[selectedZhuanquId] || []
|
||||||
} else if (filteredZhuanquList.length > 0) {
|
} else if (filteredZhuanquList.length > 0) {
|
||||||
// 如果没有选中的专区,默认显示第一个专区的商品
|
|
||||||
const firstZhuanquId = filteredZhuanquList[0].id
|
const firstZhuanquId = filteredZhuanquList[0].id
|
||||||
filteredShangpinList = shangpinByZhuanqu[firstZhuanquId] || []
|
filteredShangpinList = shangpinByZhuanqu[firstZhuanquId] || []
|
||||||
this.setData({ selectedZhuanquId: firstZhuanquId })
|
this.setData({ selectedZhuanquId: firstZhuanquId })
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
filteredZhuanquList: filteredZhuanquList,
|
filteredZhuanquList: filteredZhuanquList,
|
||||||
filteredShangpinList: filteredShangpinList
|
filteredShangpinList: filteredShangpinList
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择商品类型
|
|
||||||
*/
|
|
||||||
selectLeixing(e) {
|
selectLeixing(e) {
|
||||||
const leixingId = e.currentTarget.dataset.id
|
const leixingId = e.currentTarget.dataset.id
|
||||||
|
|
||||||
if (this.data.selectedLeixingId === leixingId) {
|
if (this.data.selectedLeixingId === leixingId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取该类型下的第一个专区
|
|
||||||
const zhuanquList = this.data.zhuanquByLeixing[leixingId] || []
|
const zhuanquList = this.data.zhuanquByLeixing[leixingId] || []
|
||||||
const firstZhuanquId = zhuanquList.length > 0 ? zhuanquList[0].id : null
|
const firstZhuanquId = zhuanquList.length > 0 ? zhuanquList[0].id : null
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
selectedLeixingId: leixingId,
|
selectedLeixingId: leixingId,
|
||||||
selectedZhuanquId: firstZhuanquId
|
selectedZhuanquId: firstZhuanquId
|
||||||
@@ -253,20 +185,14 @@ registerNotificationComponent() {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择商品专区
|
|
||||||
*/
|
|
||||||
selectZhuanqu(e) {
|
selectZhuanqu(e) {
|
||||||
const zhuanquId = e.currentTarget.dataset.id
|
const zhuanquId = e.currentTarget.dataset.id
|
||||||
|
|
||||||
if (this.data.selectedZhuanquId === zhuanquId) {
|
if (this.data.selectedZhuanquId === zhuanquId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
selectedZhuanquId: zhuanquId
|
selectedZhuanquId: zhuanquId
|
||||||
}, () => {
|
}, () => {
|
||||||
// 筛选商品列表
|
|
||||||
const filteredShangpinList = this.data.shangpinByZhuanqu[zhuanquId] || []
|
const filteredShangpinList = this.data.shangpinByZhuanqu[zhuanquId] || []
|
||||||
this.setData({
|
this.setData({
|
||||||
filteredShangpinList: filteredShangpinList
|
filteredShangpinList: filteredShangpinList
|
||||||
@@ -274,18 +200,12 @@ registerNotificationComponent() {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜索框输入事件
|
|
||||||
*/
|
|
||||||
onSearchInput(e) {
|
onSearchInput(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
searchText: e.detail.value
|
searchText: e.detail.value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 点击搜索按钮
|
|
||||||
*/
|
|
||||||
onSearchTap() {
|
onSearchTap() {
|
||||||
const searchText = this.data.searchText.trim()
|
const searchText = this.data.searchText.trim()
|
||||||
if (!searchText) {
|
if (!searchText) {
|
||||||
@@ -295,14 +215,9 @@ registerNotificationComponent() {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开始搜索
|
|
||||||
this.startSearch(searchText)
|
this.startSearch(searchText)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 键盘搜索事件(回车键)
|
|
||||||
*/
|
|
||||||
onSearchConfirm(e) {
|
onSearchConfirm(e) {
|
||||||
const searchText = e.detail.value.trim()
|
const searchText = e.detail.value.trim()
|
||||||
if (!searchText) {
|
if (!searchText) {
|
||||||
@@ -312,40 +227,28 @@ registerNotificationComponent() {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
searchText: searchText
|
searchText: searchText
|
||||||
})
|
})
|
||||||
|
|
||||||
// 开始搜索
|
|
||||||
this.startSearch(searchText)
|
this.startSearch(searchText)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 执行搜索
|
|
||||||
*/
|
|
||||||
startSearch(searchText) {
|
startSearch(searchText) {
|
||||||
this.setData({
|
this.setData({
|
||||||
isSearching: true,
|
isSearching: true,
|
||||||
showSearchResult: true
|
showSearchResult: true
|
||||||
})
|
})
|
||||||
|
|
||||||
// 本地搜索
|
|
||||||
const allShangpin = this.data.shangpinliebiao
|
const allShangpin = this.data.shangpinliebiao
|
||||||
const results = []
|
const results = []
|
||||||
|
|
||||||
for (const item of allShangpin) {
|
for (const item of allShangpin) {
|
||||||
if (item.biaoqian && item.biaoqian.toLowerCase().includes(searchText.toLowerCase())) {
|
if (item.biaoqian && item.biaoqian.toLowerCase().includes(searchText.toLowerCase())) {
|
||||||
// 处理价格显示
|
|
||||||
const jiage = parseFloat(item.jiage) || 0
|
const jiage = parseFloat(item.jiage) || 0
|
||||||
const priceInteger = Math.floor(jiage)
|
const priceInteger = Math.floor(jiage)
|
||||||
let priceDecimal = '00'
|
let priceDecimal = '00'
|
||||||
|
|
||||||
const decimalPart = (jiage - priceInteger).toFixed(2)
|
const decimalPart = (jiage - priceInteger).toFixed(2)
|
||||||
if (decimalPart > 0) {
|
if (decimalPart > 0) {
|
||||||
priceDecimal = decimalPart.toString().split('.')[1]
|
priceDecimal = decimalPart.toString().split('.')[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
results.push({
|
results.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
biaoqian: item.biaoqian,
|
biaoqian: item.biaoqian,
|
||||||
@@ -358,16 +261,12 @@ registerNotificationComponent() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
searchResults: results,
|
searchResults: results,
|
||||||
isSearching: false
|
isSearching: false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 清空搜索
|
|
||||||
*/
|
|
||||||
onClearSearch() {
|
onClearSearch() {
|
||||||
this.setData({
|
this.setData({
|
||||||
searchText: '',
|
searchText: '',
|
||||||
@@ -376,9 +275,6 @@ registerNotificationComponent() {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据类型ID获取类型名称
|
|
||||||
*/
|
|
||||||
getLeixingName(leixingId) {
|
getLeixingName(leixingId) {
|
||||||
const leixingList = this.data.shangpinleixing
|
const leixingList = this.data.shangpinleixing
|
||||||
for (const item of leixingList) {
|
for (const item of leixingList) {
|
||||||
@@ -389,9 +285,6 @@ registerNotificationComponent() {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据专区ID获取专区名称
|
|
||||||
*/
|
|
||||||
getZhuanquName(zhuanquId) {
|
getZhuanquName(zhuanquId) {
|
||||||
const zhuanquList = this.data.shangpinzhuanqu
|
const zhuanquList = this.data.shangpinzhuanqu
|
||||||
for (const item of zhuanquList) {
|
for (const item of zhuanquList) {
|
||||||
@@ -402,34 +295,23 @@ registerNotificationComponent() {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 跳转到商品详情页
|
|
||||||
*/
|
|
||||||
goToDetail(e) {
|
goToDetail(e) {
|
||||||
const shangpinId = e.currentTarget.dataset.id
|
const shangpinId = e.currentTarget.dataset.id
|
||||||
if (!shangpinId) return
|
if (!shangpinId) return
|
||||||
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/shangpinxiangqing/shangpinxiangqing?id=${shangpinId}`
|
url: `/pages/product-detail/product-detail?id=${shangpinId}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 刷新所有数据
|
|
||||||
*/
|
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '刷新中...',
|
title: '刷新中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
|
|
||||||
// 清空全局变量
|
|
||||||
app.globalData.shangpinleixing = []
|
app.globalData.shangpinleixing = []
|
||||||
app.globalData.shangpinzhuanqu = []
|
app.globalData.shangpinzhuanqu = []
|
||||||
app.globalData.shangpinliebiao = []
|
app.globalData.shangpinliebiao = []
|
||||||
|
|
||||||
this.loadAllShangpinData()
|
this.loadAllShangpinData()
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
@@ -440,13 +322,10 @@ registerNotificationComponent() {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
return {
|
return {
|
||||||
title: '阿龙电竞 - 商品分类',
|
title: '阿龙电竞 - 商品分类',
|
||||||
path: '/pages/fenlei/fenlei'
|
path: '/pages/category/category'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<!-- pages/fenlei/fenlei.wxml -->
|
<!-- pages/category/category.wxml -->
|
||||||
<view class="fenlei-page">
|
<view class="fenlei-page">
|
||||||
<!-- 1. 毛玻璃搜索框区域(固定) -->
|
<!-- 1. 毛玻璃搜索框区域(固定) -->
|
||||||
<view class="search-container">
|
<view class="search-container">
|
||||||
<view class="search-box">
|
<view class="search-box search-box--glass">
|
||||||
<image src="/images/sousuo.png" class="search-icon" />
|
<image src="/images/sousuo.png" class="search-icon" />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<image src="/images/clear.png" class="clear-icon" />
|
<image src="/images/clear.png" class="clear-icon" />
|
||||||
</view>
|
</view>
|
||||||
<!-- 搜索按钮 -->
|
<!-- 搜索按钮 -->
|
||||||
<view class="search-btn" bindtap="onSearchTap">
|
<view class="search-btn btn btn-sm btn-sm--gold" bindtap="onSearchTap">
|
||||||
<text class="search-btn-text">搜索</text>
|
<text class="search-btn-text">搜索</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 全局加载状态 -->
|
<!-- 全局加载状态 -->
|
||||||
<view class="loading-toast" wx:if="{{isLoading}}">
|
<view class="loading-toast loading-mask loading-mask--dark" wx:if="{{isLoading}}">
|
||||||
<view class="loading-content">
|
<view class="loading-content">
|
||||||
<view class="loading-spinner">
|
<view class="loading-spinner">
|
||||||
<view class="spinner-ring"></view>
|
<view class="spinner-ring"></view>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/fenlei/fenlei.wxss */
|
/* pages/category/category.wxss */
|
||||||
.fenlei-page {
|
.fenlei-page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
@@ -19,18 +19,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
background: rgba(255, 255, 255, 0.85);
|
|
||||||
backdrop-filter: blur(30rpx);
|
backdrop-filter: blur(30rpx);
|
||||||
-webkit-backdrop-filter: blur(30rpx);
|
-webkit-backdrop-filter: blur(30rpx);
|
||||||
border-radius: 50rpx;
|
|
||||||
padding: 0 28rpx;
|
|
||||||
height: 84rpx;
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0 8rpx 32rpx rgba(31, 38, 135, 0.1),
|
0 8rpx 32rpx rgba(31, 38, 135, 0.1),
|
||||||
inset 0 1rpx 0 rgba(255, 255, 255, 0.8);
|
inset 0 1rpx 0 rgba(255, 255, 255, 0.8);
|
||||||
border: 1rpx solid rgba(255, 255, 255, 0.3);
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@@ -55,9 +48,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
flex: 1;
|
margin-left: 0;
|
||||||
height: 100%;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #222;
|
color: #222;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@@ -68,12 +59,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-btn {
|
.search-btn {
|
||||||
background: linear-gradient(135deg, #ffcc00, #ffaa00);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
padding: 14rpx 32rpx;
|
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
box-shadow: 0 6rpx 20rpx rgba(255, 170, 0, 0.3);
|
box-shadow: 0 6rpx 20rpx rgba(255, 170, 0, 0.3);
|
||||||
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||||
}
|
}
|
||||||
@@ -127,7 +113,7 @@
|
|||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 2. 商品类型选择区域(固定)- 恢复原大小 */
|
/* 2. 商品类型选择区域(固定) */
|
||||||
.leixing-container {
|
.leixing-container {
|
||||||
padding: 0 32rpx 24rpx;
|
padding: 0 32rpx 24rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -165,8 +151,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.leixing-image-box {
|
.leixing-image-box {
|
||||||
width: 100rpx; /* 恢复原大小 */
|
width: 100rpx; /* 恢复原大小 */ /* 恢复原大小 */
|
||||||
height: 100rpx; /* 恢复原大小 */
|
height: 100rpx; /* 恢复原大小 */ /* 恢复原大小 */
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
@@ -230,7 +216,7 @@
|
|||||||
|
|
||||||
.leixing-text {
|
.leixing-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #555; /* 颜色加深 */
|
color: #555;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -321,7 +307,7 @@
|
|||||||
|
|
||||||
.zhuanqu-name {
|
.zhuanqu-name {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #444; /* 颜色加深 */
|
color: #444;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
@@ -444,7 +430,7 @@
|
|||||||
|
|
||||||
.shangpin-item {
|
.shangpin-item {
|
||||||
background: white;
|
background: white;
|
||||||
padding: 28rpx 30rpx 22rpx; /* 底部距离缩小 */
|
padding: 28rpx 30rpx 22rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@@ -736,13 +722,6 @@
|
|||||||
box-shadow: 0 4rpx 16rpx rgba(255, 170, 0, 0.4);
|
box-shadow: 0 4rpx 16rpx rgba(255, 170, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.load-more {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 40rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.load-more-line {
|
.load-more-line {
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 1rpx;
|
height: 1rpx;
|
||||||
@@ -844,7 +823,7 @@
|
|||||||
|
|
||||||
.search-results-list {
|
.search-results-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%; /* 新增:修复滚动问题的关键代码 */
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-result-item {
|
.search-result-item {
|
||||||
@@ -1010,16 +989,7 @@
|
|||||||
|
|
||||||
/* 全局加载状态 */
|
/* 全局加载状态 */
|
||||||
.loading-toast {
|
.loading-toast {
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: rgba(0, 0, 0, 0.7);
|
|
||||||
backdrop-filter: blur(10rpx);
|
backdrop-filter: blur(10rpx);
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 3000;
|
z-index: 3000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1066,7 +1036,6 @@
|
|||||||
|
|
||||||
.loading-text {
|
.loading-text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: white;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1204,12 +1173,3 @@
|
|||||||
transform: translate(0, 0) scale(0);
|
transform: translate(0, 0) scale(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
0% {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"component": true,
|
|
||||||
"usingComponents": {
|
|
||||||
"fakuan-pay": "/pages/cfss/components/fakuan-pay/fakuan-pay"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -41,10 +41,8 @@ Page({
|
|||||||
teamName = p.teamName || '客服';
|
teamName = p.teamName || '客服';
|
||||||
teamAvatar = p.teamAvatar || '';
|
teamAvatar = p.teamAvatar || '';
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('解析客服页面参数失败', e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 默认头像使用全局配置
|
|
||||||
if (!teamAvatar) {
|
if (!teamAvatar) {
|
||||||
teamAvatar = app.globalData.ossImageUrl + app.globalData.morentouxiang;
|
teamAvatar = app.globalData.ossImageUrl + app.globalData.morentouxiang;
|
||||||
}
|
}
|
||||||
@@ -171,7 +169,7 @@ Page({
|
|||||||
this.setData({ messages: msgs });
|
this.setData({ messages: msgs });
|
||||||
},
|
},
|
||||||
|
|
||||||
// ---------- 历史消息 + 永久欢迎语 ----------
|
// 历史消息
|
||||||
loadHistory(refresh) {
|
loadHistory(refresh) {
|
||||||
if (!refresh && !this.data.hasMore) return Promise.resolve();
|
if (!refresh && !this.data.hasMore) return Promise.resolve();
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
@@ -209,7 +207,7 @@ Page({
|
|||||||
const unique = [];
|
const unique = [];
|
||||||
for (const m of final) { if (!ids.has(m.messageId)) { ids.add(m.messageId); unique.push(m); } }
|
for (const m of final) { if (!ids.has(m.messageId)) { ids.add(m.messageId); unique.push(m); } }
|
||||||
|
|
||||||
// 强制在第一行插入欢迎语(如果不存在)
|
// 插入欢迎语
|
||||||
const welcomeId = 'welcome-cs';
|
const welcomeId = 'welcome-cs';
|
||||||
if (!unique.some(m => m.messageId === welcomeId)) {
|
if (!unique.some(m => m.messageId === welcomeId)) {
|
||||||
const welcome = this.createWelcomeMessage();
|
const welcome = this.createWelcomeMessage();
|
||||||
@@ -249,7 +247,7 @@ Page({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
// ---------- 接收新客服消息 ----------
|
// 接收新客服消息
|
||||||
listenNewMsg() {
|
listenNewMsg() {
|
||||||
if (this._msgHandler) wx.goEasy.im.off(wx.GoEasy.IM_EVENT.CS_MESSAGE_RECEIVED, this._msgHandler);
|
if (this._msgHandler) wx.goEasy.im.off(wx.GoEasy.IM_EVENT.CS_MESSAGE_RECEIVED, this._msgHandler);
|
||||||
this._msgHandler = (msg) => {
|
this._msgHandler = (msg) => {
|
||||||
@@ -310,7 +308,7 @@ Page({
|
|||||||
wx.goEasy.im.on(wx.GoEasy.IM_EVENT.MESSAGE_DELETED, this._deleteHandler);
|
wx.goEasy.im.on(wx.GoEasy.IM_EVENT.MESSAGE_DELETED, this._deleteHandler);
|
||||||
},
|
},
|
||||||
|
|
||||||
// ---------- 面板控制 ----------
|
// 面板控制
|
||||||
togglePlusPanel() { this.setData({ showPlusPanel: !this.data.showPlusPanel, showEmojiPanel: false }); },
|
togglePlusPanel() { this.setData({ showPlusPanel: !this.data.showPlusPanel, showEmojiPanel: false }); },
|
||||||
closePlusPanel() { this.setData({ showPlusPanel: false }); },
|
closePlusPanel() { this.setData({ showPlusPanel: false }); },
|
||||||
openEmojiFromPlus() { this.setData({ showPlusPanel: false, showEmojiPanel: true }); },
|
openEmojiFromPlus() { this.setData({ showPlusPanel: false, showEmojiPanel: true }); },
|
||||||
@@ -318,7 +316,7 @@ Page({
|
|||||||
insertEmoji(e) { this.setData({ inputText: this.data.inputText + e.currentTarget.dataset.emoji }); },
|
insertEmoji(e) { this.setData({ inputText: this.data.inputText + e.currentTarget.dataset.emoji }); },
|
||||||
closeEmojiPanel() { this.setData({ showEmojiPanel: false }); },
|
closeEmojiPanel() { this.setData({ showEmojiPanel: false }); },
|
||||||
|
|
||||||
// ---------- 发送消息 ----------
|
// 发送消息
|
||||||
onInput(e) { this.setData({ inputText: e.detail.value }); },
|
onInput(e) { this.setData({ inputText: e.detail.value }); },
|
||||||
chooseImage() {
|
chooseImage() {
|
||||||
const that = this;
|
const that = this;
|
||||||
@@ -409,7 +407,7 @@ Page({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// ---------- 订单发送 ----------
|
// 订单发送
|
||||||
openOrderSender() { this.setData({ showOrderSender: true, showPlusPanel: false }); },
|
openOrderSender() { this.setData({ showOrderSender: true, showPlusPanel: false }); },
|
||||||
closeOrderSender() { this.setData({ showOrderSender: false }); },
|
closeOrderSender() { this.setData({ showOrderSender: false }); },
|
||||||
onSendOrder(e) {
|
onSendOrder(e) {
|
||||||
@@ -445,7 +443,7 @@ Page({
|
|||||||
updateMsg(id, status) { this.setData({ messages: this.data.messages.map(m => m.messageId === id ? { ...m, status } : m) }); },
|
updateMsg(id, status) { this.setData({ messages: this.data.messages.map(m => m.messageId === id ? { ...m, status } : m) }); },
|
||||||
needShow(ts) { const ms = this.data.messages; if (!ms.length) return true; const last = ms[ms.length-1]; return (ts - last.timestamp) / 60000 > 5; },
|
needShow(ts) { const ms = this.data.messages; if (!ms.length) return true; const last = ms[ms.length-1]; return (ts - last.timestamp) / 60000 > 5; },
|
||||||
|
|
||||||
// ---------- 消息操作 ----------
|
// 消息操作
|
||||||
onBubbleTap(e) {
|
onBubbleTap(e) {
|
||||||
const msgId = e.currentTarget.dataset.messageid;
|
const msgId = e.currentTarget.dataset.messageid;
|
||||||
const text = e.currentTarget.dataset.text;
|
const text = e.currentTarget.dataset.text;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/xiugai/xiugai.js
|
// pages/edit/edit.js
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
import upload from '../../utils/upload.js'
|
import upload from '../../utils/upload.js'
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载用户数据(手机号只读,不参与修改逻辑)
|
// 加载用户数据
|
||||||
loadUserData() {
|
loadUserData() {
|
||||||
try {
|
try {
|
||||||
const uid = wx.getStorageSync('uid') || ''
|
const uid = wx.getStorageSync('uid') || ''
|
||||||
@@ -59,7 +59,7 @@ Page({
|
|||||||
avatarUrl,
|
avatarUrl,
|
||||||
uid,
|
uid,
|
||||||
nicheng,
|
nicheng,
|
||||||
phone, // 仅展示
|
phone,
|
||||||
originalAvatar: touxiang,
|
originalAvatar: touxiang,
|
||||||
originalNicheng: nicheng,
|
originalNicheng: nicheng,
|
||||||
isLoading: false
|
isLoading: false
|
||||||
@@ -71,7 +71,7 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 微信头像选择(未改动)
|
// 微信头像选择
|
||||||
onChooseAvatar(e) {
|
onChooseAvatar(e) {
|
||||||
const avatarTempPath = e.detail.avatarUrl
|
const avatarTempPath = e.detail.avatarUrl
|
||||||
this.setData({
|
this.setData({
|
||||||
@@ -83,14 +83,13 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
chooseAvatar() {
|
chooseAvatar() {
|
||||||
// 仅保留动画效果(透明按钮已触发 onChooseAvatar)
|
|
||||||
this.setData({ isAvatarActive: true })
|
this.setData({ isAvatarActive: true })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setData({ isAvatarActive: false })
|
this.setData({ isAvatarActive: false })
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 昵称输入(未改动)
|
// 昵称输入
|
||||||
onNicknameInput(e) {
|
onNicknameInput(e) {
|
||||||
const value = e.detail.value.trim()
|
const value = e.detail.value.trim()
|
||||||
this.setData({
|
this.setData({
|
||||||
@@ -101,14 +100,14 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 检查变化(只比较昵称和头像)
|
// 检查变化
|
||||||
checkChanges() {
|
checkChanges() {
|
||||||
const { originalNicheng, nicheng, newAvatarFile } = this.data;
|
const { originalNicheng, nicheng, newAvatarFile } = this.data;
|
||||||
const hasChanges = (nicheng !== originalNicheng) || (newAvatarFile !== null);
|
const hasChanges = (nicheng !== originalNicheng) || (newAvatarFile !== null);
|
||||||
this.setData({ hasChanges });
|
this.setData({ hasChanges });
|
||||||
},
|
},
|
||||||
|
|
||||||
// 保存(不包含手机号逻辑)
|
// 保存
|
||||||
async onSave() {
|
async onSave() {
|
||||||
if (!this.data.hasChanges) {
|
if (!this.data.hasChanges) {
|
||||||
wx.showToast({ title: '没有需要保存的更改', icon: 'none' });
|
wx.showToast({ title: '没有需要保存的更改', icon: 'none' });
|
||||||
@@ -116,7 +115,7 @@ Page({
|
|||||||
}
|
}
|
||||||
if (this.data.isSaving) return;
|
if (this.data.isSaving) return;
|
||||||
|
|
||||||
// 验证数据(昵称)
|
// 验证数据
|
||||||
if (!this.validateData()) return;
|
if (!this.validateData()) return;
|
||||||
|
|
||||||
this.setData({ isSaving: true });
|
this.setData({ isSaving: true });
|
||||||
@@ -155,7 +154,7 @@ Page({
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
wx.removeStorageSync('token');
|
wx.removeStorageSync('token');
|
||||||
wx.removeStorageSync('userInfo');
|
wx.removeStorageSync('userInfo');
|
||||||
wx.switchTab({ url: '/pages/wode/wode' });
|
wx.switchTab({ url: '/pages/mine/mine' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -168,7 +167,7 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证数据(只验证昵称)
|
// 验证数据
|
||||||
validateData() {
|
validateData() {
|
||||||
const { nicheng } = this.data;
|
const { nicheng } = this.data;
|
||||||
let hasError = false;
|
let hasError = false;
|
||||||
@@ -191,7 +190,7 @@ Page({
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 更新成功处理(不再处理手机号)
|
// 更新成功处理
|
||||||
async handleUpdateSuccess(updateData) {
|
async handleUpdateSuccess(updateData) {
|
||||||
if (updateData.touxiang !== undefined && updateData.touxiang !== null) {
|
if (updateData.touxiang !== undefined && updateData.touxiang !== null) {
|
||||||
wx.setStorageSync('touxiang', updateData.touxiang);
|
wx.setStorageSync('touxiang', updateData.touxiang);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- pages/xiugai/xiugai.wxml -->
|
<!-- pages/edit/edit.wxml -->
|
||||||
<view class="xiugai-page">
|
<view class="xiugai-page">
|
||||||
|
|
||||||
<!-- 头像区域(未改动) -->
|
<!-- 头像区域(未改动) -->
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/xiugai/xiugai.wxss */
|
/* pages/edit/edit.wxss */
|
||||||
page {
|
page {
|
||||||
background: linear-gradient(135deg, #fffaf0 0%, #f0f8ff 100%);
|
background: linear-gradient(135deg, #fffaf0 0%, #f0f8ff 100%);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
@@ -8,7 +8,7 @@ page {
|
|||||||
padding: 30rpx 40rpx 100rpx;
|
padding: 30rpx 40rpx 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ============ 头像区域样式 ============ */
|
/* 头像区域样式 */
|
||||||
.avatar-section {
|
.avatar-section {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -24,7 +24,7 @@ page {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 头像包装器:精确居中,包含头像+光晕 */
|
/* 头像包装器 */
|
||||||
.avatar-image-wrapper {
|
.avatar-image-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
@@ -48,16 +48,16 @@ page {
|
|||||||
box-shadow:
|
box-shadow:
|
||||||
0 0 0 1rpx rgba(0, 200, 83, 0.3),
|
0 0 0 1rpx rgba(0, 200, 83, 0.3),
|
||||||
0 15rpx 40rpx rgba(0, 200, 83, 0.15);
|
0 15rpx 40rpx rgba(0, 200, 83, 0.15);
|
||||||
box-sizing: border-box; /* 关键:边框向内计算,不占宽度 */
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ 光晕精确居中:已计算头像 6rpx 边框的偏移量 */
|
/* 光晕 */
|
||||||
.avatar-halo {
|
.avatar-halo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%); /* 强制居中,无视任何偏差 */
|
transform: translate(-50%, -50%);
|
||||||
width: 228rpx; /* 精确计算:200 + 6*2(边框) + 8*2(外延) = 228 */
|
width: 228rpx;
|
||||||
height: 228rpx;
|
height: 228rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -68,7 +68,7 @@ page {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ 像素点环绕也强制居中 */
|
/* 像素点环绕 */
|
||||||
.avatar-image-wrapper::before {
|
.avatar-image-wrapper::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -215,11 +215,9 @@ page {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ============ 表单区域 ============ */
|
/* 表单区域 */
|
||||||
.form-section {
|
.form-section {
|
||||||
background: white;
|
|
||||||
border-radius: 25rpx;
|
border-radius: 25rpx;
|
||||||
overflow: hidden;
|
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.08);
|
||||||
border: 1rpx solid #f0f0f0;
|
border: 1rpx solid #f0f0f0;
|
||||||
@@ -251,13 +249,7 @@ page {
|
|||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-input {
|
/* .item-input — 与全局 .input-inline 完全相同,已移除 */
|
||||||
flex: 1;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333;
|
|
||||||
height: 50rpx;
|
|
||||||
line-height: 50rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.placeholder {
|
.placeholder {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
@@ -302,19 +294,13 @@ page {
|
|||||||
to { opacity: 1; transform: translateY(0); }
|
to { opacity: 1; transform: translateY(0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ============ 保存按钮 ============ */
|
/* 保存按钮 */
|
||||||
.save-btn {
|
.save-btn {
|
||||||
width: 100%;
|
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
background: linear-gradient(135deg, #00C853 0%, #64DD17 100%);
|
background: linear-gradient(135deg, #00C853 0%, #64DD17 100%);
|
||||||
color: white;
|
|
||||||
font-size: 34rpx;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border: none;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
box-shadow: 0 15rpx 40rpx rgba(0, 200, 83, 0.25);
|
box-shadow: 0 15rpx 40rpx rgba(0, 200, 83, 0.25);
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
@@ -361,7 +347,7 @@ page {
|
|||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ============ 手机号获取按钮 ============ */
|
/* 手机号获取按钮 */
|
||||||
.phone-row {
|
.phone-row {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -380,15 +366,8 @@ page {
|
|||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
padding: 10rpx 24rpx;
|
padding: 10rpx 24rpx;
|
||||||
background: #4a6cf7;
|
background: #4a6cf7;
|
||||||
color: #fff;
|
|
||||||
font-size: 26rpx;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
border: none;
|
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.phone-btn-hover {
|
.phone-btn-hover {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/peihuDingdan/peihuDingdan.js
|
// pages/escort-orders/escort-orders.js
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
2
pages/escort-orders/escort-orders.wxml
Normal file
2
pages/escort-orders/escort-orders.wxml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<!--pages/escort-orders/escort-orders.wxml-->
|
||||||
|
<text>pages/escort-orders/escort-orders.wxml</text>
|
||||||
1
pages/escort-orders/escort-orders.wxss
Normal file
1
pages/escort-orders/escort-orders.wxss
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/* pages/escort-orders/escort-orders.wxss */
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/jisufd/jisufd.js
|
// pages/express-order/express-order.js
|
||||||
import request from '../../utils/request.js'
|
import request from '../../utils/request.js'
|
||||||
|
|
||||||
const PAGE_SIZE = 50
|
const PAGE_SIZE = 50
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- pages/jisufd/jisufd.wxml -->
|
<!-- pages/express-order/express-order.wxml -->
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<!-- 余额卡片 -->
|
<!-- 余额卡片 -->
|
||||||
<view class="balance-card">
|
<view class="balance-card">
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/jisufd/jisufd.wxss - 增强版,包含标签展示 */
|
/* pages/express-order/express-order.wxss - 增强版,包含标签展示 */
|
||||||
.page-container {
|
.page-container {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
|
background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/cfss/cfss.js
|
// pages/penalty/penalty.js
|
||||||
import request from '../../utils/request.js'
|
import request from '../../utils/request.js'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
const MEIYE_TIAOSHU = 5
|
const MEIYE_TIAOSHU = 5
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- pages/cfss/cfss.wxml -->
|
<!-- pages/penalty/penalty.wxml -->
|
||||||
<view class="cfss-container">
|
<view class="cfss-container">
|
||||||
<!-- 顶部统计卡片 -->
|
<!-- 顶部统计卡片 -->
|
||||||
<view class="tongji-card">
|
<view class="tongji-card">
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/cfss/cfss.wxss */
|
/* pages/penalty/penalty.wxss */
|
||||||
/* 🔴【恢复您原来的深色背景,但调淡一点】 */
|
/* 🔴【恢复您原来的深色背景,但调淡一点】 */
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
@@ -907,7 +907,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* pages/cfss/cfss.wxss 中新增样式 */
|
/* pages/penalty/penalty.wxss 中新增样式 */
|
||||||
|
|
||||||
/* 🔴【关键修改】图片网格和图片样式 */
|
/* 🔴【关键修改】图片网格和图片样式 */
|
||||||
.tupian-grid {
|
.tupian-grid {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/dsddxq/dsddxq.js - 【最终版:提交前公告弹窗 + 修改图片至少保留一张】
|
// pages/fighter-order-detail/fighter-order-detail.js - 【最终版:提交前公告弹窗 + 修改图片至少保留一张】
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
import request from '../../utils/request.js'
|
import request from '../../utils/request.js'
|
||||||
const COS = require('../../utils/cos-wx-sdk-v5.js')
|
const COS = require('../../utils/cos-wx-sdk-v5.js')
|
||||||
@@ -322,7 +322,7 @@ Page({
|
|||||||
isCross,
|
isCross,
|
||||||
}
|
}
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/qunliaotian/qunliaotian?data=' + encodeURIComponent(JSON.stringify(param)),
|
url: '/pages/group-chat/group-chat?data=' + encodeURIComponent(JSON.stringify(param)),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onFailed: (err) => {
|
onFailed: (err) => {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/dsddxq/dsddxq.wxss */
|
/* pages/fighter-order-detail/fighter-order-detail.wxss */
|
||||||
|
|
||||||
/* 页面基础样式 */
|
/* 页面基础样式 */
|
||||||
.dsddxq-page {
|
.dsddxq-page {
|
||||||
@@ -294,11 +294,11 @@ Page({
|
|||||||
|
|
||||||
if (this.data.orderType === 'peihu') {
|
if (this.data.orderType === 'peihu') {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/peihuDingdan/peihuDingdan?dingdanData=${dataStr}`
|
url: `/pages/escort-orders/escort-orders?dingdanData=${dataStr}`
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/dsddxq/dsddxq?dingdanData=${dataStr}`
|
url: `/pages/fighter-order-detail/fighter-order-detail?dingdanData=${dataStr}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -281,9 +281,7 @@ page {
|
|||||||
animation: spin 0.8s linear infinite;
|
animation: spin 0.8s linear infinite;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
@keyframes spin {
|
|
||||||
to { transform: rotate(360deg); }
|
|
||||||
}
|
|
||||||
.empty-img {
|
.empty-img {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
@@ -132,8 +132,6 @@ page {
|
|||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin { to { transform: rotate(360deg); } }
|
|
||||||
|
|
||||||
.state-img {
|
.state-img {
|
||||||
width: 160rpx; height: 160rpx;
|
width: 160rpx; height: 160rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
@@ -75,7 +75,7 @@ Page({
|
|||||||
this.initPage();
|
this.initPage();
|
||||||
},
|
},
|
||||||
|
|
||||||
// pages/tijiao/tijiao.js 中添加 onHide 方法(如果已有则合并内容)
|
// pages/submit/submit.js 中添加 onHide 方法(如果已有则合并内容)
|
||||||
onHide() {
|
onHide() {
|
||||||
const popupComp = this.selectComponent('#popupNotice');
|
const popupComp = this.selectComponent('#popupNotice');
|
||||||
if (popupComp && popupComp.cleanup) {
|
if (popupComp && popupComp.cleanup) {
|
||||||
@@ -18,7 +18,7 @@ const PLATFORM_INVITE_CODE = '0000008RffVgKHMj7kQC'
|
|||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
// 🆕 图片路径对象(逻辑层拼接完整URL)
|
// 图片路径对象
|
||||||
imgUrls: {},
|
imgUrls: {},
|
||||||
|
|
||||||
isDashou: false,
|
isDashou: false,
|
||||||
@@ -188,7 +188,7 @@ Page({
|
|||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 注意:这里不再重复声明 app,直接使用上面的 app 变量
|
// 注意:不再重复声明 app
|
||||||
if (!app.globalData.hasShownPopupOnColdStart) {
|
if (!app.globalData.hasShownPopupOnColdStart) {
|
||||||
app.globalData.hasShownPopupOnColdStart = true;
|
app.globalData.hasShownPopupOnColdStart = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -296,7 +296,7 @@ Page({
|
|||||||
this.setData({ totalAssets: total.toFixed(2), assetBreakdown: breakdown });
|
this.setData({ totalAssets: total.toFixed(2), assetBreakdown: breakdown });
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 打手端:已认证不展示;商家始终第一位且靠左排列 */
|
/** 打手端:已认证不展示;商家始终第一位 */
|
||||||
_updatePendingAuth() {
|
_updatePendingAuth() {
|
||||||
const d = this.data;
|
const d = this.data;
|
||||||
const img = d.imgUrls || {};
|
const img = d.imgUrls || {};
|
||||||
@@ -671,23 +671,23 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
goToGuanshiWithdraw() {
|
goToGuanshiWithdraw() {
|
||||||
wx.navigateTo({ url: '/pages/tixian/tixian' });
|
wx.navigateTo({ url: '/pages/withdraw/withdraw' });
|
||||||
},
|
},
|
||||||
|
|
||||||
goToZuzhangWithdraw() {
|
goToZuzhangWithdraw() {
|
||||||
wx.navigateTo({ url: `/pages/tixian/tixian?from=zuzhang&amount=${this.data.ketixian}` });
|
wx.navigateTo({ url: `/pages/withdraw/withdraw?from=zuzhang&amount=${this.data.ketixian}` });
|
||||||
},
|
},
|
||||||
|
|
||||||
goToInviteUser() { wx.navigateTo({ url: '/pages/yaoqingdashou/yaoqingdashou' }); },
|
goToInviteUser() { wx.navigateTo({ url: '/pages/invite-fighter/invite-fighter' }); },
|
||||||
goToMySubordinate() { wx.navigateTo({ url: '/pages/wodedashou/wodedashou' }); },
|
goToMySubordinate() { wx.navigateTo({ url: '/pages/my-fighter/my-fighter' }); },
|
||||||
goToRechargeRecord() { wx.navigateTo({ url: '/pages/czjilu/czjilu' }); },
|
goToRechargeRecord() { wx.navigateTo({ url: '/pages/recharge-log/recharge-log' }); },
|
||||||
goToGuanshiRanking() {
|
goToGuanshiRanking() {
|
||||||
wx.navigateTo({ url: '/pages/dashoupaihang/dashoupaihang?type=guanshi' });
|
wx.navigateTo({ url: '/pages/fighter-rank/fighter-rank?type=guanshi' });
|
||||||
},
|
},
|
||||||
goToPromoPoster() { wx.navigateTo({ url: '/pages/haibao/haibao' }); },
|
goToPromoPoster() { wx.navigateTo({ url: '/pages/poster/poster' }); },
|
||||||
goToFenhongJilu() { wx.navigateTo({ url: '/pages/zzfhjilu/zzfhjilu' }); },
|
goToFenhongJilu() { wx.navigateTo({ url: '/pages/leader-bonus-log/leader-bonus-log' }); },
|
||||||
goToYaoqingGuanshi() { wx.navigateTo({ url: '/pages/yqguanshi/yqguanshi' }); },
|
goToYaoqingGuanshi() { wx.navigateTo({ url: '/pages/invite-manager/invite-manager' }); },
|
||||||
goToGuanshiAuthPage() { wx.navigateTo({ url: '/pages/renzheng/renzheng?type=guanshi' }); },
|
goToGuanshiAuthPage() { wx.navigateTo({ url: '/pages/verify/verify?type=guanshi' }); },
|
||||||
|
|
||||||
async contactZuzhang() {
|
async contactZuzhang() {
|
||||||
wx.showLoading({ title: '获取组长信息...', mask: true });
|
wx.showLoading({ title: '获取组长信息...', mask: true });
|
||||||
@@ -723,20 +723,16 @@ Page({
|
|||||||
if (res && res.data.code === 0 && res.data.data) {
|
if (res && res.data.code === 0 && res.data.data) {
|
||||||
const list = res.data.data.chenghao_list || [];
|
const list = res.data.data.chenghao_list || [];
|
||||||
this.setData({ chenghaoList: list });
|
this.setData({ chenghaoList: list });
|
||||||
// 可选:也存入全局,方便其他页面使用
|
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
app.globalData.chenghaoList = list;
|
app.globalData.chenghaoList = list;
|
||||||
} else {
|
} else {
|
||||||
this.setData({ chenghaoList: [] });
|
this.setData({ chenghaoList: [] });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('获取称号标签失败', e);
|
|
||||||
// 失败不影响主流程
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// ========================================================
|
|
||||||
|
|
||||||
// 联系邀请人(保持不变)
|
// 联系邀请人
|
||||||
async contactInviter() {
|
async contactInviter() {
|
||||||
wx.showLoading({ title: '获取邀请人...', mask: true });
|
wx.showLoading({ title: '获取邀请人...', mask: true });
|
||||||
try {
|
try {
|
||||||
@@ -798,7 +794,7 @@ Page({
|
|||||||
fail: () => {
|
fail: () => {
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
console.error('微信登录失败');
|
console.error('微信登录失败');
|
||||||
wx.reLaunch({ url: '/pages/wode/wode' });
|
wx.reLaunch({ url: '/pages/mine/mine' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1079,7 +1075,7 @@ Page({
|
|||||||
if (avatarUrl) wx.previewImage({ urls: [avatarUrl] });
|
if (avatarUrl) wx.previewImage({ urls: [avatarUrl] });
|
||||||
},
|
},
|
||||||
|
|
||||||
goToWithdraw() { wx.navigateTo({ url: '/pages/tixian/tixian' }) },
|
goToWithdraw() { wx.navigateTo({ url: '/pages/withdraw/withdraw' }) },
|
||||||
goToTotalWithdraw() { this.goToWithdraw(); },
|
goToTotalWithdraw() { this.goToWithdraw(); },
|
||||||
|
|
||||||
goToKefu() {
|
goToKefu() {
|
||||||
@@ -1111,7 +1107,7 @@ Page({
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wx.navigateTo({ url: `/pages/renzheng/renzheng?type=${type}` });
|
wx.navigateTo({ url: `/pages/verify/verify?type=${type}` });
|
||||||
},
|
},
|
||||||
|
|
||||||
onTapAuthItem(e) {
|
onTapAuthItem(e) {
|
||||||
@@ -1125,7 +1121,7 @@ Page({
|
|||||||
|
|
||||||
enterShangjiaCenter() {
|
enterShangjiaCenter() {
|
||||||
if (!this.data.shangjiaCertified) {
|
if (!this.data.shangjiaCertified) {
|
||||||
wx.navigateTo({ url: '/pages/renzheng/renzheng?type=shangjia' });
|
wx.navigateTo({ url: '/pages/verify/verify?type=shangjia' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
enterLockedRole('shangjia', getApp());
|
enterLockedRole('shangjia', getApp());
|
||||||
@@ -1136,28 +1132,28 @@ Page({
|
|||||||
this.enterShangjiaCenter();
|
this.enterShangjiaCenter();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wx.navigateTo({ url: '/pages/renzheng/renzheng?type=shangjia' });
|
wx.navigateTo({ url: '/pages/verify/verify?type=shangjia' });
|
||||||
},
|
},
|
||||||
goToReceiveOrder() { wx.navigateTo({ url: '/pages/jiedan/jiedan' }) },
|
goToReceiveOrder() { wx.navigateTo({ url: '/pages/accept-order/accept-order' }) },
|
||||||
goToMyOrders() { wx.navigateTo({ url: '/pages/dashoudingdan/dashoudingdan' }) },
|
goToMyOrders() { wx.navigateTo({ url: '/pages/fighter-orders/fighter-orders' }) },
|
||||||
goToMyPunishment() { wx.navigateTo({ url: '/pages/cfss/cfss/cfss' }) },
|
goToMyPunishment() { wx.navigateTo({ url: '/pages/penalty/penalty/penalty' }) },
|
||||||
goToRecharge() { wx.navigateTo({ url: '/pages/dashouchongzhi/dashouchongzhi' }) },
|
goToRecharge() { wx.navigateTo({ url: '/pages/fighter-recharge/fighter-recharge' }) },
|
||||||
goToRanking(e) {
|
goToRanking(e) {
|
||||||
const type = e?.currentTarget?.dataset?.type || 'dashou';
|
const type = e?.currentTarget?.dataset?.type || 'dashou';
|
||||||
wx.navigateTo({ url: `/pages/dashoupaihang/dashoupaihang?type=${type}` });
|
wx.navigateTo({ url: `/pages/fighter-rank/fighter-rank?type=${type}` });
|
||||||
},
|
},
|
||||||
goToGuanzhuKs() { wx.navigateTo({ url: '/pages/guanzhual/guanzhual' }) },
|
goToGuanzhuKs() { wx.navigateTo({ url: '/pages/manager-assign/manager-assign' }) },
|
||||||
goToKaoheDafen() { wx.navigateTo({ url: '/pages/kaohe_dafen/kaohe_dafen' }) },
|
goToKaoheDafen() { wx.navigateTo({ url: '/pages/assess-score/assess-score' }) },
|
||||||
goToKaoheJilu() { wx.navigateTo({ url: '/pages/kaohe_jilu/kaohe_jilu' }) },
|
goToKaoheJilu() { wx.navigateTo({ url: '/pages/assess-log/assess-log' }) },
|
||||||
goToKaoheZhongxin() { wx.navigateTo({ url: '/pages/kaohe_zhongxin/kaohe_zhongxin' }) },
|
goToKaoheZhongxin() { wx.navigateTo({ url: '/pages/assess-center/assess-center' }) },
|
||||||
goToKaoheWithdraw() {
|
goToKaoheWithdraw() {
|
||||||
const yue = this.data.kaoheYue || '0.00';
|
const yue = this.data.kaoheYue || '0.00';
|
||||||
wx.navigateTo({ url: `/pages/tixian/tixian?amount=${yue}&from=kaoheguan` });
|
wx.navigateTo({ url: `/pages/withdraw/withdraw?amount=${yue}&from=kaoheguan` });
|
||||||
},
|
},
|
||||||
goToModifyInfo() { wx.navigateTo({ url: '/pages/dashouxiugai/dashouxiugai' }) },
|
goToModifyInfo() { wx.navigateTo({ url: '/pages/fighter-edit/fighter-edit' }) },
|
||||||
goToRules() { wx.navigateTo({ url: '/pages/dashouguize/dashouguize' }) },
|
goToRules() { wx.navigateTo({ url: '/pages/fighter-rules/fighter-rules' }) },
|
||||||
goToKaohe() {
|
goToKaohe() {
|
||||||
wx.navigateTo({ url: '/pages/kaohe_jinpai/kaohe_jinpai' });
|
wx.navigateTo({ url: '/pages/assess-gold/assess-gold' });
|
||||||
},
|
},
|
||||||
|
|
||||||
quickRegisterAsPlatform() {
|
quickRegisterAsPlatform() {
|
||||||
@@ -4,15 +4,9 @@ page {
|
|||||||
color: #1A1A1A;
|
color: #1A1A1A;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .page-bg 与全局相同,仅保留差异 */
|
||||||
.page-bg {
|
.page-bg {
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
opacity: 0.42;
|
opacity: 0.42;
|
||||||
z-index: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.unreg-area {
|
.unreg-area {
|
||||||
@@ -50,31 +44,26 @@ page {
|
|||||||
color: #444;
|
color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .unreg-input 与 .input-rounded 类似,仅保留差异 */
|
||||||
.unreg-input {
|
.unreg-input {
|
||||||
width: 100%;
|
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
padding: 0 32rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ph { color: #999; }
|
.ph { color: #999; }
|
||||||
|
|
||||||
|
/* .unreg-btn 与 .btn .btn-secondary 类似,仅保留差异 */
|
||||||
.unreg-btn {
|
.unreg-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
background: rgba(255, 255, 255, 0.65);
|
background: rgba(255, 255, 255, 0.65);
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border: 1rpx solid rgba(0, 0, 0, 0.06);
|
border: 1rpx solid rgba(0, 0, 0, 0.06);
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .unreg-btn-secondary 与 .btn-secondary 类似,仅保留差异 */
|
||||||
.unreg-btn-secondary {
|
.unreg-btn-secondary {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
background: rgba(255, 255, 255, 0.45);
|
background: rgba(255, 255, 255, 0.45);
|
||||||
@@ -112,27 +101,9 @@ page {
|
|||||||
padding: 0 24rpx 150rpx;
|
padding: 0 24rpx 150rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-btn {
|
/* .refresh-btn 与全局 .refresh-btn .refresh-btn--light 完全相同,删除 */
|
||||||
position: fixed;
|
|
||||||
top: 36rpx;
|
|
||||||
right: 32rpx;
|
|
||||||
width: 56rpx;
|
|
||||||
height: 56rpx;
|
|
||||||
background: rgba(255, 255, 255, 0.8);
|
|
||||||
backdrop-filter: blur(12rpx);
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 20;
|
|
||||||
border: 1rpx solid rgba(255, 255, 255, 0.6);
|
|
||||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.refresh-icon {
|
/* .refresh-icon 与全局 .refresh-icon 完全相同,删除 */
|
||||||
width: 28rpx;
|
|
||||||
height: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-card {
|
.user-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -163,13 +134,9 @@ page {
|
|||||||
backdrop-filter: blur(12rpx);
|
backdrop-filter: blur(12rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .user-avatar 与 .avatar-circle .avatar-md 类似,仅保留差异 */
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
width: 88rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 2rpx solid #FFFFFF;
|
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-info { flex: 1; min-width: 0; }
|
.user-info { flex: 1; min-width: 0; }
|
||||||
@@ -254,7 +221,7 @@ page {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 黑卡 VIP ===== */
|
/* 黑卡 VIP */
|
||||||
.vip-black-card {
|
.vip-black-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 152rpx;
|
height: 152rpx;
|
||||||
@@ -329,7 +296,7 @@ page {
|
|||||||
color: #f3ead8;
|
color: #f3ead8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 资产面板 ===== */
|
/* 资产面板 */
|
||||||
.asset-panel {
|
.asset-panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
@@ -447,7 +414,7 @@ page {
|
|||||||
margin-top: 4rpx;
|
margin-top: 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 排行榜(无大框,梯形格) ===== */
|
/* 排行榜 */
|
||||||
.rank-section {
|
.rank-section {
|
||||||
margin-bottom: 22rpx;
|
margin-bottom: 22rpx;
|
||||||
padding: 0 2rpx;
|
padding: 0 2rpx;
|
||||||
@@ -613,7 +580,7 @@ page {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 功能面板 ===== */
|
/* 功能面板 */
|
||||||
.func-panel {
|
.func-panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
@@ -720,10 +687,10 @@ page {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .list-card 与 .card 类似,仅保留差异 */
|
||||||
.list-card {
|
.list-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
overflow: hidden;
|
|
||||||
box-shadow: 0 6rpx 24rpx rgba(0, 0, 0, 0.04);
|
box-shadow: 0 6rpx 24rpx rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -743,23 +710,22 @@ page {
|
|||||||
backdrop-filter: blur(12rpx);
|
backdrop-filter: blur(12rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .list-item 与全局 .list-item 类似,仅保留差异 */
|
||||||
.list-item {
|
.list-item {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 22rpx 20rpx;
|
padding: 22rpx 20rpx;
|
||||||
border-bottom: 1rpx solid rgba(0, 0, 0, 0.04);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-item:last-child { border-bottom: none; }
|
.list-item:last-child { border-bottom: none; }
|
||||||
|
|
||||||
|
/* .list-icon 与全局 .list-icon 类似,仅保留差异(缺少 flex-shrink:0) */
|
||||||
.list-icon {
|
.list-icon {
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .list-text 与全局 .list-text 类似,仅保留差异 */
|
||||||
.list-text {
|
.list-text {
|
||||||
flex: 1;
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -769,13 +735,12 @@ page {
|
|||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .list-arrow 与全局 .list-arrow 类似,仅保留差异 */
|
||||||
.list-arrow {
|
.list-arrow {
|
||||||
width: 20rpx;
|
|
||||||
height: 20rpx;
|
|
||||||
opacity: 0.45;
|
opacity: 0.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 客服入口 ===== */
|
/* 客服入口 */
|
||||||
.kefu-banner {
|
.kefu-banner {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 18rpx;
|
margin-bottom: 18rpx;
|
||||||
@@ -851,7 +816,7 @@ page {
|
|||||||
margin-left: 16rpx;
|
margin-left: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 总资产 ===== */
|
/* 总资产 */
|
||||||
.total-asset-row {
|
.total-asset-row {
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
@@ -937,6 +902,7 @@ page {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .withdraw-btn 与 .btn-sm--dark 类似,仅保留差异 */
|
||||||
.withdraw-btn {
|
.withdraw-btn {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
min-width: 120rpx;
|
min-width: 120rpx;
|
||||||
@@ -944,10 +910,7 @@ page {
|
|||||||
line-height: 72rpx;
|
line-height: 72rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0 28rpx;
|
padding: 0 28rpx;
|
||||||
font-size: 26rpx;
|
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #fff;
|
|
||||||
background: linear-gradient(135deg, #3d4f66 0%, #2c3e50 100%);
|
|
||||||
border-radius: 999rpx;
|
border-radius: 999rpx;
|
||||||
box-shadow: 0 6rpx 20rpx rgba(44, 62, 80, 0.22);
|
box-shadow: 0 6rpx 20rpx rgba(44, 62, 80, 0.22);
|
||||||
}
|
}
|
||||||
@@ -965,7 +928,7 @@ page {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 身份认证 ===== */
|
/* 身份认证 */
|
||||||
.auth-grid {
|
.auth-grid {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -1008,28 +971,12 @@ page {
|
|||||||
background: rgba(90, 107, 87, 0.1);
|
background: rgba(90, 107, 87, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-mask {
|
/* .loading-mask 与全局 .loading-mask .loading-mask--light 完全相同,删除 */
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: rgba(255, 255, 255, 0.85);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 9999;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* .loading-spinner 与 .spinner--md 类似,仅保留差异 */
|
||||||
.loading-spinner {
|
.loading-spinner {
|
||||||
width: 52rpx;
|
width: 52rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
border: 3rpx solid rgba(0, 0, 0, 0.08);
|
border: 3rpx solid rgba(0, 0, 0, 0.08);
|
||||||
border-top-color: #1A1A1A;
|
border-top-color: #1A1A1A;
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 0.8s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
to { transform: rotate(360deg); }
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// pages/jinpaids/jinpaids.js
|
// pages/gold-fighter/gold-fighter.js
|
||||||
import request from '../../utils/request.js'
|
import request from '../../utils/request.js'
|
||||||
import popupService from '../../services/popupService.js'
|
import popupService from '../../services/popupService.js'
|
||||||
import {
|
import {
|
||||||
@@ -68,11 +68,11 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
wx.redirectTo({ url: '/pages/dashouduan/dashouduan' });
|
wx.redirectTo({ url: '/pages/fighter/fighter' });
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
wx.redirectTo({ url: '/pages/dashouduan/dashouduan' });
|
wx.redirectTo({ url: '/pages/fighter/fighter' });
|
||||||
},
|
},
|
||||||
|
|
||||||
_deprecatedOnLoad() {
|
_deprecatedOnLoad() {
|
||||||
@@ -197,7 +197,7 @@ Page({
|
|||||||
checkJinpaiAndRedirect(chenghao) {
|
checkJinpaiAndRedirect(chenghao) {
|
||||||
if (chenghao !== '金牌选手') {
|
if (chenghao !== '金牌选手') {
|
||||||
wx.setStorageSync('isJinpai', 0)
|
wx.setStorageSync('isJinpai', 0)
|
||||||
wx.redirectTo({ url: '/pages/dashouduan/dashouduan' })
|
wx.redirectTo({ url: '/pages/fighter/fighter' })
|
||||||
} else {
|
} else {
|
||||||
wx.setStorageSync('isJinpai', 1)
|
wx.setStorageSync('isJinpai', 1)
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ Page({
|
|||||||
toAvatar: fullAvatar
|
toAvatar: fullAvatar
|
||||||
}
|
}
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/liaotian/liaotian?data=' + encodeURIComponent(JSON.stringify(param)),
|
url: '/pages/chat/chat?data=' + encodeURIComponent(JSON.stringify(param)),
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('跳转私聊失败', err)
|
console.error('跳转私聊失败', err)
|
||||||
wx.showToast({ title: '打开聊天失败', icon: 'none' })
|
wx.showToast({ title: '打开聊天失败', icon: 'none' })
|
||||||
@@ -284,17 +284,17 @@ Page({
|
|||||||
if (this.data.avatarUrl) wx.previewImage({ urls: [this.data.avatarUrl] })
|
if (this.data.avatarUrl) wx.previewImage({ urls: [this.data.avatarUrl] })
|
||||||
},
|
},
|
||||||
|
|
||||||
goToWithdraw() { wx.navigateTo({ url: '/pages/tixian/tixian' }) },
|
goToWithdraw() { wx.navigateTo({ url: '/pages/withdraw/withdraw' }) },
|
||||||
goToReceiveOrder() { wx.navigateTo({ url: '/pages/jiedan/jiedan' }) },
|
goToReceiveOrder() { wx.navigateTo({ url: '/pages/accept-order/accept-order' }) },
|
||||||
goToRecharge() { wx.navigateTo({ url: '/pages/dashouchongzhi/dashouchongzhi' }) },
|
goToRecharge() { wx.navigateTo({ url: '/pages/fighter-recharge/fighter-recharge' }) },
|
||||||
goToMyOrders() { wx.navigateTo({ url: '/pages/dashoudingdan/dashoudingdan' }) },
|
goToMyOrders() { wx.navigateTo({ url: '/pages/fighter-orders/fighter-orders' }) },
|
||||||
goToMyPunishment() { wx.navigateTo({ url: '/pages/cfss/cfss/cfss' }) },
|
goToMyPunishment() { wx.navigateTo({ url: '/pages/penalty/penalty/penalty' }) },
|
||||||
goToRanking() { wx.navigateTo({ url: '/pages/dashoupaihang/dashoupaihang?type=dashou' }) },
|
goToRanking() { wx.navigateTo({ url: '/pages/fighter-rank/fighter-rank?type=dashou' }) },
|
||||||
goToModifyInfo() { wx.navigateTo({ url: '/pages/dashouxiugai/dashouxiugai' }) },
|
goToModifyInfo() { wx.navigateTo({ url: '/pages/fighter-edit/fighter-edit' }) },
|
||||||
goToRules() { wx.navigateTo({ url: '/pages/dashouguize/dashouguize' }) },
|
goToRules() { wx.navigateTo({ url: '/pages/fighter-rules/fighter-rules' }) },
|
||||||
// 跳转到考核金牌
|
// 跳转到考核金牌
|
||||||
goToKaohe() {
|
goToKaohe() {
|
||||||
wx.navigateTo({ url: '/pages/kaohe_jinpai/kaohe_jinpai' });
|
wx.navigateTo({ url: '/pages/assess-gold/assess-gold' });
|
||||||
},
|
},
|
||||||
|
|
||||||
async fetchChenghaoList() {
|
async fetchChenghaoList() {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* pages/jinpaids/jinpaids.wxss - 金牌打手机甲风格(CSS变量版) */
|
/* pages/gold-fighter/gold-fighter.wxss - 金牌打手机甲风格(CSS变量版) */
|
||||||
|
|
||||||
/* ========== 全局 ========== */
|
/* ========== 全局 ========== */
|
||||||
page {
|
page {
|
||||||
@@ -49,7 +49,6 @@ Page({
|
|||||||
isCross: p.isCross
|
isCross: p.isCross
|
||||||
});
|
});
|
||||||
wx.setNavigationBarTitle({ title: this.data.groupName });
|
wx.setNavigationBarTitle({ title: this.data.groupName });
|
||||||
// 如果有外部传入的 currentUser 信息,直接用,不再依赖全局状态
|
|
||||||
if (p.currentUserId) {
|
if (p.currentUserId) {
|
||||||
this.setData({
|
this.setData({
|
||||||
currentUser: {
|
currentUser: {
|
||||||
@@ -111,22 +110,6 @@ Page({
|
|||||||
});
|
});
|
||||||
this.setData({ messages: msgs });
|
this.setData({ messages: msgs });
|
||||||
},
|
},
|
||||||
/*onLoad(options) {
|
|
||||||
if (options.data) {
|
|
||||||
try {
|
|
||||||
const p = JSON.parse(decodeURIComponent(options.data));
|
|
||||||
this.setData({
|
|
||||||
groupId: p.groupId || '',
|
|
||||||
groupName: p.groupName || '订单群聊',
|
|
||||||
groupAvatar: p.groupAvatar || '',
|
|
||||||
orderId: p.orderId || '',
|
|
||||||
isCross: p.isCross || 0
|
|
||||||
});
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
wx.setNavigationBarTitle({ title: this.data.groupName });
|
|
||||||
this.initCurrentUser();
|
|
||||||
},*/
|
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.autoConnect();
|
this.autoConnect();
|
||||||
@@ -189,8 +172,8 @@ Page({
|
|||||||
if (!groupId) return;
|
if (!groupId) return;
|
||||||
wx.goEasy.im.subscribeGroup({
|
wx.goEasy.im.subscribeGroup({
|
||||||
groupIds: [groupId],
|
groupIds: [groupId],
|
||||||
onSuccess: () => console.log(`[群聊页] 订阅成功: ${groupId}`),
|
onSuccess: () => {},
|
||||||
onFailed: (err) => console.error(`[群聊页] 订阅失败: ${groupId}`, err)
|
onFailed: () => {}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -279,7 +262,7 @@ Page({
|
|||||||
this.markGroupMessageAsRead();
|
this.markGroupMessageAsRead();
|
||||||
};
|
};
|
||||||
wx.goEasy.im.on(wx.GoEasy.IM_EVENT.GROUP_MESSAGE_RECEIVED, this._msgHandler);
|
wx.goEasy.im.on(wx.GoEasy.IM_EVENT.GROUP_MESSAGE_RECEIVED, this._msgHandler);
|
||||||
this.markGroupMessageAsRead(); // ← 收到新消息就标记已读
|
this.markGroupMessageAsRead();
|
||||||
},
|
},
|
||||||
|
|
||||||
markGroupMessageAsRead() {
|
markGroupMessageAsRead() {
|
||||||
@@ -5,23 +5,20 @@ import { fetchShopGoods, bindShop } from '../../utils/shop';
|
|||||||
import { backfillUserProfileCache, getSessionToken } from '../../utils/role-tab-bar';
|
import { backfillUserProfileCache, getSessionToken } from '../../utils/role-tab-bar';
|
||||||
import PopupService from '../../services/popupService.js';
|
import PopupService from '../../services/popupService.js';
|
||||||
|
|
||||||
// 🔥 固定参数:扫码时从 scene 中获取店铺ID的字段名(可在此处集中修改)
|
// 扫码场景参数名
|
||||||
const SCENE_PARAM = 'scene'; // 二维码参数统一使用 scene,解码后即为店铺ID
|
const SCENE_PARAM = 'scene';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
// 全局变量引用
|
|
||||||
ossImageUrl: '',
|
ossImageUrl: '',
|
||||||
lunbozhanwei: '',
|
lunbozhanwei: '',
|
||||||
|
|
||||||
// 页面数据
|
|
||||||
shangpingonggao: '',
|
shangpingonggao: '',
|
||||||
lunboList: [],
|
lunboList: [],
|
||||||
shangpinleixing: [],
|
shangpinleixing: [],
|
||||||
shangpinzhuanqu: [],
|
shangpinzhuanqu: [],
|
||||||
shangpinliebiao: [],
|
shangpinliebiao: [],
|
||||||
|
|
||||||
// 状态控制
|
|
||||||
selectedLeixingId: null,
|
selectedLeixingId: null,
|
||||||
filteredData: [],
|
filteredData: [],
|
||||||
showGonggaoModal: false,
|
showGonggaoModal: false,
|
||||||
@@ -33,16 +30,15 @@ Page({
|
|||||||
currentTime: ''
|
currentTime: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
// 从二维码解析出的店铺ID(仅在扫码时存在)
|
// 扫码解析的店铺ID
|
||||||
shopId: null,
|
shopId: null,
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 🔥 解析二维码参数(scene)
|
// 解析二维码参数
|
||||||
if (options[SCENE_PARAM]) {
|
if (options[SCENE_PARAM]) {
|
||||||
try {
|
try {
|
||||||
// 微信会对 scene 进行编码,需要解码
|
|
||||||
const scene = decodeURIComponent(options[SCENE_PARAM]);
|
const scene = decodeURIComponent(options[SCENE_PARAM]);
|
||||||
this.shopId = scene; // 例如:dianpu_123
|
this.shopId = scene;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('scene解码失败', e);
|
console.error('scene解码失败', e);
|
||||||
}
|
}
|
||||||
@@ -50,16 +46,15 @@ Page({
|
|||||||
|
|
||||||
// 等待全局配置加载完成
|
// 等待全局配置加载完成
|
||||||
this.waitForConfigAndInit();
|
this.waitForConfigAndInit();
|
||||||
// 🆕 修改:仅在已登录时检查弹窗,避免未登录时发起请求导致 401 弹窗
|
// 已登录时才检查弹窗
|
||||||
const token = getSessionToken(app);
|
const token = getSessionToken(app);
|
||||||
if (token) {
|
if (token) {
|
||||||
PopupService.checkAndShow(this, 'index');
|
PopupService.checkAndShow(this, 'index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 🆕 页面隐藏时清理弹窗视图
|
// 页面隐藏时清理弹窗视图
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
const popupComp = this.selectComponent('#popupNotice');
|
const popupComp = this.selectComponent('#popupNotice');
|
||||||
if (popupComp && popupComp.cleanup) {
|
if (popupComp && popupComp.cleanup) {
|
||||||
@@ -153,15 +148,15 @@ Page({
|
|||||||
// 1. 确保登录(静默,不跳转)
|
// 1. 确保登录(静默,不跳转)
|
||||||
await ensureLogin({ page: this });
|
await ensureLogin({ page: this });
|
||||||
|
|
||||||
// 2. 🔥 关键:仅当通过扫码进入且携带了有效的店铺ID时,才执行绑定
|
// 2. 扫码进入时绑定店铺
|
||||||
if (this.shopId) {
|
if (this.shopId) {
|
||||||
await bindShop(this.shopId);
|
await bindShop(this.shopId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 并行加载公告轮播图(复用原接口,独立请求)和店铺商品(新接口)
|
// 3. 并行加载公告轮播图和商品数据
|
||||||
const [gonggaoResult, shopData] = await Promise.all([
|
const [gonggaoResult, shopData] = await Promise.all([
|
||||||
this.loadGonggaoAndLunbo(), // 公告轮播图使用原有的 wx.request 方式,不受影响
|
this.loadGonggaoAndLunbo(),
|
||||||
fetchShopGoods() // 商品数据通过封装的 request 获取
|
fetchShopGoods()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 4. 处理商品数据
|
// 4. 处理商品数据
|
||||||
@@ -169,8 +164,7 @@ Page({
|
|||||||
const sortedZhuanqu = this.sortByPaixu(shopData.shangpinzhuanqu || []);
|
const sortedZhuanqu = this.sortByPaixu(shopData.shangpinzhuanqu || []);
|
||||||
const sortedShangpin = this.sortByPaixu(shopData.shangpinliebiao || []);
|
const sortedShangpin = this.sortByPaixu(shopData.shangpinliebiao || []);
|
||||||
|
|
||||||
|
// 更新全局缓存
|
||||||
// 更新全局缓存(可选,用于其他页面复用)
|
|
||||||
app.globalData.shangpinleixing = sortedLeixing;
|
app.globalData.shangpinleixing = sortedLeixing;
|
||||||
app.globalData.shangpinzhuanqu = sortedZhuanqu;
|
app.globalData.shangpinzhuanqu = sortedZhuanqu;
|
||||||
app.globalData.shangpinliebiao = sortedShangpin;
|
app.globalData.shangpinliebiao = sortedShangpin;
|
||||||
@@ -189,12 +183,11 @@ Page({
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('初始化失败:', error);
|
console.error('初始化失败:', error);
|
||||||
this.setData({ isLoading: false });
|
this.setData({ isLoading: false });
|
||||||
// 错误提示已在各函数内部处理,此处仅做兜底
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载公告和轮播图(完全复用原逻辑,使用 wx.request,不使用封装 request)
|
* 加载公告和轮播图
|
||||||
*/
|
*/
|
||||||
loadGonggaoAndLunbo() {
|
loadGonggaoAndLunbo() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -237,7 +230,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 筛选商品数据(完全复用原有逻辑,不做任何改动)
|
* 筛选商品数据
|
||||||
*/
|
*/
|
||||||
filterShangpinData() {
|
filterShangpinData() {
|
||||||
const { selectedLeixingId, shangpinzhuanqu, shangpinliebiao } = this.data;
|
const { selectedLeixingId, shangpinzhuanqu, shangpinliebiao } = this.data;
|
||||||
@@ -337,8 +330,8 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新所有数据(点击刷新按钮)
|
* 刷新所有数据
|
||||||
* 只刷新商品数据,公告轮播图保持不变(若需刷新可清空全局缓存后调用 loadGonggaoAndLunbo)
|
* 只刷新商品数据
|
||||||
*/
|
*/
|
||||||
async refreshAllData() {
|
async refreshAllData() {
|
||||||
if (this.data.isRefreshing) return;
|
if (this.data.isRefreshing) return;
|
||||||
@@ -346,11 +339,9 @@ Page({
|
|||||||
wx.showLoading({ title: '刷新中...', mask: true });
|
wx.showLoading({ title: '刷新中...', mask: true });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 重新获取商品数据(登录状态由 fetchShopGoods 内部确保)
|
// 重新获取商品数据
|
||||||
const shopData = await fetchShopGoods();
|
const shopData = await fetchShopGoods();
|
||||||
|
|
||||||
// 公告轮播图通常不需要随刷新按钮更新,保持原样
|
|
||||||
|
|
||||||
const sortedLeixing = this.sortByPaixu(shopData.shangpinleixing || []);
|
const sortedLeixing = this.sortByPaixu(shopData.shangpinleixing || []);
|
||||||
const sortedZhuanqu = this.sortByPaixu(shopData.shangpinzhuanqu || []);
|
const sortedZhuanqu = this.sortByPaixu(shopData.shangpinzhuanqu || []);
|
||||||
const sortedShangpin = this.sortByPaixu(shopData.shangpinliebiao || []);
|
const sortedShangpin = this.sortByPaixu(shopData.shangpinliebiao || []);
|
||||||
@@ -381,7 +372,7 @@ Page({
|
|||||||
const shangpinId = e.currentTarget.dataset.id;
|
const shangpinId = e.currentTarget.dataset.id;
|
||||||
if (!shangpinId) return;
|
if (!shangpinId) return;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/shangpinxiangqing/shangpinxiangqing?id=${shangpinId}`
|
url: `/pages/product-detail/product-detail?id=${shangpinId}`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,6 @@
|
|||||||
class="shangpin-image"
|
class="shangpin-image"
|
||||||
lazy-load="{{true}}"
|
lazy-load="{{true}}"
|
||||||
/>
|
/>
|
||||||
<!-- 移除已售标签 -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 商品标题 -->
|
<!-- 商品标题 -->
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user