前端代码格式化

publicsignpoll
youngS 3 years ago
parent 002c90d5e3
commit f49c067015
  1. 154
      fir_client/src/App.vue
  2. 128
      fir_client/src/Download.vue
  3. 230
      fir_client/src/components/FirBase.vue
  4. 3433
      fir_client/src/components/FirDownload.vue
  5. 92
      fir_client/src/components/FirFooter.vue
  6. 371
      fir_client/src/components/FirHeader.vue
  7. 818
      fir_client/src/components/FirLogin.vue
  8. 752
      fir_client/src/components/FirRegist.vue
  9. 488
      fir_client/src/components/FirResetPwd.vue
  10. 3730
      fir_client/src/components/ShortDownload.vue
  11. 772
      fir_client/src/components/apps/FirAppInfosBase.vue
  12. 522
      fir_client/src/components/apps/FirAppInfosbaseinfo.vue
  13. 696
      fir_client/src/components/apps/FirAppInfoscombo.vue
  14. 96
      fir_client/src/components/apps/FirAppInfosdevices.vue
  15. 646
      fir_client/src/components/apps/FirAppInfossecurity.vue
  16. 418
      fir_client/src/components/apps/FirAppInfossupersign.vue
  17. 931
      fir_client/src/components/apps/FirAppInfostimeline.vue
  18. 3338
      fir_client/src/components/apps/FirApps.vue
  19. 201
      fir_client/src/components/base/BackToTop.vue
  20. 584
      fir_client/src/components/base/BindDomain.vue
  21. 100
      fir_client/src/components/index/FirContact.vue
  22. 478
      fir_client/src/components/index/FirIndexBody.vue
  23. 200
      fir_client/src/components/index/FirIndexTem.vue
  24. 400
      fir_client/src/components/index/FirNews.vue
  25. 288
      fir_client/src/components/index/FirService.vue
  26. 2113
      fir_client/src/components/user/FirSuperSignBase.vue
  27. 66
      fir_client/src/components/user/FirSuperSignHelp.vue
  28. 784
      fir_client/src/components/user/FirUserAdvert.vue
  29. 474
      fir_client/src/components/user/FirUserDomain.vue
  30. 961
      fir_client/src/components/user/FirUserOrders.vue
  31. 368
      fir_client/src/components/user/FirUserProfileBase.vue
  32. 926
      fir_client/src/components/user/FirUserProfileCertification.vue
  33. 158
      fir_client/src/components/user/FirUserProfileChangePwd.vue
  34. 1272
      fir_client/src/components/user/FirUserProfileInfo.vue
  35. 1068
      fir_client/src/components/user/FirUserStorage.vue
  36. 12
      fir_client/src/main.short.js

@ -1,87 +1,87 @@
<template> <template>
<div id="app" ref="app"> <div id="app" ref="app">
<router-view/> <router-view/>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'app', name: 'app',
data() { data() {
return {} return {}
}, },
} }
</script> </script>
<style> <style>
body { body {
background-color: #F6F6F6; background-color: #F6F6F6;
} }
html, body { html, body {
height: 100%; height: 100%;
} }
@font-face { @font-face {
font-family: "iconfont"; font-family: "iconfont";
src: url('./assets/icon/iconfont.eot?t=1583637102320'); /* IE9 */ 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,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') format('woff2'), src: url('./assets/icon/iconfont.eot?t=1583637102320#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('data:application/x-font-woff2;charset=utf-8;base64,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') format('woff2'),
url('./assets/icon/iconfont.woff?t=1583637102320') format('woff'), 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- */ 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 { .iconfont {
font-family: "iconfont" !important; font-family: "iconfont" !important;
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-android:before { .icon-android:before {
content: "\e61d"; content: "\e61d";
} }
.icon-android1:before { .icon-android1:before {
content: "\e616"; content: "\e616";
} }
.icon-android2:before { .icon-android2:before {
content: "\e62a"; content: "\e62a";
} }
.icon-ios:before { .icon-ios:before {
content: "\e60c"; content: "\e60c";
} }
.icon-IOS:before { .icon-IOS:before {
content: "\e68c"; content: "\e68c";
} }
.icon-ios1:before { .icon-ios1:before {
content: "\e601"; content: "\e601";
} }
.icon-ios2:before { .icon-ios2:before {
content: "\e64b"; content: "\e64b";
} }
.icon-Android:before { .icon-Android:before {
content: "\e6d4"; content: "\e6d4";
} }
.icon-android3:before { .icon-android3:before {
content: "\e625"; content: "\e625";
} }
.canvas { .canvas {
position: fixed; position: fixed;
left: -0px; left: -0px;
top: 58px; top: 58px;
height: 100%; height: 100%;
z-index: -2; z-index: -2;
width: 100%; width: 100%;
} }
</style> </style>

@ -1,75 +1,75 @@
<template> <template>
<div id="download" ref="download"> <div id="download" ref="download">
<router-view></router-view> <router-view></router-view>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'download', name: 'download',
data() { data() {
return {} return {}
}, },
} }
</script> </script>
<style> <style>
body { body {
background-color: #F6F6F6; background-color: #F6F6F6;
} }
@font-face { @font-face {
font-family: "iconfont"; font-family: "iconfont";
src: url('./assets/icon/iconfont.eot?t=1583637102320'); /* IE9 */ 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,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') format('woff2'), src: url('./assets/icon/iconfont.eot?t=1583637102320#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('data:application/x-font-woff2;charset=utf-8;base64,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') format('woff2'),
url('./assets/icon/iconfont.woff?t=1583637102320') format('woff'), 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- */ 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 { .iconfont {
font-family: "iconfont" !important; font-family: "iconfont" !important;
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-android:before { .icon-android:before {
content: "\e61d"; content: "\e61d";
} }
.icon-android1:before { .icon-android1:before {
content: "\e616"; content: "\e616";
} }
.icon-android2:before { .icon-android2:before {
content: "\e62a"; content: "\e62a";
} }
.icon-ios:before { .icon-ios:before {
content: "\e60c"; content: "\e60c";
} }
.icon-IOS:before { .icon-IOS:before {
content: "\e68c"; content: "\e68c";
} }
.icon-ios1:before { .icon-ios1:before {
content: "\e601"; content: "\e601";
} }
.icon-ios2:before { .icon-ios2:before {
content: "\e64b"; content: "\e64b";
} }
.icon-Android:before { .icon-Android:before {
content: "\e6d4"; content: "\e6d4";
} }
.icon-android3:before { .icon-android3:before {
content: "\e625"; content: "\e625";
} }
</style> </style>

@ -1,129 +1,129 @@
<template> <template>
<div ref="appbase"> <div ref="appbase">
<el-dialog <el-dialog
:title="bind_domain_title" :close-on-click-modal="false"
:close-on-click-modal="false" :close-on-press-escape="false"
:close-on-press-escape="false" :title="bind_domain_title"
:visible.sync="bind_domain_sure" :visible.sync="bind_domain_sure"
width="666px"> width="666px">
<bind-domain v-if="bind_domain_sure" :transitionName="`bind-user-domain`+ bind_domain_type" <bind-domain v-if="bind_domain_sure" :domain_type="bind_domain_type"
:domain_type="bind_domain_type"/> :transitionName="`bind-user-domain`+ bind_domain_type"/>
</el-dialog> </el-dialog>
<canvas ref="canvas" class="canvas" @mousemove="canvas_move" @mouseleave="canvas_leave"/> <canvas ref="canvas" class="canvas" @mouseleave="canvas_leave" @mousemove="canvas_move"/>
<el-container> <el-container>
<div style="margin: -5px 20px" v-if="$store.state.show_domain_msg"> <div v-if="$store.state.show_domain_msg" style="margin: -5px 20px">
<el-alert <el-alert
center :closable="false"
type="error" center
:closable="false" effect="dark"
effect="dark"> type="error">
<div slot="title"> <div slot="title">
<span :underline="false" <span :underline="false"
class="domian-tip-bar">应用分发请绑定您自己的域名平台分发域名可能因不可违因素更换将导致您的应用无法访问</span> class="domian-tip-bar">应用分发请绑定您自己的域名平台分发域名可能因不可违因素更换将导致您的应用无法访问</span>
<el-button size="medium" @click="bind_domain_type=1,bind_domain_sure=true">立即绑定</el-button> <el-button size="medium" @click="bind_domain_type=1,bind_domain_sure=true">立即绑定</el-button>
</div> </div>
</el-alert> </el-alert>
</div> </div>
<el-header> <el-header>
<FirHeader/> <FirHeader/>
</el-header> </el-header>
<div class="pbody"> <div class="pbody">
<router-view/> <router-view/>
</div> </div>
<el-footer> <el-footer>
<el-divider/> <el-divider/>
<FirFooter/> <FirFooter/>
</el-footer> </el-footer>
<el-tooltip placement="top" content="回到顶部"> <el-tooltip content="回到顶部" placement="top">
<back-to-top :custom-style="myBackToTopStyle" :visibility-height="300" :back-position="50" <back-to-top :back-position="50" :custom-style="myBackToTopStyle" :visibility-height="300"
transition-name="fade"/> transition-name="fade"/>
</el-tooltip> </el-tooltip>
</el-container> </el-container>
</div> </div>
</template> </template>
<script> <script>
import FirHeader from "@/components/FirHeader"; import FirHeader from "@/components/FirHeader";
import FirFooter from "@/components/FirFooter"; import FirFooter from "@/components/FirFooter";
import BackToTop from "@/components/base/BackToTop"; import BackToTop from "@/components/base/BackToTop";
import BindDomain from "@/components/base/BindDomain"; import BindDomain from "@/components/base/BindDomain";
import {show_beautpic,} from "@/utils"; import {show_beautpic,} from "@/utils";
export default { export default {
name: "FirBase", name: "FirBase",
components: {FirFooter, FirHeader, BackToTop, BindDomain}, components: {FirFooter, FirHeader, BackToTop, BindDomain},
data() { data() {
return { return {
mousePosition: {}, mousePosition: {},
bind_domain_sure: false, bind_domain_sure: false,
bind_domain_title: '绑定下载页域名', bind_domain_title: '绑定下载页域名',
bind_domain_type: 1, bind_domain_type: 1,
active: 1, active: 1,
domain_name: '', domain_name: '',
bind_status: false, bind_status: false,
domain_tData: [{'type': 'CNAME', 'host': 'xxx', 'dns': 'demo.xxx.cn'}], domain_tData: [{'type': 'CNAME', 'host': 'xxx', 'dns': 'demo.xxx.cn'}],
myBackToTopStyle: { myBackToTopStyle: {
right: '80px', right: '80px',
bottom: '100px', bottom: '100px',
width: '40px', width: '40px',
height: '40px', height: '40px',
'border-radius': '4px', 'border-radius': '4px',
'line-height': '45px', 'line-height': '45px',
background: '#e7eaf1' background: '#e7eaf1'
} }
}
},
mounted() {
let canvas = this.$refs.canvas;
show_beautpic(this, canvas, 200);
}, watch: {
'$store.state.userinfo': function () {
if (this.$store.state.userinfo.domain_name) {
this.$store.dispatch("dodomainshow", false);
} else {
this.$store.dispatch("dodomainshow", true);
}
},
'$store.state.domain_action': function () {
if (this.$store.state.domain_action) {
if (this.$store.state.domain_action === 2) {
this.bind_domain_title = '绑定下载码域名';
this.bind_domain_type = 0
} else {
this.bind_domain_title = '绑定下载页域名';
this.bind_domain_type = 1
}
this.$store.dispatch("dodomainaction", 0);
this.bind_domain_sure = true;
}
},
}
, methods: {
canvas_move(e) {
this.mousePosition.x = e.pageX;
this.mousePosition.y = e.pageY;
},
// eslint-disable-next-line no-unused-vars
canvas_leave(e) {
let canvas = this.$refs.canvas;
this.mousePosition.x = canvas.width / 2;
this.mousePosition.y = canvas.height / 2;
},
}
} }
},
mounted() {
let canvas = this.$refs.canvas;
show_beautpic(this, canvas, 200);
}, watch: {
'$store.state.userinfo': function () {
if (this.$store.state.userinfo.domain_name) {
this.$store.dispatch("dodomainshow", false);
} else {
this.$store.dispatch("dodomainshow", true);
}
},
'$store.state.domain_action': function () {
if (this.$store.state.domain_action) {
if (this.$store.state.domain_action === 2) {
this.bind_domain_title = '绑定下载码域名';
this.bind_domain_type = 0
} else {
this.bind_domain_title = '绑定下载页域名';
this.bind_domain_type = 1
}
this.$store.dispatch("dodomainaction", 0);
this.bind_domain_sure = true;
}
},
}
, methods: {
canvas_move(e) {
this.mousePosition.x = e.pageX;
this.mousePosition.y = e.pageY;
},
// eslint-disable-next-line no-unused-vars
canvas_leave(e) {
let canvas = this.$refs.canvas;
this.mousePosition.x = canvas.width / 2;
this.mousePosition.y = canvas.height / 2;
},
}
}
</script> </script>
<style scoped> <style scoped>
.pbody { .pbody {
padding-top: 30px; padding-top: 30px;
} }
.domian-tip-bar { .domian-tip-bar {
line-height: 43px; line-height: 43px;
color: #fff; color: #fff;
font-weight: 500; font-weight: 500;
font-size: medium; font-size: medium;
margin-right: 20px; margin-right: 20px;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1,61 +1,61 @@
<template> <template>
<div class="ifooter"> <div class="ifooter">
<div style="width: 300px; margin: 0 auto; padding: 5px 0;"> <div style="width: 300px; margin: 0 auto; padding: 5px 0;">
<el-link :underline="false"> {{ footer.copyright }}</el-link> <el-link :underline="false"> {{ footer.copyright }}</el-link>
</div> </div>
<div style="width: 300px; margin: 0 auto; padding: 5px 0;"> <div style="width: 300px; margin: 0 auto; padding: 5px 0;">
<a style="display: inline-block; text-decoration: none; height: 20px; line-height: 20px;" <a :href="footer.gongAnBeiAn.url"
:href="footer.gongAnBeiAn.url" rel="noopener"
target="_blank" rel="noopener"> style="display: inline-block; text-decoration: none; height: 20px; line-height: 20px;" target="_blank">
<img style="float: left;" src="@/assets/beianlogo.png" alt=""/> <img alt="" src="@/assets/beianlogo.png" style="float: left;"/>
<el-link :underline="false" <el-link :underline="false"
style="float: left; height: 20px; line-height: 20px; margin: 0 0 0 5px; color: #939393;"> style="float: left; height: 20px; line-height: 20px; margin: 0 0 0 5px; color: #939393;">
{{ footer.gongAnBeiAn.text }} {{ footer.gongAnBeiAn.text }}
</el-link> </el-link>
</a> </a>
</div> </div>
<div> <div>
<div :underline="false" style="width: 200px; margin: 0 auto; padding: 5px 0;"> <div :underline="false" style="width: 200px; margin: 0 auto; padding: 5px 0;">
<el-link :underline="false" :href="footer.ipcBeiAn.url" target="_blank" <el-link :href="footer.ipcBeiAn.url" :underline="false" rel="nofollow noopener"
rel="nofollow noopener">{{ footer.ipcBeiAn.text }} target="_blank">{{ footer.ipcBeiAn.text }}
</el-link> </el-link>
</div> </div>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "FirFooter", name: "FirFooter",
data() { data() {
return { return {
footer: { footer: {
copyright: 'Copyright © 2020-2022 东城飞阳 版权所有.', copyright: 'Copyright © 2020-2022 东城飞阳 版权所有.',
ipcBeiAn: { ipcBeiAn: {
url: 'https://beian.miit.gov.cn', url: 'https://beian.miit.gov.cn',
text: '粤ICP备2021097895号', text: '粤ICP备2021097895号',
}, },
gongAnBeiAn: { gongAnBeiAn: {
url: 'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41142202000062', url: 'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41142202000062',
text: '豫公网安备41142202000062号', text: '豫公网安备41142202000062号',
}, },
} }
}
}
} }
}
}
</script> </script>
<style scoped> <style scoped>
.ifooter { .ifooter {
margin: 20px auto 100px; margin: 20px auto 100px;
width: 1166px; width: 1166px;
text-align: center; text-align: center;
font-size: 0; font-size: 0;
border-radius: 10px; border-radius: 10px;
} }
</style> </style>

@ -1,203 +1,204 @@
<template> <template>
<div style="background-color: rgba(162,193,230,0.18);"> <div style="background-color: rgba(162,193,230,0.18);">
<el-container class="navbar-wrapper"> <el-container class="navbar-wrapper">
<el-dialog <el-dialog
title="API Token" :visible.sync="dialogVisible"
:visible.sync="dialogVisible" center
width="30%" title="API Token"
center width="30%"
> >
<span>可用于调用公开 API可用于登录 fly-cli请勿泄露您的 token</span> <span>可用于调用公开 API可用于登录 fly-cli请勿泄露您的 token</span>
<el-main> <el-main>
<el-tooltip content="点击复制到剪贴板"> <el-tooltip content="点击复制到剪贴板">
<el-link type="primary" v-if="token" :underline="false" v-clipboard:copy="token" <el-link v-if="token" v-clipboard:copy="token" v-clipboard:success="copy_success" :underline="false"
v-clipboard:success="copy_success">{{ token }} type="primary">{{ token }}
</el-link> </el-link>
</el-tooltip> </el-tooltip>
</el-main> </el-main>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="maketoken">重新生成</el-button> <el-button type="primary" @click="maketoken">重新生成</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="14" style="padding-top: 36px;margin-left: 60px"> <el-col :span="14" style="padding-top: 36px;margin-left: 60px">
<el-breadcrumb separator-class="el-icon-arrow-right" style="height: 60px;font-size: 20px"> <el-breadcrumb separator-class="el-icon-arrow-right" style="height: 60px;font-size: 20px">
<el-breadcrumb-item :to="{ name:'FirIndex' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ name:'FirIndex' }">首页</el-breadcrumb-item>
<el-breadcrumb-item :to="{ name:'FirApps'}">我的应用</el-breadcrumb-item> <el-breadcrumb-item :to="{ name:'FirApps'}">我的应用</el-breadcrumb-item>
<el-breadcrumb-item v-if="this.route_info.label" :to="{ name:route_info.name}">{{ <el-breadcrumb-item v-if="this.route_info.label" :to="{ name:route_info.name}">{{
this.route_info.label }} this.route_info.label
</el-breadcrumb-item> }}
</el-breadcrumb-item>
<el-breadcrumb-item v-if="$store.state.currentapp.name"
:to="{name: 'FirAppInfostimeline', params: {id: $store.state.currentapp.app_id}}"> <el-breadcrumb-item v-if="$store.state.currentapp.name"
{{ $store.state.currentapp.name}} :to="{name: 'FirAppInfostimeline', params: {id: $store.state.currentapp.app_id}}">
</el-breadcrumb-item> {{ $store.state.currentapp.name }}
</el-breadcrumb-item>
</el-breadcrumb>
</el-col> </el-breadcrumb>
<el-col :span="2" :push="2" style="padding-top: 16px;"> </el-col>
<div class="block"> <el-col :push="2" :span="2" style="padding-top: 16px;">
<el-avatar :size="66" :src="$store.state.userinfo.head_img"></el-avatar> <div class="block">
</div> <el-avatar :size="66" :src="$store.state.userinfo.head_img"></el-avatar>
</el-col> </div>
<el-col :span="4" :push="2" style="padding-top: 16px"> </el-col>
<el-dropdown style="padding-top: 12px;" @command="handleCommand"> <el-col :push="2" :span="4" style="padding-top: 16px">
<el-button type="primary" plain round> <el-dropdown style="padding-top: 12px;" @command="handleCommand">
{{$store.state.userinfo.first_name }}<i class="el-icon-arrow-down el-icon--right"></i> <el-button plain round type="primary">
</el-button> {{ $store.state.userinfo.first_name }}<i class="el-icon-arrow-down el-icon--right"></i>
<el-dropdown-menu slot="dropdown"> </el-button>
<el-dropdown-item command="userinfo">个人资料</el-dropdown-item> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="apitoken">API token</el-dropdown-item> <el-dropdown-item command="userinfo">个人资料</el-dropdown-item>
<el-dropdown-item command="setdomian">设置域名</el-dropdown-item> <el-dropdown-item command="apitoken">API token</el-dropdown-item>
<el-dropdown-item command="setadvert" v-if="$store.state.userinfo.role>1">宣传广告 <el-dropdown-item command="setdomian">设置域名</el-dropdown-item>
</el-dropdown-item> <el-dropdown-item v-if="$store.state.userinfo.role>1" command="setadvert">宣传广告
<el-dropdown-item command="storage" v-if="$store.state.userinfo.storage_active">存储管理 </el-dropdown-item>
</el-dropdown-item> <el-dropdown-item v-if="$store.state.userinfo.storage_active" command="storage">存储管理
<el-dropdown-item command="supersign" v-if="$store.state.userinfo.supersign_active">超级签名 </el-dropdown-item>
</el-dropdown-item> <el-dropdown-item v-if="$store.state.userinfo.supersign_active" command="supersign">超级签名
<el-dropdown-item command="myorder">订单信息</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item command="contact">联系我们</el-dropdown-item> <el-dropdown-item command="myorder">订单信息</el-dropdown-item>
<el-dropdown-item command="exit">退出</el-dropdown-item> <el-dropdown-item command="contact">联系我们</el-dropdown-item>
<el-dropdown-item command="exit">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> </el-dropdown-menu>
</el-dropdown>
</el-col>
</el-col>
</el-row>
</el-row>
</el-container>
</div> </el-container>
</div>
</template> </template>
<script> <script>
import {apitoken, logout} from '@/restful' import {apitoken, logout} from '@/restful'
export default { export default {
name: "FirHeader", name: "FirHeader",
data() { data() {
return { return {
current_user: {}, current_user: {},
appName: '', appName: '',
token: '', token: '',
dialogVisible: false, dialogVisible: false,
route_info: {'name': '', 'label': ''}, route_info: {'name': '', 'label': ''},
}
}, methods: {
copy_success() {
this.$message.success('复制剪切板成功');
},
maketoken() {
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') {
this.$router.push({name: 'FirUserProfileInfo'})
} else if (command === 'storage') {
this.$router.push({name: 'FirUserStorage', params: {act: "change"}})
} else if (command === 'supersign') {
this.$store.dispatch('doucurrentapp', {});
this.$router.push({"name": 'FirSuperSignBase', params: {act: "iosdeveloper"}})
} else if (command === 'apitoken') {
apitoken(data => {
if (data.code === 1000) {
this.token = data.data.token;
this.dialogVisible = true;
} else {
this.dialogVisible = false;
this.$message.error("获取失败了 " + data.msg)
}
}, {methods: 'GET', token: this.token});
} else if (command === 'setdomian') {
this.$router.push({"name": 'FirUserDomain'})
} else if (command === 'setadvert') {
this.$router.push({"name": 'FirUserAdvert'})
} 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) {
this.$message.success("退出成功");
this.$cookies.remove("token");
this.$cookies.remove("auth_token");
this.$cookies.remove("username");
this.$cookies.remove("first_name");
this.$store.dispatch('doucurrentapp', {});
this.$store.dispatch('doUserinfo', {});
this.$router.push({name: 'FirLogin'});
} else {
this.$message.error("退出失败")
}
}, {})
}
},
init_route_name() {
if (this.$route.meta) {
this.route_info.label = this.$route.meta.label;
this.route_info.name = this.$route.name;
}
},
}, created() {
this.appName = this.$route.params.id
}, watch: {
$route: function () {
this.appName = this.$route.params.id;
this.init_route_name();
}
}, mounted() {
this.init_route_name();
}
} }
}, methods: {
copy_success() {
this.$message.success('复制剪切板成功');
},
maketoken() {
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') {
this.$router.push({name: 'FirUserProfileInfo'})
} else if (command === 'storage') {
this.$router.push({name: 'FirUserStorage', params: {act: "change"}})
} else if (command === 'supersign') {
this.$store.dispatch('doucurrentapp', {});
this.$router.push({"name": 'FirSuperSignBase', params: {act: "iosdeveloper"}})
} else if (command === 'apitoken') {
apitoken(data => {
if (data.code === 1000) {
this.token = data.data.token;
this.dialogVisible = true;
} else {
this.dialogVisible = false;
this.$message.error("获取失败了 " + data.msg)
}
}, {methods: 'GET', token: this.token});
} else if (command === 'setdomian') {
this.$router.push({"name": 'FirUserDomain'})
} else if (command === 'setadvert') {
this.$router.push({"name": 'FirUserAdvert'})
} 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) {
this.$message.success("退出成功");
this.$cookies.remove("token");
this.$cookies.remove("auth_token");
this.$cookies.remove("username");
this.$cookies.remove("first_name");
this.$store.dispatch('doucurrentapp', {});
this.$store.dispatch('doUserinfo', {});
this.$router.push({name: 'FirLogin'});
} else {
this.$message.error("退出失败")
}
}, {})
}
},
init_route_name() {
if (this.$route.meta) {
this.route_info.label = this.$route.meta.label;
this.route_info.name = this.$route.name;
}
},
}, created() {
this.appName = this.$route.params.id
}, watch: {
$route: function () {
this.appName = this.$route.params.id;
this.init_route_name();
}
}, mounted() {
this.init_route_name();
}
}
</script> </script>
<style scoped> <style scoped>
.el-container, .el-row { .el-container, .el-row {
margin: 10px auto; margin: 10px auto;
width: 1166px; width: 1166px;
} }
.navbar-wrapper { .navbar-wrapper {
font-size: 0; font-size: 0;
border-radius: 10px; border-radius: 10px;
} }
.el-dropdown { .el-dropdown {
vertical-align: top; vertical-align: top;
} }
.el-dropdown + .el-dropdown { .el-dropdown + .el-dropdown {
margin-left: 15px; margin-left: 15px;
} }
.el-icon-arrow-down { .el-icon-arrow-down {
font-size: 12px; font-size: 12px;
} }
</style> </style>

@ -1,424 +1,424 @@
<template> <template>
<el-container> <el-container>
<div style="margin: 10px 0 10px 0 ;position:absolute;right:20px;top:auto;"> <div style="margin: 10px 0 10px 0 ;position:absolute;right:20px;top:auto;">
<el-button round icon="el-icon-arrow-left" @click="$router.go(-1)"/> <el-button icon="el-icon-arrow-left" round @click="$router.go(-1)"/>
<el-button round icon="el-icon-s-home" @click="$router.push({name:'FirIndex'})"/> <el-button icon="el-icon-s-home" round @click="$router.push({name:'FirIndex'})"/>
</div>
<el-header>
<div>
<span>登录</span>
</div>
</el-header>
<el-main>
<el-form ref="form" :model="form">
<el-tabs v-model="activeName">
<el-tab-pane v-if="allow_ways.up" label="用户名登录" name="username">
<el-form-item>
<el-input v-model="form.email" autofocus clearable placeholder="用户名"
prefix-icon="el-icon-user"/>
</el-form-item>
</el-tab-pane>
<el-tab-pane v-if="allow_ways.sms || allow_ways.email" :label="rutitle+'登录'" name="smsemail">
<el-form-item>
<el-input v-model="form.email" :placeholder="rutitle" autofocus clearable
prefix-icon="el-icon-user"/>
</el-form-item>
</el-tab-pane>
</el-tabs>
<el-form-item v-if="is_captcha">
<el-input v-model="form.password" clearable placeholder="密码"
prefix-icon="el-icon-lock"
show-password @keyup.enter.native="onSubmit"/>
</el-form-item>
<el-form-item v-else>
<el-input v-model="form.password" clearable placeholder="密码"
prefix-icon="el-icon-lock" show-password/>
</el-form-item>
<el-form-item v-if="captcha.captcha_image" style="height: 40px">
<el-row style="height: 40px">
<el-col :span="16">
<el-input v-model="form.authcode" clearable maxlength="6"
placeholder="请输入验证码" @keyup.enter.native="onSubmit"/>
</el-col>
<el-col :span="8">
<el-image
:src="captcha.captcha_image"
fit="contain"
style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px" @click="get_auth_code">
</el-image>
</el-col>
</el-row>
</el-form-item>
<el-form-item>
<div id="captcha" ref="captcha"></div>
</el-form-item>
<el-form-item>
<el-button :disabled="login_disable" type="danger" @click="onSubmit">登录</el-button>
</el-form-item>
<el-form-item v-if="register_enable">
<el-button plain type="primary" @click="onRegister">注册</el-button>
</el-form-item>
<el-form-item>
<el-link :underline="false" plain @click="$router.push({name: 'FirResetPwd'})">忘记密码</el-link>
</el-form-item>
<div v-if="allow_ways.third && JSON.stringify(allow_ways.third).indexOf('true')!==-1" class="other-way">
<hr>
<span class="info">或使用以下账户登录</span>
<el-popover
v-if="allow_ways.third && allow_ways.third.wxp"
v-model="wx_visible"
placement="top"
title="微信扫码关注公众号登录"
trigger="manual">
<div>
<el-image :src="wx_login_qr_url" style="width: 176px;height: 166px"/>
</div>
<el-button slot="reference"
size="small" style="color: #1fc939;border: 1px solid rgba(31,201,57,.5); width: 110px" @click="wxLogin">微信
</el-button>
</el-popover>
</div> </div>
<el-header> </el-form>
<div>
<span>登录</span>
</div>
</el-header> </el-main>
<el-main>
<el-form ref="form" :model="form"> </el-container>
<el-tabs v-model="activeName">
<el-tab-pane label="用户名登录" name="username" v-if="allow_ways.up">
<el-form-item>
<el-input v-model="form.email" prefix-icon="el-icon-user" placeholder="用户名" autofocus
clearable/>
</el-form-item>
</el-tab-pane>
<el-tab-pane :label="rutitle+'登录'" name="smsemail" v-if="allow_ways.sms || allow_ways.email">
<el-form-item>
<el-input v-model="form.email" prefix-icon="el-icon-user" :placeholder="rutitle" autofocus
clearable/>
</el-form-item>
</el-tab-pane>
</el-tabs>
<el-form-item v-if="is_captcha">
<el-input v-model="form.password" prefix-icon="el-icon-lock" placeholder="密码"
@keyup.enter.native="onSubmit"
show-password clearable/>
</el-form-item>
<el-form-item v-else>
<el-input v-model="form.password" prefix-icon="el-icon-lock" placeholder="密码"
show-password clearable/>
</el-form-item>
<el-form-item style="height: 40px" v-if="captcha.captcha_image">
<el-row style="height: 40px">
<el-col :span="16">
<el-input placeholder="请输入验证码" v-model="form.authcode" maxlength="6"
@keyup.enter.native="onSubmit" clearable/>
</el-col>
<el-col :span="8">
<el-image
style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px"
:src="captcha.captcha_image"
fit="contain" @click="get_auth_code">
</el-image>
</el-col>
</el-row>
</el-form-item>
<el-form-item>
<div id="captcha" ref="captcha"></div>
</el-form-item>
<el-form-item>
<el-button type="danger" :disabled="login_disable" @click="onSubmit">登录</el-button>
</el-form-item>
<el-form-item v-if="register_enable">
<el-button type="primary" @click="onRegister" plain>注册</el-button>
</el-form-item>
<el-form-item>
<el-link :underline="false" @click="$router.push({name: 'FirResetPwd'})" plain>忘记密码</el-link>
</el-form-item>
<div class="other-way" v-if="allow_ways.third && JSON.stringify(allow_ways.third).indexOf('true')!==-1">
<hr>
<span class="info">或使用以下账户登录</span>
<el-popover
v-if="allow_ways.third && allow_ways.third.wxp"
placement="top"
trigger="manual"
title="微信扫码关注公众号登录"
v-model="wx_visible">
<div>
<el-image :src="wx_login_qr_url" style="width: 176px;height: 166px"/>
</div>
<el-button style="color: #1fc939;border: 1px solid rgba(31,201,57,.5); width: 110px"
slot="reference" size="small" @click="wxLogin">微信
</el-button>
</el-popover>
</div>
</el-form>
</el-main>
</el-container>
</template> </template>
<script> <script>
import {loginFun, set_auth_token, wxLoginFun} from "@/restful"; import {loginFun, set_auth_token, wxLoginFun} from "@/restful";
import {checkEmail, checkphone, geetest} from "@/utils"; import {checkEmail, checkphone, geetest} from "@/utils";
export default { export default {
name: "FirLogin", name: "FirLogin",
data() { data() {
return { return {
form: { form: {
email: '', email: '',
password: '', password: '',
authcode: '' authcode: ''
}, },
captcha: {"captcha_image": '', "captcha_key": '', "length": 8}, captcha: {"captcha_image": '', "captcha_key": '', "length": 8},
activeName: 'username', activeName: 'username',
allow_ways: {'third': {}}, allow_ways: {'third': {}},
rutitle: '', rutitle: '',
rctitle: '', rctitle: '',
register_enable: false, register_enable: false,
login_disable: false, login_disable: false,
wx_login_qr_url: '', wx_login_qr_url: '',
wx_visible: false, wx_visible: false,
loop_flag: false, loop_flag: false,
}
},
methods: {
set_cookie_and_token(data) {
this.$cookies.remove("auth_token");
this.$cookies.set("token", data['token'], 3600 * 24 * 30);
this.$cookies.set("username", data.userinfo.username, 3600 * 24 * 30);
this.$cookies.set("first_name", data.userinfo.first_name, 3600 * 24 * 30);
this.$store.dispatch("doUserinfo", data.userinfo);
set_auth_token();
this.$router.push({name: 'FirApps'})
},
loop_get_wx_info(wx_login_ticket) {
if (wx_login_ticket && wx_login_ticket.length < 3) {
this.$message.error("获取登陆码失败,请稍后再试");
return
}
let c_count = 1;
// eslint-disable-next-line no-unused-vars
const loop_t = window.setInterval(res => {
if (!this.loop_flag) {
window.clearInterval(loop_t);
}
wxLoginFun(data => {
c_count += 1;
if (c_count > 120) {
window.clearInterval(loop_t);
}
if (data.code === 1000) {
window.clearInterval(loop_t);
this.set_cookie_and_token(data);
} else if (data.code === 1005) {
window.clearInterval(loop_t);
this.wx_visible = false;
this.loop_flag = false;
this.$message({
message: data.msg,
type: 'error',
duration: 30000
});
}
}, {
"methods": "POST",
data: {"ticket": wx_login_ticket}
})
}, 3000)
},
wxLogin() {
this.wx_visible = !this.wx_visible;
this.wx_login_qr_url = '';
if (this.wx_visible) {
wxLoginFun(data => {
if (data.code === 1000) {
this.wx_login_qr_url = data.data.qr;
this.loop_flag = true;
this.loop_get_wx_info(data.data.ticket);
} else {
this.$message.error(data.msg);
this.wx_visible = false;
this.loop_flag = false;
}
}, {
"methods": "GET",
})
} else {
this.loop_flag = false;
}
},
is_captcha() {
let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
return captcha_flag
},
onSubmit() {
let email = this.form.email;
let password = this.form.password;
let authcode = this.form.authcode;
let login_type = 'up';
let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (captcha_flag) {
if (this.activeName === "username") {
if (email.length < 6) {
this.$message({
message: '用户名至少6位',
type: 'error'
});
return
}
} else if (this.activeName === "smsemail") {
let checkp = checkphone(this.form.email);
let checke = checkEmail(this.form.email);
if (!checkp && !checke) {
this.$message({
message: '邮箱或者手机号输入有误',
type: 'error'
});
return
}
if (checkp) {
login_type = 'sms';
} else if (checke) {
login_type = 'email';
}
} else {
this.$message({
message: '未知登录方式',
type: 'error'
});
return
}
if (password.length > 6) {
let params = {
"username": email,
"password": password,
"authcode": authcode,
"captcha_key": this.captcha.captcha_key,
"login_type": login_type,
};
this.login_disable = true;
if (this.captcha.geetest) {
geetest(this, this.form.email, params, (n_params) => {
this.do_login(n_params);
})
} else {
this.do_login(params)
}
} else {
this.$message({
message: '密码长度过短',
type: 'warning'
});
}
} else {
this.$message({
message: '验证码有误',
type: 'warning'
});
}
},
do_login(params) {
loginFun(data => {
if (data.code === 1000) {
this.$message({
message: '登录成功',
type: 'success'
});
this.set_cookie_and_token(data);
} else {
this.$message({
message: data.msg,
type: 'error'
});
this.get_auth_code();
}
this.login_disable = false;
}, {
"methods": "POST",
"data": params
});
},
onRegister() {
this.$router.push({name: 'FirRegist'})
},
set_activename() {
if (this.allow_ways.up) {
this.activeName = 'username';
} else {
this.activeName = 'smsemail';
}
},
set_rtitle() {
this.rutitle = '';
if (this.allow_ways.sms) {
this.rutitle = this.rutitle + '手机号 ';
}
if (this.allow_ways.email) {
this.rutitle = this.rutitle + '邮箱 ';
}
this.rutitle = this.rutitle.trim().replace(' ', '或');
},
get_auth_code() {
loginFun(data => {
if (data.code === 1000) {
this.captcha = data.data;
this.allow_ways = data.data.login_type;
this.register_enable = data.data.register_enable;
this.form.authcode = '';
this.set_rtitle();
this.set_activename();
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, {
"methods": "GET",
"data": {}
});
},
},
mounted() {
this.get_auth_code();
}, created() {
}
} }
},
methods: {
set_cookie_and_token(data) {
this.$cookies.remove("auth_token");
this.$cookies.set("token", data['token'], 3600 * 24 * 30);
this.$cookies.set("username", data.userinfo.username, 3600 * 24 * 30);
this.$cookies.set("first_name", data.userinfo.first_name, 3600 * 24 * 30);
this.$store.dispatch("doUserinfo", data.userinfo);
set_auth_token();
this.$router.push({name: 'FirApps'})
},
loop_get_wx_info(wx_login_ticket) {
if (wx_login_ticket && wx_login_ticket.length < 3) {
this.$message.error("获取登陆码失败,请稍后再试");
return
}
let c_count = 1;
// eslint-disable-next-line no-unused-vars
const loop_t = window.setInterval(res => {
if (!this.loop_flag) {
window.clearInterval(loop_t);
}
wxLoginFun(data => {
c_count += 1;
if (c_count > 120) {
window.clearInterval(loop_t);
}
if (data.code === 1000) {
window.clearInterval(loop_t);
this.set_cookie_and_token(data);
} else if (data.code === 1005) {
window.clearInterval(loop_t);
this.wx_visible = false;
this.loop_flag = false;
this.$message({
message: data.msg,
type: 'error',
duration: 30000
});
}
}, {
"methods": "POST",
data: {"ticket": wx_login_ticket}
})
}, 3000)
},
wxLogin() {
this.wx_visible = !this.wx_visible;
this.wx_login_qr_url = '';
if (this.wx_visible) {
wxLoginFun(data => {
if (data.code === 1000) {
this.wx_login_qr_url = data.data.qr;
this.loop_flag = true;
this.loop_get_wx_info(data.data.ticket);
} else {
this.$message.error(data.msg);
this.wx_visible = false;
this.loop_flag = false;
}
}, {
"methods": "GET",
})
} else {
this.loop_flag = false;
}
},
is_captcha() {
let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
return captcha_flag
},
onSubmit() {
let email = this.form.email;
let password = this.form.password;
let authcode = this.form.authcode;
let login_type = 'up';
let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (captcha_flag) {
if (this.activeName === "username") {
if (email.length < 6) {
this.$message({
message: '用户名至少6位',
type: 'error'
});
return
}
} else if (this.activeName === "smsemail") {
let checkp = checkphone(this.form.email);
let checke = checkEmail(this.form.email);
if (!checkp && !checke) {
this.$message({
message: '邮箱或者手机号输入有误',
type: 'error'
});
return
}
if (checkp) {
login_type = 'sms';
} else if (checke) {
login_type = 'email';
}
} else {
this.$message({
message: '未知登录方式',
type: 'error'
});
return
}
if (password.length > 6) {
let params = {
"username": email,
"password": password,
"authcode": authcode,
"captcha_key": this.captcha.captcha_key,
"login_type": login_type,
};
this.login_disable = true;
if (this.captcha.geetest) {
geetest(this, this.form.email, params, (n_params) => {
this.do_login(n_params);
})
} else {
this.do_login(params)
}
} else {
this.$message({
message: '密码长度过短',
type: 'warning'
});
}
} else {
this.$message({
message: '验证码有误',
type: 'warning'
});
}
},
do_login(params) {
loginFun(data => {
if (data.code === 1000) {
this.$message({
message: '登录成功',
type: 'success'
});
this.set_cookie_and_token(data);
} else {
this.$message({
message: data.msg,
type: 'error'
});
this.get_auth_code();
}
this.login_disable = false;
}, {
"methods": "POST",
"data": params
});
},
onRegister() {
this.$router.push({name: 'FirRegist'})
},
set_activename() {
if (this.allow_ways.up) {
this.activeName = 'username';
} else {
this.activeName = 'smsemail';
}
},
set_rtitle() {
this.rutitle = '';
if (this.allow_ways.sms) {
this.rutitle = this.rutitle + '手机号 ';
}
if (this.allow_ways.email) {
this.rutitle = this.rutitle + '邮箱 ';
}
this.rutitle = this.rutitle.trim().replace(' ', '或');
},
get_auth_code() {
loginFun(data => {
if (data.code === 1000) {
this.captcha = data.data;
this.allow_ways = data.data.login_type;
this.register_enable = data.data.register_enable;
this.form.authcode = '';
this.set_rtitle();
this.set_activename();
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, {
"methods": "GET",
"data": {}
});
},
},
mounted() {
this.get_auth_code();
}, created() {
}
}
</script> </script>
<style scoped> <style scoped>
.other-way { .other-way {
position: relative; position: relative;
text-align: center; text-align: center;
} }
.other-way hr { .other-way hr {
height: 1px; height: 1px;
margin: 30px 0; margin: 30px 0;
border: 0; border: 0;
background-color: #e4e7ed; background-color: #e4e7ed;
} }
.other-way span.info { .other-way span.info {
font-size: 12px; font-size: 12px;
line-height: 1; line-height: 1;
position: absolute; position: absolute;
top: -6px; top: -6px;
left: 50%; left: 50%;
padding: 0 10px; padding: 0 10px;
transform: translate(-50%, 0); transform: translate(-50%, 0);
color: #9ba3af; color: #9ba3af;
} }
.el-container { .el-container {
margin: 10px auto; margin: 10px auto;
width: 1266px; width: 1266px;
} }
.el-header { .el-header {
margin-top: 13%; margin-top: 13%;
} }
.el-form { .el-form {
max-width: 360px; max-width: 360px;
margin: 0 auto; margin: 0 auto;
} }
.el-form-item .el-button { .el-form-item .el-button {
max-width: 360px; max-width: 360px;
/*padding: 16px 20px;*/ /*padding: 16px 20px;*/
width: 100%; width: 100%;
position: relative; position: relative;
height: 50px; height: 50px;
} }
.el-header { .el-header {
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
margin-bottom: 50px margin-bottom: 50px
} }
.el-header div span { .el-header div span {
font-size: 24px; font-size: 24px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
padding: 8px 40px padding: 8px 40px
} }
.el-header div:before, .el-header div:after { .el-header div:before, .el-header div:after {
content: ' '; content: ' ';
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
width: 50%; width: 50%;
height: 1px; height: 1px;
background-color: #babfc3; background-color: #babfc3;
margin: 0 0 0 -50% margin: 0 0 0 -50%
} }
.el-header div { .el-header div {
text-align: center text-align: center
} }
.el-header div:after { .el-header div:after {
margin: 0 -50% 0 0 margin: 0 -50% 0 0
} }
</style> </style>

@ -1,389 +1,389 @@
<template> <template>
<el-container> <el-container>
<div style="margin: 10px 0 10px 0 ;position:absolute;right:20px;top:auto;"> <div style="margin: 10px 0 10px 0 ;position:absolute;right:20px;top:auto;">
<el-button round icon="el-icon-arrow-left" @click="$router.go(-1)"/> <el-button icon="el-icon-arrow-left" round @click="$router.go(-1)"/>
<el-button round icon="el-icon-s-home" @click="$router.push({name:'FirIndex'})"/> <el-button icon="el-icon-s-home" round @click="$router.push({name:'FirIndex'})"/>
</div> </div>
<el-header> <el-header>
<div> <div>
<span>注册</span> <span>注册</span>
</div> </div>
</el-header> </el-header>
<el-main v-if="allow_r"> <el-main v-if="allow_r">
<el-form ref="form" :model="form"> <el-form ref="form" :model="form">
<el-form-item v-if="allow_ways.code"> <el-form-item v-if="allow_ways.code">
<el-input v-model="form.icode" prefix-icon="el-icon-postcard" placeholder="邀请码必填" clearable <el-input v-model="form.icode" clearable placeholder="邀请码必填" prefix-icon="el-icon-postcard"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.email" prefix-icon="el-icon-user" :placeholder="rutitle" autofocus <el-input v-model="form.email" :placeholder="rutitle" autofocus clearable
clearable/> prefix-icon="el-icon-user"/>
</el-form-item> </el-form-item>
<el-form-item style="height: 40px" v-if="captcha.captcha_image"> <el-form-item v-if="captcha.captcha_image" style="height: 40px">
<el-row style="height: 40px"> <el-row style="height: 40px">
<el-col :span="16"> <el-col :span="16">
<el-input placeholder="请输入图片验证码" v-model="form.authcode" maxlength="6" clearable/> <el-input v-model="form.authcode" clearable maxlength="6" placeholder="请输入图片验证码"/>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-image <el-image
style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px" :src="captcha.captcha_image"
:src="captcha.captcha_image" fit="contain"
fit="contain" @click="get_auth_code"> style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px" @click="get_auth_code">
</el-image> </el-image>
</el-col> </el-col>
</el-row> </el-row>
</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.seicode" prefix-icon="el-icon-mobile" <el-input v-model="form.seicode" clearable
placeholder="验证码" clearable/> placeholder="验证码" prefix-icon="el-icon-mobile"/>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="info" @click="getphonecode" plain <el-button plain style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px" type="info"
style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px">获取验证码 @click="getphonecode">获取验证码
</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-input v-model="form.password" prefix-icon="el-icon-lock" placeholder="密码" <el-input v-model="form.password" clearable placeholder="密码"
show-password clearable/> prefix-icon="el-icon-lock" show-password/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.password2" prefix-icon="el-icon-lock" placeholder="确认密码" <el-input v-model="form.password2" clearable placeholder="确认密码"
show-password @keyup.enter.native="onRegist" clearable/> prefix-icon="el-icon-lock" show-password @keyup.enter.native="onRegist"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div id="captcha" ref="captcha"></div> <div id="captcha" ref="captcha"></div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="danger" @click="onRegist" :disabled="register_disable">注册</el-button> <el-button :disabled="register_disable" type="danger" @click="onRegist">注册</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onLogin" plain>我是老用户,要登录</el-button> <el-button plain type="primary" @click="onLogin">我是老用户,要登录</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
import {getAuthTokenFun, registerFun} from "@/restful"; import {getAuthTokenFun, registerFun} from "@/restful";
import {checkEmail, checkphone, geetest} from "@/utils"; import {checkEmail, checkphone, geetest} from "@/utils";
export default { export default {
name: "FirRegist", name: "FirRegist",
data() { data() {
return { return {
form: { form: {
email: '', email: '',
password: '', password: '',
password2: '', password2: '',
authcode: '', authcode: '',
srccode: '', srccode: '',
seicode: '', seicode: '',
authtoken: '', authtoken: '',
icode: '', icode: '',
auth_token: '', auth_token: '',
}, },
captcha: {"captcha_image": '', "captcha_key": '', "length": 8}, captcha: {"captcha_image": '', "captcha_key": '', "length": 8},
allow_r: false, allow_r: false,
allow_ways: {}, allow_ways: {},
rutitle: '', rutitle: '',
register_disable: false, register_disable: false,
} }
}, },
methods: { methods: {
set_rtitle() { set_rtitle() {
this.rutitle = ''; this.rutitle = '';
if (this.allow_ways.sms) { if (this.allow_ways.sms) {
this.rutitle = this.rutitle + '手机号 '; this.rutitle = this.rutitle + '手机号 ';
} }
if (this.allow_ways.email) { if (this.allow_ways.email) {
this.rutitle = this.rutitle + '邮箱 '; this.rutitle = this.rutitle + '邮箱 ';
} }
this.rutitle = this.rutitle.trim().replace(' ', '或'); this.rutitle = this.rutitle.trim().replace(' ', '或');
}, },
get_auth_code() { get_auth_code() {
registerFun(data => { registerFun(data => {
if (data.code === 1000) { if (data.code === 1000) {
let jdata = data.data; let jdata = data.data;
if (jdata.enable) { if (jdata.enable) {
this.allow_r = true; this.allow_r = true;
this.allow_ways = jdata.register_type; this.allow_ways = jdata.register_type;
this.form.authcode = ''; this.form.authcode = '';
this.set_rtitle(); this.set_rtitle();
this.captcha = data.data; this.captcha = data.data;
} else { } else {
this.allow_r = false; this.allow_r = false;
this.$message({ this.$message({
message: "该服务器不允许注册", message: "该服务器不允许注册",
type: 'error' type: 'error'
}); });
} }
} else { } else {
this.$message({ this.$message({
message: data.msg, message: data.msg,
type: 'error' type: 'error'
}); });
}
}, {
"methods": "GET",
"data": {}
});
},
do_get_auth_token(params) {
getAuthTokenFun(data => {
if (data.code === 1000) {
this.$notify({
title: '验证码',
message: '您正在进行注册,验证码已经发送您',
type: 'success'
});
this.form.auth_token = data.data.auth_token;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, {"methods": 'POST', 'data': params})
},
getphonecode() {
let act = 'up';
if (!this.docheck()) {
return
}
if (checkphone(this.form.email)) {
act = 'sms'
}
if (checkEmail(this.form.email)) {
act = 'email'
}
let authcode = this.form.authcode;
let captcha_flag = authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (captcha_flag) {
let picode = {
"authcode": authcode,
"captcha_key": this.captcha.captcha_key,
"icode": this.form.icode,
};
let params = {'act': act, 'target': this.form.email, 'ext': picode};
if (this.captcha.geetest) {
geetest(this, this.form.email, params, (n_params) => {
this.do_get_auth_token(n_params);
})
} else {
this.do_get_auth_token(params);
}
} else {
this.$message({
message: '图片验证码有误',
type: 'warning'
});
}
},
docheck() {
let checkp = checkphone(this.form.email);
let checke = checkEmail(this.form.email);
if (this.allow_ways.sms && this.allow_ways.email) {
if (!checke && !checkp) {
this.$message({
message: '请输入正确的邮箱地址或手机号码',
type: 'warning'
});
return 0
}
} else {
if (this.allow_ways.email) {
if (!checke) {
this.$message({
message: '请输入正确的邮箱地址',
type: 'warning'
});
return 0
}
}
if (this.allow_ways.sms) {
if (!checkp) {
this.$message({
message: '请输入正确的手机号码',
type: 'warning'
});
return 0
}
}
}
if (this.allow_ways.code && this.form.icode.length === 0) {
this.$message({
message: '请输入邀请码',
type: 'warning'
});
return 0
}
return 1
},
do_register(params) {
registerFun(data => {
if (data.code === 1000) {
this.$message({
message: '注册成功',
type: 'success'
});
this.$router.push({name: 'FirLogin'})
} else {
this.$message({
message: data.msg,
type: 'error'
});
this.get_auth_code();
}
}, {
"methods": "POST",
"data": params
});
this.register_disable = false;
},
onRegist() {
let email = this.form.email;
let password = this.form.password;
let password2 = this.form.password2;
if (!this.docheck()) {
return
}
let authcode = this.form.authcode;
let captcha_flag = authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (captcha_flag) {
if (password === password2 && password.length >= 6) {
let params = {
"username": email,
"password": password,
"password2": password2,
"auth_token": this.form.auth_token,
"auth_key": this.form.seicode
};
this.register_disable = true;
if (this.captcha.geetest) {
geetest(this, this.form.email, params, (n_params) => {
this.do_register(n_params);
})
} else {
this.do_register(params);
}
} else {
this.$message({
message: '密码不一致或者密码长度小于6',
type: 'warning'
});
}
} else {
this.$message({
message: '验证码有误',
type: 'warning'
});
}
},
onLogin() {
this.$router.push({name: 'FirLogin'})
},
} }
, }, {
created() { "methods": "GET",
}, mounted() { "data": {}
this.get_auth_code(); });
},
do_get_auth_token(params) {
getAuthTokenFun(data => {
if (data.code === 1000) {
this.$notify({
title: '验证码',
message: '您正在进行注册,验证码已经发送您',
type: 'success'
});
this.form.auth_token = data.data.auth_token;
} else {
this.$message({
message: data.msg,
type: 'error'
});
} }
} }, {"methods": 'POST', 'data': params})
},
getphonecode() {
let act = 'up';
if (!this.docheck()) {
return
}
if (checkphone(this.form.email)) {
act = 'sms'
}
if (checkEmail(this.form.email)) {
act = 'email'
}
let authcode = this.form.authcode;
let captcha_flag = authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (captcha_flag) {
let picode = {
"authcode": authcode,
"captcha_key": this.captcha.captcha_key,
"icode": this.form.icode,
};
let params = {'act': act, 'target': this.form.email, 'ext': picode};
if (this.captcha.geetest) {
geetest(this, this.form.email, params, (n_params) => {
this.do_get_auth_token(n_params);
})
} else {
this.do_get_auth_token(params);
}
} else {
this.$message({
message: '图片验证码有误',
type: 'warning'
});
}
},
docheck() {
let checkp = checkphone(this.form.email);
let checke = checkEmail(this.form.email);
if (this.allow_ways.sms && this.allow_ways.email) {
if (!checke && !checkp) {
this.$message({
message: '请输入正确的邮箱地址或手机号码',
type: 'warning'
});
return 0
}
} else {
if (this.allow_ways.email) {
if (!checke) {
this.$message({
message: '请输入正确的邮箱地址',
type: 'warning'
});
return 0
}
}
if (this.allow_ways.sms) {
if (!checkp) {
this.$message({
message: '请输入正确的手机号码',
type: 'warning'
});
return 0
}
}
}
if (this.allow_ways.code && this.form.icode.length === 0) {
this.$message({
message: '请输入邀请码',
type: 'warning'
});
return 0
}
return 1
},
do_register(params) {
registerFun(data => {
if (data.code === 1000) {
this.$message({
message: '注册成功',
type: 'success'
});
this.$router.push({name: 'FirLogin'})
} else {
this.$message({
message: data.msg,
type: 'error'
});
this.get_auth_code();
}
}, {
"methods": "POST",
"data": params
});
this.register_disable = false;
},
onRegist() {
let email = this.form.email;
let password = this.form.password;
let password2 = this.form.password2;
if (!this.docheck()) {
return
}
let authcode = this.form.authcode;
let captcha_flag = authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (captcha_flag) {
if (password === password2 && password.length >= 6) {
let params = {
"username": email,
"password": password,
"password2": password2,
"auth_token": this.form.auth_token,
"auth_key": this.form.seicode
};
this.register_disable = true;
if (this.captcha.geetest) {
geetest(this, this.form.email, params, (n_params) => {
this.do_register(n_params);
})
} else {
this.do_register(params);
}
} else {
this.$message({
message: '密码不一致或者密码长度小于6',
type: 'warning'
});
}
} else {
this.$message({
message: '验证码有误',
type: 'warning'
});
}
},
onLogin() {
this.$router.push({name: 'FirLogin'})
},
}
,
created() {
}, mounted() {
this.get_auth_code();
}
}
</script> </script>
<style scoped> <style scoped>
.el-container { .el-container {
margin: 10px auto; margin: 10px auto;
width: 1266px; width: 1266px;
} }
.el-header { .el-header {
margin-top: 13%; margin-top: 13%;
} }
.el-form { .el-form {
max-width: 360px; max-width: 360px;
margin: 0 auto; margin: 0 auto;
} }
.el-form-item .el-button { .el-form-item .el-button {
max-width: 360px; max-width: 360px;
width: 100%; width: 100%;
position: relative; position: relative;
height: 50px; height: 50px;
} }
.el-header { .el-header {
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
margin-bottom: 50px margin-bottom: 50px
} }
.el-header div span { .el-header div span {
font-size: 24px; font-size: 24px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
padding: 8px 40px padding: 8px 40px
} }
.el-header div:before, .el-header div:after { .el-header div:before, .el-header div:after {
content: ' '; content: ' ';
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
width: 50%; width: 50%;
height: 1px; height: 1px;
background-color: #babfc3; background-color: #babfc3;
margin: 0 0 0 -50% margin: 0 0 0 -50%
} }
.el-header div { .el-header div {
text-align: center text-align: center
} }
.el-header div:after { .el-header div:after {
margin: 0 -50% 0 0 margin: 0 -50% 0 0
} }
</style> </style>

@ -1,277 +1,277 @@
<template> <template>
<el-container> <el-container>
<div style="margin: 10px 0 10px 0 ;position:absolute;right:20px;top:auto;"> <div style="margin: 10px 0 10px 0 ;position:absolute;right:20px;top:auto;">
<el-button round icon="el-icon-arrow-left" @click="$router.go(-1)"/> <el-button icon="el-icon-arrow-left" round @click="$router.go(-1)"/>
<el-button round icon="el-icon-s-home" @click="$router.push({name:'FirIndex'})"/> <el-button icon="el-icon-s-home" round @click="$router.push({name:'FirIndex'})"/>
</div> </div>
<el-header> <el-header>
<div> <div>
<span>忘记密码</span> <span>忘记密码</span>
</div> </div>
</el-header> </el-header>
<el-main> <el-main>
<el-form ref="form" :model="form"> <el-form ref="form" :model="form">
<el-form-item> <el-form-item>
<el-input v-model="form.email" prefix-icon="el-icon-user" placeholder="邮箱或手机号" autofocus <el-input v-model="form.email" autofocus clearable placeholder="邮箱或手机号"
clearable/> prefix-icon="el-icon-user"/>
</el-form-item> </el-form-item>
<el-form-item style="height: 40px" v-if="captcha.captcha_image"> <el-form-item v-if="captcha.captcha_image" style="height: 40px">
<el-row style="height: 40px"> <el-row style="height: 40px">
<el-col :span="16"> <el-col :span="16">
<el-input placeholder="请输入验证码" v-model="form.authcode" maxlength="6" <el-input v-model="form.authcode" clearable maxlength="6"
@keyup.enter.native="onSubmit" clearable/> placeholder="请输入验证码" @keyup.enter.native="onSubmit"/>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-image <el-image
style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px" :src="captcha.captcha_image"
:src="captcha.captcha_image" fit="contain"
fit="contain" @click="get_auth_code"> style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px" @click="get_auth_code">
</el-image> </el-image>
</el-col> </el-col>
</el-row> </el-row>
</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.seicode" prefix-icon="el-icon-mobile" <el-input v-model="form.seicode" clearable
placeholder="验证码" clearable/> placeholder="验证码" prefix-icon="el-icon-mobile"/>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="info" @click="onGetCode" plain <el-button plain style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px" type="info"
style="margin:0 4px;border-radius:4px;cursor:pointer;height: 40px">获取验证码 @click="onGetCode">获取验证码
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div id="captcha" ref="captcha"></div> <div id="captcha" ref="captcha"></div>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: 30px"> <el-form-item style="margin-top: 30px">
<el-button type="danger" :disabled="login_disable" @click="onReset">发送重置密码邮件</el-button> <el-button :disabled="login_disable" type="danger" @click="onReset">发送重置密码邮件</el-button>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: 30px"> <el-form-item style="margin-top: 30px">
<el-button type="primary" @click="onLogin">我是老用户,要登录</el-button> <el-button type="primary" @click="onLogin">我是老用户,要登录</el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="register_enable" style="margin-top: 30px"> <el-form-item v-if="register_enable" style="margin-top: 30px">
<el-button type="primary" @click="onRegister" plain>注册</el-button> <el-button plain type="primary" @click="onRegister">注册</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
import {loginFun} from "@/restful"; import {loginFun} from "@/restful";
import {checkEmail, geetest, checkphone} from "@/utils"; import {checkEmail, checkphone, geetest} from "@/utils";
export default { export default {
name: "FirResetPwd", name: "FirResetPwd",
data() { data() {
return { return {
form: { form: {
email: '', email: '',
password: '', password: '',
authcode: '', authcode: '',
seicode: '', seicode: '',
auth_token: '' auth_token: ''
}, },
captcha: {"captcha_image": '', "captcha_key": '', "length": 8}, captcha: {"captcha_image": '', "captcha_key": '', "length": 8},
activeName: 'username', activeName: 'username',
allow_ways: {}, allow_ways: {},
rutitle: '', rutitle: '',
rctitle: '', rctitle: '',
register_enable: false, register_enable: false,
login_disable: false, login_disable: false,
} }
}, },
methods: { methods: {
onGetCode() { onGetCode() {
this.form.auth_token = ''; this.form.auth_token = '';
this.form.seicode = ''; this.form.seicode = '';
this.onSubmit(); this.onSubmit();
}, },
onReset() { onReset() {
if (this.form.auth_token && this.form.seicode && this.form.seicode.length > 3) { if (this.form.auth_token && this.form.seicode && this.form.seicode.length > 3) {
this.onSubmit() this.onSubmit()
} else { } else {
this.$message.error("输入有误,请检查") this.$message.error("输入有误,请检查")
} }
}, },
is_captcha() { is_captcha() {
let captcha_flag = this.form.authcode.length === this.captcha.length; let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) { if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true captcha_flag = true
} }
return captcha_flag return captcha_flag
}, },
onSubmit() { onSubmit() {
let email = this.form.email; let email = this.form.email;
let authcode = this.form.authcode; let authcode = this.form.authcode;
let captcha_flag = this.form.authcode.length === this.captcha.length; let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) { if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true captcha_flag = true
} }
if (captcha_flag) { if (captcha_flag) {
let checke = checkEmail(this.form.email); let checke = checkEmail(this.form.email);
let checkp = checkphone(this.form.email); let checkp = checkphone(this.form.email);
if (checke || checkp) { if (checke || checkp) {
let params = { let params = {
"username": email, "username": email,
"authcode": authcode, "authcode": authcode,
"captcha_key": this.captcha.captcha_key, "captcha_key": this.captcha.captcha_key,
"login_type": 'reset', "login_type": 'reset',
}; };
let seicode = this.form.seicode; let seicode = this.form.seicode;
let auth_token = this.form.auth_token; let auth_token = this.form.auth_token;
if (seicode && seicode.length > 3) { if (seicode && seicode.length > 3) {
params['seicode'] = seicode params['seicode'] = seicode
} }
if (auth_token && auth_token.length > 3) { if (auth_token && auth_token.length > 3) {
params['auth_token'] = auth_token params['auth_token'] = auth_token
} }
this.login_disable = true; this.login_disable = true;
if (this.captcha.geetest) { if (this.captcha.geetest) {
geetest(this, this.form.email, params, (n_params) => { geetest(this, this.form.email, params, (n_params) => {
this.do_login(n_params); this.do_login(n_params);
}) })
} else { } else {
this.do_login(params) this.do_login(params)
} }
} else { } else {
this.$message({ this.$message({
message: '邮箱或手机号输入有误', message: '邮箱或手机号输入有误',
type: 'error' type: 'error'
}); });
} }
} else { } else {
this.$message({ this.$message({
message: '验证码有误', message: '验证码有误',
type: 'warning' type: 'warning'
}); });
} }
}, },
do_login(params) { do_login(params) {
loginFun(data => { loginFun(data => {
if (data.code === 1000) { if (data.code === 1000) {
let msg = '密码重置成功,请登录邮箱或者手机短信查看'; let msg = '密码重置成功,请登录邮箱或者手机短信查看';
if (data.data && data.data.auth_token) { if (data.data && data.data.auth_token) {
this.form.auth_token = data.data.auth_token; this.form.auth_token = data.data.auth_token;
msg = "验证码发送成功,请登录邮箱或者手机短信查看" msg = "验证码发送成功,请登录邮箱或者手机短信查看"
} }
this.$message({ this.$message({
message: msg, message: msg,
type: 'success' type: 'success'
}); });
} else { } else {
this.$message({ this.$message({
message: data.msg, message: data.msg,
type: 'error' type: 'error'
}); });
this.get_auth_code(); this.get_auth_code();
}
this.login_disable = false;
}, {
"methods": "POST",
"data": params
});
},
onRegister() {
this.$router.push({name: 'FirRegist'})
},
onLogin() {
this.$router.push({name: 'FirLogin'})
},
get_auth_code() {
loginFun(data => {
if (data.code === 1000) {
this.captcha = data.data;
this.register_enable = data.data.register_enable;
this.form.authcode = '';
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, {
"methods": "GET",
"data": {}
});
},
},
mounted() {
this.get_auth_code();
}, created() {
} }
} this.login_disable = false;
}, {
"methods": "POST",
"data": params
});
},
onRegister() {
this.$router.push({name: 'FirRegist'})
},
onLogin() {
this.$router.push({name: 'FirLogin'})
},
get_auth_code() {
loginFun(data => {
if (data.code === 1000) {
this.captcha = data.data;
this.register_enable = data.data.register_enable;
this.form.authcode = '';
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, {
"methods": "GET",
"data": {}
});
},
},
mounted() {
this.get_auth_code();
}, created() {
}
}
</script> </script>
<style scoped> <style scoped>
.el-container { .el-container {
margin: 10px auto; margin: 10px auto;
width: 1266px; width: 1266px;
} }
.el-header { .el-header {
margin-top: 13%; margin-top: 13%;
} }
.el-form { .el-form {
max-width: 360px; max-width: 360px;
margin: 0 auto; margin: 0 auto;
} }
.el-form-item .el-button { .el-form-item .el-button {
max-width: 360px; max-width: 360px;
/*padding: 16px 20px;*/ /*padding: 16px 20px;*/
width: 100%; width: 100%;
position: relative; position: relative;
height: 50px; height: 50px;
} }
.el-header { .el-header {
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
margin-bottom: 50px margin-bottom: 50px
} }
.el-header div span { .el-header div span {
font-size: 24px; font-size: 24px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
padding: 8px 40px padding: 8px 40px
} }
.el-header div:before, .el-header div:after { .el-header div:before, .el-header div:after {
content: ' '; content: ' ';
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
width: 50%; width: 50%;
height: 1px; height: 1px;
background-color: #babfc3; background-color: #babfc3;
margin: 0 0 0 -50% margin: 0 0 0 -50%
} }
.el-header div { .el-header div {
text-align: center text-align: center
} }
.el-header div:after { .el-header div:after {
margin: 0 -50% 0 0 margin: 0 -50% 0 0
} }
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1,406 +1,406 @@
<template> <template>
<div class="main"> <div class="main">
<div class="page-app app-info"> <div class="page-app app-info">
<div class="banner"> <div class="banner">
<div class="middle-wrapper"> <div class="middle-wrapper">
<div @click="defaulttimeline"> <div @click="defaulttimeline">
<img ref="icon_url" :src="icon_url" class="appicon" style="width:100px; height:100px" alt=""> <img ref="icon_url" :src="icon_url" alt="" class="appicon" style="width:100px; height:100px">
</div> </div>
<div class="badges"> <div class="badges">
<el-tooltip content="复制到剪切板" placement="top"> <el-tooltip content="复制到剪切板" placement="top">
<span class="bundleid short" <span v-clipboard:copy="short_full_url"
v-clipboard:copy="short_full_url"
v-clipboard:success="copy_success" v-clipboard:success="copy_success"
>&nbsp;{{short_full_url }}</span> class="bundleid short"
</el-tooltip> >&nbsp;{{ short_full_url }}</span>
<span>{{ master_release.release_type |getapptype }}</span> </el-tooltip>
<el-tooltip content="下载量" placement="top"> <span>{{ master_release.release_type |getapptype }}</span>
<span><i class="el-icon-cloudy"/><b class="short">{{ appinfos.count_hits }}</b></span> <el-tooltip content="下载量" placement="top">
</el-tooltip> <span><i class="el-icon-cloudy"/><b class="short">{{ appinfos.count_hits }}</b></span>
<span class="bundleid ng-binding">BundleID<b class="ng-binding"> </el-tooltip>
<span class="bundleid ng-binding">BundleID<b class="ng-binding">
<el-tooltip content="复制到剪切板" placement="top"> <el-tooltip content="复制到剪切板" placement="top">
<span class="bundleid short" <span v-clipboard:copy="appinfos.bundle_id"
v-clipboard:copy="appinfos.bundle_id"
v-clipboard:success="copy_success" v-clipboard:success="copy_success"
>&nbsp;{{appinfos.bundle_id }}</span> class="bundleid short"
>&nbsp;{{ appinfos.bundle_id }}</span>
</el-tooltip> </el-tooltip>
</b></span> </b></span>
<span class="version ng-scope">{{ master_release.minimum_os_version }}&nbsp; 或者高版本</span> <span class="version ng-scope">{{ master_release.minimum_os_version }}&nbsp; 或者高版本</span>
<span class="short ng-scope" v-if="appinfos.issupersign">超级签</span> <span v-if="appinfos.issupersign" class="short ng-scope">超级签</span>
<el-popover <el-popover
v-if="$store.state.userinfo&&$store.state.userinfo.role >1 &&$store.state.userinfo.qrcode_domain_name.length>3 " 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">
<vue-qr :margin="qrinfo.margin" <vue-qr ref="qr"
:logoSrc="icon_url" :logoScale="qrinfo.logoScale" :correctLevel="qrinfo.correctLevel" :logoCornerRadius="qrinfo.logoCornerRadius"
:logoCornerRadius="qrinfo.logoCornerRadius" :logoScale="qrinfo.logoScale"
:correctLevel="qrinfo.correctLevel" :logoSrc="icon_url"
:text="short_url()" :size="266" :margin="qrinfo.margin" :size="266"
ref="qr"> :text="short_url()">
</vue-qr> </vue-qr>
<el-button type="primary" size="small" @click="save_qr()">保存本地</el-button> <el-button size="small" type="primary" @click="save_qr()">保存本地</el-button>
</div> </div>
<span class="short ng-scope" slot="reference">下载码</span> <span slot="reference" class="short ng-scope">下载码</span>
</el-popover> </el-popover>
</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 @click="appDownload" class="download" icon="el-icon-view"> <el-button v-else class="download" icon="el-icon-view" @click="appDownload">
预览 预览
</el-button> </el-button>
</div> </div>
<div class="tabs-container"> <div class="tabs-container">
<el-row :gutter="1"> <el-row :gutter="1">
<el-col :span="3"> <el-col :span="3">
<a class="" ref="baseinfo" @click="baseinfo"><i class="el-icon-document"/>基本信息</a> <a ref="baseinfo" class="" @click="baseinfo"><i class="el-icon-document"/>基本信息</a>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<a class="" ref="security" @click="security"><i class="el-icon-set-up"/>应用管理</a> <a ref="security" class="" @click="security"><i class="el-icon-set-up"/>应用管理</a>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<a class="" ref="combo" @click="combo"><i class="el-icon-copy-document" <a ref="combo" class="" @click="combo"><i class="el-icon-copy-document"
style="transform:rotateX(180deg);"/>应用合并</a> style="transform:rotateX(180deg);"/>应用合并</a>
</el-col> </el-col>
<el-col :span="3" <el-col v-if="appinfos.type===1 || appinfos.issupersign "
v-if="appinfos.type===1 || appinfos.issupersign "> :span="3">
<a class="" ref="supersign" @click="supersign"><i <a ref="supersign" class="" @click="supersign"><i
class="el-icon-ship"/>超级签名</a> class="el-icon-ship"/>超级签名</a>
</el-col> </el-col>
<el-col :span="3" <el-col v-if="(appinfos.type===1 && master_release.release_type ===1) || appinfos.issupersign "
v-if="(appinfos.type===1 && master_release.release_type ===1) || appinfos.issupersign "> :span="3">
<a class="" ref="devices" @click="devices"><i class="el-icon-mobile-phone"/>设备列表</a> <a ref="devices" class="" @click="devices"><i class="el-icon-mobile-phone"/>设备列表</a>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</div>
</div>
<div>
<div class="block" style="margin-top: -46px;color: #d5f9f9">
<el-slider
v-model="$store.state.appInfoIndex[0]"
range
:show-tooltip="false"
:max="100">
</el-slider>
</div>
<el-container style="padding-top: 20px;max-width: 96%">
<router-view/>
</el-container>
</div>
</div> </div>
</div>
<div>
<div class="block" style="margin-top: -46px;color: #d5f9f9">
<el-slider
v-model="$store.state.appInfoIndex[0]"
:max="100"
:show-tooltip="false"
range>
</el-slider>
</div>
<el-container style="padding-top: 20px;max-width: 96%">
<router-view/>
</el-container>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import {apputils} from "@/restful"; import {apputils} from "@/restful";
import VueQr from 'vue-qr'; import VueQr from 'vue-qr';
import {getUserInfoFun} from "@/utils"; import {getUserInfoFun} from "@/utils";
export default { export default {
name: "FirAppInfosBase", name: "FirAppInfosBase",
components: { components: {
VueQr VueQr
}, },
data() { data() {
return { return {
qrinfo: { qrinfo: {
logoScale: 0.3, logoScale: 0.3,
logoCornerRadius: 12, logoCornerRadius: 12,
correctLevel: 3, correctLevel: 3,
margin: 20 margin: 20
}, },
icon_url: "", icon_url: "",
appinfos: {status: 1}, appinfos: {status: 1},
master_release: {}, master_release: {},
allapp: [], allapp: [],
activity: { activity: {
editing: false editing: false
}, },
short_full_url: '', short_full_url: '',
} }
}, },
methods: { methods: {
copy_success() { copy_success() {
this.$message.success('复制剪切板成功'); this.$message.success('复制剪切板成功');
}, },
save_qr() { save_qr() {
let dtype = "I"; let dtype = "I";
if (this.master_release.release_type === 0) { if (this.master_release.release_type === 0) {
dtype = "A"; dtype = "A";
} }
let a = document.createElement('a'); let a = document.createElement('a');
// //
a.download = this.appinfos.name + '_' + dtype + "_下载码"; a.download = this.appinfos.name + '_' + dtype + "_下载码";
//url //url
a.href = this.$refs.qr.$el.src; a.href = this.$refs.qr.$el.src;
// //
a.dispatchEvent(new MouseEvent('click')) a.dispatchEvent(new MouseEvent('click'))
}, },
short_url() { short_url() {
const userinfo = this.$store.state.userinfo; const userinfo = this.$store.state.userinfo;
if (userinfo && userinfo.role > 1 && userinfo.qrcode_domain_name.length > 3) { if (userinfo && userinfo.role > 1 && userinfo.qrcode_domain_name.length > 3) {
return 'http://' + userinfo.qrcode_domain_name + '/' + this.appinfos.short; 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) {
if (key === "qr") continue; if (key === "qr") continue;
if (key === item) { if (key === item) {
if (this.$refs[key]) { if (this.$refs[key]) {
this.$refs[key].classList.add('active'); this.$refs[key].classList.add('active');
this.$store.dispatch('doappInfoIndex', [[index, index], [index, index]]); this.$store.dispatch('doappInfoIndex', [[index, index], [index, index]]);
} }
} else { } else {
if (this.$refs[key]) { if (this.$refs[key]) {
this.$refs[key].classList.remove('active'); this.$refs[key].classList.remove('active');
} }
}
}
},
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', '');
},
defaulttimeline() {
this.setfunactive('timeline', 5);
this.$router.push({name: 'FirAppInfostimeline'});
},
baseinfo() {
this.setfunactive('baseinfo', 18);
this.$router.push({name: 'FirAppInfosbaseinfo'});
},
security() {
this.setfunactive('security', 31);
this.$router.push({name: 'FirAppInfossecurity'});
},
combo() {
this.setfunactive('combo', 44);
this.$router.push({name: 'FirAppInfoscombo'});
},
devices() {
this.setfunactive('devices', 70);
this.$router.push({name: 'FirAppInfosdevices'});
},
supersign() {
this.setfunactive('supersign', 57);
this.$router.push({name: 'FirAppInfossupersign'});
},
set_icon_url() {
this.icon_url = this.$store.state.currentapp.master_release.icon_url;
},
}, created() {
}, filters: {
getapptype: function (type) {
let ftype = '';
if (type === 0) {
ftype = 'Android'
} else {
ftype = 'iOS'
}
return ftype
},
},
computed: {}, mounted() {
getUserInfoFun(this);
apputils(data => {
if (data.code === 1000) {
this.appinfos = data.data;
this.master_release = data.data.master_release;
this.appinfos["icon_url"] = this.master_release.icon_url;
this.$store.dispatch('doucurrentapp', this.appinfos);
this.short_full_url = this.appinfos.preview_url + "/" + this.appinfos.short;
} else if (data.code === 1003) {
this.$router.push({name: 'FirApps'});
} else {
// eslint-disable-next-line no-console
console.log("Error");
}
}, {
"methods": "GET",
"app_id": this.$route.params.id
});
if (this.$store.state.currentapp.master_release) {
this.set_icon_url()
}
}, watch: {
'$store.state.currentapp.master_release.icon_url': function () {
this.set_icon_url()
},
'$store.state.currentapp': function () {
this.appinfos = this.$store.state.currentapp;
},
}, destroyed() {
this.$store.dispatch('doucurrentapp', {});
} }
}
},
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', '');
},
defaulttimeline() {
this.setfunactive('timeline', 5);
this.$router.push({name: 'FirAppInfostimeline'});
},
baseinfo() {
this.setfunactive('baseinfo', 18);
this.$router.push({name: 'FirAppInfosbaseinfo'});
},
security() {
this.setfunactive('security', 31);
this.$router.push({name: 'FirAppInfossecurity'});
},
combo() {
this.setfunactive('combo', 44);
this.$router.push({name: 'FirAppInfoscombo'});
},
devices() {
this.setfunactive('devices', 70);
this.$router.push({name: 'FirAppInfosdevices'});
},
supersign() {
this.setfunactive('supersign', 57);
this.$router.push({name: 'FirAppInfossupersign'});
},
set_icon_url() {
this.icon_url = this.$store.state.currentapp.master_release.icon_url;
},
}, created() {
}, filters: {
getapptype: function (type) {
let ftype = '';
if (type === 0) {
ftype = 'Android'
} else {
ftype = 'iOS'
}
return ftype
},
},
computed: {}, mounted() {
getUserInfoFun(this);
apputils(data => {
if (data.code === 1000) {
this.appinfos = data.data;
this.master_release = data.data.master_release;
this.appinfos["icon_url"] = this.master_release.icon_url;
this.$store.dispatch('doucurrentapp', this.appinfos);
this.short_full_url = this.appinfos.preview_url + "/" + this.appinfos.short;
} else if (data.code === 1003) {
this.$router.push({name: 'FirApps'});
} else {
// eslint-disable-next-line no-console
console.log("Error");
}
}, {
"methods": "GET",
"app_id": this.$route.params.id
});
if (this.$store.state.currentapp.master_release) {
this.set_icon_url()
} }
}, watch: {
'$store.state.currentapp.master_release.icon_url': function () {
this.set_icon_url()
},
'$store.state.currentapp': function () {
this.appinfos = this.$store.state.currentapp;
},
}, destroyed() {
this.$store.dispatch('doucurrentapp', {});
}
}
</script> </script>
<style scoped> <style scoped>
.main { .main {
margin: 40px auto 100px; margin: 40px auto 100px;
position: relative; position: relative;
padding-bottom: 1px; padding-bottom: 1px;
color: #9b9b9b; color: #9b9b9b;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
border-radius: 1%; border-radius: 1%;
} }
.appicon { .appicon {
overflow: hidden; overflow: hidden;
margin-left: 10px; margin-left: 10px;
border-radius: 17.544%; border-radius: 17.544%;
} }
.page-app { .page-app {
padding-bottom: 0; padding-bottom: 0;
width: 1166px; width: 1166px;
margin: 10px auto 100px; margin: 10px auto 100px;
} }
.page-app .banner { .page-app .banner {
padding-top: 60px; padding-top: 60px;
padding-bottom: 40px; padding-bottom: 40px;
border-bottom: 1px solid rgba(208, 208, 208, .5); border-bottom: 1px solid rgba(208, 208, 208, .5);
background-color: #ffffff; background-color: #ffffff;
border-radius: 10px; border-radius: 10px;
} }
.page-app .banner .actions { .page-app .banner .actions {
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
} }
.page-app .banner .actions .download { .page-app .banner .actions .download {
display: block; display: block;
min-width: 150px; min-width: 150px;
padding: 10px 20px; padding: 10px 20px;
border-radius: 5px; border-radius: 5px;
font-size: 14px; font-size: 14px;
margin: 0 12px 12px 12px margin: 0 12px 12px 12px
} }
.page-app .banner .actions .download { .page-app .banner .actions .download {
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
color: #3ab2a7; color: #3ab2a7;
border: 1px solid; border: 1px solid;
background-color: transparent background-color: transparent
} }
.page-app .banner .middle-wrapper { .page-app .banner .middle-wrapper {
position: relative position: relative
} }
.page-app .badges { .page-app .badges {
margin-left: 160px; margin-left: 160px;
font-size: 12px; font-size: 12px;
line-height: initial; line-height: initial;
position: relative; position: relative;
margin-top: -100px; margin-top: -100px;
} }
.page-app .badges > span { .page-app .badges > span {
position: relative; position: relative;
display: inline-block; display: inline-block;
margin-right: 8px; margin-right: 8px;
padding: 4px 8px; padding: 4px 8px;
border: 1px solid; border: 1px solid;
border-radius: 5px border-radius: 5px
} }
.page-app .badges .short { .page-app .badges .short {
color: #6f6ef8 color: #6f6ef8
} }
.page-app .badges .short:hover { .page-app .badges .short:hover {
cursor: pointer; cursor: pointer;
} }
.page-app .badges b { .page-app .badges b {
display: inline-block; display: inline-block;
padding-left: 12px; padding-left: 12px;
height: 100%; height: 100%;
font-weight: 400 font-weight: 400
} }
.page-app .badges b:before { .page-app .badges b:before {
position: absolute; position: absolute;
top: 0; top: 0;
width: 0; width: 0;
height: 100%; height: 100%;
border-left: 1px solid; border-left: 1px solid;
content: ' '; content: ' ';
margin-left: -6px margin-left: -6px
} }
.page-app .tabs-container { .page-app .tabs-container {
margin-top: 40px; margin-top: 40px;
margin-left: 160px margin-left: 160px
} }
.page-app .tabs-container .el-row { .page-app .tabs-container .el-row {
margin: 10px auto; margin: 10px auto;
} }
.page-app .tabs-container .el-row .el-col { .page-app .tabs-container .el-row .el-col {
margin-right: 30px; margin-right: 30px;
border-left: 1px solid; border-left: 1px solid;
} }
.page-app .tabs-container .el-row .el-col a { .page-app .tabs-container .el-row .el-col a {
display: block; display: block;
padding-left: 15px; padding-left: 15px;
color: #599b1a; color: #599b1a;
text-decoration: none; text-decoration: none;
-webkit-transition: all .5s; -webkit-transition: all .5s;
transition: all .5s transition: all .5s
} }
.page-app .tabs-container .el-row .el-col a > i { .page-app .tabs-container .el-row .el-col a > i {
display: block; display: block;
margin-bottom: 14px; margin-bottom: 14px;
height: 22px; height: 22px;
font-size: 22px font-size: 22px
} }
.page-app .tabs-container .el-row .el-col a.active { .page-app .tabs-container .el-row .el-col a.active {
color: #4a4a4a color: #4a4a4a
} }
.page-app .tabs-container .el-row .el-col:nth-child(6) { .page-app .tabs-container .el-row .el-col:nth-child(6) {
display: none display: none
} }
.page-app .has-devices .tabs-container .el-row .el-col:nth-child(6) { .page-app .has-devices .tabs-container .el-row .el-col:nth-child(6) {
display: inline-block display: inline-block
} }
</style> </style>

@ -1,293 +1,293 @@
<template> <template>
<div style="margin-top: 20px;width: 100%;margin-left: 8%"> <div style="margin-top: 20px;width: 100%;margin-left: 8%">
<el-form ref="form" label-width="80px"> <el-form ref="form" label-width="80px">
<el-form-item label="应用ID" style="width: 56%"> <el-form-item label="应用ID" style="width: 56%">
<el-row> <el-row>
<el-col :span="19"> <el-col :span="19">
<el-input v-model="currentapp.app_id" :disabled="true"/> <el-input v-model="currentapp.app_id" :disabled="true"/>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-button type="danger" plain @click="delApp" <el-button plain style="margin:0 8px;border-radius:4px;cursor:pointer;height: 40px" type="danger"
style="margin:0 8px;border-radius:4px;cursor:pointer;height: 40px">删除应用 @click="delApp">删除应用
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="应用名称" style="width: 56%"> <el-form-item label="应用名称" style="width: 56%">
<el-input v-model="currentapp.name"/> <el-input v-model="currentapp.name"/>
</el-form-item> </el-form-item>
<el-form-item label="短链接" style="width: 56%"> <el-form-item label="短链接" style="width: 56%">
<el-input v-model="currentapp.short" maxlength="16" show-word-limit type="text"> <el-input v-model="currentapp.short" maxlength="16" show-word-limit type="text">
<template slot="prepend">{{ currentapp.preview_url }}/</template> <template slot="prepend">{{ currentapp.preview_url }}/</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="应用图标" style="width: 56%"> <el-form-item label="应用图标" style="width: 56%">
<el-upload <el-upload
class="avatar-uploader" :before-upload="upload_app_icon"
action="#" :show-file-list="false"
:show-file-list="false" accept=".png , .jpg , .jpeg"
accept=".png , .jpg , .jpeg" action="#"
:before-upload="upload_app_icon"> class="avatar-uploader">
<img v-if="currentapp.icon_url" :src="currentapp.icon_url" <img v-if="currentapp.icon_url" :src="currentapp.icon_url"
class="avatar" alt=""> alt="" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"/> <i v-else class="el-icon-plus avatar-uploader-icon"/>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="应用描述" style="width: 66%"> <el-form-item label="应用描述" style="width: 66%">
<el-input type="textarea" v-model="currentapp.description" <el-input v-model="currentapp.description" :autosize="{ minRows: 8, maxRows: 18}"
:autosize="{ minRows: 8, maxRows: 18}"/> type="textarea"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-button type="primary" plain @click="saveappinfo('save')" size="medium" <el-button plain size="medium" style="width: 160px;height: 50px;font-size: large;float: right" type="primary"
style="width: 160px;height: 50px;font-size: large;float: right">保存信息 @click="saveappinfo('save')">保存信息
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-divider/> <el-divider/>
<el-form-item label="应用截图" style="width: 100%"> <el-form-item label="应用截图" style="width: 100%">
<div class="appdownload"> <div class="appdownload">
<el-tooltip content="点击删除该应用截图" v-for="(screen) in currentapp.screenshots" :key="screen.id" <el-tooltip v-for="(screen) in currentapp.screenshots" :key="screen.id" content="点击删除该应用截图"
placement="top" effect="light"> effect="light" placement="top">
<el-image <el-image
class="screen-img" :src="screen.url"
fit="scale-down" alt=""
@click="delscreen(screen.id)" class="screen-img"
:src="screen.url" alt=""> fit="scale-down" @click="delscreen(screen.id)">
<div slot="error" class="image-slot" @click="delscreen(screen.id)" <div slot="error" class="image-slot" style="text-align: center;margin-top: 80%"
style="text-align: center;margin-top: 80%"> @click="delscreen(screen.id)">
<i class="el-icon-picture-outline"> 加载失败</i> <i class="el-icon-picture-outline"> 加载失败</i>
</div> </div>
</el-image> </el-image>
</el-tooltip> </el-tooltip>
<div class="screen-img" <div v-if="currentapp.screenshots && currentapp.screenshots.length < 5"
v-if="currentapp.screenshots && currentapp.screenshots.length < 5"> class="screen-img">
<el-upload <el-upload
drag :before-upload="upload_app_screen"
action="#" accept=".png , .jpg , .jpeg"
accept=".png , .jpg , .jpeg" action="#"
:before-upload="upload_app_screen"> drag>
<i class="el-icon-upload"/> <i class="el-icon-upload"/>
</el-upload> </el-upload>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import {apputils, getapppicurl, releaseapputils} from "@/restful" import {apputils, getapppicurl, releaseapputils} from "@/restful"
import {AvatarUploadUtils} from "@/utils"; import {AvatarUploadUtils} from "@/utils";
export default { export default {
name: "FirAppInfosbaseinfo", name: "FirAppInfosbaseinfo",
data() { data() {
return { return {
currentapp: {}, currentapp: {},
imageUrl: "", imageUrl: "",
uploadconf: {}, uploadconf: {},
uploadprocess: 0, uploadprocess: 0,
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
appinfos: {}, appinfos: {},
} }
}, },
methods: { methods: {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
delscreen(screen_id) { delscreen(screen_id) {
this.$confirm('确定要删除该应用截图?', '警告', { this.$confirm('确定要删除该应用截图?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
releaseapputils(data => { releaseapputils(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.getappinfo(); this.getappinfo();
} else if (data.code === 1003) { } else if (data.code === 1003) {
this.$router.push({name: 'FirApps'}); this.$router.push({name: 'FirApps'});
} }
}, { }, {
"methods": "DELETE", "methods": "DELETE",
"app_id": this.$route.params.id, "app_id": this.$route.params.id,
"release_id": "screen", "release_id": "screen",
"data": {'screen_id': screen_id} "data": {'screen_id': screen_id}
}) })
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
});
});
},
delApp() { }).catch(() => {
//APP this.$message({
this.$confirm('确认删除 ' + this.currentapp.name + ' ?') type: 'info',
// eslint-disable-next-line no-unused-vars message: '已取消操作'
.then(res => { });
const loadingobj = this.$loading({ });
lock: true, },
text: '操作中,请耐心等待',
spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)'
});
apputils(data => {
loadingobj.close();
if (data.code === 1000) {
this.$message({
message: '删除成功',
type: 'success'
});
this.$router.push({name: 'FirApps'});
} else {
this.$message({
message: '删除失败,请联系管理员',
type: 'error'
});
}
}, {
"methods": "DELETE",
"app_id": this.currentapp.app_id
});
}) delApp() {
.catch(err => { //APP
this.$message.error(err) this.$confirm('确认删除 ' + this.currentapp.name + ' ?')
}); // eslint-disable-next-line no-unused-vars
}, .then(res => {
getappinfo() { const loadingobj = this.$loading({
apputils(data => { lock: true,
if (data.code === 1000) { text: '操作中,请耐心等待',
this.appinfos = data.data; spinner: 'el-icon-loading',
this.master_release = data.data.master_release; // background: 'rgba(0, 0, 0, 0.7)'
this.appinfos["icon_url"] = this.master_release.icon_url; });
this.$store.dispatch('doucurrentapp', this.appinfos); apputils(data => {
} else if (data.code === 1003) { loadingobj.close();
this.$router.push({name: 'FirApps'}); if (data.code === 1000) {
} else { this.$message({
// eslint-disable-next-line no-console message: '删除成功',
console.log("Error"); type: 'success'
}
}, {
"methods": "GET",
"app_id": this.currentapp.app_id
}); });
}, this.$router.push({name: 'FirApps'});
saveappinfo() { } else {
apputils(data => { this.$message({
if (data.code === 1000) { message: '删除失败,请联系管理员',
this.$message.success('数据更新成功'); type: 'error'
} else {
this.$message.error('操作失败,' + data.msg);
}
}, {
"methods": "PUT",
"app_id": this.currentapp.app_id,
"data": {
"description": this.currentapp.description,
"short": this.currentapp.short,
"name": this.currentapp.name,
}
}); });
}, }
upload_app_icon(file) { }, {
return this.beforeAvatarUpload(file, 'app') "methods": "DELETE",
}, "app_id": this.currentapp.app_id
upload_app_screen(file) { });
return this.beforeAvatarUpload(file, 'screen')
}, })
beforeAvatarUpload(file, act) { .catch(err => {
return AvatarUploadUtils(this, file, { this.$message.error(err)
'app_id': this.currentapp.app_id, });
'upload_key': file.name, },
'ftype': act getappinfo() {
// eslint-disable-next-line no-unused-vars apputils(data => {
}, res => { if (data.code === 1000) {
this.getappinfo(); this.appinfos = data.data;
}); this.master_release = data.data.master_release;
} this.appinfos["icon_url"] = this.master_release.icon_url;
}, this.$store.dispatch('doucurrentapp', this.appinfos);
mounted() { } else if (data.code === 1003) {
this.$store.dispatch('doappInfoIndex', [[18, 18], [18, 18]]); this.$router.push({name: 'FirApps'});
if (!this.currentapp.app_id) { } else {
this.currentapp = this.$store.state.currentapp; // eslint-disable-next-line no-console
} console.log("Error");
this.uploadconf = {
"AuthHeaders": {"Authorization": this.$cookies.get("auth_token")}
};
},
watch: {
'$store.state.currentapp': function () {
this.currentapp = this.$store.state.currentapp;
}
}, computed: {
getuppicurl() {
return getapppicurl(this.currentapp.app_id)
}
} }
}, {
"methods": "GET",
"app_id": this.currentapp.app_id
});
},
saveappinfo() {
apputils(data => {
if (data.code === 1000) {
this.$message.success('数据更新成功');
} else {
this.$message.error('操作失败,' + data.msg);
}
}, {
"methods": "PUT",
"app_id": this.currentapp.app_id,
"data": {
"description": this.currentapp.description,
"short": this.currentapp.short,
"name": this.currentapp.name,
}
});
},
upload_app_icon(file) {
return this.beforeAvatarUpload(file, 'app')
},
upload_app_screen(file) {
return this.beforeAvatarUpload(file, 'screen')
},
beforeAvatarUpload(file, act) {
return AvatarUploadUtils(this, file, {
'app_id': this.currentapp.app_id,
'upload_key': file.name,
'ftype': act
// eslint-disable-next-line no-unused-vars
}, res => {
this.getappinfo();
});
}
},
mounted() {
this.$store.dispatch('doappInfoIndex', [[18, 18], [18, 18]]);
if (!this.currentapp.app_id) {
this.currentapp = this.$store.state.currentapp;
}
this.uploadconf = {
"AuthHeaders": {"Authorization": this.$cookies.get("auth_token")}
};
},
watch: {
'$store.state.currentapp': function () {
this.currentapp = this.$store.state.currentapp;
} }
}, computed: {
getuppicurl() {
return getapppicurl(this.currentapp.app_id)
}
}
}
</script> </script>
<style scoped> <style scoped>
.appdownload /deep/ .el-upload-dragger { .appdownload /deep/ .el-upload-dragger {
background: #f1f1f1; background: #f1f1f1;
width: 155px; width: 155px;
height: 288px; height: 288px;
} }
.appdownload /deep/ .el-icon-upload { .appdownload /deep/ .el-icon-upload {
margin-top: 80%; margin-top: 80%;
} }
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.screen-img { .screen-img {
width: 155px; width: 155px;
height: 288px; height: 288px;
margin-right: 20px; margin-right: 20px;
background-color: #f1f1f1; background-color: #f1f1f1;
float: left float: left
} }
.screen-img:hover { .screen-img:hover {
background-color: #c2dcf1; background-color: #c2dcf1;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
width: 178px; width: 178px;
height: 178px; height: 178px;
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
height: 100px; height: 100px;
width: 100px; width: 100px;
border-radius: 10px; border-radius: 10px;
display: block; display: block;
} }
</style> </style>

@ -1,370 +1,370 @@
<template> <template>
<div class="apps-app-combo page-tabcontent "> <div class="apps-app-combo page-tabcontent ">
<div class="middle-wrapper"> <div class="middle-wrapper">
<div class="request-wrapper" v-if="has_combo "> <div v-if="has_combo " class="request-wrapper">
<p class="lead text-center ng-scope">已经与 <b>{{ has_combo.name }}</b> 合并</p> <p class="lead text-center ng-scope">已经与 <b>{{ has_combo.name }}</b> 合并</p>
<table> <table>
<tr> <tr>
<td><span class="type">{{ currentapp.type|getapptype}}</span></td> <td><span class="type">{{ currentapp.type|getapptype }}</span></td>
<td/> <td/>
<td><span class="type">{{ has_combo.type|getapptype}}</span></td> <td><span class="type">{{ has_combo.type|getapptype }}</span></td>
</tr> </tr>
<tr> <tr>
<td> <td>
<div class="icon"><img v-if="cmaster_release" :src="cmaster_release.icon_url" <div class="icon"><img v-if="cmaster_release" :src="cmaster_release.icon_url"
class="ng-isolate-scope" alt=""> alt="" class="ng-isolate-scope">
</div> </div>
</td> </td>
<td><i class="icon-combo"/></td> <td><i class="icon-combo"/></td>
<td> <td>
<div class="icon"><img v-if="hmaster_release" :src="hmaster_release.icon_url" <div class="icon"><img v-if="hmaster_release" :src="hmaster_release.icon_url"
class="ng-isolate-scope" alt=""> alt="" class="ng-isolate-scope">
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="actions" colspan="3"> <td class="actions" colspan="3">
<el-button @click="each_confirm" round>解除合并</el-button> <el-button round @click="each_confirm">解除合并</el-button>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<div v-else> <div v-else>
<div class="icon-container text-center"> <div class="icon-container text-center">
<img v-if="cmaster_release" :src="cmaster_release.icon_url" height="128" width="128"> <img v-if="cmaster_release" :src="cmaster_release.icon_url" height="128" width="128">
</div> </div>
<div class="apps-list"> <div class="apps-list">
<div class="known-apps"> <div class="known-apps">
<p class="lead ng-binding"> <p class="lead ng-binding">
<b>选择已有的应用进行合并</b> <b>选择已有的应用进行合并</b>
</p> </p>
<div class="apps"> <div class="apps">
<el-link v-if="comboapplists.length ===0 " :underline="false" type="danger">暂无可以合并的应用 <el-link v-if="comboapplists.length ===0 " :underline="false" type="danger">暂无可以合并的应用
</el-link> </el-link>
<div :key="comboapp.app_id" @click="each_add(comboapp.app_id)" class="app ng-scope" <div v-for="comboapp in comboapplists" :key="comboapp.app_id" class="app ng-scope"
v-for="comboapp in comboapplists"> @click="each_add(comboapp.app_id)">
<div class="icon"> <div class="icon">
<img :src="comboapp.master_release|geticon_url" class="ng-isolate-scope" alt=""> <img :src="comboapp.master_release|geticon_url" alt="" class="ng-isolate-scope">
</div>
<p class="ng-binding">{{ comboapp.name }}</p></div>
</div>
</div>
<span class="hr-vertical"/>
<div class="find-apps">
<p class="lead ">
<b>输入需要合并的应用的短链接或者名字</b>
</p>
<div class="form-group">
<el-input
@click="searchapps"
clearable
placeholder="输入短链接或者名字"
prefix-icon="el-icon-search"
v-model="searchKey"
/>
</div>
</div>
</div> </div>
<p class="ng-binding">{{ comboapp.name }}</p></div>
</div> </div>
</div>
<span class="hr-vertical"/>
<div class="find-apps">
<p class="lead ">
<b>输入需要合并的应用的短链接或者名字</b>
</p>
<div class="form-group">
<el-input
v-model="searchKey"
clearable
placeholder="输入短链接或者名字"
prefix-icon="el-icon-search"
@click="searchapps"
/>
</div>
</div>
</div> </div>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import {apputils, getapps} from "@/restful"; import {apputils, getapps} from "@/restful";
export default { export default {
name: "FirAppInfoscombo" name: "FirAppInfoscombo"
, data() { , data() {
return { return {
searchKey: '', searchKey: '',
currentapp: {}, currentapp: {},
has_combo: {}, has_combo: {},
cmaster_release: {}, cmaster_release: {},
hmaster_release: {}, hmaster_release: {},
comboapplists: [], comboapplists: [],
orgapplists: [], orgapplists: [],
comboapp: {"master_release": ""} comboapp: {"master_release": ""}
} }
}, methods: { }, methods: {
searchapps() { searchapps() {
let keysearch = this.searchKey.replace(/^\s+|\s+$/g, ""); let keysearch = this.searchKey.replace(/^\s+|\s+$/g, "");
let newapplists = []; let newapplists = [];
for (let i = 0; i < this.orgapplists.length; i++) { for (let i = 0; i < this.orgapplists.length; i++) {
if (this.orgapplists[i].short.search(keysearch) === 0 || this.orgapplists[i].name.search(keysearch) === 0) { if (this.orgapplists[i].short.search(keysearch) === 0 || this.orgapplists[i].name.search(keysearch) === 0) {
newapplists.push(this.orgapplists[i]); newapplists.push(this.orgapplists[i]);
} }
} }
if (keysearch === "") { if (keysearch === "") {
this.comboapplists = this.orgapplists.slice(); this.comboapplists = this.orgapplists.slice();
} else { } else {
this.comboapplists = newapplists.slice(); this.comboapplists = newapplists.slice();
} }
}, },
each_add(hcombo_id) { each_add(hcombo_id) {
apputils(data => { apputils(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.$message.success('操作成功'); this.$message.success('操作成功');
this.comboapplists = []; this.comboapplists = [];
apputils(data => { apputils(data => {
let appinfos = data.data; let appinfos = data.data;
appinfos["icon_url"] = appinfos.master_release.icon_url; appinfos["icon_url"] = appinfos.master_release.icon_url;
this.$store.dispatch('doucurrentapp', appinfos); this.$store.dispatch('doucurrentapp', appinfos);
if (data.code === 1000) { if (data.code === 1000) {
this.$store.dispatch('doucurrentapp', data.data); this.$store.dispatch('doucurrentapp', data.data);
} else if (data.code === 1003) { } else if (data.code === 1003) {
this.$router.push({name: 'FirApps'}); this.$router.push({name: 'FirApps'});
} else { } else {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log("Error"); console.log("Error");
}
}, {
"methods": "GET",
"app_id": this.currentapp.app_id
});
this.setData();
}
}, {
"methods": "PUT",
"app_id": this.currentapp.app_id,
"data": {
"has_combo": {
"hcombo_id": hcombo_id,
"action": "COMBO",
}
}
});
},
each_confirm() {
apputils(data => {
if (data.code === 1000) {
this.$message.success('操作成功');
let currentapp = this.$store.state.currentapp;
this.has_combo = this.$store.state.currentapp.has_combo;
this.has_combo = null;
currentapp.has_combo = null;
this.hmaster_release = null;
this.$store.dispatch('doucurrentapp', currentapp);
this.getappiconFun();
}
}, {
"methods": "PUT",
"app_id": this.currentapp.app_id,
"data": {
"has_combo": {
"hcombo_id": this.has_combo.app_id,
"action": "UNCOMBO",
}
}
});
},
setData() {
this.currentapp = this.$store.state.currentapp;
this.cmaster_release = this.$store.state.currentapp.master_release;
if (this.$store.state.currentapp.has_combo) {
this.has_combo = this.$store.state.currentapp.has_combo;
this.hmaster_release = this.$store.state.currentapp.has_combo.master_release;
} else {
this.has_combo = null;
this.hmaster_release = null;
this.getappiconFun();
}
},
getappiconFun() {
let type = "android";
if (this.currentapp.type === 0) {
type = "ios"
}
getapps(data => {
if (data.code === 1000) {
this.comboapplists = data.data;
this.orgapplists = this.comboapplists.slice(); //
} else {
this.$router.push({name: 'FirLogin'});
}
}, {"type": type, "page": 1, "size": 999, "act": 'combo'});
} }
}, filters: { }, {
geticon_url(app) { "methods": "GET",
if (app) { "app_id": this.currentapp.app_id
return app.icon_url });
} this.setData();
return "" }
}, }, {
getapptype: function (type) { "methods": "PUT",
let ftype = ''; "app_id": this.currentapp.app_id,
if (type === 0) { "data": {
ftype = 'Android' "has_combo": {
} else { "hcombo_id": hcombo_id,
ftype = 'iOS' "action": "COMBO",
} }
return ftype }
}, });
}, },
mounted() { each_confirm() {
this.$store.dispatch('doappInfoIndex', [[44, 44], [44, 44]]); apputils(data => {
this.setData(); if (data.code === 1000) {
}, this.$message.success('操作成功');
watch: {
'$store.state.currentapp': function () { let currentapp = this.$store.state.currentapp;
this.setData(); this.has_combo = this.$store.state.currentapp.has_combo;
}, this.has_combo = null;
// eslint-disable-next-line no-unused-vars currentapp.has_combo = null;
searchKey: function (val, oldVal) { this.hmaster_release = null;
this.searchapps() this.$store.dispatch('doucurrentapp', currentapp);
}, this.getappiconFun();
} }
}, {
"methods": "PUT",
"app_id": this.currentapp.app_id,
"data": {
"has_combo": {
"hcombo_id": this.has_combo.app_id,
"action": "UNCOMBO",
}
}
});
},
setData() {
this.currentapp = this.$store.state.currentapp;
this.cmaster_release = this.$store.state.currentapp.master_release;
if (this.$store.state.currentapp.has_combo) {
this.has_combo = this.$store.state.currentapp.has_combo;
this.hmaster_release = this.$store.state.currentapp.has_combo.master_release;
} else {
this.has_combo = null;
this.hmaster_release = null;
this.getappiconFun();
}
},
getappiconFun() {
let type = "android";
if (this.currentapp.type === 0) {
type = "ios"
}
getapps(data => {
if (data.code === 1000) {
this.comboapplists = data.data;
this.orgapplists = this.comboapplists.slice(); //
} else {
this.$router.push({name: 'FirLogin'});
}
}, {"type": type, "page": 1, "size": 999, "act": 'combo'});
} }
}, filters: {
geticon_url(app) {
if (app) {
return app.icon_url
}
return ""
},
getapptype: function (type) {
let ftype = '';
if (type === 0) {
ftype = 'Android'
} else {
ftype = 'iOS'
}
return ftype
},
},
mounted() {
this.$store.dispatch('doappInfoIndex', [[44, 44], [44, 44]]);
this.setData();
},
watch: {
'$store.state.currentapp': function () {
this.setData();
},
// eslint-disable-next-line no-unused-vars
searchKey: function (val, oldVal) {
this.searchapps()
},
}
}
</script> </script>
<style scoped> <style scoped>
.text-center { .text-center {
text-align: center text-align: center
} }
.middle-wrapper { .middle-wrapper {
margin: 0 auto; margin: 0 auto;
width: 1100px width: 1100px
} }
.apps-app-combo { .apps-app-combo {
position: relative; position: relative;
padding-top: 45px padding-top: 45px
} }
.apps-app-combo .icon-container { .apps-app-combo .icon-container {
margin-bottom: 60px margin-bottom: 60px
} }
.apps-app-combo .icon-container img { .apps-app-combo .icon-container img {
border-radius: 17.544% border-radius: 17.544%
} }
.apps-app-combo .apps-list { .apps-app-combo .apps-list {
position: relative; position: relative;
overflow: hidden overflow: hidden
} }
.apps-app-combo .lead { .apps-app-combo .lead {
margin-bottom: 30px; margin-bottom: 30px;
font-size: 16px font-size: 16px
} }
.apps-app-combo .lead b { .apps-app-combo .lead b {
max-width: 300px; max-width: 300px;
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
vertical-align: top vertical-align: top
} }
.known-apps { .known-apps {
text-align: center; text-align: center;
float: left; float: left;
width: 45%; width: 45%;
margin: 10px 30px; margin: 10px 30px;
} }
.apps-app-combo .known-apps .icon img { .apps-app-combo .known-apps .icon img {
width: 80px; width: 80px;
height: 80px; height: 80px;
border-radius: 22.7% border-radius: 22.7%
} }
.apps-app-combo .known-apps .apps .app { .apps-app-combo .known-apps .apps .app {
display: inline-block; display: inline-block;
margin: 0 0 20px 28px; margin: 0 0 20px 28px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
vertical-align: top; vertical-align: top;
} }
.apps-app-combo .known-apps .apps .app > p { .apps-app-combo .known-apps .apps .app > p {
margin-top: 8px; margin-top: 8px;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
display: inline-block; display: inline-block;
max-width: 100px; max-width: 100px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
word-wrap: normal word-wrap: normal
} }
.apps-app-combo .find-apps { .apps-app-combo .find-apps {
/*padding-left: 50px;*/ /*padding-left: 50px;*/
text-align: center; text-align: center;
margin: 10px 30px; margin: 10px 30px;
float: right; float: right;
width: 40%; width: 40%;
} }
.apps-app-combo .find-apps .lead { .apps-app-combo .find-apps .lead {
text-align: left; text-align: left;
} }
.apps-app-combo .find-apps .form-group { .apps-app-combo .find-apps .form-group {
position: relative; position: relative;
margin-bottom: 36px; margin-bottom: 36px;
width: 260px; width: 260px;
} }
.apps-app-combo .hr-vertical { .apps-app-combo .hr-vertical {
position: absolute; position: absolute;
z-index: 12; z-index: 12;
width: 1px; width: 1px;
height: 100%; height: 100%;
background-color: #d5f9f9 background-color: #d5f9f9
} }
.apps-app-combo .request-wrapper .lead { .apps-app-combo .request-wrapper .lead {
margin-bottom: 80px; margin-bottom: 80px;
font-size: 18px font-size: 18px
} }
.apps-app-combo .request-wrapper table { .apps-app-combo .request-wrapper table {
margin: 0 auto; margin: 0 auto;
width: 400px width: 400px
} }
.apps-app-combo .request-wrapper table tr:first-child td span { .apps-app-combo .request-wrapper table tr:first-child td span {
display: inline-block; display: inline-block;
margin-bottom: 12px; margin-bottom: 12px;
font-size: 16px font-size: 16px
} }
.apps-app-combo .request-wrapper table td { .apps-app-combo .request-wrapper table td {
padding: 0 15px; padding: 0 15px;
text-align: center text-align: center
} }
.apps-app-combo .request-wrapper table td img { .apps-app-combo .request-wrapper table td img {
width: 120px; width: 120px;
height: 120px; height: 120px;
border-radius: 17.54% border-radius: 17.54%
} }
.apps-app-combo .request-wrapper table .actions { .apps-app-combo .request-wrapper table .actions {
padding-top: 40px padding-top: 40px
} }
.apps-app-combo .request-wrapper table i.icon-combo { .apps-app-combo .request-wrapper table i.icon-combo {
font-size: 30px font-size: 30px
} }
</style> </style>

@ -1,59 +1,59 @@
<template> <template>
<div style="margin-top: 20px;width: 90%;margin-left: 8%"> <div style="margin-top: 20px;width: 90%;margin-left: 8%">
<el-link type="primary" v-if="this.currentapp.issupersign" style="margin-bottom: 30px;font-size: x-large" <el-link v-if="this.currentapp.issupersign" style="margin-bottom: 30px;font-size: x-large" type="primary"
@click="$router.push({name:'FirSuperSignBase',params:{act:'useddevices'},query:{bundleid: currentapp.bundle_id}})"> @click="$router.push({name:'FirSuperSignBase',params:{act:'useddevices'},query:{bundleid: currentapp.bundle_id}})">
该应用已经开启超级签请点击查看最新设备列表 该应用已经开启超级签请点击查看最新设备列表
</el-link> </el-link>
<h2>UDID列表及用户信息 - {{ udidlists.length }}个设备</h2> <h2>UDID列表及用户信息 - {{ udidlists.length }}个设备</h2>
<el-table <el-table
:data="udidlists" :data="udidlists"
stripe stripe
style="width: 100%"> style="width: 100%">
<el-table-column width="180" <el-table-column label="设备型号"
prop="model" prop="model"
label="设备型号"> width="180">
</el-table-column> </el-table-column>
<el-table-column width="180" <el-table-column label="系统版本"
prop="version" prop="version"
label="系统版本"> width="180">
</el-table-column> </el-table-column>
<el-table-column width="380" <el-table-column label="UDID"
prop="udid" prop="udid"
label="UDID"> width="380">
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "FirAppInfosdevices", name: "FirAppInfosdevices",
data() { data() {
return { return {
currentapp: {}, currentapp: {},
udidlists: [] udidlists: []
}
},
methods: {},
mounted() {
this.$store.dispatch('doappInfoIndex', [[70, 70], [70, 70]]);
if (!this.currentapp.app_id) {
this.currentapp = this.$store.state.currentapp;
if (this.currentapp.master_release) {
this.udidlists = this.currentapp.master_release.udid;
}
}
},
watch: {
'$store.state.currentapp': function () {
this.currentapp = this.$store.state.currentapp;
this.udidlists = this.currentapp.master_release.udid;
}
}, computed: {}
} }
},
methods: {},
mounted() {
this.$store.dispatch('doappInfoIndex', [[70, 70], [70, 70]]);
if (!this.currentapp.app_id) {
this.currentapp = this.$store.state.currentapp;
if (this.currentapp.master_release) {
this.udidlists = this.currentapp.master_release.udid;
}
}
},
watch: {
'$store.state.currentapp': function () {
this.currentapp = this.$store.state.currentapp;
this.udidlists = this.currentapp.master_release.udid;
}
}, computed: {}
}
</script> </script>
<style scoped> <style scoped>

@ -1,349 +1,349 @@
<template> <template>
<div style="margin-top: 20px;width: 66%;margin-left: 8%"> <div style="margin-top: 20px;width: 66%;margin-left: 8%">
<el-dialog <el-dialog
title="绑定应用专属下载页域名" :close-on-click-modal="false"
:close-on-click-modal="false" :close-on-press-escape="false"
:close-on-press-escape="false" :visible.sync="bind_domain_sure"
:visible.sync="bind_domain_sure" title="绑定应用专属下载页域名"
width="666px"> width="666px">
<bind-domain v-if="bind_domain_sure" transitionName="bind-app-domain" :app_id="this.currentapp.app_id" <bind-domain v-if="bind_domain_sure" :app_id="this.currentapp.app_id" :domain_type="2"
:domain_type="2"/> transitionName="bind-app-domain"/>
</el-dialog> </el-dialog>
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item label-width="200px" label="访问密码"> <el-form-item label="访问密码" label-width="200px">
<el-tooltip placement="top"> <el-tooltip placement="top">
<div slot="content"> <div slot="content">
{{passwordtip.msg}}<br> {{ passwordtip.msg }}<br>
<div v-if="passwordtip.val === 'on'"> <div v-if="passwordtip.val === 'on'">
<el-link icon="el-icon-edit" :underline="false" @click="setaccesspassword">修改</el-link> <el-link :underline="false" icon="el-icon-edit" @click="setaccesspassword">修改</el-link>
</div> </div>
</div> </div>
<el-switch <el-switch
v-model="passwordtip.val" v-model="passwordtip.val"
@change="showpasswordevent" active-color="#13ce66"
active-color="#13ce66" active-value="on"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="on" inactive-value="off"
inactive-value="off"> @change="showpasswordevent">
</el-switch> </el-switch>
</el-tooltip> </el-tooltip>
<el-link :underline="false" style="margin-left: 20px">设置密码之后用户需要输入密码才可以下载该应用</el-link> <el-link :underline="false" style="margin-left: 20px">设置密码之后用户需要输入密码才可以下载该应用</el-link>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="下载页显示"> <el-form-item label="下载页显示" label-width="200px">
<el-tooltip :content="downtip.msg" placement="top"> <el-tooltip :content="downtip.msg" placement="top">
<el-switch <el-switch
@change="showdownloadevent" v-model="downtip.val"
v-model="downtip.val" active-color="#13ce66"
active-color="#13ce66" active-value="on"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="on" inactive-value="off"
inactive-value="off"> @change="showdownloadevent">
</el-switch> </el-switch>
</el-tooltip> </el-tooltip>
<el-link :underline="false" style="margin-left: 20px">默认开启关闭之后用户无法通过短连接访问下载该应用</el-link> <el-link :underline="false" style="margin-left: 20px">默认开启关闭之后用户无法通过短连接访问下载该应用</el-link>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="应用专属域名"> <el-form-item label="应用专属域名" label-width="200px">
<el-input :value="currentapp.domain_name" clearable <el-input :placeholder="defualt_dtitle" :value="currentapp.domain_name"
style="width: 60%;margin-right: 10px" prefix-icon="el-icon-download" clearable prefix-icon="el-icon-download"
:placeholder="defualt_dtitle"/> style="width: 60%;margin-right: 10px"/>
<el-button @click="bind_domain_sure=true">设置域名</el-button> <el-button @click="bind_domain_sure=true">设置域名</el-button>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="微信内访问简易模式"> <el-form-item label="微信内访问简易模式" label-width="200px">
<el-tooltip :content="wxeasytypetip.msg" placement="top"> <el-tooltip :content="wxeasytypetip.msg" placement="top">
<el-switch <el-switch
:disabled="wxeasy_disable" v-model="wxeasytypetip.val"
@change="wxeasytypeevent" :disabled="wxeasy_disable"
v-model="wxeasytypetip.val" active-color="#13ce66"
active-color="#13ce66" active-value="on"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="on" inactive-value="off"
inactive-value="off"> @change="wxeasytypeevent">
</el-switch> </el-switch>
</el-tooltip> </el-tooltip>
<el-link :underline="false" style="margin-left: 20px">默认开启可以最大限度避免微信内举报封停如果绑定域名可以关闭</el-link> <el-link :underline="false" style="margin-left: 20px">默认开启可以最大限度避免微信内举报封停如果绑定域名可以关闭</el-link>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="微信内访问跳转第三方平台"> <el-form-item label="微信内访问跳转第三方平台" label-width="200px">
<el-tooltip :content="wxredirecttip.msg" placement="top"> <el-tooltip :content="wxredirecttip.msg" placement="top">
<el-switch <el-switch
@change="wxredirectevent" v-model="wxredirecttip.val"
v-model="wxredirecttip.val" active-color="#13ce66"
active-color="#13ce66" active-value="on"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="on" inactive-value="off"
inactive-value="off"> @change="wxredirectevent">
</el-switch> </el-switch>
</el-tooltip> </el-tooltip>
<el-link :underline="false" style="margin-left: 20px">默认开启如果配置第三方平台在微信内访问直接跳转</el-link> <el-link :underline="false" style="margin-left: 20px">默认开启如果配置第三方平台在微信内访问直接跳转</el-link>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import {apputils,} from "@/restful" import {apputils,} from "@/restful"
import {deepCopy} from "@/utils"; import {deepCopy} from "@/utils";
import BindDomain from "@/components/base/BindDomain"; import BindDomain from "@/components/base/BindDomain";
export default { export default {
name: "FirAppInfossecurity", name: "FirAppInfossecurity",
components: {BindDomain}, components: {BindDomain},
data() { data() {
return { return {
currentapp: {}, currentapp: {},
orgcurrentapp: {}, orgcurrentapp: {},
downtip: {'msg': ''}, downtip: {'msg': ''},
passwordtip: {'msg': ''}, passwordtip: {'msg': ''},
wxeasytypetip: {'msg': ''}, wxeasytypetip: {'msg': ''},
wxredirecttip: {'msg': ''}, wxredirecttip: {'msg': ''},
passwordflag: false, passwordflag: false,
showdownloadflag: false, showdownloadflag: false,
wxeasytypeflag: false, wxeasytypeflag: false,
wxredirectflag: false, wxredirectflag: false,
wxeasy_disable: false, wxeasy_disable: false,
defualt_dtitle: '专属下载页域名', defualt_dtitle: '专属下载页域名',
bind_domain_sure: false, bind_domain_sure: false,
} }
}, },
methods: { methods: {
set_default_flag() { set_default_flag() {
this.passwordflag = false; this.passwordflag = false;
this.showdownloadflag = false; this.showdownloadflag = false;
this.wxeasytypeflag = false; this.wxeasytypeflag = false;
this.wxredirectflag = false; this.wxredirectflag = false;
}, },
save_app_domain() { save_app_domain() {
this.saveappinfo({ this.saveappinfo({
"domain_name": this.currentapp.domain_name, "domain_name": this.currentapp.domain_name,
}); });
}, },
saveappinfo(data) { saveappinfo(data) {
apputils(data => { apputils(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.$message.success('数据更新成功'); this.$message.success('数据更新成功');
} else { } else {
this.$message.error('操作失败,' + data.msg); this.$message.error('操作失败,' + data.msg);
this.$store.dispatch('doucurrentapp', this.orgcurrentapp); this.$store.dispatch('doucurrentapp', this.orgcurrentapp);
} }
}, { }, {
"methods": "PUT", "methods": "PUT",
"app_id": this.currentapp.app_id, "app_id": this.currentapp.app_id,
"data": data "data": data
}); });
}, },
setbuttondefaltpass(currentapp) { setbuttondefaltpass(currentapp) {
if (currentapp.password === '') { if (currentapp.password === '') {
this.passwordtip.val = 'off'; this.passwordtip.val = 'off';
this.showpasswordevent("off"); this.showpasswordevent("off");
} else { } else {
this.passwordtip.val = 'on'; this.passwordtip.val = 'on';
this.showpasswordevent("on"); this.showpasswordevent("on");
} }
this.passwordflag = true; this.passwordflag = true;
}, },
setbuttondefaltshow(currentapp) { setbuttondefaltshow(currentapp) {
if (currentapp.isshow === true) { if (currentapp.isshow === true) {
this.showdownloadevent("on"); this.showdownloadevent("on");
this.downtip.val = 'on'; this.downtip.val = 'on';
} else { } else {
this.showdownloadevent("off"); this.showdownloadevent("off");
this.downtip.val = 'off'; this.downtip.val = 'off';
} }
this.showdownloadflag = true; this.showdownloadflag = true;
}, },
setxeasytypeshow(currentapp) { setxeasytypeshow(currentapp) {
if (currentapp.wxeasytype === true) { if (currentapp.wxeasytype === true) {
this.wxeasytypeevent("on"); this.wxeasytypeevent("on");
this.wxeasytypetip.val = 'on'; this.wxeasytypetip.val = 'on';
} else { } else {
this.wxeasytypeevent("off"); this.wxeasytypeevent("off");
this.wxeasytypetip.val = 'off'; this.wxeasytypetip.val = 'off';
} }
this.wxeasytypeflag = true; this.wxeasytypeflag = true;
this.wxeasy_disable = !this.$store.state.userinfo.domain_name && !this.currentapp.domain_name; this.wxeasy_disable = !this.$store.state.userinfo.domain_name && !this.currentapp.domain_name;
}, },
setwxredirectshow(currentapp) { setwxredirectshow(currentapp) {
if (currentapp.wxredirect === true) { if (currentapp.wxredirect === true) {
this.wxredirectevent("on"); this.wxredirectevent("on");
this.wxredirecttip.val = 'on'; this.wxredirecttip.val = 'on';
} else { } else {
this.wxredirectevent("off"); this.wxredirectevent("off");
this.wxredirecttip.val = 'off'; this.wxredirecttip.val = 'off';
} }
this.wxredirectflag = true; this.wxredirectflag = true;
}, },
setbuttondefault(currentapp) { setbuttondefault(currentapp) {
this.setbuttondefaltpass(currentapp); this.setbuttondefaltpass(currentapp);
this.setbuttondefaltshow(currentapp); this.setbuttondefaltshow(currentapp);
this.setxeasytypeshow(currentapp); this.setxeasytypeshow(currentapp);
this.setwxredirectshow(currentapp); this.setwxredirectshow(currentapp);
}, },
passwordswitch(state) { passwordswitch(state) {
this.passwordflag = false; this.passwordflag = false;
this.showpasswordevent(state); this.showpasswordevent(state);
this.passwordtip.val = state; this.passwordtip.val = state;
this.passwordflag = true; this.passwordflag = true;
}, },
setaccesspassword() { setaccesspassword() {
this.$prompt('', '请设置访问密码', { this.$prompt('', '请设置访问密码', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
closeOnClickModal: false, closeOnClickModal: false,
inputValue: `${this.currentapp.password}`, inputValue: `${this.currentapp.password}`,
}).then(({value}) => { }).then(({value}) => {
value = value.replace(/\s+/g, ""); value = value.replace(/\s+/g, "");
if (this.currentapp.password === value) { if (this.currentapp.password === value) {
if (value === '') { if (value === '') {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '访问密码未变' message: '访问密码未变'
}); });
this.passwordflag = false; this.passwordflag = false;
this.setbuttondefaltpass(this.currentapp); this.setbuttondefaltpass(this.currentapp);
return return
} else { } else {
return return
} }
} }
this.saveappinfo({ this.saveappinfo({
"password": value, "password": value,
}); });
if (value === '') { if (value === '') {
this.passwordswitch("off"); this.passwordswitch("off");
this.$message({ this.$message({
type: 'success', type: 'success',
message: '设置成功,取消密码访问' message: '设置成功,取消密码访问'
}); });
} else { } else {
this.passwordtip.msg = '访问密码:' + value; this.passwordtip.msg = '访问密码:' + value;
this.$message({ this.$message({
type: 'success', type: 'success',
message: '设置成功,访问密码是: ' + value message: '设置成功,访问密码是: ' + value
}); });
} }
this.currentapp.password = value; this.currentapp.password = value;
this.$store.dispatch('doucurrentapp', this.currentapp) this.$store.dispatch('doucurrentapp', this.currentapp)
}).catch(() => { }).catch(() => {
if (this.currentapp.password === '') { if (this.currentapp.password === '') {
this.passwordswitch("off") this.passwordswitch("off")
} }
}); });
}, },
showdownloadevent(newval) { showdownloadevent(newval) {
if (newval === "on") { if (newval === "on") {
if (this.showdownloadflag) { if (this.showdownloadflag) {
this.saveappinfo({ this.saveappinfo({
"isshow": 1, "isshow": 1,
}); });
this.currentapp.isshow = 1; this.currentapp.isshow = 1;
} }
this.downtip.msg = '下载页对所有人可见'; this.downtip.msg = '下载页对所有人可见';
} else { } else {
if (this.showdownloadflag) { if (this.showdownloadflag) {
this.saveappinfo({ this.saveappinfo({
"isshow": 0, "isshow": 0,
}); });
this.currentapp.isshow = 0; this.currentapp.isshow = 0;
} }
this.downtip.msg = '下载页不可见' this.downtip.msg = '下载页不可见'
} }
}, },
showpasswordevent(newval) { showpasswordevent(newval) {
if (newval === "on") { if (newval === "on") {
if (this.passwordflag) { if (this.passwordflag) {
this.setaccesspassword() this.setaccesspassword()
} else { } else {
this.passwordtip.msg = '访问密码:' + this.currentapp.password; this.passwordtip.msg = '访问密码:' + this.currentapp.password;
} }
} else { } else {
if (this.passwordflag) { if (this.passwordflag) {
this.saveappinfo({ this.saveappinfo({
"password": '', "password": '',
}); });
} }
this.currentapp.password = ''; this.currentapp.password = '';
this.$store.dispatch('doucurrentapp', this.currentapp); this.$store.dispatch('doucurrentapp', this.currentapp);
this.passwordtip.msg = '无访问密码' this.passwordtip.msg = '无访问密码'
} }
}, },
wxeasytypeevent(newval) { wxeasytypeevent(newval) {
if (newval === "on") { if (newval === "on") {
if (this.wxeasytypeflag) { if (this.wxeasytypeflag) {
this.saveappinfo({ this.saveappinfo({
"wxeasytype": 1, "wxeasytype": 1,
}); });
this.currentapp.wxeasytype = 1; this.currentapp.wxeasytype = 1;
} }
this.wxeasytypetip.msg = '已经开启微信内访问简易模式'; this.wxeasytypetip.msg = '已经开启微信内访问简易模式';
} else { } else {
if (this.wxeasytypeflag) { if (this.wxeasytypeflag) {
this.saveappinfo({ this.saveappinfo({
"wxeasytype": 0, "wxeasytype": 0,
}); });
this.currentapp.wxeasytype = 0; this.currentapp.wxeasytype = 0;
} }
this.wxeasytypetip.msg = '关闭' this.wxeasytypetip.msg = '关闭'
} }
}, },
wxredirectevent(newval) { wxredirectevent(newval) {
if (newval === "on") { if (newval === "on") {
if (this.wxredirectflag) { if (this.wxredirectflag) {
this.saveappinfo({ this.saveappinfo({
"wxredirect": 1, "wxredirect": 1,
}); });
this.currentapp.wxredirect = 1; this.currentapp.wxredirect = 1;
} }
this.wxredirecttip.msg = '已经开启微信内自动跳转第三方平台'; this.wxredirecttip.msg = '已经开启微信内自动跳转第三方平台';
} else { } else {
if (this.wxredirectflag) { if (this.wxredirectflag) {
this.saveappinfo({ this.saveappinfo({
"wxredirect": 0, "wxredirect": 0,
}); });
this.currentapp.wxredirect = 0; this.currentapp.wxredirect = 0;
} }
this.wxredirecttip.msg = '关闭' this.wxredirecttip.msg = '关闭'
} }
}, },
appinit() { appinit() {
this.currentapp = this.$store.state.currentapp; this.currentapp = this.$store.state.currentapp;
this.set_default_flag(); this.set_default_flag();
this.orgcurrentapp = deepCopy(this.currentapp); this.orgcurrentapp = deepCopy(this.currentapp);
if (!this.currentapp.domain_name || this.currentapp.domain_name.length < 3) { if (!this.currentapp.domain_name || this.currentapp.domain_name.length < 3) {
if (this.$store.state.userinfo.domain_name && this.$store.state.userinfo.domain_name.length > 3) { if (this.$store.state.userinfo.domain_name && this.$store.state.userinfo.domain_name.length > 3) {
this.defualt_dtitle = this.$store.state.userinfo.domain_name; this.defualt_dtitle = this.$store.state.userinfo.domain_name;
} }
} }
this.setbuttondefault(this.currentapp); this.setbuttondefault(this.currentapp);
} }
}, },
mounted() { mounted() {
this.$store.dispatch('doappInfoIndex', [[31, 31], [31, 31]]); this.$store.dispatch('doappInfoIndex', [[31, 31], [31, 31]]);
if (!this.currentapp.app_id) { if (!this.currentapp.app_id) {
this.appinit(); this.appinit();
}
},
watch: {
'$store.state.currentapp': function () {
this.appinit();
},
}, computed: {}
} }
},
watch: {
'$store.state.currentapp': function () {
this.appinit();
},
}, computed: {}
}
</script> </script>
<style scoped> <style scoped>

@ -1,221 +1,221 @@
<template> <template>
<div style="margin-top: 20px;width: 66%;margin-left: 8%"> <div style="margin-top: 20px;width: 66%;margin-left: 8%">
<el-form label-width="80px" v-if="currentapp.type === 1 && $store.state.userinfo.supersign_active"> <el-form v-if="currentapp.type === 1 && $store.state.userinfo.supersign_active" label-width="80px">
<el-form-item label-width="200px" <el-form-item label="超级签名"
label="超级签名"> label-width="200px">
<el-tooltip :content="supersign.msg" placement="top"> <el-tooltip :content="supersign.msg" placement="top">
<el-switch <el-switch
@change="supersignevent" v-model="supersign.val"
v-model="supersign.val" active-color="#13ce66"
active-color="#13ce66" active-value="on"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="on" inactive-value="off"
inactive-value="off"> @change="supersignevent">
</el-switch> </el-switch>
</el-tooltip> </el-tooltip>
<el-button @click="clean_app" v-if="!currentapp.issupersign && currentapp.count !== 0" <el-button v-if="!currentapp.issupersign && currentapp.count !== 0" plain
style="margin-left: 20px" size="small" type="info" plain>清理该应用脏数据 size="small" style="margin-left: 20px" type="info" @click="clean_app">清理该应用脏数据
</el-button> </el-button>
<el-link v-else :underline="false" style="margin-left: 20px">超级签名iOS专用需要配置好苹果开发者账户方可开启</el-link> <el-link v-else :underline="false" style="margin-left: 20px">超级签名iOS专用需要配置好苹果开发者账户方可开启</el-link>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="签名限额"> <el-form-item label="签名限额" label-width="200px">
<el-tooltip content="本应用签名使用额度,超过该额度,新设备将无法安装本应用。0代表不限额" placement="top"> <el-tooltip content="本应用签名使用额度,超过该额度,新设备将无法安装本应用。0代表不限额" placement="top">
<el-input-number v-model="currentapp.supersign_limit_number" :disabled="supersign_disable" :min="0" <el-input-number v-model="currentapp.supersign_limit_number" :disabled="supersign_disable" :min="0"
style="width: 40%;margin-right: 10px" label="签名限额"/> label="签名限额" style="width: 40%;margin-right: 10px"/>
</el-tooltip> </el-tooltip>
<el-button @click="saveappinfo({supersign_limit_number:currentapp.supersign_limit_number})" <el-button :disabled="supersign_disable"
:disabled="supersign_disable" @click="saveappinfo({supersign_limit_number:currentapp.supersign_limit_number})"
>保存 >保存
</el-button> </el-button>
<el-tooltip content="点击查看使用详情" placement="top"> <el-tooltip content="点击查看使用详情" placement="top">
<el-link :underline="false" type="primary" style="margin-left: 20px" <el-link :underline="false" style="margin-left: 20px" type="primary"
@click="$router.push({name:'FirSuperSignBase',params:{act:'useddevices'},query:{bundleid: currentapp.bundle_id}})"> @click="$router.push({name:'FirSuperSignBase',params:{act:'useddevices'},query:{bundleid: currentapp.bundle_id}})">
已经使用 <a style="color: #dd6161;font-size: larger">{{ currentapp.supersign_used_number }}</a> 已经使用 <a style="color: #dd6161;font-size: larger">{{ currentapp.supersign_used_number }}</a>
个设备额度 个设备额度
</el-link> </el-link>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="签名类型"> <el-form-item label="签名类型" label-width="200px">
<el-select v-model="currentapp.supersign_type" placeholder="特殊签名权限" <el-select v-model="currentapp.supersign_type" :disabled="supersign_disable"
style="width: 60%;margin-right: 10px" :disabled="supersign_disable"> placeholder="特殊签名权限" style="width: 60%;margin-right: 10px">
<el-option v-for="st in sign_type_list" :key="st.id" :label="st.name" <el-option v-for="st in sign_type_list" :key="st.id" :label="st.name"
:value="st.id"/> :value="st.id"/>
</el-select> </el-select>
<el-button @click="saveappinfo({supersign_type:currentapp.supersign_type})" <el-button :disabled="supersign_disable"
:disabled="supersign_disable" @click="saveappinfo({supersign_type:currentapp.supersign_type})"
>保存 >保存
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="自定义BundleID"> <el-form-item label="自定义BundleID" label-width="200px">
<el-tooltip content="新的BundleID可能会导致推送等服务失效,请了解之后进行修改" placement="top"> <el-tooltip content="新的BundleID可能会导致推送等服务失效,请了解之后进行修改" placement="top">
<el-input v-model="currentapp.new_bundle_id" clearable :disabled="supersign_disable" <el-input v-model="currentapp.new_bundle_id" :disabled="supersign_disable" :placeholder="defualt_dtitle"
style="width: 60%;margin-right: 10px" prefix-icon="el-icon-s-data" clearable prefix-icon="el-icon-s-data"
:placeholder="defualt_dtitle"/> style="width: 60%;margin-right: 10px"/>
</el-tooltip> </el-tooltip>
<el-button @click="saveappinfo({new_bundle_id:currentapp.new_bundle_id})" :disabled="supersign_disable" <el-button :disabled="supersign_disable" @click="saveappinfo({new_bundle_id:currentapp.new_bundle_id})"
>保存 >保存
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item label-width="200px" label="自定义应用名称"> <el-form-item label="自定义应用名称" label-width="200px">
<el-input v-model="currentapp.new_bundle_name" clearable :disabled="supersign_disable" <el-input v-model="currentapp.new_bundle_name" :disabled="supersign_disable" :placeholder="defualt_dtitle_name"
style="width: 60%;margin-right: 10px" prefix-icon="el-icon-s-data" clearable prefix-icon="el-icon-s-data"
:placeholder="defualt_dtitle_name"/> style="width: 60%;margin-right: 10px"/>
<el-button @click="saveappinfo({new_bundle_name:currentapp.new_bundle_name})" <el-button :disabled="supersign_disable"
:disabled="supersign_disable" @click="saveappinfo({new_bundle_name:currentapp.new_bundle_name})"
>保存 >保存
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-link v-else :underline="false" type="warning"> 该用户暂未开通超级签权限,请联系管理员申请开通</el-link> <el-link v-else :underline="false" type="warning"> 该用户暂未开通超级签权限,请联系管理员申请开通</el-link>
</div> </div>
</template> </template>
<script> <script>
import {apputils,} from "@/restful" import {apputils,} from "@/restful"
import {deepCopy} from "@/utils"; import {deepCopy} from "@/utils";
export default { export default {
name: "FirAppInfossupersign", name: "FirAppInfossupersign",
data() { data() {
return { return {
currentapp: {}, currentapp: {},
orgcurrentapp: {}, orgcurrentapp: {},
supersign: {'msg': ''}, supersign: {'msg': ''},
showsupersignflag: false, showsupersignflag: false,
supersign_disable: true, supersign_disable: true,
sign_type_list: [], sign_type_list: [],
sign_type: 0, sign_type: 0,
defualt_dtitle: '', defualt_dtitle: '',
defualt_dtitle_name: '' defualt_dtitle_name: ''
}
},
methods: {
set_default_flag() {
this.showsupersignflag = false;
},
clean_app() {
this.saveappinfo({"clean": true});
this.currentapp.count = 0;
},
saveappinfo(data) {
const loading = this.$loading({
lock: true,
text: '执行中,请耐心等待...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
apputils(data => {
if (data.code === 1000) {
this.$message.success('数据更新成功');
} else {
this.$message.error('操作失败,' + data.msg);
this.$store.dispatch('doucurrentapp', this.orgcurrentapp);
}
loading.close();
}, {
"methods": "PUT",
"app_id": this.currentapp.app_id,
"data": data
});
},
setbuttonsignshow(currentapp) {
if (currentapp.issupersign === true) {
this.supersignevent("on");
this.supersign.val = 'on';
} else {
this.supersignevent("off");
this.supersign.val = 'off';
}
this.showsupersignflag = true;
},
setbuttondefault(currentapp) {
this.setbuttonsignshow(currentapp);
},
supersignevent(newval) {
if (newval === "on") {
if (this.showsupersignflag) {
this.saveappinfo({
"issupersign": 1,
});
this.currentapp.issupersign = 1;
}
this.supersign.msg = '已经开启超级签名';
this.supersign_disable = false
} else {
if (this.showsupersignflag) {
this.saveappinfo({
"issupersign": 0,
});
this.currentapp.issupersign = 0;
}
this.supersign.msg = '关闭';
this.supersign_disable = true
}
},
set_default_ms(currentapp) {
this.sign_type_list = currentapp.sign_type_choice;
if (this.currentapp.new_bundle_id && currentapp.new_bundle_id.length > 5) {
this.defualt_dtitle = currentapp.new_bundle_id
} else {
this.defualt_dtitle = currentapp.bundle_id
}
if (this.currentapp.new_bundle_name && currentapp.new_bundle_name.length > 0) {
this.defualt_dtitle_name = currentapp.new_bundle_name
} else {
this.defualt_dtitle_name = currentapp.name
}
},
appinit() {
this.currentapp = this.$store.state.currentapp;
this.set_default_flag();
this.orgcurrentapp = deepCopy(this.currentapp);
this.set_default_ms(this.currentapp);
this.setbuttondefault(this.currentapp);
}
},
mounted() {
this.$store.dispatch('doappInfoIndex', [[57, 57], [57, 57]]);
if (!this.currentapp.app_id) {
this.appinit();
}
},
watch: {
'$store.state.currentapp': function () {
this.appinit();
},
'currentapp.new_bundle_id': function () {
if (!this.currentapp.new_bundle_id || this.currentapp.new_bundle_id.length === 0) {
this.defualt_dtitle = this.currentapp.bundle_id
}
},
'currentapp.new_bundle_name': function () {
if (!this.currentapp.new_bundle_name || this.currentapp.new_bundle_name.length === 0) {
this.defualt_dtitle_name = this.currentapp.name
}
}
}, computed: {}
} }
},
methods: {
set_default_flag() {
this.showsupersignflag = false;
},
clean_app() {
this.saveappinfo({"clean": true});
this.currentapp.count = 0;
},
saveappinfo(data) {
const loading = this.$loading({
lock: true,
text: '执行中,请耐心等待...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
apputils(data => {
if (data.code === 1000) {
this.$message.success('数据更新成功');
} else {
this.$message.error('操作失败,' + data.msg);
this.$store.dispatch('doucurrentapp', this.orgcurrentapp);
}
loading.close();
}, {
"methods": "PUT",
"app_id": this.currentapp.app_id,
"data": data
});
},
setbuttonsignshow(currentapp) {
if (currentapp.issupersign === true) {
this.supersignevent("on");
this.supersign.val = 'on';
} else {
this.supersignevent("off");
this.supersign.val = 'off';
}
this.showsupersignflag = true;
},
setbuttondefault(currentapp) {
this.setbuttonsignshow(currentapp);
},
supersignevent(newval) {
if (newval === "on") {
if (this.showsupersignflag) {
this.saveappinfo({
"issupersign": 1,
});
this.currentapp.issupersign = 1;
}
this.supersign.msg = '已经开启超级签名';
this.supersign_disable = false
} else {
if (this.showsupersignflag) {
this.saveappinfo({
"issupersign": 0,
});
this.currentapp.issupersign = 0;
}
this.supersign.msg = '关闭';
this.supersign_disable = true
}
},
set_default_ms(currentapp) {
this.sign_type_list = currentapp.sign_type_choice;
if (this.currentapp.new_bundle_id && currentapp.new_bundle_id.length > 5) {
this.defualt_dtitle = currentapp.new_bundle_id
} else {
this.defualt_dtitle = currentapp.bundle_id
}
if (this.currentapp.new_bundle_name && currentapp.new_bundle_name.length > 0) {
this.defualt_dtitle_name = currentapp.new_bundle_name
} else {
this.defualt_dtitle_name = currentapp.name
}
},
appinit() {
this.currentapp = this.$store.state.currentapp;
this.set_default_flag();
this.orgcurrentapp = deepCopy(this.currentapp);
this.set_default_ms(this.currentapp);
this.setbuttondefault(this.currentapp);
}
},
mounted() {
this.$store.dispatch('doappInfoIndex', [[57, 57], [57, 57]]);
if (!this.currentapp.app_id) {
this.appinit();
}
},
watch: {
'$store.state.currentapp': function () {
this.appinit();
},
'currentapp.new_bundle_id': function () {
if (!this.currentapp.new_bundle_id || this.currentapp.new_bundle_id.length === 0) {
this.defualt_dtitle = this.currentapp.bundle_id
}
},
'currentapp.new_bundle_name': function () {
if (!this.currentapp.new_bundle_name || this.currentapp.new_bundle_name.length === 0) {
this.defualt_dtitle_name = this.currentapp.name
}
}
}, computed: {}
}
</script> </script>
<style scoped> <style scoped>

@ -1,486 +1,487 @@
<template> <template>
<el-timeline> <el-timeline>
<el-timeline-item v-for="(app) in release_apps" :key="app.release_id" <el-timeline-item v-for="(app) in release_apps" :key="app.release_id"
:timestamp="app.created_time|formatdatatimeline" :color="app.master_color"
:color="app.master_color" :timestamp="app.created_time|formatdatatimeline"
placement="top"> placement="top">
<el-card> <el-card>
<div class="directive-view-release"> <div class="directive-view-release">
<i class="el-icon-cloudy" v-if="! app.is_master"/> <i v-if="! app.is_master" class="el-icon-cloudy"/>
<i class="el-icon-cloudy" style="background-color: rgb(139,195,248)" v-else/> <i v-else class="el-icon-cloudy" style="background-color: rgb(139,195,248)"/>
<b class="ng-binding">{{app.app_version}} (Build {{app.build_version}})</b> <b class="ng-binding">{{ app.app_version }} (Build {{ app.build_version }})</b>
<div class="release-metainfo ng-hide" <div v-if="app.release_type === 0"
v-if="app.release_type === 0"> class="release-metainfo ng-hide">
<small> <small>
<i class="icon-calendar"/> <i class="icon-calendar"/>
<span class="el-icon-date">&nbsp;{{app.created_time|formattimeline}}</span> <span class="el-icon-date">&nbsp;{{ app.created_time|formattimeline }}</span>
</small> </small>
</div> </div>
<div class="release-metainfo" v-else> <div v-else class="release-metainfo">
<small> <small>
<i class="icon-calendar"/> <i class="icon-calendar"/>
<span class="el-icon-date">&nbsp;{{app.created_time|formattimeline}}</span> <span class="el-icon-date">&nbsp;{{ app.created_time|formattimeline }}</span>
</small> &nbsp;&nbsp;·&nbsp;&nbsp; </small> &nbsp;&nbsp;·&nbsp;&nbsp;
<small>{{app.release_type|getiOStype}}</small> <small>{{ app.release_type|getiOStype }}</small>
<small v-if="app.distribution_name" style="margin-left: 5px">&nbsp;&nbsp;·&nbsp;{{app.distribution_name}}</small> <small v-if="app.distribution_name"
</div> style="margin-left: 5px">&nbsp;&nbsp;·&nbsp;{{ app.distribution_name }}</small>
</div>
<p>{{app.changelog}}</p>
<label> <p>{{ app.changelog }}</p>
<label>
<textarea v-if="app.editing.changelog" <textarea v-if="app.editing.changelog"
v-model="app.changelog" v-model="app.changelog"
placeholder="更新日志"> placeholder="更新日志">
</textarea> </textarea>
</label> </label>
<div class="release-actions editing " v-if="app.editing.changelog"> <div v-if="app.editing.changelog" class="release-actions editing ">
<button class="btn-cancel" @click="endEdit(app,'changelog')"><span <button class="btn-cancel" @click="endEdit(app,'changelog')"><span
>取消</span></button> >取消</span></button>
<button class="btn-save" @click="updateChangelog(app,'changelog')"><span <button class="btn-save" @click="updateChangelog(app,'changelog')"><span
>保存</span></button> >保存</span></button>
</div> </div>
<el-input v-if="app.editing.binary_url" <el-input v-if="app.editing.binary_url"
v-model="app.binary_url" v-model="app.binary_url"
placeholder="下载地址,默认本服务器,填写第三方可以 自动跳转到第三方平台" clearable> clearable placeholder="下载地址,默认本服务器,填写第三方可以 自动跳转到第三方平台">
</el-input> </el-input>
<div class="release-actions editing " v-if="app.editing.binary_url" style="margin-top: 10px"> <div v-if="app.editing.binary_url" class="release-actions editing " style="margin-top: 10px">
<button class="btn-cancel" @click="endEdit(app,'binary_url')"><span <button class="btn-cancel" @click="endEdit(app,'binary_url')"><span
>取消</span></button> >取消</span></button>
<button class="btn-save" @click="updateChangelog(app,'binary_url')"><span <button class="btn-save" @click="updateChangelog(app,'binary_url')"><span
>保存</span></button> >保存</span></button>
</div> </div>
<div class="release-actions" v-show="!app.editing.changelog && !app.editing.binary_url "> <div v-show="!app.editing.changelog && !app.editing.binary_url " class="release-actions">
<el-tooltip class="tooltip-top" content="编辑更新日志" placement="top"> <el-tooltip class="tooltip-top" content="编辑更新日志" placement="top">
<el-button @click="startEdit(app,'changelog')" <el-button class="tooltip-top "
tooltip="编辑更新日志" tooltip="编辑更新日志"
class="tooltip-top "> @click="startEdit(app,'changelog')">
<i class="el-icon-edit"/> <i class="el-icon-edit"/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="tooltip-top" content="下载原文件" placement="top"> <el-tooltip class="tooltip-top" content="下载原文件" placement="top">
<el-button class="tooltip-top" tooltip="下载原文件" <el-button class="tooltip-top" tooltip="下载原文件"
@click="downloadPackage(app)"> @click="downloadPackage(app)">
<i class="el-icon-download"/> <i class="el-icon-download"/>
<span>{{app.binary_size}}</span> <span>{{ app.binary_size }}</span>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="tooltip-top" :content="app.binary_url|downcontent" placement="top"> <el-tooltip :content="app.binary_url|downcontent" class="tooltip-top" placement="top">
<el-button class="tooltip-top" tooltip="修改下载地址" <el-button class="tooltip-top" tooltip="修改下载地址"
@click="startEdit(app,'binary_url')"><i class="el-icon-link"/> <span>下载地址</span> @click="startEdit(app,'binary_url')"><i class="el-icon-link"/> <span>下载地址</span>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-button class="tooltip-top" @click="previewRelase(app)"><i class="el-icon-view"/> <span <el-button class="tooltip-top" @click="previewRelase(app)"><i class="el-icon-view"/> <span
class="ng-binding">预览</span> class="ng-binding">预览</span>
</el-button> </el-button>
<el-button v-if="! app.is_master" class="tooltip-top" @click="make_master_release(app)"> <el-button v-if="! app.is_master" class="tooltip-top" @click="make_master_release(app)">
<i class="el-icon-view"/> <i class="el-icon-view"/>
<span class="ng-binding ng-scope">标记上线</span> <span class="ng-binding ng-scope">标记上线</span>
</el-button> </el-button>
<el-button v-if="(! app.is_master )|| (app.is_master && release_apps.length === 1)" <el-button v-if="(! app.is_master )|| (app.is_master && release_apps.length === 1)"
class="tooltip-top" @click="del_release_app(app)"> class="tooltip-top" @click="del_release_app(app)">
<i class="el-icon-delete"/> <i class="el-icon-delete"/>
<span class="ng-binding ng-scope">删除</span> <span class="ng-binding ng-scope">删除</span>
</el-button> </el-button>
</div> </div>
</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>
<script> <script>
import {getdownloadurl, releaseapputils} from "@/restful" import {getdownloadurl, releaseapputils} from "@/restful"
export default { export default {
name: "FirAppInfostimeline", name: "FirAppInfostimeline",
data() { data() {
return { return {
release_apps: [], release_apps: [],
currentapp: {}, currentapp: {},
activity: { activity: {
editing: {'changelog': false, 'binary_url': false} editing: {'changelog': false, 'binary_url': false}
}, },
updatas: {}, updatas: {},
query: {'page': 1, size: 10}, query: {'page': 1, size: 10},
has_next: false, has_next: false,
} }
},
methods: {
set_query_page() {
if (this.has_next) {
this.query.page += 1;
}
},
downloadPackage(app) {
getdownloadurl(res => {
if (res.code === 1000) {
window.location.href = res.data.download_url;
} else {
this.$message.error(res.msg);
}
}, {
'data': {
'token': app.download_token,
'short': this.currentapp.short,
'release_id': app.release_id,
"password": this.currentapp.password,
"isdownload": true,
}, },
methods: { 'app_id': this.currentapp.app_id
set_query_page() { })
if (this.has_next) { },
this.query.page += 1; previewRelase(app) {
} let routeData = this.$router.resolve({
}, name: 'FirDownload',
downloadPackage(app) { params: {short: this.currentapp.short},
getdownloadurl(res => { query: {release_id: app.release_id}
if (res.code === 1000) { });
window.location.href = res.data.download_url; let p_url = routeData.href;
} else { if (this.currentapp.preview_url && this.currentapp.preview_url.length > 6) {
this.$message.error(res.msg); p_url = this.currentapp.preview_url + p_url
} }
}, { window.open(p_url, 'target', '');
'data': {
'token': app.download_token, },
'short': this.currentapp.short, getapptimelineFun(act = '') {
'release_id': app.release_id, const loading = this.$loading({
"password": this.currentapp.password, lock: true,
"isdownload": true, text: '加载中',
}, spinner: 'el-icon-loading',
'app_id': this.currentapp.app_id // background: 'rgba(0, 0, 0, 0.7)'
}) });
}, if (act === 'more') {
previewRelase(app) { this.set_query_page();
let routeData = this.$router.resolve({ } else {
name: 'FirDownload', this.release_apps = [];
params: {short: this.currentapp.short}, this.query = {'page': 1, size: 10};
query: {release_id: app.release_id} }
}); releaseapputils(data => {
let p_url = routeData.href; if (data.code === 1000) {
if (this.currentapp.preview_url && this.currentapp.preview_url.length > 6) { this.currentapp = data.data.currentapp;
p_url = this.currentapp.preview_url + p_url this.has_next = data.data.has_next;
} this.release_apps = this.release_apps.concat(data.data.release_apps);
window.open(p_url, 'target', ''); } else if (data.code === 1003) {
loading.close();
}, this.$router.push({name: 'FirApps'});
getapptimelineFun(act = '') { }
const loading = this.$loading({ loading.close();
lock: true, }, {
text: '加载中', "methods": "GET",
spinner: 'el-icon-loading', "app_id": this.$route.params.id,
// background: 'rgba(0, 0, 0, 0.7)' "release_id": "timeline",
}); "data": {
if (act === 'more') { "page": this.query.page,
this.set_query_page(); "size": this.query.size
} else { }
this.release_apps = []; })
this.query = {'page': 1, size: 10}; },
} del_release_app(app) {
releaseapputils(data => { //APP
if (data.code === 1000) { this.$confirm('确认删除 ' + this.currentapp.name + '下 当前 release 版本吗?')
this.currentapp = data.data.currentapp; // eslint-disable-next-line no-unused-vars
this.has_next = data.data.has_next; .then(res => {
this.release_apps = this.release_apps.concat(data.data.release_apps); let loadingobj = this.$loading({
} else if (data.code === 1003) { lock: true,
loading.close(); text: '操作中,请耐心等待',
this.$router.push({name: 'FirApps'}); spinner: 'el-icon-loading',
} // background: 'rgba(0, 0, 0, 0.7)'
loading.close(); });
}, { releaseapputils(data => {
"methods": "GET", loadingobj.close();
"app_id": this.$route.params.id, if (data.code === 1000) {
"release_id": "timeline", this.$message({
"data": { message: '删除成功',
"page": this.query.page, type: 'success'
"size": this.query.size
}
})
},
del_release_app(app) {
//APP
this.$confirm('确认删除 ' + this.currentapp.name + '下 当前 release 版本吗?')
// eslint-disable-next-line no-unused-vars
.then(res => {
let loadingobj = this.$loading({
lock: true,
text: '操作中,请耐心等待',
spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)'
});
releaseapputils(data => {
loadingobj.close();
if (data.code === 1000) {
this.$message({
message: '删除成功',
type: 'success'
});
this.getapptimelineFun();
} else {
this.$message({
message: '删除失败,请联系管理员',
type: 'error'
});
}
}, {
"methods": "DELETE",
"app_id": this.currentapp.app_id,
"release_id": app.release_id,
});
});
},
updatereleaseappFun(params) {
releaseapputils(data => {
if (data.code === 1000) {
this.$message({
message: '更新成功',
type: 'success'
});
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: '更新失败,请联系管理员',
type: 'error'
});
}
}, params
);
},
make_master_release(app) {
this.updatereleaseappFun({
"methods": "PUT",
"app_id": this.currentapp.app_id,
"release_id": app.release_id,
"data": {
"make_master": app.release_id
}
}); });
this.getapptimelineFun();
}, } else {
endEdit(app, type) { this.$message({
if (type === 'changelog') { message: '删除失败,请联系管理员',
app.editing.changelog = false; type: 'error'
} else if (type === 'binary_url') {
app.editing.binary_url = false;
}
},
updateChangelog(app, type) {
if (type === 'changelog') {
this.activity.editing.changelog = false;
this.updatas = {"changelog": app.changelog}
} else if (type === 'binary_url') {
this.activity.editing.binary_url = false;
this.updatas = {"binary_url": app.binary_url}
}
this.updatereleaseappFun({
"methods": "PUT",
"app_id": this.currentapp.app_id,
"release_id": app.release_id,
"data": this.updatas
}); });
this.updatas = {} }
}, }, {
startEdit(app, type) { "methods": "DELETE",
if (type === 'changelog') { "app_id": this.currentapp.app_id,
"release_id": app.release_id,
app.editing.changelog = true; });
} else if (type === 'binary_url') { });
app.editing.binary_url = true;
} },
updatereleaseappFun(params) {
releaseapputils(data => {
if (data.code === 1000) {
this.$message({
message: '更新成功',
type: 'success'
});
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: '更新失败,请联系管理员',
type: 'error'
});
} }
}, params
}, created() { );
},
}, watch: {}, make_master_release(app) {
computed: {}, mounted() { this.updatereleaseappFun({
this.$store.dispatch('doappInfoIndex', [[5, 5], [5, 5]]); "methods": "PUT",
this.getapptimelineFun(); "app_id": this.currentapp.app_id,
}, filters: { "release_id": app.release_id,
downcontent(content) { "data": {
if (content) { "make_master": app.release_id
return content
} else {
return "修改下载地址"
}
},
formatdatatimeline: function (timestr) {
return timestr.split("T")[0];
},
formattimeline: function (timestr) {
return timestr.split(".")[0].split("T")[1];
},
getiOStype: function (type) {
let ftype = '';
if (type === 1) {
ftype = '内测版'
} else if (type === 2) {
ftype = '企业版'
}
return ftype
},
} }
});
},
endEdit(app, type) {
if (type === 'changelog') {
app.editing.changelog = false;
} else if (type === 'binary_url') {
app.editing.binary_url = false;
}
},
updateChangelog(app, type) {
if (type === 'changelog') {
this.activity.editing.changelog = false;
this.updatas = {"changelog": app.changelog}
} else if (type === 'binary_url') {
this.activity.editing.binary_url = false;
this.updatas = {"binary_url": app.binary_url}
}
this.updatereleaseappFun({
"methods": "PUT",
"app_id": this.currentapp.app_id,
"release_id": app.release_id,
"data": this.updatas
});
this.updatas = {}
},
startEdit(app, type) {
if (type === 'changelog') {
app.editing.changelog = true;
} else if (type === 'binary_url') {
app.editing.binary_url = true;
}
} }
}, created() {
}, watch: {},
computed: {}, mounted() {
this.$store.dispatch('doappInfoIndex', [[5, 5], [5, 5]]);
this.getapptimelineFun();
}, filters: {
downcontent(content) {
if (content) {
return content
} else {
return "修改下载地址"
}
},
formatdatatimeline: function (timestr) {
return timestr.split("T")[0];
},
formattimeline: function (timestr) {
return timestr.split(".")[0].split("T")[1];
},
getiOStype: function (type) {
let ftype = '';
if (type === 1) {
ftype = '内测版'
} else if (type === 2) {
ftype = '企业版'
}
return ftype
},
}
}
</script> </script>
<style scoped> <style scoped>
.directive-view-release { .directive-view-release {
position: relative; position: relative;
padding-left: 80px; padding-left: 80px;
color: #9b9b9b; color: #9b9b9b;
} }
.directive-view-release > i { .directive-view-release > i {
display: -webkit-box; display: -webkit-box;
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
height: 50px; height: 50px;
-webkit-box-align: center; -webkit-box-align: center;
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
-webkit-box-pack: center; -webkit-box-pack: center;
-ms-flex-pack: center; -ms-flex-pack: center;
justify-content: center; justify-content: center;
position: absolute; position: absolute;
left: 0; left: 0;
z-index: 2; z-index: 2;
width: 50px; width: 50px;
border: 1px solid rgba(151, 151, 151, .2); border: 1px solid rgba(151, 151, 151, .2);
border-radius: 50%; border-radius: 50%;
background-color: #f6f6f6; background-color: #f6f6f6;
text-align: center; text-align: center;
font-size: 22px font-size: 22px
} }
.directive-view-release > i:before { .directive-view-release > i:before {
display: inline-block; display: inline-block;
margin-top: 2px; margin-top: 2px;
margin-left: 2px margin-left: 2px
} }
.directive-view-release .release-metainfo { .directive-view-release .release-metainfo {
margin-top: 2px margin-top: 2px
} }
.directive-view-release .release-metainfo small { .directive-view-release .release-metainfo small {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin: 8px 0; margin: 8px 0;
line-height: 14px line-height: 14px
} }
.directive-view-release .release-metainfo small i, .directive-view-release .release-metainfo small span { .directive-view-release .release-metainfo small i, .directive-view-release .release-metainfo small span {
display: inline-block; display: inline-block;
vertical-align: middle vertical-align: middle
} }
.directive-view-release .release-metainfo small i { .directive-view-release .release-metainfo small i {
margin-right: 2px; margin-right: 2px;
line-height: 14px line-height: 14px
} }
.directive-view-release > b { .directive-view-release > b {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-right: 30px; margin-right: 30px;
color: #4a4a4a; color: #4a4a4a;
font-weight: 400; font-weight: 400;
font-size: 20px font-size: 20px
} }
.directive-view-release pre, .directive-view-release textarea { .directive-view-release pre, .directive-view-release textarea {
margin: 14px 0; margin: 14px 0;
padding: 0; padding: 0;
border: 0; border: 0;
background-color: transparent; background-color: transparent;
color: #4a4a4a; color: #4a4a4a;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
} }
.directive-view-release textarea { .directive-view-release textarea {
padding: 12px 16px; padding: 12px 16px;
width: 500px; width: 500px;
height: 120px; height: 120px;
border-radius: 5px; border-radius: 5px;
resize: none; resize: none;
border: 1px solid #bdc6c7; border: 1px solid #bdc6c7;
color: #555; color: #555;
font-size: 16px font-size: 16px
} }
.directive-view-release .tooltip-top { .directive-view-release .tooltip-top {
position: relative; position: relative;
overflow: visible; overflow: visible;
color: #9b9b9b; color: #9b9b9b;
} }
.directive-view-release .release-actions { .directive-view-release .release-actions {
margin-top: 10px; margin-top: 10px;
position: relative position: relative
} }
.directive-view-release .release-actions a, .directive-view-release .release-actions button { .directive-view-release .release-actions a, .directive-view-release .release-actions button {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-right: 8px; margin-right: 8px;
background-color: transparent; background-color: transparent;
border: 1px solid; border: 1px solid;
overflow: hidden; overflow: hidden;
border-radius: 17px; border-radius: 17px;
padding: 4px 10px padding: 4px 10px
} }
.directive-view-release .release-actions .tooltip-top { .directive-view-release .release-actions .tooltip-top {
overflow: visible; overflow: visible;
position: relative position: relative
} }
.directive-view-release .release-actions a i, .directive-view-release .release-actions button i { .directive-view-release .release-actions a i, .directive-view-release .release-actions button i {
display: inline-block; display: inline-block;
vertical-align: middle vertical-align: middle
} }
.directive-view-release .release-actions a.btn-save, .directive-view-release .release-actions button.btn-save { .directive-view-release .release-actions a.btn-save, .directive-view-release .release-actions button.btn-save {
border-color: #3d6df8; border-color: #3d6df8;
background-color: #92c1f8; background-color: #92c1f8;
color: #fff color: #fff
} }
.directive-view-release .release-actions a.btn-cancel, .directive-view-release .release-actions button.btn-cancel { .directive-view-release .release-actions a.btn-cancel, .directive-view-release .release-actions button.btn-cancel {
border: 0; border: 0;
} }
.directive-view-release .release-actions a.btn-cancel:hover, .directive-view-release .release-actions button.btn-cancel:hover { .directive-view-release .release-actions a.btn-cancel:hover, .directive-view-release .release-actions button.btn-cancel:hover {
color: #686868 color: #686868
} }
.directive-view-release .release-actions a { .directive-view-release .release-actions a {
color: #9b9b9b color: #9b9b9b
} }
.directive-view-release .release-actions a:focus, .directive-view-release .release-actions a:hover { .directive-view-release .release-actions a:focus, .directive-view-release .release-actions a:hover {
text-decoration: none text-decoration: none
} }
.directive-view-release .release-actions .has-text i { .directive-view-release .release-actions .has-text i {
border-right: 1px solid border-right: 1px solid
} }
.directive-view-release .release-actions.editing { .directive-view-release .release-actions.editing {
margin-top: 0; margin-top: 0;
text-align: right; text-align: right;
width: 500px width: 500px
} }
.time-line-more { .time-line-more {
background: #F6F6F6; background: #F6F6F6;
border: 1px solid; border: 1px solid;
position: relative; position: relative;
z-index: 99; z-index: 99;
width: 160px; width: 160px;
padding: 10px 0; padding: 10px 0;
border-radius: 40px; border-radius: 40px;
margin-top: 10px; margin-top: 10px;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1,114 +1,115 @@
<template> <template>
<transition :name="transitionName"> <transition :name="transitionName">
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop"> <div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" <svg aria-hidden="true" class="Icon Icon--backToTopArrow" height="16" style="height:16px;width:16px"
class="Icon Icon--backToTopArrow" aria-hidden="true" style="height:16px;width:16px"> viewBox="0 0 17 17" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="M12.036 15.59a1 1 0 0 1-.997.995H5.032a.996.996 0 0 1-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z"/> <path
</svg> d="M12.036 15.59a1 1 0 0 1-.997.995H5.032a.996.996 0 0 1-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z"/>
</div> </svg>
</transition> </div>
</transition>
</template> </template>
<script> <script>
export default { export default {
name: 'BackToTop', name: 'BackToTop',
props: { props: {
visibilityHeight: { visibilityHeight: {
type: Number, type: Number,
default: 400 default: 400
}, },
backPosition: { backPosition: {
type: Number, type: Number,
default: 0 default: 0
}, },
customStyle: { customStyle: {
type: Object, type: Object,
default: function () { default: function () {
return { return {
right: '50px', right: '50px',
bottom: '50px', bottom: '50px',
width: '40px', width: '40px',
height: '40px', height: '40px',
'border-radius': '4px', 'border-radius': '4px',
'line-height': '45px', 'line-height': '45px',
background: '#e7eaf1' background: '#e7eaf1'
}
}
},
transitionName: {
type: String,
default: 'fade'
}
},
data() {
return {
visible: false,
interval: null,
isMoving: false
}
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
if (this.interval) {
clearInterval(this.interval)
}
},
methods: {
handleScroll() {
this.visible = window.pageYOffset > this.visibilityHeight
},
backToTop() {
if (this.isMoving) return
const start = window.pageYOffset
let i = 0
this.isMoving = true
this.interval = setInterval(() => {
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
if (next <= this.backPosition) {
window.scrollTo(0, this.backPosition)
clearInterval(this.interval)
this.isMoving = false
} else {
window.scrollTo(0, next)
}
i++
}, 16.7)
},
easeInOutQuad(t, b, c, d) {
if ((t /= d / 2) < 1) return c / 2 * t * t + b
return -c / 2 * (--t * (t - 2) - 1) + b
}
} }
}
},
transitionName: {
type: String,
default: 'fade'
} }
},
data() {
return {
visible: false,
interval: null,
isMoving: false
}
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
if (this.interval) {
clearInterval(this.interval)
}
},
methods: {
handleScroll() {
this.visible = window.pageYOffset > this.visibilityHeight
},
backToTop() {
if (this.isMoving) return
const start = window.pageYOffset
let i = 0
this.isMoving = true
this.interval = setInterval(() => {
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
if (next <= this.backPosition) {
window.scrollTo(0, this.backPosition)
clearInterval(this.interval)
this.isMoving = false
} else {
window.scrollTo(0, next)
}
i++
}, 16.7)
},
easeInOutQuad(t, b, c, d) {
if ((t /= d / 2) < 1) return c / 2 * t * t + b
return -c / 2 * (--t * (t - 2) - 1) + b
}
}
}
</script> </script>
<style scoped> <style scoped>
.back-to-ceiling { .back-to-ceiling {
position: fixed; position: fixed;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
} }
.back-to-ceiling:hover { .back-to-ceiling:hover {
background: #d5dbe7; background: #d5dbe7;
} }
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity .5s; transition: opacity .5s;
} }
.fade-enter, .fade-enter,
.fade-leave-to { .fade-leave-to {
opacity: 0 opacity: 0
} }
.back-to-ceiling .Icon { .back-to-ceiling .Icon {
fill: #9aaabf; fill: #9aaabf;
background: none; background: none;
} }
</style> </style>

@ -1,314 +1,314 @@
<template> <template>
<transition :name="transitionName"> <transition :name="transitionName">
<div> <div>
<div style="margin: 5px 20px"> <div style="margin: 5px 20px">
<el-steps :active="active" finish-status="success"> <el-steps :active="active" finish-status="success">
<el-step title="步骤 1"> <el-step title="步骤 1">
</el-step> </el-step>
<el-step title="步骤 2"> <el-step title="步骤 2">
</el-step> </el-step>
<el-step title="步骤 3"/> <el-step title="步骤 3"/>
</el-steps> </el-steps>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<div v-if="active===1"> <div v-if="active===1">
<h2>你的二级域名</h2> <h2>你的二级域名</h2>
<el-input clearable autofocus v-model="domain_name"/> <el-input v-model="domain_name" autofocus clearable/>
</div> </div>
<div v-else-if="active===2"> <div v-else-if="active===2">
<div style="text-align: center;margin: 20px 0"> <div style="text-align: center;margin: 20px 0">
<h3>还差一步绑定成功</h3> <h3>还差一步绑定成功</h3>
</div> </div>
请联系域名管理员前往 <strong>{{ domain_name }}</strong> 域名 DNS 管理后台添加如下 CNAME 记录 请联系域名管理员前往 <strong>{{ domain_name }}</strong> 域名 DNS 管理后台添加如下 CNAME 记录
<el-table <el-table
:data="domain_tData" :data="domain_tData"
border border
stripe stripe
style="width: 100%;margin-top: 20px"> style="width: 100%;margin-top: 20px">
<el-table-column <el-table-column
prop="type" align="center"
label="记录类型" label="记录类型"
align="center" prop="type"
width="100"> width="100">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="host" align="center"
align="center" label="主机记录"
label="主机记录" prop="host"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip content="点击复制到剪贴板"> <el-tooltip content="点击复制到剪贴板">
<el-link v-if="scope.row.host" :underline="false" <el-link v-if="scope.row.host" v-clipboard:copy="scope.row.host"
v-clipboard:copy="scope.row.host" v-clipboard:success="copy_success"
v-clipboard:success="copy_success">{{ scope.row.host }} :underline="false">{{ scope.row.host }}
</el-link> </el-link>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="dns" align="center"
align="center" label="记录值"
label="记录值" prop="dns"
width="300"> width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip content="点击复制到剪贴板"> <el-tooltip content="点击复制到剪贴板">
<el-link v-if="scope.row.dns" :underline="false" <el-link v-if="scope.row.dns" v-clipboard:copy="scope.row.dns"
v-clipboard:copy="scope.row.dns" v-clipboard:success="copy_success"
v-clipboard:success="copy_success">{{ scope.row.dns }} :underline="false">{{ scope.row.dns }}
</el-link> </el-link>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-alert title="请在域名DNS配置成功后,点击“下一步”按钮" <el-alert :closable="false"
style="margin-top: 30px" show-icon
type="warning" style="margin-top: 30px"
:closable="false" title="请在域名DNS配置成功后,点击“下一步”按钮"
show-icon/> type="warning"/>
</div> </div>
<div v-else-if="active===3"> <div v-else-if="active===3">
<div v-if="!bind_status"> <div v-if="!bind_status">
<div style="text-align: center;margin: 20px 0"> <div style="text-align: center;margin: 20px 0">
<el-link :underline="false" type="danger" <el-link :underline="false" style="font-size: x-large"
style="font-size: x-large">绑定失败 type="danger">绑定失败
</el-link> </el-link>
</div> </div>
<p style="margin: 10px 0">{{b_t_msg}}正在绑定域名<strong>{{ domain_name }}</strong></p>
<el-row>
<el-col :span="16"><p>系统未检出到您的CNAME记录请检查您的配置</p></el-col>
<el-col :span="6">
<el-button type="danger" size="small" plain style="margin-top: 8px"
@click="remove_domain">
解除绑定
</el-button>
</el-col>
</el-row>
</div>
<div v-else> <p style="margin: 10px 0">{{ b_t_msg }}正在绑定域名<strong>{{ domain_name }}</strong></p>
<div style="text-align: center;margin: 20px 0"> <el-row>
<el-link :underline="false" type="success" <el-col :span="16"><p>系统未检出到您的CNAME记录请检查您的配置</p></el-col>
style="font-size: x-large">绑定成功 <el-col :span="6">
</el-link> <el-button plain size="small" style="margin-top: 8px" type="danger"
</div> @click="remove_domain">
解除绑定
</el-button>
</el-col>
</el-row>
</div>
<el-row> <div v-else>
<el-col :span="16"><p>{{b_t_msg}}已绑定域名<strong>{{ domain_name }}</strong></p></el-col> <div style="text-align: center;margin: 20px 0">
<el-col :span="6"> <el-link :underline="false" style="font-size: x-large"
<el-button type="danger" size="small" plain style="margin-top: 8px" type="success">绑定成功
@click="remove_domain"> </el-link>
解除绑定 </div>
</el-button>
</el-col>
</el-row>
</div> <el-row>
<el-table <el-col :span="16"><p>{{ b_t_msg }}已绑定域名<strong>{{ domain_name }}</strong></p></el-col>
:data="domain_tData" <el-col :span="6">
border <el-button plain size="small" style="margin-top: 8px" type="danger"
stripe @click="remove_domain">
style="width: 100%;margin-top: 20px"> 解除绑定
<el-table-column </el-button>
prop="type" </el-col>
label="记录类型" </el-row>
align="center"
width="100">
</el-table-column>
<el-table-column
prop="host"
align="center"
label="主机记录"
>
</el-table-column>
<el-table-column
prop="dns"
align="center"
label="记录值"
width="300">
</el-table-column>
</el-table>
<div v-if="!bind_status" style="text-align: center;margin: 30px 0">
<el-button @click="check_cname" type="success" plain>已经修改配置再次检查绑定</el-button>
</div>
</div>
</div>
</div> </div>
<div v-if="active!==3" style="margin:40px 20px 0;text-align: right"> <el-table
<el-button @click="last" :data="domain_tData"
:disabled="bind_status|| active===1 ">上一步 border
</el-button> stripe
<el-button v-if="force_bind" @click="next(1)">强制绑定</el-button> style="width: 100%;margin-top: 20px">
<el-button v-else @click="next(0)">下一步</el-button> <el-table-column
align="center"
label="记录类型"
prop="type"
width="100">
</el-table-column>
<el-table-column
align="center"
label="主机记录"
prop="host"
>
</el-table-column>
<el-table-column
align="center"
label="记录值"
prop="dns"
width="300">
</el-table-column>
</el-table>
<div v-if="!bind_status" style="text-align: center;margin: 30px 0">
<el-button plain type="success" @click="check_cname">已经修改配置再次检查绑定</el-button>
</div> </div>
</div>
</div> </div>
</transition> </div>
<div v-if="active!==3" style="margin:40px 20px 0;text-align: right">
<el-button :disabled="bind_status|| active===1 "
@click="last">上一步
</el-button>
<el-button v-if="force_bind" @click="next(1)">强制绑定</el-button>
<el-button v-else @click="next(0)">下一步</el-button>
</div>
</div>
</transition>
</template> </template>
<script> <script>
import {domainFun} from "@/restful"; import {domainFun} from "@/restful";
export default { export default {
name: 'BindDomain', name: 'BindDomain',
props: { props: {
transitionName: { transitionName: {
type: String, type: String,
default: 'bind-domain' default: 'bind-domain'
}, },
app_id: { app_id: {
type: String, type: String,
default: undefined default: undefined
}, },
domain_type: { domain_type: {
type: Number, type: Number,
default: 1 default: 1
}, },
domain_state: { domain_state: {
type: Boolean, type: Boolean,
default: false default: false
}, },
}, },
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_name: '',
domain_tData: [{'type': 'CNAME', 'host': 'xxx', 'dns': 'demo.xxx.cn'}], domain_tData: [{'type': 'CNAME', 'host': 'xxx', 'dns': 'demo.xxx.cn'}],
force_bind: false, force_bind: false,
b_t_msg: '您的账户', b_t_msg: '您的账户',
}
},
mounted() {
if (this.domain_type === 2) {
this.b_t_msg = '您的应用'
}
this.bind_click();
},
beforeDestroy() {
this.bind_domain_sure = false;
},
methods: {
copy_success() {
this.$message.success('复制剪切板成功');
},
check_cname() {
domainFun(data => {
if (data.code === 1000) {
if (this.active++ > 2) this.active = 3;
this.bind_status = true;
if (!this.app_id) {
if (this.domain_type === 1) {
this.$store.dispatch("dodomainshow", false);
} }
}, }
mounted() { if (this.domain_state) {
if (this.domain_type === 2) { this.$store.dispatch("dosetdomainstate", true);
this.b_t_msg = '您的应用' }
} else {
if (data.code === 1004) {
this.active = 1;
this.domain_name = '';
} else {
if (this.active++ > 2) this.active = 3;
}
this.bind_status = false;
this.$message.error("绑定失败 " + data.msg)
}
}, {methods: 'PUT', data: {app_id: this.app_id, domain_type: this.domain_type}})
},
remove_domain() {
domainFun(data => {
if (data.code === 1000) {
this.bind_status = false;
this.active = 1;
this.$message.success("解除绑定成功 ");
if (!this.app_id) {
if (this.domain_type === 1) {
this.$store.dispatch("dodomainshow", true);
} }
this.bind_click(); }
}, if (this.domain_state) {
beforeDestroy() { this.$store.dispatch("dosetdomainstate", true);
this.bind_domain_sure = false; }
}, } else {
methods: { this.$message.error("解除绑定失败 " + data.msg)
copy_success() {
this.$message.success('复制剪切板成功');
},
check_cname() {
domainFun(data => {
if (data.code === 1000) {
if (this.active++ > 2) this.active = 3;
this.bind_status = true;
if (!this.app_id) {
if (this.domain_type === 1) {
this.$store.dispatch("dodomainshow", false);
}
}
if (this.domain_state) {
this.$store.dispatch("dosetdomainstate", true);
}
} else {
if (data.code === 1004) {
this.active = 1;
this.domain_name = '';
} else {
if (this.active++ > 2) this.active = 3;
}
this.bind_status = false;
this.$message.error("绑定失败 " + data.msg)
}
}, {methods: 'PUT', data: {app_id: this.app_id, domain_type: this.domain_type}})
},
remove_domain() {
domainFun(data => {
if (data.code === 1000) {
this.bind_status = false;
this.active = 1;
this.$message.success("解除绑定成功 ");
if (!this.app_id) {
if (this.domain_type === 1) {
this.$store.dispatch("dodomainshow", true);
}
}
if (this.domain_state) {
this.$store.dispatch("dosetdomainstate", true);
}
} else {
this.$message.error("解除绑定失败 " + data.msg)
}
}, {methods: 'DELETE', data: {app_id: this.app_id, domain_type: this.domain_type}});
},
bind_click() {
this.$store.dispatch("dosetdomainstate", false);
domainFun(data => {
if (data.code === 1000) {
if (data.data) {
if (data.data.domain_name) {
this.domain_name = data.data.domain_name;
}
if (data.data.domain_record) {
this.format_domain_tData(data.data.domain_record);
if (this.active++ > 2) this.active = 3;
}
if (data.data.is_enable) {
this.bind_status = true;
if (this.active++ > 2) this.active = 3;
}
this.bind_domain_sure = true;
}
} else {
this.$message.error("绑定失败 " + data.msg)
}
}, {methods: 'GET', data: {app_id: this.app_id, domain_type: this.domain_type}});
},
format_domain_tData(cname_domain) {
let domain_name_list = this.domain_name.split('.');
const d_len = domain_name_list.length;
if (d_len === 2) {
this.domain_tData[0].host = '@'
} else if (d_len > 2) {
domain_name_list.splice(domain_name_list.length - 2, 2);
this.domain_tData[0].host = domain_name_list.join(".")
}
this.domain_tData[0].dns = cname_domain;
},
next(force_bind) {
if (this.active === 1) {
domainFun(data => {
if (data.code === 1000) {
if (data.data && data.data.cname_domain) {
this.format_domain_tData(data.data.cname_domain);
if (this.active++ > 2) this.active = 3;
}
} else {
this.$message.error("绑定失败 " + data.msg);
if (data.code === 1011) {
this.force_bind = true
}
}
}, {
methods: 'POST',
data: {
domain_name: this.domain_name,
app_id: this.app_id,
domain_type: this.domain_type,
force_bind: force_bind
}
})
} else if (this.active === 2) {
this.check_cname()
}
},
last() {
if (this.active-- < 2) this.active = 1;
},
} }
} }, {methods: 'DELETE', data: {app_id: this.app_id, domain_type: this.domain_type}});
},
bind_click() {
this.$store.dispatch("dosetdomainstate", false);
domainFun(data => {
if (data.code === 1000) {
if (data.data) {
if (data.data.domain_name) {
this.domain_name = data.data.domain_name;
}
if (data.data.domain_record) {
this.format_domain_tData(data.data.domain_record);
if (this.active++ > 2) this.active = 3;
}
if (data.data.is_enable) {
this.bind_status = true;
if (this.active++ > 2) this.active = 3;
}
this.bind_domain_sure = true;
}
} else {
this.$message.error("绑定失败 " + data.msg)
}
}, {methods: 'GET', data: {app_id: this.app_id, domain_type: this.domain_type}});
},
format_domain_tData(cname_domain) {
let domain_name_list = this.domain_name.split('.');
const d_len = domain_name_list.length;
if (d_len === 2) {
this.domain_tData[0].host = '@'
} else if (d_len > 2) {
domain_name_list.splice(domain_name_list.length - 2, 2);
this.domain_tData[0].host = domain_name_list.join(".")
}
this.domain_tData[0].dns = cname_domain;
},
next(force_bind) {
if (this.active === 1) {
domainFun(data => {
if (data.code === 1000) {
if (data.data && data.data.cname_domain) {
this.format_domain_tData(data.data.cname_domain);
if (this.active++ > 2) this.active = 3;
}
} else {
this.$message.error("绑定失败 " + data.msg);
if (data.code === 1011) {
this.force_bind = true
}
}
}, {
methods: 'POST',
data: {
domain_name: this.domain_name,
app_id: this.app_id,
domain_type: this.domain_type,
force_bind: force_bind
}
})
} else if (this.active === 2) {
this.check_cname()
}
},
last() {
if (this.active-- < 2) this.active = 1;
},
}
}
</script> </script>
<style scoped> <style scoped>
.dialog-footer { .dialog-footer {
} }
</style> </style>

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

@ -1,255 +1,255 @@
<template> <template>
<div> <div>
<div class="main"> <div class="main">
<div class="top"> <div class="top">
<el-carousel :interval="5000" arrow="always" height="600px"> <el-carousel :interval="5000" arrow="always" height="600px">
<el-carousel-item v-for="item in swiperList" :key="item.title"> <el-carousel-item v-for="item in swiperList" :key="item.title">
<div :style="{backgroundImage:`url(${item.img})`}" class="bpic"> <div :style="{backgroundImage:`url(${item.img})`}" class="bpic">
<div class="topplayer-top"> <div class="topplayer-top">
<div class="word">{{ item.title }}</div> <div class="word">{{ item.title }}</div>
<div class="content">{{ item.content }}</div> <div class="content">{{ item.content }}</div>
</div> </div>
</div>
</el-carousel-item>
</el-carousel>
</div> </div>
</div> </el-carousel-item>
</el-carousel>
<div id="whyChooseUs"> </div>
<div style="width: 80%;margin-right: auto; margin-left: auto;"> </div>
<div class="whyChooseUs-title text-center">
<p>为什么选择我们的服务</p> <div id="whyChooseUs">
<p>THE REASON TO CHOOSING US</p> <div style="width: 80%;margin-right: auto; margin-left: auto;">
</div> <div class="whyChooseUs-title text-center">
<el-row :gutter="24"> <p>为什么选择我们的服务</p>
<el-col :span="6" v-for="(item,index) in serverList" :key="index"> <p>THE REASON TO CHOOSING US</p>
<div class="server-block"
onmouseenter="this.style.color='#28f';this.style.borderColor='#28f'"
onmouseleave="this.style.color='#666';this.style.borderColor='#ccc'">
<img class="center-block" v-lazy="item.logo" alt="logo">
<p class="text-center">{{item.title}}</p>
<div
class="text-center"
v-html="item.content"
onmouseenter="this.style.color='#28f'"
onmouseleave="this.style.color='#ccc'"
></div>
</div>
</el-col>
</el-row>
</div>
</div> </div>
<el-row :gutter="24">
<el-col v-for="(item,index) in serverList" :key="index" :span="6">
<div class="server-block"
onmouseenter="this.style.color='#28f';this.style.borderColor='#28f'"
onmouseleave="this.style.color='#666';this.style.borderColor='#ccc'">
<img v-lazy="item.logo" alt="logo" class="center-block">
<p class="text-center">{{ item.title }}</p>
<div
class="text-center"
onmouseenter="this.style.color='#28f'"
onmouseleave="this.style.color='#ccc'"
v-html="item.content"
></div>
</div>
</el-col>
</el-row>
</div>
</div>
<el-container id="contactUs" :style="{background:`url(${contact_images.bg}) 0 0 no-repeat`}"> <el-container id="contactUs" :style="{background:`url(${contact_images.bg}) 0 0 no-repeat`}">
<el-main class="contactUs-container"> <el-main class="contactUs-container">
<div class="content">您身边的应用托管分发专家</div> <div class="content">您身边的应用托管分发专家</div>
<div class="content">7x24小时提供出色的不间断服务</div> <div class="content">7x24小时提供出色的不间断服务</div>
<el-button @click="$router.push({name:'FirContact'})" <el-button onmouseenter="this.style.backgroundColor='transparent'; this.style.borderColor='#ffffff'; this.style.color='#ffffff';"
onmouseleave="this.style.borderColor='#ffffff'; this.style.backgroundColor='#ffffff'; this.style.color='#3f3f3f';" 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';" @click="$router.push({name:'FirContact'})"
>联系我们 >联系我们
</el-button> </el-button>
<div class="contactUs-contactWay"> <div class="contactUs-contactWay">
<img v-lazy="contact_images.weixin"/> <img v-lazy="contact_images.weixin"/>
<img v-lazy="contact_images.weibo"/> <img v-lazy="contact_images.weibo"/>
<img v-lazy="contact_images.twitter"/> <img v-lazy="contact_images.twitter"/>
</div> </div>
</el-main> </el-main>
</el-container> </el-container>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "FirIndex", name: "FirIndex",
data() { data() {
return { return {
contact_images: { contact_images: {
bg: require("@/assets/imgs/contact_us_bg.jpg"), bg: require("@/assets/imgs/contact_us_bg.jpg"),
weixin: require("@/assets/imgs/weixin.png"), weixin: require("@/assets/imgs/weixin.png"),
weibo: require("@/assets/imgs/weibo.png"), weibo: require("@/assets/imgs/weibo.png"),
twitter: require("@/assets/imgs/twitter.png"), twitter: require("@/assets/imgs/twitter.png"),
}, },
swiperList: [ swiperList: [
{ {
img: require("@/assets/imgs/banner2.jpg"), img: require("@/assets/imgs/banner2.jpg"),
path: "", path: "",
title: '超级签名', title: '超级签名',
content: '自定义超级签签名,不再为频繁填写udid打包而烦恼', content: '自定义超级签签名,不再为频繁填写udid打包而烦恼',
}, },
{ {
img: require("@/assets/imgs/banner1.png"), img: require("@/assets/imgs/banner1.png"),
path: "", path: "",
title: '内测托管', title: '内测托管',
content: '一键上传应用,扫描二维码下载', content: '一键上传应用,扫描二维码下载',
}, },
{ {
img: require("@/assets/imgs/banner_2.jpg"), img: require("@/assets/imgs/banner_2.jpg"),
path: "", path: "",
title: '应用合并', title: '应用合并',
content: '扫描同一个二维码,根据设备类型自动下载对应的 iOS 或 Android 应用', content: '扫描同一个二维码,根据设备类型自动下载对应的 iOS 或 Android 应用',
}, },
{ {
img: require("@/assets/imgs/banner_1.jpg"), img: require("@/assets/imgs/banner_1.jpg"),
path: "", path: "",
title: '权限控制', title: '权限控制',
content: '灵活的访问权限控制,密码授权,下载页展示,管理应用', content: '灵活的访问权限控制,密码授权,下载页展示,管理应用',
}, },
], ],
serverList: [ serverList: [
{ {
logo: require("@/assets/imgs/tel.png"), logo: require("@/assets/imgs/tel.png"),
title: "核心优势1", title: "核心优势1",
content: "<p>由专业客服提供人工服务</p>负责疑难问题和故障受理" content: "<p>由专业客服提供人工服务</p>负责疑难问题和故障受理"
}, },
{ {
logo: require("@/assets/imgs/computer.png"), logo: require("@/assets/imgs/computer.png"),
title: "核心优势2", title: "核心优势2",
content: "<p>可定制私有化部署</p>帮助客户进行私有操作" content: "<p>可定制私有化部署</p>帮助客户进行私有操作"
}, },
{ {
logo: require("@/assets/imgs/qq.png"), logo: require("@/assets/imgs/qq.png"),
title: "核心优势3", title: "核心优势3",
content: "<p>利用QQ微信等提供在线解答</p>帮助用户快速准确解决问题和故障" content: "<p>利用QQ微信等提供在线解答</p>帮助用户快速准确解决问题和故障"
}, },
{ {
logo: require("@/assets/imgs/skill.png"), logo: require("@/assets/imgs/skill.png"),
title: "核心优势4", title: "核心优势4",
content: "<p>由技术支持工程师,负责问题解答</p>需求受理及故障受理" content: "<p>由技术支持工程师,负责问题解答</p>需求受理及故障受理"
}
]
}
} }
]
} }
}
}
</script> </script>
<style scoped> <style scoped>
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.main .top { .main .top {
margin-top: 10px; margin-top: 10px;
width: 100%; width: 100%;
height: 600px; height: 600px;
} }
.main .top .bpic { .main .top .bpic {
width: 100%; width: 100%;
height: 600px; height: 600px;
} }
.main .topplayer-top { .main .topplayer-top {
width: 800px; width: 800px;
height: 300px; height: 300px;
position: absolute; position: absolute;
top: 220px; top: 220px;
margin-top: -150px; margin-top: -150px;
z-index: 2; z-index: 2;
right: 50%; right: 50%;
margin-right: -400px; margin-right: -400px;
} }
.word { .word {
padding-top: 100px; padding-top: 100px;
color: #ffffff; color: #ffffff;
font-size: 45px; font-size: 45px;
font-weight: bolder; font-weight: bolder;
text-align: center; text-align: center;
font-family: "微软雅黑"; font-family: "微软雅黑";
} }
.content { .content {
padding-top: 30px; padding-top: 30px;
color: #ffffff; color: #ffffff;
font-size: 20px; font-size: 20px;
font-weight: bolder; font-weight: bolder;
text-align: center; text-align: center;
font-family: "微软雅黑"; font-family: "微软雅黑";
} }
.main .topplayer-top button { .main .topplayer-top button {
width: 200px; width: 200px;
height: 60px; height: 60px;
margin-top: 50px; margin-top: 50px;
color: #ffffff; color: #ffffff;
background: #f5704f; background: #f5704f;
font-family: 微软雅黑; font-family: 微软雅黑;
text-align: center; text-align: center;
font-weight: bolder; font-weight: bolder;
font-size: 14px; font-size: 14px;
border-radius: 8px; /*圆角*/ border-radius: 8px; /*圆角*/
margin-left: 150px; margin-left: 150px;
} }
#contactUs { #contactUs {
margin-top: 60px; margin-top: 60px;
color: #fff; color: #fff;
height: 400px; height: 400px;
text-align: center; text-align: center;
background-size: 100% 100%; background-size: 100% 100%;
transition: all ease 0.6s; transition: all ease 0.6s;
} }
#contactUs .contactUs-container { #contactUs .contactUs-container {
padding-top: 50px; padding-top: 50px;
} }
#contactUs .contactUs-container button { #contactUs .contactUs-container button {
width: 300px; width: 300px;
height: 50px; height: 50px;
margin-top: 40px; margin-top: 40px;
} }
#contactUs .contactUs-container .contactUs-contactWay img { #contactUs .contactUs-container .contactUs-contactWay img {
display: inline-block; display: inline-block;
width: 48px; width: 48px;
height: 48px; height: 48px;
margin: 30px; margin: 30px;
} }
/* 为什么选择我们 */ /* 为什么选择我们 */
#whyChooseUs { #whyChooseUs {
padding: 100px; padding: 100px;
text-align: center; text-align: center;
} }
#whyChooseUs .whyChooseUs-title { #whyChooseUs .whyChooseUs-title {
margin-bottom: 50px; margin-bottom: 50px;
} }
#whyChooseUs .whyChooseUs-title p:nth-of-type(1) { #whyChooseUs .whyChooseUs-title p:nth-of-type(1) {
font-size: 25px; font-size: 25px;
font-weight: 500; font-weight: 500;
} }
#whyChooseUs .whyChooseUs-title p:nth-of-type(2) { #whyChooseUs .whyChooseUs-title p:nth-of-type(2) {
font-size: 14px; font-size: 14px;
} }
#whyChooseUs .server-block { #whyChooseUs .server-block {
padding: 50px 20px; padding: 50px 20px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-bottom: 5px solid #ccc; border-bottom: 5px solid #ccc;
} }
#whyChooseUs .server-block img { #whyChooseUs .server-block img {
width: 48px; width: 48px;
height: 48px; height: 48px;
} }
#whyChooseUs .server-block > p { #whyChooseUs .server-block > p {
font-size: 20px; font-size: 20px;
margin: 30px 0; margin: 30px 0;
} }
#whyChooseUs .server-block > div { #whyChooseUs .server-block > div {
color: #ccc; color: #ccc;
} }
</style> </style>

@ -1,120 +1,120 @@
<template> <template>
<el-container> <el-container>
<div style="background-color:rgba(162, 193, 230, 0.18);"> <div style="background-color:rgba(162, 193, 230, 0.18);">
<el-header class="header"> <el-header class="header">
<el-row :gutter="12"> <el-row :gutter="12">
<el-col :span="12"> <el-col :span="12">
<el-image class="logo img" :src="require('@/assets/logo.png')" alt="logo"/> <el-image :src="require('@/assets/logo.png')" alt="logo" class="logo img"/>
</el-col> </el-col>
<el-col :span="12" :offset="12"> <el-col :offset="12" :span="12">
<el-row :gutter="12" class="nav"> <el-row :gutter="12" class="nav">
<el-col :span="8"> <el-col :span="8">
<el-link @click="$router.push({name:'FirIndex'})">首页</el-link> <el-link @click="$router.push({name:'FirIndex'})">首页</el-link>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-link @click="$router.push({name:'FirService'})">服务</el-link> <el-link @click="$router.push({name:'FirService'})">服务</el-link>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-link @click="$router.push({name:'FirNews'})">新闻</el-link> <el-link @click="$router.push({name:'FirNews'})">新闻</el-link>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-link @click="$router.push({name:'FirApps'})">登录</el-link> <el-link @click="$router.push({name:'FirApps'})">登录</el-link>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-link @click="$router.push({name:'FirRegist'})">注册</el-link> <el-link @click="$router.push({name:'FirRegist'})">注册</el-link>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-link @click="$router.push({name:'FirContact'})">联系我们</el-link> <el-link @click="$router.push({name:'FirContact'})">联系我们</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-col> </el-col>
</el-row> </el-row>
</el-header> </el-header>
</div> </div>
<div> <div>
<router-view/> <router-view/>
</div> </div>
<el-tooltip placement="top" content="回到顶部"> <el-tooltip content="回到顶部" placement="top">
<back-to-top :custom-style="myBackToTopStyle" :visibility-height="300" :back-position="50" <back-to-top :back-position="50" :custom-style="myBackToTopStyle" :visibility-height="300"
transition-name="fade"/> transition-name="fade"/>
</el-tooltip> </el-tooltip>
<el-footer> <el-footer>
<el-divider/> <el-divider/>
<FirFooter/> <FirFooter/>
</el-footer> </el-footer>
</el-container> </el-container>
</template> </template>
<script> <script>
import FirFooter from "@/components/FirFooter"; import FirFooter from "@/components/FirFooter";
import BackToTop from "@/components/base/BackToTop"; import BackToTop from "@/components/base/BackToTop";
export default { export default {
name: "FirIndex", name: "FirIndex",
components: {FirFooter, BackToTop}, components: {FirFooter, BackToTop},
data() { data() {
return { return {
myBackToTopStyle: { myBackToTopStyle: {
right: '80px', right: '80px',
bottom: '100px', bottom: '100px',
width: '40px', width: '40px',
height: '40px', height: '40px',
'border-radius': '4px', 'border-radius': '4px',
'line-height': '45px', 'line-height': '45px',
background: '#e7eaf1' background: '#e7eaf1'
}, },
}
}
} }
}
}
</script> </script>
<style scoped> <style scoped>
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.header { .header {
width: 100%; width: 100%;
height: 120px; height: 120px;
} }
.header .img { .header .img {
width: 300px; width: 300px;
height: 85px; height: 85px;
padding-left: 100px; padding-left: 100px;
padding-top: 8px; padding-top: 8px;
} }
.header .logo { .header .logo {
float: left; float: left;
} }
.header .nav { .header .nav {
float: right; float: right;
padding-right: 80px; padding-right: 80px;
} }
.header .nav .el-col { .header .nav .el-col {
margin-right: 20px; margin-right: 20px;
float: left; float: left;
list-style: none; list-style: none;
width: 80px; width: 80px;
height: 60px; height: 60px;
line-height: 100px; line-height: 100px;
color: #7d7d7d; color: #7d7d7d;
font-size: 15px; font-size: 15px;
font-weight: bolder; font-weight: bolder;
} }
.header .nav .el-link:hover { .header .nav .el-link:hover {
color: #47477d; color: #47477d;
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
touch-action: manipulation; touch-action: manipulation;
} }
</style> </style>

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

@ -1,155 +1,155 @@
<template> <template>
<div class="Service"> <div class="Service">
<div> <div>
<h3>我们的服务</h3> <h3>我们的服务</h3>
<p style="color:#b2b2b2">The Best Service You Never See</p> <p style="color:#b2b2b2">The Best Service You Never See</p>
</div>
<div class="Service-container">
<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>
</el-col>
</el-row>
</transition>
</div>
</div> </div>
<div class="Service-container">
<transition name="el-zoom-in-center">
<el-row v-show="show" :gutter="20">
<el-col v-for="(item,index) in serviceList" :key="index" :span="6">
<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>
</el-col>
</el-row>
</transition>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "FirService", name: "FirService",
data() { data() {
return { return {
show: false, show: false,
serviceList: [ serviceList: [
{ {
id: 'section-1', id: 'section-1',
title: '高性能应用分发', title: '高性能应用分发',
eng_title: 'High performance app distribution', eng_title: 'High performance app distribution',
img: require('@/assets/imgs/service1.jpg') img: require('@/assets/imgs/service1.jpg')
}, { }, {
id: 'section-2', id: 'section-2',
title: 'iOS超级签名', title: 'iOS超级签名',
eng_title: 'IOS super signature', eng_title: 'IOS super signature',
img: require('@/assets/imgs/service2.jpg') img: require('@/assets/imgs/service2.jpg')
}, { }, {
id: 'section-3', id: 'section-3',
title: '多维下载权限', title: '多维下载权限',
eng_title: 'Multi download permission', eng_title: 'Multi download permission',
img: require('@/assets/imgs/service3.jpg') img: require('@/assets/imgs/service3.jpg')
}, { }, {
id: 'section-4', id: 'section-4',
title: '应用自定义域名', title: '应用自定义域名',
eng_title: 'Custom domain name', eng_title: 'Custom domain name',
img: require('@/assets/imgs/service4.jpg') img: require('@/assets/imgs/service4.jpg')
}
]
}
},
mounted() {
this.show = true;
} }
]
} }
},
mounted() {
this.show = true;
}
}
</script> </script>
<style scoped> <style scoped>
.Service { .Service {
text-align: center; text-align: center;
} }
.Service-container { .Service-container {
width: 1170px; width: 1170px;
padding: 30px 50px; padding: 30px 50px;
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
} }
.Service-item { .Service-item {
margin-bottom: 50px; margin-bottom: 50px;
} }
.Service-item-wrapper { .Service-item-wrapper {
cursor: pointer; cursor: pointer;
background: rgba(244, 244, 244, 1); background: rgba(244, 244, 244, 1);
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
.Service-item-top { .Service-item-top {
width: 100%; width: 100%;
height: 120px; height: 120px;
/*padding: 30px;*/ /*padding: 30px;*/
text-align: center; text-align: center;
} }
.Service-item-top > i { .Service-item-top > i {
display: inline-block; display: inline-block;
width: 25px; width: 25px;
height: 2px; height: 2px;
background: #28f; background: #28f;
} }
.Service-item-top > p { .Service-item-top > p {
color: #b2b2b2; color: #b2b2b2;
opacity: 0; opacity: 0;
transform: translateY(10px); transform: translateY(10px);
transition: all .5s ease; transition: all .5s ease;
} }
.Service-item-img { .Service-item-img {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
} }
.Service-item-img img { .Service-item-img img {
width: 100%; width: 100%;
transition: all 0.5s ease; transition: all 0.5s ease;
} }
.Service-item-border { .Service-item-border {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
margin: auto; margin: auto;
z-index: 9999999; z-index: 9999999;
width: 100%; width: 100%;
height: 100%; height: 100%;
transition: all 0.5s ease; transition: all 0.5s ease;
border: 1px solid #000; border: 1px solid #000;
opacity: 0; opacity: 0;
} }
.Service-item-wrapper:hover .Service-item-top > i { .Service-item-wrapper:hover .Service-item-top > i {
opacity: 0; opacity: 0;
} }
.Service-item-wrapper:hover .Service-item-top > p { .Service-item-wrapper:hover .Service-item-top > p {
opacity: 1; opacity: 1;
transform: translateY(-10px); transform: translateY(-10px);
} }
.Service-item-wrapper:hover .Service-item-img > img { .Service-item-wrapper:hover .Service-item-img > img {
transform: scale(1.1, 1.1); transform: scale(1.1, 1.1);
} }
.Service-item-wrapper:hover > .Service-item-border { .Service-item-wrapper:hover > .Service-item-border {
/*opacity: 1;*/ /*opacity: 1;*/
width: 90%; width: 90%;
height: 90%; height: 90%;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1,43 +1,43 @@
<template> <template>
<el-main> <el-main>
<h1> 请点击打开 <a href="https://appstoreconnect.apple.com/" target="_blank">appstoreconnect</a> 登录苹果开发者账户进行操作</h1> <h1> 请点击打开 <a href="https://appstoreconnect.apple.com/" target="_blank">appstoreconnect</a> 登录苹果开发者账户进行操作</h1>
<div v-for="helpic in imagelist" :key="helpic"> <div v-for="helpic in imagelist" :key="helpic">
<img v-lazy="helpic" alt="" style="width: 1100px;margin-top: 20px"/> <img v-lazy="helpic" alt="" style="width: 1100px;margin-top: 20px"/>
</div> </div>
</el-main> </el-main>
</template> </template>
<script> <script>
import {getUserInfoFun} from "@/utils"; import {getUserInfoFun} from "@/utils";
export default { export default {
name: "FirSuperSignHelp", name: "FirSuperSignHelp",
data() { data() {
return { return {
imagelist: [ imagelist: [
require('@/assets/sign/help/sign_help_0.png'), require('@/assets/sign/help/sign_help_0.png'),
require('@/assets/sign/help/sign_help_1.png'), require('@/assets/sign/help/sign_help_1.png'),
require('@/assets/sign/help/sign_help_2.png'), require('@/assets/sign/help/sign_help_2.png'),
require('@/assets/sign/help/sign_help_3.png'), require('@/assets/sign/help/sign_help_3.png'),
require('@/assets/sign/help/sign_help_4.png'), require('@/assets/sign/help/sign_help_4.png'),
require('@/assets/sign/help/sign_help_5.png'), require('@/assets/sign/help/sign_help_5.png'),
] ]
}
}, mounted() {
getUserInfoFun(this);
}
} }
}, mounted() {
getUserInfoFun(this);
}
}
</script> </script>
<style scoped> <style scoped>
.el-main { .el-main {
margin: 20px auto 100px; margin: 20px auto 100px;
width: 1166px; width: 1166px;
position: relative; position: relative;
padding-bottom: 1px; padding-bottom: 1px;
text-align: center; text-align: center;
color: #9b9b9b; color: #9b9b9b;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
border-radius: 1%; border-radius: 1%;
} }
</style> </style>

@ -1,430 +1,430 @@
<template> <template>
<el-main> <el-main>
<!-- vueCropper 剪裁图片实现--> <!-- vueCropper 剪裁图片实现-->
<el-dialog title="图片剪裁" :visible.sync="dialogVisible" append-to-body> <el-dialog :visible.sync="dialogVisible" append-to-body title="图片剪裁">
<div style="height: 500px"> <div style="height: 500px">
<vueCropper <vueCropper
ref="cropper" ref="cropper"
:img="option.img" :autoCrop="option.autoCrop"
:outputSize="option.size" :autoCropHeight="option.autoCropHeight"
:outputType="option.outputType" :autoCropWidth="option.autoCropWidth"
:info="true" :canMove="option.canMove"
:full="option.full" :canMoveBox="option.canMoveBox"
:canScale="option.canScale" :canScale="option.canScale"
:canMove="option.canMove" :centerBox="option.centerBox"
:canMoveBox="option.canMoveBox" :fixed="option.fixed"
:autoCropWidth="option.autoCropWidth" :fixedBox="option.fixedBox"
:autoCropHeight="option.autoCropHeight" :fixedNumber="option.fixedNumber"
:original="option.original" :full="option.full"
:autoCrop="option.autoCrop" :img="option.img"
:fixed="option.fixed" :info="true"
:fixedNumber="option.fixedNumber" :infoTrue="option.infoTrue"
:centerBox="option.centerBox" :original="option.original"
:infoTrue="option.infoTrue" :outputSize="option.size"
:fixedBox="option.fixedBox" :outputType="option.outputType"
/> />
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="finish">确认</el-button> <el-button type="primary" @click="finish">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="advert_title" :close-on-click-modal="false"
:close-on-click-modal="false" :close-on-press-escape="false"
:close-on-press-escape="false" :title="advert_title"
:visible.sync="bind_advert_sure" :visible.sync="bind_advert_sure"
center center
width="666px"> width="666px">
<el-form :model="editadvertinfo" <el-form :model="editadvertinfo"
label-width="180px" style="margin:0 auto;"> label-width="180px" style="margin:0 auto;">
<el-form-item label="广告名称"> <el-form-item label="广告名称">
<el-input v-model="editadvertinfo.ad_name" clearable/> <el-input v-model="editadvertinfo.ad_name" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="展示图片【高80像素】"> <el-form-item label="展示图片【高80像素】">
<el-upload <el-upload
action="#" :auto-upload="false"
drag :on-change="onUploadChange"
:show-file-list="false" :show-file-list="false"
:auto-upload="false" accept=".png , .jpg , .jpeg"
accept=".png , .jpg , .jpeg" action="#"
style="max-height: 200px" drag
:on-change="onUploadChange"> 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">
<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>
<el-form-item label="点击跳转连接"> <el-form-item label="点击跳转连接">
<el-input v-model="editadvertinfo.ad_uri" clearable/> <el-input v-model="editadvertinfo.ad_uri" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="展示权重"> <el-form-item label="展示权重">
<el-input-number v-model="editadvertinfo.weight" :min="0" :max="100" <el-input-number v-model="editadvertinfo.weight" :max="100" :min="0"
label="展示权重"/> label="展示权重"/>
</el-form-item> </el-form-item>
<el-form-item label="是否发布"> <el-form-item label="是否发布">
<el-switch <el-switch
v-model="editadvertinfo.is_enable" v-model="editadvertinfo.is_enable"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949" active-text="发布"
active-text="发布" inactive-color="#ff4949"
inactive-text="未发布"> inactive-text="未发布">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" v-model="editadvertinfo.description" <el-input v-model="editadvertinfo.description" :autosize="{ minRows: 3, maxRows: 6}"
:autosize="{ minRows: 3, maxRows: 6}"/> type="textarea"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button v-if="!disabled" @click="saveadvert">保存</el-button> <el-button v-if="!disabled" @click="saveadvert">保存</el-button>
<el-button v-if="!disabled" @click="bind_advert_sure=false,init_advertinfo()">取消</el-button> <el-button v-if="!disabled" @click="bind_advert_sure=false,init_advertinfo()">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<div> <div>
<el-input <el-input
style="width: 30%;margin-right: 30px;margin-bottom: 5px" v-model="search_key"
v-model="search_key" clearable
clearable placeholder="输入名称搜索"
placeholder="输入名称搜索"/> style="width: 30%;margin-right: 30px;margin-bottom: 5px"/>
<el-button type="primary" icon="el-icon-search" @click="handleCurrentChange(1)"> <el-button icon="el-icon-search" type="primary" @click="handleCurrentChange(1)">
搜索 搜索
</el-button> </el-button>
<div style="float: right"> <div style="float: right">
<el-button type="primary" plain @click="bind_advert_sure=true,init_advertinfo()"> <el-button plain type="primary" @click="bind_advert_sure=true,init_advertinfo()">
添加 添加
</el-button> </el-button>
</div> </div>
<el-table <el-table
:data="advert_info_list" v-loading="loading"
v-loading="loading" :data="advert_info_list"
border border
stripe stripe
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
fixed align="center"
prop="ad_name" fixed
align="center" label="名称"
label="名称"> prop="ad_name">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed align="center"
prop="ad_pic" fixed
align="center" label="展示图片"
label="展示图片"> prop="ad_pic">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.ad_pic" style="max-height: 80px;width: 100%;object-fit: cover"/> <img :src="scope.row.ad_pic" style="max-height: 80px;width: 100%;object-fit: cover"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed align="center"
prop="ad_uri" fixed
align="center" label="点击跳转连接"
label="点击跳转连接"> prop="ad_uri">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="is_enable" align="center"
label="是否发布" label="是否发布"
align="center" prop="is_enable"
width="110"> width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.is_enable === true" type="success" size="small">已发布 <el-button v-if="scope.row.is_enable === true" size="small" type="success">已发布
</el-button> </el-button>
<el-button v-else type="warning" size="small">未发布 <el-button v-else size="small" type="warning">未发布
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="weight" align="center"
width="110" label="展示权重"
align="center" prop="weight"
label="展示权重"> width="110">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:formatter="format_create_time" :formatter="format_create_time"
prop="created_time" align="center"
width="170" label="添加时间"
align="center" prop="created_time"
label="添加时间" width="170"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed="right" align="center"
label="操作" fixed="right"
align="center" label="操作"
width="150"> width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@click="handleEditAdvert(scope.row)">编辑 @click="handleEditAdvert(scope.row)">编辑
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
type="danger" type="danger"
@click="handleDeleteAdvert(scope.row)">删除 @click="handleDeleteAdvert(scope.row)">删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="margin-top: 20px;margin-bottom: 20px"> <div style="margin-top: 20px;margin-bottom: 20px">
<el-pagination <el-pagination
@size-change="handleSizeChange" :current-page.sync="pagination.currentPage"
@current-change="handleCurrentChange" :page-size="pagination.pagesize"
:current-page.sync="pagination.currentPage" :page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]" :total="pagination.total"
:page-size="pagination.pagesize" layout="total,sizes, prev, pager, next"
layout="total,sizes, prev, pager, next" @size-change="handleSizeChange"
:total="pagination.total"> @current-change="handleCurrentChange">
</el-pagination> </el-pagination>
</div> </div>
</el-main> </el-main>
</template> </template>
<script> <script>
import {advertinfo} from "@/restful"; import {advertinfo} from "@/restful";
import {VueCropper} from 'vue-cropper' import {VueCropper} from 'vue-cropper'
import {getUserInfoFun, AvatarUploadUtils, dataURLtoFile} from '@/utils' import {AvatarUploadUtils, dataURLtoFile, getUserInfoFun} from '@/utils'
export default { export default {
name: "FirUserAdvert", name: "FirUserAdvert",
components: { components: {
VueCropper, VueCropper,
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
option: { option: {
img: '', // img: '', //
info: true, // info: true, //
outputSize: 1, // outputSize: 1, //
outputType: 'jpeg', // outputType: 'jpeg', //
canScale: true, // canScale: true, //
autoCrop: true, // autoCrop: true, //
autoCropWidth: 200, // autoCropWidth: 200, //
autoCropHeight: 80, // autoCropHeight: 80, //
fixedBox: false, // fixedBox: false, //
fixed: false, // fixed: false, //
fixedNumber: [7, 2], // fixedNumber: [7, 2], //
full: true, // full: true, //
canMoveBox: true, // canMoveBox: true, //
original: false, // original: false, //
centerBox: true, // centerBox: true, //
infoTrue: true // true false infoTrue: true // true false
}, },
advert_title: '添加新宣传广告', advert_title: '添加新宣传广告',
bind_advert_sure: false, bind_advert_sure: false,
advert_info_list: [], advert_info_list: [],
search_key: "", search_key: "",
pagination: {"currentPage": 1, "total": 0, "pagesize": 10}, pagination: {"currentPage": 1, "total": 0, "pagesize": 10},
loading: false, loading: false,
editadvertinfo: {}, editadvertinfo: {},
upload_file: undefined, upload_file: undefined,
disabled: false, disabled: false,
upload_pic_b: '' upload_pic_b: ''
}
},
methods: {
finish() {
this.$refs.cropper.getCropData((data) => {
this.upload_pic_b = data;
this.upload_file = dataURLtoFile(data, this.upload_file.name);
this.dialogVisible = false;
})
},
init_advertinfo() {
this.editadvertinfo = {
'ad_name': '',
'ad_pic': '',
'ad_uri': '',
'is_enable': true,
'weight': 10
};
this.upload_file = undefined;
this.upload_pic_b = '';
},
saveadvert() {
if (this.editadvertinfo.ad_pic && this.editadvertinfo.ad_pic.indexOf("http") > -1) {
advertinfo(data => {
if (data.code === 1000) {
if (data.data && data.data.id) {
if (this.upload_file) {
this.beforeAvatarUpload(this.upload_file, data.data.id, 'update')
} else {
this.$message.success("更新成功")
}
} else {
this.$message.error("操作失败 " + data.msg)
} }
},
methods: {
finish() {
this.$refs.cropper.getCropData((data) => {
this.upload_pic_b = data;
this.upload_file = dataURLtoFile(data, this.upload_file.name);
this.dialogVisible = false;
})
},
init_advertinfo() {
this.editadvertinfo = {
'ad_name': '',
'ad_pic': '',
'ad_uri': '',
'is_enable': true,
'weight': 10
};
this.upload_file = undefined;
this.upload_pic_b = '';
},
saveadvert() {
if (this.editadvertinfo.ad_pic && this.editadvertinfo.ad_pic.indexOf("http") > -1) {
advertinfo(data => {
if (data.code === 1000) {
if (data.data && data.data.id) {
if (this.upload_file) {
this.beforeAvatarUpload(this.upload_file, data.data.id, 'update')
} else {
this.$message.success("更新成功")
}
} else {
this.$message.error("操作失败 " + data.msg)
}
} else { } else {
this.$message.error("更新失败 " + data.msg) this.$message.error("更新失败 " + data.msg)
} }
this.loading = false; this.loading = false;
}, {methods: 'PUT', data: this.editadvertinfo}) }, {methods: 'PUT', data: this.editadvertinfo})
} else { } else {
advertinfo(data => { advertinfo(data => {
if (data.code === 1000) { if (data.code === 1000) {
if (data.data && data.data.id) { if (data.data && data.data.id) {
this.beforeAvatarUpload(this.upload_file, data.data.id, 'create') this.beforeAvatarUpload(this.upload_file, data.data.id, 'create')
} else { } else {
this.$message.error("操作失败 " + data.msg) this.$message.error("操作失败 " + data.msg)
} }
} else { } else {
this.$message.error("添加失败 " + data.msg) this.$message.error("添加失败 " + data.msg)
} }
this.loading = false; this.loading = false;
}, {methods: 'POST', data: this.editadvertinfo}) }, {methods: 'POST', data: this.editadvertinfo})
} }
}, },
beforeAvatarUpload(file, id, act) { beforeAvatarUpload(file, id, act) {
return AvatarUploadUtils(this, file, { return AvatarUploadUtils(this, file, {
'app_id': this.$store.state.userinfo.uid, 'app_id': this.$store.state.userinfo.uid,
'upload_key': file.name, 'upload_key': file.name,
'ftype': 'advert', 'ftype': 'advert',
'ext': {'id': id} 'ext': {'id': id}
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
}, res => { }, res => {
this.get_data_from_tabname(); this.get_data_from_tabname();
this.upload_file = undefined; this.upload_file = undefined;
let msg = '添加成功'; let msg = '添加成功';
if (act === 'update') { if (act === 'update') {
msg = '更新成功' msg = '更新成功'
} else { } else {
this.bind_advert_sure = false; this.bind_advert_sure = false;
this.upload_pic_b = ''; this.upload_pic_b = '';
} }
this.$message.success(msg); this.$message.success(msg);
}); });
}, },
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
onUploadChange(file, fileList) { onUploadChange(file, fileList) {
this.upload_file = file.raw; this.upload_file = file.raw;
const reader = new FileReader(); const reader = new FileReader();
reader.readAsDataURL(file.raw); reader.readAsDataURL(file.raw);
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
reader.onload = res => { reader.onload = res => {
this.upload_pic_b = reader.result; this.upload_pic_b = reader.result;
this.option.img = reader.result; this.option.img = reader.result;
this.dialogVisible = true this.dialogVisible = true
}; };
}, },
copy_success() { copy_success() {
this.$message.success('复制剪切板成功'); this.$message.success('复制剪切板成功');
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pagination.pagesize = val; this.pagination.pagesize = val;
this.get_data_from_tabname({ this.get_data_from_tabname({
"size": this.pagination.pagesize, "size": this.pagination.pagesize,
"page": 1 "page": 1
}) })
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pagination.currentPage = val; this.pagination.currentPage = val;
this.get_data_from_tabname({ this.get_data_from_tabname({
"size": this.pagination.pagesize, "size": this.pagination.pagesize,
"page": this.pagination.currentPage "page": this.pagination.currentPage
}) })
}, },
handleEditAdvert(ad_info) { handleEditAdvert(ad_info) {
this.editadvertinfo = ad_info; this.editadvertinfo = ad_info;
this.upload_pic_b = ad_info.ad_pic; this.upload_pic_b = ad_info.ad_pic;
this.advert_title = "编辑广告信息"; this.advert_title = "编辑广告信息";
this.bind_advert_sure = true; this.bind_advert_sure = true;
}, },
handleDeleteAdvert(ad_info) { handleDeleteAdvert(ad_info) {
this.loading = true; this.loading = true;
advertinfo(data => { advertinfo(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.advert_info_list = data.data; this.advert_info_list = data.data;
this.pagination.total = data.count; this.pagination.total = data.count;
this.$message.success("操作成功") this.$message.success("操作成功")
} else { } else {
this.$message.error("信息获取失败") this.$message.error("信息获取失败")
} }
this.loading = false; this.loading = false;
}, {methods: 'DELETE', data: {'pk': ad_info.id}}) }, {methods: 'DELETE', data: {'pk': ad_info.id}})
}, },
get_data_from_tabname(data = {}) { get_data_from_tabname(data = {}) {
data.search_key = this.search_key.replace(/^\s+|\s+$/g, ""); data.search_key = this.search_key.replace(/^\s+|\s+$/g, "");
this.UseradvertFun(data) this.UseradvertFun(data)
}, },
UseradvertFun(params) { UseradvertFun(params) {
this.loading = true; this.loading = true;
advertinfo(data => { advertinfo(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.advert_info_list = data.data; this.advert_info_list = data.data;
this.pagination.total = data.count; this.pagination.total = data.count;
} else { } else {
this.$message.error("信息获取失败") this.$message.error("信息获取失败")
} }
this.loading = false; this.loading = false;
}, {methods: 'GET', data: params}) }, {methods: 'GET', data: params})
}, },
format_create_time(row) { format_create_time(row) {
return this.format_time(row.created_time) return this.format_time(row.created_time)
}, },
format_time(stime) { format_time(stime) {
if (stime) { if (stime) {
stime = stime.split(".")[0].split("T"); stime = stime.split(".")[0].split("T");
return stime[0] + " " + stime[1] return stime[0] + " " + stime[1]
} else } else
return ''; return '';
}, },
}, mounted() { }, mounted() {
getUserInfoFun(this); getUserInfoFun(this);
this.get_data_from_tabname(); this.get_data_from_tabname();
}, },
} }
</script> </script>
<style scoped> <style scoped>
.el-main { .el-main {
margin: 20px auto 100px; margin: 20px auto 100px;
width: 1166px; width: 1166px;
position: relative; position: relative;
padding-bottom: 1px; padding-bottom: 1px;
color: #9b9b9b; color: #9b9b9b;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
border-radius: 1%; border-radius: 1%;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
width: 178px; width: 178px;
height: 178px; height: 178px;
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
max-height: 80px; max-height: 80px;
margin-top: 50px; margin-top: 50px;
object-fit: cover; object-fit: cover;
} }
</style> </style>

@ -1,248 +1,250 @@
<template> <template>
<el-main> <el-main>
<el-dialog <el-dialog
:title="domain_title" :close-on-click-modal="false"
:close-on-click-modal="false" :close-on-press-escape="false"
:close-on-press-escape="false" :title="domain_title"
:visible.sync="bind_domain_sure" :visible.sync="bind_domain_sure"
width="666px"> width="666px">
<bind-domain v-if="bind_domain_sure" transitionName="bind-app-domain" :app_id="current_domain_info.app_id" <bind-domain v-if="bind_domain_sure" :app_id="current_domain_info.app_id" :domain_state="true"
:domain_type="current_domain_info.domain_type" :domain_state="true"/> :domain_type="current_domain_info.domain_type" transitionName="bind-app-domain"/>
</el-dialog> </el-dialog>
<div> <div>
<el-input <el-input
style="width: 30%;margin-right: 30px;margin-bottom: 5px" v-model="search_key"
v-model="search_key" clearable
clearable placeholder="输入域名或者应用名称搜索"
placeholder="输入域名或者应用名称搜索"/> style="width: 30%;margin-right: 30px;margin-bottom: 5px"/>
<el-button type="primary" icon="el-icon-search" @click="handleCurrentChange(1)"> <el-button icon="el-icon-search" type="primary" @click="handleCurrentChange(1)">
搜索 搜索
</el-button>
<div style="float: right">
<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-button>
</div>
<el-table
v-loading="loading"
:data="domain_info_list"
border
stripe
style="width: 100%">
<el-table-column
align="center"
fixed
label="绑定域名"
prop="domain_name">
<template slot-scope="scope">
<el-tooltip content="点击复制到剪贴板">
<el-link v-if="scope.row.domain_name" v-clipboard:copy="scope.row.domain_name"
v-clipboard:success="copy_success"
:underline="false">{{ scope.row.domain_name }}
</el-link>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
align="center"
label="状态"
prop="is_enable"
width="110">
<template slot-scope="scope">
<el-tooltip v-if="scope.row.is_enable === true" content="点击查看域名绑定信息" placement="left-start">
<el-button size="small" type="success" @click="show_bind_domain_info(scope.row)">已绑定
</el-button>
</el-tooltip>
<el-tooltip v-else content="激活下载域名绑定信息" placement="left-start">
<el-button size="small" type="warning" @click="show_bind_domain_info(scope.row)">继续绑定
</el-button>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
align="center"
label="域名类型"
prop="domain_type"
width="260">
<template slot-scope="scope">
<el-tooltip v-if="scope.row.domain_type===2 && scope.row.app_info" content="点击查看应用信息"
placement="right-start">
<el-button plain size="small" type="info" @click="appInfos(scope.row.app_info)">{{
format_domain_type(scope.row)
}}
</el-button>
</el-tooltip>
<el-button v-else-if="scope.row.domain_type===1" plain size="small" type="success">{{
format_domain_type(scope.row)
}}
</el-button> </el-button>
<div style="float: right"> <el-button v-else plain size="small" type="primary">{{ format_domain_type(scope.row) }}
<el-button type="primary" plain @click="$store.dispatch('dodomainaction', 1)"> </el-button>
设置下载页域名
</el-button> </template>
<el-button type="primary" plain v-if="$store.state.userinfo&&$store.state.userinfo.role >1" </el-table-column>
@click="$store.dispatch('dodomainaction', 2)">
设置下载码域名 <el-table-column
</el-button> :formatter="format_create_time"
</div> align="center"
label="域名绑定时间"
prop="created_time"
<el-table width="170"
:data="domain_info_list" >
v-loading="loading" </el-table-column>
border </el-table>
stripe
style="width: 100%">
</div>
<el-table-column <div style="margin-top: 20px;margin-bottom: 20px">
fixed <el-pagination
prop="domain_name" :current-page.sync="pagination.currentPage"
align="center" :page-size="pagination.pagesize"
label="绑定域名"> :page-sizes="[10, 20, 50, 100]"
<template slot-scope="scope"> :total="pagination.total"
<el-tooltip content="点击复制到剪贴板"> layout="total,sizes, prev, pager, next"
<el-link v-if="scope.row.domain_name" :underline="false" @size-change="handleSizeChange"
v-clipboard:copy="scope.row.domain_name" @current-change="handleCurrentChange">
v-clipboard:success="copy_success">{{ scope.row.domain_name }} </el-pagination>
</el-link> </div>
</el-tooltip> </el-main>
</template>
</el-table-column>
<el-table-column
prop="is_enable"
label="状态"
align="center"
width="110">
<template slot-scope="scope">
<el-tooltip content="点击查看域名绑定信息" v-if="scope.row.is_enable === true" placement="left-start">
<el-button type="success" size="small" @click="show_bind_domain_info(scope.row)">已绑定
</el-button>
</el-tooltip>
<el-tooltip content="激活下载域名绑定信息" v-else placement="left-start">
<el-button type="warning" size="small" @click="show_bind_domain_info(scope.row)">继续绑定
</el-button>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
prop="domain_type"
align="center"
label="域名类型"
width="260">
<template slot-scope="scope">
<el-tooltip content="点击查看应用信息" v-if="scope.row.domain_type===2 && scope.row.app_info"
placement="right-start">
<el-button type="info" plain size="small" @click="appInfos(scope.row.app_info)">{{
format_domain_type(scope.row) }}
</el-button>
</el-tooltip>
<el-button v-else-if="scope.row.domain_type===1" type="success" plain size="small">{{
format_domain_type(scope.row) }}
</el-button>
<el-button v-else type="primary" plain size="small">{{ format_domain_type(scope.row) }}
</el-button>
</template>
</el-table-column>
<el-table-column
:formatter="format_create_time"
prop="created_time"
width="170"
align="center"
label="域名绑定时间"
>
</el-table-column>
</el-table>
</div>
<div style="margin-top: 20px;margin-bottom: 20px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pagination.currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="pagination.pagesize"
layout="total,sizes, prev, pager, next"
:total="pagination.total">
</el-pagination>
</div>
</el-main>
</template> </template>
<script> <script>
import {domaininfo} from "@/restful"; import {domaininfo} from "@/restful";
import BindDomain from "@/components/base/BindDomain"; import BindDomain from "@/components/base/BindDomain";
import {getUserInfoFun} from '@/utils' import {getUserInfoFun} from '@/utils'
export default { export default {
name: "FirUserDomain", name: "FirUserDomain",
components: {BindDomain}, components: {BindDomain},
data() { data() {
return { return {
domain_title: '绑定应用专属下载页域名', domain_title: '绑定应用专属下载页域名',
bind_domain_sure: false, bind_domain_sure: false,
domain_info_list: [], domain_info_list: [],
search_key: "", search_key: "",
pagination: {"currentPage": 1, "total": 0, "pagesize": 10}, pagination: {"currentPage": 1, "total": 0, "pagesize": 10},
domain_type_choices: [], domain_type_choices: [],
current_domain_info: {'domain_type': 1, 'app_id': null}, current_domain_info: {'domain_type': 1, 'app_id': null},
loading: false, loading: false,
}
},
methods: {
show_bind_domain_info(domain_info) {
this.bind_domain_sure = true;
let app_id = null;
if (domain_info.app_info && domain_info.app_info.app_id) {
app_id = domain_info.app_info.app_id;
}
this.current_domain_info.app_id = app_id;
this.current_domain_info.domain_type = domain_info.domain_type;
this.domain_title = this.format_domain_type(domain_info) + ' 绑定详情';
},
appInfos(app_info) {
if (app_info && app_info.app_id) {
this.$router.push({name: 'FirAppInfossecurity', params: {id: app_info.app_id}})
}
},
copy_success() {
this.$message.success('复制剪切板成功');
},
handleSizeChange(val) {
this.pagination.pagesize = val;
this.get_data_from_tabname({
"size": this.pagination.pagesize,
"page": 1
})
},
handleCurrentChange(val) {
this.pagination.currentPage = val;
this.get_data_from_tabname({
"size": this.pagination.pagesize,
"page": this.pagination.currentPage
})
},
get_data_from_tabname(data = {}) {
data.search_key = this.search_key.replace(/^\s+|\s+$/g, "");
this.UserDomainFun(data)
},
UserDomainFun(params) {
this.loading = true;
domaininfo(data => {
if (data.code === 1000) {
this.domain_info_list = data.data;
this.pagination.total = data.count;
this.domain_type_choices = data.domain_type_choices;
} else {
this.$message.error("域名绑定信息获取失败")
}
this.loading = false;
}, {methods: 'GET', data: params})
},
format_choices(key, obj) {
for (let i = 0; i < obj.length; i++) {
if (key === obj[i].id) {
return obj[i].name
}
}
return "未知"
},
format_domain_type(row) {
if (row.domain_type === 2) {
return "应用" + row.app_info.name + "域名"
}
return this.format_choices(row.domain_type, this.domain_type_choices)
},
format_create_time(row) {
return this.format_time(row.created_time)
},
format_time(stime) {
if (stime) {
stime = stime.split(".")[0].split("T");
return stime[0] + " " + stime[1]
} else
return '';
},
}, mounted() {
getUserInfoFun(this);
this.get_data_from_tabname();
}, watch: {
'$store.state.domian_show_state': function () {
if (this.$store.state.domian_show_state) {
this.bind_domain_sure = false;
this.get_data_from_tabname();
}
},
}
} }
},
methods: {
show_bind_domain_info(domain_info) {
this.bind_domain_sure = true;
let app_id = null;
if (domain_info.app_info && domain_info.app_info.app_id) {
app_id = domain_info.app_info.app_id;
}
this.current_domain_info.app_id = app_id;
this.current_domain_info.domain_type = domain_info.domain_type;
this.domain_title = this.format_domain_type(domain_info) + ' 绑定详情';
},
appInfos(app_info) {
if (app_info && app_info.app_id) {
this.$router.push({name: 'FirAppInfossecurity', params: {id: app_info.app_id}})
}
},
copy_success() {
this.$message.success('复制剪切板成功');
},
handleSizeChange(val) {
this.pagination.pagesize = val;
this.get_data_from_tabname({
"size": this.pagination.pagesize,
"page": 1
})
},
handleCurrentChange(val) {
this.pagination.currentPage = val;
this.get_data_from_tabname({
"size": this.pagination.pagesize,
"page": this.pagination.currentPage
})
},
get_data_from_tabname(data = {}) {
data.search_key = this.search_key.replace(/^\s+|\s+$/g, "");
this.UserDomainFun(data)
},
UserDomainFun(params) {
this.loading = true;
domaininfo(data => {
if (data.code === 1000) {
this.domain_info_list = data.data;
this.pagination.total = data.count;
this.domain_type_choices = data.domain_type_choices;
} else {
this.$message.error("域名绑定信息获取失败")
}
this.loading = false;
}, {methods: 'GET', data: params})
},
format_choices(key, obj) {
for (let i = 0; i < obj.length; i++) {
if (key === obj[i].id) {
return obj[i].name
}
}
return "未知"
},
format_domain_type(row) {
if (row.domain_type === 2) {
return "应用" + row.app_info.name + "域名"
}
return this.format_choices(row.domain_type, this.domain_type_choices)
},
format_create_time(row) {
return this.format_time(row.created_time)
},
format_time(stime) {
if (stime) {
stime = stime.split(".")[0].split("T");
return stime[0] + " " + stime[1]
} else
return '';
},
}, mounted() {
getUserInfoFun(this);
this.get_data_from_tabname();
}, watch: {
'$store.state.domian_show_state': function () {
if (this.$store.state.domian_show_state) {
this.bind_domain_sure = false;
this.get_data_from_tabname();
}
},
}
}
</script> </script>
<style scoped> <style scoped>
.el-main { .el-main {
margin: 20px auto 100px; margin: 20px auto 100px;
width: 1166px; width: 1166px;
position: relative; position: relative;
padding-bottom: 1px; padding-bottom: 1px;
color: #9b9b9b; color: #9b9b9b;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
border-radius: 1%; border-radius: 1%;
} }
</style> </style>

@ -1,507 +1,508 @@
<template> <template>
<el-main> <el-main>
<el-dialog <el-dialog
:visible.sync="wx_pay" :close-on-click-modal="false"
width="49%" :close-on-press-escape="false"
:close-on-click-modal="false" :visible.sync="wx_pay"
:close-on-press-escape="false" center
center> width="49%">
<div slot="title" style="margin-bottom: 10px"> <div slot="title" style="margin-bottom: 10px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<p class="detail">请在<span style="color: #f89303">24小时</span>内完成支付超时订单将自动取消</p> <p class="detail">请在<span style="color: #f89303">24小时</span>内完成支付超时订单将自动取消</p>
<p class="detail">支付订单号 <span>{{ current_order_info.order_number }}</span></p> <p class="detail">支付订单号 <span>{{ current_order_info.order_number }}</span></p>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<p style="margin-top: 26px"><span class="order_text">订单金额</span><span class="amount">{{format_actual_amount(current_order_info) }}</span> <p style="margin-top: 26px"><span class="order_text">订单金额</span><span
</p> class="amount">{{ format_actual_amount(current_order_info) }}</span>
</el-col> </p>
</el-col>
</el-row>
</el-row>
</div>
<div class="pay_wx"> </div>
<div> <div class="pay_wx">
<div class="icon-weixin" :style="{background:`url(${pay_image.order_wx}) 0 0/100%`}"></div> <div>
<vue-qr :margin="qrinfo.margin" <div :style="{background:`url(${pay_image.order_wx}) 0 0/100%`}" class="icon-weixin"></div>
class="code-wrap" <vue-qr ref="qr"
:logoScale="qrinfo.logoScale" :correctLevel="qrinfo.correctLevel"
:logoCornerRadius="qrinfo.logoCornerRadius" :logoCornerRadius="qrinfo.logoCornerRadius"
:correctLevel="qrinfo.correctLevel" :logoScale="qrinfo.logoScale"
:text="pay_code_url" :size="266" :margin="qrinfo.margin"
ref="qr"> :size="266" :text="pay_code_url"
</vue-qr> class="code-wrap">
<div class="tip-btn pay_wx"><span class="icon" :style="{backgroundImage:`url(${pay_image.scan})`}"/><span </vue-qr>
class="text">请使用微信扫码支付</span></div> <div class="tip-btn pay_wx"><span :style="{backgroundImage:`url(${pay_image.scan})`}" class="icon"/><span
<p style="margin-top: 30px">支付完成之后请刷新该页面确认支付状态</p> class="text">请使用微信扫码支付</span></div>
</div> <p style="margin-top: 30px">支付完成之后请刷新该页面确认支付状态</p>
</div> </div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
:visible.sync="show_order_info" <el-dialog
width="780px" :close-on-click-modal="false"
:close-on-click-modal="false" :close-on-press-escape="false"
:close-on-press-escape="false" :visible.sync="show_order_info"
title="订单详情" center
top="6vh" title="订单详情"
center> top="6vh"
<div> width="780px">
<div>
<el-form :model="current_order_info"
label-width="80px" style="margin:0 auto;"> <el-form :model="current_order_info"
label-width="80px" style="margin:0 auto;">
<el-form-item label-width="110px" label="平台订单ID">
<el-input :value="current_order_info.order_number"/> <el-form-item label="平台订单ID" label-width="110px">
</el-form-item> <el-input :value="current_order_info.order_number"/>
</el-form-item>
<el-form-item label-width="110px" label="第三方订单ID">
<el-input :value="current_order_info.payment_number"/> <el-form-item label="第三方订单ID" label-width="110px">
</el-form-item> <el-input :value="current_order_info.payment_number"/>
</el-form-item>
<el-form-item label-width="110px" label="付款方式">
<el-input :value="format_payment_type(current_order_info)"/> <el-form-item label="付款方式" label-width="110px">
</el-form-item> <el-input :value="format_payment_type(current_order_info)"/>
<el-form-item label-width="110px" label="订单状态"> </el-form-item>
<el-input :value="format_status_type(current_order_info)"/> <el-form-item label="订单状态" label-width="110px">
</el-form-item> <el-input :value="format_status_type(current_order_info)"/>
</el-form-item>
<el-form-item label-width="110px" label="订单类型">
<el-input :value="format_order_type(current_order_info)"/> <el-form-item label="订单类型" label-width="110px">
</el-form-item> <el-input :value="format_order_type(current_order_info)"/>
<el-form-item label-width="110px" label="实付金额"> </el-form-item>
<el-input :value="format_actual_amount(current_order_info)"/> <el-form-item label="实付金额" label-width="110px">
</el-form-item> <el-input :value="format_actual_amount(current_order_info)"/>
</el-form-item>
<el-form-item label-width="110px" label="购买数量">
<el-input <el-form-item label="购买数量" label-width="110px">
:value="current_order_info.actual_download_times"/> <el-input
</el-form-item> :value="current_order_info.actual_download_times"/>
</el-form-item>
<el-form-item label-width="110px" label="赠送数量"> <el-form-item label="赠送数量" label-width="110px">
<el-input <el-input
:value="current_order_info.actual_download_gift_times"/> :value="current_order_info.actual_download_gift_times"/>
</el-form-item> </el-form-item>
<el-form-item label-width="110px" label="订单创建时间"> <el-form-item label="订单创建时间" label-width="110px">
<el-input :value="format_create_time(current_order_info)"/> <el-input :value="format_create_time(current_order_info)"/>
</el-form-item> </el-form-item>
<el-form-item label-width="110px" label="订单支付时间"> <el-form-item label="订单支付时间" label-width="110px">
<el-input :value="format_pay_time(current_order_info)"/> <el-input :value="format_pay_time(current_order_info)"/>
</el-form-item> </el-form-item>
<el-form-item label-width="110px" label="订单取消时间"> <el-form-item label="订单取消时间" label-width="110px">
<el-input :value="format_cancel_time(current_order_info)"/> <el-input :value="format_cancel_time(current_order_info)"/>
</el-form-item> </el-form-item>
<el-form-item label-width="110px" label="备注"> <el-form-item label="备注" label-width="110px">
<el-input :value="current_order_info.description"/> <el-input :value="current_order_info.description"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<span slot="footer"> <span slot="footer">
<el-button @click="$router.push({'name':'FirContact'})"> 如对充值订单有疑问请联系我们</el-button> <el-button @click="$router.push({'name':'FirContact'})"> 如对充值订单有疑问请联系我们</el-button>
</span> </span>
</el-dialog> </el-dialog>
<div>
<el-input
v-model="order_id_seach"
clearable
placeholder="输入订单ID"
style="width: 30%;margin-right: 30px;margin-bottom: 5px"/>
<el-button icon="el-icon-search" type="primary" @click="handleCurrentChange(1)">
搜索
</el-button>
<el-table
v-loading="loading"
:data="order_info_list"
border
stripe
style="width: 100%">
<el-table-column
fixed
label="系统订单ID"
prop="order_number">
</el-table-column>
<el-table-column
align="center"
label="状态"
prop="status"
width="110">
<template slot-scope="scope">
<div v-if="scope.row.status === 1 || scope.row.status === 2">
<el-button size="small"
type="primary" @click="goto_pay(scope.row)"> {{ format_status_type(scope.row) }}
</el-button>
</div>
<div v-else-if="scope.row.status === 0">
<el-button size="small"
type="success" @click="click_order_info(scope.row)"> {{ format_status_type(scope.row) }}
</el-button>
</div>
<div v-else-if="scope.row.status === 4 || scope.row.status ===5|| scope.row.status ===6">
<el-button size="small"
type="danger" @click="click_order_info(scope.row)"> {{ format_status_type(scope.row) }}
</el-button>
</div>
<div v-else>
<el-button size="small"
type="warning" @click="click_order_info(scope.row)"> {{ format_status_type(scope.row) }}
</el-button>
</div>
<div> </template>
<el-input
style="width: 30%;margin-right: 30px;margin-bottom: 5px" </el-table-column>
v-model="order_id_seach"
clearable <el-table-column
placeholder="输入订单ID"/> :formatter="format_actual_amount"
<el-button type="primary" icon="el-icon-search" @click="handleCurrentChange(1)"> label="实付金额"
搜索 prop="actual_amount"
width="100">
</el-table-column>
<el-table-column
label="购买数量"
prop="actual_download_times"
width="120">
</el-table-column>
<el-table-column
label="赠送数量"
prop="actual_download_gift_times"
width="90">
</el-table-column>
<el-table-column
:formatter="format_payment_type"
align="center"
label="支付方式"
prop="payment_type"
width="80">
</el-table-column>
<el-table-column
:formatter="format_create_time"
align="center"
label="订单创建时间"
prop="created_time"
width="170"
>
</el-table-column>
<el-table-column
fixed="right"
label="查看详细"
width="145">
<template slot-scope="scope">
<el-button
size="mini"
@click="click_order_info(scope.row)">详情
</el-button> </el-button>
<el-button v-if="scope.row.status === 1 || scope.row.status === 2"
<el-table size="mini" type="danger"
:data="order_info_list" @click="cancel_order(scope.row)">取消
v-loading="loading" </el-button>
border </template>
stripe </el-table-column>
style="width: 100%"> </el-table>
<el-table-column
fixed </div>
prop="order_number" <div style="margin-top: 20px;margin-bottom: 20px">
label="系统订单ID"> <el-pagination
:current-page.sync="pagination.currentPage"
</el-table-column> :page-size="pagination.pagesize"
:page-sizes="[10, 20, 50, 100]"
<el-table-column :total="pagination.total"
prop="status" layout="total,sizes, prev, pager, next"
label="状态" @size-change="handleSizeChange"
align="center" @current-change="handleCurrentChange">
width="110"> </el-pagination>
</div>
<template slot-scope="scope"> </el-main>
<div v-if="scope.row.status === 1 || scope.row.status === 2">
<el-button @click="goto_pay(scope.row)"
type="primary" size="small"> {{ format_status_type(scope.row)}}
</el-button>
</div>
<div v-else-if="scope.row.status === 0">
<el-button @click="click_order_info(scope.row)"
type="success" size="small"> {{ format_status_type(scope.row)}}
</el-button>
</div>
<div v-else-if="scope.row.status === 4 || scope.row.status ===5|| scope.row.status ===6">
<el-button @click="click_order_info(scope.row)"
type="danger" size="small"> {{ format_status_type(scope.row)}}
</el-button>
</div>
<div v-else>
<el-button @click="click_order_info(scope.row)"
type="warning" size="small"> {{ format_status_type(scope.row)}}
</el-button>
</div>
</template>
</el-table-column>
<el-table-column
:formatter="format_actual_amount"
prop="actual_amount"
label="实付金额"
width="100">
</el-table-column>
<el-table-column
prop="actual_download_times"
label="购买数量"
width="120">
</el-table-column>
<el-table-column
prop="actual_download_gift_times"
label="赠送数量"
width="90">
</el-table-column>
<el-table-column
:formatter="format_payment_type"
prop="payment_type"
align="center"
label="支付方式"
width="80">
</el-table-column>
<el-table-column
:formatter="format_create_time"
prop="created_time"
width="170"
align="center"
label="订单创建时间"
>
</el-table-column>
<el-table-column
fixed="right"
label="查看详细"
width="145">
<template slot-scope="scope">
<el-button
size="mini"
@click="click_order_info(scope.row)">详情
</el-button>
<el-button v-if="scope.row.status === 1 || scope.row.status === 2"
size="mini" type="danger"
@click="cancel_order(scope.row)">取消
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-top: 20px;margin-bottom: 20px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pagination.currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="pagination.pagesize"
layout="total,sizes, prev, pager, next"
:total="pagination.total">
</el-pagination>
</div>
</el-main>
</template> </template>
<script> <script>
import {my_order} from "@/restful"; import {my_order} from "@/restful";
import {getUserInfoFun} from '@/utils' import {getUserInfoFun} from '@/utils'
import VueQr from 'vue-qr'; import VueQr from 'vue-qr';
export default { export default {
name: "FirUserOrders", name: "FirUserOrders",
components: { components: {
VueQr VueQr
}, },
data() { data() {
return { return {
wx_pay: false, wx_pay: false,
pay_code_url: '', pay_code_url: '',
pay_image: { pay_image: {
'scan': require('@/assets/pay/pay-scan.png'), 'scan': require('@/assets/pay/pay-scan.png'),
'order_wx': require('@/assets/pay/order-weixin.png'), 'order_wx': require('@/assets/pay/order-weixin.png'),
}, },
qrinfo: { qrinfo: {
logoScale: 0.3, logoScale: 0.3,
logoCornerRadius: 12, logoCornerRadius: 12,
correctLevel: 3, correctLevel: 3,
margin: 20 margin: 20
}, },
order_info_list: [], order_info_list: [],
order_id_seach: "", order_id_seach: "",
pagination: {"currentPage": 1, "total": 0, "pagesize": 10}, pagination: {"currentPage": 1, "total": 0, "pagesize": 10},
order_type_choices: [], order_type_choices: [],
status_choices: [], status_choices: [],
payment_type_choices: [], payment_type_choices: [],
show_order_info: false, show_order_info: false,
current_order_info: {}, current_order_info: {},
loading: false, loading: false,
}
},
methods: {
cancel_order(order) {
my_order(res => {
if (res.code === 1000) {
this.$message.success("操作成功");
this.get_data_from_tabname({
"size": this.pagination.pagesize,
"page": this.pagination.currentPage
})
} else {
this.$message.error("失败了 " + res.msg)
}
}, {
methods: 'PUT', data: {order_number: order.order_number, act: 'cancel'},
})
},
goto_pay(order) {
this.current_order_info = order;
my_order(res => {
if (res.code === 1000) {
let data = res.data;
if (data && data.url) {
if (data && data.type === 'WX') {
this.pay_code_url = data.url;
this.wx_pay = true;
this.$message.success("请用微信扫描支付");
} else if (data && data.type === 'ALI') {
let pay_url = data.url;
if (pay_url && pay_url.length > 10) {
this.$message.success("正在跳转支付宝支付平台");
window.location.href = pay_url
// window.open(pay_url, '_blank', '');
}
} else {
this.$message.error("支付获取失败 " + res.msg)
} }
}, } else {
methods: { this.$message.error("下订单异常,请联系管理员");
cancel_order(order) { }
my_order(res => { } else {
if (res.code === 1000) { this.$message.error("失败了 " + res.msg)
this.$message.success("操作成功"); }
this.get_data_from_tabname({ }, {
"size": this.pagination.pagesize, methods: 'POST', data: {order_number: order.order_number},
"page": this.pagination.currentPage })
}) },
} else { click_order_info(order) {
this.$message.error("失败了 " + res.msg) if (order.status === 1 || order.status === 2) {
} my_order(res => {
}, { if (res.code === 1000) {
methods: 'PUT', data: {order_number: order.order_number, act: 'cancel'}, this.get_data_from_tabname()
}) } else {
}, this.$message.error("失败了 " + res.msg)
goto_pay(order) { }
this.current_order_info = order; }, {
my_order(res => { methods: 'PUT', data: {order_number: order.order_number, act: 'status'},
if (res.code === 1000) { });
let data = res.data; }
if (data && data.url) { this.show_order_info = true;
this.current_order_info = order;
if (data && data.type === 'WX') {
this.pay_code_url = data.url; },
this.wx_pay = true; handleSizeChange(val) {
this.$message.success("请用微信扫描支付"); this.pagination.pagesize = val;
} else if (data && data.type === 'ALI') { this.get_data_from_tabname({
let pay_url = data.url; "size": this.pagination.pagesize,
if (pay_url && pay_url.length > 10) { "page": 1
this.$message.success("正在跳转支付宝支付平台"); })
window.location.href = pay_url },
// window.open(pay_url, '_blank', ''); handleCurrentChange(val) {
} this.pagination.currentPage = val;
} else { this.get_data_from_tabname({
this.$message.error("支付获取失败 " + res.msg) "size": this.pagination.pagesize,
} "page": this.pagination.currentPage
} else { })
this.$message.error("下订单异常,请联系管理员"); },
}
} else { get_data_from_tabname(data = {}) {
this.$message.error("失败了 " + res.msg) data.order_id = this.order_id_seach.replace(/^\s+|\s+$/g, "");
} this.MyOrderFun(data)
}, { },
methods: 'POST', data: {order_number: order.order_number},
}) format_choices(key, obj) {
}, for (let i = 0; i < obj.length; i++) {
click_order_info(order) { if (key === obj[i].id) {
if (order.status === 1 || order.status === 2) { return obj[i].name
my_order(res => { }
if (res.code === 1000) { }
this.get_data_from_tabname() return "未知"
} else { },
this.$message.error("失败了 " + res.msg)
} format_payment_type(row) {
}, { return this.format_choices(row.payment_type, this.payment_type_choices)
methods: 'PUT', data: {order_number: order.order_number, act: 'status'}, },
});
} format_status_type(row) {
this.show_order_info = true; return this.format_choices(row.status, this.status_choices)
this.current_order_info = order; },
}, format_order_type(row) {
handleSizeChange(val) { return this.format_choices(row.order_type, this.order_type_choices)
this.pagination.pagesize = val; },
this.get_data_from_tabname({
"size": this.pagination.pagesize, format_actual_amount(row) {
"page": 1 return '¥ ' + (row.actual_amount / 100).toString()
}) },
},
handleCurrentChange(val) { format_create_time(row) {
this.pagination.currentPage = val; return this.format_time(row.created_time)
this.get_data_from_tabname({ },
"size": this.pagination.pagesize,
"page": this.pagination.currentPage format_pay_time(row) {
}) return this.format_time(row.pay_time)
}, },
get_data_from_tabname(data = {}) { format_cancel_time(row) {
data.order_id = this.order_id_seach.replace(/^\s+|\s+$/g, ""); return this.format_time(row.cancel_time)
this.MyOrderFun(data) },
},
format_time(stime) {
format_choices(key, obj) { if (stime) {
for (let i = 0; i < obj.length; i++) { stime = stime.split(".")[0].split("T");
if (key === obj[i].id) { return stime[0] + " " + stime[1]
return obj[i].name } else
} return '';
} },
return "未知" MyOrderFun(params) {
}, this.loading = true;
my_order(data => {
format_payment_type(row) { if (data.code === 1000) {
return this.format_choices(row.payment_type, this.payment_type_choices) this.order_info_list = data.data;
}, this.pagination.total = data.count;
this.payment_type_choices = data.payment_type_choices;
format_status_type(row) { this.status_choices = data.status_choices;
return this.format_choices(row.status, this.status_choices) this.order_type_choices = data.order_type_choices;
}, if (this.order_info_list.length === 1) {
this.current_order_info = this.order_info_list[0];
format_order_type(row) {
return this.format_choices(row.order_type, this.order_type_choices)
},
format_actual_amount(row) {
return '¥ ' + (row.actual_amount / 100).toString()
},
format_create_time(row) {
return this.format_time(row.created_time)
},
format_pay_time(row) {
return this.format_time(row.pay_time)
},
format_cancel_time(row) {
return this.format_time(row.cancel_time)
},
format_time(stime) {
if (stime) {
stime = stime.split(".")[0].split("T");
return stime[0] + " " + stime[1]
} else
return '';
},
MyOrderFun(params) {
this.loading = true;
my_order(data => {
if (data.code === 1000) {
this.order_info_list = data.data;
this.pagination.total = data.count;
this.payment_type_choices = data.payment_type_choices;
this.status_choices = data.status_choices;
this.order_type_choices = data.order_type_choices;
if (this.order_info_list.length === 1) {
this.current_order_info = this.order_info_list[0];
let out_trade_no = this.$route.params.out_trade_no;
if (out_trade_no) {
this.goto_pay(this.current_order_info);
this.$route.params.out_trade_no = undefined;
}
}
} else if (data.code === 1008) {
this.$message.error(data.msg);
} else {
this.$message.error("操作失败")
}
this.loading = false;
}, {methods: 'GET', data: params})
},
}, mounted() {
getUserInfoFun(this);
let out_trade_no = this.$route.params.out_trade_no; let out_trade_no = this.$route.params.out_trade_no;
if (out_trade_no) { if (out_trade_no) {
this.order_id_seach = out_trade_no; this.goto_pay(this.current_order_info);
this.$route.params.out_trade_no = undefined;
} }
this.get_data_from_tabname(); }
}, filters: {} } else if (data.code === 1008) {
this.$message.error(data.msg);
} else {
this.$message.error("操作失败")
}
this.loading = false;
}, {methods: 'GET', data: params})
},
}, mounted() {
getUserInfoFun(this);
let out_trade_no = this.$route.params.out_trade_no;
if (out_trade_no) {
this.order_id_seach = out_trade_no;
} }
this.get_data_from_tabname();
}, filters: {}
}
</script> </script>
<style scoped> <style scoped>
.el-main { .el-main {
margin: 20px auto 100px; margin: 20px auto 100px;
width: 1166px; width: 1166px;
position: relative; position: relative;
padding-bottom: 1px; padding-bottom: 1px;
color: #9b9b9b; color: #9b9b9b;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
border-radius: 1%; border-radius: 1%;
} }
.icon-weixin { .icon-weixin {
width: 137px; width: 137px;
height: 35px; height: 35px;
margin-left: 50px; margin-left: 50px;
} }
.code-wrap { .code-wrap {
width: 240px; width: 240px;
height: 240px; height: 240px;
border: 1px solid #c3c3c3; border: 1px solid #c3c3c3;
margin-top: 23px; margin-top: 23px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.tip-btn { .tip-btn {
background: #2bbc4d; background: #2bbc4d;
width: 240px; width: 240px;
height: 60px; height: 60px;
} }
.icon { .icon {
width: 26px; width: 26px;
height: 26px; height: 26px;
background-size: 100%; background-size: 100%;
display: inline-block; display: inline-block;
margin-right: 11px; margin-right: 11px;
} }
.text { .text {
font-family: PingFang-SC-Bold; font-family: PingFang-SC-Bold;
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
letter-spacing: -.1px; letter-spacing: -.1px;
} }
.pay_wx { .pay_wx {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.order_text { .order_text {
font-family: PingFang-SC-Medium; font-family: PingFang-SC-Medium;
font-size: 14px; font-size: 14px;
color: #787e85; color: #787e85;
letter-spacing: 0; letter-spacing: 0;
vertical-align: text-top; vertical-align: text-top;
} }
.amount { .amount {
font-family: Avenir-Heavy; font-family: Avenir-Heavy;
font-size: 24px; font-size: 24px;
color: #ff8000; color: #ff8000;
letter-spacing: 0; letter-spacing: 0;
} }
</style> </style>

@ -1,205 +1,205 @@
<template> <template>
<div class="main"> <div class="main">
<div class="user-info"> <div class="user-info">
<el-upload <el-upload
class="avatar-uploader" :before-upload="beforeAvatarUpload"
action="#" :show-file-list="false"
:show-file-list="false" accept=".png , .jpg , .jpeg"
accept=".png , .jpg , .jpeg" action="#"
:before-upload="beforeAvatarUpload"> class="avatar-uploader">
<img v-if="imageUrl" :src="imageUrl" class="avatar"> <img v-if="imageUrl" :src="imageUrl" class="avatar">
<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>
<div class="name"> <div class="name">
<input v-model="userinfo.first_name" maxlength="8" @focusout="update_name"> <input v-model="userinfo.first_name" maxlength="8" @focusout="update_name">
</div> </div>
<div class="user_pro_tabs"> <div class="user_pro_tabs">
<el-row :gutter="12" class="row"> <el-row :gutter="12" class="row">
<el-col :span="tspan" :offset="3"> <el-col :offset="3" :span="tspan">
<div class="col-4"> <div class="col-4">
<a @click="$router.push({name:'FirUserProfileInfo'})" ref="userinfo" class=""> <a ref="userinfo" class="" @click="$router.push({name:'FirUserProfileInfo'})">
<span> <span>
<i class="el-icon-user"></i> <i class="el-icon-user"></i>
</span> </span>
个人资料 个人资料
</a> </a>
</div>
</el-col>
<el-col :span="tspan">
<div class="col-4">
<a ref="changepwd" class="" @click="$router.push({name:'FirUserProfileChangePwd'})">
<span><i class="el-icon-lock"></i></span>
修改密码
</a>
</div>
</el-col>
<el-col :span="6">
<div class="col-4">
<a ref="storage" class="" @click="$router.push({name:'FirUserProfileCertification'})">
<span><i class="el-icon-coin"></i></span>
实名认证
</a>
</div>
</el-col>
</el-row>
</div> </div>
<div style="margin-top: 50px"> </el-col>
<router-view></router-view> <el-col :span="tspan">
<div class="col-4">
<a ref="changepwd" class="" @click="$router.push({name:'FirUserProfileChangePwd'})">
<span><i class="el-icon-lock"></i></span>
修改密码
</a>
</div> </div>
</div> </el-col>
</div>
</template>
<script> <el-col :span="6">
import {getuserpicurl, userinfos} from '@/restful'; <div class="col-4">
import {AvatarUploadUtils} from "@/utils"; <a ref="storage" class="" @click="$router.push({name:'FirUserProfileCertification'})">
<span><i class="el-icon-coin"></i></span>
export default { 实名认证
name: "FirUserProfileBase", </a>
data() { </div>
return {
imageUrl: '',
userinfo: {},
uploadconf: {},
tspan: 6,
}
},
methods: {
updateUserInfo(datainfo) {
userinfos(data => {
if (data.code === 1000) {
this.userinfo = data.data;
this.$store.dispatch("doUserinfo", data.data);
this.$store.dispatch('doucurrentapp', {});
this.imageUrl = data.data.head_img;
if (datainfo.data) {
this.$message.success("更新成功")
}
} else {
this.$message.error("更新失败")
}
}, datainfo)
},
update_name() {
this.updateUserInfo({"methods": 'PUT', 'data': {"first_name": this.userinfo.first_name}});
},
beforeAvatarUpload(file) {
return AvatarUploadUtils(this, file, {
'app_id': this.userinfo.uid,
'upload_key': file.name,
'ftype': 'head'
// eslint-disable-next-line no-unused-vars
}, res => {
this.updateUserInfo({"methods": 'GET'});
});
},
setfunactive(item) {
for (let key in this.$refs) {
if (key === item) {
this.$refs[key].classList.add('active');
} else {
this.$refs[key].classList.remove('active');
}
}
},
autoSetInfoIndex() {
if (this.$store.state.userInfoIndex === 0) {
this.setfunactive('userinfo');
} else if (this.$store.state.userInfoIndex === 1) {
this.setfunactive('changepwd');
} else if (this.$store.state.userInfoIndex === 2) {
this.setfunactive('storage');
}
}
}, mounted() {
this.autoSetInfoIndex();
this.updateUserInfo({"methods": 'GET'});
}, watch: {
'$store.state.userInfoIndex': function () {
this.autoSetInfoIndex();
},
}, filters: {}, computed: {
getuppicurl() {
return getuserpicurl()
}
}
}
</script>
<style scoped> </el-col>
.main {
position: relative;
padding-bottom: 1px;
color: #9b9b9b;
-webkit-font-smoothing: antialiased;
border-radius: 1%;
}
.user-info { </el-row>
position: relative;
text-align: center;
margin: 46px auto 100px;
width: 1166px;
}
.avatar { </div>
height: 100px; <div style="margin-top: 50px">
width: 100px; <router-view></router-view>
border-radius: 50%; </div>
display: block;
}
.name { </div>
text-align: center;
padding-bottom: 20px;
} </div>
</template>
.name input { <script>
text-align: center; import {getuserpicurl, userinfos} from '@/restful';
color: #889eff; import {AvatarUploadUtils} from "@/utils";
margin: 36px auto 0;
width: 280px; export default {
padding: 0; name: "FirUserProfileBase",
border: none; data() {
background-color: transparent; return {
font-size: 30px; imageUrl: '',
userinfo: {},
uploadconf: {},
tspan: 6,
} }
},
.user_pro_tabs a { methods: {
width: 100%; updateUserInfo(datainfo) {
font-size: 16px; userinfos(data => {
text-align: center; if (data.code === 1000) {
display: inline-block; this.userinfo = data.data;
line-height: 48px; this.$store.dispatch("doUserinfo", data.data);
height: 48px; this.$store.dispatch('doucurrentapp', {});
border-bottom: 1px solid #BABFC3; this.imageUrl = data.data.head_img;
text-decoration: none; if (datainfo.data) {
color: #BABFC3; this.$message.success("更新成功")
}
} else {
this.$message.error("更新失败")
}
}, datainfo)
},
update_name() {
this.updateUserInfo({"methods": 'PUT', 'data': {"first_name": this.userinfo.first_name}});
},
beforeAvatarUpload(file) {
return AvatarUploadUtils(this, file, {
'app_id': this.userinfo.uid,
'upload_key': file.name,
'ftype': 'head'
// eslint-disable-next-line no-unused-vars
}, res => {
this.updateUserInfo({"methods": 'GET'});
});
},
setfunactive(item) {
for (let key in this.$refs) {
if (key === item) {
this.$refs[key].classList.add('active');
} else {
this.$refs[key].classList.remove('active');
}
}
},
autoSetInfoIndex() {
if (this.$store.state.userInfoIndex === 0) {
this.setfunactive('userinfo');
} else if (this.$store.state.userInfoIndex === 1) {
this.setfunactive('changepwd');
} else if (this.$store.state.userInfoIndex === 2) {
this.setfunactive('storage');
}
} }
}, mounted() {
.user_pro_tabs a > span { this.autoSetInfoIndex();
margin-right: 16px; this.updateUserInfo({"methods": 'GET'});
vertical-align: middle }, watch: {
'$store.state.userInfoIndex': function () {
this.autoSetInfoIndex();
},
}, filters: {}, computed: {
getuppicurl() {
return getuserpicurl()
} }
}
}
</script>
.user_pro_tabs a.active { <style scoped>
color: #7e5ef8; .main {
border-bottom-color: #7e5ef8 position: relative;
} padding-bottom: 1px;
color: #9b9b9b;
-webkit-font-smoothing: antialiased;
border-radius: 1%;
}
.user-info {
position: relative;
text-align: center;
margin: 46px auto 100px;
width: 1166px;
}
.avatar {
height: 100px;
width: 100px;
border-radius: 50%;
display: block;
}
.name {
text-align: center;
padding-bottom: 20px;
}
.name input {
text-align: center;
color: #889eff;
margin: 36px auto 0;
width: 280px;
padding: 0;
border: none;
background-color: transparent;
font-size: 30px;
}
.user_pro_tabs a {
width: 100%;
font-size: 16px;
text-align: center;
display: inline-block;
line-height: 48px;
height: 48px;
border-bottom: 1px solid #BABFC3;
text-decoration: none;
color: #BABFC3;
}
.user_pro_tabs a > span {
margin-right: 16px;
vertical-align: middle
}
.user_pro_tabs a.active {
color: #7e5ef8;
border-bottom-color: #7e5ef8
}
</style> </style>

@ -1,475 +1,475 @@
<template> <template>
<div v-if="(certification || certification === 0) && !cert_edit_flag"> <div v-if="(certification || certification === 0) && !cert_edit_flag">
<el-form style="max-width: 400px"> <el-form style="max-width: 400px">
<el-form-item> <el-form-item>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-link :underline="false" type="success" style="font-size: x-large" <el-link v-if="certification.status === 1" :underline="false" style="font-size: x-large"
v-if="certification.status === 1">已经认证 type="success">已经认证
</el-link> </el-link>
<el-link :underline="false" type="primary" style="font-size: x-large" <el-link v-else-if="certification.status === 0" :underline="false" style="font-size: x-large"
v-else-if="certification.status === 0">审核中 type="primary">审核中
</el-link> </el-link>
<el-link v-else-if="certification.status === 2" :underline="false" type="danger" <el-link v-else-if="certification.status === 2" :underline="false" style="font-size: x-large"
style="font-size: x-large" type="danger"
>审核失败 >审核失败
</el-link> </el-link>
<el-link :underline="false" type="info" style="font-size: x-large" v-else>待认证</el-link> <el-link v-else :underline="false" style="font-size: x-large" type="info">待认证</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="真实姓名"> <el-form-item label="真实姓名">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-link :underline="false">{{ certification.name }}</el-link> <el-link :underline="false">{{ certification.name }}</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="身份证号"> <el-form-item label="身份证号">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-link :underline="false">{{ certification.card }}</el-link> <el-link :underline="false">{{ certification.card }}</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="手机号码" v-if="certification.mobile"> <el-form-item v-if="certification.mobile" label="手机号码">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-link :underline="false">{{ certification.mobile }}</el-link> <el-link :underline="false">{{ certification.mobile }}</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="联系地址"> <el-form-item label="联系地址">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-link :underline="false">{{ certification.addr }}</el-link> <el-link :underline="false">{{ certification.addr }}</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item v-if="certification.status === 2" label="审核信息" style="width: 700px"> <el-form-item v-if="certification.status === 2" label="审核信息" style="width: 700px">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-link :underline="false" type="danger">{{ certification.msg }}</el-link> <el-link :underline="false" type="danger">{{ certification.msg }}</el-link>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item v-if="certification.status === 2"> <el-form-item v-if="certification.status === 2">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-button type="primary" @click="recommit">重新提交审核</el-button> <el-button type="primary" @click="recommit">重新提交审核</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item v-if="certification_status === -1"> <el-form-item v-if="certification_status === -1">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-button type="primary" @click="goauth">开始认证</el-button> <el-button type="primary" @click="goauth">开始认证</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div v-else> <div v-else>
<el-form ref="form" :model="form"> <el-form ref="form" :model="form">
<el-form-item label="真实姓名"> <el-form-item label="真实姓名">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="form.name" :autofocus="true" prefix-icon="el-icon-user" <el-input v-model="form.name" :autofocus="true" clearable
placeholder="请输入真实姓名" clearable/> placeholder="请输入真实姓名" prefix-icon="el-icon-user"/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="身份证号"> <el-form-item label="身份证号">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="form.card" clearable prefix-icon="el-icon-s-order" <el-input v-model="form.card" clearable placeholder="请输入身份证号"
placeholder="请输入身份证号"/> prefix-icon="el-icon-s-order"/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="居住地址"> <el-form-item label="居住地址">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="form.addr" clearable prefix-icon="el-icon-house" <el-input v-model="form.addr" clearable placeholder="请输入现居住地址"
placeholder="请输入现居住地址"/> prefix-icon="el-icon-house"/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="手机号码" v-if="captcha.change_type.sms"> <el-form-item v-if="captcha.change_type.sms" label="手机号码">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="form.mobile" ref="phone" clearable <el-input ref="phone" v-model="form.mobile" clearable
prefix-icon="el-icon-mobile" placeholder="请输入手机号码" maxlength="11"/> maxlength="11" placeholder="请输入手机号码" prefix-icon="el-icon-mobile"/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="图片验证码" v-if="captcha.captcha_image"> <el-form-item v-if="captcha.captcha_image" label="图片验证码">
<el-row :gutter="11"> <el-row :gutter="11">
<el-col :span="12"> <el-col :span="12">
<el-input placeholder="请输入图片验证码" v-model="form.authcode" maxlength="6" clearable/> <el-input v-model="form.authcode" clearable maxlength="6" placeholder="请输入图片验证码"/>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-image <el-image
style="border-radius:4px;cursor:pointer;height: 40px" :src="captcha.captcha_image"
:src="captcha.captcha_image" fit="contain"
fit="contain" @click="get_auth_code"> style="border-radius:4px;cursor:pointer;height: 40px" @click="get_auth_code">
</el-image> </el-image>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="手机验证码" v-if="captcha.change_type.sms"> <el-form-item v-if="captcha.change_type.sms" label="手机验证码">
<el-row :gutter="11"> <el-row :gutter="11">
<el-col :span="12"> <el-col :span="12">
<el-input v-model="form.auth_key" prefix-icon="el-icon-mobile" placeholder="请输入您收到的验证码" <el-input v-model="form.auth_key" clearable maxlength="6"
maxlength="6" clearable/> placeholder="请输入您收到的验证码" prefix-icon="el-icon-mobile"/>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-button type="info" @click="getsmsemailcode('sms',form.mobile)" plain <el-button plain style="border-radius:4px;cursor:pointer;height: 40px;background-color: #ecf5ff;color: #dd6161" type="info"
style="border-radius:4px;cursor:pointer;height: 40px;background-color: #ecf5ff;color: #dd6161"> @click="getsmsemailcode('sms',form.mobile)">
获取验证码 获取验证码
</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-row style="margin-left: 88px"> <el-row style="margin-left: 88px">
<el-col :span="13"> <el-col :span="13">
<div id="captcha" ref="captcha"></div> <div id="captcha" ref="captcha"></div>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="身份证号"> <el-form-item label="身份证号">
<el-row style="height: 40px" :gutter="36"> <el-row :gutter="36" style="height: 40px">
<el-col :span="19"> <el-col :span="19">
<div class="appdownload"> <div class="appdownload">
<el-upload <el-upload
drag :before-upload="upload_one"
action="#" accept=".png , .jpg , .jpeg"
accept=".png , .jpg , .jpeg" action="#"
:before-upload="upload_one"> drag>
<el-tooltip v-if="user_certification.one" placement="top"> <el-tooltip v-if="user_certification.one" placement="top">
<div slot="content">上传身份证<i style="color: #2abb9d!important;">国徽面</i>照片</div> <div slot="content">上传身份证<i style="color: #2abb9d!important;">国徽面</i>照片</div>
<img :src="user_certification.one" <img :src="user_certification.one"
class="avatar" alt="国徽面照片"> alt="国徽面照片" class="avatar">
</el-tooltip> </el-tooltip>
<i v-else class="avatar-uploader-icon" style="text-align: center"> <i v-else class="avatar-uploader-icon" style="text-align: center">
上传身份证<i style="color: #2abb9d!important;">国徽面</i>照片 上传身份证<i style="color: #2abb9d!important;">国徽面</i>照片
</i> </i>
</el-upload> </el-upload>
</div> </div>
<div class="appdownload"> <div class="appdownload">
<el-upload <el-upload
drag :before-upload="upload_two"
action="#" accept=".png , .jpg , .jpeg"
accept=".png , .jpg , .jpeg" action="#"
:before-upload="upload_two"> drag>
<el-tooltip v-if="user_certification.two" placement="top"> <el-tooltip v-if="user_certification.two" placement="top">
<div slot="content">上传身份证<i style="color: #2abb9d!important;">人像面</i>照片</div> <div slot="content">上传身份证<i style="color: #2abb9d!important;">人像面</i>照片</div>
<img :src="user_certification.two" <img :src="user_certification.two"
class="avatar" alt="人像面照片"> alt="人像面照片" class="avatar">
</el-tooltip> </el-tooltip>
<i v-else class="avatar-uploader-icon" style="text-align: center"> <i v-else class="avatar-uploader-icon" style="text-align: center">
上传身份证<i style="color: #2abb9d!important;">人像面</i>照片 上传身份证<i style="color: #2abb9d!important;">人像面</i>照片
</i> </i>
</el-upload> </el-upload>
</div> </div>
<div class="appdownload"> <div class="appdownload">
<el-upload <el-upload
drag :before-upload="upload_three"
action="#" accept=".png , .jpg , .jpeg"
accept=".png , .jpg , .jpeg" action="#"
:before-upload="upload_three"> drag>
<el-tooltip v-if="user_certification.three" placement="top"> <el-tooltip v-if="user_certification.three" placement="top">
<div slot="content">上传<i style="color: #2abb9d!important;">手持身份证</i>照片</div> <div slot="content">上传<i style="color: #2abb9d!important;">手持身份证</i>照片</div>
<img :src="user_certification.three" <img :src="user_certification.three"
class="avatar" alt="手持身份证照片"> alt="手持身份证照片" class="avatar">
</el-tooltip> </el-tooltip>
<i v-else class="avatar-uploader-icon" style="text-align: center"> <i v-else class="avatar-uploader-icon" style="text-align: center">
上传<i style="color: #2abb9d!important;">手持身份证</i>照片 上传<i style="color: #2abb9d!important;">手持身份证</i>照片
</i> </i>
</el-upload> </el-upload>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-row> <el-row>
<el-col :span="24" style="margin-top: 20px"> <el-col :span="24" style="margin-top: 20px">
<el-button type="primary" @click="commit">提交</el-button> <el-button type="primary" @click="commit">提交</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import {changeInfoFun, getAuthcTokenFun, user_certification} from "@/restful"; import {changeInfoFun, getAuthcTokenFun, user_certification} from "@/restful";
import {AvatarUploadUtils, getUserInfoFun, checkphone, geetest} from "@/utils"; import {AvatarUploadUtils, checkphone, geetest, getUserInfoFun} from "@/utils";
export default { export default {
name: "FirUserProfileCertification", name: "FirUserProfileCertification",
data() { data() {
return { return {
form: {}, form: {},
captcha: { captcha: {
captcha_image: '', captcha_image: '',
captcha_key: '', captcha_key: '',
authcode: '', authcode: '',
length: 8, length: 8,
change_type: {email: false, sms: false} change_type: {email: false, sms: false}
}, },
user_certification: {'one': '', 'two': '', 'three': ''}, user_certification: {'one': '', 'two': '', 'three': ''},
certification: {}, certification: {},
certification_status: 0, certification_status: 0,
cert_edit_flag: false cert_edit_flag: false
}
}, methods: {
goauth() {
this.cert_edit_flag = true;
this.get_user_certification({methods: 'GET', data: {act: 'certpiccertinfo'}});
this.get_auth_code();
},
recommit() {
this.cert_edit_flag = true;
this.get_user_certification({methods: 'GET', data: {act: 'certpiccertinfo'}});
this.get_auth_code();
},
commit() {
for (let v of Object.keys(this.form)) {
if (this.form[v].length < 2) {
this.$message.error("填写错误,请检查");
return false
}
}
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if (reg.test(this.form.card) === false) {
this.$message.error("身份证输入不合法");
return false;
}
if (this.captcha.change_type.sms) {
let checkp = checkphone(this.form.mobile);
if (!checkp) {
this.$message.error("手机号输入不合法");
return false;
}
}
delete this.form['email'];
this.get_user_certification({methods: 'POST', data: this.form})
},
get_user_certification(params) {
user_certification(res => {
if (res.code === 1000) {
if (params.methods === 'POST') {
this.$message.success("信息提交成功,正在审核中");
this.cert_edit_flag = false;
this.certification_status = 0;
getUserInfoFun(this);
this.get_user_certification({methods: 'GET', data: {act: 'usercert'}});
}
if (res.data.usercert) {
this.certification = res.data.usercert;
} else {
const ft = ['one', 'two', 'three'];
if (res.data.certification && res.data.certification.length > 0) {
for (let v of res.data.certification) {
this.user_certification[ft[v.type - 1]] = v.certification_url;
}
} }
}, methods: { if (res.data.user_certification) {
goauth() { this.form = res.data.user_certification;
this.cert_edit_flag = true;
this.get_user_certification({methods: 'GET', data: {act: 'certpiccertinfo'}});
this.get_auth_code();
},
recommit() {
this.cert_edit_flag = true;
this.get_user_certification({methods: 'GET', data: {act: 'certpiccertinfo'}});
this.get_auth_code();
},
commit() {
for (let v of Object.keys(this.form)) {
if (this.form[v].length < 2) {
this.$message.error("填写错误,请检查");
return false
}
}
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if (reg.test(this.form.card) === false) {
this.$message.error("身份证输入不合法");
return false;
}
if (this.captcha.change_type.sms) {
let checkp = checkphone(this.form.mobile);
if (!checkp) {
this.$message.error("手机号输入不合法");
return false;
}
}
delete this.form['email'];
this.get_user_certification({methods: 'POST', data: this.form})
},
get_user_certification(params) {
user_certification(res => {
if (res.code === 1000) {
if (params.methods === 'POST') {
this.$message.success("信息提交成功,正在审核中");
this.cert_edit_flag = false;
this.certification_status = 0;
getUserInfoFun(this);
this.get_user_certification({methods: 'GET', data: {act: 'usercert'}});
}
if (res.data.usercert) {
this.certification = res.data.usercert;
} else {
const ft = ['one', 'two', 'three'];
if (res.data.certification && res.data.certification.length > 0) {
for (let v of res.data.certification) {
this.user_certification[ft[v.type - 1]] = v.certification_url;
}
}
if (res.data.user_certification) {
this.form = res.data.user_certification;
}
}
} else {
this.$message.error(res.msg)
}
}, params)
},
getsmsemailcode(act, target) {
let picode = {
"authcode": this.form.authcode,
"captcha_key": this.captcha.captcha_key,
};
if (this.captcha.captcha_image) {
if (!this.form.authcode) {
this.$message.error("图片验证码输入有误");
return;
}
let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (!captcha_flag) {
this.$message.error("图片验证码输入有误");
return
}
}
let checkp = checkphone(this.form.mobile);
if (!checkp) {
this.$message.error("手机号输入有误");
return
}
let params = {'act': act, 'target': target, 'ext': picode, 'user_id': target, 'ftype': 'certification'};
if (this.captcha.geetest) {
geetest(this, this.form.mobile, params, (n_params) => {
this.get_phone_code(n_params);
})
} else {
this.get_phone_code(params)
}
},
get_phone_code(params) {
getAuthcTokenFun(data => {
if (data.code === 1000) {
let msg = '您正在进行身份认证,验证码已经发送您手机';
this.$notify({
title: '验证码',
message: msg,
type: 'success'
});
this.form.auth_token = data.data.auth_token;
} else {
this.$message.error(data.msg)
}
}, {"methods": 'POST', 'data': params})
},
get_auth_code() {
if (this.form.authcode) {
this.form.authcode = '';
}
changeInfoFun(data => {
if (data.code === 1000) {
this.captcha = data.data;
if (this.captcha.captcha_key) {
this.form.captcha_key = this.captcha.captcha_key;
}
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, {
"methods": "GET",
"data": {}
});
},
upload_one(file) {
return this.beforeAvatarUpload(file, 1)
},
upload_two(file) {
return this.beforeAvatarUpload(file, 2)
},
upload_three(file) {
return this.beforeAvatarUpload(file, 3)
},
beforeAvatarUpload(file, ptype) {
return AvatarUploadUtils(this, file, {
'app_id': this.$store.state.userinfo.uid,
'upload_key': file.name,
'ftype': 'certification',
'ext': {'ptype': ptype}
// eslint-disable-next-line no-unused-vars
}, res => {
this.get_user_certification({methods: 'GET', data: {act: 'certpic'}});
});
},
init() {
if (this.$store.state.userinfo.certification || this.$store.state.userinfo.certification === 0) {
this.certification_status = this.$store.state.userinfo.certification;
if (this.certification_status !== -1) {
this.get_user_certification({methods: 'GET', data: {act: 'usercert'}});
}
}
},
}, mounted() {
this.$store.dispatch('douserInfoIndex', 2);
this.init();
}, watch: {
'$store.state.userinfo': function () {
this.init();
} }
}
} else {
this.$message.error(res.msg)
}
}, params)
},
getsmsemailcode(act, target) {
let picode = {
"authcode": this.form.authcode,
"captcha_key": this.captcha.captcha_key,
};
if (this.captcha.captcha_image) {
if (!this.form.authcode) {
this.$message.error("图片验证码输入有误");
return;
}
let captcha_flag = this.form.authcode.length === this.captcha.length;
if (this.captcha.captcha_key === '' || !this.captcha.captcha_key) {
captcha_flag = true
}
if (!captcha_flag) {
this.$message.error("图片验证码输入有误");
return
} }
}
let checkp = checkphone(this.form.mobile);
if (!checkp) {
this.$message.error("手机号输入有误");
return
}
let params = {'act': act, 'target': target, 'ext': picode, 'user_id': target, 'ftype': 'certification'};
if (this.captcha.geetest) {
geetest(this, this.form.mobile, params, (n_params) => {
this.get_phone_code(n_params);
})
} else {
this.get_phone_code(params)
}
},
get_phone_code(params) {
getAuthcTokenFun(data => {
if (data.code === 1000) {
let msg = '您正在进行身份认证,验证码已经发送您手机';
this.$notify({
title: '验证码',
message: msg,
type: 'success'
});
this.form.auth_token = data.data.auth_token;
} else {
this.$message.error(data.msg)
}
}, {"methods": 'POST', 'data': params})
},
get_auth_code() {
if (this.form.authcode) {
this.form.authcode = '';
}
changeInfoFun(data => {
if (data.code === 1000) {
this.captcha = data.data;
if (this.captcha.captcha_key) {
this.form.captcha_key = this.captcha.captcha_key;
}
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, {
"methods": "GET",
"data": {}
});
},
upload_one(file) {
return this.beforeAvatarUpload(file, 1)
},
upload_two(file) {
return this.beforeAvatarUpload(file, 2)
},
upload_three(file) {
return this.beforeAvatarUpload(file, 3)
},
beforeAvatarUpload(file, ptype) {
return AvatarUploadUtils(this, file, {
'app_id': this.$store.state.userinfo.uid,
'upload_key': file.name,
'ftype': 'certification',
'ext': {'ptype': ptype}
// eslint-disable-next-line no-unused-vars
}, res => {
this.get_user_certification({methods: 'GET', data: {act: 'certpic'}});
});
},
init() {
if (this.$store.state.userinfo.certification || this.$store.state.userinfo.certification === 0) {
this.certification_status = this.$store.state.userinfo.certification;
if (this.certification_status !== -1) {
this.get_user_certification({methods: 'GET', data: {act: 'usercert'}});
}
}
},
}, mounted() {
this.$store.dispatch('douserInfoIndex', 2);
this.init();
}, watch: {
'$store.state.userinfo': function () {
this.init();
} }
}
}
</script> </script>
<style scoped> <style scoped>
.el-form { .el-form {
max-width: 800px; max-width: 800px;
margin: 0 auto; margin: 0 auto;
} }
.el-form-item .el-button { .el-form-item .el-button {
max-width: 260px; max-width: 260px;
width: 100%; width: 100%;
height: 50px; height: 50px;
} }
.appdownload /deep/ .el-upload-dragger { .appdownload /deep/ .el-upload-dragger {
background: #f1f1f1; background: #f1f1f1;
width: 200px; width: 200px;
height: 166px; height: 166px;
} }
.appdownload /deep/ .el-icon-upload { .appdownload /deep/ .el-icon-upload {
margin-top: 45%; margin-top: 45%;
} }
.appdownload { .appdownload {
float: left; float: left;
width: 200px; width: 200px;
height: 166px; height: 166px;
background-color: #c2dcf1; background-color: #c2dcf1;
} }
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
color: #8c939d; color: #8c939d;
width: 158px; width: 158px;
height: 158px; height: 158px;
line-height: 158px; line-height: 158px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
</style> </style>

@ -1,98 +1,98 @@
<template> <template>
<div> <div>
<el-form ref="form" :model="form" label-width="90px"> <el-form ref="form" :model="form" label-width="90px">
<el-form-item label="当前密码"> <el-form-item label="当前密码">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="form.oldpassword" show-password autofocus prefix-icon="el-icon-unlock" <el-input v-model="form.oldpassword" autofocus clearable placeholder="当前密码"
placeholder="当前密码" clearable/> prefix-icon="el-icon-unlock" show-password/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="form.newpassword" show-password prefix-icon="el-icon-lock" <el-input v-model="form.newpassword" clearable placeholder="新密码"
placeholder="新密码" clearable/> prefix-icon="el-icon-lock" show-password/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="确认密码"> <el-form-item label="确认密码">
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="form.surepassword" show-password prefix-icon="el-icon-lock" <el-input v-model="form.surepassword" clearable placeholder="确认密码"
placeholder="确认密码" clearable/> prefix-icon="el-icon-lock" show-password/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-row :gutter="36"> <el-row :gutter="36">
<el-col :span="20"> <el-col :span="20">
<el-button type="primary" @click="updatepasswd">更新密码</el-button> <el-button type="primary" @click="updatepasswd">更新密码</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import {userinfos} from "@/restful"; import {userinfos} from "@/restful";
export default { export default {
name: "FirUserProfileChangePwd", name: "FirUserProfileChangePwd",
data() { data() {
return { return {
form: { form: {
oldpassword: '', oldpassword: '',
newpassword: '', newpassword: '',
surepassword: '' surepassword: ''
}, },
} }
}, methods: { }, methods: {
updatepasswd() { updatepasswd() {
if (this.form.newpassword === this.form.surepassword) { if (this.form.newpassword === this.form.surepassword) {
userinfos(data => { userinfos(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.userinfo = data.data; this.userinfo = data.data;
this.$message.success('密码修改成功'); this.$message.success('密码修改成功');
} else { } else {
this.$message.error('密码修改失败,' + data.msg); this.$message.error('密码修改失败,' + data.msg);
} }
}, { }, {
"methods": 'PUT', 'data': { "methods": 'PUT', 'data': {
"oldpassword": this.form.oldpassword, "oldpassword": this.form.oldpassword,
"surepassword": this.form.surepassword "surepassword": this.form.surepassword
} }
}); });
} else { } else {
this.$message.error('密码不一致'); this.$message.error('密码不一致');
} }
}
}, mounted() {
this.$store.dispatch('douserInfoIndex', 1);
}
} }
}, mounted() {
this.$store.dispatch('douserInfoIndex', 1);
}
}
</script> </script>
<style scoped> <style scoped>
.el-form { .el-form {
max-width: 500px; max-width: 500px;
margin: 0 auto; margin: 0 auto;
} }
.el-button { .el-button {
margin-top: 20px; margin-top: 20px;
max-width: 260px; max-width: 260px;
width: 100%; width: 100%;
height: 50px; height: 50px;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -5,20 +5,20 @@ import router from "@/router/download";
import 'element-ui/lib/theme-chalk/index.css' import 'element-ui/lib/theme-chalk/index.css'
import { import {
Button, Button,
Col,
Container, Container,
Divider, Divider,
Form,
FormItem,
Header,
Input, Input,
Link, Link,
Main, Main,
Message, Message,
Select, Notification,
Option, Option,
Header,
Form,
FormItem,
Row, Row,
Col, Select
Notification
} from "element-ui"; } from "element-ui";
import VueLazyload from 'vue-lazyload' import VueLazyload from 'vue-lazyload'

Loading…
Cancel
Save