Commit ed09b999 by 肖康

接口调整

parent c2365811
...@@ -5,7 +5,33 @@ ...@@ -5,7 +5,33 @@
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "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" : { "app-plus" : {
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
...@@ -46,9 +72,9 @@ ...@@ -46,9 +72,9 @@
"sdkConfigs" : {} "sdkConfigs" : {}
} }
}, },
/* 快应用特有相关 */
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "", "appid" : "",
"setting" : { "setting" : {
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
</template> </template>
<script> <script>
import { import {
API Ichunt_Api
} from '@/util/api.js'; } from '@/util/api.js';
import bottomNavFixed from '@/components/bottom_nav.vue'; import bottomNavFixed from '@/components/bottom_nav.vue';
export default { export default {
...@@ -205,6 +205,7 @@ ...@@ -205,6 +205,7 @@
onShow() { onShow() {
this.getData(); this.getData();
}, },
onPageScroll(e) { onPageScroll(e) {
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
...@@ -217,14 +218,13 @@ ...@@ -217,14 +218,13 @@
}, },
getData() { getData() {
// this.request(API.getAllowApproveList, 'POST', {}, false).then(res => { this.request(Ichunt_Api+"/api/common/data", 'GET', {},).then(res => {
// if (res.code === 0) { if (res.code === 0) {
// this.login_status = 1;
// this.allowApproveList = res.data; } else if (res.code === 101) {
// } else if (res.code === 101) {
// this.login_status = 0; }
// } });
// });
} }
}, },
components: { 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 = { module.exports = {
API_BASE_URL Ichunt_Api,
Api_Url
} }
...@@ -14,11 +14,9 @@ const request = (url = '', type = 'GET', param = {}, Loading) => { ...@@ -14,11 +14,9 @@ const request = (url = '', type = 'GET', param = {}, Loading) => {
mask: true mask: true
}); });
} }
const header = { let header = {
"Content-Type": "application/json; charset=utf-8", "Content-Type": "application/json; charset=utf-8",
"source": 'pc', "source": 'h5',
"oa-user-id": oa_user_id,
"oa-skey": oa_skey,
}; };
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ 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