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

BUILD_ENV环境变量

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