Commit 0f7df779 by Jamos

feat: 🎨

parent 32588175
......@@ -2,11 +2,12 @@
* @Author: liguokang
* @Date: 2021-07-15 10:43:34
* @LastEditors: liguokang
* @LastEditTime: 2021-08-03 20:30:02
* @LastEditTime: 2021-08-03 20:37:14
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
const { webDomain, apiDomain } = require('../webConfigs');
const DOMAIN = require('../webConfigs');
const { webDomain, apiDomain } = { ...DOMAIN.DOMAIN };
export const Interfaces = {
OnlineUrl: 'https://',
......
import axios from 'axios';
import { load as cookieLoad, save as cookieSave } from 'react-cookies';
const { webDomain, apiDomain } = require('./common/webConfigs');
const DOMAIN = require('../webConfigs');
const { webDomain, apiDomain } = { ...DOMAIN.DOMAIN };
// 创建axios实例
let serverPath = apiDomain;
......
......@@ -2,26 +2,27 @@
* @Author: liguokang
* @Date: 2021-07-29 16:19:43
* @LastEditors: liguokang
* @LastEditTime: 2021-08-03 20:29:54
* @LastEditTime: 2021-07-29 16:46:20
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
let DEPLOY_ENV = process.env.DEPLOY_ENV;
const DEPLOY_ENV = process.env.DEPLOY_ENV;
const webDomains = {
const webDomain = {
dev: 'https://dev.xiaomai5.com/',
rc: 'https://rc.xiaomai5.com/',
gray: 'https://rc.xiaomai5.com/',
prod: 'https://www.xiaomai5.com/',
};
const apiDomains = {
const apiDomain = {
dev: 'https://dev-heimdall.xiaomai5.com/',
rc: 'https://rc-heimdall.xiaomai5.com/',
gray: 'https://gray-heimdall.xiaomai5.com/',
prod: 'https://heimdall.xiaomai5.com/',
};
let webDomain = webDomains[DEPLOY_ENV];
let apiDomain = apiDomains[DEPLOY_ENV];
export { webDomain, apiDomain };
exports.DOMAIN = {
webDomain: webDomain[DEPLOY_ENV],
apiDomain: apiDomain[DEPLOY_ENV],
};
......@@ -3,14 +3,14 @@
"version": "1.1.0",
"scripts": {
"dev": "next dev",
"build": "next build && next export -o dist && npm run nd",
"build": "next build && next export -o dist && npm run siteMap",
"export": "npm run build && next export",
"start": "next start",
"build:dev": "cross-env DEPLOY_ENV=dev npm run build",
"build:rc": "cross-env DEPLOY_ENV=rc npm run build",
"build:gray": "cross-env DEPLOY_ENV=gray npm run build",
"build:prod": "cross-env DEPLOY_ENV=prod npm run build",
"nd": "node script.js",
"siteMap": "node siteMapScript.js",
"prepare": "husky install",
"precommit": "pretty-quick --staged"
},
......
......@@ -2,18 +2,18 @@
* @Author: liguokang
* @Date: 2021-07-29 16:14:30
* @LastEditors: liguokang
* @LastEditTime: 2021-08-03 20:30:47
* @LastEditTime: 2021-08-03 20:19:05
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
const fs = require('fs');
const { webDomain, apiDomain } = require('./common/webConfigs');
const DOMAIN = require('./common/webConfigs');
const { webDomain, apiDomain } = { ...DOMAIN.DOMAIN };
const readStream = fs.createReadStream('./sitemap/sitemap.html', { encoding: 'utf8' });
const writeStream = fs.createWriteStream('./dist/sitemap.html', { encoding: 'utf8' });
console.log(webDomain, apiDomain,'222222222222222222222222222222222222222222222222222222222222');
readStream.on('data', (data) => {
let reData = data.replace(/https\:\/\/www\.xiaomai5\.com\//g, webDomain);
reData = reData.replace(/https\:\/\/heimdall\.xiaomai5\.com\//g, apiDomain);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment