1234567891011121314151617181920212223242526272829303132333435363738 |
- //app.js
- App({
- onLaunch: function () {
- let test = wx.getAccountInfoSync().miniProgram.envVersion;
- if (test !== 'release') { // 非正式环境
- this.baseUrl = "https://bigdata.smcic.net"
- }
- let _this = this;
- wx.showLoading()
- wx.request({
- url: this.baseUrl + '/sys-config',
- success: function (res) {
- wx.hideLoading()
- 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.topic + '_' + d.name] = {
- value: d.value,
- name: d.topic,
- content_desc: d.content_desc
- };
- }
- },
- fail: function (err) {
- wx.showToast({
- title: '请重启小程序',
- icon: "error"
- })
- },
- })
- },
- baseUrl: "https://bigdata.smcic.net",
- introduce: {}
- })
|