运行项目

This commit is contained in:
GYJ 2024-12-02 18:01:09 +08:00
parent 73081077d3
commit 6f3869f75f
10 changed files with 213 additions and 21471 deletions

View File

@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
OPEN_PROXY: true // 是否开启代理, 重置后需重启vue-cli
OPEN_PROXY: false // 是否开启代理, 重置后需重启vue-cli
})

View File

@ -1,66 +1,102 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var path = require('path');
var del = require('del');
var gulp = require('gulp')
var $ = require('gulp-load-plugins')()
var path = require('path')
var del = require('del')
var distPath = path.resolve('./dist');
var version = ''; // 版本号
var versionPath = ''; // 版本号路径
var distPath = path.resolve('./dist')
var version = '' // 版本号
var versionPath = '' // 版本号路径
var env = ''; // 运行环境
// 创建版本号(年月日时分)
(function () {
var d = new Date();
var yy = d.getFullYear().toString().slice(2);
var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1);
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate();
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours();
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes();
version = yy + MM + DD + h + mm;
versionPath = distPath + '/' + version;
})();
var d = new Date()
var yy = d.getFullYear().toString().slice(2)
var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1)
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate()
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours()
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes()
version = yy + MM + DD + h + mm
versionPath = distPath + '/' + version
})()
// 编译
gulp.task('build', $.shell.task([ 'node build/build.js' ]));
gulp.task('build', $.shell.task(['node build/build.js']))
// 创建版本号目录
gulp.task('create:versionCatalog', ['build'], function () {
gulp.task('create:versionCatalog', gulp.series('build', function () {
return gulp.src(`${distPath}/static/**/*`)
.pipe(gulp.dest(`${versionPath}/static/`))
});
}))
// 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量
gulp.task('replace:cdnUrl', ['create:versionCatalog'], function () {
gulp.task('replace:cdnUrl', gulp.series('create:versionCatalog', function () {
return gulp.src(`${versionPath}/static/js/manifest.js`)
.pipe($.replace(new RegExp(`"${require('./config').build.assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"'))
.pipe(gulp.dest(`${versionPath}/static/js/`))
});
}))
// 替换${versionPath}/static/config/index-${env}.js window.SITE_CONFIG['version']配置变量
gulp.task('replace:version', ['create:versionCatalog'], function () {
gulp.task('replace:version', gulp.series('create:versionCatalog', function () {
return gulp.src(`${versionPath}/static/config/index-${env}.js`)
.pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`))
.pipe(gulp.dest(`${versionPath}/static/config/`))
});
}))
// 合并${versionPath}/static/config/[index-${env}, init].js 至 ${distPath}/config/index.js
gulp.task('concat:config', ['replace:version'], function () {
gulp.task('concat:config', gulp.series('replace:version', function () {
return gulp.src([`${versionPath}/static/config/index-${env}.js`, `${versionPath}/static/config/init.js`])
.pipe($.concat('index.js'))
.pipe(gulp.dest(`${distPath}/config/`))
});
}))
// 清空
// 清空文件历史
gulp.task('clean', function () {
return del([versionPath])
});
console.log('--clean--')
// del([`${distPath}/static`, `${versionPath}/static/config`]);
// return del([versionPath])
return del([`${distPath}`])
})
gulp.task('default', ['clean'], function () {
gulp.task('build-end', function () {
console.log('--builed-end--')
// del([`${distPath}/static`, `${versionPath}/static/config`]);
return del([`${distPath}/static`, `${versionPath}/static/config`]);
})
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
gulp.task('default',
gulp.series('clean',
gulp.parallel('create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config'),
'build','build-end')
)
/* gulp.task('default', gulp.series('clean', function (done) {
// 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
// 开始打包编译
gulp.start(['build', 'create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config'], function () {
// 开始打包编译
gulp.task('default', gulp.series('build','create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config', function (done) {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
})
});
done();
}))
})); */
/*
gulp.task('default', gulp.series('clean', function (done) {
// 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
// 开始打包编译
// 开始打包编译
gulp.task('default', gulp.series('build','create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config', function (done) {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
done();
}))
}));
*/

21292
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
{
"name": "sz-fast-vue",
"name": "sqx",
"version": "1.2.2",
"description": "sz-fast-vue基于vue、element-ui构建开发实现sz-fast后台管理前端功能提供一套更优的前端解决方案。",
"author": "daxiong.yang <daxiong.yang@qq.com>",
"author": "maxd",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
@ -14,24 +13,23 @@
"build": "gulp"
},
"dependencies": {
"axios": "^0.17.1",
"axios": "0.17.1",
"babel-plugin-component": "0.10.1",
"babel-polyfill": "6.26.0",
"echarts": "^5.5.0",
"echarts": "^5.5.1",
"element-china-area-data": "^5.0.2",
"element-ui": "2.8.2",
"fs": "0.0.1-security",
"gulp": "3.9.1",
"gulp-concat": "2.6.1",
"gulp-load-plugins": "1.5.0",
"gulp-replace": "0.6.1",
"gulp-shell": "0.6.5",
"hls.js": "^1.4.12",
"hls.js": "^1.5.17",
"lodash": "4.17.5",
"mockjs": "^1.1.0",
"npm": "^6.9.0",
"sass-loader": "6.0.6",
"svg-sprite-loader": "3.7.3",
"video.js": "^8.5.2",
"video.js": "^8.20.0",
"videojs-contrib-hls": "^5.15.0",
"vue": "2.5.16",
"vue-baidu-map": "^0.21.22",
@ -67,9 +65,11 @@
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1",
"eventsource-polyfill": "0.9.6",
"extract-text-webpack-plugin": "3.0.0",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "1.1.4",
"friendly-errors-webpack-plugin": "1.6.1",
"gulp": "^4.0.2",
"gulp-shell": "^0.6.5",
"html-webpack-plugin": "2.30.1",
"jest": "21.2.0",
"jest-serializer-vue": "0.3.0",
@ -93,7 +93,7 @@
"vue-template-compiler": "2.5.16",
"webpack": "3.6.0",
"webpack-bundle-analyzer": "2.9.0",
"webpack-dev-server": "2.9.1",
"webpack-dev-server": "^2.9.7",
"webpack-merge": "4.1.0"
},
"engines": {

View File

@ -45,7 +45,7 @@ http.adornUrl = (actionName) => {
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
// return 'http://192.168.0.132:8100/sqx_fast/' + actionName
// return 'https://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName
return '/sqx_fast/' + actionName
return 'https://video.hnsiyao.cn/sqx_fast/' + actionName
}
http.adornUrlUp = (actionName) => {
@ -53,7 +53,7 @@ http.adornUrlUp = (actionName) => {
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
// return 'http://192.168.0.132:8183/sqx_fast/' + actionName
// return 'https://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName
return '/sqx_fast/' + actionName
return 'https://video.hnsiyao.cn/sqx_fast/' + actionName
}
http.adornUrlWX = (actionName) => {
@ -61,7 +61,7 @@ http.adornUrlWX = (actionName) => {
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
return '/weixin/' + actionName
// return 'https://api.weixin.qq.com/' + actionName
// return '/sqx_fast/' + actionName
// return 'https://video.hnsiyao.cn/sqx_fast/' + actionName
}
/**

View File

@ -564,7 +564,6 @@
incomeData: [],
activeName: 'first',
tableDataLoading: true,
flag: 1,
usersumData: {},
taskStat: {},
taskStat2:0,

View File

@ -460,7 +460,6 @@
</el-table-column>
<el-table-column prop="createTime" width="220" label="创建时间">
</el-table-column>
</el-table-column>
<el-table-column label="操作" fixed='right' width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="confirm(scope.row)">确定
@ -606,7 +605,7 @@
],
//
phone: '', //
name: '', //
// name: '', //
userIdss: '', //id
titleImg: '', //
img: [], //

View File

@ -990,7 +990,7 @@
}
],
classificationId: '', //id
content: '', //
// content: '', //
classificationName: '', //
formLabelWidth: '200px',
activeName: 'first',
@ -1223,7 +1223,7 @@
urlDj: '',
urlJj: '',
dialogFormVisible6: false,
remark: '',
// remark: '',
dyShowT: '',
wxShowT: '',
showFl: false,

View File

@ -456,7 +456,7 @@
url: '', //
isPrice: 1, //
goodNum: '', //
content: '', //
// content: '', //
over: 2,
videoId: '',
quillOption: quillConfig,

View File

@ -5,7 +5,7 @@
window.SITE_CONFIG = {};
// api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'http://localhost:8080/sz-fast';
window.SITE_CONFIG['baseUrl'] = 'https://video.hnsiyao.cn/sqx_fast';
// cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名