frontend_h5/treegitee/pages/product/paying.vue

53 lines
879 B
Vue
Raw Normal View History

2024-06-17 15:25:46 +08:00
<template>
<view></view>
</template>
<script>
export default {
data() {
return {
price: ""
}
},
onLoad(options) {
console.log(options)
uni.showLoading({
title: "正在支付..."
})
this.getData(options.order_no, options.money)
},
methods: {
getData(id, money) {
this.api.payorder({
order_no: id,
pay_type: 1
}).then((res) => {
console.log(res)
if (res.data.code == 200) {
uni.hideLoading()
uni.showToast({
title: "支付成功",
icon: "success",
duration: 1200
})
setTimeout(function() {
uni.reLaunch({
url: "/pages/product/overpay?money=" + money
})
}, 1200)
} else {
uni.hideLoading()
uni.showToast({
icon: "none",
title: res.data.message
})
}
})
}
},
}
</script>
<style>
</style>