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

updata

上级 bfc564ac
<template> <template>
<div> <div class="pay-bg">
<van-button type="primary" @click="goPay">默认按钮</van-button> <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> <pay-h5 :requestParam="requestParam"></pay-h5>
</div> </div>
</template> </template>
...@@ -42,10 +47,12 @@ export default { ...@@ -42,10 +47,12 @@ export default {
// }) // })
}, },
goPay () { goPay () {
this.VueEvent.$emit('pay-wx-h5', { this.VueEvent.$emit('pay-wx-h5', {})
data: {}, this.VueEvent.$off('pay-wx-h5-callback').$on('pay-wx-h5-callback', obj => {
callback: function (obj) { if (obj.code === 200) {
console.log(obj) this.$router.go(-1)
} else {
Toast('支付失败!')
} }
}) })
} }
...@@ -53,4 +60,40 @@ export default { ...@@ -53,4 +60,40 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <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> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论