Initial Commit

This commit is contained in:
quantulr
2024-05-06 15:34:15 +08:00
commit e3a0666d5a
307 changed files with 28969 additions and 0 deletions

View File

@ -0,0 +1,171 @@
// pages/cartPay/cartPay.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
goods: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
//判断登录
wx.getStorage({
key: 'user',
success: user => {
wx.showLoading({
title: '加载中..',
})
wx.request({
url: app.globalData.ip + '/wisdommining/api/order/getStoresOrderDetail',
method: 'GET',
header: {
"content-type": "application/x-www-form-urlencoded",
},
data: {
userId: options.id,
orderNumber: options.orderNumber,
storesUserId:user.data.id
},
success: res => {
console.log(res)
wx.hideLoading()
if (res.data.code == 1) {
let goods = res.data.value;
let total = 0;
let numAll = 0;
if (goods.orderPayWay != 3) {
for (let i = 0; i < goods.goodsList.length; i++) {
total = total + parseFloat(goods.goodsList[i].wisdGoodsSpec.specBulyPrice == null ? goods.goodsList[i].wisdGoodsSpec.specPrice : goods.goodsList[i].wisdGoodsSpec.specBulyPrice) * goods.goodsList[i].goodsNum;
numAll = numAll + goods.goodsList[i].goodsNum;
goods.goodsList[i].price = goods.goodsList[i].wisdGoodsSpec.specBulyPrice == null ? goods.goodsList[i].wisdGoodsSpec.specPrice : goods.goodsList[i].wisdGoodsSpec.specBulyPrice;
}
} else {
total = 0;
numAll = 1
}
this.setData({
goods: goods,
total: total,
numAll: numAll
})
} else {
wx.showModal({
title: '提示!',
content: res.data.message,
showCancel: false,
success:s=>{
wx.navigateBack()
}
})
}
}
})
},
fail: e => {
wx.navigateTo({
url: '/pages/login/login',
})
}
})
},
pay(e) {
this.payM({
orderNumber: this.data.goods.orderNumber
})
},
//确认收货
confirm: function (e) {
wx.showModal({
title: '提示!',
content: '确认客户已提货吗?',
success: s => {
if (s.confirm) {
wx.showLoading({
title: '加载中..',
})
wx.request({
url: app.globalData.ip + '/wisdommining/api/order/confirmOrder',
method: 'POST',
header: {
"content-type": "application/x-www-form-urlencoded",
},
data: {
orderId: this.data.goods.id
},
success: res => {
console.log(res)
wx.hideLoading()
if (res.data.code == 1) {
wx.showToast({
title: '操作成功~',
icon: 'none',
success: ss => {
setTimeout(() => {
wx.navigateBack()
}, 1000);
}
})
} else {
wx.showModal({
title: '确认失败!',
content: res.data.message,
showCancel: false,
})
}
}
})
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "订单详情"
}

View File

@ -0,0 +1,88 @@
<view style="height:34rpx"></view>
<view class="address display_J_S">
<image src="/icon/order-addrass.png"></image>
<view class="address-cont">{{goods.orderAddress}}</view>
</view>
<view class="goods">
<view class="cont display_J_B" wx:for='{{goods.goodsList}}' wx:key='index'>
<view class="cont-l">
<image src="{{item.goodsPhoto}}"></image>
</view>
<view class="cont-m">
<view class="name GStitleOne">{{item.goodsName}}</view>
<view class="specs" wx:if="{{goods.orderPayWay!=3}}">规格:{{item.wisdGoodsSpec.specName}}</view>
<view class="price" wx:if="{{goods.orderPayWay!=3}}">
¥{{item.wisdGoodsSpec.specBulyPrice==null?item.wisdGoodsSpec.specPrice:item.wisdGoodsSpec.specBulyPrice}}
<text>¥{{item.wisdGoodsSpec.originalPrice}}</text>
</view>
<view class="price" wx:if="{{goods.orderPayWay==3}}">¥0</view>
</view>
<view class="cont-r">x{{item.goodsNum}}</view>
</view>
</view>
<view class="data">
<view class="data-t display_J_B display_A_C">
<view class="t-l">商品合计</view>
<view class="t-r t-r__1">¥{{total}}</view>
</view>
<view class="data-t display_J_B display_A_C">
<view class="t-l">运费</view>
<view class="t-r t-r__2">{{goods.orderPick==1?'自提':goods.orderFreight==0?'包邮':'¥'+goods.orderFreight}}</view>
</view>
<view class="data-t display_J_B display_A_C">
<view class="t-l">优惠</view>
<view class="t-r t-r__3 display_A_C" wx:if='{{goods.orderPayWay!=5&&goods.orderPayWay!=4&&goods.orderPayWay!=3}}'>
<text>无</text></view>
<view class="t-r t-r__3 display_A_C" wx:if='{{goods.orderPayWay==5||goods.orderPayWay==4}}'>
<text>{{goods.orderPayWay==4?'现金券':goods.orderPayWay==5?'折扣券':''}}</text>-¥{{goods.orderOtherPay}}</view>
<view class="t-r t-r__3 display_A_C" wx:if='{{goods.orderPayWay==3}}'><text>套餐券</text>-1</view>
</view>
<view class="data-t display_J_B">
<view class="t-l" style="line-height: 32rpx;">备注</view>
<view class="t-r t-r__2 note">{{goods.orderRemark==''?'无':goods.orderRemark}}</view>
</view>
<view class="data-t display_J_B display_A_C">
<view class="t-l">实际支付</view>
<view class="t-r t-r__4">¥{{goods.orderActualPay==null?'0':goods.orderActualPay}}</view>
</view>
</view>
<view class="order-data">
<view class="order display_J_B display_A_C">
<view class="order-l">支付方式</view>
<view class="order-r">
{{goods.orderPayWay==1?'微信支付':goods.orderPayWay==2?'积分支付':goods.orderPayWay==3?'套餐券':goods.orderPayWay==4?'微信支付+现金券':goods.orderPayWay==1?'微信支付+折扣券':''}}
</view>
</view>
<view class="order display_J_B display_A_C" wx:if="{{goods.status==2||goods.status==3||goods.status==4}}">
<view class="order-l">支付时间</view>
<view class="order-r">{{goods.orderPayTime}}</view>
</view>
<view class="order display_J_B display_A_C" wx:if="{{goods.status==2||goods.status==3||goods.status==4}}">
<view class="order-l">自提时间</view>
<view class="order-r">{{goods.orderPickTime}}</view>
</view>
<view class="order display_J_B display_A_C">
<view class="order-l">订单编号</view>
<view class="order-r">{{goods.orderNumber}}</view>
</view>
<view class="order display_J_B display_A_C">
<view class="order-l">物流单号</view>
<view class="order-r">暂无</view>
</view>
<view class="order display_J_B display_A_C">
<view class="order-l">联系方式</view>
<view class="order-r">{{goods.userPhone}}</view>
</view>
</view>
<!-- 自提 -->
<view style="height:100rpx;"></view>
<view class="b-btn display_J_E display_A_C">
<!-- <view class="btn" wx:if="{{goods.status==4}}" catchtap="del">删除订单</view> -->
<view class="btn btn-red" catchtap="confirm" wx:if="{{goods.status==2}}">确认提货</view>
</view>

View File

@ -0,0 +1,332 @@
/* pages/cartPay/cartPay.wxss */
page{
background-color: #f5f5f5;
}
.logistics-all{
width: 100%;
background-color: #fff;
border-radius: 20rpx 20rpx 0 0;
}
.logistics{
width: 690rpx;
margin:0 auto;
border-bottom: #e5e5e5 1rpx solid;
height: 125rpx;
}
.logistics-l,.logistics-r{
height: 100%;
}
.logistics-l image{
width: 53rpx;
height: 39rpx;
margin-right: 30rpx;
}
.logistics-l__1{
font-size: 32rpx;
color: #ee7b1e;
margin-right: 44rpx;
}
.logistics-l__2{
font-size: 32rpx;
color: #333333;
}
.logistics-r image{
height: 32rpx;
width: 32rpx;
}
.address{
width: 690rpx;
padding:35rpx 30rpx 20rpx;
background-color: #ffffff;
border-radius: 0 0 20rpx 20rpx;
}
.address image{
width: 46rpx;
height: 46rpx;
margin:0 40rpx 0 0;
}
.address-cont{
font-size: 32rpx;
line-height: 42rpx;
color: #333333;
width: 550rpx;
}
.goods{
width: 690rpx;
padding: 0 30rpx;
background-color: #ffffff;
border-radius: 20rpx;
margin: 30rpx 0;
}
.cont{
padding: 30rpx 0;
border-bottom: 1rpx #dcdcdc solid;
}
.cont:last-child{
border-bottom: none;
}
.cont-l image{
width: 160rpx;
height: 160rpx;
}
.cont-m{
width: 400rpx;
padding: 10rpx 0;
display: flex;
flex-wrap: wrap;
align-content: space-between;
}
.name{
width:100%;
font-size: 28rpx;
color: #333333;
}
.specs{
width:100%;
font-size: 24rpx;
color: #999999;
}
.price{
width:100%;
font-size: 36rpx;
color: #ee7b1e;
}
.price text{
font-size: 24rpx;
color: #999999;
text-decoration: line-through;
margin-left: 11rpx;
}
.cont-r{
display: flex;
align-items : flex-end;
font-size: 32rpx;
color: #0b0b0b;
height: 130rpx;
}
.data{
width: 690rpx;
padding:10rpx 30rpx 0;
background-color: #ffffff;
border-radius: 20rpx;
}
.data-t:last-child{
padding-top:20rpx;
border-top: 1rpx #d9d9d9 solid;
margin-top: 30rpx;
}
.t-l{
font-size: 28rpx;
letter-spacing: 1rpx;
color: #444444;
}
.t-r{
font-size: 28rpx;
letter-spacing: 1rpx;
line-height: 70rpx;
}
.t-r__1{
color: #333333;
font-weight: bold;
}
.t-r__2{
color: #999999;
}
.note{
width: 500rpx;
line-height:32rpx;
text-align:right;
}
.t-r__3{
color: #ee7b1e;
}
.t-r__3 text{
color: #333333;
}
.t-r__4{
color: #333333;
font-weight: bold;
font-size: 34rpx;
}
.t-r input{
font-size: 28rpx;
letter-spacing: 1rpx;
color: #999999;
width: 500rpx;
text-align: right;
line-height: 70rpx;
height: 70rpx;
border: none;
}
.t-r image{
width: 30rpx;
height: 30rpx;
}
.pay-type{
width: 690rpx;
padding: 0 30rpx;
height: 100rpx;
background-color: #ffffff;
border-radius: 20rpx;
margin-top:20rpx;
}
.pay-type__l{
height: 100%;
font-size: 28rpx;
color: #333333;
}
.pay-type__l image{
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
}
.pay-type__r{
height: 100%;
}
.pay-type__r image{
width: 30rpx;
height: 30rpx;
}
.pay{
width: 690rpx;
padding: 0 30rpx;
height: 100rpx;
background-color: #ffffff;
line-height: 56rpx;
position: fixed;
bottom: 0;
left: 0;
}
.pay-l i{
padding-right: 32rpx;
font-size: 28rpx;
color: #333333;
}
.pay-l{
padding-left: 90rpx;
font-size: 28rpx;
color: #ee7b1e;
}
.pay-l text{
font-size: 40rpx;
color: #ee7b1e;
}
.pay-r{
width: 180rpx;
height: 56rpx;
line-height: 56rpx;
background-color: #ee7b1e;
border-radius: 28rpx;
font-size: 28rpx;
color: #ffffff;
text-align: center;
}
.pay-m{
width: 690rpx;
height: 64rpx;
line-height: 64rpx;
background-color: #ee7b1e;
border-radius:32rpx;
font-size: 28rpx;
color: #ffffff;
text-align: center;
}
.order-data{
width: 690rpx;
padding: 0 30rpx;
background-color: #ffffff;
border-radius: 20rpx;
margin: 30rpx 0;
}
.order{
width: 100%;
height: 100rpx;
border-bottom: 1rpx #eeeeee solid;
}
.order:first-child{
border-radius: 20rpx 20rpx 0px 0px;
}
.order:last-child{
border-radius: 0px 0px 20rpx 20rpx;
border-bottom:none;
}
.order-l{
font-size: 28rpx;
letter-spacing: 1rpx;
color: #333333;
}
.order-r{
font-size: 24rpx;
letter-spacing: 1rpx;
color: #999999;
}
.code{
width: 750rpx;
height: 240rpx;
padding-top: 30rpx;
background-color: #ffffff;
border-radius: 20rpx;
}
.code-img{
width: 140rpx;
height: 140rpx;
margin: 0 auto;
}
.code image{
width: 140rpx;
height: 140rpx;
}
.code-cont{
font-size: 28rpx;
color: #999999;
text-align: center;
margin-top: 35rpx;
}
.b-btn{
padding: 0 30rpx;
width: 690rpx;
height: 100rpx;
background-color: #ffffff;
position: fixed;
bottom: 0;
left: 0;
}
.btn{
width: 130rpx;
height: 48rpx;
border-radius: 24rpx;
border: solid 1rpx #a0a0a0;
font-size: 24rpx;
color: #999999;
line-height: 48rpx;
text-align: center;
margin-left: 40rpx;
}
.b-btn .btn-red{
border: solid 1rpx #ee7b1e;
color: #ee7b1e;
}
.djs{
font-size: 28rpx;
color: #333333;
width: 750rpx;
height: 80rpx;
background-color: #f7e0cd;
text-align: center;
line-height: 80rpx;
}
.djs text{
color: #ff372d;
margin-left: 10rpx;
}