111
This commit is contained in:
parent
4544b678d0
commit
05ef454ac8
@ -184,7 +184,13 @@ const api = {
|
||||
},
|
||||
readRecord(data){
|
||||
return request('/user/case/read',data,'post',false,'application/json');
|
||||
}
|
||||
},
|
||||
updateExchange(id,data){
|
||||
return request('/exchange/'+id, data, 'put',true,'application/json');
|
||||
},
|
||||
delExchange(id){
|
||||
return request('/exchange/'+id, {}, 'delete',true);
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1617,7 +1617,7 @@ const readRecord= async()=>{
|
||||
if(type.value=='article'){
|
||||
flag=1;
|
||||
}else if(type.value=='video'){
|
||||
flag=1;
|
||||
flag=2;
|
||||
}else{
|
||||
flag=3;
|
||||
}
|
||||
|
||||
@ -152,6 +152,12 @@ const recommend_hospital=ref([]);
|
||||
const numInfo=reactive({})
|
||||
const goDetail = (id,isLink,src) => {
|
||||
if(isLink==1){
|
||||
api.readRecord({
|
||||
type:1,
|
||||
id:id
|
||||
}).then(res=>{
|
||||
|
||||
})
|
||||
// #ifdef MP-WEIXIN
|
||||
navTo({
|
||||
url: `/pages/web/web?src=${src}`,
|
||||
|
||||
@ -262,6 +262,10 @@ const queryList = (pageNo, pageSize) => {
|
||||
margin-left: 30rpx;
|
||||
|
||||
}
|
||||
:deep(.u-dropdown__menu__item__text){
|
||||
font-size: 14px!important;
|
||||
color:rgb(60, 156, 255)!important;
|
||||
}
|
||||
.deal {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
|
||||
@ -835,8 +835,8 @@ const getExchangeDetail = (id) => {
|
||||
});
|
||||
form.exchange_content = exchange_content;
|
||||
form.exchange_title = exchange_title;
|
||||
form.case_exchange_label = exchange_label;
|
||||
labelList.value = exchange_label;
|
||||
form.case_exchange_label = exchange_label? exchange_label:[];
|
||||
labelList.value = exchange_label?exchange_label:[];
|
||||
form.exchange_summary = exchange_summary;
|
||||
form.case_exchange_vote = exchange_vote;
|
||||
editorCtxResult.value.initHtml(exchange_summary,async (videoUrl) => {
|
||||
@ -931,6 +931,7 @@ const alertSave = async () => {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const publish = async () => {
|
||||
const initInfo =
|
||||
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p>";
|
||||
@ -966,16 +967,30 @@ const publish = async () => {
|
||||
const resContent = await editorCtxResult.value.getLastContent();
|
||||
let reshtml = editorCtxResult.value.exportHtml(resContent.html);
|
||||
form.exchange_summary = reshtml=="<p><br></p>"?'':reshtml;
|
||||
api.addExchange(form).then((res) => {
|
||||
uni.showToast({
|
||||
title: "发布成功",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
isFlag.value = false;
|
||||
isPublish.value = true;
|
||||
uni.navigateBack()
|
||||
});
|
||||
if(exchange_id.value){
|
||||
api.updateExchange(exchange_id.value,form).then((res) => {
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
isFlag.value = false;
|
||||
isPublish.value = true;
|
||||
uni.navigateBack()
|
||||
});
|
||||
}else{
|
||||
api.addExchange(form).then((res) => {
|
||||
uni.showToast({
|
||||
title: "发布成功",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
isFlag.value = false;
|
||||
isPublish.value = true;
|
||||
uni.navigateBack()
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
const handleUpload = (file) => {
|
||||
api
|
||||
@ -1310,6 +1325,8 @@ const openLabelPop=()=>{
|
||||
onLoad((optoions) => {
|
||||
if(optoions.exchange_id){
|
||||
exchange_id.value=optoions.exchange_id;
|
||||
console.log(1111)
|
||||
console.log(exchange_id.value)
|
||||
}
|
||||
//getDraftList();
|
||||
|
||||
|
||||
@ -471,6 +471,12 @@ const formatdate=(date)=>{
|
||||
const goDetail=(id,isLink,src)=>{
|
||||
console.log(isLink)
|
||||
if(isLink==1){
|
||||
api.readRecord({
|
||||
type:isArticle.value?1:2,
|
||||
id:id
|
||||
}).then(res=>{
|
||||
|
||||
})
|
||||
// #ifdef MP-WEIXIN
|
||||
navTo({
|
||||
url: `/pages/web/web?src=${src}`,
|
||||
|
||||
@ -531,7 +531,17 @@ const htmlToText=(html)=>{
|
||||
|
||||
const confirmDel = () => {
|
||||
//删除
|
||||
api.delExchange(dealId.value).then((res) => {
|
||||
uni.showToast({
|
||||
title: "删除成功",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
});
|
||||
let index=dataList.value.findIndex( item =>item.exchange_id=== dealId.value)
|
||||
dataList.value.splice(index, 1);
|
||||
showModal.value = false;
|
||||
//paging.value.refresh();
|
||||
};
|
||||
|
||||
const closeDealPop = () => {
|
||||
@ -561,7 +571,6 @@ onLoad((options) => {
|
||||
getCaseLabel(1,0)
|
||||
});
|
||||
onShow(()=>{
|
||||
|
||||
paging.value?.refresh();
|
||||
})
|
||||
const changeDate=(e)=>{
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
unpackage/dist/dev/mp-weixin/api/api.js
vendored
6
unpackage/dist/dev/mp-weixin/api/api.js
vendored
@ -180,6 +180,12 @@ const api = {
|
||||
},
|
||||
readRecord(data) {
|
||||
return utils_request.request("/user/case/read", data, "post", false, "application/json");
|
||||
},
|
||||
updateExchange(id, data) {
|
||||
return utils_request.request("/exchange/" + id, data, "put", true, "application/json");
|
||||
},
|
||||
delExchange(id) {
|
||||
return utils_request.request("/exchange/" + id, {}, "delete", true);
|
||||
}
|
||||
};
|
||||
exports.api = api;
|
||||
|
||||
@ -673,7 +673,7 @@ const _sfc_main = {
|
||||
if (type.value == "article") {
|
||||
flag = 1;
|
||||
} else if (type.value == "video") {
|
||||
flag = 1;
|
||||
flag = 2;
|
||||
} else {
|
||||
flag = 3;
|
||||
}
|
||||
|
||||
@ -27,6 +27,11 @@ const _sfc_main = {
|
||||
const numInfo = common_vendor.reactive({});
|
||||
const goDetail = (id, isLink, src) => {
|
||||
if (isLink == 1) {
|
||||
api_api.api.readRecord({
|
||||
type: 1,
|
||||
id
|
||||
}).then((res) => {
|
||||
});
|
||||
utils_navTo.navTo({
|
||||
url: `/pages/web/web?src=${src}`
|
||||
});
|
||||
|
||||
@ -81,6 +81,10 @@
|
||||
flex: none;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.u-page.data-v-1cf734f5 .u-dropdown__menu__item__text {
|
||||
font-size: 14px !important;
|
||||
color: #3c9cff !important;
|
||||
}
|
||||
.u-page .deal.data-v-1cf734f5 {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
|
||||
@ -288,8 +288,8 @@ const _sfc_main = {
|
||||
});
|
||||
form.exchange_content = exchange_content;
|
||||
form.exchange_title = exchange_title;
|
||||
form.case_exchange_label = exchange_label;
|
||||
labelList.value = exchange_label;
|
||||
form.case_exchange_label = exchange_label ? exchange_label : [];
|
||||
labelList.value = exchange_label ? exchange_label : [];
|
||||
form.exchange_summary = exchange_summary;
|
||||
form.case_exchange_vote = exchange_vote;
|
||||
editorCtxResult.value.initHtml(exchange_summary, async (videoUrl) => {
|
||||
@ -397,16 +397,29 @@ const _sfc_main = {
|
||||
const resContent = await editorCtxResult.value.getLastContent();
|
||||
let reshtml = editorCtxResult.value.exportHtml(resContent.html);
|
||||
form.exchange_summary = reshtml == "<p><br></p>" ? "" : reshtml;
|
||||
api_api.api.addExchange(form).then((res2) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "发布成功",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
if (exchange_id.value) {
|
||||
api_api.api.updateExchange(exchange_id.value, form).then((res2) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
isFlag.value = false;
|
||||
isPublish.value = true;
|
||||
common_vendor.index.navigateBack();
|
||||
});
|
||||
isFlag.value = false;
|
||||
isPublish.value = true;
|
||||
common_vendor.index.navigateBack();
|
||||
});
|
||||
} else {
|
||||
api_api.api.addExchange(form).then((res2) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "发布成功",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
isFlag.value = false;
|
||||
isPublish.value = true;
|
||||
common_vendor.index.navigateBack();
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleUpload = (file) => {
|
||||
api_api.api.getOss({
|
||||
@ -439,7 +452,7 @@ const _sfc_main = {
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1013", err);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1028", err);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -469,7 +482,7 @@ const _sfc_main = {
|
||||
return randomNumber;
|
||||
};
|
||||
const getImageFormat = (imageUrl) => {
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1043", imageUrl);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1058", imageUrl);
|
||||
const lastDotIndex = imageUrl.lastIndexOf(".");
|
||||
if (lastDotIndex !== -1) {
|
||||
return imageUrl.substring(lastDotIndex + 1);
|
||||
@ -501,7 +514,7 @@ const _sfc_main = {
|
||||
//从相册选择
|
||||
extension: [".mp4", ".webm", ".ogg"],
|
||||
success: function(res) {
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1070", res.tempFilePath);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1085", res.tempFilePath);
|
||||
HandleAddVideo(res.tempFilePath);
|
||||
}
|
||||
});
|
||||
@ -539,7 +552,7 @@ const _sfc_main = {
|
||||
async success(res2) {
|
||||
if (res2.statusCode === 204) {
|
||||
let url = host + "/" + dir + filename + imgType;
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1112", editorCtx2);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1127", editorCtx2);
|
||||
let imgUrl = "https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg";
|
||||
const fileThumbnail = await editorCtx2.createCoverThumbnail(
|
||||
imgUrl
|
||||
@ -553,7 +566,7 @@ const _sfc_main = {
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1127", err);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1142", err);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -594,7 +607,7 @@ const _sfc_main = {
|
||||
break;
|
||||
}
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1172", caseValue1);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1187", caseValue1);
|
||||
getCaseLabel(2, e);
|
||||
};
|
||||
const groupChange2 = (e) => {
|
||||
@ -693,7 +706,7 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
labelList.value = labelList.value.filter((item, index) => labelList.value.findIndex((i) => i.app_iden === item.app_iden) === index);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1290", labelList.value);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1305", labelList.value);
|
||||
showCase.value = false;
|
||||
};
|
||||
const closeCase = () => {
|
||||
@ -714,6 +727,8 @@ const _sfc_main = {
|
||||
common_vendor.onLoad((optoions) => {
|
||||
if (optoions.exchange_id) {
|
||||
exchange_id.value = optoions.exchange_id;
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1328", 1111);
|
||||
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1329", exchange_id.value);
|
||||
}
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
|
||||
@ -265,6 +265,11 @@ const _sfc_main = {
|
||||
const goDetail = (id, isLink, src) => {
|
||||
common_vendor.index.__f__("log", "at pages/search/search.vue:472", isLink);
|
||||
if (isLink == 1) {
|
||||
api_api.api.readRecord({
|
||||
type: isArticle.value ? 1 : 2,
|
||||
id
|
||||
}).then((res) => {
|
||||
});
|
||||
utils_navTo.navTo({
|
||||
url: `/pages/web/web?src=${src}`
|
||||
});
|
||||
@ -401,7 +406,7 @@ const _sfc_main = {
|
||||
});
|
||||
};
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
common_vendor.index.__f__("log", "at pages/search/search.vue:620", 666666);
|
||||
common_vendor.index.__f__("log", "at pages/search/search.vue:626", 666666);
|
||||
const params = {
|
||||
page: pageNo,
|
||||
page_size: pageSize
|
||||
|
||||
@ -227,6 +227,15 @@ const _sfc_main = {
|
||||
return html.replace(/<[^>]*>/g, "").replace(/ /gi, " ").replace(/<br\s*\/?>/gi, "\n").replace(/<img\s[^>]*>/gi, "").replace(/<video[^>]*>[\s\S]*?/gi, "");
|
||||
};
|
||||
const confirmDel = () => {
|
||||
api_api.api.delExchange(dealId.value).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "删除成功",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
});
|
||||
let index = dataList.value.findIndex((item) => item.exchange_id === dealId.value);
|
||||
dataList.value.splice(index, 1);
|
||||
showModal.value = false;
|
||||
};
|
||||
const closeDealPop = () => {
|
||||
@ -297,7 +306,7 @@ const _sfc_main = {
|
||||
});
|
||||
};
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:606", 666666);
|
||||
common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:615", 666666);
|
||||
const params = {
|
||||
page: pageNo,
|
||||
page_size: pageSize
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user