dengrui/components/successpopu.vue

70 lines
2.3 KiB
Vue
Raw Permalink Normal View History

2021-08-26 01:49:06 +00:00
<template>
<view>
<view v-if="isShow" class="popu-boxw">
<view class="popu-boxn">
<image v-if="isSuccess" class="popu-imgh" src="../static/img/order/happy.png" mode=""></image>
<image v-else class="popu-imgs" src="../static/img/order/sorry.png" mode=""></image>
<view class="popu-title">{{title}}</view>
<view class="popu-con">{{content}}</view>
<image @tap="closepopu" class="popu-guan" src="../static/img/my/maclose.png" mode=""></image>
</view>
</view>
</view>
</template>
<script>
export default {
name:'successpopu',
props:{
isShow:{//显示弹框
type:Boolean,
default:false
},
isSuccess:{//成功、失败
type:Boolean,
default:true
},
title:{//标题
type:String,
default:'恭喜你,购买成功'
},
content:{//描述
type:String,
default:'可以在个人中心--我的订单查看订单详情'
},
typeNum:{
type:String,
default:''
}
},
data() {
return {
panshow:this.isShow
};
},
methods:{
closepopu(){
// console.log(this.typeNum);
if(this.typeNum==1){
setTimeout(function(){
uni.navigateTo({
url:'/pagesA/myOrder/myOrder'
})
},500)
}
this.$emit('change')
}
}
}
</script>
<style>
.popu-boxw{position: fixed;top: 0;bottom: 0;right: 0;left: 0;background-color: rgba(0,0,0,.8);z-index: 100;}
.popu-boxn{background-color: #FFFFFF;border-radius: 20rpx;display: flex;justify-content: center;flex-direction: column;align-items: center;position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);width: 80%;}
.popu-imgh{width: 113rpx;height: 113rpx;margin: 40rpx 0;}
.popu-imgs{width: 113rpx;height: 113rpx;margin: 40rpx 0;}
.popu-title{color: #1c4593;font-size: 38rpx;}
.popu-con{color: #282828;font-size: 26rpx;margin: 20rpx 0 80rpx 0;}
.popu-guan{width: 55rpx;height: 55rpx;position: absolute;bottom: -80rpx;}
</style>