优化新增待收货订单
After Width: | Height: | Size: 236 KiB |
After Width: | Height: | Size: 188 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 191 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 2.2 MiB |
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "dx-wxapp",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "微信小程序 商城(uni-app 版本的代码请看[uni分支](https://github.com/lin-xin/wxapp-mall/tree/uni),可打包成APP、小程序、H5)",
|
||||||
|
"main": "app.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "http://62.234.217.137:3000/Big-Data-Lab/WxApp.git"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@vant/weapp": "^1.11.6",
|
||||||
|
"tdesign-miniprogram": "^1.6.0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
const app = getApp()
|
||||||
|
const baseUrl = app.globalData.baseUrl
|
||||||
|
// page/component/orders/orders.js
|
||||||
|
Page({
|
||||||
|
// onLoad: function (options) {
|
||||||
|
// this.setData({
|
||||||
|
// orders: [...this.data.orders, options]
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
data: {
|
||||||
|
address: {},
|
||||||
|
hasAddress: false,
|
||||||
|
total: 0,
|
||||||
|
orders: [],
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
var self = this
|
||||||
|
// 获取statu为2的待收货订单
|
||||||
|
wx.request({
|
||||||
|
url: baseUrl + "/order/loadData",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
userId: 1,
|
||||||
|
statu: 2
|
||||||
|
},
|
||||||
|
success(res) {
|
||||||
|
self.setData({
|
||||||
|
orders: res.data.data,
|
||||||
|
})
|
||||||
|
console.log('orders',self.data.orders)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
},
|
||||||
|
|
||||||
|
onShow: function () {
|
||||||
|
const self = this
|
||||||
|
wx.getStorage({
|
||||||
|
key: "address",
|
||||||
|
success(res) {
|
||||||
|
self.setData({
|
||||||
|
address: res.data,
|
||||||
|
hasAddress: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
})
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "待收货订单"
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<view class="main">
|
||||||
|
<navigator url="../refund/refund">
|
||||||
|
<view class="orders-no-refund">退款 / 售后</view>
|
||||||
|
</navigator>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="orders-box">
|
||||||
|
<view wx:for="{{orders}}" wx:key="id" class="orders-list">
|
||||||
|
<image class="orders-thumb" src="{{item.image}}"></image>
|
||||||
|
<view class="orders-info">
|
||||||
|
<view class="orders-info-left">
|
||||||
|
<view class="orders-pro-name">{{item.title}}</view>
|
||||||
|
<view class="order-specs">{{item.specs}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-info-right">
|
||||||
|
<view class="orders-pro-price">¥{{item.price}}</view>
|
||||||
|
<view class="orders-count-num">×{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
|
@ -0,0 +1,80 @@
|
||||||
|
.orders-list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
border-bottom: 10rpx solid #ededed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-thumb {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-info {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-info-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-pro-name {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-specs {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #888;
|
||||||
|
margin-top: 5rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-info-right {
|
||||||
|
text-align: right;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-pro-price {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #AB956D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-count-num {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-no-refund {
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #f56464;
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: 20rpx solid #ededed;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-no-refund::after {
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
top: 34rpx;
|
||||||
|
content: '';
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
border-top: 4rpx solid #7f7f7f;
|
||||||
|
border-right: 4rpx solid #7f7f7f;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.orders-box {
|
||||||
|
padding-bottom: 105rpx;
|
||||||
|
}
|