tianyi 4 weeks ago
parent
commit
1d0c951987
  1. 7
      package1/group/groupBuySingle.vue
  2. 202
      package1/order/orderDetail.vue
  3. 34
      pages/index/index.vue

7
package1/group/groupBuySingle.vue

@ -2768,10 +2768,9 @@
.btn-spark::before {
content: '';
position: absolute;
left: 8rpx;
top: 8rpx;
width: 20rpx;
height: 20rpx;
left: 4rpx;
width: 30rpx;
height: 30rpx;
border-radius: 50% 50% 50% 8rpx;
background: linear-gradient(135deg, #ff4d38 0%, #ffbd49 62%, #fff2a8 100%);
transform: rotate(-35deg);

202
package1/order/orderDetail.vue

@ -1,7 +1,7 @@
<template>
<!-- 订单详情 -->
<view class="page1">
<view style="height:100%" v-if="pintuan">
<view class="pintuan-page" v-if="pintuan">
<view class="title1">
<view class="title-sreach1">
<view class="back-btn1" @tap="back" :style="{'top': menuButtonInfo.top +'px'}">
@ -16,7 +16,7 @@
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;">
{{orderDetail.shopName}}
</view>
<view style="display: flex;padding: 20rpx 0;background: rgba(247, 248, 248, 0.6);border-radius: 20rpx;">
<view class="pintuan-goods-card">
<view class="goods-img1">
<img src="/static/images/img/shangpintu.png" alt="">
</view>
@ -30,13 +30,12 @@
{{item1.specs | delNode}}
</view>
</view>
<view class="goods-content-bottom1" style="display: flex;margin-top: 15px;">
<view class="goods-content-bottom1">
<view style="flex: 1;">
X{{item1.quantity}}
</view>
<view class="pintuan-left-price1">
<view
style="background: rgba(255, 57, 57, 0.2);padding: 0px 12rpx;border-radius: 20rpx;margin-left: 20rpx;">
<view class="pintuan-price-tag">
<text>拼团</text>
<text style="color: red;">{{item1.price}}</text>
</view>
@ -45,7 +44,7 @@
</view>
</view>
</view>
<view class="box11" style="position: absolute;top: 800rpx;left: 2.5%;">
<view class="box11">
<view class="kaituan11">
<view class="kaituan1-title1">
{{orderDetail.groupInfo.targetMembers - orderDetail.groupInfo.currentMembers}}人即可成团
@ -70,20 +69,22 @@
</view>
</view>
</view>
<view class="kaituan41">
<button open-type="share" class="share-btn"
style="background:transparent;border:none;color:inherit;font-size:inherit;display:inline-flex;align-items:center;">
分享至微信 <uni-icons type="weixin" size="15"></uni-icons>
</button>
</view>
<view class="kaituan41" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)">
取消订单 <uni-icons type="weixin" size="15"></uni-icons>
</view>
<view class="kaituan41" v-if="orderStatusBuy(orderDetail)" @tap="returnPopupPropBuy(orderDetail)">
取消拼团转直接购买 <uni-icons type="weixin" size="15"></uni-icons>
</view>
<view class="kaituan41" @tap="refreah(orderDetail)">
刷新 <uni-icons type="weixin" size="15"></uni-icons>
<view class="pintuan-actions">
<view class="kaituan41 kaituan41-share">
<button open-type="share" class="share-btn"
style="background:transparent;border:none;color:inherit;font-size:inherit;display:inline-flex;align-items:center;">
分享至微信 <uni-icons type="weixin" size="15"></uni-icons>
</button>
</view>
<view class="kaituan41 kaituan41-cancel" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)">
取消订单 <uni-icons type="weixin" size="15"></uni-icons>
</view>
<view class="kaituan41 kaituan41-buy" v-if="orderStatusBuy(orderDetail)" @tap="returnPopupPropBuy(orderDetail)">
取消拼团转直接购买 <uni-icons type="weixin" size="15"></uni-icons>
</view>
<view class="kaituan41 kaituan41-refresh" @tap="refreah(orderDetail)">
刷新 <uni-icons type="weixin" size="15"></uni-icons>
</view>
</view>
<view class="kaituan51">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c1f1b45c98fa4db1a1e5f98b3a0573c2.png"
@ -1212,11 +1213,11 @@
}
if (that.orderDetail.groupInfo) {
// 0: 1: 2: 3:()
if (that.orderDetail.groupInfo.status != 1 && that.orderDetail.groupInfo.status != 2) {
if (that.orderDetail.groupInfo.status != 1 && that.orderDetail.groupInfo.status != 2 && that.orderDetail.status == 10) {
that.pintuan = true;
that.tui.request("/app/shop/getShopInfoById", "POST", {
id: that.orderDetail.shopId,
regionId: JSON.parse(uni.getStorageSync('area')).id
regionId: JSON.parse(uni.getStorageSync('area')).id
}, false, true).then((res1) => {
if (res1.code == 200) {
that.shopItem = res1.result.shop
@ -1706,11 +1707,17 @@
padding: 20rpx;
}
.pintuan-page {
min-height: 100%;
padding-bottom: 60rpx;
box-sizing: border-box;
}
.title1 {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/69c894452e924bedbb5a24bf978f47c7.png') no-repeat;
width: 100%;
height: 30%;
background-size: 100%;
height: 360rpx;
background-size: 100% auto;
}
.title-sreach1 {
@ -1722,25 +1729,47 @@
.back-btn1 {
position: absolute;
bottom: 0;
left: 0;
left: 14rpx;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.64);
box-shadow: 0 10rpx 24rpx rgba(0, 35, 28, 0.08);
text-align: center;
line-height: 64rpx;
}
.box11 {
width: 95%;
margin: 0 auto 20rpx;
background: #fff;
border-radius: 20rpx;
margin: 0 auto 22rpx;
background: rgba(255, 255, 255, 0.96);
border-radius: 32rpx;
padding: 24rpx;
position: relative;
box-sizing: border-box;
box-shadow: 0 18rpx 42rpx rgba(0, 35, 28, 0.07);
overflow: hidden;
}
.pintuan-page > .box11 + .box11 {
margin: 0 auto 22rpx;
}
.pintuan-goods-card {
display: flex;
padding: 20rpx;
position: absolute;
top: 450rpx;
left: 2.5%;
background: rgba(247, 248, 248, 0.6);
border-radius: 20rpx;
box-sizing: border-box;
}
.goods-img1 {
width: 160rpx;
height: 160rpx;
position: relative;
flex-shrink: 0;
border-radius: 20rpx;
overflow: hidden;
img {
width: 100%;
@ -1751,17 +1780,28 @@
.goods-content1 {
flex: 1;
min-width: 0;
padding-left: 20rpx;
}
.goods-name1 {
font-size: 32rpx;
font-weight: 900;
line-height: 44rpx;
}
.goods-content-center1 {
display: flex;
margin: 16rpx 0;
margin: 12rpx 0;
color: #777;
line-height: 36rpx;
word-break: break-all;
}
.goods-content-bottom1 {
display: flex;
align-items: center;
line-height: 56rpx;
color: #777;
}
@ -1770,13 +1810,16 @@
font-weight: 700;
color: #000;
display: flex;
padding-right: 10px;
justify-content: flex-end;
flex-shrink: 0;
}
.goods-content-bottom {
display: flex;
line-height: 56rpx;
color: #777;
.pintuan-price-tag {
background: rgba(255, 57, 57, 0.2);
padding: 0 12rpx;
border-radius: 20rpx;
margin-left: 20rpx;
white-space: nowrap;
}
.ziqu-xuanfu1 {
@ -1784,7 +1827,7 @@
top: 0;
right: 0;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
border-top-right-radius: 20rpx;
border-top-right-radius: 32rpx;
border-bottom-left-radius: 20rpx;
font-weight: 700;
font-size: 20rpx;
@ -1802,25 +1845,26 @@
text-align: center;
font-size: 60rpx;
font-weight: 700;
margin-left: -6rpx;
z-index: 97;
color: #02fbdd;
border: 1px solid #a6ffea;
line-height: 80rpx;
margin: 0 auto;
box-sizing: border-box;
}
.kaituan11 {
display: flex;
height: 70rpx;
align-items: center;
flex-wrap: wrap;
font-size: 44rpx;
font-weight: 700;
margin-top: 20rpx;
margin-top: 12rpx;
}
.kaituan1-title1 {
position: relative;
margin-left: 20rpx;
line-height: 64rpx;
}
.kaituan1-title11 {
@ -1833,39 +1877,91 @@
width: 280rpx;
text-align: center;
margin: 10rpx 0 0 20rpx;
box-sizing: border-box;
}
.kaituan21 {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
width: 90%;
margin: 40rpx auto;
}
.kaituan221 {
flex: 1;
min-width: 90rpx;
margin: 12rpx 18rpx;
}
.kaituan31 {
height: 80rpx;
min-height: 80rpx;
line-height: 80rpx;
text-align: center;
color: #777;
}
.kaituan41 {
.pintuan-actions {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 18rpx auto 0;
width: 95%;
height: 100rpx;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
border-radius: 100rpx;
}
.kaituan41 {
width: 48%;
min-height: 88rpx;
background: #f4fbf8;
border: 1px solid rgba(0, 35, 28, 0.08);
border-radius: 28rpx;
text-align: center;
line-height: 100rpx;
font-size: 30rpx;
font-size: 26rpx;
font-weight: 700;
margin: 20rpx auto;
margin: 0 0 18rpx;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #243f38;
box-shadow: 0 10rpx 22rpx rgba(0, 35, 28, 0.05);
padding: 0 16rpx;
line-height: 36rpx;
}
.kaituan41-share {
width: 100%;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
border: none;
color: #00231C;
}
.kaituan41-cancel {
background: #fff6f4;
border-color: rgba(255, 116, 92, 0.28);
color: #d75a43;
}
.kaituan41-buy {
background: #f0fffa;
border-color: rgba(78, 219, 187, 0.34);
color: #0f806d;
}
.kaituan41-refresh {
background: #f8fff0;
border-color: rgba(190, 232, 93, 0.38);
color: #5a7f13;
}
.kaituan51 {
margin: 80rpx 0 40rpx;
margin: 36rpx 0 20rpx;
}
.share-btn {
margin: 0;
padding: 0;
line-height: 88rpx;
}
.evaluate-list {

34
pages/index/index.vue

@ -425,14 +425,14 @@
@touchend.stop="endSwipeOrder(item,index)"
@touchcancel.stop="resetSwipeOrder">
<view class="qiangdan-progress"
:style="{'width': getSwipeProgress(item,index) + '%'}"></view>
:style="swipeOrder.id === item.id && swipeOrder.index === index ? swipeOrder.progressStyle : swipeOrderDefaultStyle.progress"></view>
<view class="qiangdan-text">
<text v-if="!isSwipeOrderActive(item,index)">向右滑动抢单</text>
<text v-else-if="getSwipeProgress(item,index) < 92">继续滑动确认</text>
<text v-if="swipeOrder.id !== item.id || swipeOrder.index !== index || swipeOrder.progress <= 0">向右滑动抢单</text>
<text v-else-if="swipeOrder.progress < 92">继续滑动确认</text>
<text v-else>松手接单</text>
</view>
<view class="qiangdan-thumb"
:style="{'left': getSwipeProgress(item,index) + '%','transform':'translateX(-' + getSwipeProgress(item,index) + '%)'}">
:style="swipeOrder.id === item.id && swipeOrder.index === index ? swipeOrder.thumbStyle : swipeOrderDefaultStyle.thumb">
<text></text>
</view>
</view>
@ -693,12 +693,18 @@
checkYongjin: false,
getshopArea: [],
putshopArea: [],
swipeOrderDefaultStyle: {
progress: 'width: 0%;',
thumb: 'left: 0%; transform: translateX(-0%);'
},
swipeOrder: {
id: '',
index: -1,
startX: 0,
startProgress: 0,
progress: 0,
progressStyle: 'width: 0%;',
thumbStyle: 'left: 0%; transform: translateX(-0%);',
trackWidth: 0,
confirmed: false
}
@ -842,6 +848,7 @@
// sticky offsetstatusBarHeight + 40px
const info = uni.getSystemInfoSync();
this.navBarHeight = info.statusBarHeight;
this.swipeOrderBaseWidth = info.windowWidth * 0.86;
},
clearCheck() {
this.checkYongjin = false
@ -885,7 +892,9 @@
startX: touch.clientX,
startProgress: 0,
progress: 0,
trackWidth: 0,
progressStyle: 'width: 0%;',
thumbStyle: 'left: 0%; transform: translateX(-0%);',
trackWidth: this.swipeOrderBaseWidth || 0,
confirmed: false
}
this.$nextTick(() => {
@ -899,16 +908,16 @@
moveSwipeOrder(event) {
const touch = event.touches && event.touches[0]
if (!touch || this.swipeOrder.id === '') return
const trackWidth = this.swipeOrder.trackWidth || uni.getSystemInfoSync().windowWidth * 0.86
const trackWidth = this.swipeOrder.trackWidth || this.swipeOrderBaseWidth || 1
const deltaX = Math.max(0, touch.clientX - this.swipeOrder.startX)
const progress = Math.min(100, Math.round(deltaX / (trackWidth * 0.72) * 100))
this.swipeOrder.progress = progress
this.setSwipeOrderProgress(progress)
},
endSwipeOrder(item, index) {
if (this.swipeOrder.id !== item.id || this.swipeOrder.index !== index) return
if (this.swipeOrder.progress >= 92 && !this.swipeOrder.confirmed) {
this.swipeOrder.confirmed = true
this.swipeOrder.progress = 100
this.setSwipeOrderProgress(100)
this.getOrder(item, index)
return
}
@ -921,10 +930,19 @@
startX: 0,
startProgress: 0,
progress: 0,
progressStyle: 'width: 0%;',
thumbStyle: 'left: 0%; transform: translateX(-0%);',
trackWidth: 0,
confirmed: false
}
},
setSwipeOrderProgress(progress) {
if (this.swipeOrder.progress === progress) return
const progressValue = progress + '%'
this.swipeOrder.progress = progress
this.swipeOrder.progressStyle = 'width: ' + progressValue + ';'
this.swipeOrder.thumbStyle = 'left: ' + progressValue + '; transform: translateX(-' + progressValue + ');'
},
noop() {},
getOrder(item, index) {
let that = this

Loading…
Cancel
Save