Commit 20117859 authored by 786817560's avatar 786817560

'定位修改'

parent 07bb27b8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Descrip""/>User Settings Edit * @Descrip""/>User Settings Edit
* @Author: your name * @Author: your name
* @Date: 2019-10-11 09:39:51 * @Date: 2019-10-11 09:39:51
* @LastEditTime: 2019-10-14 14:05:34 * @LastEditTime: 2019-10-15 10:26:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<span>选择地区</span> <span>选择地区</span>
</div> </div>
</h-header> </h-header>
<h-content> <section>
<div class="current-location"> <div class="current-location">
<div class="img-box"> <div class="img-box">
<img src="@/assets/homePage/location.png" alt=""> <img src="@/assets/homePage/location.png" alt="">
...@@ -42,21 +42,30 @@ ...@@ -42,21 +42,30 @@
<p :class="{styles:!flag}" @click="changeStyle(1)">{{ province }}</p> <p :class="{styles:!flag}" @click="changeStyle(1)">{{ province }}</p>
<p :class="{styles:flag}" @click="changeStyle(2)">{{ city }}</p> <p :class="{styles:flag}" @click="changeStyle(2)">{{ city }}</p>
</div> </div>
</section>
<section>
<!-- 省份 --> <!-- 省份 -->
<list-item v-if="province_flag" :item-height="40"> <scroll v-show="province_flag" :pullUp="false" class="content-scroll">
<item v-for="(item,index) in lists" :key="index" :proportion="[5,2]">
<section slot="name" @click="selectProvince(item)">{{ item.province_name }}</section> <list-item :item-height="40">
</item> <item v-for="(item,index) in lists" :key="index" :proportion="[5,2]">
</list-item> <section slot="name" @click="selectProvince(item)">{{ item.province_name }}</section>
</item>
</list-item>
</scroll>
<!-- 城市 --> <!-- 城市 -->
<list-item v-if="!province_flag" :item-height="40"> <scroll v-show="!province_flag" :pullUp="false" class="content-scroll">
<item v-for="(item,index) in cityList" :key="index" :proportion="[5,2]">
<section slot="name" @click="selectCity(item.city_name)">{{ item.city_name }}</section> <list-item :item-height="40">
</item> <item v-for="(item,index) in cityList" :key="index" :proportion="[5,2]">
</list-item> <section slot="name" @click="selectCity(item.city_name)">{{ item.city_name }}</section>
</h-content> </item>
</list-item>
</scroll>
</section>
</h-view> </h-view>
</template> </template>
<script> <script>
...@@ -97,6 +106,10 @@ export default { ...@@ -97,6 +106,10 @@ export default {
window.localStorage.setItem('province', res.address.province) window.localStorage.setItem('province', res.address.province)
window.localStorage.setItem('city', res.address.city) window.localStorage.setItem('city', res.address.city)
vm.places = window.localStorage.getItem('province') + '-' + window.localStorage.getItem('city') vm.places = window.localStorage.getItem('province') + '-' + window.localStorage.getItem('city')
vm.province = '请选择省'
vm.city = '请选择市'
vm.flag = false
vm.province_flag = true
} }
}, {enableHighAccuracy: true}) }, {enableHighAccuracy: true})
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment