更新前端页面

qrnn
MMXX 3 years ago
parent e8e6ea962a
commit 979b6f0386
  1. 4
      fir_client/src/components/FirBase.vue
  2. 23
      fir_client/src/components/apps/FirAppInfosBase.vue
  3. 2
      fir_client/src/components/apps/FirAppInfossecurity.vue
  4. 23
      fir_client/src/components/apps/FirAppInfostimeline.vue
  5. 8
      fir_client/src/components/apps/FirApps.vue
  6. 15
      fir_client/src/components/base/BindDomain.vue
  7. 3
      fir_client/src/components/user/FirUserAdvert.vue
  8. 59
      fir_client/src/components/user/FirUserDomain.vue
  9. 27
      fir_client/src/components/user/FirUserQrcode.vue
  10. 4
      fir_client/src/store/index.js

@ -18,7 +18,7 @@
effect="dark" effect="dark"
type="error"> type="error">
<div slot="title"> <div slot="title">
<span class="domian-tip-bar">应用分发请绑定您自己的域名平台分发域名可能因不可违因素更换将导致您的应用无法访问</span> <span class="domain-tip-bar">应用分发请绑定您自己的域名平台分发域名可能因不可违因素更换将导致您的应用无法访问</span>
<el-button size="small" @click="bind_domain_type=1,bind_domain_sure=true">立即绑定</el-button> <el-button size="small" @click="bind_domain_type=1,bind_domain_sure=true">立即绑定</el-button>
</div> </div>
</el-alert> </el-alert>
@ -118,7 +118,7 @@ export default {
padding-top: 30px; padding-top: 30px;
} }
.domian-tip-bar { .domain-tip-bar {
line-height: 43px; line-height: 43px;
color: #fff; color: #fff;
font-weight: 500; font-weight: 500;

@ -15,7 +15,6 @@
</el-tooltip> </el-tooltip>
<el-popover <el-popover
v-if="$store.state.userinfo&&$store.state.userinfo.role >1 &&$store.state.userinfo.qrcode_domain_name.length>3 "
placement="right" placement="right"
width="288"> width="288">
<div style="text-align: center; margin: 0"> <div style="text-align: center; margin: 0">
@ -24,7 +23,7 @@
:logoScale="qrinfo.logoScale" :logoScale="qrinfo.logoScale"
:logoSrc="icon_url" :logoSrc="icon_url"
:margin="qrinfo.margin" :size="266" :margin="qrinfo.margin" :size="266"
:text="short_url()"> :text="short_url(appinfos)">
</vue-qr> </vue-qr>
<el-button size="small" type="primary" @click="save_qr()">保存本地</el-button> <el-button size="small" type="primary" @click="save_qr()">保存本地</el-button>
</div> </div>
@ -51,7 +50,7 @@
</div> </div>
<div class="actions"> <div class="actions">
<el-button v-if="appinfos.status!==1" type="danger">该应用被封禁,请联系管理员</el-button> <el-button v-if="appinfos.status!==1" type="danger">该应用被封禁,请联系管理员</el-button>
<el-button v-else class="download" icon="el-icon-view" @click="appDownload"> <el-button v-else class="download" icon="el-icon-view" @click="appDownload(appinfos)">
预览 预览
</el-button> </el-button>
</div> </div>
@ -150,11 +149,8 @@ export default {
// //
a.dispatchEvent(new MouseEvent('click')) a.dispatchEvent(new MouseEvent('click'))
}, },
short_url() { short_url(appinfo) {
const userinfo = this.$store.state.userinfo; return appinfo.preview_url+ '/' + appinfo.short;
if (userinfo && userinfo.role > 1 && userinfo.qrcode_domain_name.length > 3) {
return 'http://' + userinfo.qrcode_domain_name + '/' + this.appinfos.short;
}
}, },
setfunactive(item, index) { setfunactive(item, index) {
for (let key in this.$refs) { for (let key in this.$refs) {
@ -171,15 +167,8 @@ export default {
} }
} }
}, },
appDownload() { appDownload(appinfo) {
let routeData = this.$router.resolve({name: 'FirDownload', params: {short: this.appinfos.short}}); window.open(this.short_url(appinfo), '_blank', '');
// window.open(routeData.href, '_blank');
let p_url = routeData.href;
// let p_url = location.origin + '/' + this.appinfos.short;
if (this.appinfos.preview_url && this.appinfos.preview_url.length > 6) {
p_url = this.appinfos.preview_url + p_url
}
window.open(p_url, '_blank', '');
}, },
defaulttimeline() { defaulttimeline() {
this.setfunactive('timeline', 5); this.setfunactive('timeline', 5);

@ -7,7 +7,7 @@
title="绑定应用专属下载页域名" title="绑定应用专属下载页域名"
width="666px"> width="666px">
<bind-domain v-if="bind_domain_sure" :app_id="this.currentapp.app_id" :domain_type="2" <bind-domain v-if="bind_domain_sure" :app_id="this.currentapp.app_id" :domain_type="2"
transitionName="bind-app-domain"/> :c_domain_name="this.currentapp.domain_name" transitionName="bind-app-domain"/>
</el-dialog> </el-dialog>
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item label="访问密码" label-width="200px"> <el-form-item label="访问密码" label-width="200px">

@ -78,7 +78,7 @@
</el-tooltip> </el-tooltip>
<el-button v-if="!currentapp.issupersign" class="tooltip-top" @click="previewRelase(app)"><i <el-button v-if="!currentapp.issupersign" class="tooltip-top" @click="previewRelease(app)"><i
class="el-icon-view"/> <span class="el-icon-view"/> <span
class="ng-binding">预览</span> class="ng-binding">预览</span>
</el-button> </el-button>
@ -98,7 +98,7 @@
</div> </div>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-button v-if="has_next" class="time-line-more" @click="getapptimelineFun('more')">显示更多版本</el-button> <el-button v-if="has_next" class="time-line-more" @click="getAppTimelineFun('more')">显示更多版本</el-button>
</el-timeline> </el-timeline>
</template> </template>
@ -143,20 +143,15 @@ export default {
'app_id': this.currentapp.app_id 'app_id': this.currentapp.app_id
}) })
}, },
previewRelase(app) { previewRelease(app) {
let routeData = this.$router.resolve({ let routeData = this.$router.resolve({
name: 'FirDownload', name: 'FirDownload',
params: {short: this.currentapp.short}, params: {short: this.currentapp.short},
query: {release_id: app.release_id} query: {release_id: app.release_id}
}); });
let p_url = routeData.href; window.open(this.currentapp.preview_url + routeData.href, 'target', '');
if (this.currentapp.preview_url && this.currentapp.preview_url.length > 6) {
p_url = this.currentapp.preview_url + p_url
}
window.open(p_url, 'target', '');
}, },
getapptimelineFun(act = '') { getAppTimelineFun(act = '') {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: '加载中', text: '加载中',
@ -207,7 +202,7 @@ export default {
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}); });
this.getapptimelineFun(); this.getAppTimelineFun();
} else { } else {
this.$message({ this.$message({
@ -232,10 +227,6 @@ export default {
}); });
this.release_apps = data.data.release_apps; this.release_apps = data.data.release_apps;
this.currentapp = data.data.currentapp; this.currentapp = data.data.currentapp;
// this.getapptimelineFun();
// this.currentapp["icon_url"] = this.currentapp.master_release.icon_url;
// this.$store.dispatch('doucurrentapp', this.currentapp);
} else { } else {
this.$message({ this.$message({
message: '更新失败,请联系管理员', message: '更新失败,请联系管理员',
@ -294,7 +285,7 @@ export default {
}, watch: {}, }, watch: {},
computed: {}, mounted() { computed: {}, mounted() {
this.$store.dispatch('doappInfoIndex', [[5, 5], [5, 5]]); this.$store.dispatch('doappInfoIndex', [[5, 5], [5, 5]]);
this.getapptimelineFun(); this.getAppTimelineFun();
}, filters: { }, filters: {
downcontent(content) { downcontent(content) {
if (content) { if (content) {

@ -1140,13 +1140,7 @@ export default {
this.$router.push({name: 'FirAppInfostimeline', params: {id: app.app_id}}) this.$router.push({name: 'FirAppInfostimeline', params: {id: app.app_id}})
}, },
appDownload(app) { appDownload(app) {
// this.$router.push({name: 'FirDownload', params: {short: app.short}}); window.open(app.preview_url+ '/' + app.short, '_blank', '');
let routeData = this.$router.resolve({name: 'FirDownload', params: {short: app.short}});
let p_url = routeData.href;
if (app.preview_url && app.preview_url.length > 6) {
p_url = app.preview_url + p_url
}
window.open(p_url, '_blank', '');
} }
}, computed: { }, computed: {
getDelappTitle() { getDelappTitle() {

@ -170,14 +170,18 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
c_domain_name: {
type: String,
default: ''
},
}, },
data() { data() {
return { return {
active: 1, active: 1,
bind_status: false, bind_status: false,
bind_domain_sure: true, bind_domain_sure: true,
domain_name: '',
domain_tData: [{'type': 'CNAME', 'host': 'xxx', 'dns': 'demo.xxx.cn'}], domain_tData: [{'type': 'CNAME', 'host': 'xxx', 'dns': 'demo.xxx.cn'}],
domain_name:'',
force_bind: false, force_bind: false,
b_t_msg: '您的账户', b_t_msg: '您的账户',
} }
@ -186,6 +190,9 @@ export default {
if (this.domain_type === 2) { if (this.domain_type === 2) {
this.b_t_msg = '您的应用' this.b_t_msg = '您的应用'
} }
if(this.c_domain_name){
this.domain_name = this.c_domain_name
}
this.bind_click(); this.bind_click();
}, },
beforeDestroy() { beforeDestroy() {
@ -218,7 +225,7 @@ export default {
this.bind_status = false; this.bind_status = false;
this.$message.error("绑定失败 " + data.msg) this.$message.error("绑定失败 " + data.msg)
} }
}, {methods: 'PUT', data: {app_id: this.app_id, domain_type: this.domain_type}}) }, {methods: 'PUT', data: {app_id: this.app_id, domain_type: this.domain_type, domain_name:this.domain_name}})
}, },
remove_domain() { remove_domain() {
domainFun(data => { domainFun(data => {
@ -237,7 +244,7 @@ export default {
} else { } else {
this.$message.error("解除绑定失败 " + data.msg) this.$message.error("解除绑定失败 " + data.msg)
} }
}, {methods: 'DELETE', data: {app_id: this.app_id, domain_type: this.domain_type}}); }, {methods: 'DELETE', data: {app_id: this.app_id, domain_type: this.domain_type, domain_name:this.domain_name}});
}, },
bind_click() { bind_click() {
this.$store.dispatch("dosetdomainstate", false); this.$store.dispatch("dosetdomainstate", false);
@ -260,7 +267,7 @@ export default {
} else { } else {
this.$message.error("绑定失败 " + data.msg) this.$message.error("绑定失败 " + data.msg)
} }
}, {methods: 'GET', data: {app_id: this.app_id, domain_type: this.domain_type}}); }, {methods: 'GET', data: {app_id: this.app_id, domain_type: this.domain_type, domain_name:this.domain_name}});
}, },
format_domain_tData(cname_domain) { format_domain_tData(cname_domain) {
let domain_name_list = this.domain_name.split('.'); let domain_name_list = this.domain_name.split('.');

@ -54,7 +54,7 @@
action="#" action="#"
drag drag
style="max-height: 200px"> style="max-height: 200px">
<img v-if="upload_pic_b" :src="upload_pic_b" class="avatar"> <img v-if="upload_pic_b" :src="upload_pic_b" class="avatar" alt="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -64,6 +64,7 @@
<el-form-item label="展示权重"> <el-form-item label="展示权重">
<el-input-number v-model="editadvertinfo.weight" :max="100" :min="0" <el-input-number v-model="editadvertinfo.weight" :max="100" :min="0"
label="展示权重"/> label="展示权重"/>
<el-tag style="margin-left: 10px">权重越大广告展示频率越高</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="是否发布"> <el-form-item label="是否发布">
<el-switch <el-switch

@ -7,7 +7,7 @@
:visible.sync="bind_domain_sure" :visible.sync="bind_domain_sure"
width="666px"> width="666px">
<bind-domain v-if="bind_domain_sure" :app_id="current_domain_info.app_id" :domain_state="true" <bind-domain v-if="bind_domain_sure" :app_id="current_domain_info.app_id" :domain_state="true"
:domain_type="current_domain_info.domain_type" transitionName="bind-app-domain"/> :domain_type="current_domain_info.domain_type" :c_domain_name="current_domain_info.domain_name" transitionName="bind-app-domain"/>
</el-dialog> </el-dialog>
<div> <div>
<el-input <el-input
@ -19,13 +19,17 @@
搜索 搜索
</el-button> </el-button>
<div style="float: right"> <div style="float: right">
<el-button plain type="primary" @click="$store.dispatch('dodomainaction', 1)"> <el-tooltip content="应用安装下载页,多个下载页域名可以避免域名被封导致其他应用也无法访问">
设置下载页域名 <el-button plain type="primary" @click="$store.dispatch('dodomainaction', 1)">
</el-button> 添加下载页域名
<el-button v-if="$store.state.userinfo&&$store.state.userinfo.role >1" plain type="primary" </el-button>
@click="$store.dispatch('dodomainaction', 2)"> </el-tooltip>
设置下载码域名 <el-tooltip content="用与生成预览和下载码的域名">
</el-button> <el-button plain type="primary" @click="$store.dispatch('dodomainaction', 2)">
设置下载码域名
</el-button>
</el-tooltip>
</div> </div>
@ -96,6 +100,30 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
align="center"
label="跳转权重"
prop="weight"
width="110">
<template slot-scope="scope">
<el-popover placement="top" trigger="hover" v-if="scope.row.domain_type === 1">
<p>绑定域名{{ scope.row.domain_name }}</p>
<p>域名类型{{format_domain_type(scope.row)}}</p>
<p>权重越大下载域名使用频率越高</p>
<p >
跳转权重:
<el-input-number v-model="scope.row.weight" :max="100" :min="1"
label="跳转权重" size="small"/>
<el-button size="small" style="margin-left: 10px" @click="saveWeight(scope.row)">保存修改</el-button>
</p>
<div slot="reference" class="name-wrapper">
<el-link :underline="false" plain size="small">{{ scope.row.weight}}
</el-link>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column <el-table-column
:formatter="format_create_time" :formatter="format_create_time"
align="center" align="center"
@ -144,6 +172,16 @@ export default {
} }
}, },
methods: { methods: {
saveWeight(domain_info){
domaininfo(data => {
if (data.code === 1000) {
this.$message.success("权重修改成功")
} else {
this.$message.error("权重修改失败 "+data.msg)
}
}, {methods: 'PUT', data: domain_info})
},
show_bind_domain_info(domain_info) { show_bind_domain_info(domain_info) {
this.bind_domain_sure = true; this.bind_domain_sure = true;
let app_id = null; let app_id = null;
@ -152,6 +190,7 @@ export default {
} }
this.current_domain_info.app_id = app_id; this.current_domain_info.app_id = app_id;
this.current_domain_info.domain_type = domain_info.domain_type; this.current_domain_info.domain_type = domain_info.domain_type;
this.current_domain_info.domain_name = domain_info.domain_name;
this.domain_title = this.format_domain_type(domain_info) + ' 绑定详情'; this.domain_title = this.format_domain_type(domain_info) + ' 绑定详情';
}, },
appInfos(app_info) { appInfos(app_info) {
@ -226,8 +265,8 @@ export default {
getUserInfoFun(this); getUserInfoFun(this);
this.get_data_from_tabname(); this.get_data_from_tabname();
}, watch: { }, watch: {
'$store.state.domian_show_state': function () { '$store.state.domain_show_state': function () {
if (this.$store.state.domian_show_state) { if (this.$store.state.domain_show_state) {
this.bind_domain_sure = false; this.bind_domain_sure = false;
this.get_data_from_tabname(); this.get_data_from_tabname();
} }

@ -64,8 +64,15 @@
&nbsp; &nbsp;
<span>{{ appinfo.name }}</span> <span>{{ appinfo.name }}</span>
<div class="bottom clearfix"> <div class="bottom clearfix">
<el-button plain size="small" type="primary" @click="go_download(appinfo)">预览</el-button> <el-popover placement="top" trigger="hover" >
<el-button plain size="small" type="primary" @click="save_qr(appinfo)">保存本地</el-button> <span v-clipboard:copy="short_url(appinfo)"
v-clipboard:success="copy_success"
>{{ short_url(appinfo) }}</span>
<div slot="reference" class="name-wrapper">
<el-button plain size="small" type="primary" @click="go_download(appinfo)">预览</el-button>
<el-button plain size="small" type="primary" @click="save_qr(appinfo)">保存本地</el-button>
</div>
</el-popover>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -113,6 +120,9 @@ export default {
} }
}, },
methods: { methods: {
copy_success() {
this.$message.success('复制剪切板成功');
},
auto_load() { auto_load() {
if (getScrollTop() + getWindowHeight() >= getScrollHeight()) { if (getScrollTop() + getWindowHeight() >= getScrollHeight()) {
if (this.has_next) { // if (this.has_next) { //
@ -203,23 +213,14 @@ export default {
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allQrcodeAppid.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.allQrcodeAppid.length;
}, },
go_download(appinfo) { go_download(appinfo) {
let routeData = this.$router.resolve({name: 'FirDownload', params: {short: appinfo.short}}); window.open(this.short_url(appinfo), '_blank', '');
let p_url = routeData.href;
if (appinfo.preview_url && appinfo.preview_url.length > 6) {
p_url = appinfo.preview_url + p_url
}
window.open(p_url, '_blank', '');
}, },
qrback(dataUrl, id) { qrback(dataUrl, id) {
this.qrcode_img_info[id] = dataUrl; this.qrcode_img_info[id] = dataUrl;
this.allQrcodeAppid.push(id); this.allQrcodeAppid.push(id);
}, },
short_url(appinfo) { short_url(appinfo) {
const userinfo = this.$store.state.userinfo; return appinfo.preview_url+ '/' + appinfo.short;
if (userinfo.qrcode_domain_name && userinfo.qrcode_domain_name.length > 3) {
return 'http://' + userinfo.qrcode_domain_name + '/' + appinfo.short;
}
return appinfo.preview_url;
}, },
save_qr(appinfo) { save_qr(appinfo) {
let dtype = "I"; let dtype = "I";

@ -17,7 +17,7 @@ const store = new Vuex.Store({
userInfoIndex: 0, userInfoIndex: 0,
show_domain_msg: false, show_domain_msg: false,
domain_action: false, domain_action: false,
domian_show_state: false, domain_show_state: false,
}, },
mutations: { mutations: {
setuserinfo(state, data) { setuserinfo(state, data) {
@ -39,7 +39,7 @@ const store = new Vuex.Store({
state.domain_action = val state.domain_action = val
}, },
setdomainstate(state, val) { setdomainstate(state, val) {
state.domian_show_state = val state.domain_show_state = val
} }
}, },
actions: { actions: {

Loading…
Cancel
Save