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

Merge branch 'dev-circle-eight-20201103' into 'release'

小生态1.8.0期,Code Review:bo.dang



See merge request !228
此差异已折叠。
此差异已折叠。
...@@ -171,6 +171,79 @@ export const getCircleDept = (params) => { ...@@ -171,6 +171,79 @@ export const getCircleDept = (params) => {
}) })
}; };
export const getCircleAds = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/ad/${params.circleId}`),
method: 'get',
data: params,
description: '查询广告栏位信息',
})
};
export const saveCircleAds = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/ad/save`),
method: 'post',
data: params,
description: 'B端保存广告栏位信息',
})
};
export const getLinkType = (params) => {
return fetch({
headers,
url: getBaseUrl(`contents/commonComstant/selectByTypeCode?code=${params.code}`),
method: 'get',
data: params,
description: '获取链接类型下拉数据',
})
};
export const getModuleData = (params) => {
return fetch({
headers,
url: getBaseUrl(`contents/moduleConfig/selectName`),
method: 'get',
data: params,
description: '获取模块下拉数据',
})
};
export const getParamData = (params) => {
return fetch({
headers,
url: getBaseUrl(`contents/moduleConfig/selectParam?id=${params.id}`),
method: 'get',
data: params,
description: '获取参数下拉数据',
})
};
export const getRankConfig = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/rank/config?circleId=${params.circleId}`),
method: 'get',
data: params,
description: '获取排行榜配置',
})
};
export const saveRankConfig = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/rank/config/save`),
method: 'post',
data: params,
description: '保存排行榜配置'
})
};
export const getGoodsExportUrl = (params) => { export const getGoodsExportUrl = (params) => {
return fetch({ return fetch({
headers, headers,
...@@ -193,3 +266,13 @@ export const getOrdersExportUrl = (params) => { ...@@ -193,3 +266,13 @@ export const getOrdersExportUrl = (params) => {
}; };
export const getExamAwardList = (params) => {
return fetch({
headers,
url: getBaseUrl(`onlineexam/getExamAwardList`),
method: 'get',
data: params,
description: '获取有奖问答关联考试',
})
};
...@@ -251,6 +251,18 @@ export default { ...@@ -251,6 +251,18 @@ export default {
.then((res) => { .then((res) => {
// debugger; // debugger;
this.isOutsideGetted = true; this.isOutsideGetted = true;
// if (res.code == '000000') {
// if (res.data.code == "yes") { // 外部用户,siderbar只展示一个:学分发放管理页面
// // TODO this.isOutsideUser = true;
// this.isOutsideUser = false;
// this.$store.dispatch('cmeStore/updateOutUserStatus', true);
// if (currentPath && currentPath == '/apply-detail') { // 申请明细页面 则刷新时不重定向
// return;
// }
// //TODO this.$router.replace({
// // path: '/credit-send-manage'
// // });
// } else { // 非外部用户 正常展示多路由
if (res.code == "000000") { if (res.code == "000000") {
console.log("getUserType() : res.data.code = " + res.data.code); console.log("getUserType() : res.data.code = " + res.data.code);
// this.getSlideData(); // this.getSlideData();
...@@ -567,6 +579,18 @@ export default { ...@@ -567,6 +579,18 @@ export default {
}); });
}, },
// judge/menu
setCircleSlide() {
circleMenu({}).then((res) => {
if (res.data === true) {
this.items[2].subs.push({
title: '新建小圈权限分配',
icon: 'el-icon-setting',
index: 'circle-limit'
})
}
})
},
goToMessageSendPage(checkAuth) { goToMessageSendPage(checkAuth) {
if (checkAuth) { if (checkAuth) {
utils.checkAuthFunc().then((res) => { utils.checkAuthFunc().then((res) => {
......
...@@ -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()){
......
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
<el-tab-pane label="应用配置" name="fourth"> <el-tab-pane label="应用配置" name="fourth">
<range-setting></range-setting> <range-setting></range-setting>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="广告位管理" name="five" v-if="idType == 1">
<ads-manage></ads-manage>
</el-tab-pane>
<el-tab-pane label="排行榜管理" name="six" v-if="idType == 1">
<gp-ranking></gp-ranking>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div v-if="active == 4"> <div v-if="active == 4">
...@@ -39,8 +45,12 @@ import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting ...@@ -39,8 +45,12 @@ import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting
import LiveManage from "./live-manage"; import LiveManage from "./live-manage";
import RangeSetting from "./range-setting"; import RangeSetting from "./range-setting";
import Mebman from "../../components/yqrange/mebman"; import Mebman from "../../components/yqrange/mebman";
import AdsManage from "../../components/yqrange/ads-manage";
import GpRanking from "../../components/yqrange/gp-ranking";
export default { export default {
components: { components: {
GpRanking,
AdsManage,
Mebman, Mebman,
RangeSetting, RangeSetting,
LiveManage, LiveManage,
...@@ -71,11 +81,14 @@ export default { ...@@ -71,11 +81,14 @@ export default {
circleId: null, circleId: null,
name: "", name: "",
active: 0, active: 0,
roleType: '' roleType: '',
idType: ''
} }
}, },
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 = 1;// TODO
this.circleId = id; this.circleId = id;
this.name = name; this.name = name;
this.activeName = activeName; this.activeName = activeName;
......
...@@ -86,7 +86,9 @@ export default { ...@@ -86,7 +86,9 @@ export default {
if(res.code == "000000") { if(res.code == "000000") {
this.settingForm.settingData = res.data; this.settingForm.settingData = res.data;
} else { } else {
// this.$message.error(res.data.message);
this.settingForm.settingData = []; this.settingForm.settingData = [];
} }
if(this.settingForm.settingData == [] || this.settingForm.settingData.length == 0){ if(this.settingForm.settingData == [] || this.settingForm.settingData.length == 0){
...@@ -106,9 +108,14 @@ export default { ...@@ -106,9 +108,14 @@ export default {
{ {
appTag: 4, appTag: 4,
showOff: 1 showOff: 1
},
{
appTag: 5,
showOff: 0
}]; }];
} }
for(let i = 0; i < this.settingForm.settingData.length; i++){ for(let i = 0; i < this.settingForm.settingData.length; i++){
if(this.settingForm.settingData[i].appTag == 1){ if(this.settingForm.settingData[i].appTag == 1){
this.settingForm.settingData[i].appTagName = "教培" this.settingForm.settingData[i].appTagName = "教培"
...@@ -122,9 +129,11 @@ export default { ...@@ -122,9 +129,11 @@ export default {
else if(this.settingForm.settingData[i].appTag == 4){ else if(this.settingForm.settingData[i].appTag == 4){
this.settingForm.settingData[i].appTagName = "职称培训" this.settingForm.settingData[i].appTagName = "职称培训"
} }
else if(this.settingForm.settingData[i].appTag == 5){
this.settingForm.settingData[i].appTagName = "云鹊豆商城"
}
} }
}).catch((error) => { }).catch((error) => {
this.$message.error("请重试"); this.$message.error("请重试");
}) })
......
...@@ -167,7 +167,8 @@ export default { ...@@ -167,7 +167,8 @@ export default {
settingForm:{ settingForm:{
circleId: null, circleId: null,
settingData: [] settingData: []
} },
idType: ""
} }
}, },
created() { created() {
...@@ -179,21 +180,21 @@ export default { ...@@ -179,21 +180,21 @@ export default {
tabChangeHandler(tab) {}, tabChangeHandler(tab) {},
initPrivilege(){ initPrivilege(){
let idType = localStorage.getItem('storageIdType'); this.idType = localStorage.getItem('storageIdType');
// if(idType == null || idType == ""){ // if(idType == null || idType == ""){
// idType = 2; // idType = 2;
// localStorage.setItem('storageIdType', idType); // localStorage.setItem('storageIdType', idType);
// } // }
this.searchForm.userType = idType; this.searchForm.userType = this.idType;
// 内部用户:运营人员 // 内部用户:运营人员
if(idType == "1"){ if(this.idType == "1"){
this.showAllFlag = true; this.showAllFlag = true;
this.showNewFlag = true; this.showNewFlag = true;
this.showApplyFlag = true; this.showApplyFlag = true;
} }
// 外部用户 // 外部用户
else if(idType == "2"){ else if(this.idType == "2"){
this.showAllFlag = false; this.showAllFlag = false;
setTimeout(() => { setTimeout(() => {
this.getUserAuth(); this.getUserAuth();
...@@ -355,7 +356,7 @@ export default { ...@@ -355,7 +356,7 @@ export default {
id: row.id, id: row.id,
name: row.name, name: row.name,
activeName: 'first', activeName: 'first',
roleType: row.roleId roleType: row.roleId,
} }
}) })
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册