增加打包时间

dependabot/npm_and_yarn/fir_admin/minimatch-3.1.2
isummer 2 years ago
parent f70351d8e5
commit fe5a7605f0
  1. 7
      fir_client/src/components/index/FirContact.vue
  2. 7
      fir_client/src/components/index/FirIndexTem.vue
  3. 3
      fir_client/src/restful/download.js
  4. 2
      fir_client/src/restful/index.js
  5. 23
      fir_client/vue.config.js

@ -16,11 +16,11 @@
<div class="item"><p style="margin-bottom: 16px">应用举报</p> <div class="item"><p style="margin-bottom: 16px">应用举报</p>
</div> </div>
<div> <div>
<el-link :underline="false" href="https://github.com/nineaiyu/FlyApps"><p><b>FlyApps</b></p></el-link> <el-link :href="github" :underline="false"><p><b>FlyApps</b></p></el-link>
</div> </div>
<el-divider/> <el-divider/>
<el-tooltip content="拿出手机扫一扫" style="margin-top: 33px"> <el-tooltip content="拿出手机扫一扫" style="margin-top: 33px">
<el-image :lazy="true" :src="require('@/assets/github.png')" alt="https://github.com/nineaiyu/FlyApps" <el-image :alt="github" :lazy="true" :src="require('@/assets/github.png')"
style="width: 160px"> style="width: 160px">
</el-image> </el-image>
</el-tooltip> </el-tooltip>
@ -34,7 +34,8 @@ export default {
name: "FirContact", name: "FirContact",
data() { data() {
return { return {
bg_img: require("@/assets/imgs/banner_1.jpg") bg_img: require("@/assets/imgs/banner_1.jpg"),
github: process.env.base_env.github
} }
}, },
} }

@ -24,7 +24,7 @@
<el-link @click="$router.push({name:'FirContact'})">联系我们</el-link> <el-link @click="$router.push({name:'FirContact'})">联系我们</el-link>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-link @click="github">Github</el-link> <el-link @click="goGithub">Github</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-col> </el-col>
@ -64,10 +64,11 @@ export default {
'line-height': '45px', 'line-height': '45px',
background: '#e7eaf1' background: '#e7eaf1'
}, },
github: process.env.base_env.github
} }
}, methods: { }, methods: {
github() { goGithub() {
window.open('https://github.com/nineaiyu/FlyApps', '_blank', ''); window.open(this.github, '_blank', '');
} }
} }
} }

@ -4,7 +4,8 @@ import {geetestbase} from "@/utils/base/utils";
const DOMAIN = process.env.base_env.baseShortUrl; const DOMAIN = process.env.base_env.baseShortUrl;
const USERSEVER = 'api/v1/fir/server'; const USERSEVER = 'api/v1/fir/server';
// eslint-disable-next-line no-console
console.log("js build version:" + process.env.base_env.version);
// create an axios instance // create an axios instance
const service = Axios.create({ const service = Axios.create({
baseURL: DOMAIN, // url = base url + request url baseURL: DOMAIN, // url = base url + request url

@ -16,7 +16,7 @@ export function requestAbort() {
} }
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log("flyapps js version:" + process.env.base_env.version); console.log("js build version:" + process.env.base_env.version);
const DOMAIN = process.env.base_env.baseUrl; const DOMAIN = process.env.base_env.baseUrl;
const USERSEVER = 'api/v1/fir/server'; const USERSEVER = 'api/v1/fir/server';

@ -1,15 +1,14 @@
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV); const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV);
const path = require('path'); const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const dateFormat = require("./src/utils/format.js");
const CompressionWebpackPlugin = require('compression-webpack-plugin');
const argv = process.argv;
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
const argv = process.argv;
const CompressionWebpackPlugin = require('compression-webpack-plugin');
const compress = new CompressionWebpackPlugin( const compress = new CompressionWebpackPlugin(
{ {
filename: info => { filename: info => {
@ -19,7 +18,7 @@ const compress = new CompressionWebpackPlugin(
threshold: 10240, threshold: 10240,
test: new RegExp( test: new RegExp(
'\\.(' + '\\.(' +
['js','css'].join('|') + ['js', 'css'].join('|') +
')$' ')$'
), ),
minRatio: 0.8, minRatio: 0.8,
@ -28,7 +27,7 @@ const compress = new CompressionWebpackPlugin(
); );
const index = { const index = {
outputDir:'dist_index', outputDir: 'dist_index',
// page 的入口 // page 的入口
entry: 'src/main.js', entry: 'src/main.js',
// 模板来源 // 模板来源
@ -40,11 +39,11 @@ const index = {
title: 'Fly分发平台', title: 'Fly分发平台',
// 在这个页面中包含的块,默认情况下会包含 // 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。 // 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'index', 'elementui','runtime', 'alioss', 'qiniujs', 'qrcodejs2'] chunks: ['chunk-vendors', 'chunk-common', 'index', 'elementui', 'runtime', 'alioss', 'qiniujs', 'qrcodejs2']
}; };
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const mshort = { const mshort = {
outputDir:'dist_mshort', outputDir: 'dist_mshort',
// page 的入口 // page 的入口
entry: 'src/main.short.js', entry: 'src/main.short.js',
// 模板来源 // 模板来源
@ -59,7 +58,7 @@ const mshort = {
chunks: ['chunk-vendors', 'chunk-common', 'mshort', 'chunk-elementUI', 'runtime'] chunks: ['chunk-vendors', 'chunk-common', 'mshort', 'chunk-elementUI', 'runtime']
}; };
const short = { const short = {
outputDir:'dist_short', outputDir: 'dist_short',
// page 的入口 // page 的入口
entry: 'src/short.js', entry: 'src/short.js',
// 模板来源 // 模板来源
@ -90,6 +89,7 @@ for (const key of Object.keys(pages)) {
} }
const version='2.3.8'; const version='2.3.8';
const github = 'https://github.com/nineaiyu/FlyApps';
const pro_base_env = { const pro_base_env = {
baseUrl: '/', //该选项可以填写web-api的域名,类似 https://api.xxx.com/ baseUrl: '/', //该选项可以填写web-api的域名,类似 https://api.xxx.com/
@ -164,8 +164,9 @@ module.exports = {
args[0]['process.env']['base_env'] = JSON.stringify({ args[0]['process.env']['base_env'] = JSON.stringify({
baseUrl: base_evn.baseUrl, baseUrl: base_evn.baseUrl,
baseShortUrl: base_evn.baseShortUrl, baseShortUrl: base_evn.baseShortUrl,
version: base_evn.version, version: dateFormat("yyyyMMdd.hhmmss") + '.' + base_evn.version,
footer: base_evn.footer_info footer: base_evn.footer_info,
github
}); });
return args return args
}); });

Loading…
Cancel
Save