shop-live/config/app.js

73 lines
1.7 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// #ifdef H5
let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
// #endif
let openPlantGrass = '-openPlantGrass-'
let httpApi
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {
case 'prod':
httpApi = 'https://shop.lihaink.cn' // 生产
httpApione = 'http://ceshi-zhibo.lihaink.cn'
break;
case 'prew':
httpApi = 'https://test.shop.lihaink.cn' //预发布环境
httpApione = 'http://ceshi-zhibo.lihaink.cn'
break;
default:
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
httpApione = 'https://ceshi-zhibo.lihaink.cn'
}
// 聊天接口修改此字符 小程序聊天要求wss 例如wss://mer.crmeb.net
// let wsApi = 'ws://192.168.3.20:8324'
let wsApi = 'wss://ceshi-zhibo.lihaink.cn/chat_room'
// console.log(httpApione,'11111111111')
module.exports = {
// 请求域名 格式: https://您的域名
// #ifdef MP || APP-PLUS
// HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL_ONE: httpApione,
VUE_APP_WS_URL: wsApi,
// #endif
// #ifdef H5
HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL_ONE: httpApione,
//H5接口是浏览器地址
// 聊天长连接地址
VUE_APP_WS_URL: VUE_APP_WS_URL,
// #endif
openPlantGrass: openPlantGrass,
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,
};