fea: 环境可配置项
This commit is contained in:
@@ -1,16 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="mild-shopping">
|
<view class="mild-shopping">
|
||||||
<web-view
|
<web-view
|
||||||
ref="webview"
|
ref="webview"
|
||||||
:webview-styles="webviewStyles"
|
:webview-styles="webviewStyles"
|
||||||
:src="webviewUrl"
|
:src="webviewUrl"
|
||||||
@message="handlePostMessage"
|
@message="handlePostMessage"
|
||||||
@onPostMessage="handlePostMessage"
|
@onPostMessage="handlePostMessage"
|
||||||
></web-view></view>
|
></web-view
|
||||||
|
></view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TOKEN_NAME, USER_DATA, getStorageFun } from "@/utils/auth.js";
|
import { TOKEN_NAME, USER_DATA, getStorageFun } from "@/utils/auth.js";
|
||||||
|
import { MILD_BASE_URL } from "@/utils/config.js";
|
||||||
// 全局变量
|
// 全局变量
|
||||||
let wv; // 计划创建的webview
|
let wv; // 计划创建的webview
|
||||||
|
|
||||||
@@ -23,14 +25,16 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
wvNode: null,
|
wvNode: null,
|
||||||
// webviewUrl:'https://agent.o.tbmall.xin/',//中台测试
|
webviewUrl: "",
|
||||||
webviewUrl:'https://agent.tbmall.xin',
|
// webviewUrl:'https://agent.o.tbmall.xin/',//中台测试
|
||||||
|
// webviewUrl:'https://agent.tbmall.xin',
|
||||||
// webviewUrl: "http://192.168.1.29:8004/",
|
// webviewUrl: "http://192.168.1.29:8004/",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
|
this.webviewUrl = MILD_BASE_URL;
|
||||||
this.initWebview();
|
this.initWebview();
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
@@ -43,7 +47,7 @@ export default {
|
|||||||
const currentWebview = this.$scope.$getAppWebview();
|
const currentWebview = this.$scope.$getAppWebview();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wv = currentWebview.children()[0];
|
wv = currentWebview.children()[0];
|
||||||
console.log(
|
console.log(
|
||||||
"TOKEN_NAME-1",
|
"TOKEN_NAME-1",
|
||||||
getStorageFun(TOKEN_NAME),
|
getStorageFun(TOKEN_NAME),
|
||||||
getStorageFun(USER_DATA)
|
getStorageFun(USER_DATA)
|
||||||
@@ -112,7 +116,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.mild-shopping{
|
.mild-shopping {
|
||||||
padding-top: var(--status-bar-height);
|
padding-top: var(--status-bar-height);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+7
-3
@@ -1,9 +1,13 @@
|
|||||||
// export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境
|
// export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境
|
||||||
// export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境
|
// export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境
|
||||||
|
|
||||||
export const BASE_URL = "https://api.tbmall.xin"; //生产
|
|
||||||
// export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试
|
// export const BASE_URL = "https://api.tbmall.xin"; //生产
|
||||||
// export const BASE_URL ='https://api.o.tbmall.xin'; // 本地测试
|
// export const MILD_BASE_URL = "https://agent.tbmall.xin/"; //中台生产
|
||||||
|
|
||||||
|
export const BASE_URL ='https://api.o.tbmall.xin'; // 本地测试
|
||||||
|
export const MILD_BASE_URL = "https://agent.o.tbmall.xin/"; //中台测试
|
||||||
|
|
||||||
|
|
||||||
export const SHARE_URL = 'https://h.tbmall.xin';
|
export const SHARE_URL = 'https://h.tbmall.xin';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user