optimize: make page share reward
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
<uni-icons type="cloud-download" size="20" color="#888"></uni-icons>
|
||||
<view>保存</view>
|
||||
</button>
|
||||
<button open-type="share" class="btn primary" @tap="shareOrSave">
|
||||
<button open-type="share" class="btn primary">
|
||||
<uni-icons
|
||||
type="paperplane-filled"
|
||||
size="20"
|
||||
@@ -590,12 +590,16 @@ const preview = async () => {
|
||||
return;
|
||||
}
|
||||
const tempPath = await saveByCanvas(true);
|
||||
saveRecordRequest(tempPath, cardId.value || "", "card_generate");
|
||||
id = createCard();
|
||||
shareOrSave(id);
|
||||
saveRecordRequest(tempPath, id, "card_generate");
|
||||
|
||||
// uni.showToast({ title: '已保存到相册', icon: 'checkmarkempty' })
|
||||
};
|
||||
|
||||
const shareOrSave = async (id) => {
|
||||
if (!id) id = createCard();
|
||||
|
||||
const tempPath = await saveByCanvas(false);
|
||||
const imageUrl = await uploadImage(tempPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user