common.go
1.6 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
package constant
import (
"os"
"strconv"
)
const SERVICE_NAME = "partner"
var SERVICE_RUNMOD = "dev"
var LOG_LEVEL = "debug"
var LOG_File = "logs/app.log"
var LOG_PREFIX = "[partner_dev]"
var MMM_SMS_SERVICE_HOST = "https://sms.fjmaimaimai.com:9897"
var UCENTER_SERVICE_HOST = "https://suplus-ucenter-test.fjmaimaimai.com"
var UCENTER_APP_KEY = "0c2c2a23dfc64ae230f5c54ab243ab52"
var BUSINESS_ADMIN_SERVICE_HOST = "https://suplus-business-admin-test.fjmaimaimai.com"
var BUSINESS_ADMIN_PLATFORM_ID = "25" //合伙人模块
var DEFAULT_GUEST_COMPANY int = 358
var SHARE_SHOP_PREVIEW_IMADGE = "https://media.fjmaimaimai.com/image/default/3E0C7050C13147CE8C7AF86C75F904E9-6-2.jpg" //分享店铺预览图
var WEHAT_MINI_PROGRAM_VERSION_TYPE = 2 //0:正式版 1:开发版 2:体验版
var DISENABLE_MULTI_DEVICE_LOGIN = false //不允许多端登录 (注:正式环境需要为true 测试环境设为false,方便多个设备测试)
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
}
if os.Getenv("LOG_PREFIX") != "" {
LOG_PREFIX = os.Getenv("LOG_PREFIX")
}
if os.Getenv("UCENTER_SERVICE_HOST") != "" {
UCENTER_SERVICE_HOST = os.Getenv("UCENTER_SERVICE_HOST")
}
if os.Getenv("BUSINESS_ADMIN_SERVICE_HOST") != "" {
BUSINESS_ADMIN_SERVICE_HOST = os.Getenv("BUSINESS_ADMIN_SERVICE_HOST")
}
if v := os.Getenv("DEFAULT_GUEST_COMPANY"); v != "" {
DEFAULT_GUEST_COMPANY, _ = strconv.Atoi(v)
}
if v := os.Getenv("SERVICE_RUNMOD"); v != "" {
SERVICE_RUNMOD = v
}
}