diff --git a/app.js b/app.js index c832138..1f57cd8 100644 --- a/app.js +++ b/app.js @@ -437,20 +437,37 @@ App({ return this.globalData.isLoggedIn }, - /** - * 加载审核状态 - */ async loadAuditStatus() { + const localAppVersion = config.APP_VERSION || '' + try { const res = await api.common.getAuditStatus() if (res.code === 0 && res.data) { - this.globalData.auditStatus = Number(res.data.auditStatus || 0) - console.log('获取审核状态成功:', this.globalData.auditStatus) + const serverAppVersion = res.data.app_version || res.data.appVersion || '' + + if (localAppVersion !== serverAppVersion) { + this.globalData.auditStatus = 0 + wx.setStorageSync('auditStatus', 0) + return + } + + const auditStatus = Number(res.data.auditStatus || 0) + this.globalData.auditStatus = auditStatus + wx.setStorageSync('auditStatus', auditStatus) + return } } catch (err) { console.error('获取审核状态失败', err) - // 失败时默认为 0(正式环境),或根据需要设为 1(保守方案) } + + const cachedStatus = wx.getStorageSync('auditStatus') + if (cachedStatus !== undefined) { + this.globalData.auditStatus = cachedStatus + return + } + + this.globalData.auditStatus = 0 + wx.setStorageSync('auditStatus', 0) }, /** diff --git a/config/index.js b/config/index.js index 0058237..5deb4b0 100644 --- a/config/index.js +++ b/config/index.js @@ -32,10 +32,14 @@ const ENV = { // development: 本地开发 staging: 测试环境 production: 正式环境 const CURRENT_ENV = 'production' +// 硬编码版本号 - 用于审核开关对比 +const APP_VERSION = '1.0' + // 导出配置 const config = { ...ENV[CURRENT_ENV], ENV: CURRENT_ENV, + APP_VERSION: APP_VERSION, // 存储键名 STORAGE_KEYS: { diff --git a/config/version.js b/config/version.js new file mode 100644 index 0000000..fdd6ab3 --- /dev/null +++ b/config/version.js @@ -0,0 +1,174 @@ +/** + * 小程序版本配置文件 + * 用于控制不同版本显示不同内容 + * + * 版本号格式:主版本.次版本.修订版本 + * 示例:'1.0.0', '2.0.0' + * + * 使用方式: + * - 修改 CURRENT_VERSION 来切换当前开发版本 + * - 在 pages 中使用 getVersion() 获取当前版本 + * - 使用 getContent(version) 获取对应版本的内容配置 + */ + +const CURRENT_VERSION = '1.0.0' + +const VERSION_CONFIG = { + '1.0.0': { + name: 'V1基础版', + description: '初始版本', + categoryList: [ + { + id: 1, + name: '兴趣搭子', + icon: 'https://ai-c.maimanji.com/images/icon-interest.png', + url: '/pages/interest-partner/interest-partner' + }, + { + id: 2, + name: '同城活动', + icon: 'https://ai-c.maimanji.com/images/icon-city.png', + url: '/pages/city-activities/city-activities' + }, + { + id: 3, + name: '户外郊游', + icon: 'https://ai-c.maimanji.com/images/icon-outdoor.png', + url: '/pages/outdoor-activities/outdoor-activities' + }, + { + id: 4, + name: '高端定制', + icon: 'https://ai-c.maimanji.com/images/icon-travel.png', + url: '/pages/theme-travel/theme-travel' + }, + { + id: 5, + name: '快乐学堂', + icon: 'https://ai-c.maimanji.com/images/icon-checkin.png', + url: '/pages/happy-school/happy-school' + }, + { + id: 6, + name: '单身聚会', + icon: 'https://ai-c.maimanji.com/images/icon-love.png', + url: '/pages/singles-party/singles-party' + } + ], + features: { + showNewFeature: false, + showBetaFeature: false, + useNewUI: false, + useOldUI: true + } + }, + + '2.0.0': { + name: 'V2升级版', + description: '全新UI设计,新增功能入口', + categoryList: [ + { + id: 1, + name: '兴趣搭子', + icon: 'https://ai-c.maimanji.com/images/v2/icon-interest.png', + url: '/pages/interest-partner/interest-partner' + }, + { + id: 2, + name: '同城活动', + icon: 'https://ai-c.maimanji.com/images/v2/icon-city.png', + url: '/pages/city-activities/city-activities' + }, + { + id: 3, + name: '户外郊游', + icon: 'https://ai-c.maimanji.com/images/v2/icon-outdoor.png', + url: '/pages/outdoor-activities/outdoor-activities' + }, + { + id: 4, + name: '主题旅行', + icon: 'https://ai-c.maimanji.com/images/v2/icon-travel.png', + url: '/pages/theme-travel/theme-travel' + }, + { + id: 5, + name: '快乐学堂', + icon: 'https://ai-c.maimanji.com/images/v2/icon-checkin.png', + url: '/pages/happy-school/happy-school' + }, + { + id: 6, + name: '爱心传递', + icon: 'https://ai-c.maimanji.com/images/v2/icon-love.png', + url: '/pages/love-transmission/love-transmission' + } + ], + features: { + showNewFeature: true, + showBetaFeature: true, + useNewUI: true, + useOldUI: false + } + } +} + +function getVersion() { + const debugVersion = wx.getStorageSync('debugVersion') + if (debugVersion && VERSION_CONFIG[debugVersion]) { + return debugVersion + } + return CURRENT_VERSION +} + +function getVersionInfo(version = CURRENT_VERSION) { + return VERSION_CONFIG[version] || VERSION_CONFIG['1.0.0'] +} + +function getCategoryList(version = CURRENT_VERSION) { + const config = getVersionInfo(version) + return config ? config.categoryList : [] +} + +function getFeatureFlag(featureName, version = CURRENT_VERSION) { + const config = getVersionInfo(version) + return config ? config.features[featureName] : false +} + +function compareVersion(v1, v2) { + const v1s = v1.split('.') + const v2s = v2.split('.') + const len = Math.max(v1s.length, v2s.length) + for (let i = 0; i < len; i++) { + const n1 = parseInt(v1s[i]) || 0 + const n2 = parseInt(v2s[i]) || 0 + if (n1 > n2) return 1 + if (n1 < n2) return -1 + } + return 0 +} + +function isVersionOrAbove(targetVersion, currentVersion = CURRENT_VERSION) { + return compareVersion(currentVersion, targetVersion) >= 0 +} + +function isVersionBelow(targetVersion, currentVersion = CURRENT_VERSION) { + return compareVersion(currentVersion, targetVersion) < 0 +} + +function getAllVersions() { + return Object.keys(VERSION_CONFIG) +} + +module.exports = { + CURRENT_VERSION, + VERSION_CONFIG, + getVersion, + getVersionInfo, + getCategoryList, + getFeatureFlag, + compareVersion, + isVersionOrAbove, + isVersionBelow, + getAllVersions +} diff --git a/pages/agreement/agreement.js b/pages/agreement/agreement.js index 367e5d0..85b26c7 100644 --- a/pages/agreement/agreement.js +++ b/pages/agreement/agreement.js @@ -2,6 +2,8 @@ * 协议页面 * 显示用户服务协议或隐私协议 */ +const config = require('../../config/index') + Page({ data: { statusBarHeight: 20, @@ -25,7 +27,8 @@ Page({ wx.showLoading({ title: '加载中...' }); // 优先读取本地缓存 - const cached = wx.getStorageSync(`agreement_${code}`); + const cacheKey = code === 'privacy_policy' ? 'privacy_policy' : `agreement_${code}`; + const cached = wx.getStorageSync(cacheKey); const CACHE_DURATION = 60 * 60 * 1000; // 1小时 const now = Date.now(); @@ -38,9 +41,12 @@ Page({ return; } + // 从配置文件获取API域名 + const baseUrl = String(config.API_BASE_URL || '').replace(/\/api$/, '') + // 网络请求 wx.request({ - url: `https://ai-c.maimanji.com/api/agreements?code=${code}`, + url: `${baseUrl}/api/agreements?code=${code}`, method: 'GET', success: (res) => { wx.hideLoading(); @@ -52,7 +58,7 @@ Page({ }); // 写入缓存 - wx.setStorageSync(`agreement_${code}`, { + wx.setStorageSync(cacheKey, { data: data, timestamp: now }); diff --git a/pages/chat-detail/chat-detail.js b/pages/chat-detail/chat-detail.js index 81f492c..f30638e 100644 --- a/pages/chat-detail/chat-detail.js +++ b/pages/chat-detail/chat-detail.js @@ -23,6 +23,9 @@ Page({ statusBarHeight: 44, navHeight: 96, + // 审核状态 + auditStatus: 0, + // 角色信息 characterId: '', conversationId: '', @@ -128,6 +131,8 @@ Page({ }, onLoad(options) { + // 从本地存储读取审核状态 + const auditStatus = wx.getStorageSync('auditStatus') || 0 const { statusBarHeight, navHeight } = app.globalData // 初始化消息处理相关变量 @@ -147,6 +152,7 @@ Page({ this.setData({ statusBarHeight, navHeight, + auditStatus, characterId, conversationId, myAvatar, @@ -163,6 +169,10 @@ Page({ }, onShow() { + // 从本地存储读取审核状态 + const auditStatus = wx.getStorageSync('auditStatus') || 0 + this.setData({ auditStatus }) + // 每次显示页面时,刷新一次配额状态,确保免费畅聊时间等状态是最新的 if (!this.data.loading) { this.loadQuotaStatus() @@ -1934,114 +1944,110 @@ Page({ if (this.recorderManager) { this.recorderManager.stop() - - if (voiceCancelHint) { - // 取消发送 - util.showToast('已取消') - return - } - - if (recordingDuration < 1) { - util.showError('录音时间太短') - return - } - - this.recorderManager.onStop(async (res) => { - console.log('[chat-detail] 录音完成:', res.tempFilePath, '时长:', recordingDuration) - - // 先显示语音消息(带识别中状态) - const newId = util.generateId() - const voiceMessage = { - id: newId, - type: 'voice', - audioUrl: res.tempFilePath, - duration: recordingDuration, - isMe: true, - time: util.formatTime(new Date(), 'HH:mm'), - recognizing: true, // 识别中状态 - recognizedText: '' // 识别出的文字 - } - - this.setData({ - messages: [...this.data.messages, voiceMessage] - }, () => { - this.scrollToBottom() - }) - - // 进行语音识别 - try { - wx.showLoading({ title: '语音识别中...' }) - - // 读取音频文件并转换为base64 - const fs = wx.getFileSystemManager() - const audioData = fs.readFileSync(res.tempFilePath) - const audioBase64 = wx.arrayBufferToBase64(audioData) - - // 调用语音识别API - const recognizeRes = await api.speech.recognize({ - audio: audioBase64, - format: 'mp3' - }) - - wx.hideLoading() - - let recognizedText = '' - if (recognizeRes.success && recognizeRes.data && recognizeRes.data.text) { - recognizedText = recognizeRes.data.text - console.log('[chat-detail] 语音识别结果:', recognizedText) - } else { - // 识别失败,使用默认文字 - recognizedText = '[语音消息]' - console.log('[chat-detail] 语音识别失败,使用默认文字') - } - - // 更新语音消息的识别状态 - const messages = this.data.messages.map(msg => { - if (msg.id === newId) { - return { ...msg, recognizing: false, recognizedText } - } - return msg - }) - this.setData({ messages }) - - // 如果识别出了有效文字,发送给AI - if (recognizedText && recognizedText !== '[语音消息]') { - // 检查聊天权限 - const canChatByFreeTime = !!(this.data.freeTime && this.data.freeTime.isActive) - const canChatByVip = !!this.data.isVip - - if (!isUnlocked && !canChatByVip && !canChatByFreeTime) { - console.log('[chat-detail] 语音消息无聊天权限', { isUnlocked, isVip, canChatByFreeTime }) - this.setData({ showUnlockPopup: true }) - return - } - - // 将识别出的文字加入待处理队列 - this.pendingMessages.push(recognizedText) - - // 如果没有正在等待的定时器,启动延迟处理 - if (!this.messageTimer) { - this.startMessageTimer(characterId, this.data.conversationId, character, isUnlocked, remainingCount) - } - } - - } catch (err) { - wx.hideLoading() - console.error('[chat-detail] 语音识别失败:', err) - - // 更新消息状态 - const messages = this.data.messages.map(msg => { - if (msg.id === newId) { - return { ...msg, recognizing: false, recognizedText: '[语音消息]' } - } - return msg - }) - this.setData({ messages }) - - util.showError('语音识别失败') - } - }) } + + // 取消发送 + if (voiceCancelHint) { + util.showToast('已取消') + return + } + + // 录音时间太短 + if (recordingDuration < 1) { + util.showError('录音时间太短') + return + } + + // 等待录音停止后再处理 + this.recorderManager.onStop(async (res) => { + console.log('[chat-detail] 录音完成:', res.tempFilePath, '时长:', recordingDuration) + + // 先显示语音消息(带识别中状态) + const newId = util.generateId() + const voiceMessage = { + id: newId, + type: 'voice', + audioUrl: res.tempFilePath, + duration: recordingDuration, + isMe: true, + time: util.formatTime(newId, 'HH:mm'), + recognizing: true, + recognizedText: '' + } + + this.setData({ + messages: [...this.data.messages, voiceMessage] + }, () => { + this.scrollToBottom() + }) + + // 进行语音识别 + try { + wx.showLoading({ title: '语音识别中...' }) + + const fs = wx.getFileSystemManager() + const audioData = fs.readFileSync(res.tempFilePath) + const audioBase64 = wx.arrayBufferToBase64(audioData) + console.log('[chat-detail] 音频文件大小:', audioData.byteLength, 'bytes') + console.log('[chat-detail] Base64长度:', audioBase64.length, 'chars') + + console.log('[chat-detail] 开始调用语音识别API...') + const recognizeRes = await api.speech.recognize({ + audio: audioBase64, + format: 'mp3' + }) + console.log('[chat-detail] 语音识别响应:', JSON.stringify(recognizeRes).substring(0, 200)) + + wx.hideLoading() + + let recognizedText = '' + if (recognizeRes.success && recognizeRes.data && recognizeRes.data.text) { + recognizedText = recognizeRes.data.text + console.log('[chat-detail] 语音识别结果:', recognizedText) + } else { + recognizedText = '[语音消息]' + console.log('[chat-detail] 语音识别失败,使用默认文字') + } + + const messages = this.data.messages.map(msg => { + if (msg.id === newId) { + return { ...msg, recognizing: false, recognizedText } + } + return msg + }) + this.setData({ messages }) + + if (recognizedText && recognizedText !== '[语音消息]') { + const canChatByFreeTime = !!(this.data.freeTime && this.data.freeTime.isActive) + const canChatByVip = !!this.data.isVip + + if (!isUnlocked && !canChatByVip && !canChatByFreeTime) { + console.log('[chat-detail] 语音消息无聊天权限', { isUnlocked, isVip, canChatByFreeTime }) + this.setData({ showUnlockPopup: true }) + return + } + + this.pendingMessages.push(recognizedText) + + if (!this.messageTimer) { + this.startMessageTimer(characterId, this.data.conversationId, character, isUnlocked, remainingCount) + } + } + + } catch (err) { + wx.hideLoading() + console.error('[chat-detail] 语音识别失败:', err) + + const messages = this.data.messages.map(msg => { + if (msg.id === newId) { + return { ...msg, recognizing: false, recognizedText: '[语音消息]' } + } + return msg + }) + this.setData({ messages }) + util.showError('语音识别失败') + } + }) }, onVoiceTouchCancel() { diff --git a/pages/chat-detail/chat-detail.wxml b/pages/chat-detail/chat-detail.wxml index f06503e..9698cfd 100644 --- a/pages/chat-detail/chat-detail.wxml +++ b/pages/chat-detail/chat-detail.wxml @@ -57,12 +57,12 @@ - + 与 {{character.name}} 的加密对话 - + - + @@ -177,8 +177,14 @@ - - + + + + 当前处于审核模式 + + + + diff --git a/pages/chat-detail/chat-detail.wxss b/pages/chat-detail/chat-detail.wxss index 51cb82c..d0ef8e8 100644 --- a/pages/chat-detail/chat-detail.wxss +++ b/pages/chat-detail/chat-detail.wxss @@ -1657,3 +1657,34 @@ color: #99A1AF; letter-spacing: 0.5rpx; } + +/* ==================== 审核模式样式 ==================== */ + +/* 审核提示 */ +.audit-notice { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + display: flex; + flex-direction: column; + align-items: center; + gap: 24rpx; + padding: 48rpx; + background: rgba(255, 255, 255, 0.95); + border-radius: 24rpx; + box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1); + z-index: 100; +} + +.notice-icon { + width: 80rpx; + height: 80rpx; + opacity: 0.6; +} + +.notice-text { + font-size: 32rpx; + color: #6B7280; + font-weight: 500; +} diff --git a/pages/chat/chat.js b/pages/chat/chat.js index 092869c..a548cf5 100644 --- a/pages/chat/chat.js +++ b/pages/chat/chat.js @@ -49,15 +49,18 @@ Page({ }, onLoad() { + // 从本地存储读取审核状态 + const auditStatus = wx.getStorageSync('auditStatus') || 0 + this.setData({ auditStatus }) this.loadConversations() }, onShow() { wx.hideTabBar({ animation: false }) - const app = getApp() - this.setData({ - auditStatus: app.globalData.auditStatus - }) + + // 从本地存储读取审核状态 + const auditStatus = wx.getStorageSync('auditStatus') || 0 + this.setData({ auditStatus }) // 检查免费畅聊时间 this.checkFreeTime() diff --git a/pages/chat/chat.wxml b/pages/chat/chat.wxml index 2bad64f..bedfc68 100644 --- a/pages/chat/chat.wxml +++ b/pages/chat/chat.wxml @@ -34,8 +34,8 @@ - - + + item.id === id) + + if (category && category.url) { + wx.navigateTo({ url: category.url }) + } else { + wx.showToast({ title: `${name}功能开发中`, icon: 'none' }) } - - // 同城活动跳转到专门页面 - if (id === 2) { - wx.navigateTo({ - url: '/pages/city-activities/city-activities' - }) - return - } - - // 户外郊游跳转到专门页面 - if (id === 3) { - wx.navigateTo({ - url: '/pages/outdoor-activities/outdoor-activities' - }) - return - } - - // 定制主题跳转到专门页面 - if (id === 4) { - wx.navigateTo({ - url: '/pages/theme-travel/theme-travel' - }) - return - } - - // 快乐学堂跳转到专门页面 - if (id === 5) { - wx.navigateTo({ - url: '/pages/happy-school/happy-school' - }) - return - } - - // 单身聚会跳转到专门页面 - if (id === 6) { - wx.navigateTo({ - url: '/pages/singles-party/singles-party' - }) - return - } - - wx.showToast({ title: `${name}功能开发中`, icon: 'none' }) - // TODO: 跳转到对应分类页面 }, /** diff --git a/pages/entertainment/entertainment.wxml b/pages/entertainment/entertainment.wxml index a0af262..76bab3d 100644 --- a/pages/entertainment/entertainment.wxml +++ b/pages/entertainment/entertainment.wxml @@ -37,11 +37,12 @@ - diff --git a/pages/gift-shop/gift-shop.js b/pages/gift-shop/gift-shop.js index 25cdf27..1ad32ff 100644 --- a/pages/gift-shop/gift-shop.js +++ b/pages/gift-shop/gift-shop.js @@ -1,5 +1,4 @@ const api = require('../../utils/api') -const auth = require('../../utils/auth') const config = require('../../config/index') Page({ @@ -8,6 +7,7 @@ Page({ navBarHeight: 44, totalNavHeight: 88, lovePoints: 0, + isLoggedIn: false, gifts: [], giftsLoading: false, giftsError: '', @@ -39,21 +39,24 @@ Page({ totalNavHeight }) + // 礼物商城无需登录即可访问 this.loadGifts() - - const isValid = await auth.ensureLogin({ - pageName: 'gift-shop', - redirectUrl: '/pages/gift-shop/gift-shop' - }) - - if (!isValid) return - - await new Promise(resolve => setTimeout(resolve, 50)) - this.loadLovePoints() + + // 检查登录状态并加载爱心值 + const app = getApp() + const isLoggedIn = app.globalData.isLoggedIn + this.setData({ isLoggedIn }) + + if (isLoggedIn) { + this.loadLovePoints() + } }, onShow() { const app = getApp() + this.setData({ isLoggedIn: app.globalData.isLoggedIn }) + + // 仅在登录状态下刷新爱心值 if (app.globalData.isLoggedIn) { this.loadLovePoints() } @@ -121,12 +124,21 @@ Page({ }, // 点击礼品卡片 - onGiftTap(e) { + onGiftTap() { wx.showModal({ - title: '提示', - content: '请下载app端进行兑换', - showCancel: false, - confirmText: '知道了' + title: '联系客服', + content: '请添加客服:mmj20259999', + confirmText: '复制', + success: (res) => { + if (res.confirm) { + wx.setClipboardData({ + data: 'mmj20259999', + success: () => { + wx.showToast({ title: '已复制', icon: 'success' }) + } + }) + } + } }) }, diff --git a/pages/gift-shop/gift-shop.wxml b/pages/gift-shop/gift-shop.wxml index a3e6271..03ff167 100644 --- a/pages/gift-shop/gift-shop.wxml +++ b/pages/gift-shop/gift-shop.wxml @@ -13,7 +13,8 @@ - + + diff --git a/pages/index/index.js b/pages/index/index.js index 87d1906..f4378b7 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -85,31 +85,21 @@ Page({ }, async onLoad() { - // 获取系统信息 - const { statusBarHeight, navHeight, auditStatus } = app.globalData - this.setData({ statusBarHeight, navHeight, auditStatus }) - - // 如果是审核状态,重定向到文娱页面 - if (auditStatus === 1) { + const localAuditStatus = wx.getStorageSync('auditStatus') || 0 + const { statusBarHeight, navHeight } = app.globalData + this.setData({ statusBarHeight, navHeight, auditStatus: localAuditStatus }) + + if (localAuditStatus === 1 || app.globalData.auditStatus === 1) { wx.switchTab({ url: '/pages/entertainment/entertainment' }) return } - // 加载首页素材 (Banner等) this.loadHomeAssets() - - // 加载分享配置 this.loadShareConfig() - - // 加载角色列表 this.loadCharacters() - - // 加载用户爱心余额 this.loadHeartBalance() - - // 加载解锁配置 this.loadUnlockConfig() }, @@ -208,13 +198,15 @@ Page({ // 隐藏默认tabbar wx.hideTabBar({ animation: false }) + // 从本地存储读取审核状态 + const localAuditStatus = wx.getStorageSync('auditStatus') || 0 const app = getApp() this.setData({ - auditStatus: app.globalData.auditStatus + auditStatus: localAuditStatus }) // 如果是审核状态,重定向到文娱页面 - if (app.globalData.auditStatus === 1) { + if (localAuditStatus === 1 || app.globalData.auditStatus === 1) { wx.switchTab({ url: '/pages/entertainment/entertainment' }) @@ -230,13 +222,30 @@ Page({ // 检查AI角色主动推送消息 this.checkProactiveMessages() - // 检查注册奖励 this.checkRegistrationReward() - // 检查 GF100 弹窗 this.checkGf100Popup() }, + onHide() { + this.stopAudio() + }, + + onUnload() { + this.stopAudio() + }, + + stopAudio() { + if (this.audioContext) { + try { + this.audioContext.stop() + this.audioContext.destroy() + } catch (e) {} + this.audioContext = null + } + wx.hideToast() + }, + onPullDownRefresh() { Promise.all([ this.loadCharacters(), @@ -534,16 +543,8 @@ Page({ const nextIndex = currentIndex + 1 // 切换卡片时,如果正在播放语音,则停止播放 - if (isVoicePlaying && this.audioContext) { - try { - console.log('[index] 切换卡片,停止上一个角色的语音') - this.audioContext.stop() - } catch (e) { - console.error('[index] 停止语音失败:', e) - } - } + if (isVoicePlaying) this.stopAudio() - // 如果快到末尾,加载更多 if (nextIndex >= profiles.length - 2) { this.loadMoreCharacters() } @@ -552,7 +553,8 @@ Page({ currentIndex: nextIndex, offsetX: 0, rotation: 0, - swipeDirection: '' + swipeDirection: '', + isVoicePlaying: false }) }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 12104c2..c3c8d6d 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/pages/orders/orders.wxml b/pages/orders/orders.wxml index 389b8d3..684e963 100644 --- a/pages/orders/orders.wxml +++ b/pages/orders/orders.wxml @@ -16,7 +16,7 @@ 已完成 - + 加载中... diff --git a/pages/promote/promote.wxml b/pages/promote/promote.wxml index 4103867..bd404f7 100644 --- a/pages/promote/promote.wxml +++ b/pages/promote/promote.wxml @@ -56,7 +56,7 @@ diff --git a/pages/promote/promote.wxss b/pages/promote/promote.wxss index 9b555bf..2f5dfa6 100644 --- a/pages/promote/promote.wxss +++ b/pages/promote/promote.wxss @@ -63,15 +63,14 @@ } .stats-value { - font-size: 60rpx; + font-size: 48rpx; font-weight: 800; - margin-bottom: 12rpx; + margin-bottom: 8rpx; } .stats-label { - font-size: 30rpx; - opacity: 0.95; - font-weight: 500; + font-size: 24rpx; + opacity: 0.9; } /* Amount Card */ @@ -158,116 +157,55 @@ } .purple-dot { - width: 10rpx; - height: 38rpx; + width: 8rpx; + height: 32rpx; background: #B06AB3; - border-radius: 6rpx; + border-radius: 4rpx; } .panel-title { - font-size: 38rpx; + font-size: 32rpx; font-weight: 800; color: #111827; } .referral-count { - font-size: 38rpx; + font-size: 32rpx; font-weight: 800; color: #B06AB3; } -.see-all { - font-size: 32rpx; - color: #B06AB3; - font-weight: 700; +.user-grid { + display: flex; + flex-wrap: wrap; + gap: 32rpx; /* Space between items */ } -.user-list { +.user-item { display: flex; flex-direction: column; - gap: 32rpx; -} - -.user-row { - display: flex; align-items: center; - padding: 32rpx 0; - border-bottom: 2rpx solid #F3F4F6; -} - -.user-row:last-child { - border-bottom: none; + width: 120rpx; } .user-avatar { - width: 110rpx; - height: 110rpx; + width: 100rpx; + height: 100rpx; border-radius: 50%; background: #F3F4F6; - margin-right: 24rpx; - flex-shrink: 0; -} - -.user-info { - flex: 1; - min-width: 0; -} - -.user-main { - display: flex; - align-items: center; - gap: 16rpx; - margin-bottom: 8rpx; + margin-bottom: 12rpx; } .user-name { - font-size: 36rpx; - font-weight: 700; - color: #1F2937; - max-width: 240rpx; + font-size: 24rpx; + color: #4B5563; + width: 100%; + text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.user-level { - font-size: 24rpx; - color: #B06AB3; - background: rgba(176, 106, 179, 0.1); - padding: 4rpx 16rpx; - border-radius: 20rpx; - font-weight: 600; -} - -.user-sub { - font-size: 28rpx; - color: #4B5563; -} - -.user-stats { - display: flex; - gap: 24rpx; - text-align: right; -} - -.stat-item { - display: flex; - flex-direction: column; - min-width: 100rpx; -} - -.stat-label { - font-size: 24rpx; - color: #9CA3AF; - margin-bottom: 6rpx; -} - -.stat-value { - font-size: 30rpx; - font-weight: 700; - color: #1F2937; -} - .empty-state { width: 100%; text-align: center; @@ -286,7 +224,7 @@ .menu-item { background: #FFFFFF; border-radius: 24rpx; - padding: 40rpx 32rpx; + padding: 32rpx; display: flex; align-items: center; justify-content: space-between; @@ -296,12 +234,12 @@ .menu-left { display: flex; align-items: center; - gap: 32rpx; + gap: 24rpx; } .icon-circle { - width: 88rpx; - height: 88rpx; + width: 72rpx; + height: 72rpx; border-radius: 50%; display: flex; align-items: center; @@ -313,15 +251,15 @@ .icon-circle.orange { background: rgba(245, 158, 11, 0.1); } .menu-text { - font-size: 34rpx; - font-weight: 700; + font-size: 30rpx; + font-weight: 600; color: #1F2937; } .btn-reset { background: none; border: none; - padding: 40rpx 32rpx; /* Match menu-item padding */ + padding: 32rpx; /* Match menu-item padding */ margin: 0; line-height: normal; border-radius: 24rpx; /* Match menu-item border-radius */ diff --git a/pages/referrals/referrals.wxml b/pages/referrals/referrals.wxml index ed0b829..31e053f 100644 --- a/pages/referrals/referrals.wxml +++ b/pages/referrals/referrals.wxml @@ -61,11 +61,11 @@