提交 2e177e57 编写于 作者: bo.dang's avatar bo.dang

广告位配置和排行榜配置

上级 33354934
......@@ -9,7 +9,7 @@
<el-form-item label="是否显示广告位" class="required-label">
<el-radio-group v-model="formData.adShowFlag" size="small" class="required-label">
<el-radio-group v-model="formData.adShowFlag" @change="changeAdShow" size="small" class="required-label">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
......@@ -60,7 +60,7 @@
</el-select>
</el-form-item>
<el-form-item label="选择模块" v-if="formData.adShowFlag == 1 && formData.adModuleDto.linkType == 4" class="required-label">
<el-select @focus="moduleIndex(index)" filterable v-model="formData.adModuleDto.name" @change="moduleChange" placeholder="请选择模块" style="width:88%">
<el-select filterable v-model="formData.adModuleDto.name" @change="moduleChange" placeholder="请选择模块" style="width:88%">
<el-option
v-for="item2 in moduleArray.nameList"
:key="item2.id"
......@@ -311,18 +311,20 @@
if(vm.formData.adShowFlag == 0){
vm.formData.adImageUrl = "";
vm.formData.adModuleDto = null;
}
else {
if(!vm.checkAdImagUrl()){
return;
}
if(!vm.checkAdImagUrl()){
return;
}
if(!vm.checkName()){
return;
}
if(!vm.checkName()){
return;
}
if(!vm.checkParamList()){
return;
if(!vm.checkParamList()){
return;
}
}
saveCircleAds(req).then(function (res) {
......@@ -338,10 +340,10 @@
//上传圈子头像
beforeUploadPic1(file) {
this.currentOption.aspectRatio = 1/1;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 160;
this.currentOption.minCropBoxHeight = 160;
// this.currentOption.aspectRatio = 1/1;
// this.currentOption.cropBoxResizable = true;
// this.currentOption.minCropBoxWidth = 160;
// this.currentOption.minCropBoxHeight = 160;
let fileLimit = {
width: 690,
height: 120,
......@@ -376,16 +378,16 @@
image.onload = function () {
let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
if (_this.width < fileLimit.width || _this.height < fileLimit.height) {
if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
vm.$message.error("图片必须是jpegpng格式,同时长宽尺寸和图片大小需符合要求");
return;
}
else if(_this.width > fileLimit.width || _this.height > fileLimit.height){
vm.showCropper = true;
vm.currentOption.cvWidth = _this.width;
vm.currentOption.cvHeight = _this.height;
return;
}
// else if(_this.width > fileLimit.width || _this.height > fileLimit.height){
// vm.showCropper = true;
// vm.currentOption.cvWidth = _this.width;
// vm.currentOption.cvHeight = _this.height;
// return;
// }
else {
openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "preview4", "progress1", 1).then(function (path) {
......@@ -622,7 +624,9 @@
},
checkParamList(){
if(vm.formData.adModuleDto.linkType == 4 && vm.formData.adModuleDto.name != ""){
if(vm.formData.adModuleDto.linkType == 4
&& vm.formData.adModuleDto.name != ""
&& vm.formData.adModuleDto.paramFlag == 1){
if(vm.formData.adModuleDto.paramList.length == 0){
vm.$message.error("请选择参数!");
......@@ -643,6 +647,27 @@
else {
return true;
}
},
changeAdShow(){
if(vm.formData.adShowFlag == 1 && vm.formData.adModuleDto == null){
vm.formData.adModuleDto = {
linkType: 8, // 跳转类型:1 链接,4 模块, 8 无跳转
name: "", // 模块名称
paramFlag: 0, // 是否有参数标志1为有2为没有参数
paramList: [
{
id: "",
seqNo: '', // 选择参数的索引值
value: '',
key: '', // 参数名称,默认param
type:'' // 模块参数类型:1 int类型字符串 4String类型 8时间戳类型字符串
}
],
paramList2: [],
type: 0 // 类型:1 列表页,4 详情页
};
}
}
}
}
......
......@@ -245,3 +245,13 @@ export const saveRankConfig = (params) => {
};
export const getExamAwardList = (params) => {
return fetch({
headers,
url: getBaseUrl(`onlineexam/getExamAwardList`),
method: 'get',
data: params,
description: '获取有奖问答关联考试',
})
};
......@@ -404,6 +404,26 @@
<!--<p class="upload-message" v-if="uploadImgMessage2">请选择直播封面</p>-->
</div>
<el-form-item label="是否显示有奖问答tab" v-if="idType == 1">
<el-radio-group v-model="formData.qa" size="small" @change="changeTab">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="有奖问答关联考试" v-if="idType == 1 && formData.qa == 1" class="required-label">
<el-col :span="18">
<el-select filterable v-model="formData.qaId" placeholder="请选择有奖问答关联考试" style="width:88%">
<el-option
v-for="item2 in examAwardList"
:key="item2.id"
:label="item2.name"
:value="item2.id">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="直播角色" v-if="formData.streamType == 1">
<div style="color:#666666;font-size:10px;">主播(必填)</div>
......@@ -571,7 +591,7 @@
import { isEmptyUtils, openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath, unsubscribe} from "../../utils/qiniu-util";
import { checkMobile } from '../../utils/patients/checkValid';
import { getRtcInfo, getImages, searchDoc} from "../../utils/yqrange/yqrangeApi";
import { getRtcInfo, getImages, searchDoc, getExamAwardList} from "../../utils/yqrange/yqrangeApi";
import Cropper from '@/components/common/cropper.vue';
import SearchDoctor from "@/components/yqrange/search-doctor";
// import { ossUpload, getFilePathForOSS } from "@/utils/oss/ossUtil";
......@@ -670,8 +690,11 @@
}],
isSign: 0,
signMinute: "",
isAppPush: 0
isAppPush: 0,
qa:0,
qaId: ""
},
examAwardList: [],
checked: false,
signFlag: false,
tabFlag: "0",
......@@ -679,6 +702,7 @@
backgroundImageUrlTemp: "",
backgroundImages: [],
backgroundImageUrl: "",
introTextNum: 0,
rtcIntroducesText:[],
rtcIntroducesImages: [],
......@@ -716,14 +740,15 @@
oriUrl: '', // 原图
},
cropperIndex: "",
nowInput: 0,
idType: "",
pickerOptions0: {
disabledDate: time => {
// 在科学计数法中,为了使公式简便,可以用带“E”的格式表示。例如1.03乘10的8次方,可简写为“1.03e8”的形式
// 一天是24*60*60*1000 = 86400000 = 8.64e7
// console.log('this.maxDate',this.maxDate)
return time.getTime() < Date.now() - 8.64e7
},
nowInput: 0
}
},
rules: {
name: [
......@@ -807,7 +832,7 @@
vm = this;
// 区分内部用户和外部用户
let idType = localStorage.getItem('storageIdType');
this.idType = localStorage.getItem('storageIdType');
this.circleId = this.$route.query.circleId;
this.circleName = this.$route.query.circleName;
this.curmbSecond = "圈子管理-" + this.circleName;
......@@ -828,6 +853,7 @@
this.curmbThird = "编辑直播";
this.initRtcInfo(this.rtcId);
}
this.getExamAwardList();
},
methods: {
......@@ -922,6 +948,33 @@
// this.$message.warning('正在上传,请稍等')
// }
},
getExamAwardList(){
let req = null;
getExamAwardList(req).then(function (res) {
if(res.code == "000000") {
vm.examAwardList = res.data;
// vm.formData = res.data;
}
}).catch(function (error) {
vm.$message.error(error);
});
},
checkQaId(){
if(vm.formData.qa == 1 && vm.formData.qaId == null){
vm.$message.error("请选择有奖问答关联考试!");
return false;
}
else {
return true;
}
},
//上传直播简介
beforeUploadPic1(file) {
vm.cropperIndex = 10;
......@@ -1805,6 +1858,17 @@
if(!this.checkTab()){
return;
}
// 内部运营人员
if(this.idType == 1){
// 检查有奖问答关联考试
if(!this.checkQaId()){
return;
}
if(this.formData.qa == 0){
this.formData.qaId = null;
}
}
// 校验嘉宾姓名和手机号
if(!this.checkGuests()){
......
......@@ -87,8 +87,8 @@ export default {
},
created() {
const {id, name, activeName, roleType} = this.$route.query;
// this.idType = localStorage.getItem('storageIdType');
this.idType = 1;// TODO
this.idType = localStorage.getItem('storageIdType');
// this.idType = 1;// TODO
this.circleId = id;
this.name = name;
this.activeName = activeName;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册