Commit e2ef00ab authored by zengqiang's avatar zengqiang

fix(withdraw): 将alert提示改为Vant Toast

parent e443374e
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
import { Toast } from 'vant'
import { getWithdrawPackageInfo } from '@/server/api/withdrawService' import { getWithdrawPackageInfo } from '@/server/api/withdrawService'
import { requestMerchantTransfer } from '@/util/use-native-bridge' import { requestMerchantTransfer } from '@/util/use-native-bridge'
...@@ -78,11 +79,11 @@ export default defineComponent({ ...@@ -78,11 +79,11 @@ export default defineComponent({
console.log('packageInfo:', this.packageInfo, 'mchId:', this.mchId, 'appId:', this.appId) console.log('packageInfo:', this.packageInfo, 'mchId:', this.mchId, 'appId:', this.appId)
} else { } else {
console.log('no data in response') console.log('no data in response')
alert('获取提现信息失败') Toast.fail('获取提现信息失败')
} }
} catch (error) { } catch (error) {
console.error('fetchPackageInfo error:', error) console.error('fetchPackageInfo error:', error)
alert('网络请求失败: ' + error) Toast.fail('网络请求失败')
} finally { } finally {
this.loading = false this.loading = false
} }
...@@ -90,7 +91,7 @@ export default defineComponent({ ...@@ -90,7 +91,7 @@ export default defineComponent({
async handleConfirm () { async handleConfirm () {
if (!this.packageInfo || !this.mchId || !this.appId) { if (!this.packageInfo || !this.mchId || !this.appId) {
console.error('Missing params:', { packageInfo: this.packageInfo, mchId: this.mchId, appId: this.appId }) console.error('Missing params:', { packageInfo: this.packageInfo, mchId: this.mchId, appId: this.appId })
alert('缺少必要参数,无法确认收款') Toast.fail('缺少必要参数,无法确认收款')
return return
} }
...@@ -113,7 +114,7 @@ export default defineComponent({ ...@@ -113,7 +114,7 @@ export default defineComponent({
}) })
} catch (error) { } catch (error) {
console.error('requestMerchantTransfer error:', error) console.error('requestMerchantTransfer error:', error)
alert('确认收款失败: ' + error) Toast.fail('确认收款失败')
} }
}, },
handleBack () { handleBack () {
......
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