Compare commits

...

2 Commits

Author SHA1 Message Date
tianyi 04f905ebc1 11 3 days ago
tianyi 3df568bff8 11 3 days ago
  1. 2
      components/tab-bar/delivery.vue
  2. 115
      package1/group/groupBuyList.vue
  3. 23
      package1/order/orderEvaluate.vue
  4. 5
      package1/order/orderList.vue

2
components/tab-bar/delivery.vue

@ -184,7 +184,7 @@
<view style="width: 20%;" @tap="changeOthers(item,1)">转单</view>
<img v-if="item.status == 1 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png"
alt="" style="width: 80%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,2)"/>
<img v-if="item.status == 2 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png"
<img v-if="item.status == 2 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a8cdd6d86e9140df86d3c3c60356bd53.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,3)" />
</view>
</view>

115
package1/group/groupBuyList.vue

@ -18,7 +18,8 @@
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
:interval="interval" :duration="duration">
<swiper-item>
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1d1edcc3e39c4a7cafeb64cf3209ed5e.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1d1edcc3e39c4a7cafeb64cf3209ed5e.png"
alt="" />
</swiper-item>
</swiper>
</view>
@ -55,17 +56,23 @@
区域选择 <text style="font-size: 20rpx;"></text>
</view>
<view class="sort-value" v-if="isArea">
<view class="sort-value1" v-for="(item,index) in shopArea" :key="index" @tap="searchShop('area',item.id)">{{item.title}}</view>
<view class="sort-value1" v-for="(item,index) in shopArea" :key="index"
@tap="searchShop('area',item.id)">{{item.title}}</view>
</view>
</view>
</view>
</view>
<view class="shop-list">
<view class="shop-member" v-for="(item,index) in shopList" :key="index" @tap="goDetail('shop',item)">
<view @tap.stop="buyingye" v-if="item.shopTakeaway.status != 0"
style="width: 100%;height:100%;position: absolute;top: 0;background: rgba(0, 0, 0, 0.4);z-index: 999;border-radius: 10px;">
</view>
<view class="shop-top">
<view class="shop-img">
<img :src="item.shopIcon" alt="">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png" alt="" style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
alt=""
style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
</view>
<view class="shop-content">
<view class="shop-name">
@ -75,29 +82,34 @@
<view class="shop-rate">
<view class="shop-rate-num">{{item.shopScore}}</view>
<view style="padding-top: 4rpx;">
<uni-rate :disabled="true" size="16" disabledColor="rgba(255, 184, 84, 1)" :value="item.shopScore" />
<uni-rate :disabled="true" size="16" disabledColor="rgba(255, 184, 84, 1)"
:value="item.shopScore" />
</view>
</view>
<view class="shop-tag">
<text style="padding: 4rpx 10rpx;background: rgba(223, 255, 176, 1);color: #777;border-radius: 6rpx;">
<text
style="padding: 4rpx 10rpx;background: rgba(223, 255, 176, 1);color: #777;border-radius: 6rpx;">
{{item.shopTypeTitle == undefined ? '美食' : item.shopTypeTitle}}
</text>
</view>
</view>
<view class="shop-content-bottom">
<view class="shop-deal">
<text v-if = "item.subtitle != null" style="padding: 4rpx 10rpx;background: rgba(223, 255, 176, 1);color: #777;border-radius: 6rpx;">
<text v-if="item.subtitle != null"
style="padding: 4rpx 10rpx;background: rgba(223, 255, 176, 1);color: #777;border-radius: 6rpx;">
{{item.subtitle}}
</text>
</view>
<view class="shop-deal1">
已拼<text style="color: red;font-weight: 700;"> {{item.saleCount != null ? item.saleCount : 0}} </text>
已拼<text style="color: red;font-weight: 700;">
{{item.saleCount != null ? item.saleCount : 0}} </text>
</view>
</view>
</view>
</view>
<view class="shop-bottom" v-if="item.products != null && item.products.length > 0">
<view class="menu-member" v-if='item1.isPush == 1 && item1.delFlag == 1' v-for="(item1,index1) in item.products" :key="index1" @tap="goDetail('product',item1)">
<view class="menu-member" v-if='item1.isPush == 1 && item1.delFlag == 1'
v-for="(item1,index1) in item.products" :key="index1" @tap="goDetail('product',item1)">
<view class="menu-img">
<img :src="item1.productPicture" alt="">
</view>
@ -109,7 +121,8 @@
¥{{item1.attributeListPrice | sliceMsg}}
</view>
<view class="shop-menu-purchase">
拼团 <text style="color: red;font-size: 24rpx;padding-left: 10rpx;">¥{{item1.productGroupBuyPrices | slicePrice}}</text>
拼团 <text
style="color: red;font-size: 24rpx;padding-left: 10rpx;">¥{{item1.productGroupBuyPrices | slicePrice}}</text>
</view>
</view>
</view>
@ -297,6 +310,12 @@
}
this.getShopList();
},
buyingye() {
uni.showToast({
title: '店铺不在营业时间!',
icon: 'none'
});
},
getEatType() {
let that = this
that.tui.request("/dictData/getByCondition", "GET", {
@ -325,7 +344,8 @@
},
getShopArea() {
let that = this
that.tui.request("/app/shopArea/getByParentId/"+JSON.parse(uni.getStorageSync('area')).id, "GET", {}, false, true).then((res) => {
that.tui.request("/app/shopArea/getByParentId/" + JSON.parse(uni.getStorageSync('area')).id, "GET", {},
false, true).then((res) => {
if (res.code == 200) {
if (res.result != null) {
for (let m = 0; m < res.result.length; m++) {
@ -342,7 +362,9 @@
},
getOnlineWorkerCountByCanteenArea() {
let that = this
that.tui.request("/worker/getOnlineWorkerByArea", "GET", {parentId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => {
that.tui.request("/worker/getOnlineWorkerByArea", "GET", {
parentId: JSON.parse(uni.getStorageSync('area')).id
}, false, true).then((res) => {
if (res.code == 200) {
const list = Array.isArray(res.result) ? res.result : []
that.onlineWorkerAreaList = list
@ -378,6 +400,7 @@
} else {
that.shopList = [...that.shopList, ...res.result.content]
}
this.judgeBusinessStatus()
that.totalPages = res.result.totalPages
that.isArea = false
that.$forceUpdate()
@ -388,6 +411,35 @@
uni.hideLoading()
}).catch((res) => {})
},
judgeBusinessStatus() {
for (let i = 0; i < this.shopList.length; i++) {
if (this.shopList[i].shopTakeaway != '') {
if (this.shopList[i].shopTakeaway.status == 0) {
let isEndTime = this.isWithinBusinessHours(this.shopList[i].shopTakeaway.businessHourBegin,this.shopList[i].shopTakeaway.businessHourEnd)
this.shopList[i].shopTakeaway.status = isEndTime ? 0 : 1
}
}
}
},
//
isWithinBusinessHours(begin, end) {
//
const now = new Date();
const currentMinutes = now.getHours() * 60 + now.getMinutes();
// "HH:MM"
const parseTime = (timeStr) => {
const [hours, minutes] = timeStr.split(':').map(Number);
return hours * 60 + minutes;
};
const startMinutes = parseTime(begin);
const endMinutes = parseTime(end);
//
return currentMinutes >= startMinutes && currentMinutes <= endMinutes;
},
goDetail(type, item) {
if (type == 'shop') {
uni.navigateTo({
@ -435,6 +487,7 @@
font-size: 24rpx;
position: relative;
}
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
background-size: 100% 100%;
@ -442,6 +495,7 @@
height: auto;
padding-bottom: 20rpx;
}
.swiper {
width: 100%;
height: 500rpx;
@ -453,6 +507,7 @@
height: 100%;
z-index: 99 !important;
}
.menu-box {
width: 100%;
height: 160rpx;
@ -477,28 +532,34 @@
font-weight: 700;
margin-top: 15rpx;
}
.title-tab {
width: 95%;
margin: 0 auto;
height: 210rpx;
}
.swiper {
width: 100%;
height: 210rpx;
}
.title-sreach {
width: 75%;
display: flex;
height: 200rpx;
}
.back-btn {
padding-top: 110rpx;
}
.title-name {
padding-top: 110rpx;
font-size: 36rpx;
font-weight: 700;
}
.title-search {
margin-top: 110rpx;
display: flex;
@ -507,16 +568,19 @@
margin-left: 20rpx;
border-radius: 54rpx;
flex: 1;
input {
height: 54rpx;
line-height: 54rpx;
}
}
.title-sort {
height: 60rpx;
display: flex;
margin-top: 20rpx;
}
.sort-member {
line-height: 60rpx;
text-align: center;
@ -525,6 +589,7 @@
margin-left: 4%;
border-radius: 10rpx;
}
.sort-value {
width: 160rpx;
height: auto;
@ -538,25 +603,31 @@
color: #fff;
font-size: 22rpx;
}
.sort-value1 {
border-bottom: 1rpx solid #eee;
}
.shop-list {
width: 95%;
height: auto;
margin: 0 auto;
}
.shop-member {
width: 100%;
height: auto;
border-radius: 20rpx;
background: #fff;
margin-bottom: 20rpx;
position: relative;
}
.shop-img {
width: 160rpx;
height: 160rpx;
position: relative;
img {
width: 100%;
background-size: 100%;
@ -564,22 +635,27 @@
border-radius: 20rpx;
}
}
.shop-top {
padding: 20rpx;
display: flex;
}
.shop-content {
flex: 1;
padding-left: 20rpx;
}
.shop-name {
font-size: 32rpx;
font-weight: 900;
}
.shop-content-center {
display: flex;
margin: 20rpx 0;
}
.shop-rate {
background: rgba(249, 212, 157, 0.34);
height: 40rpx;
@ -587,6 +663,7 @@
border-radius: 20rpx;
padding: 0 10rpx 0 0;
}
.shop-rate-num {
width: 50rpx;
height: 100%;
@ -601,17 +678,21 @@
border-top-right-radius: 10rpx;
font-weight: 700;
}
.shop-tag {
flex: 1;
line-height: 40rpx;
text-align: right;
}
.shop-content-bottom {
display: flex;
}
.shop-deal {
flex: 1;
}
.shop-bottom {
border-top: 2rpx solid #eee;
width: 100%;
@ -621,15 +702,18 @@
overflow-y: hidden;
padding: 10rpx 0 20rpx;
}
.menu-member {
width: 140rpx;
height: 100%;
margin: 10rpx 0 0 20rpx;
}
.menu-img {
height: 140rpx;
width: 140rpx;
border-radius: 10px;
img {
width: 100%;
height: 100%;
@ -637,19 +721,23 @@
border-radius: 20rpx;
}
}
.menu-content {
font-size: 26rpx;
}
.shop-menu-name {
margin-top: 10rpx;
font-weight: 700;
overflow: hidden;
height: 30rpx;
}
.shop-menu-price {
margin-top: 6rpx;
font-weight: 700;
}
.shop-menu-purchase {
display: flex;
background: rgba(255, 57, 57, 0.1);
@ -662,6 +750,7 @@
color: #777;
font-size: 20rpx;
}
.zaixian {
position: fixed;
bottom: 40rpx;
@ -678,21 +767,25 @@
text-align: center;
line-height: normal;
}
.zaixian-total {
font-size: 26rpx;
line-height: 76rpx;
white-space: nowrap;
}
.zaixian-divider {
width: 2rpx;
height: 36rpx;
background: rgba(0, 35, 28, 0.2);
margin: 0 18rpx;
}
.zaixian-swiper {
flex: 1;
height: 76rpx;
}
.zaixian-item {
height: 76rpx;
line-height: 76rpx;

23
package1/order/orderEvaluate.vue

@ -78,6 +78,7 @@
</view>
</view>
</view>
<view v-if="shopData.deliveryType == 1">
<view class="eval-num">
<view class="eval-num1">
您对本次配送人员还满意吗
@ -108,6 +109,8 @@
</view>
</view>
</view>
</view>
<view style="border: none;padding: 0 30rpx;display: flex;height: 100rpx;line-height: 100rpx;">
<view v-if="selected == 'niming'" @tap="checkVoucher('shiming')" class="radio-check">
<uni-icons type="checkmarkempty" size="12"></uni-icons>
@ -142,6 +145,7 @@
shopRemark:'',
manRemark:'',
shopPicture:'',
manId:'',
manPicture:'',
evalNumList:[{
name:'很糟糕',
@ -174,11 +178,26 @@
},
onLoad(option) {
this.shopData = JSON.parse(option.item)
console.log(this.shopData.deliveryType)
if(this.shopData.deliveryType == 1){
this.getOrderDetail()
}
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
methods: {
getOrderDetail(){
let that = this
that.tui.request("/mall/order/detail/"+this.shopData.id, "GET", {}, false, true).then((res) => {
if (res.code == 200) {
that.manId = res.result.deliveryInfo.id;
} else {
that.tui.toast(res.message)
}
}).catch((res) => {})
uni.hideLoading();
},
submit(){
let that = this;
let data = [{ //
@ -202,9 +221,9 @@
createByIcon:'https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png',
score:this.manEvaluateNum,
orderId:this.shopData.id,
shopId:this.shopData.shopId,
shopId:this.manId,
}]
that.tui.request("/app/comment/save", "POST", data, false, true).then((res) => {
that.tui.request("/app/comment/save", "POST", data, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "评论成功",

5
package1/order/orderList.vue

@ -369,9 +369,10 @@
}
},
onLoad(option) {
this.getOrderList()
},
onShow() {
this.getOrderList()
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
methods: {
@ -463,7 +464,7 @@
});
},
goEvaluate(item){
uni.redirectTo({
uni.navigateTo({
url: '/package1/order/orderEvaluate?item=' + JSON.stringify(item)
});
},

Loading…
Cancel
Save