| | |
| | | </view> |
| | | <view class="toast-btn" @click="handleLocation">开启定位</view> |
| | | </view> |
| | | <auth-login v-if="showLogin" @close="showLogin = false"></auth-login> |
| | | <custom-tabbar></custom-tabbar> |
| | | </view> |
| | | </template> |
| | |
| | | CustomTabbar |
| | | }, |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight', 'address', 'latitude', 'cityId', 'longitude']), |
| | | ...mapState(['navHeight', 'statusbarHeight', 'address', 'latitude', 'cityId', 'longitude', 'token']), |
| | | currentAddress() { |
| | | return this.address && this.address !== '定位中' ? this.address : '获取定位' |
| | | } |
| | |
| | | return { |
| | | bannerList: [], |
| | | pointList: [], |
| | | ingOrder: null |
| | | ingOrder: null, |
| | | showLogin: false, |
| | | pendingNavigate: null |
| | | } |
| | | }, |
| | | async onLoad() { |
| | |
| | | onShow() { |
| | | this.ingOrder =null |
| | | this.getIngorder() |
| | | }, |
| | | watch: { |
| | | token(newToken) { |
| | | if (newToken && this.pendingNavigate) { |
| | | const fn = this.pendingNavigate |
| | | this.pendingNavigate = null |
| | | this.showLogin = false |
| | | fn() |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | jumpBannerDetail(item) { |
| | |
| | | } |
| | | }, |
| | | jumpOrderList(status){ |
| | | if (!this.token) { |
| | | this.pendingNavigate = () => this.jumpOrderList(status) |
| | | this.showLogin = true |
| | | return |
| | | } |
| | | uni.setStorageSync("orderStatus",status) |
| | | uni.switchTab({ |
| | | url: '/pages/itinerary/itinerary' |
| | | }) |
| | | }, |
| | | jumpxiadan() { |
| | | if (!this.token) { |
| | | this.pendingNavigate = () => this.jumpxiadan() |
| | | this.showLogin = true |
| | | return |
| | | } |
| | | if (!this.cityId) return uni.showToast({ |
| | | title: '当前城市暂未开通', |
| | | icon: 'none' |