Commit ed09b999 by 肖康

接口调整

parent c2365811
......@@ -5,7 +5,33 @@
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"h5" : {
"devServer" : {
"port" : 8080,
"disableHostCheck" : true,
"proxy" : {
"/apis" : {
"target" : "http://api.liexin.com",
"changeOrigin" : true,
"secure" : true,
"pathRewrite": {"^/apis": ""}
},
"/v3" : {
"target" : "http://www.liexin.com",
"changeOrigin" : true,
"secure" : true,
"pathRewrite": {"^/v3": ""}
}
}
},
"optimization" : {
"treeShaking" : {
"enable" : false
}
}
},
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
......@@ -46,9 +72,9 @@
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
......
......@@ -171,7 +171,7 @@
</template>
<script>
import {
API
Ichunt_Api
} from '@/util/api.js';
import bottomNavFixed from '@/components/bottom_nav.vue';
export default {
......@@ -205,6 +205,7 @@
onShow() {
this.getData();
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
......@@ -217,14 +218,13 @@
},
getData() {
// this.request(API.getAllowApproveList, 'POST', {}, false).then(res => {
// if (res.code === 0) {
// this.login_status = 1;
// this.allowApproveList = res.data;
// } else if (res.code === 101) {
// this.login_status = 0;
// }
// });
this.request(Ichunt_Api+"/api/common/data", 'GET', {},).then(res => {
if (res.code === 0) {
} else if (res.code === 101) {
}
});
}
},
components: {
......
const API_BASE_URL = 'https://user.ichunt.net'; //用户系统
let Ichunt_Api = ''; //3.0网站接口
let Api_Url = '';//api项目url
switch (window.location.hostname) {
case "m.ichunt.com":
Ichunt_Api = 'https://www.ichunt.com/v3';
Api_Url="https://api.ichunt.com"
break;
default:
//本地proxy配置参考vue.config.js
Ichunt_Api = '/v3'
Api_Url= '/apis';
}
module.exports = {
API_BASE_URL
Ichunt_Api,
Api_Url
}
......@@ -14,11 +14,9 @@ const request = (url = '', type = 'GET', param = {}, Loading) => {
mask: true
});
}
const header = {
let header = {
"Content-Type": "application/json; charset=utf-8",
"source": 'pc',
"oa-user-id": oa_user_id,
"oa-skey": oa_skey,
"source": 'h5',
};
return new Promise((resolve, reject) => {
uni.request({
......
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 sign in to comment