|
@@ -68,6 +68,7 @@ App({ |
|
@@ -68,6 +68,7 @@ App({ |
68
|
url: '../guide/guide'
|
68
|
url: '../guide/guide'
|
69
|
})
|
69
|
})
|
70
|
}
|
70
|
}
|
|
|
71
|
+ that.configOssUrl()
|
71
|
}
|
72
|
}
|
72
|
},
|
73
|
},
|
73
|
fail: function (res) {
|
74
|
fail: function (res) {
|
|
@@ -92,12 +93,38 @@ App({ |
|
@@ -92,12 +93,38 @@ App({ |
92
|
}
|
93
|
}
|
93
|
},
|
94
|
},
|
94
|
|
95
|
|
|
|
96
|
+ configOssUrl: function () {
|
|
|
97
|
+ wx.showLoading()
|
|
|
98
|
+ var that = this
|
|
|
99
|
+ wx.request({
|
|
|
100
|
+ url: this.globalData.baseUrl + "filemeta/v1/config",
|
|
|
101
|
+ header: {
|
|
|
102
|
+ 'Authorization': this.globalData.Authorization
|
|
|
103
|
+ },
|
|
|
104
|
+ method: 'GET',
|
|
|
105
|
+ success: function (result) {
|
|
|
106
|
+ console.log('获取OSSURL 成功', result.data.app_url)
|
|
|
107
|
+ that.globalData.OSSUrl = result.data.app_url;
|
|
|
108
|
+ },
|
|
|
109
|
+ fail: function (res) {
|
|
|
110
|
+ console.log('获取OSSURL 失败', res)
|
|
|
111
|
+ wx.showToast({
|
|
|
112
|
+ icon: "none",
|
|
|
113
|
+ title: "云存储功能失效,请联系开发人员",
|
|
|
114
|
+ })
|
|
|
115
|
+ },
|
|
|
116
|
+ complete: function () {
|
|
|
117
|
+ wx.hideLoading()
|
|
|
118
|
+ }
|
|
|
119
|
+ })
|
|
|
120
|
+ },
|
|
|
121
|
+
|
95
|
globalData: {
|
122
|
globalData: {
|
96
|
appId: appId,
|
123
|
appId: appId,
|
97
|
onshow_count: 0,
|
124
|
onshow_count: 0,
|
98
|
// baseUrl: "http://47.96.75.229:20000/",
|
125
|
// baseUrl: "http://47.96.75.229:20000/",
|
99
|
baseUrl: "https://api.workai.com.cn/",
|
126
|
baseUrl: "https://api.workai.com.cn/",
|
100
|
- OSSUrl: "https://oss.workai.com.cn/",
|
127
|
+ OSSUrl: "",//"https://oss.workai.com.cn/",
|
101
|
userInfo: null,
|
128
|
userInfo: null,
|
102
|
hasLogin: false,
|
129
|
hasLogin: false,
|
103
|
openid: null,
|
130
|
openid: null,
|