optimize: avatar page share reward

This commit is contained in:
zzc
2026-01-28 10:35:31 +08:00
parent 4a1cbf1f5a
commit 29498e4994
2 changed files with 79 additions and 59 deletions

View File

@@ -47,7 +47,6 @@
<text>加载中...</text>
</view>
<!-- Decorative Elements -->
<view class="decor-tag">🐰</view>
<view class="card-footer-text">
<text class="icon">🌸</text> 2026 丙午马年限定
</view>
@@ -59,9 +58,6 @@
<button class="btn primary-btn" @tap="goToMake">
<text class="icon">🎨</text> 我也要领同款制作
</button>
<button class="btn secondary-btn" @tap="saveImage">
<text class="icon">📥</text> 保存到相册
</button>
</view>
<!-- Recommended Frames -->
@@ -94,7 +90,27 @@
<text>🖼</text>
</view>
<view class="banner-content">
<text class="banner-title">去挑选更多壁纸</text>
<text class="banner-title">去挑选新年壁纸</text>
<text class="banner-desc">新年新气象全套皮肤限时领</text>
</view>
<text class="banner-arrow"></text>
</view>
<view class="wallpaper-banner" @tap="goToWallpaper">
<view class="banner-icon">
<text>🖼</text>
</view>
<view class="banner-content">
<text class="banner-title">去挑选新年壁纸</text>
<text class="banner-desc">新年新气象全套皮肤限时领</text>
</view>
<text class="banner-arrow"></text>
</view>
<view class="wallpaper-banner" @tap="goToWallpaper">
<view class="banner-icon">
<text>🖼</text>
</view>
<view class="banner-content">
<text class="banner-title">去挑选新年壁纸</text>
<text class="banner-desc">新年新气象全套皮肤限时领</text>
</view>
<text class="banner-arrow"></text>
@@ -188,37 +204,6 @@ const previewImage = () => {
}
};
const saveImage = () => {
if (!detailData.value?.imageUrl) return;
uni.showLoading({ title: "保存中..." });
uni.downloadFile({
url: detailData.value.imageUrl,
success: (res) => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: () => {
// uni.hideLoading();
uni.showToast({ title: "保存成功", icon: "success" });
},
fail: () => {
// uni.hideLoading();
uni.showToast({ title: "保存失败", icon: "none" });
},
});
} else {
// uni.hideLoading();
uni.showToast({ title: "下载失败", icon: "none" });
}
},
fail: () => {
// uni.hideLoading();
uni.showToast({ title: "下载失败", icon: "none" });
},
});
};
const goToMake = () => {
uni.navigateTo({
url: "/pages/avatar/index",