Skip to content

Commit

Permalink
Fixed Upload File Request Head
Browse files Browse the repository at this point in the history
  • Loading branch information
zhrrobert committed May 7, 2024
1 parent 7183617 commit 1597cb9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ util.md5 = function(str) {
@params querystring 格式为 {参数名1 : 值1, 参数名2 : 值2}
*/
util.url = function(action, querystring) {
var url = app.siteInfo.siteroot + '?i=' + app.siteInfo.uniacid + '&t=' + app.siteInfo.multiid + '&v=' + app.siteInfo.version + '&from=wxapp&';

var url = app.siteInfo.siteroot + '?from=wxapp&';
if (action) {
action = action.split('/');
if (action[0]) {
Expand Down Expand Up @@ -205,14 +204,11 @@ util.request = function(option) {
wx.request({
'url': url,
'data': option.data ? option.data : {},
'header': option.header ? option.header : {},
'method': option.method ? option.method : 'GET',
'header': {
'content-type': 'application/x-www-form-urlencoded'
},
'success': function(response) {
//wx.hideNavigationBarLoading();
//wx.hideLoading();
if (response.data.errno) {
if (response.data.errno == '41009') {
wx.setStorageSync('userInfo', '');
Expand Down

0 comments on commit 1597cb9

Please sign in to comment.