From 50072c45aba767452d772a62f0560e20da69629c Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Tue, 30 Dec 2025 18:30:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=A0=B7=E5=BC=8F):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E4=BA=A7=E7=89=A9=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 1 + common/js/config-external.js | 4 +- common/js/golbalConfig.js | 36 +- common/js/lang.js | 4 +- lang/zh-cn/goods/detail.js | 2 +- pages.json | 2 +- pages_goods/cart.vue | 2 +- pages_goods/category.vue | 2 +- pages_goods/detail.vue | 2 +- pages_order/detail_local_delivery.vue | 2 +- pages_order/detail_pickup.vue | 2 +- pages_order/payment.vue | 2 +- pages_promotion/fenxiao/child_fenxiao.vue | 576 ++++++------- pages_promotion/fenxiao/order.vue | 404 +++++----- pages_promotion/fenxiao/order_detail.vue | 754 +++++++++--------- pages_promotion/fenxiao/relation.vue | 302 +++---- pages_promotion/fenxiao/team.vue | 708 ++++++++-------- pages_promotion/fenxiao/withdraw_list.vue | 416 +++++----- pages_promotion/fenxiao/withdrawal_detail.vue | 252 +++--- pages_promotion/merch/merchcategory.vue | 2 +- pages_promotion/point/detail.vue | 4 +- pages_tool/article/list.vue | 2 +- pages_tool/contact/contact.vue | 2 +- pages_tool/goods/coupon.vue | 2 +- pages_tool/goods/search.vue | 2 +- pages_tool/member/account.vue | 2 +- pages_tool/member/address.vue | 2 +- pages_tool/member/balance_detail.vue | 2 +- pages_tool/member/collection.vue | 2 +- pages_tool/member/info.vue | 2 +- pages_tool/member/info_edit.vue | 2 +- pages_tool/member/invite_friends.vue | 2 +- pages_tool/member/point_detail.vue | 2 +- pages_tool/member/withdrawal.vue | 2 +- pages_tool/member/withdrawal_detail.vue | 2 +- pages_tool/notice/list.vue | 2 +- pages_tool/order/detail_virtual.vue | 2 +- pages_tool/order/evaluate.vue | 170 ++-- pages_tool/order/logistics.vue | 2 +- pages_tool/order/refund.vue | 2 +- pages_tool/order/refund_batch.vue | 2 +- pages_tool/order/refund_detail.vue | 2 +- pages_tool/order/refund_type_select.vue | 2 +- pages_tool/storeclose/storeclose.vue | 196 ++--- pages_tool/vr/index.vue | 102 +-- pages_tool/webview/webview.vue | 4 +- store/index.js | 35 + 47 files changed, 2019 insertions(+), 2009 deletions(-) diff --git a/App.vue b/App.vue index 64d8e34..95bc6b6 100644 --- a/App.vue +++ b/App.vue @@ -67,6 +67,7 @@ // 主题风格 if (uni.getStorageSync('themeStyle')) { this.$store.commit('setThemeStyle', configExternal.loadThemeSync(uni.getStorageSync('themeStyle'))); + this.$store.dispatch('themeColorSet'); } // 插件是否存在 diff --git a/common/js/config-external.js b/common/js/config-external.js index 3fd174e..26cc8f1 100644 --- a/common/js/config-external.js +++ b/common/js/config-external.js @@ -111,6 +111,7 @@ class ConfigExternal { try { // 动态加载主题配置 const themeData = require(`@/common/js/style_color.js`)['default'][theme]; + console.log('sync themeData => ', themeData); this.loadedConfigs[`theme_${theme}`] = themeData; return themeData; } catch (error) { @@ -136,7 +137,8 @@ class ConfigExternal { this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => { try { // 动态加载主题配置 - const themeData = require(`@/common/js/style_color.js`)[theme]; + const themeData = require(`@/common/js/style_color.js`)['default'][theme]; + console.log('async themeData => ', themeData); this.loadedConfigs[`theme_${theme}`] = themeData; resolve(themeData); } catch (error) { diff --git a/common/js/golbalConfig.js b/common/js/golbalConfig.js index 8363dbf..27a27d4 100644 --- a/common/js/golbalConfig.js +++ b/common/js/golbalConfig.js @@ -1,21 +1,8 @@ export default { - data() { - return { - // 页面样式,动态设置主色调 - themeColor: '' //''--base-color:#fa5d14;--base-help-color:#ff7e00;' - } - }, onLoad() { }, onShow() { // 刷新多语言 this.$langConfig.refresh(); - let time = setInterval(() => { - let theme = this.themeStyle; - if (theme && theme.main_color) { - this.themeColorSet(); - clearInterval(time); - } - }, 50); }, computed: { // 是否是英文环境 @@ -24,6 +11,9 @@ export default { }, themeStyle() { return this.$store.state.themeStyle; + }, + themeColor() { + return this.$store.state.themeColor; }, // 插件是否存在 addonIsExist() { @@ -111,25 +101,7 @@ export default { } }, methods: { - themeColorSet() { - let theme = this.themeStyle; - this.themeColor = `--base-color:${theme.main_color};--base-help-color:${theme.aux_color};`; - if (this.tabBarHeight != '56px') this.themeColor += `--tab-bar-height:${this.tabBarHeight};` - Object.keys(theme).forEach(key => { - let data = theme[key]; - if (typeof (data) == "object") { - Object.keys(data).forEach(k => { - this.themeColor += '--' + k.replace(/_/g, "-") + ':' + data[k] + ';'; - }); - } else if (typeof (key) == "string" && key) { - this.themeColor += '--' + key.replace(/_/g, "-") + ':' + data + ';'; - } - }); - for (let i = 9; i >= 5; i--) { - let color = this.$util.colourBlend(theme.main_color, '#ffffff', (i / 10)); - this.themeColor += `--base-color-light-${i}:${color};`; - } - }, + // 颜色变浅(>0)、变深函数(<0) lightenDarkenColor(color, amount) { diff --git a/common/js/lang.js b/common/js/lang.js index 7d3ff47..bc03c0b 100644 --- a/common/js/lang.js +++ b/common/js/lang.js @@ -72,7 +72,7 @@ export default { //当前页面语言包(同步加载) let route = _this.route; let langPath = processRoutePath(route); - console.log(`当前页面语言包路径: ${langPath}`); + // console.log(`当前页面语言包路径: ${langPath}`); // 加载当前页面语言包 let currentPageLang = loadLangPackSync(locale, langPath); @@ -113,7 +113,7 @@ export default { if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field // 多语言调试,注释后可以关闭控制台输出 - console.log(`字段: ${field}, 值: ${value}`) + // console.log(`字段: ${field}, 值: ${value}`) return value; }, /** diff --git a/lang/zh-cn/goods/detail.js b/lang/zh-cn/goods/detail.js index 24c57da..34efc9b 100644 --- a/lang/zh-cn/goods/detail.js +++ b/lang/zh-cn/goods/detail.js @@ -2,7 +2,7 @@ export const lang = { //title为每个页面的标题 title: '', select: '选择', - details:'商品详情', + details:'资源详情', params: '参数', service: '商品服务', allGoods: '全部商品', diff --git a/pages.json b/pages.json index 19936b6..4e2c1e6 100644 --- a/pages.json +++ b/pages.json @@ -43,7 +43,7 @@ { "path": "detail", "style": { - "navigationBarTitleText": "商品详情" + "navigationBarTitleText": "资源详情" } }, { diff --git a/pages_goods/cart.vue b/pages_goods/cart.vue index 7a8eca5..87ddee9 100644 --- a/pages_goods/cart.vue +++ b/pages_goods/cart.vue @@ -1,6 +1,6 @@