feat: 页面全部添加回弹关闭设置
This commit is contained in:
parent
7b8fba5701
commit
06c059ebd8
@ -56,31 +56,46 @@
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/register/register",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/profile/setNickname",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/profile/selectRole",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/welcome/welcome",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -122,7 +137,10 @@
|
||||
{
|
||||
"path": "pages/castlove/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -201,7 +219,10 @@
|
||||
{
|
||||
"path": "pages/castlove/success",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -216,37 +237,55 @@
|
||||
{
|
||||
"path": "pages/support-activity/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/asset-detail/asset-detail",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/discover/discover",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/discover/generation-loading",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/discover/generation-result",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/tasks/revenue",
|
||||
"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) => {
|
||||
console.log('领取收益:', item);
|
||||
|
||||
uni.showLoading({ title: '领取中...' });
|
||||
|
||||
@ -351,27 +350,6 @@ const handleClaimReward = async (item, _index) => {
|
||||
|
||||
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 loadLikedAssets();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user