diff --git a/common/api.js b/common/api.js index a5d7a46..c41210d 100644 --- a/common/api.js +++ b/common/api.js @@ -1,11 +1,10 @@ -// appId: 正式 null | 测试 wxb35ef055a4dd8ad4 +// appId: 正式 null | 测试 wxeb58570b5e04d147 export const DEV = "dev"; // dev 测试 | prod 正式 export const VERSION = '1.0.0'; // 版本号 export const DEVURL = 'https://hainan.lanzulive.com'; // 测试服请求地址 // export const DEVURL = 'http://hainan.com'; // 测试服请求地址 export const PRODURL = ''; // 正式服请求地址 - export const API_WXLOGIN = '/api/login'; //登录 diff --git a/common/http.js b/common/http.js index 5bc9f0e..57b7257 100644 --- a/common/http.js +++ b/common/http.js @@ -90,7 +90,12 @@ function $http(url, data = {}, options = {}){ } //商户id - options.appid = 'wxb35ef055a4dd8ad4' + var accountInfo = wx.getAccountInfoSync(); + var autoappid = accountInfo.miniProgram.appId; + + options.appid = autoappid || 'wxeb58570b5e04d147' + + console.log('请求',options.appid) let user_info = uni.getStorageSync('userinfo') let user_token = user_info.token diff --git a/common/uploadFile.js b/common/uploadFile.js index 9c16ddf..85d0d08 100644 --- a/common/uploadFile.js +++ b/common/uploadFile.js @@ -30,12 +30,19 @@ const uploadFile = function (filePath, successc, failc) { let fileTypeIndex = filePath.lastIndexOf('.'); let fileType = filePath.substring(fileTypeIndex); + var accountInfo = wx.getAccountInfoSync(); + var autoappid = accountInfo.miniProgram.appId; + + var uploadappid = autoappid || 'wxeb58570b5e04d147'; + + console.log('上次',uploadappid) + uni.uploadFile({ url: url + url_a,//开发者服务器 url filePath: filePath,//要上传文件资源的路径 name: 'image', header: { - appid: 'wxb35ef055a4dd8ad4', + appid: uploadappid, Authentication: uni.getStorageSync('userinfo').token }, diff --git a/manifest.json b/manifest.json index 0d89d4e..f580220 100644 --- a/manifest.json +++ b/manifest.json @@ -56,7 +56,12 @@ "es6" : false, "postcss" : true }, - "usingComponents" : true + "usingComponents" : true, + "permission" : { + "scope.userLocation" : { + "desc" : "你的位置信息将用于获取对应任务信息" + } + } }, "mp-alipay" : { "usingComponents" : true diff --git a/pages/order/order.vue b/pages/order/order.vue index fcccdb0..324ad41 100644 --- a/pages/order/order.vue +++ b/pages/order/order.vue @@ -71,7 +71,7 @@ isPage: true }, { name: '待付款', - type: 0, + type: '0,1,4', list: [], loadingClass: true, loadingText: '正在加载中', @@ -79,7 +79,7 @@ isPage: true }, { name: '已付款', - type: '1,2,3,5', + type: '2,3,5', list: [], loadingClass: true, loadingText: '正在加载中',