Files
car-system-app/pages/driver/serve/coupons/payresult.vue
2024-06-17 10:29:45 +08:00

142 lines
3.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="unbindresult">
<view v-if="resultType=='err'">
<view class="re_up">
<!-- #ifdef MP-WEIXIN -->
<image class="re_img" :src="`${config.aliyunOssUrl}/static/images/app/config/payment_failure.png`"
mode=""></image>
<!-- #endif -->
<!-- #ifdef APP -->
<image class="re_img" src="@/static/images/app/config/payment_failure.png" mode=""></image>
<!-- #endif -->
</view>
<view class="re_inspect" @click="toServeOrderPage"> 返回订单 </view>
</view>
<view v-else>
<view class="re_up">
<!-- #ifdef MP-WEIXIN -->
<image class="re_img" :src="`${config.aliyunOssUrl}/static/images/app/serve/cou_payresult.png`" mode="">
</image>
<!-- #endif -->
<!-- #ifdef APP -->
<image class="re_img" src="@/static/images/app/serve/cou_payresult.png" mode=""></image>
<!-- #endif -->
<view v-if="type=='buyCar'" class="re_txt"> 您的订单已经支付成功 </view>
<view v-if="paymentType==1" class="re_txt"> 您的订单已经支付成功去我的卡包核销 </view>
</view>
<view v-if="type=='buyCar'" class="re_inspect" @click="toBuyCarOrder"> 我的订单 </view>
<view v-if="paymentType==1" class="re_inspect" @click="toMyCardBagPage"> 我的卡包 </view>
<view v-if="type!='buyCar'" class="re_return" @click="toHomePage"> 返回首页 </view>
</view>
</view>
</template>
<script>
import config from '@/config';
export default {
data() {
return {
config,
resultType: '',
type:'',
//支付类型 1:卡券
paymentType:1
}
},
methods: {
//租车订单
toBuyCarOrder(){
console.log('类型',this.paymentType);
if(this.paymentType==2){
uni.redirectTo({
url: `/pages/driver/mine/my_order/rentCars/rent_order`,
})
}else{
uni.redirectTo({
url: `/pages/driver/mine/my_order/buyCars/buy_cars_order`,
})
}
},
toServeOrderPage() {
uni.redirectTo({
url: `/pages/driver/mine/my_order/my_order`,
})
},
toMyCardBagPage() {
uni.redirectTo({
url: '/pages/driver/mine/my_card_bag/my_card_bag'
})
},
toHomePage() {
uni.switchTab({
url: '/pages/driver/home/home'
});
}
},
onLoad(options) {
console.log(options);
//成功失败
this.resultType = options.resultType
if (options.type) this.type = options.type
//支付类型 paymentType:1卡券订单 ,2租车,3买车
this.paymentType=options.paymentType
}
}
</script>
<style lang="scss" scoped>
.re_up {
// border: 1px solid red;
margin-top: 136rpx;
display: flex;
flex-direction: column;
align-items: center;
.re_img {
width: 148rpx;
height: 148rpx;
margin: 0 auto;
}
.re_txt {
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
color: #555555;
line-height: 36rpx;
text-align: center;
margin-top: 24rpx;
}
}
.re_inspect {
width: 332rpx;
height: 80rpx;
background: #13AFA8;
border-radius: 60rpx;
font-size: 34rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 80rpx;
text-align: center;
margin: 96rpx auto 0;
}
.re_return {
width: 136rpx;
height: 48rpx;
font-size: 34rpx;
font-weight: 400;
color: #13AFA8;
margin: 32rpx auto;
}
.unbindresult {
background: #FFFFFF;
height: 100vh;
border-top: 1rpx solid #E6E6E6;
}
</style>