|
|
@@ -4,7 +4,9 @@ import { exchangeCode } from '@/services/user'
|
|
|
import { dict } from '@/.cool/store'
|
|
|
import { user } from '@/.cool'
|
|
|
|
|
|
+import { useUi } from "@/uni_modules/cool-ui";
|
|
|
|
|
|
+const ui = useUi();
|
|
|
const code = ref<string>('')
|
|
|
|
|
|
async function handleExchange() {
|
|
|
@@ -21,10 +23,14 @@ async function handleExchange() {
|
|
|
subjectId: dict.getValueByLabelMapByType('index_subject_id')['物理'],
|
|
|
})
|
|
|
await user.get()
|
|
|
- uni.showToast({
|
|
|
- title: '兑换成功',
|
|
|
- icon: 'success'
|
|
|
- })
|
|
|
+ ui.showConfirm({
|
|
|
+ title: "提示",
|
|
|
+ message: "兑换成功",
|
|
|
+ showCancel: false,
|
|
|
+ callback(action) {
|
|
|
+ console.log("用户已确认:", action);
|
|
|
+ },
|
|
|
+ });
|
|
|
} catch (err: any) {
|
|
|
uni.showToast({
|
|
|
title: err.message,
|