first commit
This commit is contained in:
1
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
6cf74d7a-c223-48ed-a046-127eeae7bc1e
|
||||
168
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.js
Normal file
168
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.js
Normal 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 () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
114
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxml
Normal file
114
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxml
Normal 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" />
|
||||
173
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxss
Normal file
173
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxss
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user