30 lines
793 B
JavaScript
30 lines
793 B
JavaScript
|
|
const accountInfo = wx.getAccountInfoSync();
|
|
const appid = accountInfo.miniProgram.appId
|
|
uni.setStorageSync('appid', appid)
|
|
let host = ""
|
|
if (process.env.NODE_ENV === 'development') {
|
|
console.log("开发环境")
|
|
// host = "https://ttybapi.pcxbc.com"
|
|
host = "https://ttybapi.pcxbc.com"
|
|
} else {
|
|
console.log("生产环境")
|
|
host = "https://ybapi.pcxbc.com"
|
|
}
|
|
// // 设备管理
|
|
// let baseUrl = {}
|
|
// if (appid === 'wx3e83b37ba682faf5') {
|
|
// console.log("每日一称儿童")
|
|
// baseUrl.adult = "wxd230a93791c03259"
|
|
// baseUrl.device = "wx6f48cc32c5c0a4a2"
|
|
// } else if (appid === 'wx44df5e42ddf16203') {
|
|
// console.log("小秤匠")
|
|
// baseUrl.adult = "wx39cf431caa22b5c8"
|
|
// baseUrl.device = "wx6f48cc32c5c0a4a2"
|
|
// }
|
|
console.log("appid", appid)
|
|
module.exports = {
|
|
appid,
|
|
host
|
|
};
|