diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index b83b8f96..8c50040f 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -361,7 +361,7 @@ pathBgId === item.code ? '2px solid rgba(78, 166, 255, 1)' : '1px solid #ccc', - 'background-image': 'url(' + item.value + ')', + 'background-image': 'url(' + item.value.split(',')[0] + ')', display: index >= 5 ? 'none' : 'flex', }" style="background-size: 100% 100%" @@ -690,7 +690,7 @@ pathBgId === item.code ? '2px solid rgba(78, 166, 255, 1)' : '1px solid #ccc', - 'background-image': 'url(' + item.value + ')', + 'background-image': 'url(' + item.value.split(',')[0] + ')', }" > @@ -891,12 +891,14 @@ export default { const chooseImg = (item) => { console.log(item); state.pathBgId = item.code; - state.pathBg = item.value; + state.pathBg = item.value.split(',')[0]; + state.mobilePicUrl = item.value.split(',')[1]; }; const chooseImg2 = (item) => { // console.log(item); state.pathBgId = item.code; - state.pathBg = item.value; + state.pathBg = item.value.split(',')[0]; + state.mobilePicUrl = item.value.split(',')[1]; }; //发布弹窗 const showPub = (router) => { @@ -1212,8 +1214,8 @@ export default { status: 0, organizationId: state.organizationSelectId, organizationName: state.organizationSelectName, - picUrl: state.pathBg.split(',')[0], - mobilePicUrl: state.pathBg.split(',')[1], + picUrl: state.pathBg, + mobilePicUrl: state.mobilePicUrl, }).then(id => { message.destroy(); message.success("创建成功"); @@ -1333,8 +1335,8 @@ export default { let obj = { routerId: state.editPathId, name: state.pathName, - picUrl: state.pathBg.split(',')[0], - mobilePicUrl: state.pathBg.split(',')[1], + picUrl: state.pathBg, + mobilePicUrl: state.mobilePicUrl, remark: state.pathIntro, organizationName: state.organizationSelectName, organizationId: state.organizationSelectId, @@ -1515,6 +1517,7 @@ export default { let detail = res.data.data.routerInfo; state.pathName = detail.name; state.pathBg = detail.picUrl; + state.mobilePicUrl = detail.mobilePicUrl; state.pathBgId = ""; state.organizationSelectName = detail.organizationName; state.organizationSelectId = detail.organizationId;