selectCity.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="">
  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. let that = this
  19. uni.getSystemInfo({
  20. success: function(res) {
  21. console.log("statusBarHeight", res.statusBarHeight)
  22. that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
  23. },
  24. });
  25. },
  26. methods: {
  27. back_city(e) {
  28. if (e.positionName !== 'no') {
  29. this.region = e.positionName.cityName
  30. // this.$refs.popupRef.close();
  31. uni.setStorage({
  32. key: 'nowRegion',
  33. data: e,
  34. success() {
  35. uni.navigateTo({
  36. url:"../position/position"
  37. })
  38. }
  39. });
  40. } else {
  41. // this.$refs.popupRef.close();
  42. }
  43. }
  44. }
  45. }
  46. </script>
  47. <style>
  48. .container {
  49. padding: 20px;
  50. font-size: 14px;
  51. line-height: 24px;
  52. }
  53. </style>