320 lines
13 KiB
PHP
320 lines
13 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="renderer" content="webkit">
|
|
<?php if($this->params['site_image']):?>
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo $this->params['site_image'];?>" />
|
|
<?php else:?>
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?=Yii::$app->request->baseUrl?>/web/favicon.ico" />
|
|
<?php endif;?>
|
|
<title> <?php if($this->params['site_title']):?>
|
|
<?php echo $this->params['site_title']; ?>
|
|
<?php else:?>
|
|
应用管理后台
|
|
<?php endif;?>-管理设置-升级</title>
|
|
<link rel="stylesheet" type="text/css" href="<?=Yii::$app->request->baseUrl?>/web/static/css/globle.css"/>
|
|
<script src="<?=Yii::$app->request->baseUrl?>/web/static/js/config.js" type="text/javascript" charset="utf-8"></script>
|
|
</head>
|
|
<style>
|
|
|
|
.imgbox {
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
|
|
.checkbox .el-checkbox {
|
|
border: 1px solid #F3F6FB;
|
|
position: relative;
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
|
|
.checklabel-zjtd {
|
|
left: 0px;
|
|
}
|
|
|
|
.checkbox .el-checkbox .el-checkbox__input {
|
|
position: absolute;
|
|
bottom: 5px;
|
|
left: 42px;
|
|
}
|
|
|
|
.channel-icon img {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
.namelogo {
|
|
width: 54px;
|
|
height: 54px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.hed-right .el-button {
|
|
height: 38px;
|
|
}
|
|
|
|
.hed-right .btn-jrpt {
|
|
width: 130px;
|
|
}
|
|
|
|
.hed-right .btn-ty {
|
|
width: 104px;
|
|
}
|
|
|
|
.textbutton .el-button{
|
|
width: 130px;
|
|
height: 38px;
|
|
}
|
|
.recordBox{max-height: 1000px;}
|
|
.record{border-left: 1px solid #E4E7ED;line-height: 24px;margin-left: 60px;}
|
|
.box{padding-left: 54px;}
|
|
.version{margin-top: 36px;line-height: 26px;}
|
|
.version:before {content: "";position: absolute;width: 9px;height: 9px; border-radius: 50%;background: #2D8CF0;left: -59px;top: 9px;}
|
|
.time{margin-bottom: 6px;}
|
|
.recordCon{white-space: pre-wrap;}/*自动识别富文本换行*/
|
|
|
|
</style>
|
|
<body>
|
|
<div class="head">
|
|
<div class="publicHeader"><?php echo $this->render('@app/views/admin/public/publicHeader.html');?></div>
|
|
</div>
|
|
<div class="left">
|
|
<div class="publicAside"><?php echo $this->render('@app/views/admin/public/publicAside.html');?></div>
|
|
</div>
|
|
<div class="yb_body">
|
|
<div class="layout" id="platformList" v-cloak v-loading="cardLoading" element-loading-text="正在更新数据,请勿刷新页面">
|
|
<el-container>
|
|
<el-container>
|
|
<el-main>
|
|
<div class="main" style="min-width: 800px">
|
|
<!-- <div class="ba_f bor_rad5 pad_20 mar_b30">
|
|
<div class="flex-bet">
|
|
<div class="flex pad_tb_10 mar_l20">
|
|
<div class=""><img class="namelogo" :src="formInline.app_image" /></div>
|
|
<div class="flex-col mar_l20 t_l">
|
|
<div class="overflowlnr">{{formInline.app_name}}</div>
|
|
<div class="color_9 fon_12 mar_t10">版本:{{formInline.app_version}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="mar_r20 hed-right">
|
|
<el-button class="btn-ty" @click="deactivation(id,2)">卸载</el-button>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
<div class="ba_f">
|
|
<div class="main_tab ba_f bor_rad5 pad_tb_30">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tab-pane label="基本信息" name="base">基本信息</el-tab-pane>
|
|
<el-tab-pane label="升级日志" name="upgrade">升级日志</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
<div class="mar_t30 fon_14 color_3 mar_b20">
|
|
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark"
|
|
style="width: 96%;margin: 0 auto">
|
|
<el-table-column label="应用名" prop="image">
|
|
<template slot-scope="scope">
|
|
<div class="flex pad_tb_10">
|
|
<div class="" v-if="formInline.app_image"><img class="namelogo" :src="formInline.app_image"/>
|
|
</div>
|
|
<div class="flex-col mar_l20">
|
|
<div class="overflowlnr">{{formInline.app_name}}</div>
|
|
<div class="color_9 fon_12">类型:{{formInline.app_name}}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="app_version" label="当前版本">
|
|
<template slot-scope="scope">
|
|
{{formInline.app_version}}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="admin" label="最新版本">
|
|
<template slot-scope="scope">
|
|
{{version_code}}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作">
|
|
<template slot-scope="scope">
|
|
<div class="textbutton">
|
|
<el-button class="fon_14" type="primary" @click="upgrade(formInline.id)">升级</el-button>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<div class="ba_f mar_t20 pad_30">
|
|
<!--<el-button type="primary" class="tijiao">保存</el-button>-->
|
|
<div class="main_title flex-bet fon_16">
|
|
<div>更新日志</div>
|
|
<!-- <div ><a href="" class="maincolor">查看详情 ></a></div> -->
|
|
</div>
|
|
<div>
|
|
<el-scrollbar>
|
|
<div class="recordBox">
|
|
<div class="record">
|
|
<div class="box t_l fon_14" v-for="(item,index) in recordModel" :key="index">
|
|
<p class="version fon_14 font_w700 rel">{{item.version_code}}</p>
|
|
<p class="time fon_12 color_9">
|
|
发布于:{{item.dt_operdate}}
|
|
</p>
|
|
<div class="recordCon" v-html="item.version_remark">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-main>
|
|
</el-container>
|
|
</el-container>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(document).ready(function () {
|
|
$(".slimScrollDiv ul .main-nav-li a").eq(7).addClass("menu_active");
|
|
$(".main-nav .main-nav-li .submenu").eq(3).addClass("block");
|
|
$(".main-nav .main-nav-li .submenu").children().children().eq(7).addClass("menu_active2")
|
|
});
|
|
</script>
|
|
<script>
|
|
new Vue({
|
|
el: '#platformList',
|
|
created() {
|
|
const id = utils.GetQueryString("id")
|
|
if (id) {
|
|
console.log(id)
|
|
this.id=id
|
|
this.getbyid(id)
|
|
this.channelRemark(id)
|
|
}
|
|
},
|
|
data: function () {
|
|
return {
|
|
cardLoading: false,
|
|
activeName: 'upgrade',
|
|
formInline: {
|
|
app_name: '',
|
|
app_image: '',
|
|
app_version: '',
|
|
},
|
|
version_code:'1.0.0',
|
|
id:'',
|
|
tableData: [{
|
|
image: '云贝优品',
|
|
starDate: '1.7.3',
|
|
admin: '1.7.3',
|
|
operation: {
|
|
value: '进入微信小程序',
|
|
value2: '升级'
|
|
}
|
|
},
|
|
],
|
|
recordModel:'',
|
|
}
|
|
},
|
|
methods: {
|
|
//编辑显示数据
|
|
async getbyid(id) {
|
|
let params = {
|
|
id: id
|
|
}
|
|
res = await utils.requestGet({data: params, url: "admin/app/getbyid"},this)
|
|
if (res.code == 1) {
|
|
this.cardLoading= false
|
|
// console.log(res.msg)
|
|
this.formInline = res.data
|
|
this.imageUrl = res.data.app_image
|
|
}
|
|
},
|
|
async channelRemark(id) {
|
|
let params = {
|
|
id: id
|
|
}
|
|
res = await utils.requestPost({data: params, url: "admin/app/channel-remark"},this)
|
|
if (res.code == 1) {
|
|
this.cardLoading= false
|
|
this.version_code=res.data.version_code?res.data.version_code:'1.0.0'
|
|
this.recordModel = res.message
|
|
let recordObj = {}
|
|
this.$set(this.recordModel, -1, recordObj)
|
|
}
|
|
},
|
|
handleClick(tab, event) {
|
|
if (tab.name == 'base') {
|
|
location.href = "<?= Yii::$app->urlManager->createUrl('admin/app/administration_set');?>"+"?id="+this.id;
|
|
}
|
|
if (tab.name == 'upgrade') {
|
|
location.href ="<?= Yii::$app->urlManager->createUrl('admin/app/administration_upgrade');?>"+"?id="+this.id;
|
|
}
|
|
},
|
|
edit(){
|
|
location.href = "<?= Yii::$app->urlManager->createUrl('admin/app/administration_goupgrade');?>";
|
|
},
|
|
async upgrade(id){
|
|
if(this.formInline.app_version==this.version_code){
|
|
this.$message({
|
|
type: 'warning',
|
|
message: '已是最新版本,暂不用升级!',
|
|
duration: 1000,
|
|
});
|
|
}else{
|
|
this.cardLoading= true
|
|
res = await utils.requestPost({
|
|
data: {"id":id,"version":this.formInline.app_version},
|
|
url: "admin/upgrade/app-upgrade"
|
|
},this)
|
|
if (res.code==1) {
|
|
this.cardLoading= false
|
|
this.$message({
|
|
type: 'success',
|
|
message:res.msg,
|
|
duration: 1000,
|
|
onClose: () => {
|
|
location.href ="<?= Yii::$app->urlManager->createUrl('admin/app/administration_app');?>";
|
|
},
|
|
});
|
|
}
|
|
}
|
|
},
|
|
//点击停用
|
|
async deactivation(id, status) {
|
|
if (status == '1') {
|
|
await utils.showConfirm({content: '此操作将恢复该应用, 是否继续?'}, this)
|
|
}
|
|
if (status == '2') {
|
|
await utils.showConfirm({content: '此操作将停用该应用, 是否继续?'}, this)
|
|
}
|
|
if (status == '3') {
|
|
await utils.showConfirm({content: '此操作将删除该应用, 是否继续?'}, this)
|
|
}
|
|
var requstData = {
|
|
id,
|
|
status,
|
|
}
|
|
res = await utils.requestPost({
|
|
data: requstData,
|
|
url: "admin/app/delapp"
|
|
},this)
|
|
if (res.code == 1) {
|
|
this.$message({
|
|
type: 'success',
|
|
message: '操作成功!',
|
|
duration: 1000,
|
|
onClose: () => {
|
|
location.href ="<?= Yii::$app->urlManager->createUrl('admin/app/administration_app');?>";
|
|
},
|
|
});
|
|
}
|
|
},
|
|
}
|
|
})
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|