jiazhipeng 1 year ago
parent
commit
24e758549e
  1. 217
      subPackages/order/detail.vue
  2. 2
      subPackages/user/collect.vue

217
subPackages/order/detail.vue

@ -9,6 +9,12 @@
<!-- 待支付时会显示自动取消时间 --> <!-- 待支付时会显示自动取消时间 -->
<view v-if="info.status=='WAIT_PAYMENT'" class="close-time">订单将在{{info.close_time.slice(-8)}}自动取消</view> <view v-if="info.status=='WAIT_PAYMENT'" class="close-time">订单将在{{info.close_time.slice(-8)}}自动取消</view>
<!-- 待退款 -->
<view v-if="info.status=='WAIT_REFUND'" class="close-time">系统将在1-7个工作日内原路退回您的原支付账户</view>
<!-- 退款完成 -->
<view v-if="info.status=='REFUND_SUCCESS'" class="close-time">您的退款金额已退还到您的原支付账户</view>
</view> </view>
<!-- 景点美食二维码 --> <!-- 景点美食二维码 -->
@ -221,12 +227,12 @@
<view class="shop-name">店铺名称</view> <view class="shop-name">店铺名称</view>
<view class="shop-info"> <view class="shop-info">
<view> <view>
<view style="margin-top: 23rpx; display: flex;"> <view style="margin-top: 23rpx; display: flex;" v-if="info.order_child[0].goods_data.open_description">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/time.png" <image src="https://static.ticket.sz-trip.com/yandu/images/order/time.png"
class="shop-time"></image> class="shop-time"></image>
<view> <view>
<view class="shop-title">营业时间</view> <view class="shop-title">营业时间</view>
<view class="shop-subtitle">{{merchantInfo.open_time}}</view> <view class="shop-subtitle">{{info.order_child[0].goods_data.open_description}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -238,18 +244,19 @@
class="shop-time"></image> class="shop-time"></image>
<view style="width: 420rpx;"> <view style="width: 420rpx;">
<view class="shop-title text-overflow"> <view class="shop-title text-overflow">
{{merchantInfo.province_name}}{{merchantInfo.city_name}}{{merchantInfo.district_name}}{{merchantInfo.detail_addr}} {{info.order_child[0].goods_data.address}}
</view> </view>
<view class="shop-subtitle" v-if="merchantInfo.juli">距您约{{merchantInfo.juli}} <view class="shop-subtitle" v-if="info.order_child[0].goods_data.distance">
距您约{{info.order_child[0].goods_data.distance > 1000 ? info.order_child[0].goods_data.distance / 1000 + 'km' : info.order_child[0].goods_data.distance + 'm'}}
</view> </view>
</view> </view>
</view> </view>
<view class="shop-icon"> <view class="shop-icon">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/phone.png" <image src="https://static.ticket.sz-trip.com/yandu/images/order/phone.png"
@click="clickPhone(merchantInfo.mobile)"></image> @click="clickPhone(info.order_child[0].goods_data.tel)"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/order/navigations.png" <image src="https://static.ticket.sz-trip.com/yandu/images/order/navigations.png"
@click="openLocation(merchantInfo.lat,merchantInfo.lon)"></image> @click="openLocation(info.order_child[0].goods_data.lat,info.order_child[0].goods_data.distancelon)"></image>
</view> </view>
</view> </view>
</view> </view>
@ -368,8 +375,36 @@
<view class="btn pay-btn" v-if="info.status == 'WAIT_PAYMENT'" @click="setOrderId(info.order_id)"> <view class="btn pay-btn" v-if="info.status == 'WAIT_PAYMENT'" @click="setOrderId(info.order_id)">
立即支付 立即支付
</view> </view>
<view class="btn" v-if="info.status == 'POST' && info.order_child[0].goods_genre == 'pgoods'" @click="openMask()">
快递查询
</view>
<view class="btn" v-if="info.status == 'POST' && info.order_child[0].goods_genre == 'pgoods'" @click="confirmGoods()">
确认收货
</view>
</view> </view>
</footer> </footer>
<!-- 快递详情 -->
<view class="mask" v-if="maskShow">
<view class="mask-bg" @click="maskShow = false"></view>
<view class="mask-content">
<p class="mask-title">物流信息</p>
<view class="iconfont" @click="maskShow = false">x</view>
<view class="express-all">
<view class="express-item" v-for="item,index in postInfo" :key="index">
<view class="line" v-if="index != postInfo.length - 1"></view>
<view class="express-item-icon" v-if="index!=0">·</view>
<view class="express-item-icon express-item-icons" v-else>·</view>
<view :class="['express-info',index==0?'active':'']">
<p>{{item.AcceptStation}}</p>
<p class="express-time">{{item.AcceptTime}}</p>
</view>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
@ -384,7 +419,8 @@
current: 0, current: 0,
isQrcode: false, isQrcode: false,
remainNum: 0, remainNum: 0,
merchantInfo: {} maskShow: false,
postInfo: []
} }
}, },
onLoad(option) { onLoad(option) {
@ -406,7 +442,9 @@
// //
getDetail() { getDetail() {
this.Post({ this.Post({
order_id: this.order_id order_id: this.order_id,
lon: uni.getStorageSync('location').lon || '110.43785794300781',
lat: uni.getStorageSync('location').lat || '36.95286642085422'
}, '/api/order/orderDetail').then(res => { }, '/api/order/orderDetail').then(res => {
this.info = res.data; this.info = res.data;
@ -420,15 +458,6 @@
.foodInfo = item .foodInfo = item
}) })
}) })
//
this.Post({
lon: uni.getStorageSync('location').lon || '110.43785794300781',
lat: uni.getStorageSync('location').lat || '36.95286642085422',
specifications_id: this.info.order_child[0].specifications_id
}, '/api/extract/getMerchantExtractStoreList').then(res => {
this.merchantInfo = res.data[0] || {}
})
} }
// //
@ -608,6 +637,48 @@
} }
}); });
}, },
//
openMask() {
this.Post({
child_order_id: this.info.order_child[0].child_id
}, '/api/order/getExpress').then(res => {
if (res.data.length > 0){
this.postInfo = res.data.reverse()
this.maskShow = true
}else {
uni.showToast({
title: '暂未查询到物流信息,请联系客服',
icon: 'none'
});
}
})
},
//
confirmGoods() {
uni.showModal({
title: '提示',
content: '是否确认收货?',
success: successRes => {
if (successRes.confirm) {
this.Post({
order_id: this.info.order_id
}, '/api/order/confirmPost').then(res => {
if (res.code == 1) {
uni.showToast({
title: '确认收货成功',
icon: 'none'
});
this.getDetail();
uni.$emit("updateDataByConnect", {
msgType: 'updateOrderTrades',
data: {}
})
}
})
}
}
});
}
} }
} }
</script> </script>
@ -1346,4 +1417,116 @@
} }
} }
} }
//
.mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 1000;
display: flex;
align-items: flex-end;
justify-content: center;
}
.mask-bg {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.mask-content {
width: 100%;
padding: 28rpx 0;
border-radius: 20rpx 20rpx 0 0;
background: white;
height: 70%;
position: relative;
overflow-y: auto;
}
.mask-content .icon-close {
position: absolute;
right: 20rpx;
top: 20rpx;
}
.mask-content .close-btn {
background-image: url("https://static.ticket.sz-trip.com/taizhou/images/close.png");
width: 80rpx;
height: 80rpx;
position: absolute;
bottom: -100rpx;
left: 0;
right: 0;
margin: auto;
}
.mask-title {
font-size: 36rpx;
font-weight: bold;
padding-left: 37rpx;
}
.mask-content .iconfont {
position: absolute;
right: 30rpx;
top: 20rpx;
}
.express-all {
margin: 40rpx;
position: relative;
}
.express-item {
display: flex;
justify-content: space-between;
padding-bottom: 60rpx;
position: relative;
z-index: 1;
}
.line {
width: 1rpx;
height: 100%;
background: #CCCCCC;
position: absolute;
left: 13rpx;
}
.express-info {
width: 600rpx;
font-size: 26rpx;
line-height: 40rpx;
color: #999;
}
.express-info.active {
color: #000;
}
.express-time {
font-size: 22rpx;
color: #666;
margin-top: 10rpx;
}
.express-item-icon {
width: 27rpx;
height: 27rpx;
background: #CCCCCC;
border-radius: 50%;
position: relative;
}
.express-item-icons {
background: #71B580;
}
</style> </style>

2
subPackages/user/collect.vue

@ -4,7 +4,7 @@
<image :src="showImg(item.arr.image)" mode="aspectFill"></image> <image :src="showImg(item.arr.image)" mode="aspectFill"></image>
<view class="content flex-column"> <view class="content flex-column">
<view class="title text-overflowRows">{{item.arr.title}}</view> <view class="title text-overflowRows">{{item.arr.title}}</view>
<view class="price" v-if="item.arr.low_money">{{item.arr.low_money / 100}}</view> <view class="price" v-if="item.arr.low_money || item.arr.price">{{(item.arr.low_money || item.arr.price) / 100}}</view>
</view> </view>
</view> </view>
</view> </view>

Loading…
Cancel
Save