|
@@ -11,6 +11,7 @@
|
|
|
<el-form-item label="分享路径" prop="article_share_url_path">
|
|
|
<el-input v-model="registerForm.article_share_url_path" autocomplete="off" placeholder="请输入分享路径" @blur="handleTrim('registerForm','article_share_url_path')" maxlength="200">
|
|
|
</el-input>
|
|
|
+ <p class="tips">域名+/#/share 例如https://21st.helxsoft.cn/#/share</p>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分享默认封面" prop="cert_file_List">
|
|
|
<upload :datafileList="registerForm.cert_file_List" :changeFillId="handleAvatarSuccess" :fileName="'courseResource'" :filleNumber="1" :showList="true" />
|
|
@@ -21,6 +22,15 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="分享默认头像" prop="person_file_List">
|
|
|
+ <upload :datafileList="registerForm.person_file_List" :changeFillId="handleAvatarSuccess" :fileName="'personImage'" :filleNumber="1" :showList="true" />
|
|
|
+ <ul v-if="registerForm.person_file_List.length>0" class="resource-list">
|
|
|
+ <li v-for="(itemR,indexR) in registerForm.person_file_List" :key="indexR">
|
|
|
+ <a @click="handlePreview(itemR)"><svg-icon icon-class="jpg" class="icon-logo"></svg-icon><span>{{itemR.name}}</span></a>
|
|
|
+ <i class="el-icon-delete" @click="handleDelResource(indexR,'personImage')"></i>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSubmit('registerForm')" size="small" :loading="loading">保存</el-button>
|
|
|
<el-button @click="onCancel('registerForm')" size="small">取消</el-button>
|
|
@@ -85,7 +95,9 @@ export default {
|
|
|
registerForm:{
|
|
|
article_share_url_path: '',
|
|
|
article_share_default_cover_image_id: '',
|
|
|
- cert_file_List: []
|
|
|
+ cert_file_List: [],
|
|
|
+ person_file_List: [],
|
|
|
+ article_share_default_person_image_id: ''
|
|
|
},
|
|
|
rulesRegister:{
|
|
|
},
|
|
@@ -120,7 +132,8 @@ export default {
|
|
|
let MethodName = "/OrgServer/Manager/SysConfigManager/SetSysConfig_Share";
|
|
|
let data = {
|
|
|
article_share_url_path: this.registerForm.article_share_url_path,
|
|
|
- article_share_default_cover_image_id: this.registerForm.article_share_default_cover_image_id
|
|
|
+ article_share_default_cover_image_id: this.registerForm.article_share_default_cover_image_id,
|
|
|
+ article_share_default_person_image_id: this.registerForm.article_share_default_person_image_id
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
|
.then((res) => {
|
|
@@ -157,24 +170,44 @@ export default {
|
|
|
}else{
|
|
|
this.registerForm.cert_file_List = []
|
|
|
}
|
|
|
+ if(res.article_share_default_person_image_id){
|
|
|
+ this.registerForm.person_file_List = [
|
|
|
+ {
|
|
|
+ id: res.article_share_default_person_image_id,
|
|
|
+ name: '默认分享头像.png'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }else{
|
|
|
+ this.registerForm.person_file_List = []
|
|
|
+ }
|
|
|
}
|
|
|
}).catch((res) =>{
|
|
|
|
|
|
})
|
|
|
},
|
|
|
handleAvatarSuccess(fileList,name) {
|
|
|
- this.registerForm.cert_file_List = fileList
|
|
|
- this.registerForm.article_share_default_cover_image_id = fileList[0]&&fileList[0].response&&fileList[0].response.file_info_list&&fileList[0].response.file_info_list[0]?fileList[0].response.file_info_list[0].file_id:''
|
|
|
+ if(name==='personImage'){
|
|
|
+ this.registerForm.person_file_List = fileList
|
|
|
+ this.registerForm.article_share_default_person_image_id = fileList[0]&&fileList[0].response&&fileList[0].response.file_info_list&&fileList[0].response.file_info_list[0]?fileList[0].response.file_info_list[0].file_id:''
|
|
|
+ }else{
|
|
|
+ this.registerForm.cert_file_List = fileList
|
|
|
+ this.registerForm.article_share_default_cover_image_id = fileList[0]&&fileList[0].response&&fileList[0].response.file_info_list&&fileList[0].response.file_info_list[0]?fileList[0].response.file_info_list[0].file_id:''
|
|
|
+ }
|
|
|
+
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
// 删除资源文件
|
|
|
- handleDelResource(i){
|
|
|
+ handleDelResource(i,type){
|
|
|
this.$confirm("确定删除吗?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
- this.registerForm.cert_file_List.splice(i, 1);
|
|
|
+ if(type){
|
|
|
+ this.registerForm.person_file_List.splice(i, 1);
|
|
|
+ }else{
|
|
|
+ this.registerForm.cert_file_List.splice(i, 1);
|
|
|
+ }
|
|
|
this.$forceUpdate()
|
|
|
});
|
|
|
},
|
|
@@ -279,6 +312,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.tips{
|
|
|
+ margin: 0;
|
|
|
+ color: #86909C;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 20px;
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss">
|