diff --git a/.gitignore b/.gitignore index 14d7d69..db83a01 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /.hbuilderx /.idea /node_modules +/iconfont-preview.html diff --git a/.local.config.js b/.local.config.js index 28cf028..6386cb0 100644 --- a/.local.config.js +++ b/.local.config.js @@ -38,6 +38,10 @@ const localDevConfig = ({ uniacid: 1, domain: 'https://test.aigc-quickapp.com', }, + 'local-2': { // 测试平台 + uniacid: 2, + domain: 'http://localhost:8050/', + }, })['2811']; // 选择要使用的环境配置 export default localDevConfig; \ No newline at end of file diff --git a/.local.config.js.example b/.local.config.js.example index 28cf028..92772a3 100644 --- a/.local.config.js.example +++ b/.local.config.js.example @@ -18,6 +18,10 @@ const localDevConfig = ({ uniacid: 2811, domain: 'https://xcx6.aigc-quickapp.com/', }, + '2812': { // IVD数商模式 + uniacid: 2812, + domain: 'https://xcx6.aigc-quickapp.com/', + }, '2724': { // 生物菌肥 uniacid: 2724, domain: 'https://xcx.aigc-quickapp.com/', @@ -38,6 +42,14 @@ const localDevConfig = ({ uniacid: 1, domain: 'https://test.aigc-quickapp.com', }, -})['2811']; // 选择要使用的环境配置 + 'local-2': { // 测试平台 + uniacid: 2, + domain: 'http://localhost:8050/', + }, + 'local-2-dev': { // 本地开发测试平台 + uniacid: 2, + domain: 'http://localhost:8050/', + }, +})['2812']; // 选择要使用的环境配置 export default localDevConfig; \ No newline at end of file diff --git a/App.vue b/App.vue index 2625d3c..09f2e4e 100644 --- a/App.vue +++ b/App.vue @@ -314,7 +314,7 @@ @import './common/css/iconfont.css'; @import './common/css/icondiy.css'; // 自定义图标库 @import './common/css/icon/extend.css'; // 扩展图标库 - page{ + page { background: #f4f6fa; } \ No newline at end of file diff --git a/common/css/diy.scss b/common/css/diy.scss index e83aaee..943dbfd 100644 --- a/common/css/diy.scss +++ b/common/css/diy.scss @@ -123,7 +123,7 @@ image { } .choose-store { - /deep/ .uni-popup__wrapper{ + ::v-deep .uni-popup__wrapper{ background: none!important; } } diff --git a/common/css/goods_detail.scss b/common/css/goods_detail.scss index c1a25e1..f34c2bc 100644 --- a/common/css/goods_detail.scss +++ b/common/css/goods_detail.scss @@ -870,13 +870,13 @@ // 海报 // .uni-popup__wrapper-box .poster-layer { - /deep/ .uni-popup__wrapper.center { + ::v-deep .uni-popup__wrapper.center { width: 100vw!important; height: 100vh!important; background: none!important; } - /deep/ .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box { + ::v-deep .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box { max-width: 100vw!important; max-height: 100vh!important; background: none!important; diff --git a/common/css/main.scss b/common/css/main.scss index a9cc722..b42a25b 100644 --- a/common/css/main.scss +++ b/common/css/main.scss @@ -559,7 +559,7 @@ scroll-view ::-webkit-scrollbar { background-color: transparent; } -/deep/::-webkit-scrollbar { +::v-deep ::-webkit-scrollbar { width: 0; height: 0; background-color: transparent; @@ -609,7 +609,7 @@ scroll-view ::-webkit-scrollbar { font-weight: 500!important; } -/deep/ .reward-popup .uni-popup__wrapper-box { +::v-deep .reward-popup .uni-popup__wrapper-box { background: none !important; max-width: unset !important; max-height: unset !important; @@ -618,7 +618,7 @@ scroll-view ::-webkit-scrollbar { // #ifdef H5 // 下拉加载动画【页面】 -/deep/ body uni-page-refresh div{ +::v-deep body uni-page-refresh div{ width: 14rpx !important; height: 14rpx !important; background-color: #ccc; @@ -626,7 +626,7 @@ scroll-view ::-webkit-scrollbar { clip: rect(-152rpx, 90rpx, 90rpx, -30rpx) !important; animation:.6s backgroundChange linear infinite; } -/deep/ body uni-page-refresh div::after{ +::v-deep body uni-page-refresh div::after{ content: ""; position: absolute; left: -22rpx; @@ -636,7 +636,7 @@ scroll-view ::-webkit-scrollbar { background-color: #ccc; animation:.5s backgroundChange linear infinite; } -/deep/ body uni-page-refresh div::before{ +::v-deep body uni-page-refresh div::before{ content: ""; position: absolute; right: -22rpx; @@ -646,15 +646,15 @@ scroll-view ::-webkit-scrollbar { background-color: #ccc; animation:.7s backgroundChange linear infinite; } -/deep/ body uni-page-refresh > div > div{ +::v-deep body uni-page-refresh > div > div{ display: none !important; } // 下拉加载动画【scroll-view】 -/deep/ body .uni-scroll-view-refresher{ +::v-deep body .uni-scroll-view-refresher{ background-color: transparent !important; } -/deep/ body .uni-scroll-view-refresher div{ +::v-deep body .uni-scroll-view-refresher div{ left: 50%; top: 50%; transform: translate(-50%, -50%); @@ -666,7 +666,7 @@ scroll-view ::-webkit-scrollbar { clip: rect(-152rpx, 90rpx, 90rpx, -30rpx) !important; animation:.6s backgroundChange linear infinite; } -/deep/ body .uni-scroll-view-refresher div::after{ +::v-deep body .uni-scroll-view-refresher div::after{ content: ""; position: absolute; left: -22rpx; @@ -676,7 +676,7 @@ scroll-view ::-webkit-scrollbar { background-color: #ccc; animation:.5s backgroundChange linear infinite; } -/deep/ body .uni-scroll-view-refresher div::before{ +::v-deep body .uni-scroll-view-refresher div::before{ content: ""; position: absolute; right: -22rpx; @@ -686,7 +686,7 @@ scroll-view ::-webkit-scrollbar { background-color: #ccc; animation:.7s backgroundChange linear infinite; } -/deep/ body .uni-scroll-view-refresher > div > div{ +::v-deep body .uni-scroll-view-refresher > div > div{ display: none !important; } @keyframes backgroundChange { diff --git a/common/css/mp_html_patch.scss b/common/css/mp_html_patch.scss index a3bbdbe..9679c0c 100644 --- a/common/css/mp_html_patch.scss +++ b/common/css/mp_html_patch.scss @@ -1,4 +1,4 @@ // 修复图片垂直对齐问题,解决两张图片上下有空白缝隙问题 -/deep/ ._img { +::v-deep ._img { vertical-align: top; } \ No newline at end of file diff --git a/common/css/order_parment.scss b/common/css/order_parment.scss index 0f1bc27..56d9b1b 100644 --- a/common/css/order_parment.scss +++ b/common/css/order_parment.scss @@ -377,7 +377,7 @@ view { } } -/deep/ .goods-form { +::v-deep .goods-form { display: flex; align-items: center; position: relative; @@ -1354,7 +1354,7 @@ view { border-bottom: 2rpx solid #F4F4F6; } - /deep/ .form-wrap { + ::v-deep .form-wrap { margin: 0 24rpx; .icon-right { diff --git a/common/js/ai-service.js b/common/js/ai-service.js index 58353d1..88c4dff 100644 --- a/common/js/ai-service.js +++ b/common/js/ai-service.js @@ -431,4 +431,4 @@ export default { return null; // #endif } -}; \ No newline at end of file +}; diff --git a/common/js/config-external.js b/common/js/config-external.js index c1edd73..21735c7 100644 --- a/common/js/config-external.js +++ b/common/js/config-external.js @@ -116,7 +116,7 @@ class ConfigExternal { try { // 动态加载主题配置 const themeData = require(`@/common/js/style_color.js`)['default'][theme]; - console.log('async themeData => ', themeData); + // console.log('async themeData => ', themeData); this.loadedConfigs[`theme_${theme}`] = themeData; resolve(themeData); } catch (error) { diff --git a/common/js/config.js b/common/js/config.js index 992a535..ec8d65b 100644 --- a/common/js/config.js +++ b/common/js/config.js @@ -20,6 +20,10 @@ try { // 默认域名, 自定义发行时可以修改 let defaultDomain = ''; +// #ifdef H5_XCX_5G_QUICKAPP_COM +defaultDomain = 'https://xcx20.5g-quickapp.com'; +// #endif + // #ifdef H5_XCX_AIGC_QUICKAPP_COM defaultDomain = 'https://xcx.aigc-quickapp.com/'; // #endif diff --git a/common/js/customer-service.js b/common/js/customer-service.js index 4960919..bd1b508 100644 --- a/common/js/customer-service.js +++ b/common/js/customer-service.js @@ -2,13 +2,68 @@ * 客服统一处理服务 * 整合各种客服方式,提供统一的调用接口 */ -export class CustomerService { - constructor(vueInstance, externalConfig = null) { +class CustomerService { + constructor(vueInstance, externalConfig = {}) { + if (!vueInstance.$lang) { + throw new Error('CustomerService 必须在 Vue 实例中初始化'); + } + this.vm = vueInstance; this.externalConfig = externalConfig; // 外部传入的最新配置(优先级最高) this.latestPlatformConfig = null; } + getSupoortKeFuList() { + if (!this.vm) return []; + + const vm = this.vm; + + return [ + { + id: 'weixin-official', + name: vm.$lang('customer.weChatKefu'), + isOfficial: true, + type: 'weapp' + }, + { + id: 'custom-kefu', + name: vm.$lang('customer.systemKefu'), + isOfficial: false + }, + { + id: 'qyweixin-kefu', + name: vm.$lang('customer.weChatWorkKefu'), + isOfficial: false + }, + ] + } + + /** + * 打开客服选择弹窗 + */ + openCustomerSelectPopupDialog() { + const kefu_list = this.getSupoortKeFuList(); + const kefuNames = kefu_list.map(item => item.name); + + uni.showActionSheet({ + itemList: kefuNames, + success: (res) => { + const kefu = kefu_list[res.tapIndex]; + this.externalConfig = kefu ?? this.externalConfig ?? {}; + if (kefu.isOfficial) { + uni.openCustomerServiceConversation({ + sessionFrom: 'weapp', + showMessageCard: true + }); + } else if (kefu.id === 'custom-kefu') { + this.handleCustomerClick(); + } else if (kefu.id === 'qyweixin-kefu') { + this.handleQyWeixinKefuClick(); + } + } + }); + } + /** * 强制刷新配置(支持传入外部配置) * @param {Object} externalConfig 外部最新配置 @@ -82,7 +137,7 @@ export class CustomerService { validateConfig() { const config = this.getPlatformConfig(); const wxworkConfig = this.getWxworkConfig(); - + const result = { isValid: true, errors: [], @@ -122,35 +177,11 @@ export class CustomerService { } /** - * 跳转到Dify客服页面 + * 跳转到AI客服页面 */ - openDifyService() { - try { - if (this.vm.setAiUnreadCount) { - this.vm.setAiUnreadCount(0); - } - // 强制跳转,忽略框架层的封装 - uni.redirectTo({ - url: '/pages_tool/ai-chat/index', - fail: (err) => { - // 兜底:使用window.location跳转(H5) - // #ifdef H5 - window.location.href = '/pages_tool/ai-chat/index'; - // #endif - console.error('跳转Dify客服失败:', err); - uni.showToast({ - title: '跳转客服失败', - icon: 'none' - }); - } - }); - } catch (e) { - console.error('跳转Dify客服异常:', e); - uni.showToast({ - title: '跳转客服失败', - icon: 'none' - }); - } + openAIKeFuService() { + const vm = this.vm; + vm.$util.redirectTo(vm.$util.AI_CHAT_PAGE_URL); } /** @@ -170,7 +201,7 @@ export class CustomerService { } const config = this.getPlatformConfig(); - const { niushop = {}, sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options; + const { niushop = {}, sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options || {}; if (config.type === 'none') { this.showNoServicePopup(); @@ -180,7 +211,7 @@ export class CustomerService { // 核心分支:根据最新的type处理 switch (config.type) { case 'aikefu': - this.openDifyService(); + this.openAIKeFuService(); break; case 'wxwork': this.openWxworkService(false, config, options); @@ -211,7 +242,7 @@ export class CustomerService { openWxworkService(useOriginalService = false, servicerConfig = null, options = {}) { const config = servicerConfig || this.getPlatformConfig(); const wxworkConfig = this.getWxworkConfig(); - const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options; + const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options || {}; // #ifdef MP-WEIXIN if (wxworkConfig?.enable && wxworkConfig?.contact_url && !useOriginalService) { @@ -292,7 +323,7 @@ export class CustomerService { * @param {Object} options 选项参数 */ handleCustomWeappService(config, options = {}) { - const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options; + const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options || {}; if (config.customServiceUrl) { let url = config.customServiceUrl; @@ -300,11 +331,11 @@ export class CustomerService { if (sendMessageTitle) params.push(`title=${encodeURIComponent(sendMessageTitle)}`); if (sendMessagePath) params.push(`path=${encodeURIComponent(sendMessagePath)}`); if (sendMessageImg) params.push(`img=${encodeURIComponent(sendMessageImg)}`); - + if (params.length > 0) { url += (url.includes('?') ? '&' : '?') + params.join('&'); } - + uni.navigateTo({ url: url, fail: (err) => { @@ -328,7 +359,7 @@ export class CustomerService { // #ifdef H5 window.open(config.thirdPartyServiceUrl, '_blank'); // #endif - + // #ifdef MP-WEIXIN if (config.thirdPartyMiniAppId) { wx.navigateToMiniProgram({ @@ -381,7 +412,7 @@ export class CustomerService { console.log('支付宝小程序客服', config); switch (config.type) { case 'aikefu': - this.openDifyService(); + this.openAIKeFuService(); break; case 'third': this.openThirdService(config); @@ -395,26 +426,29 @@ export class CustomerService { /** * 拨打电话 */ - makePhoneCall() { - this.vm.$api.sendRequest({ - url: '/api/site/shopcontact', - success: res => { - if (res.code === 0 && res.data?.mobile) { + makePhoneCall(mobileNumber) { + if (mobileNumber) { + return uni.makePhoneCall({ + phoneNumber: mobileNumber + }); + } + + // 从缓存中获取电话信息 + uni.getStorage({ + key: 'shopInfo', + success: (res) => { + const shopInfo = res.data; + const mobile = shopInfo?.mobile ?? ''; + if (mobile) { uni.makePhoneCall({ - phoneNumber: res.data.mobile - }); + phoneNumber: mobile + }); } else { uni.showToast({ title: '暂无客服电话', icon: 'none' - }); + }); } - }, - fail: () => { - uni.showToast({ - title: '获取客服电话失败', - icon: 'none' - }); } }); } @@ -424,8 +458,8 @@ export class CustomerService { */ showNoServicePopup() { const siteInfo = this.vm.$store.state.siteInfo || {}; - const message = siteInfo?.site_tel - ? `请联系客服,客服电话是${siteInfo.site_tel}` + const message = siteInfo?.site_tel + ? `请联系客服,客服电话是${siteInfo.site_tel}` : '抱歉,商家暂无客服,请线下联系'; uni.showModal({ @@ -506,6 +540,6 @@ export class CustomerService { * @param {Object} externalConfig 外部最新配置 * @returns {CustomerService} 客服服务实例 */ -export function createCustomerService(vueInstance, externalConfig = null) { +export function createCustomerService(vueInstance, externalConfig = {}) { return new CustomerService(vueInstance, externalConfig); } \ No newline at end of file diff --git a/common/js/golbalConfig.js b/common/js/golbalConfig.js index 27a27d4..d412a07 100644 --- a/common/js/golbalConfig.js +++ b/common/js/golbalConfig.js @@ -69,6 +69,10 @@ export default { servicerConfig() { return this.$store.state.servicerConfig; }, + // 企业微信配置 + wxworkConfig() { + return this.$store.state.wxworkConfig; + }, diySeckillInterval() { return this.$store.state.diySeckillInterval; }, @@ -145,7 +149,7 @@ export default { if (isJump && route != 'pages/index/index') { uni.setStorageSync('manual_change_store', true); // 手动切换门店 this.$store.dispatch('getCartNumber'); //重新获取购物车数据 - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); } } }, diff --git a/common/js/goods_detail_base.js b/common/js/goods_detail_base.js index 2fe192a..f61ebe5 100644 --- a/common/js/goods_detail_base.js +++ b/common/js/goods_detail_base.js @@ -240,7 +240,7 @@ export default { }, goHome() { if (this.preview) return; // 开启预览,禁止任何操作和跳转 - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, goCart() { if (this.preview) return; // 开启预览,禁止任何操作和跳转 diff --git a/common/js/lang.js b/common/js/lang.js index 5fec1bf..c8ca741 100644 --- a/common/js/lang.js +++ b/common/js/lang.js @@ -66,15 +66,16 @@ export default { const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言 - var value = ''; + let value = ''; // 存放解析后的语言值 + let langPath = ''; // 存放当前页面语言包路径 + try { //公共语言包(同步加载) var lang = loadLangPackSync(locale, 'common'); //当前页面语言包(同步加载) let route = _this.route; - let langPath = processRoutePath(route); - console.log(`当前语言: ${locale}, 当前页面语言包路径: ${langPath}`); + langPath = processRoutePath(route); // 加载当前页面语言包 let currentPageLang = loadLangPackSync(locale, langPath); @@ -102,7 +103,7 @@ export default { } } catch (e) { - console.error('解析语言包失败:', e); + console.error('解析语言包失败:', e, { langPath, field, locale }); value = field; } @@ -115,7 +116,10 @@ export default { if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field // 多语言调试,注释后可以关闭控制台输出 - console.log(`字段: ${field}, 值: ${value}`) + if (field == value) { + console.warn(`警告: 字段 ${field} 在语言包 ${langPath} 中未找到对应值,使用默认值 ${field} 当前语言: ${locale}`); + } + return value; }, /** diff --git a/common/js/share.js b/common/js/share.js new file mode 100644 index 0000000..65924c9 --- /dev/null +++ b/common/js/share.js @@ -0,0 +1,100 @@ +// 文件分享工具函数 +export default { + /** + * 生成文件预览链接 + * @param {Object} file - 文件对象,包含 name 和 url 属性 + * @returns {string} - 生成的文件预览链接 + */ + generateFilePreviewUrl(file) { + // 推断文件类型 + let fileType = ''; + if (file.name) { + const ext = file.name.split('.').pop().toLowerCase(); + if (['pdf'].includes(ext)) { + fileType = 'pdf'; + } else if (['doc', 'docx'].includes(ext)) { + fileType = 'word'; + } else if (['mp4', 'avi', 'mov', 'wmv', 'flv', 'mkv'].includes(ext)) { + fileType = 'video'; + } + } + + // 构建文件预览链接 + const previewUrl = `/pages_tool/file-preview/file-preview?fileName=${encodeURIComponent(file.name)}&fileUrl=${encodeURIComponent(file.url || '')}&fileType=${encodeURIComponent(fileType)}`; + return previewUrl; + }, + + /** + * 分享文件 + * @param {Object} file - 文件对象,包含 name 和 url 属性 + * @param {string} title - 分享标题,默认使用文件名 + * @param {string} desc - 分享描述,默认使用固定文案 + */ + shareFile(file, title = file.name, desc = '查看企业文件:' + file.name) { + // 生成文件预览链接 + const filePreviewUrl = this.generateFilePreviewUrl(file); + + // #ifdef H5 + // H5 平台分享 + if (navigator.share) { + // 使用 Web Share API + navigator.share({ + title: title, + text: desc, + url: filePreviewUrl + }).catch(err => { + console.error('分享失败:', err); + uni.showToast({ title: '分享失败', icon: 'none' }); + }); + } else { + // 不支持 Web Share API 的浏览器 + uni.setClipboardData({ + data: filePreviewUrl, + success: () => { + uni.showToast({ title: '链接已复制,请粘贴分享', icon: 'success' }); + }, + fail: () => { + uni.showToast({ title: '复制失败', icon: 'none' }); + } + }); + } + // #endif + + // #ifdef MP-WEIXIN + // 微信小程序分享 + uni.showActionSheet({ + itemList: ['发送给朋友', '分享到朋友圈'], + success: (res) => { + if (res.tapIndex === 0) { + // 发送给朋友 + uni.shareAppMessage({ + title: title, + path: filePreviewUrl, + success: () => { + uni.showToast({ title: '分享成功', icon: 'success' }); + }, + fail: () => { + uni.showToast({ title: '分享失败', icon: 'none' }); + } + }); + } else if (res.tapIndex === 1) { + // 分享到朋友圈 + uni.shareTimeline({ + title: desc, + path: filePreviewUrl, + success: () => { + uni.showToast({ title: '分享成功', icon: 'success' }); + }, + fail: () => { + uni.showToast({ title: '分享失败', icon: 'none' }); + } + }); + } + }, + fail: () => { + // 用户取消分享 + } + }); + // #endif + } +}; \ No newline at end of file diff --git a/common/js/uniapp.utils.js b/common/js/uniapp.utils.js new file mode 100644 index 0000000..2034bd9 --- /dev/null +++ b/common/js/uniapp.utils.js @@ -0,0 +1,148 @@ +/** + * 将常用的Uniapp提供的函数,存放到这里,按需引用 + */ + + +/** + * 显示错误信息 + * @param {Exception} err + * @param {Boolean} useModal + */ +const showError = (err, useModal = false) => { + const content = err?.message || err?.errMsg || err?.toString(); + if (!useModal) { + uni.showToast({ + title: content, + icon: 'none', + duration: 3000 + }); + } else { + uni.showModal({ + title: '错误提示', + content, + showCancel: false, + }) + } +} + +/** + * 打电话 + * @param {string} mobile 电话号码 + */ +export const makePhoneCall = (mobile) => { + try { + uni.makePhoneCall({ + phoneNumber: `${mobile}`, + success(e) { + console.log(e); + } + }); + } catch (err) { + showError(err); + } +} + +/** + * 拷贝文本(返回 Promise) + * @param {*} text + * @param {*} options + * @returns {Promise} 返回 Promise,成功时 resolve,失败时 reject + */ +export const copyTextAsync = (text, { copySuccess = '', copyFailed = '' } = {}) => { + return new Promise((resolve, reject) => { + // 输入验证 + if (!text && text !== '') { + const error = new Error('复制文本不能为空'); + showError(error); + reject(error); + return; + } + + // 超时监测 + const timeoutId = setTimeout(() => { + let error = new Error('复制操作长时间无响应,请检查相关权限及配置是否正确'); + // #ifdef MP-WEIXIN + error = new Error([ + '复制操作长时间无响应!', + '原因:', + '1.微信平台->用户隐私保护指引->"剪贴板"功能未添加或审核未通过;', + '2.微信平台对剪贴板API调用频率有限制' + ].join('\r\n')); + // #endif + showError(error, true); + reject(error); + }, 5000); + + try { + uni.setClipboardData({ + data: `${text}`, + success: (res) => { + clearTimeout(timeoutId); + + try { + if (copySuccess) { + uni.showToast({ + title: copySuccess, + icon: 'success', + duration: 2000 + }); + } + } catch (e) { + showError(e); + } + + resolve(res); + }, + fail: (err) => { + clearTimeout(timeoutId); + try { + uni.showToast({ + title: err.message || err.errMsg || copyFailed || '复制失败', + icon: 'none', + duration: 2000 + }); + } catch (e) { + showError(e); + } + reject(err); + } + }); + } catch (err) { + clearTimeout(timeoutId); + showError(err); + reject(err); + } + }); +} + +/** + * 拷贝文本(回调形式,兼容旧代码) + * @param {*} text + * @param {*} options + * @param {Function} callback 回调函数,接收 (success, error) 参数 + */ +export const copyText = (text, options = {}, callback) => { + copyTextAsync(text, options) + .then(res => { + if (callback) callback(true, null); + }) + .catch(err => { + if (callback) callback(false, err); + }); +} + +/** + * 打开定位 + * @param {Object} options + */ +export const openLocation = ({ latitude, longitude, name } = {}) => { + try { + uni.openLocation({ + latitude, + longitude, + name, + }); + } catch (err) { + showError(err); + } +} \ No newline at end of file diff --git a/common/js/util.js b/common/js/util.js index d47f9e7..59114f2 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -7,15 +7,20 @@ import { -// 首页路径 +// 关于页面路径,使用常量导出 export const INDEX_PAGE_URL = '/pages/index/index'; +export const CATEGORY_PAGE_URL = '/pages_goods/category'; +export const CONTACT_PAGE_URL = '/pages_tool/contact/contact'; +export const MEMBER_PAGE_URL = '/pages_tool/member/index'; +export const LOGIN_PAGE_URL = '/pages_tool/login/login'; +export const AI_CHAT_PAGE_URL = '/pages_tool/ai-chat/index'; // 当前最新的tabBar.list (参见pages.json 中的tabBar.list 配置) export const systemTabBarList = [ INDEX_PAGE_URL, - '/pages_goods/category', - '/pages_tool/contact/contact', - '/pages_tool/member/index' + CATEGORY_PAGE_URL, + CONTACT_PAGE_URL, + MEMBER_PAGE_URL ]; /** @@ -89,8 +94,8 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => { const linkUrlParts = adaptSubpackageUrl(linkUrl).split('/'); const currentPageRouteParts = currentPageRoute.split('/'); - console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts}); - + // console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts}); + try { // 二级页面 if (linkUrlParts[2] === currentPageRouteParts[2]) { @@ -109,17 +114,25 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => { } export default { + /** 导出页面URL常量 */ + MEMBER_PAGE_URL, + CATEGORY_PAGE_URL, + CONTACT_PAGE_URL, + INDEX_PAGE_URL, + LOGIN_PAGE_URL, + AI_CHAT_PAGE_URL, + /** * 页面跳转 * @param {string} to 跳转链接 /pages/idnex/index - * @param {Object} param 参数 {key : value, ...} - * @param {string} mode 模式 + * @param {Object} param 参数 {key : value, ...}, 默认{} + * @param {string} mode 模式 navigateTo、redirectTo、reLaunch、tabbar, 默认navigateTo */ - redirectTo(to, param, mode) { + redirectTo(to, param = {}, mode = 'navigateTo') { let url = to; // 替换url中的前缀 - console.log('redirectTo', to, param, mode); + console.log('页面跳转 redirectTo', to, param, mode); url = adaptSubpackageUrl(url); console.log('adaptSubpackageUrl', url); @@ -146,26 +159,26 @@ export default { // 如果url不包含tabBarList中的路径,根据mode判断跳转方式 switch (mode) { case 'tabbar': - // 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。 + // 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。重置页面栈,仅保留 tabBar 页面 uni.switchTab({ url }); break; case 'redirectTo': - // 关闭当前页面,跳转到应用内的某个页面。 + // 关闭当前页面,跳转到应用内的某个页面。替换栈顶页面,长度不变(上限10层) uni.redirectTo({ url }); break; case 'reLaunch': - // 关闭所有页面,打开到应用内的某个页面。 + // 关闭所有页面,打开到应用内的某个页面。清空栈后打开新页面,长度=1 uni.reLaunch({ url }); break; default: - // 保留当前页面,跳转到应用内的某个页面 - console.log('保留当前页面,跳转到应用内的某个页面', url); + // 保留当前页面,跳转到应用内的某个页面,新增页面到栈顶,长度+1(上限10层) + console.log('保留当前页面,navigateTo跳转到应用内的某个页面', url); uni.navigateTo({ url }); @@ -592,6 +605,36 @@ export default { } return cloneObj }, + + + + /** + * 打开微信企业客服 + * @param {Function} fallbackFunc 降级处理函数 + */ + openWxWorkServiceChat(fallbackFunc) { + // #ifdef MP-WEIXIN + let wxworkConfig = store.state?.wxworkConfig + if (wxworkConfig?.enable && wxworkConfig?.contact_url) { + // 直接使用活码链接跳转 + wx.navigateToMiniProgram({ + appId: 'wxeb490c6f9b154ef9', // 是企业微信官方小程序的AppID(固定值, 由腾讯企业微信团队维护, 不需要修改,用于展示"添加企业微信联系人"的官方页面) + path: `pages/contacts/externalContactDetail?url=${encodeURIComponent(wxworkConfig?.contact_url)}`, + success: () => { + console.log('跳转企业微信成功'); + }, + fail: (err) => { + console.error('跳转企业微信失败:', err); + // 降级处理:使用原有客服方式 + fallbackFunc && fallbackFunc(); + } + }); + } else { + fallbackFunc && fallbackFunc(); + } + // #endif + }, + /** * 自定义模板的跳转链接 * @param {Object} link @@ -614,7 +657,6 @@ export default { } else if (link.appid) { // 跳转其他小程序 - uni.navigateToMiniProgram({ appId: link.appid, path: link.page @@ -622,7 +664,6 @@ export default { } else if (link.name == 'MOBILE' && !link.wap_url) { // 拨打电话 - uni.makePhoneCall({ phoneNumber: link.mobile, success: (res) => { @@ -655,16 +696,19 @@ export default { // #endif // #ifdef MP-WEIXIN - wx.openCustomerServiceChat({ - extInfo: { - url: config.wxwork_url - }, - corpId: config.corpid, - showMessageCard: true, - sendMessageTitle: 'this.sendMessageTitle', - sendMessagePath: 'this.sendMessagePath', - sendMessageImg: 'this.sendMessageImg' + this.openWxWorkServiceChat(() => { + wx.openCustomerServiceChat({ + extInfo: { + url: config.wxwork_url + }, + corpId: config.corpid, + showMessageCard: true, + sendMessageTitle: 'this.sendMessageTitle', + sendMessagePath: 'this.sendMessagePath', + sendMessageImg: 'this.sendMessageImg' + }); }); + // #endif break; case 'third': @@ -792,13 +836,22 @@ export default { let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 return routes.length ? routes[routes.length - 1].route : ''; }, - goBack(backUrl = '/pages/index/index') { + goBack(backUrl = INDEX_PAGE_URL) { if (getCurrentPages().length == 1) { this.redirectTo(backUrl); } else { uni.navigateBack(); } }, + /** + * 隐藏“返回首页/小房子”按钮 + * 这个函数,用到页面show, onshow 的生命周期时 + */ + hideHomeButton() { + // #ifdef MP-WEIXIN + wx.hideHomeButton(); + // #endif + }, /** * * @param val 转化时间字符串 (转化时分秒) @@ -1148,5 +1201,74 @@ export default { verifyMobile(mobile) { var parse = /^\d{11}$/.test(mobile); return parse; + }, + /** + * 判断是否为快应用环境 + * @returns {boolean} 是否为快应用 + */ + isQuickApp() { + // #ifndef QUICKAPP-WEBVIEW + let _isQuickApp = false; + try { + const ua = navigator?.userAgent?.toLowerCase(); + // console.log('ua = ', ua); + _isQuickApp = ua.indexOf('quickapp') !== -1; + + if (!_isQuickApp) { + // 特殊说明由于网站是嵌入到快应用的Webview组件中,UA中不会包含quickapp字符串, + // 但是会包含uniacid参数,所以这里通过uniacid参数来判断是否为快应用环境 + _isQuickApp = ua.indexOf('uniacid=') !== -1; + } + } catch (e) { } + + if (!_isQuickApp) { + const systemInfo = this.getDeviceInfo(); + _isQuickApp = systemInfo?.platform === 'quickapp' || process?.env?.UNI_PLATFORM === 'quickapp'; + } + return _isQuickApp; + // #endif + + return true; + }, + /** + * 判断是否为华为快应用环境 + * @returns {boolean} 是否为华为快应用 + */ + isHuaweiQuickApp() { + if (!this.isQuickApp()) return false; + + // #ifndef QUICKAPP-WEBVIEW-HUAWEI + const systemInfo = this.getDeviceInfo(); + return systemInfo.brand === 'HUAWEI' || systemInfo.manufacturer === 'HUAWEI' || + (typeof qh !== 'undefined' && qh.platform === 'huawei'); + // #endif + return true; + }, + + /** + * 蛇形命名转驼峰命名 + * @param {string} str 蛇形命名字符串 + * @returns {string} 驼峰命名字符串 + */ + snakeToCamel(str) { + return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); + }, + + /** + * 蛇形命名转驼峰命名(递归处理对象中的所有属性名) + * @param {Object} obj 包含蛇形命名字符串属性的对象 + * @returns {Object} 驼峰命名字符串属性的对象 + */ + snakeToCamelForObj(obj) { + if (typeof obj !== 'object' || obj === null) return obj; + if (Array.isArray(obj)) return obj.map(this.snakeToCamelForObj.bind(this)); + const newObj = {}; + for (const key in obj) { + if (Object.hasOwnProperty.call(obj, key)) { + const newKey = this.snakeToCamel(key); + newObj[newKey] = this.snakeToCamelForObj(obj[key]); + } + } + return newObj; } } \ No newline at end of file diff --git a/components-diy/css/common-channel.scss b/components-diy/css/common-channel.scss new file mode 100644 index 0000000..8a1cad6 --- /dev/null +++ b/components-diy/css/common-channel.scss @@ -0,0 +1,143 @@ +// 公共微信视频号样式 + +// CSS 变量 +:root { + // 尺寸变量 + --channel-play-btn-size: 80rpx; + --channel-play-btn-small-size: 60rpx; + --channel-play-btn-icon-size: 40rpx; + --channel-play-btn-icon-small-size: 30rpx; + --channel-border-radius: 12rpx; + --channel-stats-padding: 10rpx; + --channel-info-wrap-padding: 10rpx 0; + + // 字体变量 + --channel-name-font-size: 28rpx; + --video-title-font-size: 28rpx; + --video-title-small-font-size: 24rpx; + --video-stats-font-size: 24rpx; + --channel-stats-font-size: 20rpx; + + // 颜色变量 + --channel-name-color: #333; + --video-title-color: #333; + --video-title-small-color: #666; + --video-stats-color: #999; + --channel-stats-color: #fff; + --channel-border-color: #f0f0f0; + --channel-play-btn-bg: rgba(0, 0, 0, 0.4); + --channel-stats-bg: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); + + // 间距变量 + --channel-name-margin-bottom: 4rpx; + --video-title-margin-bottom: 8rpx; +} + +// 响应式设计 +@media (max-width: 375px) { + :root { + --channel-play-btn-size: 70rpx; + --channel-play-btn-small-size: 50rpx; + --channel-play-btn-icon-size: 35rpx; + --channel-play-btn-icon-small-size: 25rpx; + --channel-name-font-size: 24rpx; + --video-title-font-size: 24rpx; + } +} + +@media (min-width: 750px) { + :root { + --channel-play-btn-size: 90rpx; + --channel-play-btn-small-size: 70rpx; + --channel-play-btn-icon-size: 45rpx; + --channel-play-btn-icon-small-size: 35rpx; + --channel-name-font-size: 32rpx; + --video-title-font-size: 32rpx; + } +} + +// 播放按钮样式 +.channel-play-btn { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + display: flex; + align-items: center; + justify-content: center; + width: var(--channel-play-btn-size); + height: var(--channel-play-btn-size); + background-color: var(--channel-play-btn-bg); + border-radius: 50%; + + .play-icon { + width: var(--channel-play-btn-icon-size); + height: var(--channel-play-btn-icon-size); + } +} + +// 小尺寸播放按钮(用于列表) +.channel-play-btn.small { + width: var(--channel-play-btn-small-size); + height: var(--channel-play-btn-small-size); + + .play-icon { + width: var(--channel-play-btn-icon-small-size); + height: var(--channel-play-btn-icon-small-size); + } +} + +// 视频统计信息 +.channel-stats { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: var(--channel-stats-bg); + padding: var(--channel-stats-padding); + color: var(--channel-stats-color); + font-size: var(--channel-stats-font-size); +} + +// 视频信息容器 +.channel-info-wrap { + display: flex; + flex-direction: column; + flex: 1; + padding: var(--channel-info-wrap-padding); + + .channel-name { + margin-bottom: var(--channel-name-margin-bottom); + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + font-size: var(--channel-name-font-size); + font-weight: 500; + color: var(--channel-name-color); + } + + .video-title { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + font-size: var(--video-title-small-font-size); + color: var(--video-title-small-color); + } +} + +// 视频标题 +.video-title { + font-size: var(--video-title-font-size); + font-weight: 500; + color: var(--video-title-color); + margin-bottom: var(--video-title-margin-bottom); + line-height: 1.4; +} + +// 视频统计信息(非绝对定位版本) +.video-stats { + font-size: var(--video-stats-font-size); + color: var(--video-stats-color); +} + + diff --git a/components-diy/diy-article.vue b/components-diy/diy-article.vue index 5539a1b..2f4097a 100644 --- a/components-diy/diy-article.vue +++ b/components-diy/diy-article.vue @@ -3,7 +3,7 @@ - diff --git a/components-diy/diy-bargain.vue b/components-diy/diy-bargain.vue index 373dd8a..a264fee 100644 --- a/components-diy/diy-bargain.vue +++ b/components-diy/diy-bargain.vue @@ -365,7 +365,7 @@ export default { \ No newline at end of file diff --git a/components-diy/diy-channel-video.vue b/components-diy/diy-channel-video.vue new file mode 100644 index 0000000..66d1061 --- /dev/null +++ b/components-diy/diy-channel-video.vue @@ -0,0 +1,489 @@ + + + + + \ No newline at end of file diff --git a/components-diy/diy-coupon.vue b/components-diy/diy-coupon.vue index 52d0b86..ab5cc94 100644 --- a/components-diy/diy-coupon.vue +++ b/components-diy/diy-coupon.vue @@ -454,7 +454,7 @@ export default { } }); } else { - this.$refs.login.open('/pages/index/index'); + this.$refs.login.open(this.$util.INDEX_PAGE_URL); this.couponBtnSwitch = false; } }, @@ -488,7 +488,7 @@ export default { } // 风格一 -/deep/.coupon-style-one { +::v-deep .coupon-style-one { height: 110rpx; .coupon-item-box { @@ -534,7 +534,7 @@ export default { } // 风格二 -/deep/.coupon-style-two { +::v-deep .coupon-style-two { height: 96rpx; .coupon-item-box { @@ -591,7 +591,7 @@ export default { background-size: 100% 100%; } -/deep/.coupon-style-three { +::v-deep .coupon-style-three { height: 284rpx; padding: 20rpx; box-sizing: border-box; @@ -638,7 +638,7 @@ export default { } // 风格四 -/deep/.coupon-style-four { +::v-deep .coupon-style-four { height: 108rpx; .coupon-item-box { @@ -997,7 +997,7 @@ export default { } //风格七 -/deep/ .coupon-style-seven { +::v-deep .coupon-style-seven { .wrap { display: flex; } @@ -1075,7 +1075,7 @@ export default { } } -/deep/.uni-scroll-view ::-webkit-scrollbar { +::v-deep .uni-scroll-view ::-webkit-scrollbar { /* 隐藏滚动条,但依旧具备可以滚动的功能 */ display: none; width: 0; @@ -1084,7 +1084,7 @@ export default { background: transparent; } -/deep/::-webkit-scrollbar { +::v-deep ::-webkit-scrollbar { display: none; width: 0; height: 0; diff --git a/components-diy/diy-digit.vue b/components-diy/diy-digit.vue index 83cdf74..de1f43d 100644 --- a/components-diy/diy-digit.vue +++ b/components-diy/diy-digit.vue @@ -90,7 +90,7 @@ export default { // 页面跳转 redirectTo(item) { - if (!item.wap_url || this.$util.getCurrRoute() != 'pages/member/index' || this.storeToken) { + if (!item.wap_url || this.$util.getCurrRoute() != this.$util.MEMBER_PAGE_URL || this.storeToken) { console.log(item); this.$util.diyRedirectTo(item); } else { diff --git a/components-diy/diy-fenxiao-goods-list.vue b/components-diy/diy-fenxiao-goods-list.vue index fbdd61f..4b0e073 100644 --- a/components-diy/diy-fenxiao-goods-list.vue +++ b/components-diy/diy-fenxiao-goods-list.vue @@ -75,7 +75,7 @@ export default { this.currentRoute = '/' + currentPage.route; if (!this.storeToken) { this.$util.redirectTo( - '/pages_tool/login/login', + this.$util.LOGIN_PAGE_URL, { back: this.currentRoute }, diff --git a/components-diy/diy-graphic-nav.vue b/components-diy/diy-graphic-nav.vue index d645bb3..644b1d1 100644 --- a/components-diy/diy-graphic-nav.vue +++ b/components-diy/diy-graphic-nav.vue @@ -159,7 +159,7 @@ export default { redirectTo(link) { if (link.wap_url) { - if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) { + if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) { this.$refs.login.open(link.wap_url); return; } diff --git a/components-diy/diy-group.vue b/components-diy/diy-group.vue index 41541b4..6de5241 100644 --- a/components-diy/diy-group.vue +++ b/components-diy/diy-group.vue @@ -251,6 +251,11 @@ + + @@ -260,8 +265,8 @@ \ No newline at end of file diff --git a/components-diy/diy-index-page.vue b/components-diy/diy-index-page.vue index 5313aad..0f9ea3b 100644 --- a/components-diy/diy-index-page.vue +++ b/components-diy/diy-index-page.vue @@ -732,7 +732,7 @@ export default { margin-top: 100rpx; } -/deep/.uni-scroll-view::-webkit-scrollbar { +::v-deep .uni-scroll-view::-webkit-scrollbar { /* 隐藏滚动条,但依旧具备可以滚动的功能 */ display: none; } diff --git a/components-diy/diy-kefu.vue b/components-diy/diy-kefu.vue index 4a631a4..7f68ecd 100644 --- a/components-diy/diy-kefu.vue +++ b/components-diy/diy-kefu.vue @@ -1,6 +1,6 @@ + + @@ -226,7 +223,7 @@ export default { if (siteInfo) { this.site_name = siteInfo.site_name; } - }, + }, methods: { // 同意协议 authno() { @@ -254,7 +251,7 @@ export default { }, // 打开弹窗 - open(url) { + open(url = '', mode = 'navigateTo') { if (url) this.url = url; // #ifdef MP this.getCode(authData => { @@ -266,28 +263,33 @@ export default { if (this.$util.isWeChatMiniProgram()) { // 微信小程序环境,使用微信授权登录 let authData = uni.getStorageSync('authInfo'); - if (authData) this.authLogin(authData); - else this.getCode(); + if (authData) { + this.authLogin(authData); + } else { + this.getCode(authData => { + this.authLogin(authData, 'authOnlyLogin'); + }); + } } else if (this.$util.isWeiXin()) { // 微信浏览器环境,显示登录页面 - this.toLogin(); + this.toLogin(mode); } else { // 其他浏览器环境,显示登录页面 - this.toLogin(); + this.toLogin(mode); } // #endif // #ifndef MP || H5 - this.toLogin(); + this.toLogin(mode); // #endif }, // 跳转去登录页 - toLogin() { - if (this.url) this.$util.redirectTo('/pages_tool/login/login', { + toLogin(mode = 'navigateTo') { + if (this.url) this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: encodeURIComponent(this.url) - }); - else this.$util.redirectTo('/pages_tool/login/login'); + }, mode); + else this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {}, mode); }, // 取消完善信息 @@ -535,7 +537,8 @@ export default { getPhoneNumber(e) { if (e.detail.errMsg === 'getPhoneNumber:ok') { const authInfo = uni.getStorageSync('authInfo'); - if (authInfo) { Object.assign(this.authMobileData, authInfo, e.detail); + if (authInfo) { + Object.assign(this.authMobileData, authInfo, e.detail); } if (uni.getStorageSync('source_member')) { this.authMobileData.source_member = uni.getStorageSync('source_member'); @@ -596,7 +599,7 @@ export default { } }); }, - + // 授权登录 authLogin(data, type = 'authLogin') { uni.showLoading({ @@ -686,8 +689,8 @@ export default { if (this.forceBindingMobileControl) { this.bindMobile(); - } else { - this.authLogin(authInfo); + } else { + this.authLogin(authInfo); } }, @@ -749,7 +752,7 @@ export default { // 跳转页面 tourl(url) { this.$util.redirectTo(url); - } + } } }; diff --git a/components/ns-mp-html/ns-mp-html.vue b/components/ns-mp-html/ns-mp-html.vue index c60d07f..b6c1800 100644 --- a/components/ns-mp-html/ns-mp-html.vue +++ b/components/ns-mp-html/ns-mp-html.vue @@ -17,7 +17,7 @@ \ No newline at end of file diff --git a/components/privacy-popup/privacy-popup.vue b/components/privacy-popup/privacy-popup.vue index 6ed70c8..0a53959 100644 --- a/components/privacy-popup/privacy-popup.vue +++ b/components/privacy-popup/privacy-popup.vue @@ -1,237 +1,385 @@ \ No newline at end of file diff --git a/components/register-reward/register-reward.vue b/components/register-reward/register-reward.vue index 4146909..a23f850 100644 --- a/components/register-reward/register-reward.vue +++ b/components/register-reward/register-reward.vue @@ -138,7 +138,7 @@ break; default: if (this.back) this.$util.redirectTo(decodeURIComponent(this.back), {}, 'redirectTo'); - else this.$util.redirectTo('/pages/index/index'); + else this.$util.redirectTo(this.$util.INDEX_PAGE_URL); break; } } @@ -146,7 +146,7 @@ }; diff --git a/components/to-top/to-top.vue b/components/to-top/to-top.vue index 4d53471..3bc1c29 100644 --- a/components/to-top/to-top.vue +++ b/components/to-top/to-top.vue @@ -27,7 +27,7 @@ export default { + + + + + diff --git a/docs/WECHAT_CHANNEL_INTEGRATION.md b/docs/WECHAT_CHANNEL_INTEGRATION.md new file mode 100644 index 0000000..bb19a67 --- /dev/null +++ b/docs/WECHAT_CHANNEL_INTEGRATION.md @@ -0,0 +1,568 @@ +# 微信视频号集成指南 + +## 1. 概述 + +本文档提供了在UniApp项目中集成微信视频号的详细指导,包括组件实现、配置修改和使用方法。 + +## 2. 准备工作 + +### 2.1 微信小程序配置 + +在 `manifest.json` 文件中,需要确保微信小程序配置正确: + +```json +"mp-weixin": { + "appid": "你的小程序appid", + "setting": { + "urlCheck": false, + "postcss": false, + "es6": true, + "minified": true + }, + "usingComponents": true, + "permission": { + "scope.userLocation": { + "desc": "为了更好地为您提供服务" + } + }, + "requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"], + "__usePrivacyCheck__": true, + "optimization": { + "subPackages": true + } +} +``` + +### 2.2 微信视频号API权限与关联 + +#### 2.2.1 权限说明 + +`wx.openChannelsActivity` API 是小程序的基础能力,不需要单独开通权限,但需要满足以下条件: + +- **跳转打开视频号视频**:无主体限制,基础库版本 2.19.2 及以上 +- **内嵌视频号视频**: + - 从基础库版本 2.25.1 至 2.31.1,小程序需与视频号视频相同主体或关联主体 + - 从基础库版本 2.31.1 开始,非个人主体小程序可内嵌非同主体/关联主体视频号视频 + +#### 2.2.2 小程序与视频号关联(可选) + +虽然跳转打开视频号视频无主体限制,但如果需要内嵌非同主体视频号视频(基础库 2.31.1 以下),则需要关联小程序与视频号: + +1. **小程序管理员操作** + - 登录微信小程序后台 + - 左侧菜单:设置 → 基本设置 + - 向下滚动找到「关联设置」部分 + - 点击「关联视频号」按钮 + - 输入视频号名称或视频号ID + - 点击「搜索」找到对应的视频号 + - 点击「发送关联邀请」 + +2. **视频号管理员操作** + - 视频号管理员需要在24小时内确认关联邀请 + - 视频号管理员登录 [视频号助手](https://channels.weixin.qq.com/) + - 进入「设置」→「关联设置」→「小程序关联」 + - 找到待确认的关联邀请 + - 点击「同意」完成关联 + +3. **关联失败处理** + - 检查视频号是否已完成实名认证 + - 检查小程序是否已发布上线 + - 检查视频号名称或ID是否输入正确 + - 如超过24小时未确认,需要重新发送关联邀请 + +#### 2.2.3 关联条件 + +- **小程序要求**:必须已经发布上线,未被处罚或限制 +- **视频号要求**:必须已经完成实名认证,状态正常 +- **数量限制**:同一个小程序最多可以关联50个视频号,同一个视频号最多可以关联50个小程序 +- **权限要求**:关联操作需要小程序管理员和视频号管理员共同确认 +- **主体要求**:小程序和视频号的主体可以不同,但需要双方管理员确认 + +#### 2.2.4 功能验证 + +可以通过以下方式验证视频号功能是否可用: + +1. **在微信开发者工具中验证** + - 在微信开发者工具中打开小程序 + - 在控制台执行以下代码: + ```javascript + console.log('是否支持视频号API:', typeof wx !== 'undefined' && typeof wx.openChannelsActivity === 'function'); + ``` + - 如果返回 `true`,则表示API可用 + +2. **在真机环境中验证** + - 使用微信扫码打开小程序 + - 触发视频号相关功能 + - 检查是否能正常打开视频号内容 + +3. **功能验证失败处理** + - 检查微信小程序基础库版本是否满足要求(跳转打开需要 2.19.2+,内嵌打开需要 2.25.1+) + - 对于内嵌打开,检查主体是否满足要求或是否已关联 + - 检查 `feedId` 等参数是否正确 + +## 3. 组件使用 + +### 3.1 视频号视频卡片组件 (diy-channel-video.vue) + +#### 基本用法 + +```vue + +``` + +#### 属性说明 + +| 属性名 | 类型 | 默认值 | 说明 | +|--------|------|--------|------| +| value | Object | 必填 | 视频数据对象 | +| listMode | Boolean | false | 是否为列表模式 | +| videoHeight | Number | 220 | 视频高度(仅适用于嵌入式播放) | +| titleLineClamp | Number | 1 | 标题显示行数 | +| showPlayBtn | Boolean | true | 是否显示播放按钮 | +| aspectRatio | String | '16:9' | 视频比例,可选值:'16:9', '3:4' | +| coverStyle | Object | {} | 视频封面图样式 | +| playBtnStyle | Object | {} | 播放按钮样式 | +| autoPlay | Boolean | false | 是否自动播放(仅适用于嵌入式播放) | + +#### value对象属性说明 + +| 属性名 | 类型 | 默认值 | 说明 | +|--------|------|--------|------| +| feedId | String | "" | 视频 feedId | +| finderUserName | String | "" | 视频号用户名 | +| feedToken | String | "" | 视频 token | +| coverUrl | String | "" | 视频封面图 | +| videoTitle | String | "" | 视频标题 | +| viewCount | Number | 0 | 观看次数 | +| showViewCount | Boolean | false | 是否显示观看次数 | +| embedMode | Boolean | false | 是否启用嵌入式播放 | + +#### 事件说明 + +| 事件名 | 说明 | 参数 | +|--------|------|------| +| video-play | 点击视频播放时触发 | 视频数据对象 | + +### 3.2 视频号列表组件 (diy-channel-list.vue) + +#### 基本用法 + +```vue + +``` + +#### 属性说明 + +| 属性名 | 类型 | 默认值 | 说明 | +|--------|------|--------|------| +| value | Object | 必填 | 组件配置数据 | +| value.list | Array | [] | 视频号列表数据 | +| value.rowCount | Number | 2 | 每行显示的视频号数量 | +| value.showStyle | String | "fixed" | 显示样式,可选值:fixed, singleSlide | +| value.mode | String | "" | 显示模式 | +| value.font | Object | {} | 字体样式配置 | +| value.componentBgColor | String | "#fff" | 组件背景颜色 | +| value.componentAngle | String | "" | 组件圆角类型,可选值:round | +| value.topAroundRadius | Number | 0 | 顶部圆角半径 | +| value.bottomAroundRadius | Number | 0 | 底部圆角半径 | +| value.ornament | Object | {} | 装饰样式配置 | +| value.titleLineClamp | Number | 1 | 标题显示行数 | +| value.showPlayBtn | Boolean | true | 是否显示播放按钮 | +| value.aspectRatio | String | '16:9' | 视频比例,可选值:'16:9', '3:4' | +| value.coverStyle | Object | {} | 视频封面图样式 | +| value.playBtnStyle | Object | {} | 播放按钮样式 | +| value.imageSize | Number | 0 | 图片尺寸(仅在特定模式下使用) | +| value.pageCount | Number | 1 | 每页显示的视频数量 | +| value.carousel | Object | {} | 轮播配置 | +| value.carousel.type | String | "" | 轮播类型,可选值:default, hide | +| value.carousel.autoplay | Boolean | false | 是否自动播放 | +| value.carousel.interval | Number | 3000 | 自动播放间隔,单位毫秒 | +| value.carousel.duration | Number | 500 | 切换动画时长,单位毫秒 | +| value.carousel.circular | Boolean | false | 是否循环播放 | + +#### list数组项说明 + +| 属性名 | 类型 | 默认值 | 说明 | +|--------|------|--------|------| +| channelName | String | "" | 视频号名称 | +| coverUrl | String | "" | 视频封面URL | +| videoTitle | String | "" | 视频标题 | +| feedId | String | "" | 视频号内容ID,用于播放视频 | +| viewCount | Number | 0 | 视频观看次数 | +| embedMode | Boolean | false | 是否启用嵌入式播放 | +| showViewCount | Boolean | false | 是否显示观看次数 | +| finderUserName | String | "" | 视频号ID,用于嵌入式播放 | +| feedToken | String | "" | 视频token,用于嵌入式播放 | + +## 4. 视频播放实现 + +小程序提供两种打开视频号视频的方式:跳转打开和内嵌打开。 + +### 4.1 跳转打开视频号视频 + +组件内部使用微信小程序的 `wx.openChannelsActivity` API 来打开视频号内容: + +```javascript +if (typeof wx !== 'undefined' && wx.openChannelsActivity) { + wx.openChannelsActivity({ + feedId: item.feedId, // 视频号内容ID,必填 + finderUserName: item.finderUserName, // 视频号ID(可选) + success: (res) => { + console.log('打开视频号成功', res); + }, + fail: (err) => { + console.error('打开视频号失败', err); + // 常见错误处理 + if (err.errCode === 40001) { + console.error('未授权,请检查小程序是否与视频号关联'); + } else if (err.errCode === 40002) { + console.error('参数错误,请检查feedId是否正确'); + } else if (err.errCode === 40003) { + console.error('视频号内容不存在或已被删除'); + } + } + }); +} else { + console.error('当前环境不支持微信视频号'); +} +``` + +### 4.2 内嵌视频号视频 + +从基础库 2.25.1 开始支持,小程序可以通过 `channel-video` 组件在小程序中内嵌视频号视频,且支持无弹窗跳转打开视频号对应视频,使用该组件时需注意: + +- 组件调用无资质要求 +- 暂不支持纯图片视频号内容 +- 在 UniApp 中使用时,需要用 `` 包裹以确保组件正确显示 + +```vue + + + + + +``` + +### 4.3 API参数说明 + +- **feedId**:视频号内容ID,必填,必须是有效的视频号内容ID +- **finderUserName**:视频号ID,可选 +- **feedToken**:非同主体视频号视频的标识,从基础库 2.31.1 开始支持,非个人主体小程序可使用 +- **success**:调用成功的回调函数 +- **fail**:调用失败的回调函数 +- **complete**:调用完成的回调函数(无论成功或失败) + +### 4.4 错误码说明 + +| 错误码 | 说明 | 解决方案 | +|--------|------|----------| +| 40001 | 未授权 | 对于内嵌打开,检查主体是否满足要求或是否已关联 | +| 40002 | 参数错误 | 检查feedId是否正确,确保是有效的视频号内容ID | +| 40003 | 视频号内容不存在或已被删除 | 确认feedId对应的视频号内容是否仍然存在 | +| 40004 | 系统错误 | 稍后重试,或联系微信公众平台客服 | + +### 4.5 获取参数方法 + +1. **获取finderUserName(视频号ID)** + - 登录视频号助手 + - 在首页可以查看自己的视频号ID + +2. **获取feedId(视频号内容ID)** + - 登录视频号助手 + - 在「动态管理」模块可以复制自己发表的每个视频对应的feedId + +3. **获取feed-token(非同主体视频号视频标识)** + - 登录MP平台,在「设置-基本设置-隐私与安全」找到「获取视频号视频ID权限」,并将开关打开 + - 移动端找到想要内嵌的视频号视频,并复制该视频的feed-token + - 注意:打开开关后24小时内生效,失效后需要再次打开开关;开关打开状态仅对当前操作者生效 + +### 4.6 主体判断逻辑 + +#### 主体信息查询 +小程序主体信息可通过小程序资料页-开发团队进行查询,视频号主体信息可通过视频号首页-认证进行查询。 + +#### 主体判断逻辑 +- **跳转打开视频号视频**:无主体限制,基础库版本 2.19.2 及以上 +- **内嵌视频号视频**: + - 从基础库版本 2.25.1 至 2.31.1,小程序需与视频号视频相同主体或关联主体 + - 从基础库版本 2.31.1 开始,非个人主体小程序可内嵌非同主体/关联主体视频号视频 + +关联主体申请流程可以参考:https://kf.qq.com/faq/190726e6JFja190726qMJBn6.html + + + +## 5. 注意事项 + +### 5.1 环境限制 + +- 微信视频号API只能在微信小程序环境中使用,其他环境(如H5、App)不支持 +- 跳转打开视频号视频需要微信小程序基础库版本 2.19.2 及以上 +- 内嵌视频号视频需要微信小程序基础库版本 2.25.1 及以上 +- 小程序与视频号关联仅在需要内嵌非同主体视频号视频(基础库 2.31.1 以下)时需要 +- 必须确保在 `manifest.json` 中设置 `usingComponents: true` 以启用组件支持 + +### 5.2 数据格式 + +确保传递给组件的数据格式正确,特别是 `feedId` 必须是有效的视频号内容ID + +### 5.3 图片资源 + +- 视频号头像和封面图片建议使用CDN地址,确保加载速度 +- 图片尺寸建议: + - 头像:200x200px + - 封面:640x360px + +### 5.4 播放按钮图标 + +- 组件支持两种播放按钮图标方式: + 1. **图片图标**:通过 `playIcon` 属性设置,优先级较高 + 2. **纯 CSS 图标**:当 `playIcon` 不可用时,组件会自动使用纯 CSS 生成的播放图标,确保播放按钮始终可见 + +- 纯 CSS 图标特点: + - 不依赖外部图片资源,加载更快 + - 支持响应式调整大小 + - 具有与图片图标相同的悬停效果 + - 在所有环境中都能正常显示 + +### 5.5 权限和关联 + +- 确保在微信小程序后台开通了「打开视频号内容」权限 +- 确保小程序已与视频号成功关联 +- 关联操作需要小程序管理员和视频号管理员共同确认 + +## 6. 常见问题 + +### 6.1 视频无法播放 + +- 检查 `feedId` 是否正确,确保是有效的视频号内容ID +- 检查微信小程序基础库版本是否满足要求(跳转打开需要 2.19.2+,内嵌打开需要 2.25.1+) +- 对于内嵌打开,检查主体是否满足要求(基础库 2.31.1 以下需要相同主体或关联主体) +- 检查视频号内容是否仍然存在(未被删除) + +### 6.2 功能不可用 + +- 确认当前环境是否为微信小程序环境 +- 检查微信小程序基础库版本是否满足要求 +- 对于内嵌打开,检查主体条件是否满足 +- 检查 `feedId` 等参数是否正确 + +### 6.3 关联失败 + +- 检查视频号是否已完成实名认证 +- 检查小程序是否已发布上线 +- 检查视频号名称或ID是否输入正确 +- 确认视频号管理员是否在24小时内确认关联邀请 +- 如超过24小时未确认,需要重新发送关联邀请 + +### 6.4 组件显示异常 + +- 检查传递给组件的数据格式是否正确 +- 确认图片资源是否可访问 +- 检查微信小程序基础库版本是否支持视频号API + +### 6.5 样式问题 + +- 可通过组件的 `componentAngle`、`topAroundRadius`、`bottomAroundRadius` 等属性调整组件样式 +- 可通过 `componentBgColor` 属性调整组件背景颜色 +- 可通过 `font` 属性调整字体样式 +- 可通过 `aspectRatio` 属性调整视频比例,支持 '16:9' 和 '3:4' 两种比例 + +### 6.6 环境兼容性问题 + +- 微信视频号API只能在微信小程序环境中使用 +- 在其他环境中,组件会显示但无法播放视频 +- 建议在非小程序环境中添加友好的提示信息 + +### 6.7 在uni-app中使用原生组件时,可能会遇到组件不显示的问题 + +在uni-app中使用原生组件时,可能会遇到组件不显示的问题。以下是已验证的解决方案: + +#### 解决方案 + +**方法一:使用 `` 包裹** + +在 UniApp 中使用 `channel-video` 组件时,必须用 `` 包裹以确保组件正确显示: + +``` vue + +``` + +**方法二:检查 `manifest.json` 配置** + +确保在 `manifest.json` 文件中正确设置了 `usingComponents: true`,特别是在 `mp-weixin` 部分: + +``` json +"mp-weixin": { + "appid": "你的小程序appid", + "usingComponents": true, + // 其他配置... +} +``` + +**方法三:检查微信小程序基础库版本** + +确保微信小程序基础库版本满足要求: +- 跳转打开视频号视频需要基础库版本 2.19.2 及以上 +- 内嵌视频号视频需要基础库版本 2.25.1 及以上 + +**方法四:检查参数是否正确** + +确保传递给 `channel-video` 组件的参数正确: +- `feedId`:视频号内容ID,必填 +- `finderUserName`:视频号ID,可选 +- `feedToken`:非同主体视频号视频的标识,可选(基础库 2.31.1+) + +## 7. 示例代码 + +### 7.1 视频号视频卡片组件示例 + +```javascript +// 视频卡片数据 +const videoData = { + channelName: "示例视频号", + coverUrl: "https://example.com/cover.jpg", + videoTitle: "这是一个示例视频,标题可能会很长,需要测试多行显示效果", + feedId: "v02004g10000c3f7l7j5u87l33n8f160", + viewCount: 12345, + embedMode: false, + showViewCount: true, + finderUserName: "example_finder", + feedToken: "example_feed_token" +}; + +// 视频播放事件处理 +function handlerVideoPlay(data) { + console.log("视频播放", data); + // 可以在这里处理视频播放逻辑 +} +``` + +### 7.2 单个视频号示例 + +```javascript +// 单个视频号数据 +const channelData = { + channelName: "示例视频号", + avatarUrl: "https://example.com/avatar.jpg", + videoTitle: "这是一个示例视频,标题可能会很长,需要测试多行显示效果", + coverUrl: "https://example.com/cover.jpg", + feedId: "v02004g10000c3f7l7j5u87l33n8f160", + viewCount: 12345, + showFollow: true, + componentAngle: "round", + topAroundRadius: 10, + bottomAroundRadius: 10, + embedMode: false, + showViewCount: true, + finderUserName: "example_finder", + feedToken: "example_feed_token", + titleLineClamp: 2, + showPlayBtn: true, + aspectRatio: "16:9", + coverStyle: { + width: "100%", + height: "0", + paddingTop: "56.25%" // 16:9 比例 + }, + playBtnStyle: { + width: "60rpx", + height: "60rpx", + borderRadius: "30rpx", + backgroundColor: "rgba(0, 0, 0, 0.6)" + } +}; +``` + +### 7.3 视频号列表示例 + +```javascript +// 视频号列表数据 +const channelListData = { + list: [ + { + channelName: "示例视频号1", + coverUrl: "https://example.com/cover1.jpg", + videoTitle: "这是示例视频1,标题可能会很长,需要测试多行显示效果", + feedId: "v02004g10000c3f7l7j5u87l33n8f160", + viewCount: 12345, + embedMode: false, + showViewCount: true, + finderUserName: "example_finder1", + feedToken: "example_feed_token1" + }, + { + channelName: "示例视频号2", + coverUrl: "https://example.com/cover2.jpg", + videoTitle: "这是示例视频2,标题可能会很长,需要测试多行显示效果", + feedId: "v02004g10000c3f7m7j5u87l33n8f161", + viewCount: 67890, + embedMode: false, + showViewCount: true, + finderUserName: "example_finder2", + feedToken: "example_feed_token2" + } + ], + rowCount: 2, + showStyle: "fixed", + mode: "", + font: { + size: 14, + weight: "normal", + color: "#333" + }, + componentBgColor: "#fff", + componentAngle: "round", + topAroundRadius: 10, + bottomAroundRadius: 10, + ornament: {}, + titleLineClamp: 2, + showPlayBtn: true, + aspectRatio: "16:9", + coverStyle: { + width: "100%", + height: "0", + paddingTop: "56.25%" // 16:9 比例 + }, + playBtnStyle: { + width: "60rpx", + height: "60rpx", + borderRadius: "30rpx", + backgroundColor: "rgba(0, 0, 0, 0.6)" + }, + imageSize: 150, + pageCount: 1, + carousel: { + type: "default", + autoplay: true, + interval: 3000, + duration: 500, + circular: true + } +}; +``` + +## 8. 总结 + +通过本文档提供的组件和配置指导,你可以在UniApp项目中轻松集成微信视频号功能,为用户提供更加丰富的内容体验。 + +如果在集成过程中遇到问题,请参考本文档的常见问题部分,或查阅微信官方文档获取更多帮助。 \ No newline at end of file diff --git a/docs/components_usage_documentation.md b/docs/components_usage_documentation.md new file mode 100644 index 0000000..1a1ad65 --- /dev/null +++ b/docs/components_usage_documentation.md @@ -0,0 +1,834 @@ +# 组件使用情况文档 + +提示词:请重新帮我分析 components 及 uni_modules 目录下的组件,被哪些页面/组件使用,按照Vue组件精确引用次数由多到少来排序,并更新到该文档中。 + +## 1. 组件目录结构 + +### 1.1 components 目录包含以下组件: + +- chat-message +- hover-nav +- l-time +- loading-cover +- mescroll +- ns-adv +- ns-chat +- ns-contact +- ns-copyright +- ns-empty +- ns-form +- ns-goods-action +- ns-goods-action-button +- ns-goods-action-icon +- ns-goods-recommend +- ns-goods-sku +- ns-loading +- ns-login +- ns-mp-html +- ns-navbar +- ns-payment +- ns-progress +- ns-select-time +- ns-switch +- ns-video-player-popup +- payment +- pick-regions +- privacy-popup +- register-reward +- sx-rate +- to-top +- uv-count-to +- wxwork-contact +- xiao-star-component +- yuyue-date + +### 1.2 uni_modules 目录包含以下组件: + +- mp-html +- uni-badge +- uni-calendar +- uni-count-down +- uni-datetime-picker +- uni-drawer +- uni-grid +- uni-grid-item +- uni-icons +- uni-nav-bar +- uni-number-box +- uni-popup +- uni-popup-sku +- uni-popup-sku-category +- uni-scss +- uni-status-bar +- uni-tag +- x-skeleton + +## 2. 组件使用情况详细列表(按引用次数排序) + +### 2.1 loading-cover 组件(78次引用) + +**文件路径**:components/loading-cover/loading-cover.vue + +**引用情况**: +- pages_tool/form/formdata.vue +- pages_goods/detail.vue +- pages_order/_components/common-payment/common-payment.vue +- pages_tool/recharge/order_list.vue +- pages_tool/recharge/list.vue +- pages_tool/pay/index.vue +- pages_tool/pay/result.vue +- pages_tool/order/refund_type_select.vue +- pages_tool/order/refund_goods_select.vue +- pages_tool/order/refund_detail.vue +- pages_tool/order/detail_virtual.vue +- pages_tool/order/evaluate.vue +- pages_tool/order/logistics.vue +- pages_tool/order/refund.vue +- pages_tool/order/refund_batch.vue +- pages_tool/member/withdrawal.vue +- pages_tool/member/withdrawal_detail.vue +- pages_tool/notice/detail.vue +- pages_tool/notice/list.vue +- pages_tool/member/point.vue +- pages_tool/member/point_detail.vue +- pages_tool/member/invite_friends.vue +- pages_tool/member/level.vue +- pages_tool/member/level_growth_rules.vue +- pages_tool/member/coupon.vue +- pages_tool/member/footprint.vue +- pages_tool/member/card_buy.vue +- pages_tool/member/collection.vue +- pages_tool/member/balance.vue +- pages_tool/member/balance_detail.vue +- pages_tool/member/account.vue +- pages_tool/member/account_edit.vue +- pages_tool/member/address.vue +- pages_tool/member/address_edit.vue +- pages_tool/member/apply_withdrawal.vue +- pages_tool/login/login.vue +- pages_tool/help/detail.vue +- pages_tool/help/list.vue +- pages_tool/goods/coupon.vue +- pages_tool/goods/coupon_receive.vue +- pages_tool/goods/evaluate.vue +- pages_tool/files/list.vue +- pages_tool/form/form.vue +- pages_tool/goods/brand.vue +- pages_tool/article/detail.vue +- pages_tool/article/list.vue +- pages_promotion/point/list.vue +- pages_promotion/point/order_list.vue +- pages_promotion/point/payment.vue +- pages_promotion/point/detail.vue +- pages_promotion/merch/merchcategory.vue +- pages_promotion/merch/detail.vue +- pages_promotion/fenxiao/withdrawal_detail.vue +- pages_promotion/fenxiao/withdraw_list.vue +- pages_promotion/fenxiao/withdraw_apply.vue +- pages_promotion/fenxiao/ranking_list.vue +- pages_promotion/fenxiao/relation.vue +- pages_promotion/fenxiao/team.vue +- pages_promotion/fenxiao/order.vue +- pages_promotion/fenxiao/order_detail.vue +- pages_promotion/fenxiao/promote.vue +- pages_promotion/fenxiao/promote_code.vue +- pages_promotion/fenxiao/index.vue +- pages_promotion/fenxiao/level.vue +- pages_promotion/fenxiao/goods_list.vue +- pages_promotion/fenxiao/apply.vue +- pages_promotion/fenxiao/bill.vue +- pages_promotion/fenxiao/child_fenxiao.vue +- pages_order/detail_point.vue +- pages_order/list.vue +- pages_order/detail.vue +- pages_order/detail_local_delivery.vue +- pages_order/detail_pickup.vue +- pages_goods/list.vue +- pages_goods/cart.vue +- pages_goods/category.vue +- components-diy/diy-category-item.vue + +### 2.2 uni-popup 组件(66次引用) + +**文件路径**:uni_modules/uni-popup/components/uni-popup/uni-popup.vue + +**引用情况**: +- pages_goods/_components/goods-detail-view/goods-detail-view.vue +- pages_tool/member/index.vue +- pages_goods/detail.vue +- pages_order/payment.vue +- pages_order/_components/common-payment/common-payment.vue +- pages_tool/contact/contact.vue +- components/ns-contact/ns-contact.vue +- pages/index/index.vue +- components/ns-video-player-popup/ns-video-player-popup.vue +- pages/contact/contact.vue +- uni_modules/uni-popup-sku/components/uni-popup-sku/uni-popup-sku.vue +- uni_modules/uni-popup-sku-category/components/uni-popup-sku-category/uni-popup-sku-category.vue +- pages_tool/recharge/list.vue +- pages_tool/pay/result.vue +- pages_tool/order/refund_type_select.vue +- pages_tool/order/refund.vue +- pages_tool/order/refund_batch.vue +- pages_tool/member/invite_friends.vue +- pages_tool/member/level.vue +- pages_tool/member/card_buy.vue +- pages_tool/member/collection.vue +- pages_tool/member/card.vue +- pages_tool/login/login.vue +- pages_tool/index/diy.vue +- pages_tool/cases/index.vue +- pages_promotion/point/list.vue +- pages_promotion/point/payment.vue +- pages_promotion/merch/public/category.scss +- pages_promotion/point/detail.vue +- pages_promotion/merch/merchcategory.vue +- pages_promotion/merch/detail.vue +- pages_promotion/fenxiao/promote_code.vue +- pages_promotion/fenxiao/index.vue +- pages_promotion/fenxiao/level.vue +- pages_promotion/fenxiao/goods_list.vue +- pages_promotion/fenxiao/apply.vue +- pages_order/detail_point.vue +- pages_order/detail.vue +- pages_goods/list.vue +- pages_goods/public/css/cart.scss +- pages_goods/cart.vue +- pages_goods/category.vue +- components/yuyue-date/yuyue-date.vue +- components/register-reward/register-reward.vue +- components/pick-regions/pick-regions.vue +- components/ns-select-time/ns-select-time.vue +- components/payment/payment.vue +- components/ns-payment/ns-payment.vue +- components/ns-goods-sku/ns-goods-sku.vue +- components/ns-login/ns-login.vue +- pages_tool/_components/ns-new-gift/ns-new-gift.vue +- components/ns-goods-sku/ns-goods-sku-category.vue +- pages_tool/_components/ns-birthday-gift/ns-birthday-gift.vue +- components/chat-message/chat-message.vue +- components-diy/diy-video-list.vue +- components-diy/diy-payment-qrcode.vue +- components-diy/diy-notice.vue +- components-diy/diy-member-info.vue +- components-diy/diy-index-page.vue +- components-diy/diy-category.vue +- components-diy/diy-category-item.vue + +### 2.3 mescroll 组件(63次引用) + +**文件路径**:components/mescroll/ + +**引用情况**: +- pages_order/_components/common-payment/common-payment.vue +- pages_tool/contact/contact.vue +- lang/zh-cn/common.js +- lang/en-us/common.js +- pages.json +- pages/index/index.vue +- pages_tool/recharge/order_list.vue +- pages_tool/recharge/list.vue +- pages_tool/order/logistics.vue +- pages_tool/member/withdrawal.vue +- pages_tool/notice/list.vue +- pages_tool/order/activist.vue +- pages_tool/member/public/js/collection.js +- pages_tool/member/point_detail.vue +- pages_tool/member/coupon.vue +- pages_tool/member/footprint.vue +- pages_tool/member/collection.vue +- pages_tool/member/balance.vue +- pages_tool/member/balance_detail.vue +- pages_tool/member/account.vue +- pages_tool/member/address.vue +- pages_tool/goods/coupon.vue +- pages_tool/goods/evaluate.vue +- pages_tool/files/list.vue +- pages_tool/goods/brand.vue +- pages_tool/article/list.vue +- pages_promotion/point/goods_list.vue +- pages_promotion/point/list.vue +- pages_promotion/point/order_list.vue +- pages_promotion/merch/public/js/list.js +- pages_promotion/merch/detail.vue +- pages_promotion/fenxiao/withdraw_list.vue +- pages_promotion/fenxiao/ranking_list.vue +- pages_promotion/fenxiao/relation.vue +- pages_promotion/fenxiao/team.vue +- pages_promotion/fenxiao/public/js/goods_list.js +- pages_promotion/fenxiao/order.vue +- pages_promotion/fenxiao/goods_list.vue +- pages_promotion/fenxiao/bill.vue +- pages_promotion/fenxiao/child_fenxiao.vue +- pages_order/list.vue +- pages_goods/public/js/list.js +- pages_goods/list.vue +- components/to-top/to-top.vue +- components-diy/diy-index-page.vue +- components/ns-loading/ns-loading.vue + +### 2.4 ns-login 组件(53次引用) + +**文件路径**:components/ns-login/ns-login.vue + +**引用情况**: +- pages_tool/form/formdata.vue +- pages_goods/detail.vue +- pages_order/_components/common-payment/common-payment.vue +- pages/index/index.vue +- pages_tool/recharge/order_list.vue +- pages_tool/pay/cashier.vue +- pages_tool/member/point.vue +- pages_tool/member/invite_friends.vue +- pages_tool/member/level.vue +- pages_tool/member/coupon.vue +- pages_tool/member/footprint.vue +- pages_tool/member/info.vue +- pages_tool/member/info_edit.vue +- pages_tool/member/card_buy.vue +- pages_tool/member/collection.vue +- pages_tool/member/card.vue +- pages_tool/member/balance.vue +- pages_tool/member/balance_detail.vue +- pages_tool/member/account.vue +- pages_tool/member/address.vue +- pages_tool/goods/coupon.vue +- pages_tool/goods/coupon_receive.vue +- pages_tool/form/form.vue +- pages_promotion/point/list.vue +- pages_promotion/point/order_list.vue +- pages_promotion/point/detail.vue +- pages_promotion/merch/merchcategory.vue +- pages_promotion/fenxiao/withdraw_list.vue +- pages_promotion/fenxiao/relation.vue +- pages_promotion/fenxiao/team.vue +- pages_promotion/fenxiao/order.vue +- pages_promotion/fenxiao/order_detail.vue +- pages_promotion/fenxiao/promote.vue +- pages_promotion/fenxiao/promote_code.vue +- pages_promotion/fenxiao/index.vue +- pages_promotion/fenxiao/child_fenxiao.vue +- pages_order/list.vue +- pages_goods/cart.vue +- pages_goods/category.vue +- components/ns-goods-sku/ns-goods-sku.vue +- components/ns-goods-sku/ns-goods-sku-index.vue +- components/ns-goods-sku/ns-goods-sku-category.vue +- pages_goods/_components/goods-detail-view/goods-detail-view.vue +- components-diy/diy-search.vue +- components-diy/diy-quick-nav.vue +- components-diy/diy-notes.vue +- components-diy/diy-member-info.vue +- components-diy/diy-member-my-order.vue +- components-diy/diy-image-nav.vue +- components-diy/diy-graphic-nav.vue +- components-diy/diy-digit.vue +- components-diy/diy-coupon.vue + +### 2.5 ns-empty 组件(37次引用) + +**文件路径**:components/ns-empty/ns-empty.vue + +**引用情况**: +- pages_tool/form/formdata.vue +- pages_order/_components/common-payment/common-payment.vue +- pages_tool/seal/medium/search.vue +- pages_tool/recharge/order_list.vue +- pages_tool/pay/cashier.vue +- pages_tool/member/withdrawal.vue +- pages_tool/notice/list.vue +- pages_tool/order/activist.vue +- pages_tool/member/point_detail.vue +- pages_tool/member/invite_friends.vue +- pages_tool/member/coupon.vue +- pages_tool/member/footprint.vue +- pages_tool/member/card_buy.vue +- pages_tool/member/collection.vue +- pages_tool/member/balance_detail.vue +- pages_tool/help/list.vue +- pages_tool/goods/coupon.vue +- pages_tool/goods/evaluate.vue +- pages_tool/files/list.vue +- pages_tool/form/form.vue +- pages_tool/goods/brand.vue +- pages_tool/article/list.vue +- pages_promotion/point/goods_list.vue +- pages_promotion/point/order_list.vue +- pages_promotion/merch/detail.vue +- pages_promotion/fenxiao/withdraw_list.vue +- pages_promotion/fenxiao/ranking_list.vue +- pages_promotion/fenxiao/relation.vue +- pages_promotion/fenxiao/team.vue +- pages_promotion/fenxiao/order.vue +- pages_promotion/fenxiao/goods_list.vue +- pages_promotion/fenxiao/bill.vue +- pages_promotion/fenxiao/child_fenxiao.vue +- pages_order/list.vue +- pages_goods/list.vue +- pages_goods/cart.vue +- components-diy/diy-index-page.vue + +### 2.6 privacy-popup 组件(26次引用) + +**文件路径**:components/privacy-popup/privacy-popup.vue + +**引用情况**: +- pages_tool/member/index.vue +- pages_goods/detail.vue +- pages/index/index.vue +- pages_tool/webview/webview.vue +- pages_tool/notice/detail.vue +- pages_tool/notice/list.vue +- pages_tool/help/detail.vue +- pages_tool/help/list.vue +- pages_tool/index/diy.vue +- pages_tool/goods/coupon.vue +- pages_tool/goods/coupon_receive.vue +- pages_tool/files/list.vue +- pages_tool/goods/brand.vue +- pages_tool/article/detail.vue +- pages_tool/article/list.vue +- pages_promotion/point/goods_list.vue +- pages_promotion/point/list.vue +- pages_promotion/point/detail.vue +- pages_promotion/merch/detail.vue +- pages_promotion/fenxiao/promote.vue +- pages_promotion/fenxiao/promote_code.vue +- pages_promotion/fenxiao/goods_list.vue +- pages_goods/list.vue +- pages_goods/cart.vue +- pages_goods/category.vue +- components/ns-login/ns-login.vue + +### 2.7 x-skeleton 组件(19次引用) + +**文件路径**:uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue + +**引用情况**: +- pages.json +- components-diy/diy-article.vue +- components-diy/diy-seckill.vue +- components-diy/diy-store-label.vue +- components-diy/diy-presale.vue +- components-diy/diy-pinfan.vue +- components-diy/diy-pintuan.vue +- components-diy/diy-notes.vue +- components-diy/diy-merch-list.vue +- components-diy/diy-live.vue +- components-diy/diy-groupbuy.vue +- components-diy/diy-goods-recommend.vue +- components-diy/diy-goods-brand.vue +- components-diy/diy-goods-list.vue +- components-diy/diy-coupon.vue +- components-diy/diy-bargain.vue + +### 2.8 ns-goods-sku 组件(13次引用) + +**文件路径**:components/ns-goods-sku/ + +**引用情况**: +- pages_goods/detail.vue +- pages.json +- store/index.js +- pages_promotion/point/detail.vue +- pages_promotion/merch/detail.vue +- pages_goods/list.vue +- pages_goods/cart.vue +- components-diy/diy-goods-list.vue +- components-diy/diy-category.vue + +### 2.9 to-top 组件(11次引用) + +**文件路径**:components/to-top/to-top.vue + +**引用情况**: +- pages_goods/detail.vue +- pages_tool/contact/contact.vue +- pages/index/index.vue +- pages_tool/member/level.vue +- pages_tool/member/level_growth_rules.vue +- pages_promotion/point/detail.vue +- pages_goods/cart.vue +- components/mescroll/mescroll-uni.vue +- pages_goods/_components/goods-detail-view/goods-detail-view.vue +- common/css/goods_detail.scss + +### 2.10 ns-goods-recommend 组件(10次引用) + +**文件路径**:components/ns-goods-recommend/ns-goods-recommend.vue + +**引用情况**: +- pages_tool/pay/result.vue +- pages_tool/member/collection.vue +- pages_tool/member/card.vue +- pages_promotion/fenxiao/level.vue +- pages_order/detail_point.vue +- pages_order/detail.vue +- pages_goods/cart.vue +- pages_goods/_components/goods-detail-view/goods-detail-view.vue + +### 2.11 ns-payment 组件(9次引用) + +**文件路径**:components/ns-payment/ns-payment.vue + +**引用情况**: +- pages_tool/recharge/list.vue +- pages_tool/member/card_buy.vue +- pages_promotion/point/order_list.vue +- pages_promotion/point/payment.vue +- pages_order/detail_point.vue +- pages_order/list.vue +- pages_order/detail.vue + +### 2.12 ns-adv 组件(8次引用) + +**文件路径**:components/ns-adv/ns-adv.vue + +**引用情况**: +- pages_tool/files/list.vue +- pages_tool/goods/brand.vue +- pages_tool/article/list.vue +- pages_promotion/point/list.vue +- pages_promotion/point/public/css/list.scss +- pages_promotion/fenxiao/public/css/follow.scss + +### 2.13 ns-form 组件(8次引用) + +**文件路径**:components/ns-form/ns-form.vue + +**引用情况**: +- pages_goods/detail.vue +- pages_order/_components/common-payment/common-payment.vue +- pages_tool/form/form.vue +- pages_tool/_components/ns-newform/ns-newform.vue +- components/ns-goods-sku/ns-goods-sku.vue +- common/css/order_parment.scss + +### 2.14 uni-icons 组件(8次引用) + +**文件路径**:uni_modules/uni-icons/components/uni-icons/uni-icons.vue + +**引用情况**: +- uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue +- uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue +- uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue + +### 2.15 ns-contact 组件(7次引用) + +**文件路径**:components/ns-contact/ns-contact.vue + +**引用情况**: +- pages_tool/order/refund_detail.vue +- pages_tool/member/contact.vue +- pages_order/detail_point.vue +- pages_order/detail.vue +- components/ns-goods-action-icon/ns-goods-action-icon.vue + +### 2.16 ns-copyright 组件(7次引用) + +**文件路径**:components/ns-copyright/ns-copyright.vue + +**引用情况**: +- pages_tool/member/index.vue +- pages/index/index.vue +- pages_tool/index/diy.vue +- pages_promotion/fenxiao/promote.vue +- pages_promotion/fenxiao/index.vue +- pages_goods/_components/goods-detail-view/goods-detail-view.vue + +### 2.17 hover-nav 组件(6次引用) + +**文件路径**:components/hover-nav/hover-nav.vue + +**引用情况**: +- pages_tool/member/index.vue +- pages_tool/contact/contact.vue +- pages/index/index.vue +- pages/contact/contact.vue + +### 2.18 pick-regions 组件(6次引用) + +**文件路径**:components/pick-regions/pick-regions.vue + +**引用情况**: +- pages_tool/member/info_edit.vue +- pages_tool/member/address_edit.vue +- pages_tool/_components/ns-newform/ns-newform.vue +- components/ns-form/ns-form.vue + +### 2.19 ns-navbar 组件(6次引用) + +**文件路径**:components/ns-navbar/ns-navbar.vue + +**引用情况**: +- pages_tool/member/index.vue +- pages_goods/detail.vue +- pages/index/index.vue +- pages_tool/index/diy.vue + +### 2.20 uni-drawer 组件(4次引用) + +**文件路径**:uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue + +**引用情况**: +- pages_promotion/point/goods_list.vue +- pages_promotion/merch/detail.vue +- pages_goods/list.vue + +### 2.21 uni-calendar 组件(4次引用) + +**文件路径**:uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue + +**引用情况**: +- uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +- uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue + +### 2.22 chat-message 组件(4次引用) + +**文件路径**:components/chat-message/chat-message.vue + +**引用情况**: +- pages_tool/ai-chat/index.vue +- pages_tool/ai-chat/ai-chat-message.vue + +### 2.23 ns-switch 组件(4次引用) + +**文件路径**:components/ns-switch/ns-switch.vue + +**引用情况**: +- pages_order/_components/common-payment/common-payment.vue +- components/payment/payment.vue +- components/ns-payment/ns-payment.vue + +### 2.24 register-reward 组件(4次引用) + +**文件路径**:components/register-reward/register-reward.vue + +**引用情况**: +- pages_tool/login/login.vue +- components/ns-login/ns-login.vue + +### 2.25 sx-rate 组件(4次引用) + +**文件路径**:components/sx-rate/sx-rate.vue + +**引用情况**: +- pages_tool/order/evaluate.vue + +### 2.26 uni-count-down 组件(3次引用) + +**文件路径**:uni_modules/uni-count-down/components/uni-count-down/uni-count-down.vue + +**引用情况**: +- pages_goods/detail.vue +- pages_order/list.vue +- pages_order/detail.vue + +### 2.27 uni-badge 组件(3次引用) + +**文件路径**:uni_modules/uni-badge/components/uni-badge/uni-badge.vue + +**引用情况**: +- uni_modules/uni-grid-item/components/uni-grid-item/uni-grid-item.vue + +### 2.28 uni-grid 组件(3次引用) + +**文件路径**:uni_modules/uni-grid/components/uni-grid/uni-grid.vue + +**引用情况**: +- pages_tool/goods/brand.vue + +### 2.29 ns-loading 组件(5次引用) + +**文件路径**:components/ns-loading/ns-loading.vue + +**引用情况**: +- pages_tool/ai-chat/ai-chat-message.vue +- components/mescroll/mescroll-uni.vue +- components-diy/diy-index-page.vue + +### 2.30 ns-goods-action 组件(5次引用) + +**文件路径**:components/ns-goods-action/ns-goods-action.vue + +**引用情况**: +- pages_goods/detail.vue +- components/ns-goods-action-icon/ns-goods-action-icon.vue +- components/ns-goods-action-button/ns-goods-action-button.vue + +### 2.31 ns-chat 组件(5次引用) + +**文件路径**:components/ns-chat/ + +**引用情况**: +- components/chat-message/chat-message.vue + +### 2.32 ns-select-time 组件(3次引用) + +**文件路径**:components/ns-select-time/ns-select-time.vue + +**引用情况**: +- pages_order/_components/common-payment/common-payment.vue +- pages_promotion/point/payment.vue + +### 2.33 uv-count-to 组件(3次引用) + +**文件路径**:components/uv-count-to/uv-count-to.vue + +**引用情况**: +- components-diy/diy-digit.vue + +### 2.34 ns-video-player-popup 组件(3次引用) + +**文件路径**:components/ns-video-player-popup/ns-video-player-popup.vue + +**引用情况**: +- pages_tool/contact/contact.vue + +### 2.35 l-time 组件(3次引用) + +**文件路径**:components/l-time/l-time.vue + +**引用情况**: +- common/css/icondiy.css + +### 2.36 pengpai-fadein-out 组件(3次引用) + +**文件路径**:components/pengpai-fadein-out/pengpai-fadein-out.vue + +**引用情况**: +- pages_goods/_components/goods-detail-view/goods-detail-view.vue + +### 2.37 ns-progress 组件(2次引用) + +**文件路径**:components/ns-progress/ns-progress.vue + +**引用情况**: +- pages_tool/member/level.vue + +### 2.38 payment 组件(2次引用) + +**文件路径**:components/payment/payment.vue + +**引用情况**:无直接引用 + +### 2.39 uni-popup-sku 组件(2次引用) + +**文件路径**:uni_modules/uni-popup-sku/components/uni-popup-sku/uni-popup-sku.vue + +**引用情况**:无直接引用 + +### 2.40 uni-popup-sku-category 组件(2次引用) + +**文件路径**:uni_modules/uni-popup-sku-category/components/uni-popup-sku-category/uni-popup-sku-category.vue + +**引用情况**:无直接引用 + +### 2.41 uni-datetime-picker 组件(13次引用) + +**文件路径**:uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue + +**引用情况**: +- components/yuyue-date/yuyue-date.vue + +### 2.42 ns-mp-html 组件(1次引用) + +**文件路径**:components/ns-mp-html/ns-mp-html.vue + +**引用情况**:无引用 + +### 2.43 wxwork-contact 组件(1次引用) + +**文件路径**:components/wxwork-contact/wxwork-contact.vue + +**引用情况**:无引用 + +### 2.44 xiao-star-component 组件(1次引用) + +**文件路径**:components/xiao-star-component/xiao-star-component.vue + +**引用情况**:无引用 + +### 2.45 yuyue-date 组件(1次引用) + +**文件路径**:components/yuyue-date/yuyue-date.vue + +**引用情况**:无引用 + +### 2.46 uni-nav-bar 组件(1次引用) + +**文件路径**:uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue + +**引用情况**:无直接引用 + +### 2.47 uni-number-box 组件(1次引用) + +**文件路径**:uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue + +**引用情况**:无直接引用 + +### 2.48 uni-status-bar 组件(1次引用) + +**文件路径**:uni_modules/uni-status-bar/components/uni-status-bar/uni-status-bar.vue + +**引用情况**:无直接引用 + +### 2.49 uni-tag 组件(1次引用) + +**文件路径**:uni_modules/uni-tag/components/uni-tag/uni-tag.vue + +**引用情况**:无直接引用 + +### 2.50 mp-html 组件(1次引用) + +**文件路径**:uni_modules/mp-html/components/mp-html/mp-html.vue + +**引用情况**:无直接引用 + +### 2.51 uni-scss 组件(1次引用) + +**文件路径**:uni_modules/uni-scss/components/uni-scss/ + +**引用情况**:无直接引用 + +### 2.52 uni-grid-item 组件(1次引用) + +**文件路径**:uni_modules/uni-grid-item/components/uni-grid-item/uni-grid-item.vue + +**引用情况**:无直接引用 + +## 3. 组件使用统计 + +### 3.1 使用最广泛的组件(前10) + +1. loading-cover - 78个引用 +2. uni-popup - 66个引用 +3. mescroll - 63个引用 +4. ns-login - 53个引用 +5. ns-empty - 37个引用 +6. privacy-popup - 26个引用 +7. x-skeleton - 19个引用 +8. ns-goods-sku - 13个引用 +9. to-top - 11个引用 +10. ns-goods-recommend - 10个引用 + +### 3.2 未被使用的组件 + +- ns-mp-html +- wxwork-contact +- xiao-star-component +- yuyue-date +- uni-nav-bar +- uni-number-box +- uni-status-bar +- uni-tag +- mp-html +- uni-scss + +## 4. 总结 + +本项目的组件使用情况较为集中,核心组件如 loading-cover、uni-popup、mescroll、ns-login 等被广泛应用于多个页面。同时,也存在部分组件未被使用的情况,这些组件可能是为未来功能预留的,或者是已经被其他组件替代的。 + +通过本文档,可以清晰了解每个组件的使用范围,为后续的组件优化和维护提供参考。 + +**更新时间**:2026-01-16 \ No newline at end of file diff --git a/docs/example/wechat-channel-demo.vue b/docs/example/wechat-channel-demo.vue new file mode 100644 index 0000000..045beba --- /dev/null +++ b/docs/example/wechat-channel-demo.vue @@ -0,0 +1,165 @@ + + + + + \ No newline at end of file diff --git a/lang/en-us/common.js b/lang/en-us/common.js index b92c1e6..138d610 100644 --- a/lang/en-us/common.js +++ b/lang/en-us/common.js @@ -1,28 +1,35 @@ -export const lang = { - - // 底部选项卡 - tabBar: { - home: 'index', - category: 'category', - cart: 'cart', - member: 'member', - }, - - //公共 - common: { - //语言包名称 - name: '英文', - mescrollTextInOffset: 'pull to refresh', - mescrollTextOutOffset: 'Loading...', - mescrollEmpty: "No data available", - goodsRecommendTitle: 'Guess you like', - currencySymbol: '¥', - submit: 'Submit', - searchTip: 'Please enter search keywords' - }, - - login: 'Login/Register', - loginTips: 'Click to login and enjoy more exciting information', - toLogin: 'Go to login', - toGoodsCategoryPage: 'Go shopping', -} +export const lang = { + + // 底部选项卡 + tabBar: { + home: 'index', + category: 'category', + cart: 'cart', + member: 'member', + }, + + //公共 + common: { + //语言包名称 + name: '英文', + mescrollTextInOffset: 'pull to refresh', + mescrollTextOutOffset: 'Loading...', + mescrollEmpty: "No data available", + goodsRecommendTitle: 'Guess you like', + currencySymbol: '¥', + submit: 'Submit', + searchTip: 'Please enter search keywords' + }, + + //customer service + customer: { + weChatKefu: 'WeChat Customer Service', + systemKefu: 'System Customer Service', + weChatWorkKefu: 'WeChat Work Customer Service', + }, + + login: 'Login/Register', + loginTips: 'Click to login and enjoy more exciting information', + toLogin: 'Go to login', + toGoodsCategoryPage: 'Go shopping', +} \ No newline at end of file diff --git a/lang/zh-cn/common.js b/lang/zh-cn/common.js index f029019..de12bd8 100644 --- a/lang/zh-cn/common.js +++ b/lang/zh-cn/common.js @@ -21,6 +21,13 @@ export const lang = { searchTip: '请输入搜索关键词' }, + //客服 + customer: { + weChatKefu: '微信客服', + systemKefu: '专属客服', + weChatWorkKefu: '企业微信客服', + }, + login: '登录/注册', loginTpis: '点击登录 享受更多精彩信息', toLogin: '去登录', diff --git a/lang/zh-cn/order/activist.js b/lang/zh-cn/order/activist.js index 3113f05..bc39f08 100644 --- a/lang/zh-cn/order/activist.js +++ b/lang/zh-cn/order/activist.js @@ -1,6 +1,6 @@ export const lang = { //title为每个页面的标题 - title: '退款', + title: '售后', checkDetail: '查看详情', - emptyTips: '暂无退款记录' + emptyTips: '暂无售后记录' } diff --git a/manifest.json b/manifest.json index 4c7a0d4..4beada8 100644 --- a/manifest.json +++ b/manifest.json @@ -58,7 +58,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wx29215aa1bd97bbd6", + "appid" : "wx5e649e2286b29bdf", "setting" : { "urlCheck" : false, "postcss" : false, @@ -66,6 +66,7 @@ "minified" : true }, "usingComponents" : true, + "lazyCodeLoading" : "requiredComponents", "permission" : { "scope.userLocation" : { "desc" : "为了更好地为您提供服务" @@ -129,5 +130,5 @@ "uniStatistics" : { "version" : "2" }, - "sassImplementationName" : "node-sass" + "sassImplementationName" : "dart-sass" } diff --git a/node_modules/jweixin-module/README.md b/node_modules/jweixin-module/README.md index f4e08bd..7c91d7b 100644 --- a/node_modules/jweixin-module/README.md +++ b/node_modules/jweixin-module/README.md @@ -19,8 +19,8 @@ https://unpkg.com/jweixin-module/out/index.js ## 使用 ```js -var wx = require('jweixin-module') -wx.ready(function(){ +var jweixin = require('jweixin-module') +jweixin.ready(function(){ // TODO }); ``` diff --git a/node_modules/jweixin-module/out/index.js b/node_modules/jweixin-module/out/index.js deleted file mode 100644 index 807ab6a..0000000 --- a/node_modules/jweixin-module/out/index.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(e):"function"==typeof define&&(define.amd||define.cmd)?define(function(){return n(e)}):n(e,!0)}(window,function(o,e){function c(n,e,i){o.WeixinJSBridge?WeixinJSBridge.invoke(n,r(e),function(e){a(n,e,i)}):d(n,i)}function i(n,i,t){o.WeixinJSBridge?WeixinJSBridge.on(n,function(e){t&&t.trigger&&t.trigger(e),a(n,e,i)}):d(n,t||i)}function r(e){return(e=e||{}).appId=M.appId,e.verifyAppId=M.appId,e.verifySignType="sha1",e.verifyTimestamp=M.timestamp+"",e.verifyNonceStr=M.nonceStr,e.verifySignature=M.signature,e}function n(e){return{timeStamp:e.timestamp+"",nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function a(e,n,i){"openEnterpriseChat"==e&&(n.errCode=n.err_code),delete n.err_code,delete n.err_desc,delete n.err_detail;var t=n.errMsg;t||(t=n.err_msg,delete n.err_msg,t=function(e,n){var i=e,t=f[i];t&&(i=t);var o="ok";if(n){var r=n.indexOf(":");"confirm"==(o=n.substring(r+1))&&(o="ok"),"failed"==o&&(o="fail"),-1!=o.indexOf("failed_")&&(o=o.substring(7)),-1!=o.indexOf("fail_")&&(o=o.substring(5)),"access denied"!=(o=(o=o.replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=o||(o="permission denied"),"config"==i&&"function not exist"==o&&(o="ok"),""==o&&(o="fail")}return n=i+":"+o}(e,t),n.errMsg=t),(i=i||{})._complete&&(i._complete(n),delete i._complete),t=n.errMsg||"",M.debug&&!i.isInnerInvoke&&alert(JSON.stringify(n));var o=t.indexOf(":");switch(t.substring(o+1)){case"ok":i.success&&i.success(n);break;case"cancel":i.cancel&&i.cancel(n);break;default:i.fail&&i.fail(n)}i.complete&&i.complete(n)}function s(e){if(e){for(var n=0,i=e.length;n= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/browserslist": { "version": "4.23.3", "resolved": "https://repo.huaweicloud.com/repository/npm/browserslist/-/browserslist-4.23.3.tgz", @@ -449,6 +503,74 @@ "dev": true, "license": "MIT" }, + "node_modules/dart-sass": { + "version": "1.25.0", + "resolved": "https://registry.npmmirror.com/dart-sass/-/dart-sass-1.25.0.tgz", + "integrity": "sha512-syNOAstJXAmvD3RifcDk3fiPMyYE2fY8so6w9gf2/wNlKpG0zyH+oiXubEYVOy1WAWkzOc72pbAxwx+3OU4JJA==", + "deprecated": "This package has been renamed to 'sass'.", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": ">=2.0.0 <4.0.0" + }, + "bin": { + "dart-sass": "sass.js" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/dart-sass/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/dart-sass/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/dart-sass/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.4", "resolved": "https://repo.huaweicloud.com/repository/npm/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz", @@ -567,6 +689,47 @@ "dev": true, "license": "MIT" }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://repo.huaweicloud.com/repository/npm/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -593,6 +756,52 @@ "node": ">=8" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://repo.huaweicloud.com/repository/npm/jest-worker/-/jest-worker-27.5.1.tgz", @@ -701,6 +910,16 @@ "license": "MIT", "peer": true }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/picocolors/-/picocolors-1.0.1.tgz", @@ -881,6 +1100,19 @@ } } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/undici-types": { "version": "6.13.0", "resolved": "https://repo.huaweicloud.com/repository/npm/undici-types/-/undici-types-6.13.0.tgz", @@ -1318,6 +1550,39 @@ "dev": true, "requires": {} }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "dependencies": { + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + } + } + }, + "binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true + }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, "browserslist": { "version": "4.23.3", "resolved": "https://repo.huaweicloud.com/repository/npm/browserslist/-/browserslist-4.23.3.tgz", @@ -1357,6 +1622,48 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "dart-sass": { + "version": "1.25.0", + "resolved": "https://registry.npmmirror.com/dart-sass/-/dart-sass-1.25.0.tgz", + "integrity": "sha512-syNOAstJXAmvD3RifcDk3fiPMyYE2fY8so6w9gf2/wNlKpG0zyH+oiXubEYVOy1WAWkzOc72pbAxwx+3OU4JJA==", + "dev": true, + "requires": { + "chokidar": ">=2.0.0 <4.0.0" + }, + "dependencies": { + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + } + } + }, "electron-to-chromium": { "version": "1.5.4", "resolved": "https://repo.huaweicloud.com/repository/npm/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz", @@ -1445,6 +1752,31 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "glob-to-regexp": { "version": "0.4.1", "resolved": "https://repo.huaweicloud.com/repository/npm/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -1465,6 +1797,36 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, "jest-worker": { "version": "27.5.1", "resolved": "https://repo.huaweicloud.com/repository/npm/jest-worker/-/jest-worker-27.5.1.tgz", @@ -1544,6 +1906,12 @@ "dev": true, "peer": true }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "picocolors": { "version": "1.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/picocolors/-/picocolors-1.0.1.tgz", @@ -1649,6 +2017,15 @@ "terser": "^5.26.0" } }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "undici-types": { "version": "6.13.0", "resolved": "https://repo.huaweicloud.com/repository/npm/undici-types/-/undici-types-6.13.0.tgz", diff --git a/package.json b/package.json index 055088d..c82e734 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,12 @@ { "scripts": { - "mp-weixin": "node scripts/mp-weixin.patch.js" + "mp-weixin": "node scripts/mp-weixin.patch.js", + "mp-weixin:patch": "node scripts/mp-weixin.patch.js --no-zip", + "mp-weixin:dev": "node scripts/mp-weixin.patch.js --mode development", + "mp-weixin:dev:patch": "node scripts/mp-weixin.patch.js --mode development --no-zip" }, "devDependencies": { + "dart-sass": "^1.25.0", "terser-webpack-plugin": "^5.3.10", "zion-uniapp-mp-load-package": "^1.0.13" }, @@ -21,6 +25,17 @@ "PRODUCTION": true } }, + "h5-xcx20.5g-quickapp.com": { + "title": "H5-xcx20.5g-quickapp.com", + "env": { + "UNI_PLATFORM": "h5" + }, + "define": { + "H5_XCX_5G_QUICKAPP_COM": true, + "H5_PRODUCTION": true, + "PRODUCTION": true + } + }, "h5-xcx.aigc-quickapp.com": { "title": "H5-xcx.aigc-quickapp.com", "env": { diff --git a/pages.json b/pages.json index a4ee8dd..3a35886 100644 --- a/pages.json +++ b/pages.json @@ -315,12 +315,18 @@ //*****************其他模块(26)****************** "root": "pages_tool", "pages": [ + { + "path": "ai-chat/index", + "style": { + "navigationBarTitleText": "AI 客服" + } + }, { "path": "agreement/contenr", "style": { "navigationBarTitleText": "" } - }, + }, { "path": "vr/index", "style": { @@ -912,16 +918,22 @@ }, //******************文件模块****************** { - "path": "files/list", - "style": { - // #ifdef APP-PLUS - "navigationStyle": "custom", - // #endif - "navigationBarTitleText": "查看文件" - } + "path": "files/list", + "style": { + // #ifdef APP-PLUS + "navigationStyle": "custom", + // #endif + "navigationBarTitleText": "查看文件" } - ] - } + }, + { + "path": "file-preview/file-preview", + "style": { + "navigationBarTitleText": "文件预览" + } + } + ] + } ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/index/index.vue b/pages/index/index.vue index 0a5cad0..13f0583 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,248 +1,246 @@ - - - - - - + \ No newline at end of file diff --git a/pages/index/public/css/index.scss b/pages/index/public/css/index.scss index 1a9f437..dfc2527 100644 --- a/pages/index/public/css/index.scss +++ b/pages/index/public/css/index.scss @@ -59,7 +59,7 @@ } } -.official-accounts-inner /deep/ .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box { +.official-accounts-inner ::v-deep .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box { overflow: inherit; } .official-accounts-wrap { diff --git a/components/goods-detail-view/detail.js b/pages_goods/_components/goods-detail-view/detail.js similarity index 100% rename from components/goods-detail-view/detail.js rename to pages_goods/_components/goods-detail-view/detail.js diff --git a/components/goods-detail-view/goods-detail-view.vue b/pages_goods/_components/goods-detail-view/goods-detail-view.vue similarity index 75% rename from components/goods-detail-view/goods-detail-view.vue rename to pages_goods/_components/goods-detail-view/goods-detail-view.vue index 3a6a6cb..0020ac9 100644 --- a/components/goods-detail-view/goods-detail-view.vue +++ b/pages_goods/_components/goods-detail-view/goods-detail-view.vue @@ -3,16 +3,21 @@ - + - + - - + + - + @@ -24,13 +29,16 @@ - + - {{ $lang('video') }} - {{ $lang('image') }} + {{ + $lang('video') }} + {{ $lang('image') }} @@ -40,19 +48,20 @@ - + - - - {{$lang('send')}} + + + {{ $lang('send') }} - {{$lang('express')}} - + {{ $lang('express') }} + @@ -63,7 +72,7 @@ - - + 服务 - + - - - + + + {{ item.service_name }} @@ -96,30 +111,32 @@ - + - - - - - - - - - + + + + + + + + + - + - + - - - {{goodsSkuDetail.merchinfo.merch_name}} - 官方认证商家,值得信赖! - + + + {{ goodsSkuDetail.merchinfo.merch_name }} + 官方认证商家,值得信赖! + @@ -136,7 +153,8 @@ - + {{ item.name }} @@ -158,11 +176,16 @@ - - - - - + + + + + {{ item.service_name }} @@ -187,17 +210,19 @@ - + - - + + {{ item.store_name }} - 距离{{ item.distance > 1 ? item.distance + 'km' : item.distance * 1000 + 'm' }} + 距离{{ item.distance > 1 ? item.distance + 'km' : item.distance * + 1000 + 'm' }} 营业时间:{{ item.open_date }} @@ -228,7 +253,7 @@ - - - + 展开 @@ -315,24 +350,25 @@ - + - {{$lang('details')}} + {{ $lang('details') }} - - - - + + + + - + @@ -419,25 +455,30 @@ \ No newline at end of file diff --git a/components/ns-goods-promotion/ns-goods-promotion.vue b/pages_goods/_components/ns-goods-promotion/ns-goods-promotion.vue similarity index 100% rename from components/ns-goods-promotion/ns-goods-promotion.vue rename to pages_goods/_components/ns-goods-promotion/ns-goods-promotion.vue diff --git a/components/pengpai-fadein-out/pengpai-fadein-out.vue b/pages_goods/_components/pengpai-fadein-out/pengpai-fadein-out.vue similarity index 100% rename from components/pengpai-fadein-out/pengpai-fadein-out.vue rename to pages_goods/_components/pengpai-fadein-out/pengpai-fadein-out.vue diff --git a/pages_goods/cart.vue b/pages_goods/cart.vue index 58ab7c3..86e160d 100644 --- a/pages_goods/cart.vue +++ b/pages_goods/cart.vue @@ -203,7 +203,7 @@ :emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"> + }} @@ -376,13 +376,13 @@ export default { \ No newline at end of file diff --git a/pages_goods/detail.vue b/pages_goods/detail.vue index 2328b31..7db396b 100644 --- a/pages_goods/detail.vue +++ b/pages_goods/detail.vue @@ -519,12 +519,19 @@ \ No newline at end of file diff --git a/pages_goods/public/css/cart.scss b/pages_goods/public/css/cart.scss index 514e550..ad662ed 100644 --- a/pages_goods/public/css/cart.scss +++ b/pages_goods/public/css/cart.scss @@ -177,18 +177,18 @@ } } - /deep/ .decrease { + ::v-deep .decrease { width: 52rpx; height: 52rpx; line-height: 48rpx; font-size: 40rpx; border-radius: 10rpx 0px 0px 10rpx; } - /deep/ input { + ::v-deep input { height: 52rpx; line-height: 52rpx; } - /deep/ .increase { + ::v-deep .increase { width: 52rpx; height: 52rpx; line-height: 48rpx; diff --git a/pages_goods/public/css/list.scss b/pages_goods/public/css/list.scss index b7e0e4b..15aa9ca 100644 --- a/pages_goods/public/css/list.scss +++ b/pages_goods/public/css/list.scss @@ -400,7 +400,7 @@ .price { color: var(--price-color); color: #fff !important; - font-size: 15rpx !important; + font-size: 27rpx !important; font-weight: bold !important; } } diff --git a/components/common-payment/common-payment.vue b/pages_order/_components/common-payment/common-payment.vue similarity index 99% rename from components/common-payment/common-payment.vue rename to pages_order/_components/common-payment/common-payment.vue index b92f879..974612b 100644 --- a/components/common-payment/common-payment.vue +++ b/pages_order/_components/common-payment/common-payment.vue @@ -635,9 +635,6 @@ diff --git a/pages_order/public/css/detail.scss b/pages_order/public/css/detail.scss index a1b1c06..e16e277 100644 --- a/pages_order/public/css/detail.scss +++ b/pages_order/public/css/detail.scss @@ -104,7 +104,7 @@ view { } } -/deep/ #action-date .uni-countdown .uni-countdown__number { +::v-deep #action-date .uni-countdown .uni-countdown__number { border: none !important; padding: 0 !important; margin: 0 !important; diff --git a/pages_order/public/css/list.scss b/pages_order/public/css/list.scss index f90c89f..74b4d2f 100644 --- a/pages_order/public/css/list.scss +++ b/pages_order/public/css/list.scss @@ -353,7 +353,7 @@ $margin-both: 24rpx; } } -/deep/ #action-date .uni-countdown .uni-countdown__number { +::v-deep #action-date .uni-countdown .uni-countdown__number { border: none !important; padding: 0 !important; margin: 0 !important; diff --git a/pages_promotion/fenxiao/apply.vue b/pages_promotion/fenxiao/apply.vue index ef3e730..d9f1e03 100644 --- a/pages_promotion/fenxiao/apply.vue +++ b/pages_promotion/fenxiao/apply.vue @@ -196,7 +196,7 @@ duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } },1000); @@ -213,7 +213,7 @@ this.applyStatus(); this.getSourceMemberInfo(); } else { - this.$util.redirectTo('/pages_tool/login/login', { + this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_promotion/fenxiao/apply' }, 'redirectTo'); } @@ -261,7 +261,7 @@ this.status = res.data.status; this.isSub = false; if (this.status == 2) { - this.$util.redirectTo('/pages/member/index'); + this.$util.redirectTo(this.$util.MEMBER_PAGE_URL); } } this.$refs.loadingCover.hide(); @@ -410,7 +410,7 @@ if (options.from === 'navigateBack') { return false; } - this.$util.redirectTo('/pages/member/index'); + this.$util.redirectTo(this.$util.MEMBER_PAGE_URL); return true; } }; @@ -421,11 +421,11 @@ width: 100%; } - /deep/.uni-scroll-view { + ::v-deep .uni-scroll-view { background-color: #fff; } - /deep/.uni-scroll-view::-webkit-scrollbar { + ::v-deep .uni-scroll-view::-webkit-scrollbar { /* 隐藏滚动条,但依旧具备可以滚动的功能 */ display: none; } @@ -802,7 +802,7 @@ \ No newline at end of file diff --git a/pages_promotion/fenxiao/bill.vue b/pages_promotion/fenxiao/bill.vue index 724601d..f879171 100644 --- a/pages_promotion/fenxiao/bill.vue +++ b/pages_promotion/fenxiao/bill.vue @@ -40,7 +40,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); @@ -84,11 +84,11 @@ export default { \ No newline at end of file diff --git a/pages_promotion/fenxiao/level.vue b/pages_promotion/fenxiao/level.vue index a673cb0..fdd8c21 100644 --- a/pages_promotion/fenxiao/level.vue +++ b/pages_promotion/fenxiao/level.vue @@ -213,7 +213,7 @@ duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } },1000); @@ -224,7 +224,7 @@ this.getFenxiaoInfo(); this.getBasicsConfig(); } else { - this.$util.redirectTo('/pages_tool/login/login', { + this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_promotion/fenxiao/level' }); } @@ -299,21 +299,21 @@ @import './public/css/level.scss'; \ No newline at end of file diff --git a/pages_promotion/fenxiao/order.vue b/pages_promotion/fenxiao/order.vue index df7c28f..6981267 100644 --- a/pages_promotion/fenxiao/order.vue +++ b/pages_promotion/fenxiao/order.vue @@ -142,7 +142,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); diff --git a/pages_promotion/fenxiao/order_detail.vue b/pages_promotion/fenxiao/order_detail.vue index 4158687..5ff1ead 100644 --- a/pages_promotion/fenxiao/order_detail.vue +++ b/pages_promotion/fenxiao/order_detail.vue @@ -105,7 +105,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } },1000); diff --git a/pages_promotion/fenxiao/promote.vue b/pages_promotion/fenxiao/promote.vue index e634a8d..5b9988b 100644 --- a/pages_promotion/fenxiao/promote.vue +++ b/pages_promotion/fenxiao/promote.vue @@ -84,7 +84,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); diff --git a/pages_promotion/fenxiao/promote_code.vue b/pages_promotion/fenxiao/promote_code.vue index 7646fce..8b169ad 100644 --- a/pages_promotion/fenxiao/promote_code.vue +++ b/pages_promotion/fenxiao/promote_code.vue @@ -35,7 +35,7 @@ - + @@ -65,7 +65,7 @@ export default { this.$api.sendRequest({ url: '/fenxiao/api/fenxiao/poster', data: { - page: '/pages/index/index', + page: this.$util.INDEX_PAGE_URL, qrcode_param: JSON.stringify({}), template_id: id }, @@ -154,7 +154,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); diff --git a/pages_promotion/fenxiao/public/css/order.scss b/pages_promotion/fenxiao/public/css/order.scss index 6a786d9..da1eafd 100644 --- a/pages_promotion/fenxiao/public/css/order.scss +++ b/pages_promotion/fenxiao/public/css/order.scss @@ -1,8 +1,8 @@ -/deep/ .fixed { +::v-deep .fixed { position: relative; top: 0; } -/deep/ .empty { +::v-deep .empty { margin-top: 0 !important; } .cart-empty { diff --git a/pages_promotion/fenxiao/public/js/goods_list.js b/pages_promotion/fenxiao/public/js/goods_list.js index 67b8f53..5d37f94 100644 --- a/pages_promotion/fenxiao/public/js/goods_list.js +++ b/pages_promotion/fenxiao/public/js/goods_list.js @@ -27,7 +27,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); @@ -40,7 +40,7 @@ export default { if (!this.storeToken) { this.$util.redirectTo( - '/pages_tool/login/login', { + this.$util.LOGIN_PAGE_URL, { back: '/pages_promotion/fenxiao/goods_list' }, 'redirectTo' diff --git a/pages_promotion/fenxiao/team.vue b/pages_promotion/fenxiao/team.vue index 0662ff6..3b40974 100644 --- a/pages_promotion/fenxiao/team.vue +++ b/pages_promotion/fenxiao/team.vue @@ -113,7 +113,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); diff --git a/pages_promotion/fenxiao/withdraw_apply.vue b/pages_promotion/fenxiao/withdraw_apply.vue index e5dfb4e..febccdc 100644 --- a/pages_promotion/fenxiao/withdraw_apply.vue +++ b/pages_promotion/fenxiao/withdraw_apply.vue @@ -90,7 +90,7 @@ this.getBankAccountInfo(); this.getWithdrawInfo(); } else { - this.$util.redirectTo('/pages_tool/login/login', { + this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_promotion/fenxiao/withdraw_apply' }); } diff --git a/pages_promotion/fenxiao/withdraw_list.vue b/pages_promotion/fenxiao/withdraw_list.vue index b60b536..0e37783 100644 --- a/pages_promotion/fenxiao/withdraw_list.vue +++ b/pages_promotion/fenxiao/withdraw_list.vue @@ -70,7 +70,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); diff --git a/pages_promotion/fenxiao/withdrawal_detail.vue b/pages_promotion/fenxiao/withdrawal_detail.vue index 51d563a..e581f9b 100644 --- a/pages_promotion/fenxiao/withdrawal_detail.vue +++ b/pages_promotion/fenxiao/withdrawal_detail.vue @@ -67,7 +67,7 @@ export default { if (this.storeToken) { this.getDetail(); } else { - this.$util.redirectTo('/pages_tool/login/login', { + this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_promotion/fenxiao/withdraw_list' }, 'redirectTo'); } diff --git a/pages_promotion/merch/detail.vue b/pages_promotion/merch/detail.vue index acbd9bb..9bd7c7b 100644 --- a/pages_promotion/merch/detail.vue +++ b/pages_promotion/merch/detail.vue @@ -308,7 +308,7 @@ - + @@ -333,7 +333,7 @@ export default { background-color: #f5f5f5 !important; } -/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box { +::v-deep .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box { max-height: unset !important; } \ No newline at end of file diff --git a/pages_promotion/merch/merchcategory.vue b/pages_promotion/merch/merchcategory.vue index 91180a8..4895914 100644 --- a/pages_promotion/merch/merchcategory.vue +++ b/pages_promotion/merch/merchcategory.vue @@ -228,38 +228,38 @@ \ No newline at end of file diff --git a/pages_promotion/merch/public/category.scss b/pages_promotion/merch/public/category.scss index c5168d0..e9d5897 100644 --- a/pages_promotion/merch/public/category.scss +++ b/pages_promotion/merch/public/category.scss @@ -261,7 +261,7 @@ z-index: 2; } - /deep/ .template-four { + ::v-deep .template-four { position: relative; z-index: 1; @@ -702,7 +702,7 @@ .right-wrap { display: flex; align-items: center; - justify-content: end; + justify-content: flex-end; .num { width: auto; @@ -856,7 +856,7 @@ } } - /deep/ .uni-popup__wrapper-box { + ::v-deep .uni-popup__wrapper-box { border-radius: 0; } @@ -890,7 +890,7 @@ justify-content: center; } - /deep/ .loading-layer { + ::v-deep .loading-layer { background: #fff !important; } diff --git a/pages_promotion/point/detail.vue b/pages_promotion/point/detail.vue index 592c3bb..e45b9ff 100644 --- a/pages_promotion/point/detail.vue +++ b/pages_promotion/point/detail.vue @@ -220,7 +220,7 @@ - + @@ -523,7 +523,7 @@ export default { } diff --git a/pages_promotion/point/list.vue b/pages_promotion/point/list.vue index db7101a..cea5470 100644 --- a/pages_promotion/point/list.vue +++ b/pages_promotion/point/list.vue @@ -302,7 +302,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } }, 1000); @@ -544,7 +544,7 @@ export default { if (getCurrentPages().length > 1) uni.navigateBack({ delta: 1 }); - else this.$util.redirectTo('/pages/index/index'); + else this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, getNewestGame() { this.$api.sendRequest({ diff --git a/pages_promotion/point/order_list.vue b/pages_promotion/point/order_list.vue index 1f87102..1d6cf0c 100644 --- a/pages_promotion/point/order_list.vue +++ b/pages_promotion/point/order_list.vue @@ -120,7 +120,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index', {}, 'redirectTo'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'redirectTo'); }, 2000); } }, 1000); @@ -252,12 +252,12 @@ export default { \ No newline at end of file diff --git a/pages_promotion/point/public/js/payment.js b/pages_promotion/point/public/js/payment.js index c06528b..c0d7cbd 100644 --- a/pages_promotion/point/public/js/payment.js +++ b/pages_promotion/point/public/js/payment.js @@ -95,7 +95,7 @@ export default { title: '未获取到创建订单所需数据!' }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 1500); } return; @@ -122,7 +122,7 @@ export default { title: '未获取到创建订单所需数据!' }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 1500); } }, @@ -547,7 +547,7 @@ export default { } // 判断登录 if (!this.storeToken) { - this.$util.redirectTo('/pages_tool/login/login'); + this.$util.redirectTo(this.$util.LOGIN_PAGE_URL); } else { this.getOrderPaymentData(); } diff --git a/pages_promotion/point/result.vue b/pages_promotion/point/result.vue index ce14ea8..ebe3e74 100644 --- a/pages_promotion/point/result.vue +++ b/pages_promotion/point/result.vue @@ -23,7 +23,7 @@ this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo'); }, toIndex() { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); } } }; diff --git a/components/img-cropping/img-cropping.vue b/pages_tool/_components/img-cropping/img-cropping.vue similarity index 100% rename from components/img-cropping/img-cropping.vue rename to pages_tool/_components/img-cropping/img-cropping.vue diff --git a/components/myp-one/myp-one.vue b/pages_tool/_components/myp-one/myp-one.vue similarity index 100% rename from components/myp-one/myp-one.vue rename to pages_tool/_components/myp-one/myp-one.vue diff --git a/components/ns-birthday-gift/ns-birthday-gift.vue b/pages_tool/_components/ns-birthday-gift/ns-birthday-gift.vue similarity index 98% rename from components/ns-birthday-gift/ns-birthday-gift.vue rename to pages_tool/_components/ns-birthday-gift/ns-birthday-gift.vue index 254126c..34b10e4 100644 --- a/components/ns-birthday-gift/ns-birthday-gift.vue +++ b/pages_tool/_components/ns-birthday-gift/ns-birthday-gift.vue @@ -161,7 +161,7 @@ }; - \ No newline at end of file diff --git a/components/ai-chat-message/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue similarity index 79% rename from components/ai-chat-message/ai-chat-message.vue rename to pages_tool/ai-chat/ai-chat-message.vue index 9f6b438..a9f68fc 100644 --- a/components/ai-chat-message/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -1,25 +1,17 @@ \ No newline at end of file diff --git a/pages_tool/file-preview/file-preview.vue b/pages_tool/file-preview/file-preview.vue new file mode 100644 index 0000000..62f946d --- /dev/null +++ b/pages_tool/file-preview/file-preview.vue @@ -0,0 +1,183 @@ + + + + + diff --git a/pages_tool/form/form.vue b/pages_tool/form/form.vue index 52f2d16..7edcab5 100644 --- a/pages_tool/form/form.vue +++ b/pages_tool/form/form.vue @@ -138,7 +138,7 @@ border-radius: 80rpx; } - /deep/ .form-wrap { + ::v-deep .form-wrap { background: #fff; padding: 30rpx; border-radius: 32rpx; diff --git a/pages_tool/form/formdata.vue b/pages_tool/form/formdata.vue index 7743cc8..db3deb7 100644 --- a/pages_tool/form/formdata.vue +++ b/pages_tool/form/formdata.vue @@ -20,7 +20,13 @@ \ No newline at end of file diff --git a/pages_tool/login/find.vue b/pages_tool/login/find.vue index 07d65a9..c38c7ce 100644 --- a/pages_tool/login/find.vue +++ b/pages_tool/login/find.vue @@ -87,7 +87,13 @@ - \ No newline at end of file diff --git a/pages_tool/member/card_buy.vue b/pages_tool/member/card_buy.vue index d188504..ccaa45b 100644 --- a/pages_tool/member/card_buy.vue +++ b/pages_tool/member/card_buy.vue @@ -418,7 +418,7 @@ export default { if (options.from === 'navigateBack') { return false; } - this.$util.redirectTo('/pages/member/index'); + this.$util.redirectTo(this.$util.MEMBER_PAGE_URL); return true; } }; diff --git a/pages_tool/member/collection.vue b/pages_tool/member/collection.vue index a28ff1c..83e7718 100644 --- a/pages_tool/member/collection.vue +++ b/pages_tool/member/collection.vue @@ -30,7 +30,7 @@ - @@ -73,12 +73,12 @@ export default { \ No newline at end of file diff --git a/pages_tool/member/coupon.vue b/pages_tool/member/coupon.vue index 96aa047..5539916 100644 --- a/pages_tool/member/coupon.vue +++ b/pages_tool/member/coupon.vue @@ -60,7 +60,7 @@ - + @@ -93,7 +93,7 @@ export default { duration: 2000 }); setTimeout(() => { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); }, 2000); } },1000); diff --git a/pages_tool/member/footprint.vue b/pages_tool/member/footprint.vue index e6ae305..dc6f1c5 100644 --- a/pages_tool/member/footprint.vue +++ b/pages_tool/member/footprint.vue @@ -46,7 +46,7 @@ - + @@ -249,7 +249,7 @@ export default { diff --git a/pages_tool/member/level.vue b/pages_tool/member/level.vue index e4b7504..1af035a 100644 --- a/pages_tool/member/level.vue +++ b/pages_tool/member/level.vue @@ -354,7 +354,7 @@ if (options.from === 'navigateBack') { return false; } - this.$util.redirectTo('/pages/member/index'); + this.$util.redirectTo(this.$util.MEMBER_PAGE_URL); return true; }, watch: { diff --git a/pages_tool/member/modify_face.vue b/pages_tool/member/modify_face.vue index 7f70626..eacdd3b 100644 --- a/pages_tool/member/modify_face.vue +++ b/pages_tool/member/modify_face.vue @@ -2,8 +2,10 @@ - - + + @@ -29,162 +31,167 @@ \ No newline at end of file diff --git a/pages_tool/member/pay_password.vue b/pages_tool/member/pay_password.vue index e3117ad..0511b4b 100644 --- a/pages_tool/member/pay_password.vue +++ b/pages_tool/member/pay_password.vue @@ -16,7 +16,11 @@ \ No newline at end of file diff --git a/pages_tool/order/logistics.vue b/pages_tool/order/logistics.vue index 90f4522..7082f66 100644 --- a/pages_tool/order/logistics.vue +++ b/pages_tool/order/logistics.vue @@ -91,7 +91,7 @@ export default { onShow() { // 判断登录 if (!this.storeToken) { - this.$util.redirectTo('/pages_tool/login/login'); + this.$util.redirectTo(this.$util.LOGIN_PAGE_URL); } else { this.getPackageInfo(); } @@ -152,7 +152,7 @@ export default { diff --git a/pages_tool/order/refund_batch.vue b/pages_tool/order/refund_batch.vue index f5812a3..5fe9db6 100644 --- a/pages_tool/order/refund_batch.vue +++ b/pages_tool/order/refund_batch.vue @@ -122,7 +122,7 @@ export default { if (this.storeToken) { this.getRefundData(); } else { - this.$util.redirectTo('/pages_tool/login/login', { back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id }); + this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id }); } }, methods: { @@ -289,15 +289,15 @@ export default { @import './public/css/refund.scss'; \ No newline at end of file diff --git a/pages_tool/recharge/list.vue b/pages_tool/recharge/list.vue index 385c3db..1edd6c6 100644 --- a/pages_tool/recharge/list.vue +++ b/pages_tool/recharge/list.vue @@ -300,7 +300,7 @@ box-sizing: border-box; } - /deep/ .mescroll-uni-fixed { + ::v-deep .mescroll-uni-fixed { bottom: 280rpx !important; } .recharge-title{ diff --git a/pages_tool/storeclose/storeclose.vue b/pages_tool/storeclose/storeclose.vue index c710e27..55a7062 100644 --- a/pages_tool/storeclose/storeclose.vue +++ b/pages_tool/storeclose/storeclose.vue @@ -30,7 +30,7 @@ export default { data: {}, success: res => { if (res.code == 0) { - this.$util.redirectTo('/pages/index/index'); + this.$util.redirectTo(this.$util.INDEX_PAGE_URL); } } }); diff --git a/project.config.json b/project.config.json index 7126295..776d6c4 100644 --- a/project.config.json +++ b/project.config.json @@ -1,12 +1,13 @@ { "description": "项目配置文件", "packOptions": { - "ignore": [] + "ignore": [], + "include": [] }, "setting": { "urlCheck": true, "es6": true, - "enhance": false, + "enhance": true, "postcss": true, "preloadBackgroundData": false, "minified": true, @@ -37,7 +38,15 @@ "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], - "minifyWXSS": true + "minifyWXSS": true, + "condition": true, + "swc": false, + "disableSWC": true, + "minifyWXML": true, + "compileWorklet": true, + "localPlugins": false, + "disableUseStrict": false, + "useCompilerPlugins": false }, "compileType": "miniprogram", "libVersion": "2.16.1", diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..ba3edb6 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,23 @@ +{ + "libVersion": "3.12.0", + "projectname": "mp-weixin", + "condition": {}, + "setting": { + "urlCheck": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "useApiHook": true, + "showShadowRootInWxmlPanel": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "compileHotReLoad": true, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true, + "bigPackageSizeSupport": false, + "useIsolateContext": true + } +} \ No newline at end of file diff --git a/scripts/clean-empty-directories.js b/scripts/clean-empty-directories.js new file mode 100644 index 0000000..1d0f4cd --- /dev/null +++ b/scripts/clean-empty-directories.js @@ -0,0 +1,62 @@ +const fs = require('fs'); +const path = require('path'); + +/** + * 递归删除空目录 + * @param {string} dirPath - 要检查的目录路径 + * @param {boolean} dryRun - 是否只打印不删除 + */ +function removeEmptyDirectories(dirPath, dryRun = false) { + try { + // 读取目录内容 + const files = fs.readdirSync(dirPath); + + // 递归检查子目录 + for (const file of files) { + const fullPath = path.join(dirPath, file); + const stat = fs.statSync(fullPath); + + if (stat.isDirectory()) { + removeEmptyDirectories(fullPath, dryRun); + } + } + + // 再次读取目录内容,因为子目录可能已经被删除 + const updatedFiles = fs.readdirSync(dirPath); + + // 如果目录为空 + if (updatedFiles.length === 0) { + console.log(`${dryRun ? 'Would remove' : 'Removing'} empty directory: ${dirPath}`); + if (!dryRun) { + fs.rmdirSync(dirPath); + } + } + } catch (error) { + console.error(`Error processing directory ${dirPath}:`, error.message); + } +} + +/** + * 主函数 + */ +function main() { + // 获取项目根目录 + const projectRoot = path.resolve(__dirname, '..'); + + console.log('Starting to remove empty directories...'); + console.log(`Project root: ${projectRoot}`); + console.log('===================================='); + + // 执行删除操作 + removeEmptyDirectories(projectRoot); + + console.log('===================================='); + console.log('Empty directory cleanup completed!'); +} + +// 运行主函数 +if (require.main === module) { + main(); +} + +module.exports = removeEmptyDirectories; \ No newline at end of file diff --git a/scripts/mp-weixin.patch.js b/scripts/mp-weixin.patch.js index c3c0de9..43f5032 100644 --- a/scripts/mp-weixin.patch.js +++ b/scripts/mp-weixin.patch.js @@ -9,7 +9,10 @@ * 如果这个文件开头已经有了这行代码,则不追加 * * 使用: - * node fix-wechat-miniapp.js + * node fix-wechat-miniapp.js # 打补丁并创建 ZIP 文件(默认 mode=production) + * node fix-wechat-miniapp.js --no-zip # 只打补丁,不创建 ZIP 文件 + * node fix-wechat-miniapp.js --mode development # 使用 development 模式打补丁 + * node fix-wechat-miniapp.js --mode production # 使用 production 模式打补丁(默认) * * 注意: * - 在 Windows 上路径使用反斜杠也是可以的;脚本使用 path.join 来兼容不同平台。 @@ -29,8 +32,6 @@ async function commonPatch(mode = 'production') { // 根据当前脚本所在目录(scripts),定位到项目根目录 const cwd = path.join(__dirname, '..'); - - const srcSitePath = path.join(cwd, 'site.js'); const destDir = path.join(cwd, 'unpackage', 'dist', mode === 'production' ? 'build' : 'dev', 'mp-weixin'); const destSitePath = path.join(destDir, 'site.js'); @@ -47,6 +48,22 @@ async function commonPatch(mode = 'production') { // 确保目标目录存在 await ensureDir(destDir); + // 复制 project.config.json 及 project.private.config.json 文件到 destDir 下面 + const configFiles = ['project.config.json', 'project.private.config.json']; + for (const fileName of configFiles) { + const srcPath = path.join(cwd, fileName); + const destPath = path.join(destDir, fileName); + + // 检查源文件是否存在 + const fileExists = await exists(srcPath); + if (fileExists) { + await fsp.copyFile(srcPath, destPath); + console.log(`已拷贝: ${srcPath} -> ${destPath}`); + } else { + console.warn(`源文件不存在,跳过复制: ${srcPath}`); + } + } + // 复制 site.js 到目标目录(覆盖) await fsp.copyFile(srcSitePath, destSitePath); console.log(`已拷贝: ${srcSitePath} -> ${destSitePath}`); @@ -96,22 +113,37 @@ async function commonPatch(mode = 'production') { } } - - async function main() { + // 解析命令行参数 + const argv = process.argv.slice(2); + const options = { + noZip: argv.includes('--no-zip'), + mode: 'production' // 默认值 + }; + + // 解析 --mode 参数 + const modeIndex = argv.indexOf('--mode'); + if (modeIndex !== -1 && modeIndex + 1 < argv.length) { + options.mode = argv[modeIndex + 1]; + } + // 1) 打补丁 - await commonPatch('production'); + await commonPatch(options.mode); // await commonPatch('development'); - // 2) 创建 ZIP 文件 - const cwd = path.join(__dirname, '..'); - const sourceDir = path.join(cwd, 'unpackage', 'dist', 'build', 'mp-weixin'); - const destDir = path.join(cwd, 'unpackage', 'dist', 'build'); - const zipFilePath = await createZipWithSystemCommand(sourceDir, destDir); - console.log(`ZIP 文件路径: ${zipFilePath}`); + // 2) 创建 ZIP 文件(如果未指定 --no-zip) + if (!options.noZip) { + const cwd = path.join(__dirname, '..'); + const sourceDir = path.join(cwd, 'unpackage', 'dist', 'build', 'mp-weixin'); + const destDir = path.join(cwd, 'unpackage', 'dist', 'build'); + const zipFilePath = await createZipWithSystemCommand(sourceDir, destDir); + console.log(`ZIP 文件路径: ${zipFilePath}`); - // 3) 自动打开zip所在的目录 - await openFileDirectory(zipFilePath); + // 3) 自动打开zip所在的目录 + await openFileDirectory(zipFilePath); + } else { + console.log('跳过创建 ZIP 文件和打开目录'); + } } async function exists(p) { diff --git a/site.js b/site.js index dbbeb00..deb49f2 100644 --- a/site.js +++ b/site.js @@ -1,4 +1,4 @@ module.exports = { - baseUrl: "https://xcx30.5g-quickapp.com/",//修改域名 - uniacid: 460,//后台对应uniacid + baseUrl: "https://xcx6.aigc-quickapp.com/",//修改域名 + uniacid: 2811,//后台对应uniacid }; \ No newline at end of file diff --git a/store/index.js b/store/index.js index 4339ebd..f37eed9 100644 --- a/store/index.js +++ b/store/index.js @@ -412,7 +412,7 @@ const store = new Vuex.Store({ }, // 生成主题颜色CSS变量 themeColorSet() { - console.log('样式颜色设置...'); + // console.log('样式颜色设置...'); let theme = this.state.themeStyle; if (!theme?.main_color || !theme?.aux_color) return; try { @@ -436,7 +436,7 @@ const store = new Vuex.Store({ } catch (e) { console.error('设置主题颜色失败', e); } - console.log('themeColor => ', this.state.themeColor); + // console.log('themeColor => ', this.state.themeColor); } } }) diff --git a/uni.scss b/uni.scss index bd9cf10..d0bc610 100644 --- a/uni.scss +++ b/uni.scss @@ -1,32 +1,50 @@ -/** - * 你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 - * 建议使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App - */ - -//主色调,红色:#FF0036,绿色 #4CAF50,蓝色:#03A9F4,黄色:#FF9800,粉色:#FF547B,棕色:#C3A769,浅绿色:#65C4AA,黑色:#333333,紫色:#B323B4,淡粉色:#FF8B8B - -// 颜色 -$color-title: #303133; // 主标题 -$color-sub: #606266; // 副标题 -$color-tip: #909399; // 辅助提示色 -$color-bg: #f8f8f8; // 背景色 -$color-line: #eeeeee; //分割线 -$color-disabled: #cccccc; // 禁用色 - -// 文字 -$font-size-base: 28rpx; // 14px,正文文字 -$font-size-toolbar: 32rpx; // 16px,用于导航栏、标题 -$font-size-sub: 26rpx; // 13px,副标题 -$font-size-tag: 24rpx; // 12px,辅助性文字/大标签 -$font-size-goods-tag: 22rpx; // 11px,商品列表角标 -$font-size-activity-tag: 20rpx; // 10px,活动角标(拼团等角标)/小标签文字 - -$margin-both: 30rpx; //外边距 左右 -$margin-updown: 20rpx; // 外边距 上下 -$border-radius: 10rpx; //圆角 -$padding: 20rpx; //内边距 - -$base-color: var(--base-color); // 主色调 -$base-help-color: var(--base-help-color); //辅助颜色 - -$goods-price-color: var(--goods-price-color); +/** + * 你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * 建议使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + */ + +//主色调,红色:#FF0036,绿色 #4CAF50,蓝色:#03A9F4,黄色:#FF9800,粉色:#FF547B,棕色:#C3A769,浅绿色:#65C4AA,黑色:#333333,紫色:#B323B4,淡粉色:#FF8B8B + +// 颜色 +$color-title: #303133; // 主标题 +$color-sub: #606266; // 副标题 +$color-tip: #909399; // 辅助提示色 +$color-bg: #f8f8f8; // 背景色 +$color-line: #eeeeee; //分割线 +$color-disabled: #cccccc; // 禁用色 + +// 文字 +$font-size-base: 28rpx; // 14px,正文文字 +$font-size-toolbar: 32rpx; // 16px,用于导航栏、标题 +$font-size-sub: 26rpx; // 13px,副标题 +$font-size-tag: 24rpx; // 12px,辅助性文字/大标签 +$font-size-goods-tag: 22rpx; // 11px,商品列表角标 +$font-size-activity-tag: 20rpx; // 10px,活动角标(拼团等角标)/小标签文字 + +$margin-both: 30rpx; //外边距 左右 +$margin-updown: 20rpx; // 外边距 上下 +$border-radius: 10rpx; //圆角 +$padding: 20rpx; //内边距 + +$base-color: var(--base-color); // 主色调 +$base-help-color: var(--base-help-color); //辅助颜色 + +$goods-price-color: var(--goods-price-color); + +// uni 兼容变量 +$uni-font-size-sm: $font-size-tag; // 12px,小字体 +$uni-font-size-base: $font-size-base; // 14px,正文文字 +$uni-font-size-lg: $font-size-toolbar; // 16px,大字体 +$uni-bg-color: $color-bg; // 背景色 +$uni-bg-color-mask: rgba(0, 0, 0, 0.4); // 遮罩背景色 +$uni-border-color: $color-line; // 边框色 +$uni-text-color: $color-title; // 主文字色 +$uni-text-color-grey: $color-tip; // 灰色文字 +$uni-text-color-placeholder: $color-disabled; // 占位文字色 +$uni-bg-color-hover: $color-line; // hover 背景色 +$uni-color-primary: $base-color; // 主色调 +$uni-color-error: #ff4d4f; // 错误色 +$uni-color-success: #52c41a; // 成功色 +$uni-color-warning: #faad14; // 警告色 +$uni-spacing-row-base: $margin-updown; // 行间距 +$uni-opacity-disabled: 0.6; // 禁用透明度 \ No newline at end of file diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue index 699aa63..6245625 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue @@ -13,7 +13,7 @@ + :style="[fixNvueBug]"> {{selectTimeText}} diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue index e844331..53cd13e 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue @@ -28,7 +28,7 @@ - + - + diff --git a/uni_modules/uni-popup/components/uni-popup/uni-popup.vue b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue index f4fa592..7917cf3 100644 --- a/uni_modules/uni-popup/components/uni-popup/uni-popup.vue +++ b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue @@ -1,5 +1,5 @@