1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <script>
- export default {
- onLaunch: function() {
- let BASE_URL = "";
- var env ='';
- // let res = uni.getStorageSync('env')
- let res = '1'
- switch(res){
- case '1': //dev
- BASE_URL = 'http://192.168.4.212:8866' // 开发环境
- env = 'dev'
- break;
- case '2': //test
- BASE_URL = 'http://192.168.4.212:8866'
- env = 'test'
- break;
- case '3'://test2
- BASE_URL = 'http://gatewaytest1.elab-plus.com'
- env = 'test2'
- break;
- case '4'://test3
- BASE_URL = 'https://gatewaytest3.skyforestcity.com'
- env = 'test3'
- break;
- case '5'://test4
- BASE_URL = 'https://gatewaytest4.skyforestcity.com'
- env = 'test4'
- break;
- case '6'://uat3
- BASE_URL = "https://api-uat3.elaber.cn"
- env = 'uat3'
- break;
- case '7': //uat
- BASE_URL = "https://api-uat.elaber.cn"
- env = 'uat'
- break;
- case '8': // 线上 product
- default:
- BASE_URL = "https://dm-api.elab-plus.cn"
- env = 'production'
- break;
- }
- this.globalData.BASE_URL = BASE_URL;
- this.globalData.env = env;
-
- let plat = uni.getSystemInfoSync().platform;
- this.globalData.platform = plat
- let userInfo = uni.getStorageSync('userInfo');//获得保存在本地的用户信息
- },
- onShow: function() {
- document.body.style.setProperty("background-color",this.globalData.color4)
- },
- onHide: function() {
- },
- methods: {
- getThemeInfo() {
-
- }
- },
- globalData: {
- token: "",
- color1: "#F07423",
- color2: "#FD8F3C",
- color3: "#FFC444",
- color4: "#F5F5F7",
- color5: "#F7A98E",
- color6: "#FFF4EB",
- color7:"#F8BA91",
- color8:"#FFF4EB",
- color9:"#8B654D",
- color10:"#FCF6F1",
- BASE_URL:"https://dm-api.elab-plus.cn",//默认环境
- }
- }
- </script>
- <style>
-
- </style>
|