提交 2e661f80 编写于 作者: guangjun.yang's avatar guangjun.yang

BUILD_ENV环境变量

上级 ff21e904
......@@ -2,6 +2,7 @@
* Created by Anndy Yang on 19/02/28.
*/
import { envConfig } from '@/utils/env-config'
const { BUILD_ENV } = process.env;
// 获取SC服务器域名地址
export function getBaseUrl(url) {
......@@ -186,7 +187,7 @@ export function formatLeftTimeObj(time, hasZero = true) {
export const setCookie = (cname, cvalue, exdays = 30, domain = '.yunqueyi.com') => { //yunqueyi.com
let d = new Date(), expires = '';
if (NUXT_ENV_APP === 'dev') {
if (BUILD_ENV === 'dev') {
domain = window.location.hostname;
}
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册