增加前端打包参数

pull/1/head
xiaoyu 4 years ago
parent 3861b0a84f
commit cad199394b
  1. 19
      fir_client/README.md
  2. 3
      fir_client/public/config.js
  3. 1
      fir_client/public/index.html
  4. 18
      fir_client/public/short.html
  5. 75
      fir_client/src/Download.vue
  6. 374
      fir_client/src/components/FirDownload.vue
  7. 42
      fir_client/src/components/FirRegist.vue
  8. 6
      fir_client/src/components/FirUserProfileInfo.vue
  9. 1654
      fir_client/src/components/ShortDownload.vue
  10. 3
      fir_client/src/main.js
  11. 31
      fir_client/src/main.short.js
  12. 115
      fir_client/src/restful/download.js
  13. 17
      fir_client/src/restful/index.js
  14. 26
      fir_client/src/router/download.js
  15. 108
      fir_client/src/router/index.js
  16. 26
      fir_client/src/router/short.js
  17. 11
      fir_client/src/short.js
  18. 1
      fir_client/src/utils/index.js
  19. 69
      fir_client/vue.config.js
  20. 8
      fir_ser/nginx-vhost.conf

@ -19,6 +19,25 @@ yarn build
``` ```
yarn lint yarn lint
``` ```
### mshort 和 short 区别
区别就是引用的下载不同,mshort 下面也引用了elemet , short 没有引用,mshort最终包400kb 左右,short 130kb ,体积相差3倍左右
### deploy nginx
```
location ~ ^/(index|apps|user|login|register|supersign) {
try_files $uri $uri/ /index.html;
}
# location / {
# try_files $uri $uri/ /mshort.html;
# }
location / {
try_files $uri $uri/ /short.html;
}
```
### Customize configuration ### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/). See [Configuration Reference](https://cli.vuejs.org/config/).

@ -0,0 +1,3 @@
window.g = {
baseUrl: 'https://fly.harmonygames.cn',
};

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

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<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>App下载</title>
</head>
<body>
<noscript>
<strong>We're sorry but fly doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="download"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -0,0 +1,75 @@
<template>
<div id="download" ref="download">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'download',
data() {
return {}
},
}
</script>
<style>
body {
background-color: rgba(0, 166, 224, 0.18)
}
@font-face {
font-family: "iconfont";
src: url('./assets/icon/iconfont.eot?t=1583637102320'); /* IE9 */
src: url('./assets/icon/iconfont.eot?t=1583637102320#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAnUAAsAAAAAEXwAAAmIAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEIAqUYJBKATYCJAMoCxYABCAFhG0HdhuGDlGUL1aT7CuMW3giIDU2lBZVYzMmA6BYbBoB4AIAvsWyNCR1ZYRAPDyt/e/cmdn1b4KYdG+eSCaJRMWjWPVE6ZTyQkZL4P/W2j938EFdZvf2bG4F1UgXqyQeKfBIqpGQb4i2eQ/W/4P6Ek9oYwayNWYT2liwtS7KBWzNL+pBXQarNpcN/6uINB8EdIMjCcASCSSx4cAb7oGJPvjzf6maMe0OLEmbbAtQ1TLH+t2bjwpcoLGH1RZY9/OCWElqEp69Ctt/lUoZgKMJ9DZKJTpb39oLSoVQBWoeMPQUKGtmZQQOra7u2bKID6DSppeMC3hP7x//HA0lSZWJNS/fr5uFyp+QiaT/uZpYwYv1OWFuR8Z+oBDfe93f5Fy5n9R9H1g8BBYZNWVZ128wWubB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1YR3AhGA9UOqmhVWC7/HngiboCBZbg4KDzga9uu/nfkayyrXNtb5N0LO3U5vStQ1TJl+Jq2M/00nrlp1baILFTn7eSQjGzoIaSRi7V5FYhGUuwcaARMOYt59wXsE8J7+YWJonyFWLkc/AlG4gigJdJjGTQJ1iCbNXk56FOQWmJZOoT+UzxdQWBqaOatItGSBI3E3MxD40KfmrXQpS5vyRCZc+X53Qn98Zz0aZ+yj0f0oB601pJcIT/LFKmMNKINMsffEGFomXauqjNqtKllBO4+/UP+993doltuQfXLtU0pPGBnrW2o4u+P30yuA4vdY6Qe/t07D9YAFHIkqHvfYUeph1RU+m/aBns24EEAD/Rq8s+xcelTUkEMB7JTjY42BnMOokDk8JeBZNLyFmhvio0Caos9puTM95priqjCj9mOOZGMpKz2zmGrAPc+tYh5+nswWBQhRHvKheOR72eAjyc8SFZ4R0pyD4izMyqL5102eIF9TO4GBThIR9FjJtiZ8xg/ChkAXq1tt3w2hzPKZwI736/P0wDo+ZPZIlXSYD3aD2sXrdF5A3j5ZNUJ0UFHXkEF5IverEPDJNIP7+xVywGYJ0ziWSfsUy1NEorjp9+1rvrS37se5DXLePFDlKVFFHE2100cegueWb5QgzqyRdljFPtoQhvCSjo0cKVVaMkK2o4rlyAAA=') format('woff2'),
url('./assets/icon/iconfont.woff?t=1583637102320') format('woff'),
url('./assets/icon/iconfont.ttf?t=1583637102320') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('./assets/icon/iconfont.svg?t=1583637102320#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-android:before {
content: "\e61d";
}
.icon-android1:before {
content: "\e616";
}
.icon-android2:before {
content: "\e62a";
}
.icon-ios:before {
content: "\e60c";
}
.icon-IOS:before {
content: "\e68c";
}
.icon-ios1:before {
content: "\e601";
}
.icon-ios2:before {
content: "\e64b";
}
.icon-Android:before {
content: "\e6d4";
}
.icon-android3:before {
content: "\e625";
}
</style>

@ -1,187 +1,184 @@
<template> <template>
<el-container> <el-container class="container">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
<el-header>
</el-header>
<el-main> <div class="wechat_tip_content" v-if="agent === 'wxandroid' || agent === 'wxapple'">
<div class="wechat_tip_content" v-if="agent === 'wxandroid' || agent === 'wxapple'"> <div class="wechat_tip" v-show="agent === 'wxandroid'">
<div class="wechat_tip" v-show="agent === 'wxandroid'"> <i class="triangle-up"></i>请点击右上角<br>选择"在浏览器打开"
<i class="triangle-up"></i>请点击右上角<br>选择"在浏览器打开"
</div>
<div class="wechat_tip" v-show="agent === 'wxapple'">
<i class="triangle-up"></i>请点击右上角<br>选择"在Safari中打开"
</div>
</div> </div>
<div v-else> <div class="wechat_tip" v-show="agent === 'wxapple'">
<!-- <span class="pattern left"><img src="../assets/download_pattern_left.png"></span>--> <i class="triangle-up"></i>请点击右上角<br>选择"在Safari中打开"
<!-- <span class="pattern right"><img src="../assets/download_pattern_right.png"></span>-->
</div> </div>
</div>
<div v-else>
<!-- <span class="pattern left"><img src="../assets/download_pattern_left.png"></span>-->
<!-- <span class="pattern right"><img src="../assets/download_pattern_right.png"></span>-->
</div>
<el-container class="out-container container" v-if="wxeasytypeflag">
<div class="main">
<header>
<div class="table-container">
<div class="cell-container">
<div class="app-brief">
<div class="icon-container wrapper">
<i class="i bg-path"></i>
<span class="icon"><img
:src="mcurrentappinfo.icon_url"></span>
<span id="qrcode" class="qrcode">
</span>
</div>
<p v-if="currentappinfo.issupersign" class="scan-tips wrapper icon-warp">超级签</p>
<p v-else class="scan-tips wrapper icon-warp">{{ mcurrentappinfo.release_type|getiOStype
}}</p>
<h1 class="name wrapper">
<span class="icon-warp" style="margin-left:0px">
<i v-if="currentappinfo.type === 0 && agent !== ''"
class="iconfont icon-android2"/>
<i v-if="currentappinfo.type === 1 && agent !== ''"
class="iconfont icon-ios"/>
{{ currentappinfo.name }}
</span>
</h1>
<p class="scan-tips" style="margin-left:170px">扫描二维码下载<br/>或用手机浏览器输入这个网址<span
class="text-black">{{ full_url }}</span></p>
<div class="release-info">
<p>{{ mcurrentappinfo.app_version }}Build {{ mcurrentappinfo.build_version }}-
{{ mcurrentappinfo.binary_size }}</p>
<p>更新于{{ mcurrentappinfo.created_time |formatTime}}</p>
<p class="version" v-if="mcurrentappinfo.changelog && agent === ''">
更新日志{{ mcurrentappinfo.changelog }}
</p>
</div>
<el-container class="out-container" v-if="wxeasytypeflag"> <div id="actions" class="actions" v-if="agent !==''">
<div class="main">
<!-- <div class="main" v-if="(agent !== 'wxandroid' && agent !== 'wxapple')">-->
<header>
<div class="table-container">
<div class="cell-container">
<div class="app-brief">
<div class="icon-container wrapper">
<i class="i bg-path"></i>
<span class="icon"><img
:src="mcurrentappinfo.icon_url"></span>
<span id="qrcode" class="qrcode">
</span>
</div>
<p v-if="currentappinfo.issupersign" class="scan-tips wrapper icon-warp">超级签</p>
<p v-else class="scan-tips wrapper icon-warp">{{
mcurrentappinfo.release_type|getiOStype }}</p>
<h1 class="name wrapper">
<span class="icon-warp" style="margin-left:0px">
<i v-if="currentappinfo.type === 0 && agent !== ''"
class="iconfont icon-android2"/>
<i v-if="currentappinfo.type === 1 && agent !== ''"
class="iconfont icon-ios"/>
{{ currentappinfo.name }}
</span>
</h1>
<p class="scan-tips" style="margin-left:170px">扫描二维码下载<br/>或用手机浏览器输入这个网址<span
class="text-black">{{ full_url }}</span></p>
<div class="release-info">
<p>{{ mcurrentappinfo.app_version }}Build {{ mcurrentappinfo.build_version }}-
{{ mcurrentappinfo.binary_size }}</p>
<p>更新于{{ mcurrentappinfo.created_time |formatTime}}</p>
<p class="version" v-if="mcurrentappinfo.changelog && agent === ''">
更新日志{{ mcurrentappinfo.changelog }}
</p>
</div>
<div id="actions" class="actions" v-if="agent !==''">
<el-button type="info" round <el-button type="info" round v-if="agent === 'wxandroid' || agent === 'wxapple'">
v-if="agent === 'wxandroid' || agent === 'wxapple'">不支持在微信内下载 不支持在微信内下载
</el-button> </el-button>
<button type="button" v-else-if="wrong">{{ msg }}</button> <button type="button" v-else-if="wrong">{{ msg }}</button>
<div v-else> <div v-else>
<div v-if="isdownload"> <div v-if="isdownload">
<div v-if="gomobile"> <div v-if="gomobile">
<button disabled="" class="loading" <button disabled="" class="loading"
style="min-width: 42px; width: 42px; padding: 21px 0; border-top-color: transparent; border-left-color: transparent;"> style="min-width: 42px; width: 42px; padding: 21px 0; border-top-color: transparent; border-left-color: transparent;">
</button> </button>
</div>
<div v-else>
<div class="actions type-ios">
<div><p>正在安装请按 Home 键在桌面查看</p>
<p v-if="!this.currentappinfo.issupersign">
<button @click="gomobileaction">
<el-link icon="el-icon-loadings" type="primary"
:underline="false">
立即信任
</el-link>
</button>
</p>
</div>
</div>
</div>
</div> </div>
<div v-else> <div v-else>
<div v-if="currentappinfo.need_password" <div class="actions type-ios">
style="margin:0 auto; width:166px"> <div><p>正在安装请按 Home 键在桌面查看</p>
<el-input prefix-icon="el-icon-lock" clearable <p v-if="!this.currentappinfo.issupersign">
placeholder="请输入密码" v-model="password" <button @click="gomobileaction">
icon="el-icon-loadings" type="primary" <el-link icon="el-icon-loadings" type="primary"
:underline="false"></el-input> :underline="false">
立即信任
</el-link>
</button>
</p>
</div>
</div> </div>
<el-divider v-if="currentappinfo.need_password"></el-divider>
<button @click="download">
<el-link icon="el-icon-loadings" type="primary"
:underline="false">
下载安装
</el-link>
</button>
</div> </div>
</div>
<div v-else>
<div v-if="currentappinfo.need_password" style="margin:0 auto; width:166px">
<el-input prefix-icon="el-icon-lock" clearable
placeholder="请输入密码" v-model="password"
icon="el-icon-loadings" type="primary"
:underline="false"></el-input>
</div>
<el-divider v-if="currentappinfo.need_password"></el-divider>
<button @click="download">
<el-link icon="el-icon-loadings" type="primary"
:underline="false">
下载安装
</el-link>
</button>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</header>
<div class="per-type-info section" v-if="currentappinfo.app_id && agent === ''">
<div class="type" v-if="miscomboappinfo.release_id">
<div class="info">
<p class="type-icon" v-if="iscomboappinfo.type === 0">
<i class="iconfont icon-android2"/>
</p>
<p class="type-icon" v-else>
<i class="iconfont icon-ios"/>
</p>
<p class="version">
关联版本{{ miscomboappinfo.app_version }}Build {{ miscomboappinfo.build_version }}
</p>
<p class="version">
文件大小{{ miscomboappinfo.binary_size }}<br>
</p>
<p class="version">
更新于{{ miscomboappinfo.created_time |formatTime }}
</p>
<p class="version" v-if="miscomboappinfo.changelog">
更新日志{{ miscomboappinfo.changelog }}
</p>
</div>
</div>
<div class="type">
<div class="info">
<p class="type-icon" v-if="currentappinfo.type === 0">
<i class="iconfont icon-android2"/>
</p>
<p class="type-icon" v-else>
<i class="iconfont icon-ios"/>
</p>
<p class="version">
当前版本{{ mcurrentappinfo.app_version }}Build {{ mcurrentappinfo.build_version }}
</p>
<p class="version">
文件大小{{ mcurrentappinfo.binary_size }}
</p>
<p class="version">
更新于{{ mcurrentappinfo.created_time|formatTime}}
</p>
<p class="version" v-if="mcurrentappinfo.changelog">
更新日志{{ mcurrentappinfo.changelog }}
</p>
</div> </div>
</div> </div>
</div> </div>
<div class="per-type-info " v-else> </header>
<div class="release-info">
<div class="info" v-if="mcurrentappinfo.changelog"> <div class="per-type-info section" v-if="currentappinfo.app_id && agent === ''">
<h3>更新日志</h3> <div class="type" v-if="miscomboappinfo.release_id">
{{ mcurrentappinfo.changelog }} <div class="info">
</div> <p class="type-icon" v-if="iscomboappinfo.type === 0">
<i class="iconfont icon-android2"/>
</p>
<p class="type-icon" v-else>
<i class="iconfont icon-ios"/>
</p>
<p class="version">
关联版本{{ miscomboappinfo.app_version }}Build {{ miscomboappinfo.build_version }}
</p>
<p class="version">
文件大小{{ miscomboappinfo.binary_size }}<br>
</p>
<p class="version">
更新于{{ miscomboappinfo.created_time |formatTime }}
</p>
<p class="version" v-if="miscomboappinfo.changelog">
更新日志{{ miscomboappinfo.changelog }}
</p>
</div> </div>
</div>
<div class="type">
<div class="info">
<p class="type-icon" v-if="currentappinfo.type === 0">
<i class="iconfont icon-android2"/>
</p>
<p class="type-icon" v-else>
<i class="iconfont icon-ios"/>
</p>
<p class="version">
当前版本{{ mcurrentappinfo.app_version }}Build {{ mcurrentappinfo.build_version }}
</p>
<p class="version">
文件大小{{ mcurrentappinfo.binary_size }}
</p>
<p class="version">
更新于{{ mcurrentappinfo.created_time|formatTime}}
</p>
<p class="version" v-if="mcurrentappinfo.changelog">
更新日志{{ mcurrentappinfo.changelog }}
</p>
</div>
</div> </div>
</div> </div>
<div class="per-type-info " v-else>
<div class="release-info">
<div class="info" v-if="mcurrentappinfo.changelog">
<h3>更新日志</h3>
{{ mcurrentappinfo.changelog }}
</div>
</div>
</el-container> </div>
<div v-else>
<i>
{{this.currentappinfo.name | formatName}}
</i>
</div> </div>
</el-main> </el-container>
<div v-else>
<i>
{{this.currentappinfo.name | formatName}}
</i>
</div>
</el-container> </el-container>
@ -230,7 +227,6 @@
if (res.code === 1000) { if (res.code === 1000) {
if (res.data.download_url === "") { if (res.data.download_url === "") {
window.location.href = this.full_url.split("?")[0]; window.location.href = this.full_url.split("?")[0];
// window.location.href = this.full_url;
return return
} }
if (this.currentappinfo.type === 1) { if (this.currentappinfo.type === 1) {
@ -243,7 +239,6 @@
this.timmer = setTimeout(data => { this.timmer = setTimeout(data => {
this.gomobile = false; this.gomobile = false;
}, 5000); }, 5000);
} }
} else { } else {
if (this.agent !== '') { if (this.agent !== '') {
@ -306,7 +301,6 @@
text: location.href, // text: location.href, //
}) })
} }
}, },
auto_redircet_url(domain_name) { auto_redircet_url(domain_name) {
if (domain_name) { if (domain_name) {
@ -437,7 +431,6 @@
}, },
getAgent() { getAgent() {
const ua = navigator.userAgent.toLowerCase(); const ua = navigator.userAgent.toLowerCase();
const browser = { const browser = {
versions: function () { versions: function () {
const u = navigator.userAgent; const u = navigator.userAgent;
@ -463,9 +456,9 @@
this.agent = 'wxapple'; this.agent = 'wxapple';
// //
} else { } else {
if(browser.versions.macos){ if (browser.versions.macos) {
this.agent=''; this.agent = '';
}else { } else {
this.agent = 'apple'; this.agent = 'apple';
} }
} }
@ -485,16 +478,19 @@
if (this.agent === '') { if (this.agent === '') {
this.wxeasytypeflag = true; this.wxeasytypeflag = true;
} }
} }
}, created() { }, created() {
this.getAgent(); this.getAgent();
}, mounted() { }, mounted() {
this.getDownloadTokenFun(); this.getDownloadTokenFun();
// this.full_url = location.href.split("?")[0];
this.full_url = location.href; this.full_url = location.href;
this.qrcode(); this.qrcode();
}, filters: { }, filters: {
formatName: function (name) {
if (name) {
return name.replace("麻将", "").replace("斗地主", "").replace("棋牌", "")
}
},
getiOStype: function (type) { getiOStype: function (type) {
let ftype = ''; let ftype = '';
if (type === 1) { if (type === 1) {
@ -504,11 +500,6 @@
} }
return ftype return ftype
}, },
formatName: function (name) {
if (name) {
return name.replace("麻将", "").replace("斗地主", "").replace("棋牌", "")
}
},
formatTime: function (stime) { formatTime: function (stime) {
if (stime) { if (stime) {
stime = stime.split(".")[0].split("T"); stime = stime.split(".")[0].split("T");
@ -591,9 +582,9 @@
} }
.el-container { .container {
margin: 0; margin: 0;
padding: 0; padding: 60px 0 0;
height: 100%; height: 100%;
color: #a9b1b3; color: #a9b1b3;
font-size: 14px; font-size: 14px;
@ -877,38 +868,6 @@
display: none display: none
} }
.passwd form {
text-align: center
}
.passwd form h4 {
font-weight: 400;
font-size: 18px
}
.passwd form button, .passwd form input {
padding: 12px 20px;
width: 300px;
border: 1px solid #f8ba0b;
border-radius: 5px;
font-size: 16px
}
.passwd form button:focus, .passwd form input:focus {
outline: 0
}
.passwd form input {
color: #f8ba0b;
text-align: center
}
.passwd form button {
border-color: #f8ba0b;
background-color: #f8ba0b;
color: #fff;
cursor: pointer
}
.main .icon-container { .main .icon-container {
position: relative; position: relative;
@ -1073,6 +1032,15 @@
color: #fff color: #fff
} }
.main > header .actions input {
display: inline-block;
padding: 12px 46px;
width: 166px;
border: 1px solid #32b2a7;
border-radius: 40px;
font-size: 14px;
}
.main > header .actions button a { .main > header .actions button a {
color: #fff color: #fff
} }

@ -44,24 +44,24 @@
</el-row> </el-row>
</el-form-item> </el-form-item>
<!-- <el-form-item>--> <!-- <el-form-item>-->
<!-- <el-input v-model="form.phone" prefix-icon="el-icon-mobile" placeholder="手机"--> <!-- <el-input v-model="form.phone" prefix-icon="el-icon-mobile" placeholder="手机"-->
<!-- maxlength="11"></el-input>--> <!-- maxlength="11"></el-input>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-form-item>--> <!-- <el-form-item>-->
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="16">--> <!-- <el-col :span="16">-->
<!-- <el-input v-model="form.phonecode" prefix-icon="el-icon-mobile"--> <!-- <el-input v-model="form.phonecode" prefix-icon="el-icon-mobile"-->
<!-- placeholder="验证码"></el-input>--> <!-- placeholder="验证码"></el-input>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="8">--> <!-- <el-col :span="8">-->
<!-- <el-button type="info" @click="getphonecode" plain--> <!-- <el-button type="info" @click="getphonecode" plain-->
<!-- style="margin:0px 4px;border-radius:4px;cursor:pointer;height: 40px">获取验证码--> <!-- style="margin:0px 4px;border-radius:4px;cursor:pointer;height: 40px">获取验证码-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="danger" @click="onRegist">注册</el-button> <el-button type="danger" @click="onRegist">注册</el-button>
@ -125,7 +125,7 @@
if (this.isEmail(email)) { if (this.isEmail(email)) {
let authcode = this.form.authcode; let authcode = this.form.authcode;
if (authcode.length === this.cptch.length) { if (authcode.length === this.cptch.length) {
if(password === password2 && password.length >= 6){ if (password === password2 && password.length >= 6) {
registerFun(data => { registerFun(data => {
if (data.code == 1000) { if (data.code == 1000) {
this.$message({ this.$message({
@ -150,7 +150,7 @@
"cptch_key": this.cptch.cptch_key "cptch_key": this.cptch.cptch_key
} }
}); });
}else { } else {
this.$message({ this.$message({
message: '密码不一致或者密码长度小于6', message: '密码不一致或者密码长度小于6',
type: 'warning' type: 'warning'
@ -184,7 +184,7 @@
} }
, ,
created() { created() {
},mounted() { }, mounted() {
this.get_auth_code(); this.get_auth_code();
} }
} }

@ -98,7 +98,7 @@
userinfo: { userinfo: {
srccode: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', srccode: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
}, },
orguserinfo:{}, orguserinfo: {},
editphone: false, editphone: false,
editdomain_name: false, editdomain_name: false,
editposition: false editposition: false
@ -119,7 +119,7 @@
updateUserInfo(datainfo) { updateUserInfo(datainfo) {
userinfos(data => { userinfos(data => {
if (data.code === 1000) { if (data.code === 1000) {
let phonenumber=null; let phonenumber = null;
if (data.data.sms_code) { if (data.data.sms_code) {
phonenumber = this.userinfo.mobile; phonenumber = this.userinfo.mobile;
this.$notify({ this.$notify({
@ -131,7 +131,7 @@
this.userinfo = data.data; this.userinfo = data.data;
this.$store.dispatch("doUserinfo", data.data); this.$store.dispatch("doUserinfo", data.data);
this.orguserinfo = deepCopy(data.data); this.orguserinfo = deepCopy(data.data);
if(phonenumber){ if (phonenumber) {
this.userinfo.mobile = phonenumber; this.userinfo.mobile = phonenumber;
} }

File diff suppressed because it is too large Load Diff

@ -4,7 +4,6 @@ import router from "@/router";
// import ElementUI from 'element-ui' // import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css' import 'element-ui/lib/theme-chalk/index.css'
import Vuex from 'vuex' import Vuex from 'vuex'
import qiniu from 'qiniu-js' import qiniu from 'qiniu-js'
import oss from 'ali-oss' import oss from 'ali-oss'
@ -84,7 +83,7 @@ import {
Slider, Slider,
DropdownMenu, DropdownMenu,
Dropdown, Dropdown,
Breadcrumb,Avatar,DropdownItem,RadioButton,RadioGroup,OptionGroup,Progress,Timeline,TimelineItem,Card Breadcrumb, Avatar, DropdownItem, RadioButton, RadioGroup, OptionGroup, Progress, Timeline, TimelineItem, Card
} from "element-ui"; } from "element-ui";
Vue.use(Progress); Vue.use(Progress);

@ -0,0 +1,31 @@
import Vue from 'vue'
import Download from "@/Download";
import router from "@/router/download";
import 'element-ui/lib/theme-chalk/index.css'
import {
Button,
Input,
Container,
Main,
Message,
Link,
Divider
} from "element-ui";
Vue.use(Link);
Vue.use(Input);
Vue.use(Button);
Vue.use(Container);
Vue.use(Main);
Vue.use(Divider);
Vue.prototype.$message = Message;
Vue.config.productionTip = false;
new Vue({
render: h => h(Download),
router,
}).$mount('#download');

@ -0,0 +1,115 @@
import Axios from 'axios'
// const https = require('https');
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
Axios.defaults.withCredentials = true;
// Axios.defaults.httpsAgent = new https.Agent({
// keepAlive: true
// });
// const DOMAIN = 'https://fly.harmonygames.cn';
const DOMAIN = window.g.baseUrl;
const APIPATH = '/api/v1/fir/server';
let USERSEVER = DOMAIN + APIPATH;
function getData(url, params = {}, callBack) {
var uri = '';
var keys = Object.keys(params);
var values = Object.values(params);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = values[i];
uri = uri + key + "=" + value;
if (i < keys.length - 1) {
uri = uri + "&"
}
}
if (uri !== "") {
uri = "?" + uri
}
url = url + uri;
Axios
.get(url, params)
.then(function (response) {
callBack(response.data);
let x = '';
if (x !== '') {
alert(x)
}
})
.catch(function (error) {
if (error && error.response) {
switch (error.response.status) {
case 400:
error.message = '请求错误(400)';
break;
case 401:
error.message = '未授权,请重新登录(401)';
break;
case 403:
error.message = '拒绝访问(403)';
break;
case 404:
error.message = '请求出错(404)';
break;
case 408:
error.message = '请求超时(408)';
break;
case 500:
error.message = '服务器错误(500)';
break;
case 501:
error.message = '服务未实现(501)';
break;
case 502:
error.message = '网络错误(502)';
break;
case 503:
error.message = '服务不可用(503)';
break;
case 504:
error.message = '网络超时(504)';
break;
case 505:
error.message = 'HTTP版本不受支持(505)';
break;
default:
error.message = `连接出错(${error.response.status})!`;
}
} else {
error.message = '连接服务器失败!';
}
if (error.message === 'Network Error') {
alert('网络连接失败')
}
callBack({"code": -1});
});
}
/**根据短链接获取应用信息 */
export function getShortAppinfo(callBack, params) {
getData(
USERSEVER + '/short/' + params.short,
params,
data => {
callBack(data);
},
);
}
/**获取下载的url */
export function getdownloadurl(callBack, params) {
getData(
USERSEVER + '/install/' + params.app_id,
params.data,
data => {
callBack(data);
},
);
}

@ -11,7 +11,8 @@ Axios.defaults.withCredentials = true;
// }); // });
const DOMAIN = 'https://fly.harmonygames.cn'; // const DOMAIN = 'https://fly.harmonygames.cn';
const DOMAIN = window.g.baseUrl;
// const DOMAIN = 'https://testapp.harmonygames.cn'; // const DOMAIN = 'https://testapp.harmonygames.cn';
// const DOMAIN = 'http://172.16.133.34:8000'; // const DOMAIN = 'http://172.16.133.34:8000';
const APIPATH = '/api/v1/fir/server'; const APIPATH = '/api/v1/fir/server';
@ -84,6 +85,8 @@ function ErrorMsg(error) {
error.message = `连接出错(${error.response.status})!`; error.message = `连接出错(${error.response.status})!`;
} }
} else { } else {
// eslint-disable-next-line no-console
console.log(error)
error.message = '连接服务器失败!'; error.message = '连接服务器失败!';
} }
if (error.response && error.response.status === 403) { if (error.response && error.response.status === 403) {
@ -305,12 +308,12 @@ export function getapppicurl(app_id) {
return USERSEVER + '/apps/' + app_id return USERSEVER + '/apps/' + app_id
} }
export function getuploadurl(domain_name=null) { export function getuploadurl(domain_name = null) {
if (domain_name) { if (domain_name) {
return domain_name + APIPATH + '/upload' return domain_name + APIPATH + '/upload'
} else { } else {
return USERSEVER + '/upload'; return USERSEVER + '/upload';
} }
} }

@ -0,0 +1,26 @@
import Vue from 'vue'
//1.先导入
import VueRouter from 'vue-router'
//2.一定先use 一下
Vue.use(VueRouter);
// 解决push 同一个路由的错误
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
};
// import FirDownload from "@/components/FirDownload";
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/:short',
name: 'FirDownload',
// component: () => import("@/components/ShortDownload")
component: ()=>import("@/components/FirDownload")
}
]
});
export default router;

@ -11,24 +11,24 @@ VueRouter.prototype.push = function push(location) {
}; };
import FirIndex from "@/components/FirIndex"; // import FirIndex from "@/components/FirIndex";
import FirApps from "@/components/FirApps"; // import FirApps from "@/components/FirApps";
import FirLogin from "@/components/FirLogin"; // import FirLogin from "@/components/FirLogin";
import FirRegist from "@/components/FirRegist"; // import FirRegist from "@/components/FirRegist";
import FirDownload from "@/components/FirDownload"; // import FirDownload from "@/components/FirDownload";
import FirAppBase from "@/components/FirAppBase"; // import FirAppBase from "@/components/FirAppBase";
import FirAppInfosBase from "@/components/FirAppInfosBase"; // import FirAppInfosBase from "@/components/FirAppInfosBase";
import FirAppInfostimeline from "@/components/FirAppInfostimeline"; // import FirAppInfostimeline from "@/components/FirAppInfostimeline";
import FirAppInfosbaseinfo from "@/components/FirAppInfosbaseinfo"; // import FirAppInfosbaseinfo from "@/components/FirAppInfosbaseinfo";
import FirAppInfossecurity from "@/components/FirAppInfossecurity"; // import FirAppInfossecurity from "@/components/FirAppInfossecurity";
import FirAppInfosdevices from "@/components/FirAppInfosdevices"; // import FirAppInfosdevices from "@/components/FirAppInfosdevices";
import FirAppInfoscombo from "@/components/FirAppInfoscombo"; // import FirAppInfoscombo from "@/components/FirAppInfoscombo";
import FirUserProfileBase from "@/components/FirUserProfileBase"; // import FirUserProfileBase from "@/components/FirUserProfileBase";
import FirUserProfileInfo from "@/components/FirUserProfileInfo"; // import FirUserProfileInfo from "@/components/FirUserProfileInfo";
import FirUserProfileChangePwd from "@/components/FirUserProfileChangePwd"; // import FirUserProfileChangePwd from "@/components/FirUserProfileChangePwd";
import FirUserProfileStorage from "@/components/FirUserProfileStorage"; // import FirUserProfileStorage from "@/components/FirUserProfileStorage";
//
import FirSuperSignBase from "@/components/FirSuperSignBase"; // import FirSuperSignBase from "@/components/FirSuperSignBase";
const router = new VueRouter({ const router = new VueRouter({
mode: 'history', mode: 'history',
@ -41,47 +41,61 @@ const router = new VueRouter({
{ {
path: '/index', path: '/index',
name: 'FirIndex', name: 'FirIndex',
component: FirIndex component: () => import("@/components/FirIndex")
}, },
{ {
path: '/apps', path: '/apps',
component: FirAppBase, // component: FirAppBase,
component: () => import("@/components/FirAppBase"),
children: [ children: [
{ {
path: '', path: '',
name: 'FirApps', name: 'FirApps',
component: FirApps, component: () => import("@/components/FirApps"),
} }
, ,
{ {
path: ':id', path: ':id',
component: FirAppInfosBase, // component: FirAppInfosBase,
component: () => import("@/components/FirAppInfosBase"),
children: [ children: [
{ {
path: '', path: '',
name: 'FirAppInfostimeline', name: 'FirAppInfostimeline',
component: FirAppInfostimeline, // component: FirAppInfostimeline,
component: () => import("@/components/FirAppInfostimeline"),
} }
, ,
{ {
path: 'info', path: 'info',
name: 'FirAppInfosbaseinfo', name: 'FirAppInfosbaseinfo',
component: FirAppInfosbaseinfo, // component: FirAppInfosbaseinfo,
component: () => import("@/components/FirAppInfosbaseinfo"),
}, },
{ {
path: 'security', path: 'security',
name: 'FirAppInfossecurity', name: 'FirAppInfossecurity',
component: FirAppInfossecurity // component: FirAppInfossecurity
component: () => import("@/components/FirAppInfossecurity"),
}, },
{ {
path: 'devices', path: 'devices',
name: 'FirAppInfosdevices', name: 'FirAppInfosdevices',
component: FirAppInfosdevices // component: FirAppInfosdevices
component: () => import("@/components/FirAppInfosdevices"),
}, },
{ {
path: 'combo', path: 'combo',
name: 'FirAppInfoscombo', name: 'FirAppInfoscombo',
component: FirAppInfoscombo, // component: FirAppInfoscombo,
component: () => import("@/components/FirAppInfoscombo"),
} }
] ]
} }
@ -89,24 +103,34 @@ const router = new VueRouter({
}, },
{ {
path: '/user', path: '/user',
component: FirAppBase, // component: FirAppBase,
component: () => import("@/components/FirAppBase"),
children: [ children: [
{ {
path: '', path: '',
component: FirUserProfileBase, // component: FirUserProfileBase,
component: () => import("@/components/FirUserProfileBase"),
children: [ children: [
{ {
path: 'info', path: 'info',
name: 'FirUserProfileInfo', name: 'FirUserProfileInfo',
component: FirUserProfileInfo, // component: FirUserProfileInfo,
component: () => import("@/components/FirUserProfileInfo"),
}, { }, {
path: 'setpasswd', path: 'setpasswd',
name: 'FirUserProfileChangePwd', name: 'FirUserProfileChangePwd',
component: FirUserProfileChangePwd // component: FirUserProfileChangePwd
component: () => import("@/components/FirUserProfileChangePwd"),
}, { }, {
path: 'storage', path: 'storage',
name: 'FirUserProfileStorage', name: 'FirUserProfileStorage',
component: FirUserProfileStorage // component: FirUserProfileStorage
component: () => import("@/components/FirUserProfileStorage"),
} }
] ]
} }
@ -116,28 +140,38 @@ const router = new VueRouter({
{ {
path: '/login', path: '/login',
name: 'FirLogin', name: 'FirLogin',
component: FirLogin // component: FirLogin
component: () => import("@/components/FirLogin"),
}, },
{ {
path: '/supersign', path: '/supersign',
component: FirAppBase, // component: FirAppBase,
component: () => import("@/components/FirAppBase"),
children: [ children: [
{ {
path: ':act', path: ':act',
name: 'FirSuperSignBase', name: 'FirSuperSignBase',
component: FirSuperSignBase, // component: FirSuperSignBase,
component: () => import("@/components/FirSuperSignBase"),
} }
] ]
}, },
{ {
path: '/register', path: '/register',
name: 'FirRegist', name: 'FirRegist',
component: FirRegist // component: FirRegist
component: () => import("@/components/FirRegist"),
}, },
{ {
path: '/:short', path: '/:short',
name: 'FirDownload', name: 'FirDownload',
component: FirDownload // component: FirDownload
component: () => import("@/components/FirDownload"),
}, },
] ]

@ -0,0 +1,26 @@
import Vue from 'vue'
//1.先导入
import VueRouter from 'vue-router'
//2.一定先use 一下
Vue.use(VueRouter);
// 解决push 同一个路由的错误
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
};
// import FirDownload from "@/components/FirDownload";
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/:short',
name: 'FirDownload',
component: ()=>import("@/components/ShortDownload")
// component: () => import("@/components/FirDownload")
}
]
});
export default router;

@ -0,0 +1,11 @@
import Vue from 'vue'
import Download from "@/Download";
import router from "@/router/short";
Vue.config.productionTip = false;
new Vue({
render: h => h(Download),
router,
}).$mount('#download');

@ -237,6 +237,7 @@ function getType(x) {
} }
} }
//深拷贝 //深拷贝
export function deepCopy(data) { export function deepCopy(data) {
let type = getType(data); let type = getType(data);

@ -1,5 +1,4 @@
'use strict'; const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
module.exports = { module.exports = {
pages: { pages: {
@ -17,8 +16,72 @@ module.exports = {
// 提取出来的通用 chunk 和 vendor chunk。 // 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'index'] chunks: ['chunk-vendors', 'chunk-common', 'index']
}, },
short: {
// page 的入口
entry: 'src/short.js',
// entry: 'src/main.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']
},
mshort: {
// page 的入口
// entry: 'src/short.js',
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']
}
}, },
productionSourceMap:false productionSourceMap: false,
chainWebpack: config => {
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'
})
}
config.optimization.splitChunks({
cacheGroups: {
vendors: {
name: 'chunk-vendors',
minChunks: 4,
test: /node_modules/,
priority: -10,
chunks: 'initial'
},
common: {}
}
});
}
}; };

@ -44,12 +44,16 @@ server
include uwsgi_params; include uwsgi_params;
uwsgi_pass 127.0.0.1:8899; uwsgi_pass 127.0.0.1:8899;
uwsgi_param UWSGI_SCRIPT wsgi; uwsgi_param UWSGI_SCRIPT wsgi;
} }
location ~ ^/(index|apps|user|login|supersign) { location ~ ^/(index|apps|user|login|register|supersign) {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
# location / {
# try_files $uri $uri/ /mshort.html;
# }
location / { location / {
try_files $uri $uri/ /short.html; try_files $uri $uri/ /short.html;
} }

Loading…
Cancel
Save