Explorar el Código

Merge branch 'main' of https://gitlab.com/tea28/client

hejie hace 3 años
padre
commit
a263e95f3f

+ 0 - 6
src/pages.json

@@ -144,12 +144,6 @@
 				"navigationBarTitleText": "订单列表"
 			}
 		},
-		{
-			"path": "pages/order/orderList",
-			"style": {
-				"navigationBarTitleText": "订单列表"
-			}
-		},
 		{
 			"path": "pages/szw-order-details/index",
 			"style": {

+ 0 - 73
src/pages/order/orderList.vue

@@ -1,73 +0,0 @@
-<template>
-  <div class='orderList'>
-    <div class="tabBar">
-        <template v-for="(i,s) in tabOjs">
-            <text :class="['tabItem',i.type==type?'active':'']" :key="s" @click="onTab(i.type)">{{ i.tit }}</text>
-        </template>
-    </div>
-    <div class="listBar">
-        <div class="listItem">
-            .
-        </div>
-    </div>
-  </div>
-</template>
-<script>
-import { get, post } from '@/request/api.js';
-export default {
-  name: 'orderList',
-  data () {
-    return {
-        tabOjs: [
-            {tit:"全部",type:"0"},
-            {tit:"待付款",type:"1"},
-            {tit:"待发货",type:"2"},
-            {tit:"待收货",type:"3"},
-            {tit:"已收货",type:"4"},
-        ],
-        type: '', //订单状态
-    }
-  },
-  onLoad (option) {
-    this.loadData();
-  },
-  onLaunch () {},
-  onShow () {},
-  onHide () {},
-  methods: {
-    loadData(){
-        post("my/order",{
-            type: this.type,
-        }).then(res => {
-            if(res.code === 0){
-                console.log(res);
-            }
-        })
-    },
-    onTab(va){
-        this.type = va;
-    }
-  },
-  computed: {},
-  watch: {}
-}
-</script>
-<style scoped lang='scss'>
-.orderList{
-    height: 100vh;
-    background: #eee;
-    .tabBar{
-        padding: 0 30rpx;
-        background: #fff;
-        .tabItem{
-            display: inline-block;
-            width: 20%;
-            text-align: center;
-            padding: 15rpx 0;
-        }
-        .active{
-            border-bottom: 4rpx solid #18bb88;
-        }
-    }
-}
-</style>

+ 536 - 742
src/pages/szw-order-details/index.vue

@@ -1,955 +1,749 @@
 <template>
-  <view class="container">
-    <view class="no_data" v-if="dataError">
-      <image src="/static/no_data.png" class="image" mode="widthFix" />
-      <view>没有找到该订单呢……</view>
-    </view>
-    <view class="orderDetail_box">
-      <view class="sec-wrap" v-if="!dataError">
-        <view class="order-status">
-          <view class="icon-box">
-            <block v-if="orderInfo.orderDetail">
-              <image
-                v-if="orderInfo.orderDetail.status == 2"
-                class="icon"
-                src="/static/order-details/icon-ddfk.png"
-              ></image>
-              <image
-                v-else-if="orderInfo.orderDetail.status == 3"
-                class="icon"
-                src="/static/order-details/icon-ddfh.png"
-              ></image>
-              <image
-                v-else-if="orderInfo.orderDetail.status == 4"
-                class="icon"
-                src="/static/order-details/icon-ddsh.png"
-              ></image>
-              <image
-                v-else-if="orderInfo.orderDetail.status == 5"
-                class="icon"
-                src="/static/order-details/icon-jycg.png"
-              ></image>
-              <image
-                v-else-if="
-                  orderInfo.orderDetail.status == 6 ||
-                  orderInfo.orderDetail.status == 7
-                "
-                class="icon"
-                src="/static/order-details/icon-ddgb.png"
-              ></image>
-            </block>
-          </view>
-          <view class="right-text">
-            <view class="status">{{
-              orderInfo.orderDetail ? orderInfo.orderDetail.statusMsg : ""
-            }}</view>
-            <!-- <view class="des">{{changeTimeText}}</view> -->
-          </view>
-        </view>
-      </view>
-      <!-- 配送 -->
-      <view class="address-box">
-        <view class="show-address">
-          <view class="name-tel"
-            >{{ orderInfo.address.name }} {{ orderInfo.address.mobile }}</view
-          >
-          <view class="addr-text"
-            >{{ orderInfo.address.province }} {{ orderInfo.address.city }}
-            {{ orderInfo.address.county }} {{ orderInfo.address.address }}</view
-          >
+    <view class="container">
+        <view class="no_data" v-if="dataError">
+            <image src="/static/no_data.png" class="image" mode="widthFix" />
+            <view>没有找到该订单呢……</view>
         </view>
-      </view>
-
-      <view
-        class="logistics_btn"
-        v-if="
-          orderInfo.logistics &&
-          orderInfo.logistics.logistics_no &&
-          orderInfo.logistics.logistics_business
-        "
-        @tap="goLogistics"
-      >
-        <view
-          class="l_box"
-          v-if="
-            orderInfo.logistics.statusMsg && orderInfo.logistics.statusMsg != ''
-          "
-          >{{ orderInfo.logistics.statusMsg }}</view
-        >
-        <view class="l_box" v-else
-          >已发货:{{ orderInfo.logistics.logistics_business }},快递单号:{{
-            orderInfo.logistics.logistics_no
-          }}</view
-        >
-      </view>
-
-      <view class="goods-list">
-        <view
-          class="goods-info_box"
-          v-for="(item, index) in orderInfo.mallGood"
-          :key="index"
-        >
-          <scroll-view
-            class="goods-img-container"
-            :data-id="item.goodsId"
-            @tap="toGoodsDetails"
-          >
-            <view class="img-box">
-              <image :src="item.image" mode="" class="goods-img"></image>
+        <view class="orderDetail_box" v-else>
+            <view class="sec-wrap">
+                <!-- <view class="order-status">
+                    <view class="icon-box">
+                        <block v-if="orderInfo.orderDetail">
+                            <image v-if="orderInfo.orderDetail.status == 2" class="icon" src="@/static/order-details/icon-ddfk.png"></image>
+                            <image v-else-if="orderInfo.orderDetail.status == 3" class="icon" src="@/static/order-details/icon-ddfh.png"></image>
+                            <image v-else-if="orderInfo.orderDetail.status == 4" class="icon" src="@/static/order-details/icon-ddsh.png"></image>
+                            <image v-else-if="orderInfo.orderDetail.status == 5" class="icon" src="@/static/order-details/icon-jycg.png"></image>
+                            <image v-else-if="" class="icon" src="@/static/order-details/icon-ddgb.png"></image>
+                        </block>
+                    </view>
+                    <view class="right-text">
+                        <view class="status">{{ orderInfo.orderDetail ? orderInfo.orderDetail.statusMsg : "" }}</view>
+                    </view>
+                </view> -->
             </view>
-            <view class="goodsDetail_info">
-              <view class="goods_name"
-                >{{ item.goodsName }}
-                <view class="goods_num">×{{ item.buyCount }}</view>
-              </view>
-              <view class="goods_price r_color">¥{{ item.costPrice }}</view>
+            <!-- 配送 -->
+            <!-- <view class="address-box">
+                <view class="show-address">
+                    <view class="name-tel">{{ orderInfo.address.name }} {{ orderInfo.address.mobile }}</view>
+                    <view class="addr-text">{{ orderInfo.address.province }} {{ orderInfo.address.city }} {{ orderInfo.address.county }} {{ orderInfo.address.address }}</view>
+                </view>
             </view>
-          </scroll-view>
-        </view>
-      </view>
-      <!-- <view class="remark"><text>备注:</text>{{item}}</view> -->
-      <!-- <view class="goods-info">
-	            <view class="row-box" v-if="orderInfo.coupon && orderInfo.coupon.id">
-	                <view class="row-label">商品合计</view>
-	                <view class="right-text r_color">¥ {{goodsTotalPrice}}</view>
-	            </view>
-	            <view class="row-box" v-if="orderInfo.coupon && orderInfo.coupon.id">
-	                <view class="row-label">店铺优惠</view>
-	                <view class="right-text r_color">
-	                    {{orderInfo.coupon.type == 1?'- ¥':''}} {{orderInfo.coupon.actualCoupon}} {{orderInfo.coupon.type == 1?'':'折'}}
-	                </view>
-	            </view>
-	        </view> -->
-      <view class="order_info">
-        <view class="li_box" v-if="orderInfo.orderDetail.statusMsg"
-          >订单状态:
-          <view class="info_data">{{ orderInfo.orderDetail.statusMsg }}</view>
-        </view>
-        <view class="li_box" v-if="orderInfo.orderDetail.orderNo"
-          >订单编号:
-          <view class="info_data">{{ orderInfo.orderDetail.orderNo }}</view>
-        </view>
-        <view class="li_box" v-if="orderInfo.orderDetail.createTime"
-          >订单创建:
-          <view class="info_data">{{ orderInfo.orderDetail.createTime }}</view>
-        </view>
-        <view class="li_box"
-          >支付方式:
-          <view class="info_data">{{ orderInfo.orderDetail.patTypeDesc }}</view>
-        </view>
-        <view class="li_box" v-if="orderInfo.orderDetail.integral"
-          >商品合计:
-          <view class="info_data">{{ orderInfo.orderDetail.integral }}</view>
-        </view>
-        <view class="li_box" v-if="orderInfo.orderDetail.orderTypes == 2"
-          >批发积分:
-          <view class="info_data">{{ orderInfo.orderDetail.totalPfInt }}</view>
+            <view class="logistics_btn" v-if="orderInfo.logistics && orderInfo.logistics.logistics_no && orderInfo.logistics.logistics_business" @tap="goLogistics">
+                <view class="l_box" v-if="orderInfo.logistics.statusMsg && orderInfo.logistics.statusMsg != ''">{{ orderInfo.logistics.statusMsg }}</view>
+                <view class="l_box" v-else>已发货:{{ orderInfo.logistics.logistics_business }},快递单号:{{ orderInfo.logistics.logistics_no }}</view>
+            </view> -->
+
+            <!-- <view class="goods-list">
+                <view class="goods-info_box" v-for="(item, index) in orderInfo.mallGood" :key="index">
+                    <scroll-view class="goods-img-container" :data-id="item.goodsId" @tap="toGoodsDetails">
+                        <view class="img-box">
+                            <image :src="item.image" mode="" class="goods-img"></image>
+                        </view>
+                        <view class="goodsDetail_info">
+                            <view class="goods_name">{{ item.goodsName }}
+                                <view class="goods_num">×{{ item.buyCount }}</view>
+                            </view>
+                            <view class="goods_price r_color">¥{{ item.costPrice }}</view>
+                        </view>
+                    </scroll-view>
+                </view>
+            </view> -->
+
+            <!-- <view class="order_info">
+                <view class="li_box" v-if="orderInfo.orderDetail.statusMsg">订单状态:
+                    <view class="info_data">{{ orderInfo.orderDetail.statusMsg }}</view>
+                </view>
+                <view class="li_box" v-if="orderInfo.orderDetail.orderNo">订单编号:
+                    <view class="info_data">{{ orderInfo.orderDetail.orderNo }}</view>
+                </view>
+                <view class="li_box" v-if="orderInfo.orderDetail.createTime">订单创建:
+                    <view class="info_data">{{ orderInfo.orderDetail.createTime }}</view>
+                </view>
+                <view class="li_box">支付方式:
+                    <view class="info_data">{{ orderInfo.orderDetail.patTypeDesc }}</view>
+                </view>
+                <view class="li_box" v-if="orderInfo.orderDetail.integral">商品合计:
+                    <view class="info_data">{{ orderInfo.orderDetail.integral }}</view>
+                </view>
+                <view class="li_box" v-if="orderInfo.orderDetail.orderTypes == 2">批发积分:
+                    <view class="info_data">{{ orderInfo.orderDetail.totalPfInt }}</view>
+                </view>
+                <view class="li_box" v-if="orderInfo.orderDetail.orderTypes == 2">茶宝:
+                    <view class="info_data">{{ orderInfo.orderDetail.totalTeaInt }}</view>
+                </view>
+            </view> -->
+
+            <!-- <view class="detail_btn-row-box">
+                <view class="detail_btn-row">
+                    <view class="btn cancel-btn" @tap="toCancel" v-if="orderInfo.orderDetail.status == 2">取消订单</view>
+                    <view class="btn topay-btn" @tap="toPay" v-if="orderInfo.orderDetail.status == 2">立即支付</view>
+                    <view class="btn topay-btn" @tap="toTake" v-if="orderInfo.orderDetail.status == 4 || orderInfo.orderDetail.status == 3">确认收货</view>
+                    <view class="btn cancel-btn" @tap="goBack">返回</view>
+                </view>
+            </view> -->
         </view>
-        <view class="li_box" v-if="orderInfo.orderDetail.orderTypes == 2"
-          >茶宝:
-          <view class="info_data">{{ orderInfo.orderDetail.totalTeaInt }}</view>
-        </view>
-        <view class="li_box" v-if="orderInfo.orderDetail.orderTypes == 7"
-          >拼团金:
-          <view class="info_data">{{
-            orderInfo.orderDetail.totalAccountSpell
-          }}</view>
-        </view>
-      </view>
-      <view class="detail_btn-row-box">
-        <view class="detail_btn-row">
-          <block>
-            <view
-              class="btn cancel-btn"
-              @tap="toCancel"
-              v-if="orderInfo.orderDetail.status == 2"
-              >取消订单</view
-            >
-            <view
-              class="btn topay-btn"
-              @tap="toPay"
-              v-if="orderInfo.orderDetail.status == 2"
-              >立即支付</view
-            >
-            <view
-              class="btn topay-btn"
-              @tap="toTake"
-              v-if="
-                orderInfo.orderDetail.status == 4 ||
-                orderInfo.orderDetail.status == 3
-              "
-              >确认收货</view
-            >
-            <view
-              class="btn topay-btn"
-              @tap="toCommen"
-              v-if="
-                orderInfo.orderDetail.comType &&
-                orderInfo.orderDetail.comType == 1
-              "
-              >去评价</view
-            >
-            <block
-              v-if="
-                (orderInfo.orderDetail.status == 3 ||
-                  orderInfo.orderDetail.status == 4 ||
-                  orderInfo.orderDetail.status == 5) &&
-                orderInfo.returnType == 1 &&
-                orderInfo.orderDetail.orderTypes != 2
-              "
-            >
-              <view
-                v-if="orderInfo.refundId"
-                class="btn"
-                :class="
-                  orderInfo && orderInfo.refundId ? 'topay-btn' : 'cancel-btn'
-                "
-                :data-type="orderInfo.type"
-                :data-id="orderInfo.orderDetail.orderDetailId"
-                :data-reid="orderInfo.refundId"
-                @tap="toRefundDetails(orderInfo)"
-              >
-                退款中
-              </view>
-              <view
-                v-else
-                class="btn"
-                :class="
-                  orderInfo && orderInfo.refundId ? 'topay-btn' : 'cancel-btn'
-                "
-                :data-type="orderInfo.type"
-                :data-id="orderInfo.orderDetail.orderDetailId"
-                :data-reid="orderInfo.refundId"
-                @tap="toRefund(orderInfo)"
-              >
-                退货/退款
-              </view>
-            </block>
-          </block>
-          <view class="btn cancel-btn" @tap="goBack">返回</view>
-        </view>
-      </view>
     </view>
-  </view>
 </template>
-
 <script>
-var utils = require("../../utils/utils.js");
-// import { ReqApi, ToPayOpre } from "../../utils/reqTools.js";
-// var reqApi = new ReqApi();
 // var toPayOpre = new ToPayOpre();
+var utils = require("@/utils/utils.js");
 import { get, post, u_post } from "@/request/api.js";
 var app = getApp();
 var appEv = app.$vm.$options;
 export default {
-  data() {
-    return {
-      currentTpye: false,
-      dataError: false,
-      orderInfo: {},
-      isTuanIng: false, // 是否为拼团中订单
-      isweixin: "",
-      goodsNum: "",
-      goodsTotalPrice: "",
-      pt: "",
-
-    };
-  },
-  onLoad: function (e) {
-    if (!e.id) {
-      uni.navigateBack({
-        delta: 1,
-      });
-      uni.showToast({
-        title: "参数错误",
-        image: "/static/static/images/toast_nothing.png",
-        duration: 1200,
-      });
-      return;
-    }
-    this.orderId = e.id;
-    this.type = e.type;
-    uni.showLoading({
-      title: "加载中…",
-      mask: true,
-    });
-    this.loadData();
-  },
-  methods: {
-    loadData: function () {
-      var orderDetailId = this.orderId,
-        type = this.type;
-      let data = {
-        orderDetailId,
-        type: this.type,
-      };
-      u_post("ShuZiTeaYW/shop/goodsOrderDetails", data).then(res => {
-        uni.hideLoading();
-		console.log(res)
-        if (res.status == 200) {
-          if (res) {
-            this.orderInfo = res;
-          } else {
-            uni.showModal({
-              title: "提示",
-              content: "网络较慢,请稍后重试",
-              success: function (res) {
-                if (res) {
-                  uni.navigateBack({
-                    delta: 1,
-                  });
-                }
-              },
+    data() {
+        return {
+            currentTpye: false,
+            dataError: false,
+            orderInfo: {},
+            isTuanIng: false, // 是否为拼团中订单
+            isweixin: "",
+            goodsNum: "",
+            goodsTotalPrice: "",
+            pt: "",
+
+            order_id: '', //当前订单id
+        };
+    },
+    onLoad: function(e) {
+        if (!e.id) {
+            uni.navigateBack({
+                delta: 1,
+            });
+            uni.showToast({
+                title: "参数错误",
+                image: "/static/static/images/toast_nothing.png",
+                duration: 1200,
             });
-          }
+            return;
         }
-      });
-    },
-    toRefund() {
-      var id = this.orderId,
-        type = this.type;
-      uni.navigateTo({
-        url: "/pages/order-refund/index?id=" + id + "&type=" + type,
-      });
-    },
-    toRefundDetails(e) {
-      var refundId = this.orderInfo.refundId;
-      uni.navigateTo({
-        url: "/pages/order-refund-details/index?id=" + refundId,
-      });
-    },
-    // 取消订单
-    toCancel() {
-      var orderDetailId = this.orderId,
-        type = this.type;
-      const info = reqApi.cancelOrder({ orderDetailId, type });
-      var that = this;
-      if (info) {
-        info.then((res) => {
-          if (res.data.status == 200) {
-            appEv.errTips(res.data.msg || "订单已取消");
-            setTimeout(function () {
-              that.loadData();
-            }, 1200);
-          } else {
-            appEv.errTips(res.data.msg || "取消失败");
-          }
-        });
-      }
-    },
-    // 立即支付
-    toPay(e) {
-      let data = {
-        orderDetailIds: this.orderId,
-        types: 1,
-        price: this.orderInfo.orderDetail.totalWxPrice,
-        account: this.orderInfo.orderDetail.totalAccount,
-        teaIntegral: this.orderInfo.orderDetail.totalTeaInt,
-        pfIntegral: this.orderInfo.orderDetail.totalPfInt,
-        xfIntegral: this.orderInfo.orderDetail.totalXfInt,
-        zfType: this.orderInfo.orderDetail.patType,
-        ojsType: this.orderInfo.orderDetail.ojsType,
-      };
-      var info;
-      info = reqApi.payOrder(data);
-      var that = this;
-      if (info) {
-        info.then((res) => {
-          if (res.data.status == 200) {
-            toPayOpre.toPay(res.data.payParam);
-          } else {
-            appEv.errTips(res.data.msg || "支付失败");
-          }
+        this.order_id = e.id;
+        uni.showLoading({
+            title: "加载中…",
+            mask: true,
         });
-      }
+        this.loadData();
     },
-    // 确认收货
-    toTake() {
-      var orderDetailId = this.orderId;
-      var that = this;
-      uni.showModal({
-        content:
-          "亲,“确定收货”代表着本订单的交付流程已经完成,不再支持任何形式的退换货。?",
-        confirmText: "确认收货",
-        confirmColor: "#fa2f2e",
-        cancelText: "取消",
-        cancelColor: "#bbb",
-        success(res) {
-          if (res.confirm) {
-            const info = reqApi.takeOrder({
-              orderDetailId: orderDetailId,
-              type: 1,
+    methods: {
+        loadData: function() {
+            post("my/orderDetail", {
+              order_id: this.order_id,
+            }).then(res => {
+                uni.hideLoading();
+                if (res.code === 0) {
+                    if (res) {
+                        this.orderInfo = res;
+                    } else {
+                        uni.showModal({
+                            title: "提示",
+                            content: "网络较慢,请稍后重试",
+                            success: function(res) {
+                                if (res) {
+                                    uni.navigateBack({
+                                        delta: 1,
+                                    });
+                                }
+                            },
+                        });
+                    }
+                }
             });
+        },
+        // 取消订单
+        toCancel() {},
+        // 立即支付
+        toPay(e) {
+            let data = {
+                orderDetailIds: this.orderId,
+                types: 1,
+                price: this.orderInfo.orderDetail.totalWxPrice,
+                account: this.orderInfo.orderDetail.totalAccount,
+                teaIntegral: this.orderInfo.orderDetail.totalTeaInt,
+                pfIntegral: this.orderInfo.orderDetail.totalPfInt,
+                xfIntegral: this.orderInfo.orderDetail.totalXfInt,
+                zfType: this.orderInfo.orderDetail.patType,
+                ojsType: this.orderInfo.orderDetail.ojsType,
+            };
+            var info;
+            info = reqApi.payOrder(data);
+            var that = this;
             if (info) {
-              info.then((res) => {
-                if (res.data.status == 200) {
-                  appEv.errTips(res.data.msg);
-                  setTimeout(function () {
-                    that.loadData();
-                  }, 1200);
-                } else {
-                  appEv.errTips(res.data.msg || "收货失败");
-                }
-              });
+                info.then((res) => {
+                    if (res.data.status == 200) {
+                        toPayOpre.toPay(res.data.payParam);
+                    } else {
+                        appEv.errTips(res.data.msg || "支付失败");
+                    }
+                });
             }
-          } else if (res.cancel) {
-            // console.log('用户点击取消');
-          }
         },
-      });
-    },
-    //计时
-    timeChange: function (statusType, finsTime) {
-      var nowTime = utils.unxiNum();
-      finsTime = utils.unxiNum(finsTime);
-      var timeDiffNum = finsTime - nowTime;
-      var that = this,
-        text = "";
-      if (timeDiffNum > 0) {
-        var timer = setInterval(function () {
-          --timeDiffNum;
-          var back_text = utils.changeTimeStamp(timeDiffNum);
-          if (timeDiffNum <= 0 || !back_text) {
-            clearInterval(timer);
-            if (statusType == 0) {
-              text = "订单未在规定时间内付款已自动关闭";
-              that.currentTpye = 7;
-              that.onShow();
-            }
-          } else {
-            if (statusType == 0) {
-              text = "请于" + back_text + "内付款,超时订单将自动关闭";
+        // 确认收货
+        toTake() {
+            var orderDetailId = this.orderId;
+            var that = this;
+            uni.showModal({
+                content: "亲,“确定收货”代表着本订单的交付流程已经完成,不再支持任何形式的退换货。?",
+                confirmText: "确认收货",
+                confirmColor: "#fa2f2e",
+                cancelText: "取消",
+                cancelColor: "#bbb",
+                success(res) {
+                    if (res.confirm) {
+                        const info = reqApi.takeOrder({
+                            orderDetailId: orderDetailId,
+                            type: 1,
+                        });
+                        if (info) {
+                            info.then((res) => {
+                                if (res.data.status == 200) {
+                                    appEv.errTips(res.data.msg);
+                                    setTimeout(function() {
+                                        that.loadData();
+                                    }, 1200);
+                                } else {
+                                    appEv.errTips(res.data.msg || "收货失败");
+                                }
+                            });
+                        }
+                    } else if (res.cancel) {
+                        // console.log('用户点击取消');
+                    }
+                },
+            });
+        },
+        //计时
+        timeChange: function(statusType, finsTime) {
+            var nowTime = utils.unxiNum();
+            finsTime = utils.unxiNum(finsTime);
+            var timeDiffNum = finsTime - nowTime;
+            var that = this,
+                text = "";
+            if (timeDiffNum > 0) {
+                var timer = setInterval(function() {
+                    --timeDiffNum;
+                    var back_text = utils.changeTimeStamp(timeDiffNum);
+                    if (timeDiffNum <= 0 || !back_text) {
+                        clearInterval(timer);
+                        if (statusType == 0) {
+                            text = "订单未在规定时间内付款已自动关闭";
+                            that.currentTpye = 7;
+                            that.onShow();
+                        }
+                    } else {
+                        if (statusType == 0) {
+                            text = "请于" + back_text + "内付款,超时订单将自动关闭";
+                        }
+                    }
+                    that.timeOver = false; //时间是否已结束
+                    that.changeTimeTexttext;
+                }, 1000);
+            } else {
+                if (statusType == 0) {
+                    text = "订单未在规定时间内付款已自动关闭";
+                }
+                that.timeOver = true; //时间是否已结束
+                that.changeTimeText = text;
             }
-          }
-          that.timeOver = false; //时间是否已结束
-          that.changeTimeTexttext;
-        }, 1000);
-      } else {
-        if (statusType == 0) {
-          text = "订单未在规定时间内付款已自动关闭";
-        }
-        that.timeOver = true; //时间是否已结束
-        that.changeTimeText = text;
-      }
-    },
-    goBack: function () {
-      uni.navigateBack({});
-    },
-    // 跳转商品详情
-    toGoodsDetails(e) {
-      var url =
-        "/pages/chengbei-goods-details/index?goods_id=" +
-        e.currentTarget.dataset.id;
-      if (
-        this.orderInfo.orderDetail.assembleType &&
-        this.orderInfo.orderDetail.assembleType != 1
-      ) {
-        // 判断是否为拼团订单
-        url += "&type=TUAN";
-      }
-      uni.navigateTo({
-        url: url,
-      });
-    },
-    // 跳转拼团分享页面
-    toTuanShare() {
-      uni.navigateTo({
-        url:
-          "/pages/tuan-share-info/index?orderNo=" +
-          this.orderInfo.orderDetail.orderNo,
-      });
-    },
-    // 跳转物流详情
-    goLogistics() {
-      uni.navigateTo({
-        url:
-          "/pages/logistics/index?id=" +
-          this.orderInfo.orderDetail.orderDetaillId,
-      });
-    },
-    // 去评价
-    toCommen(e) {
-      var id = this.orderId,
-        no = this.orderInfo.orderDetail.orderNo,
-        orderType = this.type;
-      uni.navigateTo({
-        url:
-          "/pages/add-goods-commen/index?orderId=" +
-          id +
-          "&orderNo=" +
-          no +
-          "&orderType=" +
-          orderType,
-      });
+        },
+        goBack: function() {
+            uni.navigateBack({});
+        },
+        // 跳转商品详情
+        toGoodsDetails(e) {
+          
+        },
+
+        // 跳转物流详情
+        goLogistics() {
+            uni.navigateTo({
+                url: "/pages/logistics/index?id=" +
+                    this.orderInfo.orderDetail.orderDetaillId,
+            });
+        },
     },
-  },
 };
 </script>
-
 <style lang="scss" scoped>
 page {
-  background-color: #f3f5f7;
+    background-color: #f3f5f7;
 }
 
 .r_color {
-  color: #fa2f2e;
+    color: #fa2f2e;
 }
 
 .sec-wrap {
-  background-color: #21c792;
-  margin: 2rpx 0 20rpx;
+    background-color: #21c792;
+    margin: 2rpx 0 20rpx;
 }
 
 .bottom-fiexd {
-  position: fixed;
-  bottom: 0;
-  left: 0;
+    position: fixed;
+    bottom: 0;
+    left: 0;
 }
+
 .flex_hvcc {
-  display: flex;
-  display: -webkit-flex;
-  align-items: center;
-  justify-content: center;
+    display: flex;
+    display: -webkit-flex;
+    align-items: center;
+    justify-content: center;
 }
+
 .address-box {
-  width: 100%;
-  margin: -20rpx 0 20rpx;
-  background: #fff url(http://xcx.soowin.com/images/addr-line.png) no-repeat
-    center top;
-  background-size: 100% 4rpx;
-  overflow: hidden;
+    width: 100%;
+    margin: -20rpx 0 20rpx;
+    background: #fff url(http://xcx.soowin.com/images/addr-line.png) no-repeat center top;
+    background-size: 100% 4rpx;
+    overflow: hidden;
 }
 
 .show-address {
-  width: 100%;
-  box-sizing: border-box;
-  padding: 0 30rpx 0 80rpx;
-  background: url(http://xcx.soowin.com/images/ico-addr.png) no-repeat 25rpx
-    30rpx;
-  background-size: 40rpx auto;
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 30rpx 0 80rpx;
+    background: url(http://xcx.soowin.com/images/ico-addr.png) no-repeat 25rpx 30rpx;
+    background-size: 40rpx auto;
 }
 
 .show-address .name-tel {
-  font-size: 28rpx;
-  color: #000;
-  padding: 30rpx 0 20rpx 0;
+    font-size: 28rpx;
+    color: #000;
+    padding: 30rpx 0 20rpx 0;
 }
+
 .show-address .name-tel-phone {
-  padding: 30rpx 0;
+    padding: 30rpx 0;
 }
 
 .show-address .addr-text {
-  font-size: 24rpx;
-  color: #888;
-  padding-bottom: 34rpx;
-  line-height: 36rpx;
+    font-size: 24rpx;
+    color: #888;
+    padding-bottom: 34rpx;
+    line-height: 36rpx;
 }
+
 .show-address .addr-text_lit {
-  padding-bottom: 10rpx;
+    padding-bottom: 10rpx;
 }
 
 .sec-wrap .order-status {
-  width: 100%;
-  box-sizing: border-box;
-  padding: 0 30rpx;
-  height: 160rpx;
-  display: flex;
-  align-items: center;
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 30rpx;
+    height: 160rpx;
+    display: flex;
+    align-items: center;
 }
 
 .order-status .icon-box {
-  width: 80rpx;
-  height: 80rpx;
-  overflow: hidden;
-  margin-right: 26rpx;
+    width: 80rpx;
+    height: 80rpx;
+    overflow: hidden;
+    margin-right: 26rpx;
 }
 
 .order-status .icon-box .icon {
-  width: 100%;
-  height: 100%;
+    width: 100%;
+    height: 100%;
 }
 
 .order-status .right-text {
-  width: calc(100% - 116rpx);
-  overflow: hidden;
+    width: calc(100% - 116rpx);
+    overflow: hidden;
 }
 
 .order-status .right-text .status {
-  font-size: 36rpx;
-  color: #fff;
-  padding: 2rpx 0 4rpx;
-  font-weight: 500;
+    font-size: 36rpx;
+    color: #fff;
+    padding: 2rpx 0 4rpx;
+    font-weight: 500;
 }
 
 .order-status .right-text .red {
-  color: #fa2f2e;
+    color: #fa2f2e;
 }
 
 .order-status .right-text .des {
-  font-size: 24rpx;
-  color: #fff;
-  padding: 4rpx 0;
+    font-size: 24rpx;
+    color: #fff;
+    padding: 4rpx 0;
 }
 
 .address-sec {
-  width: 720rpx;
-  margin-left: 30rpx;
-  display: flex;
-  align-items: center;
-  padding: 30rpx 0;
+    width: 720rpx;
+    margin-left: 30rpx;
+    display: flex;
+    align-items: center;
+    padding: 30rpx 0;
 }
 
 .address-sec .icon-box {
-  width: 30rpx;
-  align-self: flex-start;
-  overflow: hidden;
-  margin-right: 35rpx;
+    width: 30rpx;
+    align-self: flex-start;
+    overflow: hidden;
+    margin-right: 35rpx;
 }
 
 .address-sec .icon-box .icon {
-  width: 30rpx;
-  height: 30rpx;
+    width: 30rpx;
+    height: 30rpx;
 }
 
 .address-sec .right-box {
-  width: 620rpx;
+    width: 620rpx;
 }
 
 .address-sec .right-box .name-tel {
-  font-size: 28rpx;
-  color: #000;
-  margin-bottom: 20rpx;
+    font-size: 28rpx;
+    color: #000;
+    margin-bottom: 20rpx;
 }
 
 .address-sec .right-box .text {
-  font-size: 24rpx;
-  color: #888;
-  line-height: 36rpx;
-  height: 72rpx;
-  overflow: hidden;
+    font-size: 24rpx;
+    color: #888;
+    line-height: 36rpx;
+    height: 72rpx;
+    overflow: hidden;
 }
 
 .wuliu-box {
-  width: 720rpx;
-  margin-left: 30rpx;
-  border-bottom: 1rpx solid #eee;
-  display: flex;
-  align-items: center;
-  padding: 30rpx 0;
+    width: 720rpx;
+    margin-left: 30rpx;
+    border-bottom: 1rpx solid #eee;
+    display: flex;
+    align-items: center;
+    padding: 30rpx 0;
 }
 
 .wuliu-box .icon-box {
-  width: 40rpx;
-  height: 40rpx;
-  overflow: hidden;
-  margin-right: 31rpx;
-  align-self: flex-start;
+    width: 40rpx;
+    height: 40rpx;
+    overflow: hidden;
+    margin-right: 31rpx;
+    align-self: flex-start;
 }
 
 .wuliu-box .icon-box .icon {
-  width: 40rpx;
-  height: 40rpx;
+    width: 40rpx;
+    height: 40rpx;
 }
 
 .wuliu-box .arrow-right {
-  width: 15rpx;
-  height: 24rpx;
+    width: 15rpx;
+    height: 24rpx;
 }
 
 .wuliu-box .arrow-right .arrow {
-  width: 15rpx;
-  height: 24rpx;
+    width: 15rpx;
+    height: 24rpx;
 }
 
 .wuliu-box .right-text {
-  width: 575rpx;
-  margin-right: 30rpx;
+    width: 575rpx;
+    margin-right: 30rpx;
 }
 
 .wuliu-box .right-text .order-number {
-  font-size: 28rpx;
-  color: #000;
-  margin-bottom: 14rpx;
+    font-size: 28rpx;
+    color: #000;
+    margin-bottom: 14rpx;
 }
 
 .wuliu-box .right-text .wuliu-text,
 .wuliu-box .right-text .wuliu-date {
-  font-size: 24rpx;
-  color: #888;
-  line-height: 36rpx;
+    font-size: 24rpx;
+    color: #888;
+    line-height: 36rpx;
 }
 
 .goods-list {
-  width: 100%;
-  background-color: #fff;
-  margin-bottom: 24rpx;
+    width: 100%;
+    background-color: #fff;
+    margin-bottom: 24rpx;
 }
 
 .goods-list .list-title {
-  font-size: 28rpx;
-  color: #000;
-  padding: 16rpx 24rpx;
+    font-size: 28rpx;
+    color: #000;
+    padding: 16rpx 24rpx;
 }
+
 .avaImgs {
-  width: 50rpx;
-  height: 50rpx;
-  overflow: hidden;
-  border-radius: 50%;
-  background-color: #f3f5f7;
-  margin-right: 20rpx;
+    width: 50rpx;
+    height: 50rpx;
+    overflow: hidden;
+    border-radius: 50%;
+    background-color: #f3f5f7;
+    margin-right: 20rpx;
 }
 
 .goods-info_box {
-  width: 100%;
-  overflow: hidden;
-  border-top: 2rpx solid #eee;
+    width: 100%;
+    overflow: hidden;
+    border-top: 2rpx solid #eee;
 }
+
 .goods-img-container {
-  overflow: hidden;
-  padding: 30rpx;
-  margin-bottom: 2rpx;
-  box-sizing: border-box;
+    overflow: hidden;
+    padding: 30rpx;
+    margin-bottom: 2rpx;
+    box-sizing: border-box;
 }
 
 .goods-info .goods-des {
-  width: 540rpx;
-  height: 78rpx;
-  line-height: 39rpx;
-  font-size: 26rpx;
-  color: #000;
-  overflow: hidden;
+    width: 540rpx;
+    height: 78rpx;
+    line-height: 39rpx;
+    font-size: 26rpx;
+    color: #000;
+    overflow: hidden;
 }
 
 .goods-img-container .img-box {
-  width: 170rpx;
-  height: 118.56rpx;
-  background-color: #f7f7f7;
-  overflow: hidden;
-  float: left;
-  display: -webkit-box;
-  -webkit-box-align: center;
-  -webkit-box-pack: center;
+    width: 170rpx;
+    height: 118.56rpx;
+    background-color: #f7f7f7;
+    overflow: hidden;
+    float: left;
+    display: -webkit-box;
+    -webkit-box-align: center;
+    -webkit-box-pack: center;
 }
+
 .goodsDetail_info {
-  overflow: hidden;
-  float: right;
-  width: calc(100% - 194rpx);
-  line-height: 1.5;
-  position: relative;
-  height: 118rpx;
+    overflow: hidden;
+    float: right;
+    width: calc(100% - 194rpx);
+    line-height: 1.5;
+    position: relative;
+    height: 118rpx;
 }
+
 .goodsDetail_info .goods_name {
-  padding-right: 66rpx;
-  position: relative;
-  font-size: 26rpx;
-  margin-bottom: 6rpx;
-  overflow: hidden;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2;
+    padding-right: 66rpx;
+    position: relative;
+    font-size: 26rpx;
+    margin-bottom: 6rpx;
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 2;
 }
+
 .goodsDetail_info .goods_name .goods_num {
-  font-size: 24rpx;
-  color: #666;
-  position: absolute;
-  top: 0;
-  right: 0;
+    font-size: 24rpx;
+    color: #666;
+    position: absolute;
+    top: 0;
+    right: 0;
 }
+
 .goodsDetail_info .unimport {
-  font-size: 24rpx;
-  color: #999;
+    font-size: 24rpx;
+    color: #999;
 }
+
 .goodsDetail_info .goods_price {
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  font-size: 28rpx;
-  line-height: 1.2;
-  font-weight: 600;
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    font-size: 28rpx;
+    line-height: 1.2;
+    font-weight: 600;
 }
+
 .goods-img-container .img-box .goods-img {
-  width: 100%;
-  display: block;
-  height: 100%;
+    width: 100%;
+    display: block;
+    height: 100%;
 }
 
 .peisong-way {
-  width: 100%;
-  background-color: #fff;
-  margin-bottom: 20rpx;
+    width: 100%;
+    background-color: #fff;
+    margin-bottom: 20rpx;
 }
 
 .peisong-way .row-box {
-  width: 100%;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  box-sizing: border-box;
-  padding: 24rpx 30rpx;
-  font-size: 26rpx;
-  line-height: 1.6;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    box-sizing: border-box;
+    padding: 24rpx 30rpx;
+    font-size: 26rpx;
+    line-height: 1.6;
 }
 
 .goods-info {
-  width: 100%;
-  background-color: #fff;
-  margin-bottom: 20rpx;
+    width: 100%;
+    background-color: #fff;
+    margin-bottom: 20rpx;
 }
 
 .goods-info .row-box {
-  width: calc(100% - 30rpx);
-  display: flex;
-  justify-content: space-between;
-  /* align-items: center; */
-  box-sizing: border-box;
-  padding: 30rpx 30rpx 30rpx 0;
-  margin-left: 30rpx;
-  border-bottom: 1px solid #f5f5f5;
-  font-size: 26rpx;
-  color: #000;
+    width: calc(100% - 30rpx);
+    display: flex;
+    justify-content: space-between;
+    /* align-items: center; */
+    box-sizing: border-box;
+    padding: 30rpx 30rpx 30rpx 0;
+    margin-left: 30rpx;
+    border-bottom: 1px solid #f5f5f5;
+    font-size: 26rpx;
+    color: #000;
 }
+
 .goods-info .row-box .row-label {
-  width: calc(100% - 140rpx);
+    width: calc(100% - 140rpx);
 }
 
 .goods-info .row-box .right-text {
-  text-align: right;
+    text-align: right;
 }
 
 .goods-info .row-box .right-text.r_color {
-  font-weight: 600;
+    font-weight: 600;
 }
 
 .order_info {
-  width: 100%;
-  background-color: #fff;
-  box-sizing: border-box;
-  padding: 16rpx 30rpx;
-  margin-bottom: 20rpx;
+    width: 100%;
+    background-color: #fff;
+    box-sizing: border-box;
+    padding: 16rpx 30rpx;
+    margin-bottom: 20rpx;
 }
 
 .order_info .li_box {
-  line-height: 1.6;
-  padding: 10rpx 0;
-  font-size: 26rpx;
-  color: #999;
+    line-height: 1.6;
+    padding: 10rpx 0;
+    font-size: 26rpx;
+    color: #999;
 }
 
 .order_info .li_box .info_data {
-  display: inline-block;
-  color: #000;
+    display: inline-block;
+    color: #000;
 }
 
 .jiesuan-box {
-  display: flex;
-  justify-content: space-between;
-  width: 100%;
-  height: 100rpx;
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  border-top: 1px solid #eee;
-  background-color: #fff;
+    display: flex;
+    justify-content: space-between;
+    width: 100%;
+    height: 100rpx;
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    border-top: 1px solid #eee;
+    background-color: #fff;
 }
 
 .jiesuan-box .to-pay-btn {
-  width: 250rpx;
-  text-align: center;
-  height: 100%;
-  line-height: 100rpx;
-  background-color: #fa2f2e;
-  font-size: 32rpx;
-  color: #fff;
-  border-radius: 0;
+    width: 250rpx;
+    text-align: center;
+    height: 100%;
+    line-height: 100rpx;
+    background-color: #fa2f2e;
+    font-size: 32rpx;
+    color: #fff;
+    border-radius: 0;
 }
 
 .jiesuan-box .left-price {
-  display: flex;
-  width: 500rpx;
-  justify-content: flex-start;
-  line-height: 100rpx;
-  padding: 0 30rpx;
-  font-size: 28rpx;
-  box-sizing: border-box;
+    display: flex;
+    width: 500rpx;
+    justify-content: flex-start;
+    line-height: 100rpx;
+    padding: 0 30rpx;
+    font-size: 28rpx;
+    box-sizing: border-box;
 }
 
 .jiesuan-box .total {
-  text-align: right;
+    text-align: right;
 }
 
 .jiesuan-box .total .total_price {
-  color: #fa2f2e;
-  font-weight: 600;
-  display: inline-flex;
+    color: #fa2f2e;
+    font-weight: 600;
+    display: inline-flex;
 }
 
 .logistics_btn {
-  padding: 24rpx 24rpx 24rpx 30rpx;
-  width: 100%;
-  overflow: hidden;
-  box-sizing: border-box;
-  font-size: 26rpx;
-  line-height: 1.6;
-  background-color: #fff;
-  margin-bottom: 20rpx;
+    padding: 24rpx 24rpx 24rpx 30rpx;
+    width: 100%;
+    overflow: hidden;
+    box-sizing: border-box;
+    font-size: 26rpx;
+    line-height: 1.6;
+    background-color: #fff;
+    margin-bottom: 20rpx;
 }
+
 .l_box {
-  width: 100%;
-  box-sizing: border-box;
-  overflow: hidden;
-  padding: 0 28rpx 0 64rpx;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  /* background: url(http://xcx.soowin.com/images/logis_icon.png) no-repeat left top, url(http://xcx.soowin.com/images/arrow-right.png) no-repeat right center;
-	background-size: 46rpx auto, 16rpx auto; */
-  background: url(http://xcx.soowin.com/images/logis_icon.png) no-repeat left
-    top;
-  background-size: 46rpx auto;
+    width: 100%;
+    box-sizing: border-box;
+    overflow: hidden;
+    padding: 0 28rpx 0 64rpx;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    /* background: url(http://xcx.soowin.com/images/logis_icon.png) no-repeat left top, url(http://xcx.soowin.com/images/arrow-right.png) no-repeat right center;
+  background-size: 46rpx auto, 16rpx auto; */
+    background: url(http://xcx.soowin.com/images/logis_icon.png) no-repeat left top;
+    background-size: 46rpx auto;
 }
+
 .detail_btn-row-box {
-  height: 104rpx;
+    height: 104rpx;
 }
+
 .detail_btn-row {
-  width: 100%;
-  height: 104rpx;
-  padding: 18rpx 30rpx;
-  box-sizing: border-box;
-  overflow: hidden;
-  position: fixed;
-  left: 0;
-  bottom: 0;
-  background: #fff;
-  display: flex;
-  justify-content: flex-end;
-  font-size: 26rpx;
-  align-items: center;
-  box-shadow: 0rpx -2rpx 16rpx rgba(0, 0, 0, 0.04);
+    width: 100%;
+    height: 104rpx;
+    padding: 18rpx 30rpx;
+    box-sizing: border-box;
+    overflow: hidden;
+    position: fixed;
+    left: 0;
+    bottom: 0;
+    background: #fff;
+    display: flex;
+    justify-content: flex-end;
+    font-size: 26rpx;
+    align-items: center;
+    box-shadow: 0rpx -2rpx 16rpx rgba(0, 0, 0, 0.04);
 }
+
 .detail_btn-row .btn {
-  box-sizing: border-box;
-  text-align: center;
-  border-radius: 6rpx;
-  margin-left: 20rpx;
-  border: 1rpx solid #ccc;
-  padding: 16rpx 24rpx;
+    box-sizing: border-box;
+    text-align: center;
+    border-radius: 6rpx;
+    margin-left: 20rpx;
+    border: 1rpx solid #ccc;
+    padding: 16rpx 24rpx;
 }
+
 .detail_btn-row .topay-btn {
-  border-color: #e05f0b;
-  background-color: #e05f0b;
-  color: #fff;
+    border-color: #e05f0b;
+    background-color: #e05f0b;
+    color: #fff;
 }
+
 .footerMargin {
-  margin-bottom: 104rpx;
+    margin-bottom: 104rpx;
 }
 
 // 备注
 .remark {
-  width: 100%;
-  overflow: hidden;
-  background: #fff;
-  padding: 30rpx;
-  box-sizing: border-box;
-  margin-top: 3rpx;
+    width: 100%;
+    overflow: hidden;
+    background: #fff;
+    padding: 30rpx;
+    box-sizing: border-box;
+    margin-top: 3rpx;
 }
+
 // 备注-end
-</style>
+</style>

+ 67 - 235
src/pages/szw-order-list/index.vue

@@ -11,7 +11,6 @@
           :data-index="item[0]"
         >
           {{ item[1] }}
-          <!-- {{index && (index+1) != statusType.length ? item[2] ? '(' + item[2] + ')' : '(0)' : ''}} -->
         </view>
       </view>
     </view>
@@ -22,152 +21,57 @@
         <view class="a-order">
           <view class="overflow" :data-id="li.id">
             <view class="list-title flex_r flex_ac flex_jb ellipsis">
-              <view class="flex_r flex_ac">
-                <view class="imgs_bar avaImgs">
-                  <image
-                    class="image"
-                    :src="pt.platFormLogo"
-                    mode="widthFix"
-                  /> </view
-                >{{ pt.platFormName }}
-              </view>
-              <view
-                class="fz_text r_color"
-                v-if="li.data.assembleType != 1 && li.data.assembleStatus == 1"
-                >正在拼团中</view
-              >
-              <view class="fz_text" v-else>{{ li.data.statusMsg }}</view>
+              <view class="fz_text">{{
+                tidyStatus([li.pay_status, li.order_status])
+              }}</view>
             </view>
             <view
               class="goods-info flex_r flex_ac flex_jb"
               :data-type="li.type"
-              :data-id="li.data.orderDetailId"
               @tap="toDetails(li)"
             >
               <view class="goods-info-bar overflow flex_r flex_ac">
-                <block v-if="li.type == 1 || li.data.orderTypes == 4">
-                  <view class="imgs_bar img-box">
-                    <image
-                      :src="li.data.image"
-                      mode=""
-                      class="goods-img"
-                    ></image>
-                  </view>
-                  <view class="goods_name ellipsis2">{{
-                    li.data.goodsName || ""
-                  }}</view>
-                </block>
-                <block v-else>
-                  <scroll-view class="goods-img-container" scroll-x="true">
-                    <view
-                      class="imgs_bar img-box"
-                      v-for="(item, ind) in li.data.imgs"
-                      :key="ind"
-                    >
-                      <image :src="item" mode="" class="goods-img"></image>
-                    </view>
-                  </scroll-view>
-                </block>
+                <view class="imgs_bar img-box">
+                  <image
+                    :src="li.original_img"
+                    mode=""
+                    class="goods-img"
+                  ></image>
+                </view>
+                <view class="goods_name ellipsis2">{{
+                  li.goods_name || ""
+                }}</view>
               </view>
               <view class="goodsDetail_info">
-                <view class="goods_price r_color" v-if="li.data.orderTypes != 5"
-                  >¥<text class="r_color">{{ li.data.totalPrice }}</text></view
-                >
-                <view class="goods_price r_color" v-if="li.data.orderTypes == 5"
-                  ><text class="r_color">{{ li.data.integral }}</text
-                  >积分</view
+                <view class="goods_price r_color"
+                  >¥<text class="r_color">{{ li.total_amount }}</text></view
                 >
-                <view class="unimport">共{{ li.data.buyCount }}件</view>
+                <view class="unimport">共{{ li.goods_num }}件</view>
               </view>
             </view>
           </view>
           <view class="price-box flex_r flex_ac">
-            <view class="ptz" v-if="li.data.orderTypes == 7">
-              拼团金:{{ li.data.totalAccountSpell }}
-            </view>
             <view
               class="btn cancel-btn"
-              :data-type="li.type"
-              :data-types="li.data.orderTypes"
-              :data-id="li.data.orderDetailId"
               @tap="toCancel"
-              v-if="li.data.status == 2"
+              v-if="li.pay_status === 0"
               >取消订单</view
             >
+            <view class="btn topay-btn" @tap="toPay" v-if="li.pay_status === 0"
+              >立即支付</view
+            >
+            <view
+              class="btn cancel-btn"
+              @click="toDetails(li)"
+              v-if="li.pay_status != 0"
+              >查看订单</view
+            >
             <view
               class="btn topay-btn"
-              :data-id="li.data.orderDetailId"
-              :data-index="index"
-              :data-ojsType="li.data.ojsType"
-              @tap="toPay"
-              v-if="li.data.status == 2"
-              >立即支付</view
+              @tap="toTake"
+              v-if="[0, 1].includes(li.order_status)"
+              >确认收货</view
             >
-
-            <block v-else>
-              <block
-                v-if="
-                  (li.data.status == 4 || li.data.status == 5) &&
-                  li.returnType == 1 &&
-                  li.data.orderTypes != 2
-                "
-              >
-                <view
-                  class="btn"
-                  :data-orderno="li.data.orderNo"
-                  v-if="li.data.assembleStatus == 2"
-                  >拼团成功</view
-                >
-                <view
-                  v-if="li.refundId"
-                  class="btn"
-                  :class="li && li.refundId ? 'topay-btn' : 'cancel-btn'"
-                  :data-type="li.type"
-                  :data-id="li.data.orderDetailId"
-                  :data-reid="li.refundId"
-                  @tap="toRefundDetails(li)"
-                >
-                  退款中
-                </view>
-                <view
-                  v-else
-                  class="btn"
-                  :class="li && li.refundId ? 'topay-btn' : 'cancel-btn'"
-                  :data-type="li.type"
-                  :data-id="li.data.orderDetailId"
-                  :data-reid="li.refundId"
-                  @tap="toRefund(li)"
-                >
-                  退货/退款
-                </view>
-              </block>
-              <view
-                class="btn cancel-btn"
-                v-if="li.data.status != 2"
-                :data-type="li.type"
-                :ata-id="li.data.orderDetailId"
-                @tap="toDetail(li)"
-                >查看订单</view
-              >
-              <view
-                class="btn topay-btn"
-                :data-id="li.data.orderDetailId"
-                :data-status="li.data.status"
-                :data-type="li.type"
-                @tap="toTake"
-                v-if="li.data.status == 4 || li.data.status == 3"
-                >确认收货</view
-              >
-              <view
-                class="btn topay-btn"
-                :data-type="li.type"
-                :data-id="li.data.orderDetailId"
-                :data-no="li.data.orderNo"
-                @tap="toCommen"
-                v-if="li.comType && li.comType == 1"
-                >去评价</view
-              >
-            </block>
           </view>
         </view>
         <!-- 未付款 end -->
@@ -199,14 +103,14 @@ export default {
   data() {
     return {
       statusType: [
-        ["1", "全部"],
-        ["2", "待付款"],
-        ["3", "待发货"],
-        ["4", "待收货"],
-        ["5", "已收货"],
+        ["0", "全部"],
+        ["1", "待付款"],
+        ["2", "待发货"],
+        ["3", "待收货"],
+        ["4", "已收货"],
       ],
       orderList: [],
-      currentType: "1",
+      currentType: "0",
       haveGoods: false,
       loadingMoreHidden: true,
       loadingTip: "没有更多了",
@@ -215,29 +119,11 @@ export default {
       pt: {},
     };
   },
-  onLoad: function (options) {
-    var that = this;
-    this.currentType = options.status ? options.status : 1;
-	
+  onLoad(options) {
+    // this.currentType = options.status ? options.status : 1;
   },
-  onShow: function () {
-    let that = this;
-    const userId =
-      app.globalData.systemUserInfo && app.globalData.systemUserInfo.userId
-        ? app.globalData.systemUserInfo.userId
-        : "";
-    if (!userId || userId == "" || userId == undefined) {
-      // that.showAuth=true
-      appEv.authorizeUserInfo((res) => {
-        if (res) {
-          that.clearData();
-          that.loadData();
-        }
-      }, true);
-    } else {
-      that.clearData();
-      that.loadData();
-    }
+  onShow() {
+    this.loadData();
   },
   methods: {
     returnBtn: function () {
@@ -261,17 +147,17 @@ export default {
       });
       var data = {
         page,
-        status: this.currentType == 1 ? "" : this.currentType,
+        type: this.currentType,
       };
 
-      u_post("ShuZiTeaYW/shop/pendingPayment", data).then(res => {
-        if (res.status == 200) {
+      post("my/order", data).then((res) => {
+        if (res.code === 0) {
           if (res) {
             setTimeout(() => {
               uni.hideLoading();
             }, 100);
             uni.stopPullDownRefresh();
-            var resData = res.mallGoods;
+            var resData = res.data.data.data;
             if (resData && resData.length <= 0) {
               if (page <= 1) {
                 this.haveGoods = true;
@@ -292,63 +178,24 @@ export default {
         } else {
           appEv.errTips(res.msg || "");
           if (res.status == 999) {
-            // that.arrangeData(res.data.data);
             page = -1;
             this.loadingMoreHidden = false;
           }
         }
       });
     },
-    toDetails(data) {
-      if (data.data.orderTypes == 4) {
-        uni.navigateTo({
-          url:
-            "/pages/szw-order-details/index?id=" +
-            data.data.orderDetailId +
-            "&type=1",
-        });
-      } else {
-        uni.navigateTo({
-          url:
-            "/pages/szw-order-details/index?id=" +
-            data.data.orderDetailId +
-            "&type=" +
-            data.type,
-        });
-      }
-    },
-    toDetail: function (data) {
-      if (data.data.orderTypes == 4) {
-        uni.navigateTo({
-          url:
-            "/pages/szw-order-details/index?id=" +
-            data.data.orderDetailId +
-            "&type=1",
-        });
-      } else {
-        uni.navigateTo({
-          url:
-            "/pages/szw-order-details/index?id=" +
-            data.data.orderDetailId +
-            "&type=" +
-            data.type,
-        });
-      }
-    },
-    toRefund(data) {
+    toDetails(da) {
+      console.log(da);
       uni.navigateTo({
-        url:
-          "/pages/order-refund/index?id=" +
-          data.data.orderDetailId +
-          "&type=" +
-          data.type,
+        url: "/pages/szw-order-details/index",
       });
-    },
-    toRefundDetails(data) {
+      return
       uni.navigateTo({
-        url: "/pages/order-refund-details/index?id=" + data.refundId,
+        url: "/pages/autonym-submit/index",
       });
+      // this.goto("/pages/szw-order-details/index",{id: data.order_id})
     },
+
     // 立即支付
     toPay(e) {
       var orderDetailIds = e.currentTarget.dataset.id;
@@ -473,46 +320,18 @@ export default {
       this.statusType = statusType;
     },
     //菜单切换
-    statusTap: function (e) {
+    statusTap(e) {
       //重置数据
       var curType = e.currentTarget.dataset.index;
       this.currentType = curType;
       this.clearData(false, this.loadData);
     },
-    // 跳转拼团分享页面
-    toTuanShare(e) {
-      uni.navigateTo({
-        url:
-          "/pages/tuan-share-info/index?orderNo=" +
-          e.currentTarget.dataset.orderno,
-      });
-    },
-    // 加评价
-    toCommen(e) {
-      let id = e.currentTarget.dataset.id;
-      let no = e.currentTarget.dataset.no;
-      let orderType = e.currentTarget.dataset.type;
-      uni.navigateTo({
-        url:
-          "/pages/add-goods-commen/index?orderId=" +
-          id +
-          "&orderNo=" +
-          no +
-          "&orderType=" +
-          orderType,
-      });
-    },
-    pageBack: function () {
-      uni.reLaunch({
-        url: "/pages/my/index",
-      });
-    },
   },
   //上拉加载事件
-  onReachBottom: function () {
+  onReachBottom() {
     if (page != -1) {
       var that = this;
-      setTimeout(function () {
+      setTimeout(() => {
         // 为页数迭加1
         ++page;
         that.loadData();
@@ -520,12 +339,25 @@ export default {
     }
   },
   // 下拉刷新
-  onPullDownRefresh: function () {
+  onPullDownRefresh() {
     var that = this;
     that.clearData(false, () => {
       that.loadData();
     });
   },
+  computed: {
+    tidyStatus() {
+      return (da) => {
+        if (da[0] === 0) return "待支付";
+        if (da[1] === 0) return "待发货";
+        if (da[1] === 1) return "待收货";
+        if (da[1] === 2) return "已收货";
+        if (da[1] === 3) return "申请退货";
+        if (da[1] === 4) return "已退货";
+        if (da[1] === 5) return "已作废";
+      };
+    },
+  },
 };
 </script>
 

BIN
src/static/order-details/icon-address.png


BIN
src/static/order-details/icon-ddfh.png


BIN
src/static/order-details/icon-ddfk.png


BIN
src/static/order-details/icon-ddgb.png


BIN
src/static/order-details/icon-ddsh.png


BIN
src/static/order-details/icon-jycg.png


BIN
src/static/order-details/icon-wuliu.png