Browse Source

chore: 更新manifest.json中的appid并添加getUrl.js工具文件

更新了manifest.json中的appid为__UNI__A764ECB,以匹配最新的应用标识。同时,新增了utils/getUrl.js文件,用于根据当前环境动态获取API地址,提升环境切换的灵活性。
master
前端-胡立永 1 day ago
parent
commit
8a1b16b717
2 changed files with 16 additions and 1 deletions
  1. +1
    -1
      manifest.json
  2. +15
    -0
      utils/getUrl.js

+ 1
- 1
manifest.json View File

@ -1,6 +1,6 @@
{
"name" : "CMDF",
"appid" : "__UNI__6B015BD",
"appid" : "__UNI__A764ECB",
"description" : "猫妈狗爸",
"versionName" : "1.1.0",
"versionCode" : "100",


+ 15
- 0
utils/getUrl.js View File

@ -0,0 +1,15 @@
let current ="develop";
const accountInfo = wx.getAccountInfoSync();
current = accountInfo.miniProgram.envVersion;
const api={
develop:"http://h5.xzaiyp.top",
// develop:"https://api-test.catmdogd.com/test-api",
trial:"https://api-test.catmdogd.com/test-api",
release:"https://api.catmdogd.com/prod-api",
}
const currentUrl = api[current];
export {currentUrl};

Loading…
Cancel
Save