home.vue
1.32 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
<template>
<div class="wrap">
<InOut v-if="inOutVal==='1'" :toflag = "0"/>
<Pay v-else-if="inOutVal==='2'&&_getPayFlag" :title="title" :money="money"/>
<InOut v-else :toflag = "1"/>
<Loading v-show="_getshowflag"/>
</div>
</template>
<script>
import Loading from './Loading'
import InOut from './InOut'
import Pay from './Pay'
import { mapGetters, mapActions } from 'vuex'
export default {
name: 'HelloWorld',
components: {
Loading, InOut, Pay
},
data() {
return {
payFlag: false,
inOutVal: this.$route.query.id,
// isShow: ''
title: '',
money: ''
}
},
computed: {
...mapGetters([
'_getshowflag', '_getPayFlag'
])
},
created() {
setTimeout(() => {
this.handleHide()
// 模拟请求
// this.$fetch('/api/v2/movie/top250').then((response) => {
// console.log(response)
// })
// },
this.handlePayFlag()
console.log(this._getPayFlag)
this.title = '手机: 13911137584'
this.money = '¥100.00'
}, 2000)
},
methods: {
...mapActions([
'handleHide',
'handleShow',
'handlePayFlag'
])
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.wrap {
width: 100%;
height: 100%;
position: relative;
}
</style>