diff --git a/main.js b/main.js index 446658b..2424365 100644 --- a/main.js +++ b/main.js @@ -8,6 +8,7 @@ Vue.config.productionTip = false App.mpType = 'app' import api from '@/api/index.js' Vue.prototype.$api = api +Vue.prototype.ymurl = 'https://bodybuilding.bsdong.cn' const app = new Vue({ ...App }) diff --git a/pages/face/face.vue b/pages/face/face.vue index 0075479..97a78a4 100644 --- a/pages/face/face.vue +++ b/pages/face/face.vue @@ -52,7 +52,7 @@ // this.$refs.popup.close('center') // var tjlist=[...this.yrenlianlist,...this.jqrllist] uni.uploadFile({ - url: 'https://bodybuilding.bsdong.cn/api/uploadFile', + url: this.ymurl+'/api/uploadFile', filePath:this.path, name: 'file', formData: { diff --git a/pages/login/login.vue b/pages/login/login.vue index c51c478..733be66 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -73,7 +73,7 @@ console.log(123, e); if (e.detail.errMsg == 'getPhoneNumber:ok') { uni.request({ - url: 'https://bodybuilding.bsdong.cn/api/wxMinLogin', + url:this.ymurl+'/api/wxMinLogin', method: 'post', data: { code: this.wxcode, diff --git a/pages/user/portrait/portrait.vue b/pages/user/portrait/portrait.vue index 87b56ac..a893aa7 100644 --- a/pages/user/portrait/portrait.vue +++ b/pages/user/portrait/portrait.vue @@ -86,7 +86,7 @@ //获取图片临时路径 const imgUrl = tempFilePaths[0] uni.uploadFile({ - url: 'https://bodybuilding.njrenzhou.cn/api/uploadFile', + url: this.ymurl+'/api/uploadFile', filePath: imgUrl, name: 'file', formData: {