Commit 0d9b6ba6 authored by liwei's avatar liwei

修改了配置文件

parent 70c149da
// 应用全局配置
module.exports = {
baseUrl: 'http://localhost:8082'
}
// module.exports = {
// devServer: {
// proxy: {
// '/wxmapi': {
// // target: 'http://192.168.1.47:8082',
// target: 'http://localhost:8082',
// // target: 'https://www.wxmblog.com/wxmapi',
// changeOrigin: true,
// pathRewrite: {
// '^/wxmapi': ''
// }
// }
// },
// }
// }
...@@ -16,13 +16,12 @@ import { ...@@ -16,13 +16,12 @@ import {
request, request,
BASE_URL, BASE_URL,
getId, getId,
AMAPKEY
} from 'util/api.js'; } from 'util/api.js';
Vue.prototype.$myRequest = request; // 接口请求 Vue.prototype.$myRequest = request; // 接口请求
Vue.prototype.$BASE_URL = BASE_URL;//正式接口 Vue.prototype.$BASE_URL = BASE_URL;//正式接口
Vue.prototype.$getId = getId; // 获取缓存用户信息 Vue.prototype.$getId = getId; // 获取缓存用户信息
Vue.prototype.$AMAPKEY = AMAPKEY; // 定位key
// 导入并挂载全局的分享方法 // 导入并挂载全局的分享方法
import share from '@/common/share.js' import share from '@/common/share.js'
......
import config from '@/config'
// #ifdef H5 // #ifdef H5
// export const BASE_URL = `${location.protocol}//${location.host}/wxmapi` // export const BASE_URL = `${location.protocol}//${location.host}/wxmapi`
// #endif // #endif
// #ifndef H5 // #ifndef H5
// 请求接口 // 请求接口
//export const BASE_URL = 'https://www.wxmblog.com/wxmapi'; //正式接口 //export const BASE_URL = 'https://www.wxmblog.com/wxmapi'; //正式接口
export const BASE_URL = 'http://localhost:8092'; //本地接口 export const BASE_URL = config.baseUrl;
// #endif // #endif
// #ifdef MP-WEIXIN
export const AMAPKEY = '7528e756feaebfabd1abbb1b04097a1e'; //高德定位小程序
// #endif
// #ifdef APP-PLUS
export const AMAPKEY = 'cdd98f785c3d27a17bf4d7022783ede9'; //高德定位APP
// #endif
export const request = (options) => { export const request = (options) => {
...@@ -64,19 +58,3 @@ export const request = (options) => { ...@@ -64,19 +58,3 @@ export const request = (options) => {
}); });
}); });
}; };
//登录判断
export const getId = () => {
return new Promise((resolve, reject) => {
uni.getStorage({
key: 'info',
success: (res) => {
console.log(res, "登录成功");
resolve(200);
},
fail: (err) => {
console.log(err, '登录失败');
resolve(11003);
}
});
})
}
module.exports = {
devServer: {
proxy: {
'/wxmapi': {
target: 'http://localhost:8092',
// target: 'https://www.wxmblog.com/wxmapi',
changeOrigin: true,
pathRewrite: {
'^/wxmapi': ''
}
}
},
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment