| | |
| | | </u-popup> |
| | | |
| | | <view class="search"> |
| | | <view class="search_left"> |
| | | <image src="@/static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <text>搜停车点</text> |
| | | <view class="search_left_x"></view> |
| | | <input type="text" placeholder="输入目的地" /> |
| | | </view> |
| | | <view class="search_left"></view> |
| | | <image class="dw" @click="clickcontrol" src="@/static/icon/map_relocation@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | |
| | | <view class="index_scancode"> |
| | | <view class="index_scancode" v-if="!userInfo.mobile || isShow"> |
| | | <button class="index_scancode_bottom" open-type="getPhoneNumber" @getphonenumber="getPhone" |
| | | v-if="!userInfo.mobile">扫码租车</button> |
| | | <view class="index_scancode_bottom" v-else>扫码租车</view> |
| | | <view class="index_scancode_bottom" v-else-if="isShow" @click="saoma">扫码租车</view> |
| | | <view class="index_scancode_zw"></view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | <script> |
| | | import { distance } from '@/utils/utils.js' |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | markers: [], |
| | | info: {}, |
| | | rice: '', |
| | | |
| | | eleBusinessArea: [] |
| | | infoData: {}, |
| | | eleBusinessArea: [], |
| | | isShow: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | onLoad(options) { |
| | | this.type = options.type |
| | | this.getAddress() |
| | | this.refresh() |
| | | }, |
| | | methods: { |
| | | saoma() { |
| | | uni.$emit('update', { msg:'页面更新' }) |
| | | uni.navigateBack({ delta: 1 }); |
| | | }, |
| | | // 刷新首页信息 |
| | | refresh() { |
| | | this.$u.api.home() |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.isShow = res.data.memberRidesResponse ? false : true |
| | | } |
| | | }) |
| | | }, |
| | | // 获取经纬度 |
| | | getAddress() { |
| | | let that = this; |
| | |
| | | distance: this.latitude && this.longitude ? num : '未知距离', |
| | | latitude: item.latitude, |
| | | longitude: item.longitude, |
| | | title: item.name, |
| | | title: item.code, |
| | | iconPath: '/static/icon/ic_bike@2x.png', |
| | | customCallout: { |
| | | anchorY: 0, |
| | |
| | | .search_left { |
| | | width: 400rpx; |
| | | height: 60rpx; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0,0,0,0.08); |
| | | // background: #FFFFFF; |
| | | // box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0,0,0,0.08); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |