selectCity.vue 928 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view class="container">
  3. <citySelect @back_city="back_city"></citySelect>
  4. </view>
  5. </template>
  6. <script>
  7. import citySelect from '@/components/linzq-citySelect/linzq-citySelect.vue';
  8. export default {
  9. components: {
  10. citySelect
  11. },
  12. data() {
  13. return {
  14. statusBarHeight:''
  15. }
  16. },
  17. onLoad() {
  18. uni.getSystemInfo({
  19. success: function(res) {debugger
  20. console.log("statusBarHeight", res.statusBarHeight)
  21. that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
  22. },
  23. });
  24. },
  25. methods: {
  26. back_city(e) {debugger
  27. if (e !== 'no') {
  28. this.region = e.cityName
  29. // this.$refs.popupRef.close();
  30. uni.navigateTo({
  31. url:"../position/position?city="+this.region
  32. })
  33. } else {
  34. // this.$refs.popupRef.close();
  35. }
  36. }
  37. }
  38. }
  39. </script>
  40. <style>
  41. .container {
  42. padding: 20px;
  43. font-size: 14px;
  44. line-height: 24px;
  45. }
  46. </style>