mobileclient/v1_5_0_C/payPop.js

64 lines
2.0 KiB
JavaScript
Raw Normal View History

2022-09-21 17:30:39 +08:00
const payPop = {
template: `
<div class="mask model" @touchmove.prevent @mousewheel.prevent v-if="show">
<div class="model-box">
<img class="coles" @click='show=false' src="./img/coles.png" alt="">
2022-09-21 17:30:39 +08:00
<p class="money"><span class="sign"></span>128.00</p>
<p class="title">选择支付方式</p>
<div class="list">
<div class="list-children" @click='active=1'>
2022-09-21 17:30:39 +08:00
<div>
<img class="icon" src="./img/wx.png" alt="">
<span>微信支付</span>
</div>
<img class="icon-select" v-if="active===1" src="./img/active.png" alt="">
2022-09-21 17:30:39 +08:00
<img class="icon-select" v-else src="./img/no-active.png" alt="">
</div>
<div class="list-children" @click='active=2'>
2022-09-21 17:30:39 +08:00
<div>
<img class="icon" src="./img/zfb.png" alt="">
<span>支付宝支付</span>
</div>
<img class="icon-select" v-if="active===2" src="./img/active.png" alt="">
2022-09-21 17:30:39 +08:00
<img class="icon-select" v-else src="./img/no-active.png" alt="">
</div>
</div>
<button @click='pay=true' class="pay">确认付款</button>
2022-09-21 17:30:39 +08:00
</div>
</div>
`,
props: {
/* 弹窗状态 */
2022-09-21 17:30:39 +08:00
show: {
type: Object,
default: false
2022-09-21 17:30:39 +08:00
},
/* 支付方式 */
active: {
type: Number,
default: 1
},
2022-09-21 17:30:39 +08:00
/* 是否点击支付 */
pay: {
type: Object,
default: false
}
2022-09-21 17:30:39 +08:00
},
watch: {
show: function (va) {
if (!va) {
this._events.setshow[0](va)
}
},
pay: function (va) {
if (va) {
this._events.payfunction[0](this.active)
}
}
2022-09-21 17:30:39 +08:00
}
}