提交 f91ea723 authored 作者: lihuihui's avatar lihuihui

updata

上级 bfc564ac
<template>
<div>
<van-button type="primary" @click="goPay">默认按钮</van-button>
<div class="pay-bg">
<img src="../../assets/images/pages.png" alt="">
<div class="pay-btn">
<div class="num">¥<span>199</span>.00</div>
<div class="btn" @click="goPay">立即购买</div>
</div>
<!-- <van-button type="primary" @click="goPay" class="pay-btn">购买</van-button> -->
<pay-h5 :requestParam="requestParam"></pay-h5>
</div>
</template>
......@@ -42,10 +47,12 @@ export default {
// })
},
goPay () {
this.VueEvent.$emit('pay-wx-h5', {
data: {},
callback: function (obj) {
console.log(obj)
this.VueEvent.$emit('pay-wx-h5', {})
this.VueEvent.$off('pay-wx-h5-callback').$on('pay-wx-h5-callback', obj => {
if (obj.code === 200) {
this.$router.go(-1)
} else {
Toast('支付失败!')
}
})
}
......@@ -53,4 +60,40 @@ export default {
}
</script>
<style lang="scss" scoped>
.pay-bg{
width: 100%;
img{
width: 100%;
}
}
.pay-btn{
position: fixed;
bottom: 0;
left: 0;
width:7.5rem;
height:1rem;
background:rgba(255,255,255,1);
box-shadow:0px 0px 6px 0px rgba(0,0,0,0.05);
display: flex;
align-items: center;
padding: 0 .4rem;
.num{
font-size: .26rem;
color: #FF6767;
span{
font-size: .4rem;
}
}
.btn{
width:4.65rem;
height:.7rem;
background:rgba(255,103,103,1);
border-radius:.12rem;
margin-left: auto;
text-align: center;
line-height: .7rem;
color: #fff;
font-size: .3rem;
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论