更新前端页面

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. 51
      fir_client/src/components/user/FirUserDomain.vue
  9. 23
      fir_client/src/components/user/FirUserQrcode.vue
  10. 4
      fir_client/src/store/index.js

@ -18,7 +18,7 @@
effect="dark"
type="error">
<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>
</div>
</el-alert>
@ -118,7 +118,7 @@ export default {
padding-top: 30px;
}
.domian-tip-bar {
.domain-tip-bar {
line-height: 43px;
color: #fff;
font-weight: 500;

@ -15,7 +15,6 @@
</el-tooltip>
<el-popover
v-if="$store.state.userinfo&&$store.state.userinfo.role >1 &&$store.state.userinfo.qrcode_domain_name.length>3 "
placement="right"
width="288">
<div style="text-align: center; margin: 0">
@ -24,7 +23,7 @@
:logoScale="qrinfo.logoScale"
:logoSrc="icon_url"
:margin="qrinfo.margin" :size="266"
:text="short_url()">
:text="short_url(appinfos)">
</vue-qr>
<el-button size="small" type="primary" @click="save_qr()">保存本地</el-button>
</div>
@ -51,7 +50,7 @@
</div>
<div class="actions">
<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>
</div>
@ -150,11 +149,8 @@ export default {
//
a.dispatchEvent(new MouseEvent('click'))
},
short_url() {
const userinfo = this.$store.state.userinfo;
if (userinfo && userinfo.role > 1 && userinfo.qrcode_domain_name.length > 3) {
return 'http://' + userinfo.qrcode_domain_name + '/' + this.appinfos.short;
}
short_url(appinfo) {
return appinfo.preview_url+ '/' + appinfo.short;
},
setfunactive(item, index) {
for (let key in this.$refs) {
@ -171,15 +167,8 @@ export default {
}
}
},
appDownload() {
let routeData = this.$router.resolve({name: 'FirDownload', params: {short: this.appinfos.short}});
// 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', '');
appDownload(appinfo) {
window.open(this.short_url(appinfo), '_blank', '');
},
defaulttimeline() {
this.setfunactive('timeline', 5);

@ -7,7 +7,7 @@
title="绑定应用专属下载页域名"
width="666px">
<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-form label-width="80px">
<el-form-item label="访问密码" label-width="200px">

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

@ -1140,13 +1140,7 @@ export default {
this.$router.push({name: 'FirAppInfostimeline', params: {id: app.app_id}})
},
appDownload(app) {
// this.$router.push({name: 'FirDownload', params: {short: app.short}});
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', '');
window.open(app.preview_url+ '/' + app.short, '_blank', '');
}
}, computed: {
getDelappTitle() {

@ -170,14 +170,18 @@ export default {
type: Boolean,
default: false
},
c_domain_name: {
type: String,
default: ''
},
},
data() {
return {
active: 1,
bind_status: false,
bind_domain_sure: true,
domain_name: '',
domain_tData: [{'type': 'CNAME', 'host': 'xxx', 'dns': 'demo.xxx.cn'}],
domain_name:'',
force_bind: false,
b_t_msg: '您的账户',
}
@ -186,6 +190,9 @@ export default {
if (this.domain_type === 2) {
this.b_t_msg = '您的应用'
}
if(this.c_domain_name){
this.domain_name = this.c_domain_name
}
this.bind_click();
},
beforeDestroy() {
@ -218,7 +225,7 @@ export default {
this.bind_status = false;
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() {
domainFun(data => {
@ -237,7 +244,7 @@ export default {
} else {
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() {
this.$store.dispatch("dosetdomainstate", false);
@ -260,7 +267,7 @@ export default {
} else {
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) {
let domain_name_list = this.domain_name.split('.');

@ -54,7 +54,7 @@
action="#"
drag
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>
</el-upload>
</el-form-item>
@ -64,6 +64,7 @@
<el-form-item label="展示权重">
<el-input-number v-model="editadvertinfo.weight" :max="100" :min="0"
label="展示权重"/>
<el-tag style="margin-left: 10px">权重越大广告展示频率越高</el-tag>
</el-form-item>
<el-form-item label="是否发布">
<el-switch

@ -7,7 +7,7 @@
:visible.sync="bind_domain_sure"
width="666px">
<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>
<div>
<el-input
@ -19,13 +19,17 @@
搜索
</el-button>
<div style="float: right">
<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"
@click="$store.dispatch('dodomainaction', 2)">
</el-tooltip>
<el-tooltip content="用与生成预览和下载码的域名">
<el-button plain type="primary" @click="$store.dispatch('dodomainaction', 2)">
设置下载码域名
</el-button>
</el-tooltip>
</div>
@ -96,6 +100,30 @@
</template>
</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
:formatter="format_create_time"
align="center"
@ -144,6 +172,16 @@ export default {
}
},
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) {
this.bind_domain_sure = true;
let app_id = null;
@ -152,6 +190,7 @@ export default {
}
this.current_domain_info.app_id = app_id;
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) + ' 绑定详情';
},
appInfos(app_info) {
@ -226,8 +265,8 @@ export default {
getUserInfoFun(this);
this.get_data_from_tabname();
}, watch: {
'$store.state.domian_show_state': function () {
if (this.$store.state.domian_show_state) {
'$store.state.domain_show_state': function () {
if (this.$store.state.domain_show_state) {
this.bind_domain_sure = false;
this.get_data_from_tabname();
}

@ -64,9 +64,16 @@
&nbsp;
<span>{{ appinfo.name }}</span>
<div class="bottom clearfix">
<el-popover placement="top" trigger="hover" >
<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>
</el-card>
</el-checkbox>
@ -113,6 +120,9 @@ export default {
}
},
methods: {
copy_success() {
this.$message.success('复制剪切板成功');
},
auto_load() {
if (getScrollTop() + getWindowHeight() >= getScrollHeight()) {
if (this.has_next) { //
@ -203,23 +213,14 @@ export default {
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allQrcodeAppid.length;
},
go_download(appinfo) {
let routeData = this.$router.resolve({name: 'FirDownload', params: {short: appinfo.short}});
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', '');
window.open(this.short_url(appinfo), '_blank', '');
},
qrback(dataUrl, id) {
this.qrcode_img_info[id] = dataUrl;
this.allQrcodeAppid.push(id);
},
short_url(appinfo) {
const userinfo = this.$store.state.userinfo;
if (userinfo.qrcode_domain_name && userinfo.qrcode_domain_name.length > 3) {
return 'http://' + userinfo.qrcode_domain_name + '/' + appinfo.short;
}
return appinfo.preview_url;
return appinfo.preview_url+ '/' + appinfo.short;
},
save_qr(appinfo) {
let dtype = "I";

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

Loading…
Cancel
Save