Commit 8da434bf85d9bad4af9c85b88830ccf5b2bf6a9a
1 parent
1bd5e162
车场进出场支付
Showing
14 changed files
with
151 additions
and
14 deletions
build/utils.js
@@ -18,6 +18,7 @@ exports.cssLoaders = function (options) { | @@ -18,6 +18,7 @@ exports.cssLoaders = function (options) { | ||
18 | const cssLoader = { | 18 | const cssLoader = { |
19 | loader: 'css-loader', | 19 | loader: 'css-loader', |
20 | options: { | 20 | options: { |
21 | + minimize: process.env.NODE_ENV === 'production', | ||
21 | sourceMap: options.sourceMap | 22 | sourceMap: options.sourceMap |
22 | } | 23 | } |
23 | } | 24 | } |
build/webpack.dev.conf.js
@@ -55,7 +55,8 @@ const devWebpackConfig = merge(baseWebpackConfig, { | @@ -55,7 +55,8 @@ const devWebpackConfig = merge(baseWebpackConfig, { | ||
55 | new HtmlWebpackPlugin({ | 55 | new HtmlWebpackPlugin({ |
56 | filename: 'index.html', | 56 | filename: 'index.html', |
57 | template: 'index.html', | 57 | template: 'index.html', |
58 | - inject: true | 58 | + inject: true, |
59 | + favicon: './favicon.ico' | ||
59 | }), | 60 | }), |
60 | // copy custom static assets | 61 | // copy custom static assets |
61 | new CopyWebpackPlugin([ | 62 | new CopyWebpackPlugin([ |
favicon.ico
0 → 100644
No preview for this file type
index.html
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
6 | <meta name="renderer" content="webkit"> | 6 | <meta name="renderer" content="webkit"> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
8 | + <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico"> | ||
8 | <title>停车场进出场</title> | 9 | <title>停车场进出场</title> |
9 | </head> | 10 | </head> |
10 | <body> | 11 | <body> |
package-lock.json
@@ -4042,6 +4042,11 @@ | @@ -4042,6 +4042,11 @@ | ||
4042 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", | 4042 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", |
4043 | "dev": true | 4043 | "dev": true |
4044 | }, | 4044 | }, |
4045 | + "fastclick": { | ||
4046 | + "version": "1.0.6", | ||
4047 | + "resolved": "http://registry.npm.taobao.org/fastclick/download/fastclick-1.0.6.tgz", | ||
4048 | + "integrity": "sha1-FhYlsnsaWAZAWTa9qaLBkm0Gvmo=" | ||
4049 | + }, | ||
4045 | "fastparse": { | 4050 | "fastparse": { |
4046 | "version": "1.1.2", | 4051 | "version": "1.1.2", |
4047 | "resolved": "http://registry.npm.taobao.org/fastparse/download/fastparse-1.1.2.tgz", | 4052 | "resolved": "http://registry.npm.taobao.org/fastparse/download/fastparse-1.1.2.tgz", |
package.json
@@ -12,6 +12,7 @@ | @@ -12,6 +12,7 @@ | ||
12 | }, | 12 | }, |
13 | "dependencies": { | 13 | "dependencies": { |
14 | "axios": "^0.18.0", | 14 | "axios": "^0.18.0", |
15 | + "fastclick": "^1.0.6", | ||
15 | "lib-flexible": "^0.3.2", | 16 | "lib-flexible": "^0.3.2", |
16 | "px2rem-loader": "^0.1.9", | 17 | "px2rem-loader": "^0.1.9", |
17 | "qs": "^6.6.0", | 18 | "qs": "^6.6.0", |
src/assets/ali-icon.png
0 → 100644
1.94 KB
src/assets/checked-icon.png
0 → 100644
990 Bytes
src/assets/unchecked-icon.png
0 → 100644
874 Bytes
src/assets/wechat-icon.png
0 → 100644
2 KB
src/components/home.vue
1 | <template> | 1 | <template> |
2 | <div class="wrap"> | 2 | <div class="wrap"> |
3 | <InOut v-if="inOutVal==='1'" :toflag = "0"/> | 3 | <InOut v-if="inOutVal==='1'" :toflag = "0"/> |
4 | - <div v-else-if="inOutVal==='2'&&_getPayFlag">pay</div> | 4 | + <Pay v-else-if="inOutVal==='2'&&_getPayFlag" :title="title" :money="money"/> |
5 | <InOut v-else :toflag = "1"/> | 5 | <InOut v-else :toflag = "1"/> |
6 | <Loading v-show="_getshowflag"/> | 6 | <Loading v-show="_getshowflag"/> |
7 | </div> | 7 | </div> |
@@ -10,18 +10,21 @@ | @@ -10,18 +10,21 @@ | ||
10 | <script> | 10 | <script> |
11 | import Loading from './Loading' | 11 | import Loading from './Loading' |
12 | import InOut from './InOut' | 12 | import InOut from './InOut' |
13 | +import Pay from './Pay' | ||
13 | import { mapGetters, mapActions } from 'vuex' | 14 | import { mapGetters, mapActions } from 'vuex' |
14 | 15 | ||
15 | export default { | 16 | export default { |
16 | name: 'HelloWorld', | 17 | name: 'HelloWorld', |
17 | components: { | 18 | components: { |
18 | - Loading, InOut | 19 | + Loading, InOut, Pay |
19 | }, | 20 | }, |
20 | data() { | 21 | data() { |
21 | return { | 22 | return { |
22 | payFlag: false, | 23 | payFlag: false, |
23 | - inOutVal: this.$route.query.id | 24 | + inOutVal: this.$route.query.id, |
24 | // isShow: '' | 25 | // isShow: '' |
26 | + title: '', | ||
27 | + money: '' | ||
25 | } | 28 | } |
26 | }, | 29 | }, |
27 | computed: { | 30 | computed: { |
@@ -37,8 +40,10 @@ export default { | @@ -37,8 +40,10 @@ export default { | ||
37 | // console.log(response) | 40 | // console.log(response) |
38 | // }) | 41 | // }) |
39 | // }, | 42 | // }, |
40 | - // this.handlePayFlag() | 43 | + this.handlePayFlag() |
41 | console.log(this._getPayFlag) | 44 | console.log(this._getPayFlag) |
45 | + this.title = '手机: 13911137584' | ||
46 | + this.money = '¥100.00' | ||
42 | }, 2000) | 47 | }, 2000) |
43 | }, | 48 | }, |
44 | methods: { | 49 | methods: { |
src/components/inout.vue
@@ -162,13 +162,14 @@ export default { | @@ -162,13 +162,14 @@ export default { | ||
162 | border: 0; | 162 | border: 0; |
163 | outline: 0; | 163 | outline: 0; |
164 | width: 80%; | 164 | width: 80%; |
165 | - height: 47px; | ||
166 | - line-height: 47px; | ||
167 | - padding-left: 20px; | 165 | + height: 1.253333rem; |
166 | + line-height: 1.253333rem; | ||
168 | background-color: #fff; | 167 | background-color: #fff; |
169 | - font-size: 18px; | 168 | + font-size: 0.48rem; |
170 | color: #4A4A4A; | 169 | color: #4A4A4A; |
171 | - border-radius: 4px; | 170 | + border-radius: 0.106667rem; |
171 | + text-align: center; | ||
172 | + font-weight: 500; | ||
172 | } | 173 | } |
173 | .toggle-btn { | 174 | .toggle-btn { |
174 | height: 17px; | 175 | height: 17px; |
src/components/pay.vue
1 | <template> | 1 | <template> |
2 | - <div>1</div> | 2 | + <div class="pay-wrap"> |
3 | + <div class="title">订单支付</div> | ||
4 | + <div class="tipstext">{{ title }}</div> | ||
5 | + <div class="money">{{ money }}</div> | ||
6 | + <div class="choosetext">选择支付方式</div> | ||
7 | + <ul class="pay-way"> | ||
8 | + <li v-for="(item, index) in payArr" :key="index" :class="{checkedClass : index===currentId}" @click="currentId = index"> | ||
9 | + <span></span> | ||
10 | + {{ item }} | ||
11 | + </li> | ||
12 | + </ul> | ||
13 | + <div class="commit-btn" @click="commitsure">确认支付</div> | ||
14 | + </div> | ||
3 | </template> | 15 | </template> |
4 | 16 | ||
5 | <script> | 17 | <script> |
6 | export default { | 18 | export default { |
7 | - name: 'pay' | 19 | + name: 'Pay', |
20 | + props: { | ||
21 | + title: { | ||
22 | + type: String, | ||
23 | + default: '' | ||
24 | + }, | ||
25 | + money: { | ||
26 | + type: String, | ||
27 | + default: '' | ||
28 | + } | ||
29 | + }, | ||
30 | + data() { | ||
31 | + return { | ||
32 | + payArr: ['支付宝支付', '微信支付'], | ||
33 | + currentId: 0 | ||
34 | + } | ||
35 | + }, | ||
36 | + methods: { | ||
37 | + commitsure() { | ||
38 | + alert(this.currentId) | ||
39 | + } | ||
40 | + } | ||
8 | } | 41 | } |
9 | </script> | 42 | </script> |
10 | 43 | ||
11 | -<style scoped> | ||
12 | - | 44 | +<style lang="scss" scoped> |
45 | + .pay-wrap { | ||
46 | + width: 100%; | ||
47 | + height: 100%; | ||
48 | + background-color: #eff4f5; | ||
49 | + text-align: center; | ||
50 | + .title { | ||
51 | + height: 42px; | ||
52 | + line-height: 42px; | ||
53 | + background-color: rgba(255, 255, 255, .9); | ||
54 | + font-size: 17px; | ||
55 | + color: #4A4A4A; | ||
56 | + font-weight: 500; | ||
57 | + } | ||
58 | + .tipstext { | ||
59 | + margin: 35px auto 35px; | ||
60 | + font-size: 18px; | ||
61 | + font-weight: bold; | ||
62 | + color: rgba(255, 7, 7, 1); | ||
63 | + } | ||
64 | + .money { | ||
65 | + height: 48px; | ||
66 | + line-height: 48px; | ||
67 | + font-size: 48px; | ||
68 | + font-weight: 400; | ||
69 | + color: rgba(74, 74, 74, 1); | ||
70 | + } | ||
71 | + .choosetext { | ||
72 | + padding-left: 10px; | ||
73 | + margin: 60px 0 10px; | ||
74 | + text-align: left; | ||
75 | + font-size: 17px; | ||
76 | + font-weight: 400; | ||
77 | + color: rgba(74, 74, 74, 1); | ||
78 | + } | ||
79 | + .pay-way { | ||
80 | + padding-left: 10px; | ||
81 | + padding-right: 18px; | ||
82 | + background-color: #fff; | ||
83 | + text-align: left; | ||
84 | + cursor: pointer; | ||
85 | + li { | ||
86 | + height: 43px; | ||
87 | + line-height: 43px; | ||
88 | + font-size: 14px; | ||
89 | + font-weight: 400; | ||
90 | + color: rgba(74, 74, 74, 1); | ||
91 | + background-image: url("../assets/unchecked-icon.png"); | ||
92 | + background-repeat: no-repeat ; | ||
93 | + background-position: right center ; | ||
94 | + background-size: 18px 18px; | ||
95 | + span { | ||
96 | + width: 24px; | ||
97 | + height: 24px; | ||
98 | + display: inline-block; | ||
99 | + margin-right: 11px; | ||
100 | + vertical-align: middle; | ||
101 | + } | ||
102 | + &:nth-of-type(1) { | ||
103 | + border-bottom: 1px solid rgba(240, 244, 245, 1); | ||
104 | + span { | ||
105 | + background: url("../assets/ali-icon.png") no-repeat; | ||
106 | + background-size: 100% 100%; | ||
107 | + } | ||
108 | + } | ||
109 | + &:nth-of-type(2) { | ||
110 | + span { | ||
111 | + background: url("../assets/wechat-icon.png") no-repeat; | ||
112 | + background-size: 100% 100%; | ||
113 | + } | ||
114 | + } | ||
115 | + } | ||
116 | + .checkedClass{ | ||
117 | + background-image: url("../assets/checked-icon.png"); | ||
118 | + } | ||
119 | + } | ||
120 | + .commit-btn { | ||
121 | + width: 80%; | ||
122 | + height: 42px; | ||
123 | + line-height: 42px; | ||
124 | + margin: 120px auto 0; | ||
125 | + border-radius: 21px; | ||
126 | + background-color: #75CBBE; | ||
127 | + font-size: 18px; | ||
128 | + font-weight: 400; | ||
129 | + color: rgba(255, 255, 255, 1); | ||
130 | + } | ||
131 | + } | ||
13 | </style> | 132 | </style> |
src/main.js
@@ -5,8 +5,11 @@ import App from './App' | @@ -5,8 +5,11 @@ import App from './App' | ||
5 | import router from './router' | 5 | import router from './router' |
6 | import store from './store/store' | 6 | import store from './store/store' |
7 | import 'lib-flexible/flexible.js' | 7 | import 'lib-flexible/flexible.js' |
8 | +import fastclick from 'fastclick' | ||
8 | import './styles/reset.css' | 9 | import './styles/reset.css' |
9 | 10 | ||
11 | +fastclick.attach(document.body) | ||
12 | + | ||
10 | Vue.config.productionTip = false | 13 | Vue.config.productionTip = false |
11 | 14 | ||
12 | /* eslint-disable no-new */ | 15 | /* eslint-disable no-new */ |