first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
6b7c2571-61c0-4188-b16b-e307c388e526

View File

@@ -0,0 +1 @@
6cf74d7a-c223-48ed-a046-127eeae7bc1e

View File

@@ -0,0 +1,168 @@
// mall/laundryList/laundryInfo/laundryInfo.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "订单详情", //头部标题
isBack: true,//显示返回
shopNum: 2,//显示的商品数量
orderId: "",//订单id
orderInof: {},//订单详情
},
// 点击查看更多商品
more() {
this.setData({
shopNum: 999999
})
},
// 获取详情信息
async storeOrderDetail() {
let res = await http.http.request2({ url: `${http.api.storeOrderDetail}`, method: "POST", data: { order_id: this.data.orderId } })
let rel = res.data.data
if (rel.status == 1) {
rel.status_name = "待付款"
rel.status_img = "/static/img/icon/shop_dfk.png"
} else if (rel.status == 2) {
rel.status_name = "待发货"
rel.status_img = "/static/img/icon/shop_yfk.png"
} else if (rel.status == 3) {
rel.status_name = "待收货"
rel.status_img = "/static/img/icon/shop_dsh.png"
} else if (rel.status == 4) {
rel.status_name = "已完成"
rel.status_img = "/static/img/icon/shop_wc.png"
} else if (rel.status == 5) {
rel.status_name = "已取消"
rel.status_img = "/static/img/icon/shop_x.png"
}else if (rel.status == 6){
rel.status_name = "待退款"
rel.status_img = "/static/img/icon/shop_tui.png"
}else if (rel.status == 7){
rel.status_name = "已退款"
rel.status_img = "/static/img/icon/shop_tui.png"
}
// 去除地址中的,
rel.user_address = rel.user_address.replace(/,/g, "");
this.setData({
orderInof: rel
})
},
// 待付款订单支付
async orderPay(e) {
// let id = e.currentTarget.dataset.id
// let data = {
// orderID: id,
// payType: 2,
// userCouponID: 0,
// userCardID: 0
// }
// let res = await model.payment.pay(http.api.pre_order, data)
// if (res == 1) {
// this.storeOrderDetail()
// }
let orderInfo = this.data.orderInof
let data = {
orederId: orderInfo.id,
order_num: orderInfo.order_no,
realPrice: orderInfo.order_total_price,
fjPrice: 0,//附加金额商城订单为0
type: 1,//1是商城订单
}
wx.navigateTo({
url: `/user/payment/payment?data=${JSON.stringify(data)}`
})
},
// 取消订单
async orderCancel(e) {
let id = e.currentTarget.dataset.id
wx.showModal({
title: '取消订单',
content: '是否取消订单',
success(res) {
if (res.confirm) {
http.http.request2({ url: `${http.api.cancelOrderStatus}`, method: "GET", data: { order_id: id } })
.then(res => {
if (res.data.status == 1) {
wx.showToast({
title: '取消成功',
icon: 'none',
duration: 800
})
setTimeout(() => {
wx.navigateBack({
})
}, 800)
}
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
orderId: options.id
})
this.storeOrderDetail()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,114 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- mall/laundryList/laundryInfo/laundryInfo.wxml -->
<view class="laundryInfo">
<view class="order_start flex-con3" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
<image src="{{orderInof.status_img}}" />
{{orderInof.status_name}}
</view>
<view class="laundryInfo_cen">
<view class="shop_list">
<view class="shop_list_title">商品信息</view>
<view class="shop_list_row dis-flex" wx:for="{{ orderInof.order_detail }}" wx:key="{{ index }}" wx:if="{{ index < shopNum }}">
<view class="shop_list_img">
<image src="{{item.image}}" />
</view>
<view class="flex1 ml20 dis-flex1">
<view class="flex1 flex-con2">
<view class="flex1 text1">{{item.product_name}}</view>
<view class="flex1 text-right text1">¥{{item.price}}</view>
</view>
<view class="flex1 flex-con2">
<view class="flex1 text2">{{item.attr}}</view>
<view class="flex1 text-right text1">×{{item.count}}</view>
</view>
</view>
</view>
<view wx:if="{{shopNum <= 2 && orderInof.order_detail.length>2}}" bind:tap="more" class="more_shop flex-con3">
共{{orderInof.order_detail.length}}件
<image class="ml20" src="/static/img/icon/asfa51f3a1f3a5f13a.png" />
</view>
</view>
<view class="mon mt20">
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">商品总金额</view>
<view class="flex1 text-right mon_p">¥{{orderInof.order_total_price}}</view>
</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">优惠</view>
<view class="flex1 text-right mon_span">
-¥{{orderInof.favourable != null ?orderInof.favourable :0}}
</view>
</view>
<!-- <view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">运费(实付满99.00元免运费)</view>
<view class="text-right mon_p">¥{{orderInof.postage}}</view>
</view> -->
<view class="mt20 pt40 pb20 rem flex-con2">
<view class="dis-flex mon_p">实际支付</view>
<view class="flex1 text-right mon_span2">¥{{orderInof.total_price}}</view>
</view>
</view>
<view class="mon mt20">
<view class="list_title">配送详情</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">配送方式</view>
<view class="flex1 text-right mon_i">{{orderInof.take_type == 1?"快递":"门店自取"}}</view>
</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">收货地址</view>
<view wx:if="{{orderInof.take_type == 1}}" class="flex2 text-right mon_i">
<view>{{orderInof.realname}} {{orderInof.telnum}}</view>
<view>{{orderInof.user_address}}</view>
</view>
<view wx:if="{{orderInof.take_type == 2}}" class="flex2 text-right mon_i">
<view>{{orderInof.name}} {{orderInof.shopTelnum}}</view>
<view>{{orderInof.address}}</view>
</view>
</view>
</view>
<view class="mon mt20">
<view class="list_title">订单详情</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">订单详情</view>
<view class="flex1 text-right mon_i">{{orderInof.order_no}}</view>
</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">下单时间</view>
<view class="flex1 text-right mon_i">{{orderInof.create_time}}</view>
</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">支付方式</view>
<view class="flex1 text-right mon_i">
{{orderInof.pay_type == 1 ?"余额支付":"微信支付"}}
</view>
</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">支付时间</view>
<view class="flex1 text-right mon_i">
{{orderInof.pay_time == 0?"未支付":orderInof.pay_time}}
</view>
</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">订单状态</view>
<view class="flex1 text-right mon_i">{{orderInof.status_name}}</view>
</view>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">订单备注</view>
<view class="flex2 text-right mon_i">{{orderInof.remark}}</view>
</view>
</view>
</view>
</view>
<!-- 付款或者取消 -->
<view class="pay_cancel flex-con5 pd30">
<span wx:if="{{orderInof.status == 1}}" data-id="{{orderInof.id}}" bind:tap="orderPay" class="lau_pay ml20">
付款
</span>
<span wx:if="{{orderInof.status == 1}}" data-id="{{orderInof.id}}" bind:tap="orderCancel" class="lau_cancel ml20">
取消订单
</span>
<button open-type="contact" class="lau_service ml20">联系客服</button>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,173 @@
/* mall/laundryList/laundryInfo/laundryInfo.wxss */
.laundryInfo {
padding-bottom: 120rpx;
}
.order_start {
position: fixed;
left: 0;
right: 0;
height: 90rpx;
background-color: #1dbf53;
font-family: PingFang-SC-Bold;
font-size: 36rpx;
color: #fff;
z-index: 9999;
}
.order_start image {
width: 50rpx;
height: 50rpx;
margin-right: 25rpx;
}
.laundryInfo_cen {
margin-top: 110rpx;
padding: 0 20rpx;
}
.shop_list {
padding: 30rpx 0;
background-color: #fff;
border-radius: 10rpx;
}
.shop_list_title {
font-weight: 400;
padding-left: 30rpx;
padding-bottom: 30rpx;
border-bottom: 2rpx solid #ebebeb;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #333;
margin-bottom: 44rpx;
}
.shop_list_row {
height: 100rpx;
padding: 0 30rpx;
margin-bottom: 44rpx;
}
.shop_list_row:last-child {
margin-bottom: 0;
}
.shop_list_img image {
width: 100rpx;
height: 100rpx;
}
.text1 {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.text2 {
font-family: PingFang-SC-Medium;
font-size: 22rpx;
color: #999;
}
.mon {
padding: 30rpx 30rpx;
background-color: #fff;
border-radius: 10rpx;
}
.mon_p {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.mon_span {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #ff4838;
}
.mon_span2 {
font-weight: 500;
font-family: PingFang-SC-Bold;
font-size: 32rpx;
color: #ff4838;
}
.rem {
border-top: 2rpx solid #ebebeb;
}
.rem input {
padding-left: 30rpx;
}
.list_title {
font-weight: 400;
padding-bottom: 30rpx;
border-bottom: 2rpx solid #ebebeb;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #333;
}
.mon_i {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #666;
}
.pay_cancel {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #fff;
z-index: 9999;
}
.pay_cancel span, .pay_cancel button {
padding: 15rpx 55rpx !important;
border: solid 1px #ebebeb !important;
font-family: PingFang-SC-Medium !important;
font-size: 26rpx !important;
color: #333 !important;
border-radius: 100rpx !important;
font-weight: 400 !important;
}
.pay_cancel button {
line-height: normal;
margin: 0;
background-color: #fff;
box-shadow: 0;
}
.pay_cancel button::after {
border: 0;
}
.lau_pay {
border: solid 2rpx #1dbf45 !important;
color: #1dbf45 !important;
}
.more_shop {
margin: 20rpx 30rpx 0;
height: 50rpx;
line-height: 50rpx;
text-align: center;
background-color: #f6f6f6;
border-radius: 10rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #999;
}
.more_shop image {
width: 21rpx;
height: 10rpx;
}

View File

@@ -0,0 +1,147 @@
// mall/laundryList/laundryList.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "商城订单", //头部标题
isBack: true,//显示返回,
isLoading: true,//加载显示关闭
current: "0",//选择订单状态
orderList: [],//订单列表
},
// tab选中事件
handleChange({ detail }) {
this.setData({
current: detail.key
});
this.getOrderList()
},
// 查看详情
openInfo(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: "/mall/laundryList/laundryInfo/laundryInfo?id=" + id
})
},
// 获取订单列表
async getOrderList() {
let res = await http.http.request2({ url: `${http.api.userStoreOrder}`, method: "POST", data: { status: this.data.current } })
this.setData({
orderList: res.data.data,
isLoading: false
})
},
// 申请退款
async applyReturn(e) {
let that = this;
let id = e.currentTarget.dataset.id;
wx.showModal({
title: '确定退款',
content: '退款成功后,将不可取消退款!',
success(res) {
if (res.confirm) {
http.http.request2({ url: `${http.api.applyReturn}`, method: "POST", data: { order_id: id } })
.then(res => {
if (res.data.status == 1) {
wx.showToast({
title: '请等待后台人员审核!!!',
icon: 'none',
duration: 2000
})
that.getOrderList()
}
})
}
}
})
},
// 确认收货
async recGoods(e) {
let that = this;
let id = e.currentTarget.dataset.id;
wx.showModal({
content: '确定收货',
success(res) {
if (res.confirm) {
wx.showLoading({
title: '加载中',
})
http.http.request2({ url: `${http.api.confirmReceipt}`, method: "POST", data: { order_id: id } })
.then(res => {
if (res.data.status == 1) {
wx.hideLoading()
wx.showToast({
title: '确认成功!',
icon: 'none',
duration: 2000
})
that.getOrderList()
}
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getOrderList()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {
"i-tabs": "../../extend/iview/dist/tabs/index",
"i-tab": "../../extend/iview/dist/tab/index"
}
}

View File

@@ -0,0 +1,54 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- mall/laundryList/laundryList.wxml -->
<view class="laundryList">
<view class="order_tab" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
<i-tabs current="{{ current }}" color="#1dbf45" bindchange="handleChange">
<i-tab key="0" title="全部"></i-tab>
<i-tab key="1" title="待付款"></i-tab>
<i-tab key="2" title="待发货"></i-tab>
<i-tab key="3" title="待收货"></i-tab>
<i-tab key="4" title="已完成"></i-tab>
</i-tabs>
</view>
<view wx:if="{{orderList.length>0}}" class="laundry">
<view wx:for="{{orderList}}" wx:key="" class="laundry_row dis-flex1 mb20" data-id="{{item.id}}" bind:tap="openInfo">
<view class="laundry_row1 flex-con2 pd30">
<view class="flex1 row1-l">{{item.create_time}}</view>
<view class="flex1 row1-r">{{item.status_name}}</view>
</view>
<view class="flex1 flex-con2 laundry_row2 pd30">
<scroll-view scroll-x scroll-with-animation class="bg-white nav">
<view class="shop_img" wx:for="{{item.image}}" wx:key="" wx:for-item="list">
<image lazy-load="{{true}}" src="{{list.image}}" />
</view>
</scroll-view>
</view>
<view class="laundry_row3 flex-con2 pd30">
<view class="flex1 row3-l">
合计:¥{{item.order_total_price}}
<span>共{{item.image.length}}件</span>
</view>
<view class="flex1 row3-r flex-con5">
<span wx:if="{{item.status == 1}}">付款</span>
<span wx:if="{{item.status == 2}}" data-id="{{item.id}}" catchtap="applyReturn">
申请退款
</span>
<span wx:if="{{item.status == 3}}" data-id="{{item.id}}" catchtap="recGoods">
确认收货
</span>
</view>
</view>
</view>
</view>
<view wx:elif="{{orderList.length<=0}}" class="empty flex-con3">
<view>
<image class="empty_img" src="/static/img/icon/order-konw-icon.png" />
<view>暂无内容</view>
</view>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,84 @@
/* mall/laundryList/laundryList.wxss */
.order_tab {
position: fixed;
width: 100%;
height: auto;
top: 0;
z-index: 998;
background-color: #fff;
box-shadow: 0px 8rpx 5rpx 0px rgba(156, 156, 156, 0.03);
}
.laundry {
margin-top: 52px;
}
.laundry_row {
height: 379rpx;
background-color: #fff;
}
.laundry_row1 {
height: 89rpx;
border-bottom: 2rpx solid #f2f2f2;
}
.laundry_row3 {
height: 108rpx;
border-top: 2rpx solid #f2f2f2;
}
.laundry_row2 scroll-view {
height: 100rpx;
width: 100%;
}
.shop_img {
display: inline-block;
margin-right: 30rpx;
}
.shop_img image {
width: 100rpx;
height: 100rpx;
background-color: #ccc;
border-radius: 5px;
}
.row1-l {
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #999;
}
.row1-r {
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #666;
text-align: right;
}
.row3-l {
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #333;
}
.row3-l span {
font-family: PingFang-SC-Medium;
font-size: 22rpx;
color: #999;
}
.row3-r span {
width: 160rpx;
height: 58rpx;
border-radius: 58rpx;
border: solid 2rpx #1dbf45;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #1dbf45;
text-align: center;
line-height: 58rpx;
}