diff --git a/pages/mine/reception/addreception.vue b/pages/mine/reception/addreception.vue index 171def5..4852c86 100644 --- a/pages/mine/reception/addreception.vue +++ b/pages/mine/reception/addreception.vue @@ -54,21 +54,25 @@ - 顾问 - - - 接待顾问 - - - {{text}} - 请选择接待顾问 - - - + + + 确定 @@ -126,6 +130,11 @@ fdFlag:null }; }, + + computed: { + + }, + onShow() { this.parames.projectId = uni.getStorageSync('buildingID').id; console.log(this.$u) diff --git a/utils/domain.js b/utils/domain.js index 656f1a7..4c3a409 100644 --- a/utils/domain.js +++ b/utils/domain.js @@ -1,8 +1,8 @@ // http.js使用域名 -const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试 +// const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试 // const baseUrl = 'http://192.168.31.211:8080/api';// 泽明 // const baseUrl = 'http://localhost:8080/autoSR/api'; // 本地 -// const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙 +const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙 // const baseUrl = 'http://192.168.31.86:9090/api'; // 盛浩 // const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式 // const baseUrl = 'https://hfju.com/api'; // 数智正式 diff --git a/utils/http.js b/utils/http.js index d61de6b..5babc8b 100644 --- a/utils/http.js +++ b/utils/http.js @@ -1,5 +1,6 @@ - -import { baseUrl } from './domain.js' +import { + baseUrl +} from './domain.js' const install = (Vue, vm) => { Vue.prototype.$u.http.setConfig({ @@ -7,44 +8,44 @@ const install = (Vue, vm) => { loadingText: '加载中~', loadingTime: 800, }); - // 请求拦截,如果有token,携带token - Vue.prototype.$u.http.interceptor.request = (config) => { - const token = uni.getStorageSync('weapp_session_login_data'); - if(token){ - config.header['Access-Token'] = token.token; - } - return config - } - // 响应拦截,公共错误处理 - Vue.prototype.$u.http.interceptor.response = (res) => { - if(res.code == 10000) { - return res.data; - }else if(res.code == 10003 || res.code == 20006){ - uni.hideToast(); - uni.showToast({ - icon:"none", - title:"您的登录已失效,请重新登录", - duration: 2000 - }) - uni.clearStorageSync(); - setTimeout(function () { - uni.reLaunch({ - url: '/pages/login/index' - }); - },2000); - return false; - }else{ - uni.hideLoading(); - uni.showToast({ - icon:"none", - title:res.message, - duration: 3000 - }) - return false; - } - } + // 请求拦截,如果有token,携带token + Vue.prototype.$u.http.interceptor.request = (config) => { + const token = uni.getStorageSync('weapp_session_login_data'); + if (token) { + config.header['Access-Token'] = token.token; + } + return config + } + // 响应拦截,公共错误处理 + Vue.prototype.$u.http.interceptor.response = (res) => { + if (res.code == 10000) { + return res.data; + } else if (res.code == 10003 || res.code == 20006) { + uni.hideToast(); + uni.showToast({ + icon: "none", + title: "您的登录已失效,请重新登录", + duration: 2000 + }) + uni.clearStorageSync(); + setTimeout(function() { + uni.reLaunch({ + url: '/pages/login/index' + }); + }, 2000); + return false; + } else { + uni.hideLoading(); + uni.showToast({ + icon: "none", + title: res.message, + duration: 3000 + }) + return false; + } + } } export default { install -} \ No newline at end of file +}