buyer-order-footer.vue
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<template>
<div class="agree-wrapper">
<Agree :desc="desc" :value="buyAgree" @input="changeAgree" :url="url"></Agree>
<div class="order-footer-wrapper">
<div class="btn1">
<div>实付金额:<span class="red">¥{{amount}}</span></div>
<div class="desc">本次交易由闲鱼x有货提供服务</div>
</div>
<YohoButton class="btn2" txt="去支付" @click="onClick" :disable="!buyAgree"></YohoButton>
</div>
</div>
</template>
<script>
import Agree from './agree';
import { createNamespacedHelpers } from 'vuex';
import { Types } from 'store/order/order-confirm';
const { mapState: mapOrderState, mapMutations: mapOrderMutations } = createNamespacedHelpers('order/orderConfirm');
export default {
name: 'BuyerOrderFooter',
props: ['amount'],
components: {
Agree
},
data() {
return {
desc: '有货买家协议',
url: 'https://activity.yoho.cn/feature/3189.html?share_id=5853&title=ufo-%E4%B9%B0%E5%AE%B6%E5%8D%8F%E8%AE%AE'
};
},
computed: {
...mapOrderState(['buyAgree'])
},
methods: {
...mapOrderMutations([Types.CHANGE_BUY_AGREE]),
onClick() {
this.$emit('click');
},
changeAgree(val) {
this[Types.CHANGE_BUY_AGREE](val);
}
}
};
</script>
<style lang="scss" scoped>
.order-footer-wrapper {
width: 100%;
border-top: 1px solid #eee;
padding: 0 40px;
height: 120px;
display: flex;
align-items: center;
}
.agree-wrapper {
border-top: 1px solid #eee;
}
.btn1 {
flex: 1;
font-size: 24px;
text-align: left;
}
.btn2 {
width: 220px;
height: 80px;
line-height: 80px;
font-size: 24px;
}
.red {
font-size: 28px;
color: #d0021b;
font-weight: bolder;
}
.desc {
margin-top: 8px;
font-size: 20px;
color: #999;
}
</style>