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

广告位配置和排行榜配置

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