feat: 页面全部添加回弹关闭设置
This commit is contained in:
parent
7b8fba5701
commit
06c059ebd8
@ -56,31 +56,46 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/register/register",
|
"path": "pages/register/register",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/profile/setNickname",
|
"path": "pages/profile/setNickname",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/profile/selectRole",
|
"path": "pages/profile/selectRole",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/welcome/welcome",
|
"path": "pages/welcome/welcome",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -122,7 +137,10 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/castlove/index",
|
"path": "pages/castlove/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -201,7 +219,10 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/castlove/success",
|
"path": "pages/castlove/success",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -216,37 +237,55 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/support-activity/index",
|
"path": "pages/support-activity/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/asset-detail/asset-detail",
|
"path": "pages/asset-detail/asset-detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/discover/discover",
|
"path": "pages/discover/discover",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/discover/generation-loading",
|
"path": "pages/discover/generation-loading",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/discover/generation-result",
|
"path": "pages/discover/generation-result",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/tasks/revenue",
|
"path": "pages/tasks/revenue",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -326,7 +326,6 @@ uni.$on('assetLikeChanged', ({ asset_id, like_count, earnings }) => {
|
|||||||
|
|
||||||
// 领取收益处理
|
// 领取收益处理
|
||||||
const handleClaimReward = async (item, _index) => {
|
const handleClaimReward = async (item, _index) => {
|
||||||
console.log('领取收益:', item);
|
|
||||||
|
|
||||||
uni.showLoading({ title: '领取中...' });
|
uni.showLoading({ title: '领取中...' });
|
||||||
|
|
||||||
@ -351,27 +350,6 @@ const handleClaimReward = async (item, _index) => {
|
|||||||
|
|
||||||
uni.showToast({ title: '收益已领取', icon: 'success' });
|
uni.showToast({ title: '收益已领取', icon: 'success' });
|
||||||
|
|
||||||
// 更新全局余额
|
|
||||||
if (claimRes?.data?.total_balance !== undefined) {
|
|
||||||
const userStr = uni.getStorageSync('user')
|
|
||||||
if (userStr) {
|
|
||||||
// 确保正确解析用户对象
|
|
||||||
let user
|
|
||||||
if (typeof userStr === 'string') {
|
|
||||||
user = JSON.parse(userStr)
|
|
||||||
} else {
|
|
||||||
// 如果已经是对象,创建一个新副本避免引用问题
|
|
||||||
user = { ...userStr }
|
|
||||||
}
|
|
||||||
// 更新余额,确保是数字类型
|
|
||||||
user.crystal_balance = Number(claimRes.data.total_balance) || 0
|
|
||||||
|
|
||||||
// 保存回存储,确保是字符串格式
|
|
||||||
uni.setStorageSync('user', JSON.stringify(user))
|
|
||||||
uni.$emit('balanceUpdated', { crystal_balance: user.crystal_balance })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await loadExhibitedAssets();
|
await loadExhibitedAssets();
|
||||||
await loadLikedAssets();
|
await loadLikedAssets();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user