微擎模块开发-微擎小程序商城全部订单功能详解(后端篇)

在用户中心,点击全部订单,可以看到待付款、待发货、待收货、待评价等各个状态下的订单。

我的订单设计思路

  1. 获取用户订单中心订单信息;
  2. 支付成功后修改订单为代发货;
  3. 点击订单商品后,跳转至订单详情;
  4. 获取待付款、待发货、待评价等订单状态数据
我的订单myorder.wxml
<!--shangcheng_xk/pages/order/myorder/myorder.wxml-->
<view class="container">
	<view class="order-title">
		<text class="{
   { tabActive == 5 ?  'active' : '' }}" bindtap="changeTab" data-tabId="5">全部</text>
		<text class="{
   { tabActive == 0 ?  'active' : '' }}" bindtap="changeTab" data-tabId="0">待付款</text>
		<text class="{
   { tabActive == 1 ?  'active' : '' }}" bindtap="changeTab" data-tabId="1">待配送</text>
		<text class="{
   { tabActive == 2 ?  'active' : '' }}" bindtap="changeTab" data-tabId="2">配送中</text>
		<text class="{
   { tabActive == 3 ?  'active' : '' }}" bindtap="changeTab" data-tabId="3">待评价</text>
	</view>
	<view class="order">
		<view wx:if="{
   { orderInfo }}">
			<view class="order-item" wx:for="{
   { orderInfo }}" wx:key="id">
				<view class="order-status">
					<text>订单号:{
   {
    item.out_trade_no }}</text>
				</view>
				<view class="goods-list">
					<view class="goods-item" wx:for-index="goodsIndex" wx:for-item="itemGoods" wx:for="{
   {item.goodsInfo}}" wx:key="gid" data-orderId="{
   { item.id}}" bindtap="goodsDetail">
						<image class="goods-thumb" src="{
   { itemGoods.image }}" mode="widthFix"></image>
						<view class="goods-info">
							<view class="goods-title">
								<text>{
   {
    itemGoods.goods_name}}</text>
								<text>{
   {
    itemGoods.goods_desc}}</text>
							</view>
							<view class="goods-sale">
								<view class="goods-price">
									<text></text>
									<text>{
   {
    itemGoods.now_price }}</text>
								</view>
								<!-- <view class="goods-num">x2</view> -->
							</view>
						</view>
					</view>
				</view>
				<view class="order-tot
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值