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">
|
2022-09-22 11:40:16 +08:00
|
|
|
<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">
|
2022-09-22 11:40:16 +08:00
|
|
|
<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>
|
2022-09-22 11:40:16 +08:00
|
|
|
<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>
|
2022-09-22 11:40:16 +08:00
|
|
|
<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>
|
2022-09-22 11:40:16 +08:00
|
|
|
<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>
|
2022-09-22 11:40:16 +08:00
|
|
|
<button @click='pay=true' class="pay">确认付款</button>
|
2022-09-21 17:30:39 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
`,
|
|
|
|
props: {
|
2022-09-22 14:08:22 +08:00
|
|
|
/* 弹窗状态 */
|
2022-09-21 17:30:39 +08:00
|
|
|
show: {
|
2022-09-22 11:40:16 +08:00
|
|
|
type: Object,
|
|
|
|
default: false
|
2022-09-21 17:30:39 +08:00
|
|
|
},
|
|
|
|
|
2022-09-22 14:08:22 +08:00
|
|
|
/* 支付方式 */
|
2022-09-22 11:40:16 +08:00
|
|
|
active: {
|
|
|
|
type: Number,
|
|
|
|
default: 1
|
|
|
|
},
|
2022-09-21 17:30:39 +08:00
|
|
|
|
2022-09-22 14:08:22 +08:00
|
|
|
/* 是否点击支付 */
|
2022-09-22 11:40:16 +08:00
|
|
|
pay: {
|
|
|
|
type: Object,
|
|
|
|
default: false
|
|
|
|
}
|
2022-09-21 17:30:39 +08:00
|
|
|
},
|
|
|
|
|
2022-09-22 11:40:16 +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
|
|
|
}
|
|
|
|
}
|