Commit 0dc28319 authored by 李晓兵's avatar 李晓兵

'修改定位样式'

parent 79eda834
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</div> </div>
</section> </section>
<!-- 省份 --> <!-- 省份 -->
<section ref="pro" class="pro-wrapper"> <section v-show="province_flag" ref="pro" class="pro-wrapper">
<div class="pro-content"> <div class="pro-content">
<list-item :item-height="40"> <list-item :item-height="40">
<item v-for="(item,index) in lists" :key="index" :proportion="[5,2]"> <item v-for="(item,index) in lists" :key="index" :proportion="[5,2]">
...@@ -52,22 +52,23 @@ ...@@ -52,22 +52,23 @@
</list-item> </list-item>
</div> </div>
</section> </section>
<!-- &lt;!&ndash; 城市 &ndash;&gt; <!-- 城市 -->
<scroll v-show="!province_flag" :pullUp="false" class="content-scroll"> <section v-show="!province_flag" ref="city" class="pro-wrapper">
<div class="city-content">
<list-item :item-height="40"> <list-item :item-height="40">
<item v-for="(item,index) in cityList" :key="index" :proportion="[5,2]"> <item v-for="(item,index) in cityList" :key="index" :proportion="[5,2]">
<section slot="name" @click="selectCity(item.city_name)">{{ item.city_name }}</section> <section slot="name" @click="selectCity(item.city_name)">{{ item.city_name }}</section>
</item> </item>
</list-item> </list-item>
</scroll>--> </div>
</section>
</section> </section>
</h-view> </h-view>
</template> </template>
<script> <script>
import BScroll from 'better-scroll' import BScroll from 'better-scroll'
export default { export default {
name: 'Location', name: 'Location',
data () { data () {
return { return {
...@@ -122,7 +123,7 @@ ...@@ -122,7 +123,7 @@
vm.lists = res.lists vm.lists = res.lists
vm.$nextTick(() => { vm.$nextTick(() => {
vm.scroll = new BScroll(vm.$refs.pro, { vm.scroll = new BScroll(vm.$refs.pro, {
click: true click: true,
}) })
}) })
}) })
...@@ -152,8 +153,12 @@ ...@@ -152,8 +153,12 @@
let vm = this let vm = this
this.hlsHttp.post(url, param).then(function (res) { this.hlsHttp.post(url, param).then(function (res) {
console.log(res) console.log(res)
// this.lists = res.lists
vm.cityList = res.lists vm.cityList = res.lists
vm.$nextTick(() => {
vm.cityScroll = new BScroll(vm.$refs.city, {
click: true,
})
})
}) })
this.flag = !this.flag this.flag = !this.flag
this.province_flag = false this.province_flag = false
...@@ -175,7 +180,7 @@ ...@@ -175,7 +180,7 @@
}) })
}, },
}, },
} }
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
#location { #location {
......
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