chore: 配置更新

This commit is contained in:
2025-10-30 09:17:54 +08:00
parent 19ba4856a4
commit 66bf2504e0
5 changed files with 197 additions and 192 deletions

View File

@@ -6,7 +6,7 @@ try {
baseUrl: site.baseUrl, baseUrl: site.baseUrl,
imgDomain: site.baseUrl, imgDomain: site.baseUrl,
h5Domain: site.baseUrl, h5Domain: site.baseUrl,
uniacid: site.uniacid, //825 uniacid: site.uniacid,
} }
} }
} catch (e) {} } catch (e) {}
@@ -14,7 +14,7 @@ try {
// 调试版本,配置说明 // 调试版本,配置说明
const devCfg = { const devCfg = {
// 商户ID // 商户ID
uniacid: 305, //825 uniacid: 460, //825
//api请求地址 //api请求地址
baseUrl: 'https://xcx30.5g-quickapp.com/', baseUrl: 'https://xcx30.5g-quickapp.com/',

View File

@@ -58,7 +58,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx9377ddae89263145", "appid" : "wx29215aa1bd97bbd6",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"postcss" : false, "postcss" : false,

View File

@@ -1,75 +1,75 @@
{ {
"description": "项目配置文件", "description": "项目配置文件",
"packOptions": { "packOptions": {
"ignore": [] "ignore": []
}, },
"setting": { "setting": {
"urlCheck": true, "urlCheck": true,
"es6": true, "es6": true,
"enhance": false, "enhance": false,
"postcss": true, "postcss": true,
"preloadBackgroundData": false, "preloadBackgroundData": false,
"minified": true, "minified": true,
"newFeature": false, "newFeature": false,
"coverView": true, "coverView": true,
"nodeModules": false, "nodeModules": false,
"autoAudits": false, "autoAudits": false,
"showShadowRootInWxmlPanel": true, "showShadowRootInWxmlPanel": true,
"scopeDataCheck": false, "scopeDataCheck": false,
"uglifyFileName": false, "uglifyFileName": false,
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": true, "useMultiFrameRuntime": true,
"useApiHook": true, "useApiHook": true,
"useApiHostProcess": true, "useApiHostProcess": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"enableEngineNative": false, "enableEngineNative": false,
"bundle": false, "bundle": false,
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": true, "useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"minifyWXSS": true "minifyWXSS": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.16.1", "libVersion": "2.16.1",
"appid": "wx59e6ba6050bbe7bc", "appid": "wx29215aa1bd97bbd6",
"projectname": "niushop_b2c_v4_uniapp", "projectname": "niushop_b2c_v4_uniapp",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
}, },
"scripts": {}, "scripts": {},
"staticServerOptions": { "staticServerOptions": {
"baseURL": "", "baseURL": "",
"servePath": "" "servePath": ""
}, },
"isGameTourist": false, "isGameTourist": false,
"condition": { "condition": {
"search": { "search": {
"list": [] "list": []
}, },
"conversation": { "conversation": {
"list": [] "list": []
}, },
"game": { "game": {
"list": [] "list": []
}, },
"plugin": { "plugin": {
"list": [] "list": []
}, },
"gamePlugin": { "gamePlugin": {
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"list": [] "list": []
} }
} }
} }

229
readme.md
View File

@@ -1,113 +1,118 @@
# 小程序及快应用前端源码 # 小程序及快应用前端源码
来源于外包提供的源代码,"0731xcx20微信小程序(1).zip" 来源于外包提供的源代码,"0731xcx20微信小程序(1).zip"
## 项目说明 ## 项目说明
该项目基于 uniapp 开发构建,请使用(HBuilderX)[https://www.dcloud.io/hbuilderx.html] 进行代码开发及构建发布。 该项目基于 uniapp 开发构建,请使用(HBuilderX)[https://www.dcloud.io/hbuilderx.html] 进行代码开发及构建发布。
## 开发说明 ## 开发说明
1. 源码基于Vue2版本scss采用node-sass进行编译输出。 1. 源码基于Vue2版本scss采用node-sass进行编译输出。
## 开发调试说明 ## 开发调试说明
### 注意点 ### 注意点
应用访问等关键参数的配置来源于 `./common/js/config.js` 应用访问等关键参数的配置来源于 `./common/js/config.js`
### 小程序调试 ### 小程序调试
## 发布说明 ## 发布说明
### 小程序发布 ### 小程序发布
基本操作步骤: 基本操作步骤:
1. 使用HBuilderX打开项目 1. 使用HBuilderX打开项目
2. 选择菜单栏 "发行" -> "小程序-微信",进行发布构建 2. 选择菜单栏 "发行" -> "小程序-微信",进行发布构建
3. 使用微信开发者工具打开发布后的代码进行上传发布 3. 使用微信开发者工具打开发布后的代码进行上传发布
参照:`common\js\config.js` 文件内容说明: 参照:`common\js\config.js` 文件内容说明:
```js ```js
// 发行版本,配置说明 // 发行版本,配置说明
const releaseCfg = { let releaseCfg = undefined;
baseUrl: site.baseUrl, try {
imgDomain: site.baseUrl, if (site) {
h5Domain: site.baseUrl, releaseCfg = {
uniacid: site.uniacid, //825 baseUrl: site.baseUrl,
}; imgDomain: site.baseUrl,
h5Domain: site.baseUrl,
// 调试版本,配置说明 uniacid: site.uniacid,
const devCfg = { }
// 商户ID }
uniacid: 305, //825 } catch (e) {}
//api请求地址 // 调试版本,配置说明
baseUrl: 'https://xcx30.5g-quickapp.com/', const devCfg = {
// 商户ID
// 图片域名 uniacid: 460, //825
imgDomain: 'https://xcx30.5g-quickapp.com/',
//api请求地址
// H5端域名 baseUrl: 'https://xcx30.5g-quickapp.com/',
h5Domain: 'https://xcx30.5g-quickapp.com/',
// 图片域名
// // api请求地址 imgDomain: 'https://xcx30.5g-quickapp.com/',
// baseUrl: 'https://tsaas.liveplatform.cn/',
// H5端域名
// // 图片域名 h5Domain: 'https://xcx30.5g-quickapp.com/',
// imgDomain: 'https://tsaas.liveplatform.cn/',
// // api请求地址
// // H5端域名 // baseUrl: 'https://tsaas.liveplatform.cn/',
// h5Domain: 'https://tsaas.liveplatform.cn/',
// // 图片域名
// api请求地址 // imgDomain: 'https://tsaas.liveplatform.cn/',
// baseUrl: 'http://saas.cn/',
// // H5端域名
// // 图片域名 // h5Domain: 'https://tsaas.liveplatform.cn/',
// imgDomain: 'http://saas.cn/',
// api请求地址
// // H5端域名 // baseUrl: 'http://saas.cn/',
// h5Domain: 'http://saas.cn/',
}; // // 图片域名
// imgDomain: 'http://saas.cn/',
export default { // // H5端域名
/** // h5Domain: 'http://saas.cn/',
* 1.开发调试模式 };
* 去掉注释 ...devCfg;
* 注释掉 ...releaseCfg, var config = {
* 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候, /**
* 注释掉 ...devCfg; * 1.开发调试模式
* 去掉注释 ...releaseCfg, * 去掉注释 ...devCfg;
* 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分 * 注释掉 ...releaseCfg,
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面 * 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候,
*/ * 注释掉 ...devCfg;
...devCfg, * 去掉注释 ...releaseCfg,
// ...releaseCfg, * 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面
*/
// 腾讯地图key ...(releaseCfg ?? devCfg),
mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4',
//客服地址 // 腾讯地图key
webSocket: '{{$webSocket}}', mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4',
//本地端主动给服务器ping的时间, 0 则不开启 , 单位秒 //客服地址
pingInterval: 1500, webSocket: '{{$webSocket}}',
// 版本号 //本地端主动给服务器ping的时间, 0 则不开启 , 单位秒
version: '1.0' pingInterval: 1500,
};
``` // 版本号
version: '1.0'
};
### 快应用发布
1. 使用HBuilderX打开项目 export default config;
2. 选择菜单栏 "发行" -> "快应用",进行发布构建 ```
### 快应用发布
1. 使用HBuilderX打开项目
2. 选择菜单栏 "发行" -> "快应用",进行发布构建
3. 使用快应用开发者工具打开发布后的代码进行上传发布 3. 使用快应用开发者工具打开发布后的代码进行上传发布

View File

@@ -1,4 +1,4 @@
module.exports = { module.exports = {
baseUrl: "https://xcx30.5g-quickapp.com/",//修改域名 baseUrl: "https://xcx30.5g-quickapp.com/",//修改域名
uniacid: 305,//后台对应uniacid uniacid: 460,//后台对应uniacid
}; };