正在显示
3 个修改的文件
包含
32 行增加
和
2 行删除
... | ... | @@ -68,6 +68,7 @@ App({ |
68 | 68 | url: '../guide/guide' |
69 | 69 | }) |
70 | 70 | } |
71 | + that.configOssUrl() | |
71 | 72 | } |
72 | 73 | }, |
73 | 74 | fail: function (res) { |
... | ... | @@ -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 | 122 | globalData: { |
96 | 123 | appId: appId, |
97 | 124 | onshow_count: 0, |
98 | 125 | // baseUrl: "http://47.96.75.229:20000/", |
99 | 126 | baseUrl: "https://api.workai.com.cn/", |
100 | - OSSUrl: "https://oss.workai.com.cn/", | |
127 | + OSSUrl: "",//"https://oss.workai.com.cn/", | |
101 | 128 | userInfo: null, |
102 | 129 | hasLogin: false, |
103 | 130 | openid: null, | ... | ... |
请
注册
或
登录
后发表评论