绚火健康
This commit is contained in:
129
pages/order/details/details.js
Normal file
129
pages/order/details/details.js
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
data: {
|
||||
goodsData : '', //详情
|
||||
canState : '', //操作按钮
|
||||
express : '', //物流
|
||||
orderNo : '' //订单号
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
orderNo: options.order_no
|
||||
})
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 获取订单详情
|
||||
this.goodsInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
*/
|
||||
goodsInfo() {
|
||||
wx.$api.order.goodsDet(this.data.orderNo).then(res => {
|
||||
this.setData({
|
||||
goodsData : res.data,
|
||||
canState : res.data.can,
|
||||
express : res.data.express
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 复制订单号
|
||||
*/
|
||||
copyUrl(val) {
|
||||
wx.setClipboardData({
|
||||
data: val.currentTarget.dataset.no,
|
||||
success: () => {
|
||||
wx.showToast({
|
||||
title: "订单编号复制成功",
|
||||
icon : "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 支付订单
|
||||
*/
|
||||
payClick() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/pay/index?order_no=' + this.data.goodsData.order_no + '&total=' + this.data.goodsData.total
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单签收
|
||||
*/
|
||||
signClick(e) {
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否签收',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
wx.$api.order.goodsSign(this.data.goodsData.order_no).then(res => {
|
||||
wx.showToast({
|
||||
title:'签收成功',
|
||||
icon:'none'
|
||||
})
|
||||
|
||||
// 获取订单详情
|
||||
this.goodsInfo();
|
||||
}).catch(err => {})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 取消订单
|
||||
*/
|
||||
cancelClick(e) {
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否取消订单',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
wx.$api.order.goodsCancel(this.data.goodsData.order_no).then(res => {
|
||||
wx.showToast({
|
||||
title:'取消成功',
|
||||
icon:'none'
|
||||
})
|
||||
|
||||
// 回到列表
|
||||
wx.navigateBack(1)
|
||||
}).catch(err => {})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 复制物流单号
|
||||
*/
|
||||
copyExpress(val) {
|
||||
wx.setClipboardData({
|
||||
data: val.currentTarget.dataset.no,
|
||||
success: () => {
|
||||
wx.showToast({
|
||||
title: "物流单号复制成功",
|
||||
icon : "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看物流
|
||||
h5url() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/order/logistic/logistic?orderno=" + this.data.goodsData.order_no
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/order/details/details.json
Normal file
4
pages/order/details/details.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
91
pages/order/details/details.wxml
Normal file
91
pages/order/details/details.wxml
Normal file
@@ -0,0 +1,91 @@
|
||||
<view class="orderData">
|
||||
<view class="While">
|
||||
<view class="orderData-cont-label">
|
||||
<image class="orderData-cont-img" src="https://cdn.shuiganying.com/images/2023/04/04/3b3938e3a883e6b173b4d49a5242666a.png" mode="aspectFill"></image>
|
||||
<view class="orderData-cont-text">
|
||||
<view class="orderData-cont-name">订单编号</view>
|
||||
<view class="orderData-cont-copy">
|
||||
<text class="nowrap">{{goodsData.order_no}}</text>
|
||||
<view bindtap="copyUrl" data-no="{{goodsData.order_no}}">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orderData-cont-label">
|
||||
<image class="orderData-cont-img" src="/static/icons/siteIcon.png" mode="aspectFill"></image>
|
||||
<view class="orderData-cont-text orderData-cont-site">
|
||||
<view class="orderData-cont-name">{{ goodsData.express.name }} <text>{{ goodsData.express.mobile }}</text></view>
|
||||
<view class="orderData-cont-copy">
|
||||
{{ goodsData.express.full_address }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="While">
|
||||
<view class="shopSee">
|
||||
<view class="shopSee-name"><image src="/static/icons/shop.png" mode="widthFix"></image>{{goodsData.shop.name}}</view>
|
||||
<view class="shopSee-state reserve-status">{{goodsData.state}}</view>
|
||||
</view>
|
||||
<view class="list-goods">
|
||||
<block wx:for="{{goodsData.items}}" wx:key="items">
|
||||
<image class="list-goods-img" mode="aspectFill" src="{{item.sku.cover}}"></image>
|
||||
<view class="list-goods-cont">
|
||||
<view class="nowrap list-goods-name">{{item.sku.goods_name}}</view>
|
||||
<view class="list-goods-text">
|
||||
<text>购买数量</text>x{{item.qty}}
|
||||
</view>
|
||||
<view class="list-goods-parice">
|
||||
¥<text>{{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="While reserveCont">
|
||||
<view class="reserveCont-title">订单信息</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">交易时间</view>
|
||||
<view class="reserve-text">{{goodsData.created_at}}</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">运费</view>
|
||||
<view class="reserve-text">{{goodsData.freight == 0 ? '免邮' : goodsData.freight + '元'}}</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">交易状态</view>
|
||||
<view class="reserve-text reserve-status">{{goodsData.state}}</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">实付款</view>
|
||||
<view class="reserve-text reserve-price">¥{{goodsData.total}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="While reserveCont" wx:if="{{goodsData.express.express_no}}">
|
||||
<view class="reserveCont-title">物流信息</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">物流名称</view>
|
||||
<view class="reserve-text">{{goodsData.express.express_name}}</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">物流单号</view>
|
||||
<view class="reserve-text reserve-text-copy">
|
||||
{{goodsData.express.express_no}}<view bindtap="copyExpress" class="reserve-text-tap" data-no="{{goodsData.express.express_no}}">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">查看物流信息</view>
|
||||
<view class="reserve-text reserve-text-btn" bindtap="h5url">
|
||||
去查看
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-data-footer">
|
||||
<view class="list-btn">
|
||||
<view class="order-btn" bindtap="cancelClick" wx:if="{{canState.cancel}}">取消订单</view>
|
||||
<view class="order-btn" bindtap="payClick" wx:if="{{canState.pay}}">立即付款</view>
|
||||
<view class="order-btn" bindtap="signClick" wx:if="{{canState.sign}}">签收订单</view>
|
||||
<navigator hover-class="none" class="order-btn grey" open-type="navigateBack">返回订单</navigator>
|
||||
</view>
|
||||
</view>
|
||||
256
pages/order/details/details.wxss
Normal file
256
pages/order/details/details.wxss
Normal file
@@ -0,0 +1,256 @@
|
||||
page {
|
||||
background: #f3f4f6;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.While {
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 30rpx;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 0 10rpx rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
.orderData {
|
||||
border-bottom: 100rpx transparent solid;
|
||||
}
|
||||
|
||||
/* 订单 */
|
||||
.orderData-cont-label {
|
||||
padding: 40rpx 30rpx;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
border-bottom: #f2f2f2 2rpx solid;
|
||||
}
|
||||
|
||||
.orderData-cont-img {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.orderData-cont-text {
|
||||
width: calc(100% - 68rpx);
|
||||
margin-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.orderData-cont-site {
|
||||
width: calc(100% - 108rpx);
|
||||
}
|
||||
|
||||
.orderData-cont-name {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.orderData-cont-name text {
|
||||
color: #999;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.orderData-cont-copy {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.orderData-cont-copy text {
|
||||
flex: 1;
|
||||
display: inline-block;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.orderData-cont-copy view {
|
||||
color: #da2b54;
|
||||
}
|
||||
|
||||
.address-btn {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
margin-top: 46rpx;
|
||||
}
|
||||
|
||||
/* 产品 */
|
||||
.list-goods {
|
||||
display: flex;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.shopSee {
|
||||
line-height: 40rpx;
|
||||
display: flex;
|
||||
padding: 30rpx 30rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.shopSee-name {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.shopSee-name image {
|
||||
width: 34rpx;
|
||||
margin: 5rpx 15rpx 0 0;
|
||||
}
|
||||
|
||||
.shopSee-state {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.list-goods-img {
|
||||
width: 184rpx;
|
||||
height: 184rpx;
|
||||
margin-right: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.list-goods-cont {
|
||||
width: calc(100% - 214rpx);
|
||||
}
|
||||
|
||||
.list-goods-name {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.list-goods-text {
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.list-goods-text text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.list-goods-parice {
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.list-goods-parice text {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
/* 规格 */
|
||||
.reserveCont-title {
|
||||
padding: 30rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.reserve-label {
|
||||
display: flex;
|
||||
padding: 0 30rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.reserve-name {
|
||||
flex: 1;
|
||||
width: 200rpx;
|
||||
margin-right: 20rpx;
|
||||
color: #7e7e7e;
|
||||
}
|
||||
|
||||
.reserve-text {
|
||||
width: calc(100% - 240rpx);
|
||||
text-align: right;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.reserve-text-btn {
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
background-color: #da2b54;
|
||||
font-size: 26rpx;
|
||||
border-radius: 10rpx;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
|
||||
.reserve-text-copy {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.reserve-text-tap {
|
||||
color: #ff9951;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.reserve-text text {
|
||||
font-size: 24rpx;
|
||||
display: inline-block;
|
||||
background-image: linear-gradient(to right, #f16e06, #f34206);
|
||||
color: #FFFFFF;
|
||||
border-radius: 6rpx;
|
||||
padding: 0 10rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.reserve-text text.active {
|
||||
background-image: linear-gradient(to right, #027be6, #2855f0);
|
||||
}
|
||||
|
||||
.reserve-text.reserve-price {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #da2b54;
|
||||
}
|
||||
|
||||
.reserve-copy {
|
||||
color: #da2b54;
|
||||
border: #da2b54 2rpx solid;
|
||||
display: inline-block;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 26rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.reserve-status {
|
||||
color: #ff8100
|
||||
}
|
||||
|
||||
/* 底部菜单 */
|
||||
.order-data-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border-top: solid 1rpx #f2f2f2;
|
||||
padding-top: 20rpx;
|
||||
padding-right: 30rpx;
|
||||
padding-left: 30rpx;
|
||||
height: 110rpx;
|
||||
background: white;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row-reverse;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.list-btn {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order-btn {
|
||||
border: 2rpx solid #da2b54;
|
||||
color: #da2b54;
|
||||
border-radius: 80rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
padding: 0 20rpx;
|
||||
display: inline-block;
|
||||
font-size: 26rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.order-btn.grey {
|
||||
color: grey;
|
||||
border-color: grey;
|
||||
}
|
||||
141
pages/order/index.js
Normal file
141
pages/order/index.js
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
data: {
|
||||
listType : '', // 订单状态
|
||||
listsArr : [], // 订单列表
|
||||
page : {}, // 分页信息
|
||||
lodingStats : false,// 加载状态
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
listType: options.list_type
|
||||
})
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 获取订单列表
|
||||
this.listInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
listInfo(page) {
|
||||
wx.$api.order.list({
|
||||
state: this.data.listType,
|
||||
page : page || 1
|
||||
}).then(res => {
|
||||
let listArr = this.data.listsArr,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
newData = listArr.concat(res.data.data)
|
||||
this.setData({
|
||||
listsArr : newData,
|
||||
page : res.data.page,
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 状态筛选
|
||||
*/
|
||||
onTabs(val){
|
||||
if(this.data.listType === val) return
|
||||
this.setData({
|
||||
listType: val.currentTarget.dataset.type
|
||||
})
|
||||
|
||||
// 获取订单列表
|
||||
this.listInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 支付订单
|
||||
*/
|
||||
payClick(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/pay/index?order_no=' + e.currentTarget.dataset.order_no + '&total=' + e.currentTarget.dataset.total
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 更多操作
|
||||
*/
|
||||
operateMore(e) {
|
||||
wx.showActionSheet({
|
||||
itemList: ['取消订单'],
|
||||
success: ()=> {
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否取消订单',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
wx.$api.order.goodsCancel(e.currentTarget.dataset.order_no).then(res => {
|
||||
wx.showToast({
|
||||
title:'取消成功',
|
||||
icon:'none'
|
||||
})
|
||||
// 获取订单列表
|
||||
this.listInfo()
|
||||
}).catch(err => {})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err=> {}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单签收
|
||||
*/
|
||||
signClick(e) {
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否签收',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
wx.$api.order.goodsSign(e.currentTarget.dataset.order_no).then(res => {
|
||||
wx.showToast({
|
||||
title:'签收成功',
|
||||
icon:'none'
|
||||
})
|
||||
|
||||
// 获取订单列表
|
||||
this.listInfo()
|
||||
}).catch(err => {})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
// 获取订单列表
|
||||
this.listInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
// 获取订单列表
|
||||
this.listInfo(pageNumber);
|
||||
}
|
||||
}
|
||||
})
|
||||
4
pages/order/index.json
Normal file
4
pages/order/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "我的订单"
|
||||
}
|
||||
66
pages/order/index.wxml
Normal file
66
pages/order/index.wxml
Normal file
@@ -0,0 +1,66 @@
|
||||
<view class="header">
|
||||
<view class="tabs">
|
||||
<view class="tabs-item {{listType == '' ? 'show' : ''}}" bindtap="onTabs" data-type="">全部</view>
|
||||
<view class="tabs-item {{listType == 'unpay' ? 'show' : ''}}" bindtap="onTabs" data-type="unpay">待付款</view>
|
||||
<view class="tabs-item {{listType == 'paid' ? 'show' : ''}}" bindtap="onTabs" data-type="paid">待发货</view>
|
||||
<view class="tabs-item {{listType == 'delivered' ? 'show' : ''}}" bindtap="onTabs" data-type="delivered">待收货</view>
|
||||
<view class="tabs-item {{listType == 'signed' ? 'show' : ''}}" bindtap="onTabs" data-type="signed">已签收</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list" wx:if="{{listsArr.length > 0}}">
|
||||
<view class="list-item" wx:for="{{listsArr}}" wx:key="listsArr">
|
||||
<view class="list-top">
|
||||
<view class="list-top-no">{{item.order_no}}</view>
|
||||
<view class="list-top-status">{{item.state}}</view>
|
||||
</view>
|
||||
<view class="list-goods" wx:for-item="goodItem" wx:for="{{item.items}}" wx:key="items">
|
||||
<image class="list-goods-img" mode="aspectFill" src="{{goodItem.sku.cover}}"></image>
|
||||
<view class="list-goods-cont">
|
||||
<view class="nowrap list-goods-name">{{goodItem.sku.goods_name}}</view>
|
||||
<view class="list-goods-text">
|
||||
<text>规格 99ml</text>x{{goodItem.qty}}
|
||||
</view>
|
||||
<view class="list-goods-parice">
|
||||
¥<text>{{goodItem.sku.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-total" wx:if="{{item.total != 0}}">
|
||||
交易金额 <text>¥</text>
|
||||
<view class="list-total-price">{{item.total}}</view>
|
||||
</view>
|
||||
<view class="list-total active" wx:else>
|
||||
兑换券兑换
|
||||
</view>
|
||||
<view class="list-tips">
|
||||
<view class="list-tips-left">
|
||||
<image class="list-tips-img" src="https://cdn.shuiganying.com/images/2023/04/04/d4543817b05d3aaac04dfb85ff9f8f8c.png"></image>收货城市
|
||||
</view>
|
||||
<view class="nowrap list-tips-right">{{item.province_city}}</view>
|
||||
</view>
|
||||
<view class="list-operate">
|
||||
<view class="list-more">
|
||||
<view class="list-more-go" bindtap="operateMore" data-order_no="{{item.order_no}}" wx:if="{{item.can.cancel}}">更多</view>
|
||||
</view>
|
||||
<view class="list-btn">
|
||||
<view class="list-btn-labor" bindtap="payClick" data-order_no="{{item.order_no}}" data-total="{{item.total}}" wx:if="{{item.can.pay}}">立即付款</view>
|
||||
<view bindtap="signClick" data-order_no="{{item.order_no}}" class="list-btn-labor" wx:if="{{item.can.sign}}">签收订单</view>
|
||||
<navigator hover-class="none" url="./details/details?order_no={{item.order_no}}" class="list-btn-labor grey">查看详情</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="/static/imgs/text_null.png"></image>
|
||||
<view>暂无数据</view>
|
||||
</view>
|
||||
174
pages/order/index.wxss
Normal file
174
pages/order/index.wxss
Normal file
@@ -0,0 +1,174 @@
|
||||
page {
|
||||
background-color: #f7faff;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
height: 100rpx;
|
||||
background-color: #f7faff;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 30rpx 10rpx;
|
||||
font-size: 30rpx;
|
||||
color: #3c3d3e;
|
||||
}
|
||||
|
||||
.tabs-item.show {
|
||||
color: #da2b54;
|
||||
}
|
||||
|
||||
/* 列表 */
|
||||
.list {
|
||||
padding: 20rpx 30rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 30rpx 2rpx rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
.list-top {
|
||||
display: flex;
|
||||
margin-bottom: 30rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.list-top-no {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.list-top-status {
|
||||
color: #ff8100;
|
||||
}
|
||||
|
||||
.list-goods {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-goods-img {
|
||||
width: 184rpx;
|
||||
height: 184rpx;
|
||||
margin-right: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.list-goods-cont {
|
||||
width: calc(100% - 214rpx);
|
||||
}
|
||||
|
||||
.list-goods-name {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.list-goods-text {
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.list-goods-text text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.list-goods-parice {
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.list-goods-parice text {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.list-total {
|
||||
text-align: right;
|
||||
margin-top: 30rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.list-total.active {
|
||||
color: #da2b54;
|
||||
}
|
||||
|
||||
.list-total text {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.list-total-price {
|
||||
display: inline-block;
|
||||
font-weight: 600;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.list-tips {
|
||||
background-color: #f7faff;
|
||||
display: flex;
|
||||
padding: 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 30rpx 0 40rpx;
|
||||
border-radius: 10rpx;
|
||||
line-height: 44rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.list-tips-left {
|
||||
display: flex;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.list-tips-img {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.list-tips-right {
|
||||
color: #707070;
|
||||
width: calc(100% - 210rpx);
|
||||
}
|
||||
|
||||
.list-operate {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-more {
|
||||
flex: 1;
|
||||
line-height: 56rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.list-btn {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.list-btn-labor {
|
||||
border: 2rpx solid #ff8100;
|
||||
color: #ff8100;
|
||||
border-radius: 80rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
padding: 0 25rpx;
|
||||
display: inline-block;
|
||||
font-size: 26rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.list-btn-labor.grey {
|
||||
color: grey;
|
||||
border-color: grey;
|
||||
}
|
||||
41
pages/order/logistic/logistic.js
Normal file
41
pages/order/logistic/logistic.js
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
data: {
|
||||
orderNo : '',
|
||||
logisticArr : [],
|
||||
expressData : '',
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
orderNo: options.orderno
|
||||
})
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 查看物流
|
||||
this.h5url();
|
||||
},
|
||||
|
||||
// 查看物流
|
||||
h5url() {
|
||||
wx.$api.order.kuaiDi(this.data.orderNo).then(res => {
|
||||
this.setData({
|
||||
expressData: res.data.orderExpress,
|
||||
logisticArr: res.data.logistics
|
||||
})
|
||||
}).catch(err => {})
|
||||
// wx.request({
|
||||
// url: 'http://shanhe.kim/api/za/kuaidi.php?id=' + this.data.expressData.express_no, //需更换需请求数据的接口
|
||||
// success: res=> {
|
||||
// this.setData({
|
||||
// logisticArr: res.data.data
|
||||
// })
|
||||
// },
|
||||
// });
|
||||
}
|
||||
})
|
||||
4
pages/order/logistic/logistic.json
Normal file
4
pages/order/logistic/logistic.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "物流信息"
|
||||
}
|
||||
42
pages/order/logistic/logistic.wxml
Normal file
42
pages/order/logistic/logistic.wxml
Normal file
@@ -0,0 +1,42 @@
|
||||
<block wx:if="{{logisticArr.length > 0}}">
|
||||
<view class="top">
|
||||
<view class="top-logo">
|
||||
<image src="{{expressData.logistic_cover ? expressData.logistic_cover : '/static/imgs/logistics.png'}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="top-cont">
|
||||
<view class="top-name">
|
||||
{{expressData.logistic_name}}
|
||||
<view class="top-no">
|
||||
{{expressData.express_no}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-type">{{expressData.order_state}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="white">
|
||||
<view class="address">
|
||||
<view class="address-tips">
|
||||
收
|
||||
</view>
|
||||
<view class="address-text">
|
||||
{{expressData.address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" wx:for="{{logisticArr}}" wx:key="logisticArr">
|
||||
<view class="item-name">
|
||||
<view class="item-time">
|
||||
{{item.time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
{{item.context}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="/static/imgs/cont_null.png"></image>
|
||||
<view>暂无物流信息</view>
|
||||
</view>
|
||||
141
pages/order/logistic/logistic.wxss
Normal file
141
pages/order/logistic/logistic.wxss
Normal file
@@ -0,0 +1,141 @@
|
||||
.top {
|
||||
background-color: #da2b54;
|
||||
padding: 30rpx 30rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.top-logo {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.top-logo image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.top-cont {
|
||||
color: #ffffff;
|
||||
width: calc(100% - 130rpx);
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.top-name {
|
||||
display: flex;
|
||||
line-height: 44rpx;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.top-no {
|
||||
font-size: 26rpx;
|
||||
padding-left: 30rpx;
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
.top-type {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.top-type text {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.address {
|
||||
color: #333333;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
padding: 30rpx 30rpx 0;
|
||||
}
|
||||
|
||||
.address-tips {
|
||||
width: 54rpx;
|
||||
text-align: center;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #EEEEEE;
|
||||
margin-left: -15rpx;
|
||||
font-size: 24rpx
|
||||
}
|
||||
|
||||
.address-text {
|
||||
width: calc(100% - 74rpx);
|
||||
margin-left: 20rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.white {
|
||||
margin-top: -30rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding-bottom: 40rpx;
|
||||
padding-left: 40rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.item:first-child {
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.item::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #DDDDDD;
|
||||
width: 14rpx;
|
||||
height: 14rpx;
|
||||
border-radius: 50%;
|
||||
left: 0;
|
||||
top: calc(50% - 6rpx);
|
||||
z-index: 3;
|
||||
border: 2rpx solid #ffffff;
|
||||
}
|
||||
|
||||
.item::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #F0F0F0;
|
||||
width: 2rpx;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
left: 8rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.item-status {
|
||||
font-weight: 600;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.item-time {
|
||||
color: #868686;
|
||||
}
|
||||
|
||||
.item-text {
|
||||
color: #868686;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.item:first-child .item-time,
|
||||
.item:first-child .item-text {
|
||||
color: #ff8100 !important;
|
||||
}
|
||||
Reference in New Issue
Block a user