2024-02-19 10:44:33 +08:00
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Author: CRMEB Team <admin@crmeb.com>
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
let openPlantGrass = '-openPlantGrass-'
|
|
|
|
|
|
2024-03-15 09:55:16 +08:00
|
|
|
|
let httpSix, httpApi;
|
|
|
|
|
|
2024-04-11 18:11:16 +08:00
|
|
|
|
const env = 'dev'; // 开发
|
|
|
|
|
// const env = 'prod'; // 生产
|
2024-03-25 18:35:47 +08:00
|
|
|
|
// const env = 'prew'; // 预上线
|
2024-03-19 13:45:56 +08:00
|
|
|
|
|
2024-03-25 18:35:47 +08:00
|
|
|
|
switch (env) {
|
|
|
|
|
case 'prod':
|
|
|
|
|
httpApi = 'https://shop.lihaink.cn' // 生产
|
|
|
|
|
httpSix = 'https://new-worker.lihaink.cn'
|
|
|
|
|
wsApi = 'wss://shop.lihaink.cn'
|
|
|
|
|
break;
|
|
|
|
|
case 'prew':
|
|
|
|
|
httpApi = 'https://test.shop.lihaink.cn' //预发布环境
|
|
|
|
|
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
|
|
|
|
|
wsApi = 'wss://test.shop.lihaink.cn'
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
|
|
|
|
|
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
|
2024-04-03 18:11:43 +08:00
|
|
|
|
// wsApi = 'ws://192.168.1.22:8324'
|
2024-03-25 18:35:47 +08:00
|
|
|
|
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
|
|
|
|
|
}
|
2024-03-15 09:55:16 +08:00
|
|
|
|
|
|
|
|
|
// httpSix = 'https://new-worker.lihaink.cn'
|
2024-02-19 10:44:33 +08:00
|
|
|
|
|
|
|
|
|
// 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
|
|
|
|
|
// let wsApi = 'ws://192.168.3.20:8324'
|
2024-03-25 18:35:47 +08:00
|
|
|
|
// let wsApi = 'wss://mer1.crmeb.net'
|
2024-02-19 10:44:33 +08:00
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
// 请求域名 格式: https://您的域名
|
|
|
|
|
// #ifdef MP || APP-PLUS
|
|
|
|
|
// HTTP_REQUEST_URL: httpApi,
|
|
|
|
|
HTTP_REQUEST_URL: httpApi,
|
|
|
|
|
VUE_APP_WS_URL: `${wsApi}?type=user`,
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
//H5接口是浏览器地址
|
2024-03-25 18:35:47 +08:00
|
|
|
|
HTTP_REQUEST_URL: process.env.NODE_ENV == 'development' ? httpApi : window.location.protocol + "//" + window
|
|
|
|
|
.location.host,
|
2024-02-19 10:44:33 +08:00
|
|
|
|
// 聊天长连接地址
|
2024-04-03 16:54:35 +08:00
|
|
|
|
VUE_APP_WS_URL: process.env.NODE_ENV == 'development' ? `${wsApi}?type=user` : VUE_APP_WS_URL,
|
2024-02-19 10:44:33 +08:00
|
|
|
|
// #endif
|
2024-04-02 16:37:05 +08:00
|
|
|
|
HTTP_REQUEST_URL_SIX: httpSix,
|
2024-02-19 10:44:33 +08:00
|
|
|
|
openPlantGrass: openPlantGrass,
|
2024-04-02 16:37:05 +08:00
|
|
|
|
ENV: env,
|
2024-02-19 10:44:33 +08:00
|
|
|
|
HEADER: {
|
|
|
|
|
'content-type': 'application/json',
|
|
|
|
|
//#ifdef H5
|
|
|
|
|
'Form-type': navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 ? 'wechat' : 'h5',
|
|
|
|
|
//#endif
|
|
|
|
|
//#ifdef MP
|
|
|
|
|
'Form-type': 'routine',
|
|
|
|
|
//#endif
|
|
|
|
|
//#ifdef APP-PLUS
|
|
|
|
|
'Form-type': 'app',
|
|
|
|
|
//#endif
|
|
|
|
|
},
|
|
|
|
|
// 回话密钥名称 请勿修改此配置
|
|
|
|
|
TOKENNAME: 'X-Token',
|
|
|
|
|
// 缓存时间 0 永久
|
|
|
|
|
EXPIRE: 0,
|
2024-04-02 16:37:05 +08:00
|
|
|
|
};
|