1234567891011121314151617181920212223242526272829303132 |
- //app.js
- App({
- onLaunch: function () {
- let test = wx.getAccountInfoSync().miniProgram.envVersion;
- if (test !== 'release') { // 非正式环境
- this.baseUrl = "https://bigdata.smcic.net"
- }
- let _this = this;
- wx.request({
- url: this.baseUrl + '/sys-config',
- success: function (res) {
- if (res.statusCode !== 200) return wx.showToast({
- title: '请重启小程序',
- icon: "error"
- })
- let data = res.data || [];
- for (let i = 0; i < data.length; i++) {
- const d = data[i];
- _this.introduce[d.name] = d.value;
- }
- },
- fail: function (err) {
- wx.showToast({
- title: '请重启小程序',
- icon: "error"
- })
- },
- })
- },
- baseUrl: "https://bigdata.smcic.net",
- introduce: {}
- })
|