tianyi 1 month ago
parent
commit
2b2eebfa5a
  1. 462
      pages/index/index.vue

462
pages/index/index.vue

@ -3,7 +3,8 @@
<view class="swiper-container">
<view class="swiper-page" v-if="currentIndex == 0">
<view style="position: relative;height: 545rpx;">
<view style="width:100%;height: 180rpx;position: fixed;top: 0;background: #fff;z-index: 90;" v-if="lastScrollTop>583"></view>
<view style="width:100%;height: 180rpx;position: fixed;top: 0;background: #fff;z-index: 90;"
v-if="lastScrollTop>583"></view>
<view style="position: absolute;top: 110rpx;left: 20rpx;z-index: 999;">
<view @click="checkArea" v-if="areaName == ''">
点击选择区域
@ -16,20 +17,25 @@
</view>
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
:interval="interval" :duration="duration">
<swiper-item v-if="item.position == 'home_top' " v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<swiper-item v-if="item.position == 'home_top' " v-for="(item,index) in mallAds" :key="index"
@tap="goAdPage(item)">
<img :src="item.adImage" alt="" />
</swiper-item>
</swiper>
<view class="" style="background: #fff;">
<swiper class="swiper" vertical circular :autoplay="orderLists.length > 0"
:interval="onlineWorkerInterval" :duration="onlineWorkerDuration" style="height: 74px;margin-top: -50px;">
<swiper-item v-if="orderLists.length > 0" v-for="(item,index) in orderLists" :key="index" @tap="goOrderDetail(item)">
:interval="onlineWorkerInterval" :duration="onlineWorkerDuration"
style="height: 74px;margin-top: -50px;">
<swiper-item v-if="orderLists.length > 0" v-for="(item,index) in orderLists" :key="index"
@tap="goOrderDetail(item)">
<view class="order-msg-box">
<view class="order-msg-left">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/bf2bb7f80e17428391c407aef769517a.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/bf2bb7f80e17428391c407aef769517a.png"
alt="" />
</view>
<view class="order-msg-center">
<view style="font-weight: 700;font-size: 30rpx;line-height: 60rpx;margin-top: 5%;">
<view
style="font-weight: 700;font-size: 30rpx;line-height: 60rpx;margin-top: 5%;">
<text v-if="item.status == 0">待支付</text>
<text v-if="item.status == 2">等待配送员接单</text>
<text v-if="item.status == 10">待成团</text>
@ -43,12 +49,15 @@
<text v-if="item.status == 11">售后中</text>
<text v-if="item.status == 12">订单已售后</text>
</view>
<view style="font-size: 24rpx;" v-if="item.deliveryType == 1 && (item.status == 3 || item.status == 4) && item.deliveryInfo != null">
预计<text style="color: red;">{{item.deliveryInfo.mustFinishTime | formatHourMinute }}</text>送达
<view style="font-size: 24rpx;"
v-if="item.deliveryType == 1 && (item.status == 3 || item.status == 4) && item.deliveryInfo != null">
预计<text
style="color: red;">{{item.deliveryInfo.mustFinishTime | formatHourMinute }}</text>送达
</view>
</view>
<view class="order-msg-right" @tap.stop="$refs.pagesPopup.open()">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/579569bfcc954f52baea06f6f11951be.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/579569bfcc954f52baea06f6f11951be.png"
alt="" />
</view>
</view>
</swiper-item>
@ -56,46 +65,55 @@
</view>
<view class="menu-box" :style="{'margin-top':orderLists.length < 1?'-140rpx':'','height':orderLists.length < 1?'190rpx':'','padding-top':orderLists.length < 1?'40rpx':''}">
<view class="menu-box"
:style="{'margin-top':orderLists.length < 1?'-140rpx':'','height':orderLists.length < 1?'190rpx':'','padding-top':orderLists.length < 1?'40rpx':''}">
<view class="menu-list" @tap="goDetail('1')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/7690c4f897604fca804ea932bc3c1239.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/7690c4f897604fca804ea932bc3c1239.png"
alt="" />
<view class="menu-name">跑腿/快递</view>
</view>
<view class="menu-list" @tap="goDetail('2')" style="position: relative;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/553230c20dea4e5c85f1e396058a7493.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1a02b40d853a4cfdb062fff44ec49e6a.png" alt=""
style="position: absolute;top: -16rpx;right: 0;width: 88rpx;height: 36rpx;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/553230c20dea4e5c85f1e396058a7493.png"
alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1a02b40d853a4cfdb062fff44ec49e6a.png"
alt="" style="position: absolute;top: -16rpx;right: 0;width: 88rpx;height: 36rpx;">
<view class="menu-name">饭团</view>
</view>
<view class="menu-list" @tap="goDetail('3')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a2f41e2d45cb4d418d273f6e9ceafff0.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a2f41e2d45cb4d418d273f6e9ceafff0.png"
alt="" />
<view class="menu-name">农场</view>
</view>
<view class="menu-list" @tap="goDetail('4')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/41cfb56caff4419b94b69d0f2303b602.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/41cfb56caff4419b94b69d0f2303b602.png"
alt="" />
<view class="menu-name">扭蛋机</view>
</view>
<view class="menu-list" @tap="goDetail('5')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a083b7d159264bbc967034088fa7eb3a.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a083b7d159264bbc967034088fa7eb3a.png"
alt="" />
<view class="menu-name">ie浏览器</view>
</view>
</view>
<view class="like-box">
<view class="like-title">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/e0c44bc9b69a46559d3aa4160d3cf4a5.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/e0c44bc9b69a46559d3aa4160d3cf4a5.png"
alt="" />
</view>
<view class="like-content-box">
<view class="like-left">
<view class="like-content-title">
<view style="width: 100%;font-weight: 700;">爆品拼团</view>
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/0eeb2e28f84a43a0aefddd8edb430d73.png" alt=""
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/0eeb2e28f84a43a0aefddd8edb430d73.png"
alt=""
style="width: 140rpx;height: 64rpx;position: absolute;top: -16rpx;left: 40%;" />
<img src="/static/images/img/yousanjiao.png" alt=""
style="width: 28rpx;height: 28rpx;position: absolute;top: 20rpx;right: 12rpx;">
</view>
<view class="like-content">
<view class="content-list" v-if="item.position == 'home_center_left_top' " v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="content-list" v-if="item.position == 'home_center_left_top' "
v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="list-img">
<img :src="item.adImage" alt="">
<view class="list-type">{{item.productList[0].groupMembers}}人团</view>
@ -105,13 +123,15 @@
<view class="list-text">{{item.title}}</view>
</view>
<view class="list-price" style="color: #00231C;">{{item.productList[0].originalPrice}}</view>
<view class="list-price" style="color: #00231C;">
{{item.productList[0].originalPrice}}</view>
<view class="list-total">
拼团<text style="color: red;">{{item.productList[0].groupPrice}}</text>
</view>
</view>
</view>
<view class="content-list" v-if="item.position == 'home_center_left_bottom' " v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="content-list" v-if="item.position == 'home_center_left_bottom' "
v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="list-img">
<img :src="item.adImage" alt="">
<view class="list-type">{{item.productList[0].groupMembers}}人团</view>
@ -121,7 +141,8 @@
<view class="list-text">{{item.title}}</view>
</view>
<view class="list-price" style="color: #00231C;">{{item.productList[0].originalPrice}}</view>
<view class="list-price" style="color: #00231C;">
{{item.productList[0].originalPrice}}</view>
<view class="list-total">
拼团<text style="color: red;">{{item.productList[0].groupPrice}}</text>
</view>
@ -132,13 +153,15 @@
<view class="like-left">
<view class="like-content-title">
<view style="font-weight: 700;">爆品拼团</view>
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/0eeb2e28f84a43a0aefddd8edb430d73.png" alt=""
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/0eeb2e28f84a43a0aefddd8edb430d73.png"
alt=""
style="width: 140rpx;height: 64rpx;position: absolute;top: -16rpx;left: 40%;" />
<img src="/static/images/img/yousanjiao.png" alt=""
style="width: 28rpx;height: 28rpx;position: absolute;top: 20rpx;right: 12rpx;">
</view>
<view class="like-content">
<view class="content-list" v-if="item.position == 'home_center_right_top' " v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="content-list" v-if="item.position == 'home_center_right_top' "
v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="list-img">
<img :src="item.adImage" alt="">
<view class="list-type">{{item.productList[0].groupMembers}}人团</view>
@ -148,13 +171,15 @@
<view class="list-text">{{item.title}}</view>
</view>
<view class="list-price" style="color: #00231C;">{{item.productList[0].originalPrice}}</view>
<view class="list-price" style="color: #00231C;">
{{item.productList[0].originalPrice}}</view>
<view class="list-total">
拼团<text style="color: red;">{{item.productList[0].groupPrice}}</text>
</view>
</view>
</view>
<view class="content-list" v-if="item.position == 'home_center_right_bottom' " v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="content-list" v-if="item.position == 'home_center_right_bottom' "
v-for="(item,index) in mallAds" :key="index" @tap="goAdPage(item)">
<view class="list-img">
<img :src="item.adImage" alt="">
<view class="list-type">{{item.productList[0].groupMembers}}人团</view>
@ -164,7 +189,8 @@
<view class="list-text">{{item.title}}</view>
</view>
<view class="list-price" style="color: #00231C;">{{item.productList[0].originalPrice}}</view>
<view class="list-price" style="color: #00231C;">
{{item.productList[0].originalPrice}}</view>
<view class="list-total">
拼团<text style="color: red;">{{item.productList[0].groupPrice}}</text>
</view>
@ -175,38 +201,55 @@
</view>
</view>
<view class="daimai-box" style="padding-bottom:180rpx;">
<view class="daimai-tab" id="menuList" :style="{'top': (navBarHeight+46) + 'px','background':lastScrollTop>583?'#fff':''}">
<view class="daimai-tab" id="menuList"
:style="{'top': (navBarHeight+46) + 'px','background':lastScrollTop>583?'#fff':''}">
<view @tap="checkTab1('waimai')" style="flex: 1;">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'waimai'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4d3207adb25546f68ce4d3428e571867.png" alt="" style="width: 160rpx;height: 50rpx;" />
<text style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{waimaiCount}}</text>
<view class="like-title"
style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;"
v-if="checked == 'waimai'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4d3207adb25546f68ce4d3428e571867.png"
alt="" style="width: 160rpx;height: 50rpx;" />
<text
style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{waimaiCount}}</text>
</view>
<view style="font-size: 30rpx;font-weight: 700;margin-left: 20rpx;color: #777;" v-else>
外卖({{waimaiCount}})
</view>
</view>
<view @tap="checkTab1('kuaidi')" style="margin-left: 20rpx;flex: 1;">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'kuaidi'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/aeff6530c1c4486e9c7d088522de0c98.png" alt="" style="width: 160rpx;height: 50rpx;">
<text style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{kuaidiCount}}</text>
<view class="like-title"
style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;"
v-if="checked == 'kuaidi'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/aeff6530c1c4486e9c7d088522de0c98.png"
alt="" style="width: 160rpx;height: 50rpx;">
<text
style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{kuaidiCount}}</text>
</view>
<view style="font-size: 30rpx;font-weight: 700;margin-left: 20rpx;color: #777;" v-else>
快递({{kuaidiCount}})
</view>
</view>
<view @tap="checkTab1('paotui')" style="margin-left: 20rpx;flex: 1;">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'paotui'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/e2cccb5ad1534b2aaae9b2b67ed401b4.png" alt="" style="width: 160rpx;height: 50rpx;">
<text style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{paotuiCount}}</text>
<view class="like-title"
style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;"
v-if="checked == 'paotui'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/e2cccb5ad1534b2aaae9b2b67ed401b4.png"
alt="" style="width: 160rpx;height: 50rpx;">
<text
style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{paotuiCount}}</text>
</view>
<view style="font-size: 30rpx;font-weight: 700;margin-left: 20rpx;color: #777;" v-else>
跑腿({{paotuiCount}})
</view>
</view>
<view @tap="checkTab1('zhipai')" style="margin-left: 20rpx;flex: 1;" v-if="worker != null">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'zhipai'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/2bfc2333818b47478572e4d1a430049a.png" alt="" style="width: 160rpx;height: 50rpx;">
<text style="position: absolute;top: 0;left: 80rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{zhipaiCount}}</text>
<view class="like-title"
style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;"
v-if="checked == 'zhipai'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/2bfc2333818b47478572e4d1a430049a.png"
alt="" style="width: 160rpx;height: 50rpx;">
<text
style="position: absolute;top: 0;left: 80rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{zhipaiCount}}</text>
</view>
<view style="font-size: 30rpx;font-weight: 700;margin-left: 20rpx;color: #777;" v-else>
指派单({{zhipaiCount}})
@ -232,13 +275,15 @@
@tap="searchOrder('putarea',item)">{{item.title}}</view>
</view>
</view>
<view @tap="searchOrder('yongjin')" class="sort-member" style="border-radius: 60rpx" :style="{'background':checkYongjin==true?'rgba(138, 255, 67, 0.16)':'#f5f5f5','border':checkYongjin==true?'1px solid rgba(138, 255, 67, 1)':'0'}">
<view @tap="searchOrder('yongjin')" class="sort-member" style="border-radius: 60rpx"
:style="{'background':checkYongjin==true?'rgba(138, 255, 67, 0.16)':'rgba(247, 248, 248, 0.6)','border':checkYongjin==true?'1px solid rgba(138, 255, 67, 1)':'0'}">
佣金
</view>
</view>
<view class="sort-text" v-if="lastScrollTop>583" :style="{'top': (navBarHeight+126) + 'px'}">
<view style="display: flex; width: 100%;">
<view @tap="searchOrder('delgetarea',item)" class="guize1-qusong" v-if="getAreaData.id != undefined">
<view @tap="searchOrder('delgetarea',item)" class="guize1-qusong"
v-if="getAreaData.id != undefined">
<view class="qusong1">
</view>
@ -246,7 +291,8 @@
{{getAreaData.title}}
</view>
</view>
<view @tap="searchOrder('delputarea',item)" class="guize1-qusong" v-if="putAreaData.id != undefined">
<view @tap="searchOrder('delputarea',item)" class="guize1-qusong"
v-if="putAreaData.id != undefined">
<view class="qusong1">
</view>
@ -254,13 +300,16 @@
{{putAreaData.title}}
</view>
</view>
<view @tap="clearCheck" v-if="getAreaData.id != undefined || putAreaData.id != undefined" style="color:#00BFFF;">
<view @tap="clearCheck"
v-if="getAreaData.id != undefined || putAreaData.id != undefined"
style="color:#00BFFF;">
清空
</view>
</view>
</view>
<view :style="{'height':lastScrollTop>583?'900px':'auto'}">
<view class="list-1" v-for="(item,index) in deliveryItem" :key="index" @tap="goDetail('search',item)">
<view class="list-1" v-for="(item,index) in deliveryItem" :key="index"
@tap="goDetail('search',item)">
<view class="daoda-time">
送达时间{{item.mustFinishTime != null ? item.mustFinishTime : '' | formatHourMinute }}
</view>
@ -269,10 +318,11 @@
#<text>{{item.numberCode != null ? item.numberCode : ''}} </text>
</view>
<view class="shangjia">
<text style="font-weight: 700;">{{item.shopName != null ? item.shopName : ''}}</text>
<text
style="font-weight: 700;">{{item.shopName != null ? item.shopName : ''}}</text>
<view @tap="productDetail(item)" v-if="item.deliveryType == 1"
style="width: 32rpx;height: 30rpx;font-weight: 700;font-size: 20rpx;color: #fff;text-align: center;background: #00BFFF;border-radius: 10rpx;margin: 20rpx 0 0 10rpx;line-height: 30rpx;">
</view>
<view v-else style="font-weight: 700;">
{{item.allCount ? item.allCount : 0}}
@ -282,7 +332,8 @@
<view class="qu-song">
<view class="qu-box">
<view class='qu-tu'>
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png"
alt="" />
</view>
<view class="qu-text">
<view class="qu-left">
@ -297,7 +348,8 @@
</view>
<view class="qu-box" style="margin-top:15rpx;">
<view class='qu-tu'>
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d0764fb4138747769538cf1cafa3b017.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d0764fb4138747769538cf1cafa3b017.png"
alt="" />
</view>
<view class="qu-text">
<view class="qu-left">
@ -322,14 +374,16 @@
</view>
<view style="font-weight: 700;width: 50%;text-align: right;">
{{(item.deliveryFee + item.deliveryFeeMarketplace).toFixed(2)}}
<text style="color: #777;font-size: 22rpx;" v-if="item.deliveryFeeMarketplace > 0">包含{{item.deliveryFeeMarketplace}}平台佣金</text>
<text style="color: #777;font-size: 22rpx;"
v-if="item.deliveryFeeMarketplace > 0">包含{{item.deliveryFeeMarketplace}}平台佣金</text>
</view>
</view>
<view class="beizhu" v-if="item.remark != null && item.remark != ''">
备注{{item.remark}}
</view>
<view class="qiangdan-btn" @tap="getOrder(item,index)">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1b8b815302a34902ac79a76a469e4ee6.png" alt="">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1b8b815302a34902ac79a76a469e4ee6.png"
alt="">
</view>
<view class="yongjin" v-if="checked == 'zhipai'">
<text @tap="rejectOrder(item,index)">拒绝接单</text>
@ -356,7 +410,8 @@
<view class="popup-area-title">
<text>请选择所属区域</text>
</view>
<view class="popup-area-container" v-for="(item,index) in areaList" :key="index" @tap="onClickArea(item)">
<view class="popup-area-container" v-for="(item,index) in areaList" :key="index"
@tap="onClickArea(item)">
<text style="display: inline-block">{{item.title}}</text>
</view>
</view>
@ -373,12 +428,159 @@
</view>
</uni-popup>
<uni-popup ref="productPopup" background-color="#fff">
<view class="popup-area-content" style="height: 1200rpx;overflow: scroll;">
<view class="popup-area-content" style="width: 700rpx;overflow: scroll;">
<view class="popup-area-title">
<text>订单详情</text>
</view>
<view class="popup-area-container" v-for="(item,index) in productData" :key="index">
<text style="display: inline-block">{{item.productName}} {{item.specs}} * {{item.quantity}}</text>
<view>
<view class="box1">
<view style="height: 160rpx;line-height: 80rpx;">
<view style="flex: 1;color: #777;font-weight: 700;">
取货地址
</view>
<view style="color: #000;font-weight: 700;">
{{productData.shopAddress}}
</view>
</view>
<view style="height: 160rpx;line-height: 80rpx;">
<view style="flex: 1;color: #777;font-weight: 700;">
收货地址
</view>
<view style="color: #000;font-weight: 700;">
{{productData.receiverAddress}}
</view>
</view>
</view>
<view class="box1">
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;display: flex;"
v-if="productData.shopName != null">
<text style="flex:1">{{productData.shopName}}</text>
<img @tap="makeCall(productData.shopPhone)"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png"
alt="" style="width: 40rpx;height: 40rpx;margin-top: 14rpx;" />
</view>
<view v-for="(item1,index1) in productData.goodsList" :key="index1"
v-if="productData.goodsList != null && productData.goodsList.length > 0"
style="display: flex;padding: 20rpx;background: rgba(247, 248, 248, 0.6);border-radius: 20rpx;">
<view class="goods-img">
<img :src="item1.productPicture" alt="">
</view>
<view class="goods-content">
<view class="goods-name">
{{item1.productName}}
</view>
<view class="goods-content-center">
{{item1.specs | delNode}}
</view>
<view class="goods-content-bottom">
<view style="width: 50%;">
X{{item1.quantity}}
</view>
<view class="pintuan-left-price">
{{item1.price}}
</view>
</view>
</view>
</view>
<view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.packageFee != null && productData.packageFee > 0">
<view style="flex: 1;color: #777;font-weight: 700;">
打包费
</view>
<view style="color: #000;font-weight:700;">
{{productData.packageFee}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
配送费
</view>
<view style="color: #000;font-weight:700;">
{{productData.deliveryFee}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.userCouponNum > 0">
<view style="flex: 1;color: #777;font-weight: 700;">
优惠券
</view>
<view style="color: #000;font-weight:700;">
-{{productData.userCouponNum}}
</view>
</view>
</view>
<view
style="display: flex;height: 80rpx;line-height: 100rpx;border-top: 1px solid #eee;font-size: 32rpx;font-weight: 700;">
<view style="flex: 1;">
实付
</view>
<view class="">
{{productData.totalAmount}}
</view>
</view>
</view>
<view class="box1">
<view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.otherOrder == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
取件地址
</view>
<view style="color: #000;font-weight: 700;">
{{productData.shopAddress}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.otherOrder == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
收件地址
</view>
<view style="color: #000;font-weight: 700;">
{{productData.receiverAddress}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.otherOrder == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
件数
</view>
<view style="color: #000;font-weight: 700;">
{{productData.deliveryInfo.allCount}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.otherOrder == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
服务类型
</view>
<view style="color: #000;font-weight: 700;">
快递/跑腿
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="productData.numberCode != null">
<view style="flex: 1;color: #777;font-weight: 700;">
订单号
</view>
<view style="color: #000;font-weight: 700;">
{{productData.numberCode}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
<view style="flex: 1;color: #777;font-weight: 700;">
下单时间
</view>
<view style="color: #000;font-weight: 700;">
{{productData.createTime | formatHourMinute}}
</view>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
@ -527,7 +729,9 @@
pageNum: 1,
getAreaId: '',
putAreaId: '',
paths:['home_top','home_center_left_top','home_center_left_bottom','home_center_right_top','home_center_right_bottom'],
paths: ['home_top', 'home_center_left_top', 'home_center_left_bottom', 'home_center_right_top',
'home_center_right_bottom'
],
order: '',
regionId: '',
deliveryType: 1,
@ -576,6 +780,23 @@
// --:
return `${day}-${hour}:${minute}`;
},
delNode(data) {
// 1.
let str;
if (typeof data === 'object' && data !== null) {
// JSON
str = JSON.stringify(data);
} else if (typeof data === 'string') {
str = data;
} else {
//
str = String(data);
}
// 2. { } "
const result = str.replace(/[{}"]/g, '');
return result;
}
},
onPageScroll(e) {
@ -691,15 +912,17 @@
this.isSwitching = true;
this.checkTab(index);
// 400ms200ms200ms
setTimeout(() => { this.isSwitching = false; }, 400);
setTimeout(() => {
this.isSwitching = false;
}, 400);
},
productDetail(item) {
this.productData = item.goodsList;
this.productData = item;
this.$refs.productPopup.open()
},
getOrder(item, index) {
let that = this
that.getUserLocation()
let data = {
groupId: item.groupId ? item.groupId : '',
deliveryId: item.id,
@ -709,8 +932,14 @@
regionId: JSON.parse(uni.getStorageSync('area')).id,
geolocation: that.latitude + ',' + that.longitude
}
uni.getLocation({
type: 'gcj02', //
success: (res) => {
console.log('位置', res)
that.latitude = res.latitude;
that.longitude = res.longitude;
this.tui.request("/mall/delivery/accept", "POST",data, false, true).then((res) => {
that.tui.request("/mall/delivery/accept", "POST", data, false, true).then((res) => {
that.loadStatus = 'nomore';
if (res.code == 200) {
if (!uni.getStorageSync('worker') && res.result != null) {
@ -737,9 +966,17 @@
uni.hideLoading();
}).catch((res) => {});
},
fail: (err) => {
console.log('获取位置失败', err);
}
});
},
rejectOrder(item, index) {
let that = this
this.tui.request("/mall/delivery/reject", "POST",{deliveryId:item.id}, false, true).then((res) => {
this.tui.request("/mall/delivery/reject", "POST", {
deliveryId: item.id
}, false, true).then((res) => {
if (res.code == 200) {
that.deliveryItem.splice(index, 1)
that.tui.toast(res.message);
@ -809,7 +1046,10 @@
// nav-bar
// menuListOffsetTop - navBarHeight 使sticky
const target = this.menuListOffsetTop - this.navBarHeight;
uni.pageScrollTo({ scrollTop: target > 0 ? target : 0, duration: 200 });
uni.pageScrollTo({
scrollTop: target > 0 ? target : 0,
duration: 200
});
},
//便
aaaaaaa(item) {
@ -851,7 +1091,11 @@
this.getDelivery();
this.getShopArea();
let that = this
that.tui.request("/worker/admin/add", "POST", {userId:uni.getStorageSync('id'),isChangeArea:0,region:item.id}, false, true).then((res) => {
that.tui.request("/worker/admin/add", "POST", {
userId: uni.getStorageSync('id'),
isChangeArea: 0,
region: item.id
}, false, true).then((res) => {
if (res.code == 200) {
if (res.result != null) {
uni.setStorageSync('worker', res.result)
@ -876,7 +1120,8 @@
},
getShopArea() {
let that = this
that.tui.request("/app/shopArea/getByParentId/"+ that.searchForm.regionId, "GET", {}, false, true).then((res) => {
that.tui.request("/app/shopArea/getByParentId/" + that.searchForm.regionId, "GET", {}, false, true).then((
res) => {
if (res.code == 200) {
if (res.result != null) {
that.getshopArea = res.result
@ -890,7 +1135,8 @@
},
getUserOrders() {
let that = this
that.tui.request("/mall/order/getOrdersByUserId/"+ uni.getStorageSync('id'), "GET", {}, false, true).then((res) => {
that.tui.request("/mall/order/getOrdersByUserId/" + uni.getStorageSync('id'), "GET", {}, false, true).then(
(res) => {
if (res.code == 200) {
if (res.result != null) {
that.orderLists = res.result
@ -939,28 +1185,7 @@
//
getUserLocation() {
let that = this;
uni.getLocation({
type: 'gcj02', //
success: (res) => {
console.log('位置', res)
this.latitude = res.latitude;
this.longitude = res.longitude;
// //
// this.markers.push({
// id: 0,
// latitude: res.latitude,
// longitude: res.longitude,
// title: '',
// iconPath: '/static/images/tabbar/fabu1.png', //
// width: 30,
// height: 30
// });
},
fail: (err) => {
console.log('获取位置失败', err);
}
});
},
checkTab1(type) {
this.checked = type
@ -1529,6 +1754,7 @@
background-size: 100%;
}
}
.paotui-title {
display: flex;
flex: 1;
@ -1536,21 +1762,22 @@
text-align: right;
padding-right: 20rpx;
}
.paotui-text {
font-size: 28rpx;
color: red;
font-weight: bold;
flex: 1;
}
.paotui-num {
font-size: 24rpx;
padding: 0 10rpx;
}
.popup-area-content {
align-items: center;
justify-content: center;
padding: 30rpx;
width: 500rpx;
height: auto;
background-color: #fff;
}
@ -1560,6 +1787,7 @@
font-weight: bold;
text-align: center;
position: relative;
margin-top: 10px;
}
.popup-area-container {
@ -1573,6 +1801,7 @@
border-top: 1px solid #eee;
color: #fff;
}
.chaoda {
height: 30rpx;
line-height: 30rpx;
@ -1583,6 +1812,7 @@
border-radius: 10rpx;
font-size: 20rpx;
}
.beizhu {
width: 95%;
margin: 0 auto;
@ -1593,6 +1823,7 @@
padding: 20rpx;
color: rgba(255, 57, 57, 1);
}
.title-sort {
height: 100rpx;
display: flex;
@ -1602,6 +1833,7 @@
background: #fff;
padding-top: 20rpx;
}
.sort-text {
height: auto;
display: flex;
@ -1610,11 +1842,12 @@
z-index: 90;
background: #fff;
}
.sort-member {
height: 60rpx;
line-height: 60rpx;
text-align: center;
background: #f5f5f5;
background: rgba(247, 248, 248, 0.6);
width: 24%;
margin-right: 4%;
border-radius: 10rpx;
@ -1667,4 +1900,51 @@
border-top-right-radius: 40rpx;
border-bottom-right-radius: 40rpx;
}
.box1 {
width: 95%;
margin: 0 auto 20rpx;
background: #fff;
border-radius: 20rpx;
padding: 20rpx;
}
.goods-img {
width: 160rpx;
height: 160rpx;
position: relative;
img {
width: 100%;
background-size: 100%;
height: 100%;
}
}
.goods-content {
flex: 1;
padding-left: 20rpx;
}
.goods-name {
font-size: 32rpx;
font-weight: 900;
}
.goods-content-center {
display: flex;
margin: 16rpx 0;
color: #777;
}
.goods-content-bottom {
display: flex;
line-height: 56rpx;
color: #777;
}
.pintuan-left-price {
width: 50%;
text-align: right;
font-weight: 700;
color: #000;
}
</style>
Loading…
Cancel
Save