make yunshi page
This commit is contained in:
@@ -215,8 +215,8 @@ const greetingLib = [
|
||||
];
|
||||
|
||||
onLoad((options) => {
|
||||
// cardId.value = "69674f307307beac4519025f";
|
||||
createCard();
|
||||
cardId.value = "69674f307307beac4519025f";
|
||||
// createCard();
|
||||
});
|
||||
|
||||
const createCard = async () => {
|
||||
@@ -321,27 +321,27 @@ const preview = () => {
|
||||
};
|
||||
|
||||
const shareOrSave = async () => {
|
||||
const tempPath = await saveByCanvas(false);
|
||||
const fileKeyRes = await uni.uploadFile({
|
||||
url: "https://api.ai-meng.com/api/common/upload",
|
||||
filePath: tempPath,
|
||||
name: "file", // 和后端接收文件字段名一致
|
||||
header: {
|
||||
"x-app-id": "69665538a49b8ae3be50fe5d",
|
||||
},
|
||||
});
|
||||
if (fileKeyRes.statusCode < 400) {
|
||||
const keyJson = JSON.parse(fileKeyRes.data);
|
||||
const url = `https://file.lihailezzc.com/${keyJson?.data.key}`;
|
||||
// const url =
|
||||
// "https://file.lihailezzc.com/resource/99c9f7e0086ed66d20bd1675b4ab22e9.png";
|
||||
updateCard({
|
||||
id: cardId.value,
|
||||
imageUrl: url,
|
||||
status: 1,
|
||||
});
|
||||
}
|
||||
createCard();
|
||||
// const tempPath = await saveByCanvas(false);
|
||||
// const fileKeyRes = await uni.uploadFile({
|
||||
// url: "https://api.ai-meng.com/api/common/upload",
|
||||
// filePath: tempPath,
|
||||
// name: "file", // 和后端接收文件字段名一致
|
||||
// header: {
|
||||
// "x-app-id": "69665538a49b8ae3be50fe5d",
|
||||
// },
|
||||
// });
|
||||
// if (fileKeyRes.statusCode < 400) {
|
||||
// const keyJson = JSON.parse(fileKeyRes.data);
|
||||
// const url = `https://file.lihailezzc.com/${keyJson?.data.key}`;
|
||||
// // const url =
|
||||
// // "https://file.lihailezzc.com/resource/99c9f7e0086ed66d20bd1675b4ab22e9.png";
|
||||
// updateCard({
|
||||
// id: cardId.value,
|
||||
// imageUrl: url,
|
||||
// status: 1,
|
||||
// });
|
||||
// }
|
||||
// createCard();
|
||||
// uni.showToast({ title: '已保存到相册并可分享', icon: 'none' })
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user