Commit dfc9b1321612b84f1b9b5ca77f0a1759db2986c3
1 parent
7df6e77e
首页add 地图缩放
底部添加 跳转链接 删除无用代码
Showing
14 changed files
with
155 additions
and
48 deletions
src/api/user.js
@@ -36,7 +36,6 @@ export function logout() { | @@ -36,7 +36,6 @@ export function logout() { | ||
36 | } | 36 | } |
37 | 37 | ||
38 | export function uploadUserPic(file){ | 38 | export function uploadUserPic(file){ |
39 | - debugger | ||
40 | return request({ | 39 | return request({ |
41 | url: '/personPc/uploadUserPic', | 40 | url: '/personPc/uploadUserPic', |
42 | method: 'post', | 41 | method: 'post', |
src/assets/footer_ico.png
0 → 100644
12.5 KB
src/assets/service/nodatacard.png
0 → 100644
33.1 KB
src/components/VFooter.vue
1 | <template> | 1 | <template> |
2 | <div class="footer"> | 2 | <div class="footer"> |
3 | - <span>《隐私权政策》 《权益保障承诺书》 鄂ICP备19013449号</span> | 3 | + <div class="footer-top"> |
4 | + <ul class="fl footer-nav"> | ||
5 | + <router-link | ||
6 | + tag="li" | ||
7 | + :to="{path:list.routerLink}" | ||
8 | + v-for="(list, index) in navList" | ||
9 | + :key="index" | ||
10 | + > | ||
11 | + {{list.name}} | ||
12 | + </router-link> | ||
13 | + </ul> | ||
14 | + <div class="fr footer-rem"> | ||
15 | + <div class="footer-tit">黄石停车APP</div> | ||
16 | + <div class="footer-icon"></div> | ||
17 | + </div> | ||
18 | + </div> | ||
19 | + <div class="footer-bottom"> | ||
20 | + <div >《隐私权政策》 《权益保障承诺书》 鄂ICP备19013449号</div> | ||
21 | + </div> | ||
4 | </div> | 22 | </div> |
5 | </template> | 23 | </template> |
6 | 24 | ||
7 | <script> | 25 | <script> |
8 | export default { | 26 | export default { |
9 | - name: 'VFooter' | 27 | + name: 'VFooter', |
28 | + data(){ | ||
29 | + return { | ||
30 | + navList:[ | ||
31 | + {name:'官网中心',routerLink:'/center'}, | ||
32 | + {name:'黄石停车',routerLink:'/park'}, | ||
33 | + {name:'关于我们',routerLink:'/about'}, | ||
34 | + ], | ||
35 | + | ||
36 | + | ||
37 | + } | ||
38 | + } | ||
10 | } | 39 | } |
11 | </script> | 40 | </script> |
12 | 41 | ||
13 | <style scoped lang="scss"> | 42 | <style scoped lang="scss"> |
14 | .footer{ | 43 | .footer{ |
15 | - height:64px; | ||
16 | - line-height: 64px; | 44 | + height: 280px; |
45 | + width:100%; | ||
17 | background:rgba(6,8,10,1); | 46 | background:rgba(6,8,10,1); |
18 | - color:rgba(255,255,255,0.65); | 47 | + .footer-top{ |
48 | + height: 216px; | ||
49 | + margin: 0 auto; | ||
50 | + width: 1010px; | ||
51 | + .footer-nav{ | ||
52 | + margin-top: 25px; | ||
53 | + li{ | ||
54 | + width:56px; | ||
55 | + height:20px; | ||
56 | + font-size:14px; | ||
57 | + font-family:PingFangSC-Regular; | ||
58 | + font-weight:400; | ||
59 | + color:rgba(255,255,255,1); | ||
60 | + line-height:20px; | ||
61 | + margin-top: 20px; | ||
62 | + } | ||
63 | + } | ||
64 | + .footer-rem{ | ||
65 | + margin-top: 35px; | ||
66 | + width: 129px; | ||
67 | + height: 188px; | ||
68 | + .footer-tit{ | ||
69 | + width:84px; | ||
70 | + height:20px; | ||
71 | + font-size:14px; | ||
72 | + font-family:PingFangSC-Regular; | ||
73 | + font-weight:400; | ||
74 | + color:rgba(255,255,255,1); | ||
75 | + line-height:20px; | ||
76 | + margin-bottom: 11px; | ||
77 | + } | ||
78 | + .footer-icon{ | ||
79 | + width:129px; | ||
80 | + height:129px; | ||
81 | + background: url("../assets/footer_ico.png") no-repeat; | ||
82 | + } | ||
83 | + | ||
84 | + } | ||
85 | + | ||
86 | + } | ||
87 | + .footer-bottom{ | ||
88 | + border-top:1px solid rgba(255,255,255,0.25);; | ||
89 | + width: 100%; | ||
90 | + height: 62px; | ||
91 | + line-height: 60px; | ||
92 | + font-family:PingFangSC-Regular; | ||
93 | + font-weight:400; | ||
94 | + color:rgba(255,255,255,0.65); | ||
95 | + div{ | ||
96 | + font-size:14px; | ||
97 | + width: 500px; | ||
98 | + margin: 0 auto; | ||
99 | + text-align: center; | ||
100 | + } | ||
101 | + /*text-align: center;*/ | ||
102 | + } | ||
19 | } | 103 | } |
20 | </style> | 104 | </style> |
src/permission.js
@@ -11,7 +11,6 @@ NProgress.configure({showSpinner: false}) // NProgress Configuration | @@ -11,7 +11,6 @@ NProgress.configure({showSpinner: false}) // NProgress Configuration | ||
11 | const whiteList = ['/login'] // no redirect whitelist | 11 | const whiteList = ['/login'] // no redirect whitelist |
12 | 12 | ||
13 | router.beforeEach(async (to, from, next) => { | 13 | router.beforeEach(async (to, from, next) => { |
14 | - debugger | ||
15 | // start progress bar | 14 | // start progress bar |
16 | NProgress.start() | 15 | NProgress.start() |
17 | if (to.path.indexOf("service") == -1) { | 16 | if (to.path.indexOf("service") == -1) { |
src/store/modules/user.js
@@ -27,7 +27,6 @@ const mutations = { | @@ -27,7 +27,6 @@ const mutations = { | ||
27 | const actions = { | 27 | const actions = { |
28 | // user login | 28 | // user login |
29 | login({ commit }, userInfo) { | 29 | login({ commit }, userInfo) { |
30 | - debugger | ||
31 | const { phone, password } = userInfo | 30 | const { phone, password } = userInfo |
32 | return new Promise((resolve, reject) => { | 31 | return new Promise((resolve, reject) => { |
33 | login({ userPhone: phone.trim(), validatorCode: password }).then(response => { | 32 | login({ userPhone: phone.trim(), validatorCode: password }).then(response => { |
src/utils/request.js
@@ -43,16 +43,16 @@ service.interceptors.response.use( | @@ -43,16 +43,16 @@ service.interceptors.response.use( | ||
43 | * You can also judge the status by HTTP Status Code | 43 | * You can also judge the status by HTTP Status Code |
44 | */ | 44 | */ |
45 | response => { | 45 | response => { |
46 | - const res = response.data | 46 | + const res = response.data; |
47 | // if the custom code is not 20000, it is judged as an error. | 47 | // if the custom code is not 20000, it is judged as an error. |
48 | if (res.code !='8888') { | 48 | if (res.code !='8888') { |
49 | Message({ | 49 | Message({ |
50 | - message: res.message || 'Error', | 50 | + message: res.msg || 'Error', |
51 | type: 'error', | 51 | type: 'error', |
52 | duration: 5 * 1000 | 52 | duration: 5 * 1000 |
53 | }) | 53 | }) |
54 | 54 | ||
55 | - return Promise.reject(new Error(res.message || 'Error')) | 55 | + return Promise.reject(res.msg) |
56 | } else { | 56 | } else { |
57 | return res | 57 | return res |
58 | } | 58 | } |
@@ -60,7 +60,7 @@ service.interceptors.response.use( | @@ -60,7 +60,7 @@ service.interceptors.response.use( | ||
60 | error => { | 60 | error => { |
61 | console.log('err' + error) // for debug | 61 | console.log('err' + error) // for debug |
62 | Message({ | 62 | Message({ |
63 | - message: error.message, | 63 | + message: res.msg || '服务异常', |
64 | type: 'error', | 64 | type: 'error', |
65 | duration: 5 * 1000 | 65 | duration: 5 * 1000 |
66 | }) | 66 | }) |
src/views/cardticket/index.vue
1 | 1 | ||
2 | <template> | 2 | <template> |
3 | <div class="app-container" style="padding: 0px"> | 3 | <div class="app-container" style="padding: 0px"> |
4 | + <div class="card_null" v-if="ticketList===null || ticketList.length===0" > | ||
5 | + <img src="../../assets/service/nodatacard.png" alt=""/> | ||
6 | + <p class="card_nulltit">暂无卡券</p> | ||
7 | + </div> | ||
4 | <!--卡券 sta--> | 8 | <!--卡券 sta--> |
5 | - <el-row :gutter="16" class=""> | ||
6 | - <el-col :span="6" v-for="(ticket,id) in ticketList" :key="id" class="margin-bottom16"> | ||
7 | - <el-card class="box-card"> | ||
8 | - <div class="ticket-title boxshadow-4 eff-bgcolor " > | ||
9 | - <div class=" float-left eff-icon"></div> | ||
10 | - <div class="ticket-name hs-hidden-nowrap hs-cursor-pointer float-left" >{{ticket.orgName}}-{{ticket.cardName}}</div> | ||
11 | - <div class="ticket-oper float-right">有效</div> | ||
12 | - </div> | ||
13 | - <div class="ticket-content"> | ||
14 | - <div class="ticket-main clearfix" > | ||
15 | - <div class=" hs-hidden-nowrap hs-cursor-pointer float-left ticket-effmoney" >{{ticket.fullCutValue | fen2Yuan}}</div> | 9 | + <div v-else> |
10 | + <el-row :gutter="16" > | ||
11 | + <el-col :span="6" v-for="(ticket,id) in ticketList" :key="id" class="margin-bottom16"> | ||
12 | + <el-card class="box-card"> | ||
13 | + <div class="ticket-title boxshadow-4 eff-bgcolor " > | ||
14 | + <div class=" float-left eff-icon"></div> | ||
15 | + <div class="ticket-name hs-hidden-nowrap hs-cursor-pointer float-left" >{{ticket.orgName}}-{{ticket.cardName}}</div> | ||
16 | + <div class="ticket-oper float-right">有效</div> | ||
17 | + </div> | ||
18 | + <div class="ticket-content"> | ||
19 | + <div class="ticket-main clearfix" > | ||
20 | + <div class=" hs-hidden-nowrap hs-cursor-pointer float-left ticket-effmoney" >{{ticket.fullCutValue | fen2Yuan}}</div> | ||
16 | 21 | ||
17 | - <div class="ticket-notes float-left">元 优惠券</div> | 22 | + <div class="ticket-notes float-left">元 优惠券</div> |
23 | + </div> | ||
24 | + <div class="ticket-time">有效时间:{{ticket.endTime | string2Date(1)}}</div> | ||
18 | </div> | 25 | </div> |
19 | - <div class="ticket-time">有效时间:{{ticket.endTime | string2Date(1)}}</div> | ||
20 | - </div> | ||
21 | - </el-card> | ||
22 | - </el-col> | ||
23 | - </el-row> | 26 | + </el-card> |
27 | + </el-col> | ||
28 | + </el-row> | ||
29 | + </div> | ||
24 | </div> | 30 | </div> |
25 | </template> | 31 | </template> |
26 | 32 | ||
@@ -29,16 +35,7 @@ | @@ -29,16 +35,7 @@ | ||
29 | export default { | 35 | export default { |
30 | data() { | 36 | data() { |
31 | return { | 37 | return { |
32 | - ticketList:[ | ||
33 | - /*{ | ||
34 | - id:'123', | ||
35 | - ptype:'1', | ||
36 | - plname:'静雅地上停车场', | ||
37 | - pname:'有效', | ||
38 | - pmoney:'50', | ||
39 | - ptime:'2019/8/30', | ||
40 | - }*/ | ||
41 | - ] | 38 | + ticketList:[] |
42 | } | 39 | } |
43 | }, | 40 | }, |
44 | methods: { | 41 | methods: { |
@@ -154,6 +151,21 @@ export default { | @@ -154,6 +151,21 @@ export default { | ||
154 | line-height:20px; | 151 | line-height:20px; |
155 | margin-left: 16px; | 152 | margin-left: 16px; |
156 | } | 153 | } |
154 | + .card_null{ | ||
155 | + margin-top: 50px; | ||
156 | + text-align: center; | ||
157 | + } | ||
158 | + .card_null img{ | ||
159 | + width: 184px; | ||
160 | + height: 184px; | ||
161 | + } | ||
162 | + .card_nulltit{ | ||
163 | + font-size: 20px; | ||
164 | + font-weight: 400; | ||
165 | + height: 30px; | ||
166 | + line-height: 30px; | ||
167 | + color: rgb(144, 147, 153); | ||
168 | + } | ||
157 | 169 | ||
158 | </style> | 170 | </style> |
159 | 171 |
src/views/home.vue
@@ -80,9 +80,16 @@ | @@ -80,9 +80,16 @@ | ||
80 | name: 'home', | 80 | name: 'home', |
81 | mounted() { | 81 | mounted() { |
82 | // 百度地图API功能 | 82 | // 百度地图API功能 |
83 | - var map = new BMap.Map("map"); | 83 | + var map = new BMap.Map("map", {enableMapClick:false}); |
84 | var point = new BMap.Point(115.078186, 30.232887); | 84 | var point = new BMap.Point(115.078186, 30.232887); |
85 | map.centerAndZoom(point, 15); | 85 | map.centerAndZoom(point, 15); |
86 | + map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 | ||
87 | + var top_left_control = new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT});// 左上角,添加比例尺 | ||
88 | + var top_left_navigation = new BMap.NavigationControl(); //左上角,添加默认缩放平移控件 | ||
89 | + var top_right_navigation = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_RIGHT, type: BMAP_NAVIGATION_CONTROL_SMALL}); //右上角,仅包含平移和缩放按钮 | ||
90 | + map.addControl(top_left_control); | ||
91 | + map.addControl(top_left_navigation); | ||
92 | + map.addControl(top_right_navigation); | ||
86 | } | 93 | } |
87 | } | 94 | } |
88 | </script> | 95 | </script> |
@@ -110,7 +117,7 @@ | @@ -110,7 +117,7 @@ | ||
110 | height: 368px; | 117 | height: 368px; |
111 | position: absolute; | 118 | position: absolute; |
112 | top:200px; | 119 | top:200px; |
113 | - right: 20px; | 120 | + right: 80px; |
114 | background: url("../assets/home/berth.png") no-repeat; | 121 | background: url("../assets/home/berth.png") no-repeat; |
115 | p{ | 122 | p{ |
116 | padding-top: 20px; | 123 | padding-top: 20px; |
@@ -185,7 +192,7 @@ | @@ -185,7 +192,7 @@ | ||
185 | content: ''; | 192 | content: ''; |
186 | position: absolute; | 193 | position: absolute; |
187 | right: 14px; | 194 | right: 14px; |
188 | - bottom: 27px; | 195 | + bottom: 36px; |
189 | transform: rotate(-45deg); | 196 | transform: rotate(-45deg); |
190 | width: 25px; | 197 | width: 25px; |
191 | height: 1px; | 198 | height: 1px; |
src/views/information/index.vue
@@ -100,7 +100,6 @@ | @@ -100,7 +100,6 @@ | ||
100 | }, | 100 | }, |
101 | handleAvatarSuccess(res, file) { | 101 | handleAvatarSuccess(res, file) { |
102 | this.imageUrl = URL.createObjectURL(file.raw); | 102 | this.imageUrl = URL.createObjectURL(file.raw); |
103 | - debugger | ||
104 | }, | 103 | }, |
105 | beforeAvatarUpload(file) { | 104 | beforeAvatarUpload(file) { |
106 | let that = this; | 105 | let that = this; |
@@ -146,7 +145,6 @@ | @@ -146,7 +145,6 @@ | ||
146 | }; | 145 | }; |
147 | updatePersonByCustId(req).then(response =>{ | 146 | updatePersonByCustId(req).then(response =>{ |
148 | if(response.code ='8888'){ | 147 | if(response.code ='8888'){ |
149 | - debugger | ||
150 | let userInfo = this.$store.state.user.userInfo; | 148 | let userInfo = this.$store.state.user.userInfo; |
151 | userInfo.custName=username; | 149 | userInfo.custName=username; |
152 | userInfo.sex=sex; | 150 | userInfo.sex=sex; |
src/views/login/index.vue
@@ -234,9 +234,9 @@ export default { | @@ -234,9 +234,9 @@ export default { | ||
234 | max-width: 100%; | 234 | max-width: 100%; |
235 | /*padding: 160px 35px 0;*/ | 235 | /*padding: 160px 35px 0;*/ |
236 | /*margin: 0 auto;*/ | 236 | /*margin: 0 auto;*/ |
237 | - top: 50%; | 237 | + top: 150px; |
238 | left: 50%; | 238 | left: 50%; |
239 | - transform: translate(-50%, -50%); | 239 | + margin-left: -200px; |
240 | overflow: hidden; | 240 | overflow: hidden; |
241 | background: rgba(26, 29, 41, .6); | 241 | background: rgba(26, 29, 41, .6); |
242 | } | 242 | } |
src/views/mycar/index.vue
@@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
108 | methods: { | 108 | methods: { |
109 | /**校验是否已经绑定*/ | 109 | /**校验是否已经绑定*/ |
110 | checkCarNum(formName){ | 110 | checkCarNum(formName){ |
111 | - debugger | 111 | + // debugger |
112 | //checkBoundCarNum | 112 | //checkBoundCarNum |
113 | let that = this; | 113 | let that = this; |
114 | let custId = this.form.custId; | 114 | let custId = this.form.custId; |
@@ -192,7 +192,7 @@ | @@ -192,7 +192,7 @@ | ||
192 | sysCode:'1001', | 192 | sysCode:'1001', |
193 | carBindingStatus:2, //解绑 | 193 | carBindingStatus:2, //解绑 |
194 | }; | 194 | }; |
195 | - debugger | 195 | + // debugger |
196 | unboundCarNum(req).then(response =>{ | 196 | unboundCarNum(req).then(response =>{ |
197 | if(response.code ='8888'){ | 197 | if(response.code ='8888'){ |
198 | this.$message({ | 198 | this.$message({ |
src/views/myevaluate/index.vue
src/views/service.vue
@@ -44,6 +44,10 @@ | @@ -44,6 +44,10 @@ | ||
44 | <el-menu-item index="/service/information">个人资料</el-menu-item> | 44 | <el-menu-item index="/service/information">个人资料</el-menu-item> |
45 | <el-menu-item index="/service/myevaluate">我的评价</el-menu-item> | 45 | <el-menu-item index="/service/myevaluate">我的评价</el-menu-item> |
46 | </el-submenu> | 46 | </el-submenu> |
47 | + <el-menu-item @click="logout"> | ||
48 | + <i class="el-icon-finished"></i> | ||
49 | + <span slot="title">退出服务</span> | ||
50 | + </el-menu-item> | ||
47 | </el-menu> | 51 | </el-menu> |
48 | </el-aside> | 52 | </el-aside> |
49 | 53 | ||
@@ -69,6 +73,10 @@ | @@ -69,6 +73,10 @@ | ||
69 | }, | 73 | }, |
70 | handleClose(key, keyPath) { | 74 | handleClose(key, keyPath) { |
71 | console.log(key, keyPath); | 75 | console.log(key, keyPath); |
76 | + }, | ||
77 | + async logout() { | ||
78 | + await this.$store.dispatch('user/logout') | ||
79 | + this.$router.push(`/login?redirect=${this.$route.fullPath}`) | ||
72 | } | 80 | } |
73 | } | 81 | } |
74 | } | 82 | } |