|
@@ -525,8 +525,7 @@ export default {
|
|
description: theme.description,
|
|
description: theme.description,
|
|
disabled: theme.isLocked, // 根据是否解锁决定是否可选
|
|
disabled: theme.isLocked, // 根据是否解锁决定是否可选
|
|
locked: theme.isLocked,
|
|
locked: theme.isLocked,
|
|
- price: theme.price || '5', // 添加价格,默认5元
|
|
|
|
- unlockRequirement: theme.isLocked ? (theme.unlockRequirement || '购买解锁') : ''
|
|
|
|
|
|
+ price: theme.price ? String(theme.price) : '5' // 添加价格,默认5元
|
|
}))
|
|
}))
|
|
console.log('已加载主题:', themeOptions.value)
|
|
console.log('已加载主题:', themeOptions.value)
|
|
}
|
|
}
|
|
@@ -642,7 +641,7 @@ export default {
|
|
// 调用解锁主题API
|
|
// 调用解锁主题API
|
|
const result = await turtleSoupStore.unlockTheme(theme.value)
|
|
const result = await turtleSoupStore.unlockTheme(theme.value)
|
|
|
|
|
|
- if (result.success) {
|
|
|
|
|
|
+ if (result && result.success) {
|
|
Taro.showToast({
|
|
Taro.showToast({
|
|
title: '解锁成功',
|
|
title: '解锁成功',
|
|
icon: 'success'
|
|
icon: 'success'
|