baseUrl.js
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import {
getTabbarHeight
} from '@/plugins/utils';
let baseUrl = "";
let imageUrl = ''
if (process.env.NODE_ENV === 'development') {
// 开发环境
baseUrl = 'http://47.99.141.212:8080/api'
// baseUrl = 'http://192.168.10.103:8080/api'
imageUrl='http://192.168.10.103:8080/api'
// baseUrl = 'http://192.168.1.228/fan_php/public/index.php'
} else if (process.env.NODE_ENV === 'production') {
// 生产环境
baseUrl = 'https://api.yichengshi.cn'
imageUrl='http://47.99.141.212:8080/api'
}
let systemInfo = {
...getTabbarHeight(),
// #ifdef MP-ALIPAY
navBarH: uni.getSystemInfoSync().statusBarHeight + uni.getSystemInfoSync().titleBarHeight, //菜单栏总高度--单位px
titleBarHeight: uni.getSystemInfoSync().titleBarHeight, //标题栏高度--单位px
// #endif
// #ifndef MP-ALIPAY
navBarH: uni.getSystemInfoSync().statusBarHeight + 44, //菜单栏总高度--单位px
titleBarHeight: 44, //标题栏高度--单位px
// #endif
};
// 平台
// #ifdef MP-WEIXIN
systemInfo.platform = 'weixin'
// #endif
// #ifdef MP-ALIPAY
systemInfo.platform = 'alipay'
// #endif
// #ifdef MP-TOUTIAO
systemInfo.platform = 'toutiao'
// #endif
// #ifdef APP-PLUS
systemInfo.platform = 'plus'
// #endif
console.log(systemInfo, 'systemInfo')
const courtConfig = {
publicAppId: '', //公众号appId
baseUrl: baseUrl, //域名
imageUrl:imageUrl,//上传图片
systemInfo: systemInfo, //系统信息
mapData: {
key: '', //地图key
sk: '',
},
share: {
title: '基于uview2.0快速开发框架', //分享标题
desc: "基于uview2.0快速开发框架详情", //分享详情
link: "", // 分享链接
imgUrl: "", // 分享图
}
};
export default Object.assign({}, courtConfig);