Commit 51cf0600 authored by hewenhao's avatar hewenhao

feat: 兑换

parent d02e1063
...@@ -69,6 +69,8 @@ const ExchangeItem = (props: ExchangeItemProps) => { ...@@ -69,6 +69,8 @@ const ExchangeItem = (props: ExchangeItemProps) => {
}).then(() => { }).then(() => {
if (isGuideActive) { if (isGuideActive) {
nextStoreGuide(val) nextStoreGuide(val)
} else {
showToast({ title: '兑换成功', icon: 'success' })
} }
onCancel && onCancel() onCancel && onCancel()
}).catch(() => { }).catch(() => {
......
...@@ -121,7 +121,6 @@ const userModel: UserModel = { ...@@ -121,7 +121,6 @@ const userModel: UserModel = {
const point = list?.find(c => c.accountType === 'POINT')?.amount ?? 0 const point = list?.find(c => c.accountType === 'POINT')?.amount ?? 0
actions.updateState({ cardNum, point }) actions.updateState({ cardNum, point })
hideLoading() hideLoading()
showToast({ title: '兑换成功', icon: 'success' })
} catch (err) { } catch (err) {
hideLoading() hideLoading()
showModal({ showModal({
...@@ -129,6 +128,7 @@ const userModel: UserModel = { ...@@ -129,6 +128,7 @@ const userModel: UserModel = {
content: err.message, content: err.message,
showCancel: false showCancel: false
}) })
throw err
} }
}), }),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment