增加APP下载码保存本地功能

super_sign_new
nineven 4 years ago
parent 65bae2d9c8
commit fad08e4be2
  1. 1
      fir_client/package.json
  2. 45
      fir_client/src/components/FirAppInfosBase.vue
  3. 15
      fir_client/src/components/FirLogin.vue

@ -18,6 +18,7 @@
"qrcodejs2": "^0.0.2",
"vue": "^2.6.10",
"vue-cookies": "^1.7.0",
"vue-qr": "^2.3.0",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
},

@ -13,6 +13,25 @@
<span class="bundleid ng-binding">BundleID<b class="ng-binding">&nbsp;&nbsp;{{ appinfos.bundle_id }}</b></span>
<span class="version ng-scope">{{ master_release.minimum_os_version }}&nbsp; 或者高版本</span>
<span class="short ng-scope" v-if="appinfos.issupersign">已经开启超级签</span>
<el-popover
placement="right"
width="288">
<div style="text-align: center; margin: 0">
<vue-qr :margin="qrinfo.margin"
:logoSrc="icon_url" :logoScale="qrinfo.logoScale"
:logoCornerRadius="qrinfo.logoCornerRadius"
:correctLevel="qrinfo.correctLevel"
:text="short_url()" :size="266"
ref="qr">
</vue-qr>
<el-button type="primary" size="small" @click="save_qr()">保存本地</el-button>
</div>
<span class="short ng-scope" slot="reference">下载码</span>
</el-popover>
</div>
<div class="actions">
<el-button @click="appDownload" class="download" icon="el-icon-view">
@ -65,11 +84,34 @@
<script>
import {apputils} from "../restful";
import VueQr from 'vue-qr';
export default {
name: "FirAppInfosBase",
components: {
VueQr
},
data() {
return {
save_qr() {
let dtype = "I";
if (this.master_release.release_type === 0) {
dtype = "A";
}
let a = document.createElement('a');
//
a.download = this.appinfos.name + '_' + dtype + "_下载码";
//url
a.href = this.$refs.qr.$el.src;
//
a.dispatchEvent(new MouseEvent('click'))
},
qrinfo: {
logoScale: 0.3,
logoCornerRadius: 12,
correctLevel: 3,
margin: 20
},
icon_url: "",
appinfos: {},
master_release: {},
@ -80,6 +122,9 @@
}
},
methods: {
short_url() {
return location.origin + '/' + this.appinfos.short;
},
setfunactive(item, index) {
for (let key in this.$refs) {
if (key === item) {

@ -32,7 +32,11 @@
</el-tabs>
<el-form-item>
<el-form-item v-if="is_cptch">
<el-input v-model="form.password" prefix-icon="el-icon-lock" placeholder="密码" @keyup.enter.native="onSubmit"
show-password></el-input>
</el-form-item>
<el-form-item v-else>
<el-input v-model="form.password" prefix-icon="el-icon-lock" placeholder="密码"
show-password></el-input>
</el-form-item>
@ -91,12 +95,19 @@
}
},
methods: {
is_cptch(){
let cptch_flag= this.form.authcode.length === this.cptch.length;
if(this.cptch.cptch_key === '' || !this.cptch.cptch_key){
cptch_flag = true
}
return cptch_flag
},
onSubmit() {
let email = this.form.email;
let password = this.form.password;
let authcode = this.form.authcode;
let login_type = 'up';
let cptch_flag= authcode.length === this.cptch.length;
let cptch_flag= this.form.authcode.length === this.cptch.length;
if(this.cptch.cptch_key === '' || !this.cptch.cptch_key){
cptch_flag = true
}

Loading…
Cancel
Save