修改前端页面

dependabot/pip/fir_ser/django-3.2.4
youngS 4 years ago
parent 19b82de65f
commit 30db4882b4
  1. 16
      fir_client/public/config.js
  2. 1
      fir_client/public/index.html
  3. 1
      fir_client/public/short.html
  4. 2
      fir_client/src/App.vue
  5. BIN
      fir_client/src/assets/imgs/circle.png
  6. BIN
      fir_client/src/assets/wxchat.jpg
  7. 13
      fir_client/src/components/FirFooter.vue
  8. 34
      fir_client/src/components/FirHeader.vue
  9. 1
      fir_client/src/components/apps/FirApps.vue
  10. 69
      fir_client/src/components/index/FirContact.vue
  11. 8
      fir_client/src/components/index/FirIndexBody.vue
  12. 56
      fir_client/src/components/index/FirIndexTem.vue
  13. 213
      fir_client/src/components/index/FirNews.vue
  14. 34
      fir_client/src/components/index/FirService.vue
  15. 6
      fir_client/src/components/user/FirUserOrders.vue
  16. 2
      fir_client/src/restful/download.js
  17. 2
      fir_client/src/restful/index.js
  18. 12
      fir_client/src/router/index.js
  19. 281
      fir_client/vue.config.js
  20. 9
      fir_ser/api/utils/storage/caches.py
  21. 6
      fir_ser/readme.txt

@ -1,16 +0,0 @@
window.g = {
baseUrl: 'https://app.hehelucky.cn',
PaymentQuestionMsg:'如对充值订单有疑问,请联系 nineven@qq.com',
footer: {
copyright: 'Copyright © 2017-2020 第九系艾文 版权所有.',
ipcBeiAn: {
url: 'https://beian.miit.gov.cn',
text: '豫ICP备15004336号-3',
},
gongAnBeiAn: {
url: 'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41142202000049',
text: '豫公网安备 41142202000049号',
},
}
};

@ -5,7 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script src="<%= BASE_URL %>config.js"></script>
<script src="<%= BASE_URL %>gt.js"></script>
<title>FLY分发平台</title>
</head>

@ -5,7 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script src="<%= BASE_URL %>config.js"></script>
<title>应用下载</title>
</head>
<body>

@ -1,6 +1,6 @@
<template>
<div id="app" ref="app">
<router-view></router-view>
<router-view/>
</div>
</template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -34,20 +34,17 @@
data() {
return {
footer: {
copyright: '',
copyright: 'Copyright © 2017-2021 东城飞阳 版权所有.',
ipcBeiAn: {
url: '',
text: '',
url: 'https://beian.miit.gov.cn',
text: '豫ICP备15004336号-3',
},
gongAnBeiAn: {
url: '',
text: '',
url: 'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41142202000049',
text: '豫公网安备 41142202000049号',
},
}
}
}, methods: {}, created() {
}, mounted() {
this.footer = window.g.footer;
}
}
</script>

@ -55,6 +55,7 @@
<el-dropdown-item command="supersign" v-if="$store.state.userinfo.supersign_active">超级签名
</el-dropdown-item>
<el-dropdown-item command="myorder">订单信息</el-dropdown-item>
<el-dropdown-item command="contact">联系我们</el-dropdown-item>
<el-dropdown-item command="exit">退出</el-dropdown-item>
</el-dropdown-menu>
@ -87,17 +88,26 @@
this.$message.success('复制剪切板成功');
},
maketoken() {
apitoken(data => {
if (data.code === 1000) {
this.token = data.data.token;
this.$message({
type: 'success',
message: '重新生成成功!'
});
} else {
this.$message.error("失败了 " + data.msg)
}
}, {methods: 'PUT', token: this.token});
this.$confirm('确认重新生成新的密钥么?', '警告', {
type: 'warning'
})
// eslint-disable-next-line no-unused-vars
.then(res => {
apitoken(data => {
if (data.code === 1000) {
this.token = data.data.token;
this.$message({
type: 'success',
message: '重新生成成功!'
});
} else {
this.$message.error("失败了 " + data.msg)
}
}, {methods: 'PUT', token: this.token});
})
.catch(err => {
this.$message.error(err)
});
},
handleCommand(command) {
if (command === 'userinfo') {
@ -122,6 +132,8 @@
this.$store.dispatch("dodomainaction", true);
} else if (command === 'myorder') {
this.$router.push({"name": 'FirUserOrders'})
} else if (command === 'contact') {
this.$router.push({"name": 'FirContact'})
} else if (command === 'exit') {
logout(data => {
if (data.code === 1000) {

@ -936,7 +936,6 @@
}
}, mounted() {
this.PaymentQuestionMsg = window.g.PaymentQuestionMsg;
getUserInfoFun(this);
this.$store.dispatch('doucurrentapp', {});
this.getappsFun({});

@ -0,0 +1,69 @@
<template>
<div class="ContactUs">
<div>
<h3>联系我们</h3>
<p style="color:#b2b2b2">Contact us</p>
</div>
<div class="content">
<div class="item"><p>技术咨询</p>
</div>
<el-divider direction="vertical"/>
<div class="item"><p>商务合作</p>
</div>
<el-divider direction="vertical"/>
<div class="item"><p style="margin-bottom: 16px">应用举报</p>
</div>
<p><b>flyapps@126.com</b></p>
<el-tooltip content="拿出手机扫描添加微信" style="margin-top: 33px">
<el-image :lazy="true" :src="require('@/assets/wxchat.jpg')" style="width: 160px" alt="扫描添加微信">
</el-image>
</el-tooltip>
</div>
</div>
</template>
<script>
export default {
name: "FirContact",
data() {
return {
bg_img: require("@/assets/imgs/banner_1.jpg")
}
},
}
</script>
<style scoped>
.ContactUs {
text-align: center;
}
.content {
width: 942px;
margin: 80px auto 160px;
text-align: center;
}
.item {
display: inline-block;
font-size: 14px;
text-align: left;
}
.item p {
font-size: 16px;
color: #8C9293;
}
.item p b {
font-size: 30px;
color: #313639;
font-weight: 400;
letter-spacing: 2.5px;
}
</style>

@ -19,12 +19,12 @@
</div>
<div id="whyChooseUs">
<div class="container">
<div style="width: 80%;margin-right: auto; margin-left: auto;">
<div class="whyChooseUs-title text-center">
<p>为什么选择我们的服务</p>
<p>THE REASON TO CHOOSING US</p>
</div>
<el-row :gutter="20">
<el-row :gutter="24">
<el-col :span="6" v-for="(item,index) in serverList" :key="index">
<div class="server-block"
onmouseenter="this.style.color='#28f';this.style.borderColor='#28f'"
@ -45,9 +45,9 @@
<el-container id="contactUs">
<el-main class="contactUs-container">
<div class="content">您身边的应用托管分发</div>
<div class="content">您身边的应用托管分发专家</div>
<div class="content">7x24小时提供出色的不间断服务</div>
<el-button
<el-button @click="$router.push({name:'FirContact'})"
onmouseleave="this.style.borderColor='#ffffff'; this.style.backgroundColor='#ffffff'; this.style.color='#3f3f3f';"
onmouseenter="this.style.backgroundColor='transparent'; this.style.borderColor='#ffffff'; this.style.color='#ffffff';"
>联系我们

@ -14,13 +14,18 @@
<el-col :span="8">
<el-link @click="$router.push({name:'FirService'})">服务</el-link>
</el-col>
<el-col :span="8">
<el-link @click="$router.push({name:'FirNews'})">新闻</el-link>
</el-col>
<el-col :span="8">
<el-link @click="$router.push({name:'FirApps'})">登录</el-link>
</el-col>
<el-col :span="8">
<el-link @click="$router.push({name:'FirRegist'})">注册</el-link>
</el-col>
<el-col :span="8">
<el-link @click="$router.push({name:'FirContact'})">联系我们</el-link>
</el-col>
</el-row>
</el-col>
</el-row>
@ -59,55 +64,6 @@
'line-height': '45px',
background: '#e7eaf1'
},
swiperList: [
{
img: require("@/assets/imgs/banner2.jpg"),
path: "",
title: '超级签名',
content: '自定义超级签签名,不再为频繁填写udid打包而烦恼',
},
{
img: require("@/assets/imgs/banner1.png"),
path: "",
title: '内测托管',
content: '一键上传应用,扫描二维码下载',
},
{
img: require("@/assets/imgs/banner_2.jpg"),
path: "",
title: '应用合并',
content: '扫描同一个二维码,根据设备类型自动下载对应的 iOS 或 Android 应用',
},
{
img: require("@/assets/imgs/banner_1.jpg"),
path: "",
title: '权限控制',
content: '灵活的访问权限控制,密码授权,下载页展示,管理应用',
},
],
serverList: [
{
logo: require("@/assets/imgs/tel.png"),
title: "核心优势1",
content: "<p>由专业客服提供人工服务</p>负责疑难问题和故障受理"
},
{
logo: require("@/assets/imgs/computer.png"),
title: "核心优势2",
content: "<p>可定制私有化部署</p>帮助客户进行私有操作"
},
{
logo: require("@/assets/imgs/qq.png"),
title: "核心优势3",
content: "<p>利用QQ微信等提供在线解答</p>帮助用户快速准确解决问题和故障"
},
{
logo: require("@/assets/imgs/skill.png"),
title: "核心优势4",
content: "<p>由技术支持工程师,负责问题解答</p>需求受理及故障受理"
}
]
}
}
}

@ -0,0 +1,213 @@
<template>
<div class="NewsInformation">
<div>
<div class="text-center">
<h3>新闻动态</h3>
<p style="color:#b2b2b2">Company News</p>
</div>
<div class="nav text-center">
<a href="#" class="active">公司新闻</a>
<a href="#">行业动态</a>
</div>
<ul class="news-container">
<li v-for="(item,index) in newsList" :key="index">
<div class="content">
<p>{{item.title}}</p>
<p>{{item.introduce}}</p>
</div>
<div class="time">
<p>{{item.date}}</p>
<span>{{item.year}}</span>
</div>
<div class="circle">
<img :src="require('@/assets/imgs/circle.png')">
<i class="center-block"></i>
</div>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "FirNews",
data() {
return {
show: false,
newsList: [
{
id: '001',
title: '现有版本',
introduce: '经过好长时间的编写,平台已经支持超级签名,权限管理,自定义域名,自定义存储',
date: '03-26',
year: '2021'
}, {
id: '002',
title: '发布第一个版本',
introduce: '只是简单的一个应用分发,然后再测试服进行分发测试',
date: '11-24',
year: '2019'
}, {
id: '003',
title: '撸代码',
introduce: '资源,签名方式,想法都已经准备好,正式写代码',
date: '10-10',
year: '2019'
}, {
id: '004',
title: '开始行动',
introduce: '网上找了些资源,然后进行设计,也找了些linux平台签名方式',
date: '08-20',
year: '2019'
}, {
id: '005',
title: '行动前准备',
introduce: '通过互联网查询,发现了fir平台,但是fir平台只支持应用分发,还不可以iOS签名',
date: '06-03',
year: '2019'
}, {
id: '006',
title: '萌发新想法',
introduce: 'iOS测试打包,应用分发复杂繁琐,怎么可以一站式分发安卓和苹果应用?',
date: '05-24',
year: '2019'
}
]
}
},
mounted() {
this.show = true;
}
}
</script>
<style scoped>
.NewsInformation {
text-align: center;
}
.nav {
margin: 20px 0;
}
.nav > a {
display: inline-block;
text-decoration: none;
width: 120px;
height: 45px;
line-height: 45px;
color: #333;
border: 1px solid #333;
}
.nav > a.active {
color: #1e73be;
border-color: #1e73be;
}
.nav > a:hover {
color: #1e73be;
border-color: #1e73be;
}
.news-container {
overflow: hidden;
margin-bottom: 0;
width: 1140px;
margin-right: auto;
margin-left: auto;
list-style: none;
}
.news-container > li {
width: 55.45%;
height: 120px;
float: left;
color: #333;
text-align: right;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
}
.news-container > li:hover {
color: #1e73be;
/*border: 1px solid #1e73be;*/
cursor: pointer;
}
.news-container > li:nth-of-type(2n) {
float: right;
text-align: left;
}
.news-container > li > .content {
width: 60%;
float: left;
padding: 20px 0;
}
.news-container > li > .time {
width: 20%;
float: left;
padding: 10px 0;
}
.news-container > li > .time > p {
font-size: 30px;
margin: 5px 0;
}
.news-container > li > .circle {
width: 20%;
height: 100%;
float: left;
position: relative;
}
.news-container > li > .circle > img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 20px;
height: 20px;
}
.news-container > li > .circle > i {
display: block;
width: 1px;
height: 100%;
background: #707070;
}
.news-container > li:nth-of-type(2n) > .content {
float: right;
}
.news-container > li:nth-of-type(2n) > .time {
float: right;
}
.news-container > li:nth-of-type(2n) > .circle {
float: right;
}
.news-container > li:nth-of-type(1) > .circle > i {
height: 50%;
position: absolute;
top: 50%;
left: 50%;
}
.center-block {
display: block;
margin-right: auto;
margin-left: auto
}
</style>

@ -5,22 +5,24 @@
<p style="color:#b2b2b2">The Best Service You Never See</p>
</div>
<div class="Service-container">
<el-row :gutter="20">
<el-col :span="6" v-for="(item,index) in serviceList" :key="index">
<div class="Service-item Service-item-wrapper">
<div class="Service-item-top">
<h4>{{item.title}}</h4>
<i/>
<p>{{item.eng_title}}</p>
<transition name="el-zoom-in-center">
<el-row :gutter="20" v-show="show">
<el-col :span="6" v-for="(item,index) in serviceList" :key="index">
<div class="Service-item Service-item-wrapper">
<div class="Service-item-top">
<h4>{{item.title}}</h4>
<i/>
<p>{{item.eng_title}}</p>
</div>
<div class="Service-item-img">
<img :src="item.img" alt="服务">
</div>
<div class="Service-item-border"></div>
</div>
<div class="Service-item-img">
<img :src="item.img" alt="服务">
</div>
<div class="Service-item-border"></div>
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</transition>
</div>
</div>
@ -31,6 +33,7 @@
name: "FirService",
data() {
return {
show: false,
serviceList: [
{
id: 'section-1',
@ -56,6 +59,9 @@
]
}
},
mounted() {
this.show = true;
}
}
</script>

@ -107,10 +107,8 @@
</div>
<span slot="footer">
{{ PaymentQuestionMsg }}
<el-button @click="$router.push({'name':'FirContact'})"> 如对充值订单有疑问请联系我们</el-button>
</span>
</el-dialog>
@ -275,7 +273,6 @@
show_order_info: false,
current_order_info: {},
loading: false,
PaymentQuestionMsg: '',
}
},
methods: {
@ -431,7 +428,6 @@
}, {methods: 'GET', data: params})
},
}, mounted() {
this.PaymentQuestionMsg = window.g.PaymentQuestionMsg;
getUserInfoFun(this);
let out_trade_no = this.$route.params.out_trade_no;
if (out_trade_no) {

@ -2,7 +2,7 @@ import Axios from 'axios'
Axios.defaults.withCredentials = true;
const DOMAIN = window.g.baseUrl;
const DOMAIN = process.env.base_env.baseUrl;
const APIPATH = '/api/v1/fir/server';
let USERSEVER = DOMAIN + APIPATH;

@ -10,7 +10,7 @@ Axios.defaults.withCredentials = true;
// });
const DOMAIN = window.g.baseUrl;
const DOMAIN = process.env.base_env.baseUrl;
const APIPATH = '/api/v1/fir/server';
let USERSEVER = DOMAIN + APIPATH;

@ -20,7 +20,7 @@ const router = new VueRouter({
redirect: {name: 'FirIndex'}
},
{
path: '/index',
path: '/home',
component: () => import("@/components/index/FirIndexTem"),
children: [
{
@ -33,6 +33,16 @@ const router = new VueRouter({
name: 'FirService',
component: () => import("@/components/index/FirService")
},
{
path: 'news',
name: 'FirNews',
component: () => import("@/components/index/FirNews")
},
{
path: 'contact',
name: 'FirContact',
component: () => import("@/components/index/FirContact")
},
]
},

@ -19,7 +19,7 @@ const compress = new CompressionWebpackPlugin(
threshold: 10240,
test: new RegExp(
'\\.(' +
['js'].join('|') +
['js','css'].join('|') +
')$'
),
minRatio: 0.8,
@ -27,7 +27,7 @@ const compress = new CompressionWebpackPlugin(
}
);
const index={
const index = {
// page 的入口
entry: 'src/main.js',
// 模板来源
@ -39,42 +39,42 @@ const index={
title: 'Fly分发平台',
// 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'index','chunk-libs','chunk-elementUI','chunk-commons','runtime','chunk-aliOss','chunk-qiniuJs','chunk-qrcodejs2']
chunks: ['chunk-vendors', 'chunk-common', 'index', 'elementui','runtime', 'alioss', 'qiniujs', 'qrcodejs2']
};
// eslint-disable-next-line no-unused-vars
const mshort={
// page 的入口
entry: 'src/main.short.js',
// 模板来源
template: 'public/short.html',
// 在 dist/short.html 的输出
filename: 'mshort.html',
// 当使用 title 选项时,
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
title: '应用下载',
// 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'mshort','chunk-libs','chunk-elementUI','chunk-commons','runtime']
const mshort = {
// page 的入口
entry: 'src/main.short.js',
// 模板来源
template: 'public/short.html',
// 在 dist/short.html 的输出
filename: 'mshort.html',
// 当使用 title 选项时,
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
title: '应用下载',
// 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'mshort', 'chunk-elementUI', 'runtime']
};
const short={
// page 的入口
entry: 'src/short.js',
// 模板来源
template: 'public/short.html',
// 在 dist/short.html 的输出
filename: 'short.html',
// 当使用 title 选项时,
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
title: '应用下载',
// 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'short','chunk-libs','chunk-commons','runtime']
const short = {
// page 的入口
entry: 'src/short.js',
// 模板来源
template: 'public/short.html',
// 在 dist/short.html 的输出
filename: 'short.html',
// 当使用 title 选项时,
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
title: '应用下载',
// 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'short', 'chunk-commons', 'runtime']
};
let pages = {index,short};
let pages = {index, short};
const page = argv[3];
if(page){
for(const key of Object.keys(pages)){
if(key === page){
if (page) {
for (const key of Object.keys(pages)) {
if (key === page) {
const tmp = pages[key];
pages = {};
pages[key] = tmp;
@ -82,13 +82,32 @@ if(page){
}
}
const pro_base_env = {
baseUrl: 'https://ali.cdn.flyapp.dvcloud.xin',
short_static: 'https://static.dvstorage.cn/',
index_static: 'https://static.dvcloud.xin/',
};
const dev_base_env = {
baseUrl: 'https://app.hehelucky.cn',
short_static: '/',
index_static: '/',
};
let base_evn = dev_base_env;
// if (IS_PROD) {
// base_evn = pro_base_env
// } else {
// base_evn = dev_base_env
// }
function get_public_path(pages) {
if(!IS_PROD){
if (!IS_PROD) {
return '/'
}else if(pages.index ){
return 'https://static.dvcloud.xin/'
}else {
return 'https://static.dvstorage.cn/' //正式服,需要打包下载页静态资源
} else if (pages.index) {
return base_evn.index_static
} else {
return base_evn.short_static //正式服,需要打包下载页静态资源
}
}
@ -99,7 +118,7 @@ module.exports = {
productionSourceMap: false, //去除生产环境的productionSourceMap
assetsDir: "static", //静态文件存储位置
lintOnSave: true,
runtimeCompiler:true,
runtimeCompiler: true,
publicPath: publicPath,
configureWebpack: {
// provide the app's title in webpack's name field, so that
@ -110,65 +129,46 @@ module.exports = {
'@': resolve('src')
}
},
plugins:[compress],
plugins: [compress],
},
chainWebpack: config => {
if(IS_PROD){
config.optimization.minimizer=[
new UglifyJsPlugin({
uglifyOptions: {
output: {
comments: false, // 去掉注释
},
warnings: false,
compress: {
drop_console: true,
drop_debugger: true,
pure_funcs: ['console.log']//移除console
}
}
})
]
config
.plugin('define')
.tap(args => {
args[0]['process.env']['base_env'] = JSON.stringify({baseUrl: base_evn.baseUrl});
return args
});
if (IS_PROD) {
config.optimization.minimizer = [
new UglifyJsPlugin({
uglifyOptions: {
output: {
comments: false, // 去掉注释
},
warnings: false,
compress: {
drop_console: true,
drop_debugger: true,
pure_funcs: ['console.log']//移除console
}
}
})
]
}
if (page==='analyz') {
if (page === 'analyz') {
config
.plugin('webpack-bundle-analyzer')
.use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
}
if (!IS_PROD) {
config.output
.filename(bundle => {
return bundle.chunk.name === 'index' ? 'js/[name].js' : '[name]/[name].js'
})
}
if (IS_PROD) {
config.output
.filename(bundle => {
return bundle.chunk.name === 'index' ? 'js/[name].[contenthash:8].js' : '[name]/[name].[contenthash:8].js'
})
}
// 移除prefetch插件,避免加载多余的资源
config.plugins.delete('prefetch');
// config.plugins.delete('preload');
config.plugins.delete('preload');
// config.optimization.splitChunks({
// cacheGroups: {
// vendors: {
// name: 'chunk-vendors',
// minChunks: 4,
// test: /node_modules/,
// priority: -10,
// chunks: 'initial'
// },
// common: {}
// }
// });
// config.module
// .rule('images')
@ -188,63 +188,64 @@ module.exports = {
return options
})
.end();
if(IS_PROD) {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end();
config
.optimization.splitChunks({
chunks: 'async',
minSize: 30000, //表示在压缩前的最小模块大小,默认值是30kb
minChunks: 2, // 表示被引用次数,默认为1;
maxAsyncRequests: 8, //所有异步请求不得超过5个
maxInitialRequests: 3, //初始话并行请求不得超过3个
automaticNameDelimiter:'~',//名称分隔符,默认是~
name: true, //打包后的名称,默认是chunk的名字通过分隔符(默认是~)分隔
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
aliOss: {
name: 'chunk-aliOss', // split elementUI into a single package
priority: 21, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?ali-oss(.*)/ // in order to adapt to cnpm
},
qiniuJs: {
name: 'chunk-qiniuJs', // split elementUI into a single package
priority: 22, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?qiniu-js(.*)/ // in order to adapt to cnpm
},
qrcodejs2: {
name: 'chunk-qrcodejs2', // split elementUI into a single package
priority: 23, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?qrcodejs2(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve(resolve('src/components')), // can customize your rules
minChunks: 2, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
});
config.optimization.runtimeChunk('single');
if (IS_PROD) {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end();
config.optimization.minimize(true);
config
.optimization.splitChunks({
chunks: 'all',
minSize: 30000, //表示在压缩前的最小模块大小,默认值是30kb
minChunks: 2, // 表示被引用次数,默认为1;
maxAsyncRequests: 8, //所有异步请求不得超过5个
maxInitialRequests: 3, //初始话并行请求不得超过3个
automaticNameDelimiter: '~',//名称分隔符,默认是~
name: true, //打包后的名称,默认是chunk的名字通过分隔符(默认是~)分隔
cacheGroups: {
vendors: {
name: 'chunk-vendors',
test: /node_modules/,
priority: -10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementui: {
name: 'elementui', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
alioss: {
name: 'alioss', // split elementUI into a single package
priority: 23, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?ali-oss(.*)/ // in order to adapt to cnpm
},
qrcodejs2: {
name: 'qrcodejs2', // split elementUI into a single package
priority: 23, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?qrcodejs2(.*)/ // in order to adapt to cnpm
},
qiniujs: {
name: 'qiniujs', // split elementUI into a single package
priority: 24, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?qiniu-js(.*)/ // in order to adapt to cnpm
},
common: {
name: 'chunk-commons',
test: resolve(resolve('src/components')), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
});
config.optimization.runtimeChunk('single');
}
}
};

@ -450,16 +450,13 @@ def check_app_permission(app_obj, res):
if not app_obj:
res.code = 1003
res.msg = "该应用不存在"
if app_obj.status != 1:
elif app_obj.status != 1:
res.code = 1004
res.msg = "该应用被封禁,无法下载安装"
if not check_user_has_all_download_times(app_obj):
elif not check_user_has_all_download_times(app_obj):
res.code = 1009
res.msg = "可用下载额度不足,请联系开发者"
if not app_obj.isshow:
elif not app_obj.isshow:
res.code = 1004
res.msg = "您没有权限访问该应用"

@ -7,14 +7,14 @@ python manage.py loaddata dumpdata.json
#celery -A fir_ser worker --scheduler django --loglevel=debug
启动多节点
celery multi start 4 -A fir_ser -l INFO -c4 --pidfile=/var/run/celery/%n.pid --logfile=logs/%p.log
celery multi start 4 -A fir_ser -l INFO -c4 --pidfile=/var/run/celery/%n.pid --logfile=logs/%p.log
启动beat
celery -A fir_ser beat --scheduler django -l INFO
nohup celery -A fir_ser beat --uid=1000 --pidfile=logs/beat.pid --scheduler django -l INFO --logfile=logs/beat.log &
#开发测试
celery -A fir_ser worker --beat --scheduler django --loglevel=debug
celery -A fir_ser worker --uid=1000 --beat --scheduler django --loglevel=debug
var app_id = 21254;
var app_name = '';

Loading…
Cancel
Save