feat: 一些bug修复
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import { PAPER_SIZE } from '../constants/colors';
|
||||
import { downloadPrint, tryUnlockWithRewardedAd } from '../utils/downloadPrint';
|
||||
import {
|
||||
shouldShowShareGuide,
|
||||
shouldUnlockWithAd,
|
||||
} from '../utils/shareGuide';
|
||||
import { shouldShowShareGuide, shouldUnlockWithAd } from '../utils/shareGuide';
|
||||
import { BaseDrawService } from '../core/draw/baseDraw';
|
||||
import tracker from '../utils/tracker';
|
||||
import { defaultShareConfig } from '../config/config';
|
||||
@@ -411,24 +408,19 @@ export function getPageCommonMethods(config: PageCommonMethodsConfig = {}) {
|
||||
quality: 1,
|
||||
});
|
||||
|
||||
console.log('sourcePath', sourcePath);
|
||||
|
||||
const processed = await debugPublishTools.processImage({
|
||||
sourcePath,
|
||||
settings: detail.settings,
|
||||
});
|
||||
console.log('processed', processed);
|
||||
|
||||
const cloudPath = buildWorksheetPreviewCloudPath(
|
||||
publishMeta.category,
|
||||
publishMeta.id,
|
||||
);
|
||||
console.log('cloudPath', cloudPath);
|
||||
const uploadRes = await wx.cloud.uploadFile({
|
||||
cloudPath,
|
||||
filePath: processed.tempFilePath,
|
||||
});
|
||||
console.log('uploadRes', uploadRes);
|
||||
|
||||
const cloudCall = (await wx.cloud.callFunction({
|
||||
name: 'worksheetsPublish',
|
||||
@@ -439,13 +431,11 @@ export function getPageCommonMethods(config: PageCommonMethodsConfig = {}) {
|
||||
})) as {
|
||||
result?: { success?: boolean; message?: string };
|
||||
};
|
||||
console.log('cloudCall', cloudCall);
|
||||
if (!cloudCall.result?.success) {
|
||||
throw new Error(
|
||||
cloudCall.result?.message || '云端写入失败',
|
||||
);
|
||||
}
|
||||
console.log('success');
|
||||
this.setData({
|
||||
debugPublishVisible: false,
|
||||
debugPublishMeta: {
|
||||
|
||||
Reference in New Issue
Block a user