Commit 7ae44ce8 authored by zhengke's avatar zhengke

修改

parent c268895f
<template>
<div class="projectClass">
<template v-if="projectClassIsShowAdd">
<template v-if="videoIsShowAdd">
<div class="head-title">
视频管理
<el-button @click="projectClassIsShowAdd=false" style="float:right;margin-top: -5px;" size="small"
视频
<el-button @click="videoIsShowAdd=false" style="float:right;margin-top: -5px;" size="small"
type="primary">
添加视频
</el-button>
......@@ -48,22 +48,45 @@
</template>
<template v-else>
<div class="head-title">
<span @click="projectClassIsShowAdd=true" style="color:rgb(64, 158, 255);cursor:pointer;">文章</span><span
style="margin:0 9px;color:#C0C4CC">/</span><span>文章编辑</span>
<span @click="videoIsShowAdd=true" style="color:rgb(64, 158, 255);cursor:pointer;">视频</span><span
style="margin:0 9px;color:#C0C4CC">/</span><span>视频编辑</span>
</div>
<div class="content">
<div class="projectClass_condiv">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px" style="padding:0 20px;">
<el-form-item label="专题分类名称" prop="title">
<el-input v-model="addMsg.TopicName" size="small" placeholder="请输入名称" maxlength="20" />
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px" style="padding:0 20px;">
<el-form-item label="标题" prop="Title">
<el-input v-model="addMsg.Title" size="small" maxlength="50" />
</el-form-item>
<el-form-item label="视频来源">
<el-radio-group v-model="addMsg.SourceType">
<el-radio :label="1">源地址</el-radio>
<el-radio :label="2">腾讯</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="视频链接">
<el-input placeholder="请输入链接" v-model="addMsg.VedioUrl" size="small">
<el-button slot="append">选择文件</el-button>
</el-input>
<el-link class="box-grow-0" type="primary" style="font-size:12px" v-if='addMsg.VedioUrl' :underline="false"
target="_blank" :href="data.video_url">视频预览
</el-link>
</el-form-item>
<el-form-item label="封面图" prop="VedioCoverImg">
<el-tooltip class="item" effect="dark" content="建议尺寸:750 * 400" placement="top">
<el-button size="mini" @click="choicImg=true">选择图片</el-button>
</el-tooltip>
<div class="customize-share-title">
<div class="zk_pic_box" flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(addMsg.VedioCoverImg) + ')'}">
<i v-if="addMsg.VedioCoverImg==''" class="el-icon-picture-outline"></i>
</div>
</div>
</el-form-item>
<el-form-item label="排序">
<el-input type="text" v-model="addMsg.SortNum" size="small" @keyup.native="checkInteger(addMsg,'SortNum')"
placeholder="请输入排序" maxlength="4" />
<el-input v-model="addMsg.SortNum" size="small" maxlength="50" />
</el-form-item>
<el-form-item label="状态">
<el-switch v-model="addMsg.IsDisable" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
<el-form-item label="详情介绍">
<el-input type="textarea" v-model="addMsg.VedioIntro" :rows="4" maxlength="200" />
</el-form-item>
</el-form>
</div>
......@@ -71,10 +94,18 @@
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
export default {
components: {
ChooseImg
},
data() {
return {
//是否线下链接弹窗
......@@ -86,19 +117,28 @@
TopicName: ""
},
total: 0,
projectClassIsShowAdd: true,
videoIsShowAdd: true,
choicImg:false,
addMsg: {
Id: 0, //编号
TopicName: '', //专题分类名称
SortNum: 0, //排序
IsDisable: 0, //状态
Id: 0, //视频编号
Title: '', //视频标题
SourceType: 1, //视频来源(1-源地址,2-腾讯)
VedioUrl:'', //视频链接
VedioCoverImg:'', //封面图
SortNum:'', //排序
VedioIntro:'' //视频详情介绍
},
rules: {
TopicName: [{
Title: [{
required: true,
message: '专题分类名称',
message: '标题不能为空',
trigger: 'change'
}],
VedioCoverImg:[{
required: true,
message: '封面图',
trigger: 'change'
}]
},
};
......@@ -135,54 +175,7 @@
saveMsg() {
this.apipost("/api/MContent/SetTopicType", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.projectClassIsShowAdd = true;
this.getList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
//修改
EditprojectClass(item) {
this.apipost("/api/MContent/GetTopicType", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
this.projectClassIsShowAdd = false;
var jsonData = res.data.data;
this.addMsg.Id = jsonData.Id;
this.addMsg.TopicName = jsonData.TopicName;
this.addMsg.SortNum = jsonData.SortNum;
this.addMsg.IsDisable = jsonData.IsDisable;
} else {
this.Info(res.data.message);
}
})
},
//删除
RemoveprojectClass(item) {
var that = this;
that.Confirm("是否要删除?", function () {
that.apipost("/api/MContent/RemoveTopicType", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
that.getList();
} else {
that.Info(res.data.message);
}
})
})
},
//更新状态
updateIsDisable(item) {
this.apipost("/api/MContent/UpdateTopicTypeStatus", {
Id: item.Id,
IsDisable: item.IsDisable
}, res => {
if (res.data.resultCode == 1) {
this.ArticleIsShowAdd = true;
this.videoIsShowAdd = true;
this.getList();
this.Success(res.data.message);
} else {
......@@ -190,8 +183,10 @@
}
})
},
input(obj) {
this.addMsg.content = obj
//选择图片
SelectId(msg) {
this.addMsg.VedioCoverImg = msg.url;
this.choicImg = false;
},
},
mounted() {
......
This diff is collapsed.
......@@ -252,8 +252,8 @@
data:this.vipData.data,
comIndex: -1,
default: {
buy_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png',
renew_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/logo.png',
buy_bg: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png',
renew_bg: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/logo.png',
buy_big_color: '#D0B8A5',
buy_small_color: '#C09878',
buy_btn_color: '#5A4D40',
......@@ -271,8 +271,8 @@
buy_bg: '',
renew_bg: '',
plugin: {
buy_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png',
renew_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/logo.png',
buy_bg: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png',
renew_bg: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/logo.png',
buy_big_color: '#D0B8A5',
buy_small_color: '#C09878',
buy_btn_color: '#5A4D40',
......@@ -328,8 +328,8 @@
that.data.top_bottom_padding = that.top_bottom_padding;
} else {
that.data.usePluginConfig = that.usePluginConfig;
that.buy_bg = 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png';
that.renew_bg = 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png';
that.buy_bg = 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png';
that.renew_bg = 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png';
that.data.background = that.background;
that.data.top_bottom_padding = that.top_bottom_padding;
that.data.background = that.background;
......@@ -371,8 +371,8 @@
switch (position) {
case 'buy':
if (res == 2) {
this.buy_bg = 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png';
this.data.buy_bg = 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png';
this.buy_bg = 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png';
this.data.buy_bg = 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png';
} else {
this.buy_bg = '';
this.data.buy_bg = '';
......@@ -380,8 +380,8 @@
break;
case 'renew':
if (res == 2) {
this.renew_bg = 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png';
this.data.renew_bg = 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png';
this.renew_bg = 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png';
this.data.renew_bg = 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/buy_bg.png';
} else {
this.renew_bg = '';
this.data.renew_bg = '';
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment