|
|
@@ -1,484 +1,386 @@
|
|
|
<template>
|
|
|
- <view class="app">
|
|
|
- <view class="main">
|
|
|
+ <view :class="'app theme'+shopInfo.theme_id">
|
|
|
+ <u-loading-page loading-mode="semicircle" loadingText="加载中..." :loading="loading" bg-color="#d81b10">
|
|
|
+ </u-loading-page>
|
|
|
+ <view class="main" v-if="!loading">
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
+ <view class="header">
|
|
|
+ <view class="shop">
|
|
|
+ <view class="shop-name" v-text="shopInfo.name"></view>
|
|
|
+ </view>
|
|
|
+ <view class="banner">
|
|
|
+ <u-swiper :list="banners" @click="bannerTo" keyName="cover" radius="24" height="320"></u-swiper>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="notices">
|
|
|
- <u-notice-bar :fontSize="30" :text="params.total? '您有'+params.total+'个最新的派单,请及时查看并接单': '暂无新订单'"
|
|
|
- mode="closable">
|
|
|
+ <u-notice-bar :fontSize="30" :speed="3000" :icon="'../../static/icons/notice-'+shopInfo.theme_id+'.png'"
|
|
|
+ :direction="'column'" :text="noticeList" @click="noticeTo" bgColor="#fff">
|
|
|
</u-notice-bar>
|
|
|
+ <image class="icon-right" :src="'../../static/icons/arrow-right-'+shopInfo.theme_id+'.png'"></image>
|
|
|
</view>
|
|
|
- <view class="list-box" v-if="userInfo.order_status == 2">
|
|
|
- <u-empty :textSize="30" mode="order" text="您未开启接单,暂无订单推送" icon="../../static/icons/empty.png">
|
|
|
- </u-empty>
|
|
|
- </view>
|
|
|
- <view class="list-box" v-else-if="dataList.length<=0">
|
|
|
- <u-empty :textSize="30" mode="order" text="暂无派单" icon="../../static/icons/empty.png">
|
|
|
- </u-empty>
|
|
|
- </view>
|
|
|
- <view class="list-box" v-else>
|
|
|
- <view class="list-item" v-for="(v,k) in dataList" :key="k">
|
|
|
- <view class="text-item">
|
|
|
- <text class="cate"><text
|
|
|
- class="text">{{['人人快车','电动摩的','节能电动车','电动专车'][v.category_id]}}</text><text
|
|
|
- class="text">乘客{{v.count+'人'}}</text></text>
|
|
|
- <text class="status">
|
|
|
- <text class="text status3">距离您 {{v.distance}}km</text>
|
|
|
- </text>
|
|
|
- </view>
|
|
|
- <view class="text-item">
|
|
|
- <u-icon class="icon" size="32" name="order" color="#e46008"></u-icon>
|
|
|
- <text class="text">{{v.order_no}}</text>
|
|
|
- </view>
|
|
|
- <view class="text-item">
|
|
|
- <u-icon class="icon" size="32" name="clock" color="#e46008"></u-icon>
|
|
|
- <text class="text">{{v.created_at.text}}</text>
|
|
|
- <text class="price">¥{{v.settle_price}}</text>
|
|
|
- </view>
|
|
|
- <view class="text-item">
|
|
|
- <u-icon class="icon" size="32" name="map" color="#00a1d1"></u-icon>
|
|
|
- <text class="text" @click="mapTo(v,1)">{{v.depart}}</text>
|
|
|
+ <view class="nav">
|
|
|
+ <!-- <view class="nav-item" @click="gotoPage('/pages/shop/index')">
|
|
|
+ <image class="bg" src="../../static/images/nav1.jpeg"></image>
|
|
|
+ <view>
|
|
|
+ <view class="name">{{}}</view>
|
|
|
+ <view class="text"></view>
|
|
|
</view>
|
|
|
- <view class="text-item">
|
|
|
- <u-icon class="icon" size="32" name="map-fill" color="#e46008"></u-icon>
|
|
|
- <text class="text" @click="mapTo(v,2)">{{v.arrive}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="nav-item" @click="gotoPage('/pages/shop/welfare')">
|
|
|
+ <image class="bg" src="../../static/images/nav2.jpeg"></image>
|
|
|
+ <view>
|
|
|
+
|
|
|
</view>
|
|
|
- <view class="text-item">
|
|
|
- <button class="btn confirm" @click="confirm(v.id,k)">立即接单</button>
|
|
|
+ </view> -->
|
|
|
+ <view class="nav-item" v-for="(v,k) in menus" :key="k" @click="gotoPage(v.url)">
|
|
|
+ <image class="bg" :src="v.cover"></image>
|
|
|
+ <view class="info">
|
|
|
+ <view class="text name">{{v.title}}</view>
|
|
|
+ <view class="text desc">{{v.description}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-loadmore v-if="dataList.length>0 && userInfo.order_status == 1" :fontSize="24" :status="loadMore" />
|
|
|
+
|
|
|
+ <view class="ad" v-if="adData.id">
|
|
|
+ <image class="ad-item" :src="adData.cover" @click="gotoPage(adData.url)"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <tabbar :index="1"></tabbar>
|
|
|
+ <tabbar v-if="!loading" :index="1" :themeId="shopInfo.theme_id"></tabbar>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import tabbar from '../../components/tabbar.vue'
|
|
|
- var QQMapWX = require('../../common/qqmap-wx-jssdk.min.js');
|
|
|
- var qqmapsdk;
|
|
|
export default {
|
|
|
components: {
|
|
|
tabbar
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- loadMore: 'loadmore',
|
|
|
+ loading: false,
|
|
|
textStyle: {
|
|
|
fontSize: 16,
|
|
|
},
|
|
|
- loading: false,
|
|
|
- loaded: false,
|
|
|
- showLoading: true,
|
|
|
- params: {
|
|
|
- page: 1,
|
|
|
- pageSize: 15,
|
|
|
- total: 0,
|
|
|
- lat: '',
|
|
|
- lng: '',
|
|
|
+ shopInfo: {
|
|
|
+ theme_id: 1,
|
|
|
},
|
|
|
- orderNotice: '您有3个最新的派单,请及时查看并接单',
|
|
|
+ adData: {},
|
|
|
+ noticeList: ['暂无公告'],
|
|
|
+ banners: [], // 轮播
|
|
|
+ menus: [], // 导航菜单
|
|
|
userInfo: {
|
|
|
id: 0
|
|
|
},
|
|
|
- dataList: [],
|
|
|
- waitOrder: {
|
|
|
- id: 0
|
|
|
- },
|
|
|
- music: null,
|
|
|
- token: '',
|
|
|
- timer: {
|
|
|
- wait: null,
|
|
|
- list: null
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
let _this = this
|
|
|
- var token = uni.getStorageSync('rrc.token')
|
|
|
- var reload = uni.getStorageSync('rrc.reload')
|
|
|
- this.token = typeof(token) != 'undefined' ? token : '';
|
|
|
+ _this.getData()
|
|
|
_this.getInfo()
|
|
|
|
|
|
- },
|
|
|
- onPullDownRefresh() {
|
|
|
- this.dataList = [];
|
|
|
- this.loaded = false;
|
|
|
- this.loadMore = false;
|
|
|
- this.params.page = 1;
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- onReachBottom() {
|
|
|
- if (!this.loaded) {
|
|
|
- this.params.page++;
|
|
|
- this.loadMore = true
|
|
|
- this.getData();
|
|
|
- }
|
|
|
- },
|
|
|
- onUnload() {
|
|
|
- // 销毁
|
|
|
- clearInterval(this.timer.list);
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
- mapTo(data, type) {
|
|
|
- if (type == 1) {
|
|
|
- // #ifdef H5
|
|
|
- console.log('H5地图')
|
|
|
- location.href = 'https://apis.map.qq.com/uri/v1/routeplan?type=drive&to=' + data.depart_address +
|
|
|
- '&tocoord=' +
|
|
|
- data.depart_lat + ',' + data.depart_lng + '&policy=1&referer=' + this.$request.mapKey;
|
|
|
- // #endif
|
|
|
- // APP: 打成app包的时候
|
|
|
- // #ifdef APP-PLUS
|
|
|
- console.log('APP地图')
|
|
|
- location.href = 'qqmap://map/routeplan?type=drive&to=' + data.depart_address + '&tocoord=' + data
|
|
|
- .depart_lat +
|
|
|
- ',' + data.depart_lng + '&referer=' + this.$request.mapKey;
|
|
|
- // #endif
|
|
|
- } else {
|
|
|
- // #ifdef H5
|
|
|
- console.log('H5地图')
|
|
|
- location.href = 'https://apis.map.qq.com/uri/v1/routeplan?type=drive&to=' + data.arrive_address +
|
|
|
- '&tocoord=' +
|
|
|
- data.lat + ',' + data.lng + '&policy=1&referer=' + this.$request.mapKey;
|
|
|
- // #endif
|
|
|
- // APP: 打成app包的时候
|
|
|
- // #ifdef APP-PLUS
|
|
|
- console.log('APP地图')
|
|
|
- location.href = 'qqmap://map/routeplan?type=drive&to=' + data.arrive_address + '&tocoord=' + data.lat +
|
|
|
- ',' + data.lng + '&referer=' + this.$request.mapKey;
|
|
|
- // #endif
|
|
|
+ // 公告详情
|
|
|
+ noticeTo(index) {
|
|
|
+ var id = this.notices[index].id;
|
|
|
+ if (id) {
|
|
|
+ this.gotoPage('/pages/notice/detail?id=' + id);
|
|
|
}
|
|
|
},
|
|
|
- initMap() {
|
|
|
- let _this = this
|
|
|
- _this.$refs.uToast.show({
|
|
|
- type: 'loading',
|
|
|
- title: '获取定位中...',
|
|
|
- message: '获取定位中...',
|
|
|
- duration: 999999,
|
|
|
- mask: true
|
|
|
- })
|
|
|
- let time = (new Date()).getTime();
|
|
|
- let location = uni.getStorageSync('rrc.location')
|
|
|
- location = typeof(location) != 'undefined' && location ? JSON.parse(location) : {};
|
|
|
-
|
|
|
- if (!location || !location.latitude || !location.longitude || location.time < time) {
|
|
|
- uni.getLocation({
|
|
|
- type: 'wgs84', //腾讯地图使用gcj02获取位置坐标
|
|
|
- altitude: true,
|
|
|
- geocode: true,
|
|
|
- highAccuracyExpireTime: 100,
|
|
|
- success: function(res) {
|
|
|
- console.log('当前位置的经度:' + res.longitude);
|
|
|
- console.log('当前位置的纬度:' + res.latitude);
|
|
|
-
|
|
|
- res.expired = (new Date()).getTime() + 10000
|
|
|
-
|
|
|
- uni.setStorageSync('rrc.location', JSON.stringify(res))
|
|
|
-
|
|
|
- _this.params.lat = res.latitude
|
|
|
- _this.params.lng = res.longitude
|
|
|
- _this.initData();
|
|
|
- },
|
|
|
- fail: function(err) {
|
|
|
- console.log(err)
|
|
|
- _this.$refs.uToast.hide();
|
|
|
- uni.getSystemInfo({
|
|
|
- success(res) {
|
|
|
- // 安卓
|
|
|
- if (res.platform == 'android') {
|
|
|
- try {
|
|
|
- var context = plus.android.importClass(
|
|
|
- 'android.content.Context');
|
|
|
- var locationManager = plus.android.importClass(
|
|
|
- 'android.location.LocationManager');
|
|
|
- var main = plus.android.runtimeMainActivity();
|
|
|
- var mainSvr = main.getSystemService(context
|
|
|
- .LOCATION_SERVICE);
|
|
|
- if (!mainSvr.isProviderEnabled(locationManager
|
|
|
- .GPS_PROVIDER)) {
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '请打开定位服务功能,并授权',
|
|
|
- showCancel: false,
|
|
|
- success(result) {
|
|
|
- if (result.confirm == true) {
|
|
|
- if (!mainSvr.isProviderEnabled(
|
|
|
- locationManager
|
|
|
- .GPS_PROVIDER
|
|
|
- )) {
|
|
|
- var Intent = plus.android
|
|
|
- .importClass(
|
|
|
- 'android.content.Intent'
|
|
|
- );
|
|
|
- var Settings = plus.android
|
|
|
- .importClass(
|
|
|
- 'android.provider.Settings'
|
|
|
- );
|
|
|
- var newIntent = new Intent(
|
|
|
- Settings
|
|
|
- .ACTION_LOCATION_SOURCE_SETTINGS
|
|
|
- );
|
|
|
- main.startActivity(newIntent);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- console.log
|
|
|
- _this.$u.toast('打开定位失败');
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- fail() {
|
|
|
- _this.$u.toast('打开定位失败');
|
|
|
- }
|
|
|
- })
|
|
|
- console.log(err)
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- _this.params.lat = location.latitude
|
|
|
- _this.params.lng = location.longitude
|
|
|
- _this.initData();
|
|
|
+ // 轮播跳转
|
|
|
+ bannerTo(index) {
|
|
|
+ var url = this.banners[index].url;
|
|
|
+ if (url) {
|
|
|
+ this.gotoPage(url);
|
|
|
}
|
|
|
},
|
|
|
- initData() {
|
|
|
- let _this = this;
|
|
|
- _this.getData()
|
|
|
-
|
|
|
- // 定时更新我的订单
|
|
|
- var time1 = parseInt(Math.random() * 5000) + 5000;
|
|
|
- clearInterval(_this.timer.list);
|
|
|
- _this.timer.list =
|
|
|
- setInterval(function() {
|
|
|
- time1 = parseInt(Math.random() * 5000) + 5000;
|
|
|
- _this.getData();
|
|
|
- }, time1)
|
|
|
- },
|
|
|
getInfo() {
|
|
|
let _this = this
|
|
|
- this.$request.api('/api/v1/taxiuser/userInfo', {
|
|
|
- type: 2
|
|
|
+ this.$request.api('/api/v1/member/info', {
|
|
|
+ type: 3
|
|
|
}, 'POST').then(res => {
|
|
|
// 打印调用成功回调
|
|
|
- if (res.code == 10000) {
|
|
|
+ setTimeout(function() {
|
|
|
+ _this.loading = false;
|
|
|
+ }, 800)
|
|
|
+ if (res.success == true) {
|
|
|
_this.userInfo = res.data
|
|
|
+ if (typeof(_this.userInfo.shop_info) != 'undefined' && _this.userInfo.shop_info) {
|
|
|
+ _this.shopInfo = _this.userInfo.shop_info
|
|
|
+ }
|
|
|
|
|
|
- if (_this.userInfo.order_status != 2) {
|
|
|
- _this.initMap()
|
|
|
- } else {
|
|
|
+ if (typeof(_this.userInfo.bank_info.id) == 'undefined' || _this.userInfo.bank_info.id <=
|
|
|
+ 0) {
|
|
|
uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '您未开启接单功能,请先开启再接单',
|
|
|
- showCancel: false,
|
|
|
- success(result) {
|
|
|
- if (result.confirm == true) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/center/setting'
|
|
|
- })
|
|
|
+ title: '账号提示',
|
|
|
+ content: '请先绑定收款信息再使用',
|
|
|
+ cancelText: '先不绑定',
|
|
|
+ confirmText: '立即绑定',
|
|
|
+ confirmColor: '#ff0000',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ _this.gotoPage('/pages/member/bank');
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- } else if (res.errcode == 30001) {
|
|
|
+ } else if (res.code == 403) {
|
|
|
console.log(res)
|
|
|
- _this.$u.toast(res.errmsg);
|
|
|
+ _this.$u.toast(res.msg);
|
|
|
setTimeout(function() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/login/login'
|
|
|
})
|
|
|
}, 1200)
|
|
|
} else {
|
|
|
- _this.$u.toast(res.errmsg);
|
|
|
+ _this.$u.toast(res.msg);
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
console.log(error)
|
|
|
- _this.$u.toast(error.errmsg);
|
|
|
+ _this.$u.toast(error.msg);
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- // 获取列表
|
|
|
- // 列表
|
|
|
+ // 获取主页数据
|
|
|
getData() {
|
|
|
let _this = this
|
|
|
- this.loadStatus = 'loading';
|
|
|
- this.$request.api('/api/v1/taxiuser/order', _this.params, 'POST').then(res => {
|
|
|
- _this.loadStatus = 'loadmore'
|
|
|
- _this.$refs.uToast.hide();
|
|
|
- if (res.code == 10000) {
|
|
|
- console.log(res.data.list)
|
|
|
- _this.params.total = res.data.total
|
|
|
+ this.$request.api('/api/v1/index/data', {}, 'POST').then(res => {
|
|
|
+ // 打印调用成功回调
|
|
|
+ if (res.success == true) {
|
|
|
+ var banners = [];
|
|
|
+ var notices = [];
|
|
|
+ _this.banners = typeof(res.data.banners) != 'undefined' ? res.data.banners : [];
|
|
|
+ _this.notices = typeof(res.data.notices) != 'undefined' ? res.data.notices : [];
|
|
|
+ _this.menus = typeof(res.data.menus) != 'undefined' ? res.data.menus : [];
|
|
|
+ _this.adData = typeof(res.data.ad) != 'undefined' ? res.data.ad : {};
|
|
|
+ if (_this.notices.length > 0) {
|
|
|
+ for (var i in _this.notices) {
|
|
|
+ notices.push(_this.notices[i].title)
|
|
|
+ }
|
|
|
+ _this.noticeList = notices
|
|
|
+ console.log(_this.noticeList)
|
|
|
+ }
|
|
|
+ } else if (res.code == 403) {
|
|
|
+ console.log(res)
|
|
|
+ _this.$u.toast(res.msg);
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ })
|
|
|
+ }, 1200)
|
|
|
+ } else {
|
|
|
+ _this.$u.toast(res.msg);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error)
|
|
|
+ _this.$u.toast(error.msg);
|
|
|
+ })
|
|
|
|
|
|
- // 有新订单
|
|
|
- var hasNewOrder = typeof(res.data.hasNewOrder) != 'undefined' ? res.data.hasNewOrder :
|
|
|
- false;
|
|
|
- if (hasNewOrder && !_this.music && res.data.list.length > 0) {
|
|
|
- _this.music = uni.createInnerAudioContext(); //创建播放器对象
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+ page {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .app {
|
|
|
+ height: 100%;
|
|
|
+ background: url('../../static/images/bg.png') repeat #f9f9f9;
|
|
|
+ background-size: contain;
|
|
|
+ }
|
|
|
|
|
|
- _this.music.src = "../../static/mp3/order.mp3";
|
|
|
+ .app.theme1 {
|
|
|
+ background: url('../../static/images/bg1-1.png') repeat #f9f9f9;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ // background-size: cover;
|
|
|
+ }
|
|
|
|
|
|
- _this.music.play(); //执行播放
|
|
|
+ .app.theme2 {
|
|
|
+ background: url('../../static/images/bg2.png') repeat #f9f9f9;
|
|
|
+ // background-size: cover;
|
|
|
+ background-size: contain;
|
|
|
+ }
|
|
|
|
|
|
- _this.music.onEnded(() => {
|
|
|
+ .app.theme3 {
|
|
|
+ background: url('../../static/images/bg3.png') repeat #f9f9f9;
|
|
|
+ // background-size: cover;
|
|
|
+ background-size: contain;
|
|
|
+ }
|
|
|
|
|
|
- //播放结束
|
|
|
+ .app.theme4 {
|
|
|
+ background: url('../../static/images/bg4.png') repeat #f9f9f9;
|
|
|
+ // background-size: cover;
|
|
|
+ background-size: contain;
|
|
|
+ }
|
|
|
|
|
|
- _this.music = null;
|
|
|
+ .header {
|
|
|
+ //background: url('../../static/images/bg1.png') repeat #f9f9f9;
|
|
|
+ background-size: contain;
|
|
|
+ }
|
|
|
|
|
|
- });
|
|
|
- }
|
|
|
+ .shop .shop-name {
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ padding: 38rpx 0 28rpx;
|
|
|
+ font-size: 38rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
|
|
|
- if (_this.loadMore == true && res.data.list.length > 0) {
|
|
|
- let len = res.data.list.length
|
|
|
+ .banner {
|
|
|
+ width: calc(100% - 56rpx);
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
|
|
|
- for (let i = 0; i <= len; i++) {
|
|
|
- if (typeof(res.data.list[i]) != 'undefined') {
|
|
|
- _this.dataList.push(res.data.list[i])
|
|
|
- }
|
|
|
- }
|
|
|
- _this.loadMore = false
|
|
|
+ .notices {
|
|
|
+ position: relative;
|
|
|
+ width: calc(100% - 56rpx);
|
|
|
+ background-color: #fff;
|
|
|
+ margin: 30rpx auto;
|
|
|
+ border-radius: 76rpx;
|
|
|
+ }
|
|
|
|
|
|
- } else if (res.data.list.length > 0) {
|
|
|
- _this.dataList = res.data.list ? res.data.list : [];
|
|
|
- }
|
|
|
+ .u-notice-bar {
|
|
|
+ border-radius: 76rpx;
|
|
|
+ }
|
|
|
|
|
|
- if (this.params.page != 1 && res.data.list.length <= 0) {
|
|
|
- _this.loaded = true
|
|
|
- _this.loadStatus = 'nomore'
|
|
|
- }
|
|
|
- if (this.params.page == 1 && res.data.list.length <= 0) {
|
|
|
- _this.loaded = true
|
|
|
- _this.loadStatus = 'nodata'
|
|
|
- this.dataList = [];
|
|
|
- }
|
|
|
|
|
|
- uni.stopPullDownRefresh()
|
|
|
+ .u-notice__content__text {
|
|
|
+ font-size: 28rpx !important;
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- _this.loadMore = false;
|
|
|
- _this.loadStatus = 'loadmore';
|
|
|
- })
|
|
|
+ .nav {
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
- // 接单
|
|
|
- confirm(id, index) {
|
|
|
- let _this = this
|
|
|
+ .nav .nav-item {
|
|
|
+ position: relative;
|
|
|
+ width: calc((100% - 84rpx)/2);
|
|
|
+ margin-left: 28rpx;
|
|
|
+ min-height: 172rpx;
|
|
|
|
|
|
- uni.showLoading({
|
|
|
- title: '提交中...',
|
|
|
- })
|
|
|
+ }
|
|
|
|
|
|
- _this.$request.api('/api/v1/taxiuser/receive', {
|
|
|
- id: id
|
|
|
- }, 'POST')
|
|
|
- .then(res => {
|
|
|
- // 打印调用成功回调
|
|
|
- uni.hideLoading()
|
|
|
- if (parseInt(res.code) == 10000) {
|
|
|
- _this.$u.toast(res.message);
|
|
|
- setTimeout(function() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/order/index'
|
|
|
- })
|
|
|
- }, 800)
|
|
|
- } else {
|
|
|
- _this.$u.toast(res.message);
|
|
|
- }
|
|
|
- })
|
|
|
+ .nav .nav-item .bg {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: inline-block;
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ }
|
|
|
|
|
|
+ .nav .nav-item .info {
|
|
|
+ position: absolute;
|
|
|
+ z-index: 2;
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ top: 0;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ .nav .nav-item .info .text {
|
|
|
+ margin: 0 10%;
|
|
|
}
|
|
|
-</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
- .app {
|
|
|
- height: 100%;
|
|
|
+ .nav .nav-item .info .name {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 10% 10% 4%;
|
|
|
}
|
|
|
|
|
|
- .u-notice__content__text {
|
|
|
- font-size: 28rpx !important;
|
|
|
+ .ad {
|
|
|
+ margin: 28rpx 28rpx;
|
|
|
}
|
|
|
|
|
|
- .u-empty {
|
|
|
- margin-top: 35% !important;
|
|
|
+ .ad .ad-item {
|
|
|
+ width: 100%;
|
|
|
+ height: 400rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
}
|
|
|
|
|
|
- .list-box {
|
|
|
- padding-top: 30rpx;
|
|
|
+ .icon-right {
|
|
|
+ display: inline-block;
|
|
|
+ width: 38rpx;
|
|
|
+ height: 38rpx;
|
|
|
+ vertical-align: middle;
|
|
|
+ position: absolute;
|
|
|
+ top: 15rpx;
|
|
|
+ right: 18rpx;
|
|
|
}
|
|
|
|
|
|
- .list-item {
|
|
|
- padding-bottom: 20rpx;
|
|
|
- margin: 0 30rpx;
|
|
|
- border-bottom: 8rpx solid #f1f1f1;
|
|
|
+ @media screen and (max-width: 768px) {
|
|
|
+ .shop .shop-name {
|
|
|
+ padding: 19rpx 0;
|
|
|
+ }
|
|
|
|
|
|
- .text-item {
|
|
|
- padding: 10rpx 0;
|
|
|
+ .notices {
|
|
|
+ margin: 18rpx auto;
|
|
|
+ }
|
|
|
|
|
|
- .cate {
|
|
|
- font-weight: bold;
|
|
|
+ .nav .nav-item {
|
|
|
+ min-height: 118rpx;
|
|
|
+ }
|
|
|
|
|
|
- .text {
|
|
|
- margin-right: 10rpx;
|
|
|
- }
|
|
|
- }
|
|
|
+ .ad .ad-item {
|
|
|
+ height: 320rpx;
|
|
|
+ padding-bottom: 130rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .icon {
|
|
|
- margin-right: 10rpx;
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
+ @media screen and (max-height: 900px) {
|
|
|
+ .shop .shop-name {
|
|
|
+ padding: 52rpx 0;
|
|
|
+ }
|
|
|
|
|
|
- .status {
|
|
|
- float: right;
|
|
|
- }
|
|
|
+ .notices {
|
|
|
+ margin: 38rpx auto;
|
|
|
+ }
|
|
|
|
|
|
- .status3 {
|
|
|
- color: #e46008;
|
|
|
- }
|
|
|
+ .nav .nav-item {
|
|
|
+ min-height: 178rpx;
|
|
|
+ }
|
|
|
|
|
|
- .status4 {
|
|
|
- color: green;
|
|
|
- }
|
|
|
+ .ad .ad-item {
|
|
|
+ height: 460rpx;
|
|
|
+ padding-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .status5 {
|
|
|
- color: #999;
|
|
|
- }
|
|
|
+ @media screen and (max-height: 800px) {
|
|
|
+ .shop .shop-name {
|
|
|
+ padding: 38rpx 0;
|
|
|
+ }
|
|
|
|
|
|
- .confirm {
|
|
|
- background-color: #e46008;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
+ .notices {
|
|
|
+ margin: 30rpx auto;
|
|
|
+ }
|
|
|
|
|
|
- .price {
|
|
|
- margin-left: 5px;
|
|
|
- color: #e46008;
|
|
|
- padding: 2px 8px;
|
|
|
- float: right;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
+ .nav .nav-item {
|
|
|
+ min-height: 172rpx;
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
+ .ad .ad-item {
|
|
|
+ height: 400rpx;
|
|
|
+ padding-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .u-loadmore {
|
|
|
- height: 60rpx !important;
|
|
|
- padding: 19rpx;
|
|
|
+ @media screen and (max-height: 700px) {
|
|
|
+ .ad .ad-item {
|
|
|
+ height: 360rpx;
|
|
|
+ padding-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .u-loadmore__content__text,
|
|
|
- .u-line-1 {
|
|
|
- height: 32rpx;
|
|
|
- line-height: 60rpx !important;
|
|
|
+ @media screen and (max-height: 600px) {
|
|
|
+ .ad .ad-item {
|
|
|
+ height: 380rpx;
|
|
|
+ padding-bottom: 0;
|
|
|
}
|
|
|
}
|
|
|
</style>
|