make yunshi page

This commit is contained in:
zzc
2026-01-15 10:27:14 +08:00
parent 3d2d20dd5f
commit 67684572da
6 changed files with 960 additions and 26 deletions

View File

@@ -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' })
};