添加客服功能

This commit is contained in:
张成
2025-09-29 10:20:36 +08:00
parent 5ce229f092
commit 090a44fd6e
3 changed files with 112 additions and 6 deletions

View File

@@ -10,6 +10,13 @@ export interface EnvConfig {
timeout: number
enableLog: boolean
enableMock: boolean
// 客服配置
customerService: {
corpId: string
serviceUrl: string
phoneNumber?: string
email?: string
}
}
// 各环境配置
@@ -21,7 +28,14 @@ const envConfigs: Record<EnvType, EnvConfig> = {
// apiBaseURL: 'http://localhost:9098',
timeout: 15000,
enableLog: true,
enableMock: true
enableMock: true,
// 客服配置
customerService: {
corpId: 'ww51fc969e8b76af82', // 企业ID
serviceUrl: 'https://work.weixin.qq.com/kfid/kfc64085b93243c5c91',
phoneNumber: '400-888-8888',
email: 'service@light120.com'
}
},
@@ -31,7 +45,14 @@ const envConfigs: Record<EnvType, EnvConfig> = {
apiBaseURL: 'https://sit.light120.com',
timeout: 10000,
enableLog: false,
enableMock: false
enableMock: false,
// 客服配置
customerService: {
corpId: 'ww51fc969e8b76af82', // 企业ID
serviceUrl: 'https://work.weixin.qq.com/kfid/kfc64085b93243c5c91',
phoneNumber: '400-888-8888',
email: 'service@light120.com'
}
}
}
@@ -86,7 +107,7 @@ export const getEnvInfo = () => {
config,
taroEnv: Taro.getEnv(),
platform: Taro.getEnv() === Taro.ENV_TYPE.WEAPP ? '微信小程序' :
Taro.getEnv() === Taro.ENV_TYPE.H5 ? 'H5' :
Taro.getEnv() === Taro.ENV_TYPE.WEB ? 'Web' :
Taro.getEnv() === Taro.ENV_TYPE.RN ? 'React Native' : '未知'
}
}