|
@@ -236,11 +236,12 @@ async function publish() {
|
|
|
toast('请上传图片');
|
|
toast('请上传图片');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ const prePublishId = (await prePublish()).id;
|
|
|
const data = {
|
|
const data = {
|
|
|
title: title.value,
|
|
title: title.value,
|
|
|
content: content.value,
|
|
content: content.value,
|
|
|
images: images.value.map((image) => image.localUrl),
|
|
images: images.value.map((image) => image.localUrl),
|
|
|
- recommendPath: makeOfficialPublishLinkPathAndParams('/pages/index', (await prePublish()).id),
|
|
|
|
|
|
|
+ recommendPath: makeOfficialPublishLinkPathAndParams('/pages/index', prePublishId),
|
|
|
recommendTitle: '亮乡源',
|
|
recommendTitle: '亮乡源',
|
|
|
tags: [
|
|
tags: [
|
|
|
'亮乡源',
|
|
'亮乡源',
|
|
@@ -251,7 +252,7 @@ async function publish() {
|
|
|
(uni as any).shareToOfficialAccount({
|
|
(uni as any).shareToOfficialAccount({
|
|
|
...data,
|
|
...data,
|
|
|
success: (postObj: { postUrl: string }) => {
|
|
success: (postObj: { postUrl: string }) => {
|
|
|
- onPublishSuccess(postObj);
|
|
|
|
|
|
|
+ onPublishSuccess(postObj, prePublishId);
|
|
|
uni.removeStorageSync('postDraft');
|
|
uni.removeStorageSync('postDraft');
|
|
|
toast('发布成功, 文章可能需要等待微信审核,稍后才能展示');
|
|
toast('发布成功, 文章可能需要等待微信审核,稍后才能展示');
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|