Commit 017b20be by liimin

refactor(order): 重构订单组件并添加硬编码数据

- 重新设计了订单项的布局和样式
- 添加了硬编码的订单列表数据
- 优化了订单状态和售后服务的显示逻辑
- 调整了订单详情的展示方式
- 统一了按钮样式和交互
1 parent f3db219d
Showing 28 changed files with 1684 additions and 34 deletions
...@@ -10,7 +10,7 @@ import utils from "./utils/index"; ...@@ -10,7 +10,7 @@ import utils from "./utils/index";
// 埋点 有需要再引入 // 埋点 有需要再引入
// import './utils/track/Track' // import './utils/track/Track'
/**分享 */ /**分享 */
import '~/utils/share' import "~/utils/share";
App({ App({
onLaunch(options) { onLaunch(options) {
getUpdateManager(); getUpdateManager();
...@@ -20,7 +20,7 @@ App({ ...@@ -20,7 +20,7 @@ App({
...utils, ...utils,
api, api,
router, router,
isLogin:false, isLogin: false,
storage: new utils.cache.Storage(), storage: new utils.cache.Storage(),
}; };
// 存储设备信息 // 存储设备信息
...@@ -36,9 +36,9 @@ App({ ...@@ -36,9 +36,9 @@ App({
goodsPageParam: { goodsPageParam: {
appearance: 1, appearance: 1,
pageSize: 0, pageSize: 0,
pageCount: 3 pageCount: 3,
}, },
goodsLoaded: false, goodsLoaded: false,
goodsCommodityList: [] goodsCommodityList: [],
}, },
}); });
...@@ -4,10 +4,11 @@ page { ...@@ -4,10 +4,11 @@ page {
background-color: #F9F7F7 !important; background-color: #F9F7F7 !important;
color: #282829; color: #282829;
font-size: 28rpx; font-size: 28rpx;
--themeColor: #8A303A; --themeColor: #FC5B32;
--btnColor: #8A303A; --btnColor: #FC8A32;
--borderRadius: 8rpx; --borderRadius: 8rpx;
--margin: 32rpx; --margin: 32rpx;
--
/* 兼容 IOS<11.2 先constant再env */ /* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom: constant(safe-area-inset-bottom); --constantSafeAreaInsetBottom: constant(safe-area-inset-bottom);
/* 兼容 IOS>11.2 */ /* 兼容 IOS>11.2 */
......
import { ORDER_LIST } from "~/constants/mine.js";
Component({
properties: {
padding_bottom: {
type: Number,
value: 0,
},
// tab: {
// type: Array,
// value: [],
// },
tabIndex: {
type: Number,
value: 0,
},
keyword: {
type: String,
value: "",
},
},
data: {
tab: Object.freeze(ORDER_LIST.map((item) => item.text)),
},
methods: {
navbarReady(e) {
wx.p.wxApi.getViewInfo(".tab", (res) => {
console.log("🚀 ~ navbarReady ~ res:", e)
this.setData({
padding_bottom: e.detail.height,
margin_top: e.detail.height + res.height,
});
});
},
back() {
this.triggerEvent("back");
},
changeTab(e) {
this.triggerEvent("changeTab", e.detail);
},
search(e) {
this.triggerEvent("search", e.detail);
},
clear() {
this.triggerEvent("clear");
},
input(e) {
this.triggerEvent("input", e.detail);
},
blur(e) {
this.triggerEvent("blur", e.detail);
},
},
});
{
"component": true,
"usingComponents": {
"tab": "/components/Tab/Tab"
}
}
\ No newline at end of file \ No newline at end of file
/* packageMine/pages/order/index/index.wxss */
.sticky-box {
background-color: #F9F7F7;
}
.tab {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #F9F7F7;
z-index: 2;
transition: all 0.4s;
}
.navigation {
width: 100%;
height: 100%;
position: relative;
}
.navigation .back {
width: 64rpx;
height: 64rpx;
background: rgba(255, 255, 255, 0.5);
border-radius: var(--margin);
position: absolute;
left: 20rpx;
}
.navigation .back .icon {
width: 36rpx;
height: 36rpx;
}
.search-box {
position: absolute;
left: 80rpx;
width: 420rpx;
height: 72rpx;
background: #F9F7F7;
border-radius: 36rpx;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 16rpx 0 var(--margin);
}
.search-box .icon {
width: 40rpx;
height: 100%;
}
.search-box .input {
width: calc(100% - 98rpx);
}
.search-box .clear-box {
width: 58rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.search-box .clear-box .clear {
width: 32rpx;
height: 32rpx;
opacity: 0.7;
}
.placeholder-class {
color: #c8c9cc;
}
.layout {
padding: 24rpx var(--margin) 40rpx;
}
.layout .item {
position: relative;
padding-left: 24rpx;
margin-bottom: 20rpx;
background-color: #fff;
box-sizing: border-box;
border-radius: var(--borderRadius);
display: flex;
flex-direction: column;
}
.layout .item .top {
height: 82rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 24rpx;
position: relative;
}
.delivery-icon {
position: absolute;
width: 106rpx;
height: 80rpx;
left: 366rpx;
bottom: 0;
}
.layout .item .top .name {
width: 366rpx;
}
.layout .item .content-top {
border-top: 2rpx solid #eff0f2;
}
.layout .item .content {
border-top: 2rpx solid #eff0f2;
border-bottom: 2rpx solid #eff0f2;
}
.content-bottom {
border-bottom: 2rpx solid #eff0f2;
}
.layout .item .goods {
height: 208rpx;
padding: 24rpx 24rpx 24rpx 0;
box-sizing: border-box;
display: flex;
}
.addTo {
border-bottom: 2rpx solid #eff0f2;
}
.layout .item .goods .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
position: absolute;
bottom: 0;
right: 0;
}
.layout .item .goods .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.layout .item .icon {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
border-radius: 8rpx;
overflow: hidden;
}
.background-X {
background-color: rgb(244, 244, 244);
}
.layout .item .info {
width: calc(100% - 180rpx);
height: 160rpx;
display: flex;
flex-direction: column;
position: relative;
}
.layout .item .info .info-top,
.layout .item .info .info-bottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.layout .item .info .info-top .price {
color: var(--btnColor);
font-size: 36rpx;
letter-spacing: -2rpx;
font-weight: 500;
flex-shrink: 0;
}
.layout .item .info .info-top .price .unit {
font-size: 24rpx;
}
.layout .item .info .info-bottom {
margin-top: 4rpx;
font-size: 24rpx;
color: #707071;
}
.layout .item .info .info-bottom .number {
margin-left: auto;
}
.layout .item .info .info-bottom .specification {
color: #b1b1b3;
}
.layout .item .status {
color: #b1b1b3;
font-size: 24rpx;
color: #282829;
}
.layout .item .bottom {
height: 80rpx;
display: flex;
align-items: center;
font-size: 24rpx;
color: #656566;
}
.layout .item .bottom .price {
color: var(--btnColor);
font-weight: 500;
}
.layout .item .btn-box {
position: absolute;
right: 24rpx;
bottom: 16rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.layout .item .btn-box .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
}
.layout .item .btn-box .pay {
background-color: var(--btnColor);
color: #fff;
border-color: var(--btnColor);
}
.layout .item .btn-box .empty{
color: var(--btnColor);
background-color: #fff;
}
.layout .item .btn-box .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.userProfile {
background-color: #fff;
font-size: 24rpx;
margin: 0;
padding: 0;
font-weight: 500;
line-height: 46rpx;
}
.layout .coupon-item {
height: 202rpx;
background: #fefffe;
border-radius: 8rpx;
margin-bottom: 36rpx;
padding: 20rpx;
box-sizing: border-box;
position: relative;
}
.layout .coupon-item .orderPrices {
position: absolute;
color: var(--btnColor);
font-size: 48rpx;
right: 32rpx;
}
.layout .coupon-item .orderPrices text {
font-size: 36rpx;
}
.layout .coupon-item .icon {
width: 162rpx;
height: 162rpx;
margin-right: 20rpx;
}
.layout .coupon-item .info {
width: 360rpx;
height: 100%;
color: #b1b1b3;
font-size: 24rpx;
}
.layout .coupon-item .info .name {
font-size: 28rpx;
font-weight: 500;
color: #282829;
}
.layout .coupon-item .info .order-btn {
width: 138rpx;
height: 48rpx;
background: var(--btnColor);
border-radius: 24rpx;
margin-top: 40rpx;
color: #ffffff;
font-size: 24rpx;
}
.imageHeight {
height: 99rpx !important;
}
.imageStraight {
width: 92rpx;
height: 92rpx;
border-radius: 50%;
}
\ No newline at end of file \ No newline at end of file
<view class="sticky-box">
<navigation-bar custom bindnavbarReady="navbarReady" page-title="我的订单">
<view class="navigation">
<view class="back text-center y-center" bindtap="back">
<glsx-image webp src="mall/back.png" class="icon"></glsx-image>
</view>
<view class="search-box y-center">
<view class="icon text-center">
<icon type="search" size="16"></icon>
</view>
<input type="text" placeholder="搜索" value="{{keyword}}" class="input" confirm-type="search" bindconfirm="search" bindinput="input" bindblur="blur" />
<block wx:if="{{keyword}}">
<view class="clear-box" bindtap="clear">
<view class="sprite-icon icon-clear"></view>
</view>
</block>
</view>
</view>
</navigation-bar>
<view class="tab" style="top:{{padding_bottom }}px;">
<tab tab="{{tab}}" bindclick="changeTab" index="{{tabIndex}}"></tab>
</view>
</view>
<block wx:if="{{margin_top}}">
<view class="layout isFullSucreen" style="margin-top:{{margin_top}}px;">
</view>
</block>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ Component({ ...@@ -4,7 +4,7 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
item: Object
}, },
/** /**
......
/* packageMine/pages/order/components/OrderItem/OrderItem.wxss */
\ No newline at end of file \ No newline at end of file
/* packageMine/pages/order/index/index.wxss */
.sticky-box {
background-color: #F9F7F7;
}
.tab {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #F9F7F7;
z-index: 2;
transition: all 0.4s;
}
.navigation {
width: 100%;
height: 100%;
position: relative;
}
.navigation .back {
width: 64rpx;
height: 64rpx;
background: rgba(255, 255, 255, 0.5);
border-radius: var(--margin);
position: absolute;
left: 20rpx;
}
.navigation .back .icon {
width: 36rpx;
height: 36rpx;
}
.search-box {
position: absolute;
left: 80rpx;
width: 420rpx;
height: 72rpx;
background: #F9F7F7;
border-radius: 36rpx;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 16rpx 0 var(--margin);
}
.search-box .icon {
width: 40rpx;
height: 100%;
}
.search-box .input {
width: calc(100% - 98rpx);
}
.search-box .clear-box {
width: 58rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.search-box .clear-box .clear {
width: 32rpx;
height: 32rpx;
opacity: 0.7;
}
.placeholder-class {
color: #c8c9cc;
}
.layout {
padding: 24rpx var(--margin) 40rpx;
}
.layout .item {
position: relative;
padding-left: 24rpx;
margin-bottom: 20rpx;
background-color: #fff;
box-sizing: border-box;
border-radius: var(--borderRadius);
display: flex;
flex-direction: column;
}
.layout .item .top {
height: 82rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 24rpx;
position: relative;
}
.delivery-icon {
position: absolute;
width: 106rpx;
height: 80rpx;
left: 366rpx;
bottom: 0;
}
.layout .item .top .name {
width: 366rpx;
}
.layout .item .content-top {
border-top: 2rpx solid #eff0f2;
}
.layout .item .content {
border-top: 2rpx solid #eff0f2;
border-bottom: 2rpx solid #eff0f2;
}
.content-bottom {
border-bottom: 2rpx solid #eff0f2;
}
.layout .item .goods {
height: 208rpx;
padding: 24rpx 24rpx 24rpx 0;
box-sizing: border-box;
display: flex;
}
.addTo {
border-bottom: 2rpx solid #eff0f2;
}
.layout .item .goods .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
position: absolute;
bottom: 0;
right: 0;
}
.layout .item .goods .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.layout .item .icon {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
border-radius: 8rpx;
overflow: hidden;
}
.background-X {
background-color: rgb(244, 244, 244);
}
.layout .item .info {
width: calc(100% - 180rpx);
height: 160rpx;
display: flex;
flex-direction: column;
position: relative;
}
.layout .item .info .info-top,
.layout .item .info .info-bottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.layout .item .info .info-top .price {
color: var(--btnColor);
font-size: 36rpx;
letter-spacing: -2rpx;
font-weight: 500;
flex-shrink: 0;
}
.layout .item .info .info-top .price .unit {
font-size: 24rpx;
}
.layout .item .info .info-bottom {
margin-top: 4rpx;
font-size: 24rpx;
color: #707071;
}
.layout .item .info .info-bottom .number {
margin-left: auto;
}
.layout .item .info .info-bottom .specification {
color: #b1b1b3;
}
.layout .item .status {
color: #b1b1b3;
font-size: 24rpx;
color: #282829;
}
.layout .item .bottom {
height: 80rpx;
display: flex;
align-items: center;
font-size: 24rpx;
color: #656566;
}
.layout .item .bottom .price {
color: var(--btnColor);
font-weight: 500;
}
.layout .item .btn-box {
position: absolute;
right: 24rpx;
bottom: 16rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.layout .item .btn-box .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
}
.layout .item .btn-box .pay {
background-color: var(--btnColor);
color: #fff;
border-color: var(--btnColor);
}
.layout .item .btn-box .empty{
color: var(--btnColor);
background-color: #fff;
}
.layout .item .btn-box .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.userProfile {
background-color: #fff;
font-size: 24rpx;
margin: 0;
padding: 0;
font-weight: 500;
line-height: 46rpx;
}
.layout .coupon-item {
height: 202rpx;
background: #fefffe;
border-radius: 8rpx;
margin-bottom: 36rpx;
padding: 20rpx;
box-sizing: border-box;
position: relative;
}
.layout .coupon-item .orderPrices {
position: absolute;
color: var(--btnColor);
font-size: 48rpx;
right: 32rpx;
}
.layout .coupon-item .orderPrices text {
font-size: 36rpx;
}
.layout .coupon-item .icon {
width: 162rpx;
height: 162rpx;
margin-right: 20rpx;
}
.layout .coupon-item .info {
width: 360rpx;
height: 100%;
color: #b1b1b3;
font-size: 24rpx;
}
.layout .coupon-item .info .name {
font-size: 28rpx;
font-weight: 500;
color: #282829;
}
.layout .coupon-item .info .order-btn {
width: 138rpx;
height: 48rpx;
background: var(--btnColor);
border-radius: 24rpx;
margin-top: 40rpx;
color: #ffffff;
font-size: 24rpx;
}
.imageHeight {
height: 99rpx !important;
}
.imageStraight {
width: 92rpx;
height: 92rpx;
border-radius: 50%;
}
\ No newline at end of file \ No newline at end of file
<!--packageMine/pages/order/components/OrderItem/OrderItem.wxml--> <view class="item" catchtap="jump" data-item="{{item}}">
<text>packageMine/pages/order/components/OrderItem/OrderItem.wxml</text> <view class="top">
<view class="delivery-icon" wx:if="{{item.orderSource != 5}}">
<glsx-image webp src="mine/order/deliveryType-{{item.deliveryType}}.png">
</glsx-image>
</view>
<view class="name text-hide">{{item.merchantName}}</view>
<!-- 订单状态 orderStatus(1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成)
售后订单状态 afterSaleStatus(1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败)
-->
<view class="status">{{item.afterSaleStatus ? afterSaleStatus[item.afterSaleStatus]
:statusEnum[item.orderStatus]}}</view>
</view>
<view class="content-top {{item.orderStatus == 5 || item.orderStatus == 8?'':'content-bottom'}}">
<block wx:for="{{item.orderGoods}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="goods {{item.orderStatus == 5 || item.orderStatus == 8?'addTo':''}}">
<view class="icon">
<image webp wx:if="{{item.orderSource == 5}}" src="{{item.activityBigImg}}"></image>
<image webp wx:else src="{{i.goodsImage}}"></image>
</view>
<view class="info">
<view class="info-top">
<view class="name text-hide">{{item.orderSource == 5 ? item.activityName: i.goodsName}}</view>
<view class="price">
<text class="unit">¥</text>
{{item.orderSource == 5 ? item.payPrice: (i.activityPrice ||i.retailPrice)}}
</view>
</view>
<view class="info-bottom">
<block wx:if="{{i.specificationData}}">
<view class="specification">{{i.specificationData}}</view>
</block>
<view class="number">
x{{item.orderSource == 5 ? 1: i.goodsNumber}}
</view>
</view>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length > 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="lookevaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="getUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="evaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</view>
</view>
</block>
</view>
<view class="bottom" wx:if="{{item.orderSource == 5}}">
共1件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<view class="bottom" wx:else>
共{{item.goodsNumber}}件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<!-- 1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成 -->
<!-- 售后状态 1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败 -->
<block wx:if="{{item.orderStatus != 3}}">
<view class="btn-box">
<block wx:if="{{!item.afterSaleStatus}}">
<block wx:if="{{item.orderStatus == 1}}">
<view class="btn pay" catchtap="cancelPay" data-order-code="{{item.orderCode}}">取消付款</view>
<block wx:if="{{item.orderSource != 4}}">
<view class="btn pay" catchtap="pay" data-order-code="{{item.orderCode}}">去支付</view>
</block>
</block>
<block wx:if="{{item.orderSource==5 && (item.orderStatus == 2 || item.orderStatus == 7)}}">
<view class="btn pay" data-item="{{item}}" bind:tap="toGoldDetail">查看详情</view>
</block>
<block wx:elif="{{item.orderStatus > 2 && item.orderStatus < 9}}">
<!-- deliveryType 结算方式(1:到店核销,2:快递发货) -->
<block wx:if="{{item.deliveryType == 2 && item.orderStatus == 4}}">
<view class="btn confirm" catchtap="confirmReceipt" data-order-code="{{item.orderCode}}">确认收货
</view>
</block>
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view class="btn" catchtap="afterSale" data-item="{{item}}" wx:if="{{!(item.relatedUserCouponStatus == 2 || item.relatedUserCouponStatus == 3)}}">申请售后
</view>
</block>
</block>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length == 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="lookevaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="getUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="evaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</block>
<block wx:else>
<block wx:if="{{item.afterSaleStatus == 1}}">
<view class="btn pay" catchtap="cancelOrder" data-order-code="{{item.orderCode}}">取消售后</view>
</block>
<view class="btn" data-item="{{item}}" catchtap="afterSaleDetail">售后详情</view>
</block>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
Component({
properties: {
list: {
type: Array,
value: []
},
listFlag: {
type: Boolean,
value: false
},
nothing: {
type: Boolean,
value: false
},
margin_top: {
type: Number,
value: 0
},
statusEnum: {
type: Object,
value: {}
},
afterSaleStatus: {
type: Object,
value: {}
},
cardStatus: {
type: Object,
value: {}
},
reStatus: {
type: Object,
value: {}
},
hasUserInfo: {
type: Boolean,
value: true
}
},
methods: {
// Type One Events
onJump(e) {
this.triggerEvent('jump', e.detail);
},
onCancelPay(e) {
this.triggerEvent('cancelPay', e.detail);
},
onPay(e) {
this.triggerEvent('pay', e.detail);
},
onToGoldDetail(e) {
this.triggerEvent('toGoldDetail', e.detail);
},
onConfirmReceipt(e) {
this.triggerEvent('confirmReceipt', e.detail);
},
onAfterSale(e) {
this.triggerEvent('afterSale', e.detail);
},
onLookevaluate(e) {
this.triggerEvent('lookevaluate', e.detail);
},
onGetUserProfile(e) {
this.triggerEvent('getUserProfile', e.detail);
},
onEvaluate(e) {
this.triggerEvent('evaluate', e.detail);
},
onCancelOrder(e) {
this.triggerEvent('cancelOrder', e.detail);
},
onAfterSaleDetail(e) {
this.triggerEvent('afterSaleDetail', e.detail);
},
// Type Two/Three Events
onToSaleDetailPage(e) {
this.triggerEvent('toSaleDetailPage', e.detail);
},
onToSaleApplyPage(e) {
this.triggerEvent('toSaleApplyPage', e.detail);
},
onToComfirmPage(e) {
this.triggerEvent('toComfirmPage', e.detail);
},
onToCheckCard(e) {
this.triggerEvent('toCheckCard', e.detail);
},
onToSaleApplyPackage(e) {
this.triggerEvent('toSaleApplyPackage', e.detail);
},
onToPackageDetail(e) {
this.triggerEvent('toPackageDetail', e.detail);
},
onToCheckPackage(e) {
this.triggerEvent('toCheckPackage', e.detail);
},
// Type Four Events
onBoutiqueJump(e) {
this.triggerEvent('boutiqueJump', e.detail);
},
// Type Five Events
onJumpPlatformShop(e) {
this.triggerEvent('jumpPlatformShop', e.detail);
},
onCancelPlatformOrder(e) {
this.triggerEvent('cancelPlatformOrder', e.detail);
},
onToPayOrder(e) {
this.triggerEvent('toPayOrder', e.detail);
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"order-type-one": "/packageMine/pages/order/components/OrderTypeOne/OrderTypeOne",
"order-type-two-three": "/packageMine/pages/order/components/OrderTypeTwoThree/OrderTypeTwoThree",
"order-type-four": "/packageMine/pages/order/components/OrderTypeFour/OrderTypeFour",
"order-type-five": "/packageMine/pages/order/components/OrderTypeFive/OrderTypeFive"
}
}
\ No newline at end of file \ No newline at end of file
<block wx:if="{{margin_top}}">
<view class="layout isFullSucreen" style="margin-top:{{margin_top}}px;">
<block wx:if="{{listFlag}}">
<block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index">
<!-- orderClassify 订单类型(1.订单;2:会员权益订单;3:门店服务订单;4:精品升级订单;5:平台商城订单) -->
<block wx:if="{{item.orderClassify == 1}}">
<order-type-one
item="{{item}}"
statusEnum="{{statusEnum}}"
afterSaleStatus="{{afterSaleStatus}}"
hasUserInfo="{{hasUserInfo}}"
bind:jump="onJump"
bind:cancelPay="onCancelPay"
bind:pay="onPay"
bind:toGoldDetail="onToGoldDetail"
bind:confirmReceipt="onConfirmReceipt"
bind:afterSale="onAfterSale"
bind:lookevaluate="onLookevaluate"
bind:getUserProfile="onGetUserProfile"
bind:evaluate="onEvaluate"
bind:cancelOrder="onCancelOrder"
bind:afterSaleDetail="onAfterSaleDetail"
/>
</block>
<block wx:if="{{item.orderClassify == 2 || item.orderClassify == 3}}">
<order-type-two-three
item="{{item}}"
cardStatus="{{cardStatus}}"
reStatus="{{reStatus}}"
bind:toSaleDetailPage="onToSaleDetailPage"
bind:toSaleApplyPage="onToSaleApplyPage"
bind:toComfirmPage="onToComfirmPage"
bind:toCheckCard="onToCheckCard"
bind:toSaleApplyPackage="onToSaleApplyPackage"
bind:toPackageDetail="onToPackageDetail"
bind:toCheckPackage="onToCheckPackage"
/>
</block>
<block wx:if="{{item.orderClassify == 4}}">
<order-type-four
item="{{item}}"
hasUserInfo="{{hasUserInfo}}"
bind:boutiqueJump="onBoutiqueJump"
/>
</block>
<block wx:if="{{item.orderClassify == 5}}">
<order-type-five
item="{{item}}"
statusEnum="{{statusEnum}}"
afterSaleStatus="{{afterSaleStatus}}"
bind:jumpPlatformShop="onJumpPlatformShop"
bind:cancelPlatformOrder="onCancelPlatformOrder"
bind:toPayOrder="onToPayOrder"
/>
</block>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing to-bottom"></view>
</block>
</block>
<block wx:else>
<view class="list-nothing">
暂无相关内容
</view>
</block>
</block>
</view>
</block>
\ No newline at end of file \ No newline at end of file
Component({
properties: {
item: {
type: Object,
value: {}
},
statusEnum: {
type: Object,
value: {}
},
afterSaleStatus: {
type: Object,
value: {}
}
},
methods: {
jumpPlatformShop(e) {
this.triggerEvent('jumpPlatformShop', e.currentTarget.dataset);
},
cancelPlatformOrder(e) {
this.triggerEvent('cancelPlatformOrder', e.currentTarget.dataset);
},
toPayOrder(e) {
this.triggerEvent('toPayOrder', e.currentTarget.dataset);
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="item" catchtap="jumpPlatformShop" data-item="{{item}}" data-url="orderDetail/orderDetail">
<view class="top">
<view class="name text-hide">平台特供</view>
<!-- 订单状态 orderStatus(1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成)
售后订单状态 afterSaleStatus(1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败)
-->
<view class="status">{{item.afterSaleStatus ? afterSaleStatus[item.afterSaleStatus]
:statusEnum[item.orderStatus]}}</view>
</view>
<view class="content-top {{item.orderStatus == 5 || item.orderStatus == 8?'':'content-bottom'}}">
<block wx:for="{{item.orderGoods}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="goods {{item.orderStatus == 5 || item.orderStatus == 8?'addTo':''}}">
<view class="icon">
<image webp src="{{i.goodsImage}}"></image>
</view>
<view class="info">
<view class="info-top">
<view class="name text-hide">
<text>{{i.goodsName}}</text>
</view>
<view class="price">
<text class="unit">¥</text>
{{i.retailPrice}}
</view>
</view>
<view class="info-bottom">
<block wx:if="{{i.specificationData}}">
<view class="specification">{{i.specificationData}}</view>
</block>
<view class="number">
x{{i.goodsNumber}}
</view>
</view>
</view>
</view>
</block>
</view>
<view class="bottom" wx:if="{{item.orderSource == 5}}">
共1件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<view class="bottom" wx:else>
共{{item.goodsNumber}}件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<!-- 1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成 -->
<!-- 售后状态 1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败 -->
<block wx:if="{{item.orderStatus != 3}}">
<view class="btn-box">
<block wx:if="{{!item.afterSaleStatus}}">
<block wx:if="{{item.orderStatus == 1}}">
<view class="btn" catchtap="cancelPlatformOrder" data-order-code="{{item.orderCode}}">取消订单</view>
<view class="btn pay empty" catchtap="toPayOrder" data-order-code="{{item.mainOrderCode}}">立即支付</view>
</block>
<block wx:elif="{{item.orderStatus > 2 && item.orderStatus < 9}}">
<block wx:if="{{item.orderStatus != 6 }}">
<view class="btn confirm" catchtap="jumpPlatformShop" data-item="{{item}}" data-url="orderDetail/orderDetail">查看物流
</view>
</block>
<block wx:if="{{item.platformOrderStatus == 1008 || item.platformOrderStatus == 1009}}">
<view class="btn" catchtap="jumpPlatformShop" data-item="{{item}}" data-url="applySale/index">售后
</view>
</block>
</block>
</block>
<block wx:else>
<view class="btn" catchtap="jumpPlatformShop" data-item="{{item}}" data-url="afterSaleDetail/index">售后</view>
</block>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
Component({
properties: {
item: {
type: Object,
value: {}
},
hasUserInfo: {
type: Boolean,
value: true
}
},
methods: {
boutiqueJump(e) {
this.triggerEvent('boutiqueJump', e.currentTarget.dataset);
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"glsx-image": "/miniprogram_npm/glsx-applet-component/Image/index"
}
}
\ No newline at end of file \ No newline at end of file
<view class="item">
<view class="top">
<view class="delivery-icon">
<glsx-image webp src="mine/order/boutique.png"></glsx-image>
</view>
<view class="name text-hide">{{item.merchantName}}</view>
</view>
<view class="content">
<view class="goods" wx:for="{{item.orderGoods}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="icon">
<!-- <image webp src="{{i.goodsImage}}"></image> -->
<image webp src="{{i.goodsImage}}"></image>
</view>
<view class="info">
<view class="info-top">
<view class="name text-hide">{{i.goodsName}}</view>
<view class="price">
<text class="unit">¥</text>
{{i.activityPrice ||i.retailPrice}}
</view>
</view>
<view class="info-bottom">
<block wx:if="{{i.specificationData}}">
<view class="specification">{{i.specificationData}}</view>
</block>
<view class="number">
x{{i.goodsNumber}}
</view>
</view>
</view>
</view>
</view>
<view class="bottom">
共{{item.goodsNumber}}件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<!-- !hasUserInfo -->
<block wx:if="{{!hasUserInfo}}">
<view class="btn-box">
<view class="btn confirm" catchtap="boutiqueJump" data-order-code="{{item.orderCode}}">评价</view>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
Component({
properties: {
item: {
type: Object,
value: {}
},
statusEnum: {
type: Object,
value: {}
},
afterSaleStatus: {
type: Object,
value: {}
},
hasUserInfo: {
type: Boolean,
value: true
}
},
methods: {
jump(e) {
this.triggerEvent('jump', e.currentTarget.dataset);
},
cancelPay(e) {
this.triggerEvent('cancelPay', e.currentTarget.dataset);
},
pay(e) {
this.triggerEvent('pay', e.currentTarget.dataset);
},
toGoldDetail(e) {
this.triggerEvent('toGoldDetail', e.currentTarget.dataset);
},
confirmReceipt(e) {
this.triggerEvent('confirmReceipt', e.currentTarget.dataset);
},
afterSale(e) {
this.triggerEvent('afterSale', e.currentTarget.dataset);
},
lookevaluate(e) {
this.triggerEvent('lookevaluate', e.currentTarget.dataset);
},
getUserProfile(e) {
this.triggerEvent('getUserProfile', e.currentTarget.dataset);
},
evaluate(e) {
this.triggerEvent('evaluate', e.currentTarget.dataset);
},
cancelOrder(e) {
this.triggerEvent('cancelOrder', e.currentTarget.dataset);
},
afterSaleDetail(e) {
this.triggerEvent('afterSaleDetail', e.currentTarget.dataset);
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"glsx-image": "/miniprogram_npm/glsx-applet-component/Image/index"
}
}
\ No newline at end of file \ No newline at end of file
<view class="item" catchtap="jump" data-item="{{item}}">
<view class="top">
<view class="delivery-icon" wx:if="{{item.orderSource != 5}}">
<glsx-image webp src="mine/order/deliveryType-{{item.deliveryType}}.png">
</glsx-image>
</view>
<view class="name text-hide">{{item.merchantName}}</view>
<!-- 订单状态 orderStatus(1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成)
售后订单状态 afterSaleStatus(1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败)
-->
<view class="status">{{item.afterSaleStatus ? afterSaleStatus[item.afterSaleStatus]
:statusEnum[item.orderStatus]}}</view>
</view>
<view class="content-top {{item.orderStatus == 5 || item.orderStatus == 8?'':'content-bottom'}}">
<block wx:for="{{item.orderGoods}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="goods {{item.orderStatus == 5 || item.orderStatus == 8?'addTo':''}}">
<view class="icon">
<image webp wx:if="{{item.orderSource == 5}}" src="{{item.activityBigImg}}"></image>
<image webp wx:else src="{{i.goodsImage}}"></image>
</view>
<view class="info">
<view class="info-top">
<view class="name text-hide">{{item.orderSource == 5 ? item.activityName: i.goodsName}}</view>
<view class="price">
<text class="unit">¥</text>
{{item.orderSource == 5 ? item.payPrice: (i.activityPrice ||i.retailPrice)}}
</view>
</view>
<view class="info-bottom">
<block wx:if="{{i.specificationData}}">
<view class="specification">{{i.specificationData}}</view>
</block>
<view class="number">
x{{item.orderSource == 5 ? 1: i.goodsNumber}}
</view>
</view>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length > 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="lookevaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="getUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="evaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</view>
</view>
</block>
</view>
<view class="bottom" wx:if="{{item.orderSource == 5}}">
共1件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<view class="bottom" wx:else>
共{{item.goodsNumber}}件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<!-- 1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成 -->
<!-- 售后状态 1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败 -->
<block wx:if="{{item.orderStatus != 3}}">
<view class="btn-box">
<block wx:if="{{!item.afterSaleStatus}}">
<block wx:if="{{item.orderStatus == 1}}">
<view class="btn pay" catchtap="cancelPay" data-order-code="{{item.orderCode}}">取消付款</view>
<block wx:if="{{item.orderSource != 4}}">
<view class="btn pay" catchtap="pay" data-order-code="{{item.orderCode}}">去支付</view>
</block>
</block>
<block wx:if="{{item.orderSource==5 && (item.orderStatus == 2 || item.orderStatus == 7)}}">
<view class="btn pay" data-item="{{item}}" bind:tap="toGoldDetail">查看详情</view>
</block>
<block wx:elif="{{item.orderStatus > 2 && item.orderStatus < 9}}">
<!-- deliveryType 结算方式(1:到店核销,2:快递发货) -->
<block wx:if="{{item.deliveryType == 2 && item.orderStatus == 4}}">
<view class="btn confirm" catchtap="confirmReceipt" data-order-code="{{item.orderCode}}">确认收货
</view>
</block>
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view class="btn" catchtap="afterSale" data-item="{{item}}" wx:if="{{!(item.relatedUserCouponStatus == 2 || item.relatedUserCouponStatus == 3)}}">申请售后
</view>
</block>
</block>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length == 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="lookevaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="getUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="evaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</block>
<block wx:else>
<block wx:if="{{item.afterSaleStatus == 1}}">
<view class="btn pay" catchtap="cancelOrder" data-order-code="{{item.orderCode}}">取消售后</view>
</block>
<view class="btn" data-item="{{item}}" catchtap="afterSaleDetail">售后详情</view>
</block>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
Component({
properties: {
item: {
type: Object,
value: {}
},
cardStatus: {
type: Object,
value: {}
},
reStatus: {
type: Object,
value: {}
}
},
methods: {
toSaleDetailPage(e) {
this.triggerEvent('toSaleDetailPage', e.currentTarget.dataset);
},
toSaleApplyPage(e) {
this.triggerEvent('toSaleApplyPage', e.currentTarget.dataset);
},
toComfirmPage(e) {
this.triggerEvent('toComfirmPage', e.currentTarget.dataset);
},
toCheckCard(e) {
this.triggerEvent('toCheckCard', e.currentTarget.dataset);
},
toSaleApplyPackage(e) {
this.triggerEvent('toSaleApplyPackage', e.currentTarget.dataset);
},
toPackageDetail(e) {
this.triggerEvent('toPackageDetail', e.currentTarget.dataset);
},
toCheckPackage(e) {
this.triggerEvent('toCheckPackage', e.currentTarget.dataset);
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"glsx-image": "/miniprogram_npm/glsx-applet-component/Image/index"
}
}
\ No newline at end of file \ No newline at end of file
<view class="item" wx:for="{{item.orderGoods}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="top">
<!-- <view class="delivery-icon">
<image webp src="../../../images/{{item.orderType == 1?'exchange':'combo'}}.png"></image>
</view> -->
<view class="name text-hide" wx:if="{{item.orderClassify == 3}}">{{item.merchantName}}</view>
<view class="name text-hide" wx:if="{{item.orderClassify == 2}}">平台特供</view>
<!-- 套餐状态 -->
<view class="status" wx:if="{{item.orderClassify == 3 && item.equityOrderStatus !== 4}}">
{{cardStatus[item.equityOrderStatus]}}</view>
<view class="status" wx:if="{{item.orderClassify == 3 && item.equityOrderStatus == 4}}">
{{reStatus[item.equityOrderStatus]}}</view>
<!-- 直冲卡卷状态 -->
<view class="status" wx:if="{{i.appearance == 2}}">{{reStatus[item.equityOrderStatus]}}</view>
<view class="status" wx:if="{{i.appearance == 1 && item.equityOrderStatus !== 3}}">
{{cardStatus[item.equityOrderStatus]}}</view>
<view class="status" wx:if="{{i.appearance == 1 && item.equityOrderStatus == 3}}">已收货</view>
</view>
<view class="content">
<view class="goods">
<view class="icon background-X">
<!-- <image webp src="{{i.goodsImage}}"></image> -->
<glsx-image webp wx:if="{{item.orderClassify == 3}}" src="mine/order/combo.png"></glsx-image>
<image webp wx:else src="{{i.goodsImage}}" class="{{i.appearance == 1 ?'imageHeight':'imageStraight'}}"></image>
</view>
<view class="info">
<view class="info-top">
<view class="name text-hide">{{i.goodsName}}</view>
<view class="price">
<text class="unit">¥</text>
{{i.activityPrice ||i.retailPrice}}
</view>
</view>
<view class="info-bottom">
<view class="specification">
<view wx:if="{{i.appearance==1}}">质保期至 {{item.expiredTime}}</view>
<view wx:if="{{i.appearance == 2}}">充值账号:{{i.rechargeNumber || ''}}</view>
<view wx:if="{{i.appearance == 2}}">购买日期 {{item.time}}</view>
<view wx:if="{{item.orderClassify == 3&&i.appearance==null}}">{{i.specificationData}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="bottom">
<view wx:if="{{i.appearance==2}}">订单编号 {{item.orderCode}}</view>
</view>
<view class="btn-box" wx:if="{{item.orderClassify == 2&&i.appearance == 1}}">
<view wx:if="{{item.equityOrderStatus==4 || item.equityOrderStatus==6}}" class="btn" data-item="{{item}}" bind:tap="toSaleDetailPage">售后详情</view>
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view wx:if="{{item.equityOrderStatus==2}}" data-item="{{item}}" bind:tap="toSaleApplyPage" class="btn">申请售后</view>
</block>
<view wx:if="{{item.equityOrderStatus==2 || item.equityOrderStatus==4}}" data-item="{{item}}" bind:tap="toComfirmPage" class="btn confirm">确认收货</view>
<view wx:if="{{item.equityOrderStatus!=6}}" class="btn pay" data-item="{{item}}" bind:tap="toCheckCard">
查看卡券</view>
</view>
<view class="btn-box" wx:if="{{item.orderClassify==3}}">
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view wx:if="{{item.orderClassify==3&&item.equityOrderStatus==2}}" data-item="{{item}}" bind:tap="toSaleApplyPackage" class="btn">申请售后</view>
</block>
<view wx:if="{{item.orderClassify==3&&item.equityOrderStatus==4}}" data-item="{{item}}" bind:tap="toPackageDetail" class="btn">售后详情</view>
<view wx:if="{{item.orderClassify==3&&item.equityOrderStatus!==4}}" class="btn pay" data-item="{{item}}" bind:tap="toCheckPackage">查看套餐</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -21,7 +21,157 @@ Page({ ...@@ -21,7 +21,157 @@ Page({
data: { data: {
pageNum: 1, pageNum: 1,
tab: Object.freeze(ORDER_LIST.map((item) => item.text)), tab: Object.freeze(ORDER_LIST.map((item) => item.text)),
list: [], // 硬编码的订单列表数据
list: [
{
"id": "1",
"orderCode": "20230915001",
"orderClassify": 1,
"orderSource": 1,
"orderStatus": 1,
"afterSaleStatus": null,
"merchantName": "精品商城",
"deliveryType": 2,
"payPrice": "199.00",
"goodsNumber": 1,
"createdDate": "2023-09-15 14:30:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
{
"id": "101",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "车载充电器",
"specificationData": "白色 1个装",
"retailPrice": "199.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-15 14:30:00"
}
]
},
{
"id": "2",
"orderCode": "20230914002",
"orderClassify": 1,
"orderSource": 2,
"orderStatus": 6,
"afterSaleStatus": null,
"merchantName": "汽车用品店",
"deliveryType": 2,
"payPrice": "599.00",
"goodsNumber": 2,
"createdDate": "2023-09-14 10:15:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
{
"id": "102",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "汽车脚垫",
"specificationData": "黑色 适配SUV",
"retailPrice": "399.00",
"activityPrice": "299.00",
"goodsNumber": 1,
"warrantyDate": "2024-09-14 10:15:00"
},
{
"id": "103",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "车载香水",
"specificationData": "海洋香型",
"retailPrice": "200.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-14 10:15:00"
}
]
},
{
"id": "3",
"orderCode": "20230910003",
"orderClassify": 1,
"orderSource": 3,
"orderStatus": 4,
"afterSaleStatus": null,
"merchantName": "汽车配件专营店",
"deliveryType": 2,
"payPrice": "899.00",
"goodsNumber": 1,
"createdDate": "2023-09-10 16:45:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
{
"id": "104",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "行车记录仪",
"specificationData": "1080P高清 夜视",
"retailPrice": "899.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-10 16:45:00"
}
]
},
{
"id": "4",
"orderCode": "20230905004",
"orderClassify": 1,
"orderSource": 1,
"orderStatus": 5,
"afterSaleStatus": null,
"merchantName": "精品商城",
"deliveryType": 1,
"payPrice": "1299.00",
"goodsNumber": 1,
"createdDate": "2023-09-05 09:20:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
{
"id": "105",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "车载导航",
"specificationData": "10英寸 安卓系统",
"retailPrice": "1299.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-05 09:20:00"
}
]
},
{
"id": "5",
"orderCode": "20230901005",
"orderClassify": 1,
"orderSource": 5,
"orderStatus": 9,
"afterSaleStatus": 2,
"merchantName": "权益商城",
"deliveryType": 2,
"payPrice": "299.00",
"goodsNumber": 1,
"createdDate": "2023-09-01 11:30:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"activityBigImg": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"activityName": "洗车服务券",
"orderGoods": [
{
"id": "106",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "洗车服务券",
"specificationData": "1次洗车服务",
"retailPrice": "299.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-01 11:30:00"
}
]
}
],
listFlag: true,
hasUserInfo: true, hasUserInfo: true,
}, },
navbarReady(e) { navbarReady(e) {
...@@ -143,7 +293,7 @@ Page({ ...@@ -143,7 +293,7 @@ Page({
tabIndex: option.code, tabIndex: option.code,
orderStatusPart: option.code, orderStatusPart: option.code,
}); });
this.clearData(); // this.clearData(); // 注释掉实际的API调用,使用硬编码数据
}); });
}, },
onShow() { onShow() {
...@@ -157,11 +307,14 @@ Page({ ...@@ -157,11 +307,14 @@ Page({
if (res) return; if (res) return;
this.setData({ this.setData({
listFlag: false, listFlag: false,
list: [], // list: [], // 注释掉清空列表,保持硬编码数据
nothing: false, nothing: false,
pageNum: 1, pageNum: 1,
}); });
this.getOrderList(); // this.getOrderList(); // 注释掉实际的API调用,使用硬编码数据
this.setData({
listFlag: true
});
}, },
search() { search() {
this.clearData(); this.clearData();
...@@ -183,6 +336,8 @@ Page({ ...@@ -183,6 +336,8 @@ Page({
}); });
}, },
getOrderList() { getOrderList() {
// 使用硬编码数据,不需要实际调用API
/*
wx.p.wxApi.showLoading("加载中..."); wx.p.wxApi.showLoading("加载中...");
let { orderStatusPart, pageNum, keyword } = this.data; let { orderStatusPart, pageNum, keyword } = this.data;
let obj = { let obj = {
...@@ -223,6 +378,7 @@ Page({ ...@@ -223,6 +378,7 @@ Page({
}); });
wx.hideLoading(); wx.hideLoading();
}); });
*/
}, },
pay(e) { pay(e) {
let _this = this; let _this = this;
......
...@@ -96,27 +96,12 @@ ...@@ -96,27 +96,12 @@
padding-right: 24rpx; padding-right: 24rpx;
position: relative; position: relative;
} }
.delivery-icon {
position: absolute;
width: 106rpx;
height: 80rpx;
left: 366rpx;
bottom: 0;
}
.layout .item .top .name { .layout .item .top .name {
width: 366rpx; width: 410rpx;
} height: 40rpx;
font-size: 28rpx;
.layout .item .content-top { color: #1B233D;
border-top: 2rpx solid #eff0f2;
}
.layout .item .content {
border-top: 2rpx solid #eff0f2;
border-bottom: 2rpx solid #eff0f2;
}
.content-bottom {
border-bottom: 2rpx solid #eff0f2;
} }
.layout .item .goods { .layout .item .goods {
...@@ -204,7 +189,6 @@ ...@@ -204,7 +189,6 @@
} }
.layout .item .status { .layout .item .status {
color: #b1b1b3;
font-size: 24rpx; font-size: 24rpx;
color: #282829; color: #282829;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!