111
This commit is contained in:
+33
-18
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user