From 66bf2504e0acd655bbb8c5a9ad838cc5754af16c Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 30 Oct 2025 09:17:54 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=85=8D=E7=BD=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/config.js | 4 +- manifest.json | 2 +- project.config.json | 148 ++++++++++++++-------------- readme.md | 229 ++++++++++++++++++++++---------------------- site.js | 6 +- 5 files changed, 197 insertions(+), 192 deletions(-) diff --git a/common/js/config.js b/common/js/config.js index d724d7b..34cf4cd 100644 --- a/common/js/config.js +++ b/common/js/config.js @@ -6,7 +6,7 @@ try { baseUrl: site.baseUrl, imgDomain: site.baseUrl, h5Domain: site.baseUrl, - uniacid: site.uniacid, //825 + uniacid: site.uniacid, } } } catch (e) {} @@ -14,7 +14,7 @@ try { // 调试版本,配置说明 const devCfg = { // 商户ID - uniacid: 305, //825 + uniacid: 460, //825 //api请求地址 baseUrl: 'https://xcx30.5g-quickapp.com/', diff --git a/manifest.json b/manifest.json index c2bd4a8..4dfa6d4 100644 --- a/manifest.json +++ b/manifest.json @@ -58,7 +58,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wx9377ddae89263145", + "appid" : "wx29215aa1bd97bbd6", "setting" : { "urlCheck" : false, "postcss" : false, diff --git a/project.config.json b/project.config.json index 30988dd..14f0be7 100644 --- a/project.config.json +++ b/project.config.json @@ -1,75 +1,75 @@ -{ - "description": "项目配置文件", - "packOptions": { - "ignore": [] - }, - "setting": { - "urlCheck": true, - "es6": true, - "enhance": false, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "enableEngineNative": false, - "bundle": false, - "useIsolateContext": true, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true - }, - "compileType": "miniprogram", - "libVersion": "2.16.1", - "appid": "wx59e6ba6050bbe7bc", - "projectname": "niushop_b2c_v4_uniapp", - "debugOptions": { - "hidedInDevtools": [] - }, - "scripts": {}, - "staticServerOptions": { - "baseURL": "", - "servePath": "" - }, - "isGameTourist": false, - "condition": { - "search": { - "list": [] - }, - "conversation": { - "list": [] - }, - "game": { - "list": [] - }, - "plugin": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, - "miniprogram": { - "list": [] - } - } +{ + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": true, + "es6": true, + "enhance": false, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "enableEngineNative": false, + "bundle": false, + "useIsolateContext": true, + "useCompilerModule": true, + "userConfirmedUseCompilerModuleSwitch": false, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true + }, + "compileType": "miniprogram", + "libVersion": "2.16.1", + "appid": "wx29215aa1bd97bbd6", + "projectname": "niushop_b2c_v4_uniapp", + "debugOptions": { + "hidedInDevtools": [] + }, + "scripts": {}, + "staticServerOptions": { + "baseURL": "", + "servePath": "" + }, + "isGameTourist": false, + "condition": { + "search": { + "list": [] + }, + "conversation": { + "list": [] + }, + "game": { + "list": [] + }, + "plugin": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [] + } + } } \ No newline at end of file diff --git a/readme.md b/readme.md index 0b5df8d..ab0ceee 100644 --- a/readme.md +++ b/readme.md @@ -1,113 +1,118 @@ -# 小程序及快应用前端源码 - -来源于外包提供的源代码,"0731xcx20微信小程序(1).zip" - - -## 项目说明 - -该项目基于 uniapp 开发构建,请使用(HBuilderX)[https://www.dcloud.io/hbuilderx.html] 进行代码开发及构建发布。 - -## 开发说明 - -1. 源码基于Vue2版本,scss采用node-sass进行编译输出。 - - -## 开发调试说明 - -### 注意点 - -应用访问等关键参数的配置来源于 `./common/js/config.js` - -### 小程序调试 - - - -## 发布说明 - -### 小程序发布 - -基本操作步骤: - -1. 使用HBuilderX打开项目 -2. 选择菜单栏 "发行" -> "小程序-微信",进行发布构建 -3. 使用微信开发者工具打开发布后的代码进行上传发布 - -参照:`common\js\config.js` 文件内容说明: - -```js -// 发行版本,配置说明 -const releaseCfg = { - baseUrl: site.baseUrl, - imgDomain: site.baseUrl, - h5Domain: site.baseUrl, - uniacid: site.uniacid, //825 -}; - -// 调试版本,配置说明 -const devCfg = { - // 商户ID - uniacid: 305, //825 - - //api请求地址 - baseUrl: 'https://xcx30.5g-quickapp.com/', - - // 图片域名 - imgDomain: 'https://xcx30.5g-quickapp.com/', - - // H5端域名 - h5Domain: 'https://xcx30.5g-quickapp.com/', - - // // api请求地址 - // baseUrl: 'https://tsaas.liveplatform.cn/', - - // // 图片域名 - // imgDomain: 'https://tsaas.liveplatform.cn/', - - // // H5端域名 - // h5Domain: 'https://tsaas.liveplatform.cn/', - - // api请求地址 - // baseUrl: 'http://saas.cn/', - - // // 图片域名 - // imgDomain: 'http://saas.cn/', - - // // H5端域名 - // h5Domain: 'http://saas.cn/', -}; - - -export default { - /** - * 1.开发调试模式 - * 去掉注释 ...devCfg; - * 注释掉 ...releaseCfg, - * 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候, - * 注释掉 ...devCfg; - * 去掉注释 ...releaseCfg, - * 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分 - * 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面 - */ - ...devCfg, - // ...releaseCfg, - - - // 腾讯地图key - mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4', - - //客服地址 - webSocket: '{{$webSocket}}', - - //本地端主动给服务器ping的时间, 0 则不开启 , 单位秒 - pingInterval: 1500, - - // 版本号 - version: '1.0' -}; -``` - - -### 快应用发布 -1. 使用HBuilderX打开项目 -2. 选择菜单栏 "发行" -> "快应用",进行发布构建 +# 小程序及快应用前端源码 + +来源于外包提供的源代码,"0731xcx20微信小程序(1).zip" + + +## 项目说明 + +该项目基于 uniapp 开发构建,请使用(HBuilderX)[https://www.dcloud.io/hbuilderx.html] 进行代码开发及构建发布。 + +## 开发说明 + +1. 源码基于Vue2版本,scss采用node-sass进行编译输出。 + + +## 开发调试说明 + +### 注意点 + +应用访问等关键参数的配置来源于 `./common/js/config.js` + +### 小程序调试 + + + +## 发布说明 + +### 小程序发布 + +基本操作步骤: + +1. 使用HBuilderX打开项目 +2. 选择菜单栏 "发行" -> "小程序-微信",进行发布构建 +3. 使用微信开发者工具打开发布后的代码进行上传发布 + +参照:`common\js\config.js` 文件内容说明: + +```js +// 发行版本,配置说明 +let releaseCfg = undefined; +try { + if (site) { + releaseCfg = { + baseUrl: site.baseUrl, + imgDomain: site.baseUrl, + h5Domain: site.baseUrl, + uniacid: site.uniacid, + } + } +} catch (e) {} + +// 调试版本,配置说明 +const devCfg = { + // 商户ID + uniacid: 460, //825 + + //api请求地址 + baseUrl: 'https://xcx30.5g-quickapp.com/', + + // 图片域名 + imgDomain: 'https://xcx30.5g-quickapp.com/', + + // H5端域名 + h5Domain: 'https://xcx30.5g-quickapp.com/', + + // // api请求地址 + // baseUrl: 'https://tsaas.liveplatform.cn/', + + // // 图片域名 + // imgDomain: 'https://tsaas.liveplatform.cn/', + + // // H5端域名 + // h5Domain: 'https://tsaas.liveplatform.cn/', + + // api请求地址 + // baseUrl: 'http://saas.cn/', + + // // 图片域名 + // imgDomain: 'http://saas.cn/', + + // // H5端域名 + // h5Domain: 'http://saas.cn/', +}; + +var config = { + /** + * 1.开发调试模式 + * 去掉注释 ...devCfg; + * 注释掉 ...releaseCfg, + * 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候, + * 注释掉 ...devCfg; + * 去掉注释 ...releaseCfg, + * 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分 + * 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面 + */ + ...(releaseCfg ?? devCfg), + + + // 腾讯地图key + mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4', + + //客服地址 + webSocket: '{{$webSocket}}', + + //本地端主动给服务器ping的时间, 0 则不开启 , 单位秒 + pingInterval: 1500, + + // 版本号 + version: '1.0' +}; + +export default config; +``` + + +### 快应用发布 +1. 使用HBuilderX打开项目 +2. 选择菜单栏 "发行" -> "快应用",进行发布构建 3. 使用快应用开发者工具打开发布后的代码进行上传发布 \ No newline at end of file diff --git a/site.js b/site.js index 300922f..dbbeb00 100644 --- a/site.js +++ b/site.js @@ -1,4 +1,4 @@ -module.exports = { - baseUrl: "https://xcx30.5g-quickapp.com/",//修改域名 - uniacid: 305,//后台对应uniacid +module.exports = { + baseUrl: "https://xcx30.5g-quickapp.com/",//修改域名 + uniacid: 460,//后台对应uniacid }; \ No newline at end of file