Browse Source

商品销售走数量、销售金额对接,首页基本完成,订单列表,订单查询对接

ltx529596 4 năm trước cách đây
mục cha
commit
41ee2147a7

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 21 - 0
src/components/uni-load-more/uni-load-more.vue


+ 4 - 2
src/pages.json

@@ -5,7 +5,8 @@
       "style":{
         "navigationBarTitleText": "登陆",
         "navigationBarTextStyle": "black",
-        "navigationBarBackgroundColor":"#ffffff"
+        "navigationBarBackgroundColor":"#ffffff",
+        "enablePullDownRefresh":true
       }
     },
     {
@@ -57,7 +58,8 @@
       "style":{
         "navigationBarTitleText": "订单管理",
         "navigationBarTextStyle": "black",
-        "navigationBarBackgroundColor":"#ffffff"
+        "navigationBarBackgroundColor":"#ffffff",
+        "enablePullDownRefresh": true
       }
     },
 		{

+ 308 - 37
src/pages/index/index.vue

@@ -190,6 +190,41 @@
 					<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
 						<view class="qiun-title-dot-light">数据概况</view>
 					</view>
+          <!-- 产品销售数量走势 -->
+					<view class="echarts shopsell">
+						<view class="title">
+							<view class="left">
+								<text class="future">产品销售数量走势:<text class="num">0</text>
+									<text class="yesterday">昨日全天:<text class="daynum">0</text></text>
+								</text>
+							</view>
+							<view class="right">
+                <view class="today-icon"></view><text class="title">今日</text>
+								<view class="yesterday-icon"></view><text class="title">昨日</text>
+							</view>
+						</view>
+						<view class="qiun-charts">
+							<canvas canvas-id="shopsellEcharts" id="shopsellEcharts" class="shopsellEcharts" disable-scroll=true  @touchend="shopSellEndTouch"></canvas>
+						</view>
+					</view>
+          <!-- 产品销售金额走势 -->
+					<view class="echarts shopmoney">
+						<view class="title">
+							<view class="left">
+								<text class="future">产品销售金额走势:<text class="num">0</text>
+									<text class="yesterday">昨日全天:<text class="daynum">0</text></text>
+								</text>
+							</view>
+							<view class="right">
+								<view class="today-icon"></view><text class="title">今日</text>
+								<view class="yesterday-icon"></view><text class="title">昨日</text>
+							</view>
+						</view>
+						<view class="qiun-charts">
+							<canvas canvas-id="shopmoneyEcharts" id="shopmoneyEcharts" class="shopmoneyEcharts" @touchstart="shopMoneyTouch"></canvas>
+						</view>
+					</view>
+          <!-- 未来7天预定 -->
 					<view class="echarts">
 						<view class="title">
 							<view class="left">
@@ -199,7 +234,6 @@
 							</view>
 							<view class="right">
 								<view class="today-icon"></view><text class="title">今日</text>
-								<view class="yesterday-icon"></view><text class="title">昨日</text>
 							</view>
 						</view>
 						<view class="qiun-charts">
@@ -234,6 +268,8 @@ import moment from '@/common/moment';
 let _self;
 let canvaLineA = null;
 let canvaPie = null;
+let shopSellLine = null;
+let shopMoneyLine = null;
 export default {
   name: 'Header',
   data() {
@@ -242,8 +278,22 @@ export default {
       shopArray: [{ name: '全部', id: 0 }],
       shopID: 0,
       index: 0,
+      // 商品销售走势
+      shopwidth: '',
+      shopheight: '',
+
+      // 销售金额走势
+      moneywidth: '',
+      moneyheight: '',
+
+      // 未来七天
       cWidth: '',
       cHeight: '',
+
+      // 饼图数据
+      bWidth: '',
+      bHeight: '',
+
       pixelRatio: 1, // 像素比
       ordernum: null, // 订单号
       today: moment().format('YYYY-MM-DD'),
@@ -278,10 +328,6 @@ export default {
         payorder: 0,
         refund: 0,
       },
-
-      // 饼图数据
-      bWidth: '',
-      bHeight: '',
     };
   },
   // 此处定义传入的数据
@@ -302,10 +348,12 @@ export default {
     this.getShopList();
     this.getExponentData();
     this.getPendingData();
+    this.shopSellTrend();
+    this.shopSellMoneyTrend();
     this.futureDayData();
     this.shopSellData();
 
-    this.loading = false
+    this.loading = false;
   },
   methods: {
     // 选择商铺
@@ -317,13 +365,16 @@ export default {
       this.getPendingData();
       this.futureDayData();
       this.shopSellData();
+      this.shopSellTrend();
+      this.shopSellMoneyTrend();
     },
+
     // 跳转设置页
     tosetting() {
       this.$mRouter.push({ route: '/pages/index/setting/setting' });
     },
 
-    // 获取店铺列表h
+    // 获取店铺列表
     async getShopList() {
       await this.$http.get('/homePage/getShopByMerId').then((res) => {
         if (res.data && res.code === 200) {
@@ -408,6 +459,7 @@ export default {
           }
         });
     },
+
     // 扫码订单
     scanCode() {
       // 允许从相机和相册扫码
@@ -418,6 +470,7 @@ export default {
         },
       });
     },
+
     // 搜索订单
     searchOrder() {
       // 判断该订单是否兑换,存在等状态,若存在且未使用(两个状态),则跳转订单兑换页面
@@ -425,6 +478,204 @@ export default {
       this.$mRouter.push({ route: '/pages/index/conversion' });
     },
 
+    // 商品销售走势
+    async shopSellTrend() {
+      if (this.shopID === 0) {
+        this.shopI = '';
+      }
+      await this.$http
+        .get('/homePage/getData2', {
+          date: this.today,
+          shopId: this.shopID,
+        })
+        .then(async (res) => {
+          if (res.data) {
+            let shopSellData = {
+              xdata: [],
+              jrdata: [],
+              zrdata: [],
+            };
+
+            res.data.forEach((ele) => {
+              shopSellData.xdata.push(ele.time);
+              shopSellData.jrdata.push(ele.jr);
+              shopSellData.zrdata.push(ele.zr);
+            });
+            _self.shopSellEcharts('shopsellEcharts', shopSellData);
+          }
+        });
+    },
+    shopSellEcharts(id, echartsData) {
+      shopSellLine = new uCharts({
+        $this: _self,
+        canvasId: id,
+        type: 'line',
+        fontSize: 12,
+        legend: {
+          show: false,
+        },
+        dataLabel: true,
+        duration: 500,
+        dataPointShape: false, // 折点
+        background: '#FFFFFF',
+        pixelRatio: _self.pixelRatio,
+        categories: echartsData.xdata, // x轴数据
+        series: [
+          {
+            textColor:'#ffcc01',
+            color: '#ffcc01',
+            data: echartsData.jrdata,
+            name: '今日',
+            pointShape: 'circle',
+            show: true,
+            type: 'line',
+          },
+          {
+            color: '#7d66f3',
+            textColor:'#7d66f3',
+            data: echartsData.zrdata,
+            name: '昨日',
+            pointShape: 'circle',
+            show: true,
+            type: 'line',
+          },
+        ], // 值
+        animation: true,
+        // enableScroll: true,
+        xAxis: {
+          type: 'grid',
+          disableGrid: true,
+          labelCount: 7
+        },
+        yAxis: {
+          gridType: 'solid',
+          gridColor: '#cccccc',
+          min: 0,
+          max: 180,
+          data: [
+          {
+            axisLine: false,
+            format: (val) => {
+            return val.toFixed(0);
+          },
+          }],
+        },
+        width: _self.cWidth * _self.pixelRatio,
+        height: _self.cHeight * _self.pixelRatio,
+        padding: [15,15,4,15],
+        extra: {
+          line: {
+            type: 'curve', // 平滑曲线; straight直线
+          },
+        },
+      });
+    },
+    shopSellEndTouch(e) {
+      shopSellLine.showToolTip(e, {
+					format: function (item, category) {
+						return category + ' ' + item.name + ':' + item.data 
+					}
+				});
+    },
+
+    // 商品销售金额走势
+    async shopSellMoneyTrend() {
+      if (this.shopID === 0) {
+        this.shopI = '';
+      }
+      await this.$http
+        .get('/homePage/getData3', {
+          date: this.today,
+          shopId: this.shopID,
+        })
+        .then(async (res) => {
+          if (res.data) {
+            let shopMoney = {
+              xdata: [],
+              jrdata: [],
+              zrdata: [],
+            };
+
+            res.data.forEach((ele) => {
+              shopMoney.xdata.push(ele.time);
+              shopMoney.jrdata.push(ele.jr);
+              shopMoney.zrdata.push(ele.zr);
+            });
+            _self.shopMoneyEcharts('shopmoneyEcharts', shopMoney);
+          }
+        });
+    },
+    shopMoneyEcharts(id, echartsData) {
+      shopMoneyLine = new uCharts({
+        $this: _self,
+        canvasId: id,
+        type: 'line',
+        fontSize: 12,
+        legend: {
+          show: false,
+        },
+        dataLabel: true, // 图表中是否显示数据
+        duration: 500,
+        dataPointShape: false, // 折点
+        background: '#FFFFFF',
+        pixelRatio: _self.pixelRatio,
+        categories: echartsData.xdata, // x轴数据
+        series: [
+          {
+            textColor: '#f79554',            
+            color: '#f79554',
+            data: echartsData.jrdata,
+            name: '今日',
+            pointShape: 'circle',
+            show: true,
+            type: 'line',
+          },
+          {
+            color: '#2ad3a1',
+            textColor: '#2ad3a1',
+            data: echartsData.zrdata,
+            name: '昨日',
+            pointShape: 'circle',
+            show: true,
+            type: 'line',
+          },
+        ], // 值
+        animation: true,
+        xAxis: {
+          type: 'grid',
+          disableGrid: true,
+          labelCount: 7
+        },
+        yAxis: {
+          gridType: 'solid',
+          gridColor: '#CCCCCC',
+          min: 0,
+          max: 180,
+          data: [{ 
+            axisLine: false,
+            format: (val) => {
+              return val.toFixed(2);
+            }
+          }],
+        },
+        width: _self.cWidth * _self.pixelRatio,
+        height: _self.cHeight * _self.pixelRatio,
+        padding: [15,15,4,15],
+        extra: {
+          line: {
+            type: 'curve', // 平滑曲线; straight直线
+          },
+        },
+      });
+    },
+    shopMoneyTouch(e) {
+      shopMoneyLine.showToolTip(e, {
+        format: function (item, category) {
+          return category + ' ' + item.name + ':' + item.data;
+        },
+      });
+    },
+
     // 未来七天
     async futureDayData() {
       if (this.shopID === 0) {
@@ -449,26 +700,6 @@ export default {
           }
         });
     },
-
-    // 商品销售占比
-    async shopSellData() {
-      await this.$http.get('/homePage/getData1', {
-        date: this.today,
-        shopId: this.shopID,
-      }).then(async (res) => {
-        let pie = {
-          series: [],
-        };
-        if (res.data.length > 0) {
-          pie.series = res.data;
-          _self.showPie('shopecharts', pie);
-        } else {
-          pie.series = [{ name: '无数据', data: 0 }];
-          _self.showPie('shopecharts', pie);
-        }
-      });
-    },
-
     // 折线图表
     showLineA(canvasId, chartData) {
       canvaLineA = new uCharts({
@@ -479,7 +710,7 @@ export default {
         legend: {
           show: false,
         },
-        dataLabel: false, // 图表中是否显示数据
+        dataLabel: true, // 图表中是否显示数据
         duration: 500,
         dataPointShape: false, // 折点
         background: '#FFFFFF',
@@ -505,13 +736,16 @@ export default {
           gridColor: '#CCCCCC',
           min: 0,
           max: 180,
-          data: [{ axisLine: false }],
-          format: (val) => {
-            return val.toFixed(0) + '元';
-          },
+          data: [{
+            axisLine: false,
+            format: (val) => {
+              return val.toFixed(0);
+            },
+          }],
         },
         width: _self.cWidth * _self.pixelRatio,
         height: _self.cHeight * _self.pixelRatio,
+        padding: [15,15,4,15],
         extra: {
           line: {
             type: 'curve', // 平滑曲线; straight直线
@@ -519,7 +753,6 @@ export default {
         },
       });
     },
-
     touchLineA(e) {
       canvaLineA.showToolTip(e, {
         format: function (item, category) {
@@ -528,6 +761,30 @@ export default {
       });
     },
 
+    // 商品销售占比
+    async shopSellData() {
+      await this.$http
+        .get('/homePage/getData1', {
+          // date: this.today,
+          date: '2020-07-28',
+          shopId: this.shopID
+        })
+        .then(async (res) => {
+          let pie = {
+            series: [],
+          };
+          if (res.data.length > 0) {
+            for (let i = 0; i < res.data.length; i++) {
+              let element = res.data[i];
+              pie.series.push({name: element.name, data: element.value})
+            }
+            _self.showPie('shopecharts', pie);
+          } else {
+            pie.series = [{ name: '无数据', data: 0 }];
+            _self.showPie('shopecharts', pie);
+          }
+        });
+    },
     // 饼图
     showPie(canvasId, chartData) {
       canvaPie = new uCharts({
@@ -550,8 +807,8 @@ export default {
         pixelRatio: _self.pixelRatio,
         series: chartData.series,
         animation: true,
-        width: _self.cWidth * _self.pixelRatio,
-        height: _self.cHeight * _self.pixelRatio,
+        width: _self.bWidth * _self.pixelRatio,
+        height: _self.bHeight * _self.pixelRatio,
         dataLabel: true,
         extra: {
           pie: {
@@ -566,7 +823,7 @@ export default {
           return item.name + ':' + item.data;
         },
       });
-    }
+    },
   },
 };
 </script>
@@ -874,6 +1131,7 @@ export default {
       .echarts {
         background-color: #ffffff;
         border-radius: 10rpx;
+        margin-bottom: 30upx;
       }
 
       .title {
@@ -887,7 +1145,7 @@ export default {
 
         .left {
           .future {
-            font-size: 26rpx;
+            font-size: 28rpx;
 
             .num {
               font-size: 30rpx;
@@ -947,6 +1205,19 @@ export default {
         width: 690rpx;
         height: 300rpx;
       }
+
+      .shopsell {
+        .shopsellEcharts {
+          width: 690rpx;
+          height: 300rpx;
+        }
+      }
+      .shopmoney {
+        .shopmoneyEcharts {
+          width: 690rpx;
+          height: 300rpx;
+        }
+      }
     }
 
     .shop-echarts-warp {

+ 264 - 31
src/pages/order/order.vue

@@ -5,13 +5,18 @@
       <view class="header-search">
         <view class="uni-list-cell">
           <view class="uni-list-cell-db">
-            <picker @change="bindPickerChange" :value="index" :range="array">
-              <view class="uni-input">{{ array[index] }}</view>
+            <picker
+              @change="bindPickerChange"
+              :value="index"
+              :range="shopArray"
+              range-key="name"
+            >
+              <view class="uni-input">{{ shopArray[index].name }}</view>
             </picker>
             <image
               src="../../static/images/garydownicon.png"
               mode=""
-               class="icon"
+              class="icon"
             ></image>
           </view>
         </view>
@@ -21,21 +26,34 @@
             placeholder-style="color:#a3a8a8;font-size:10px;"
             placeholder="请输入订单号或手机号、身份证号"
             class="cellphone"
+            v-model="orderbynumber"
           />
-          <text class="txt">搜索</text>
+          <text class="txt" @tap="orderByNum">搜索</text>
         </view>
         <view class="btn-time">
           <image
             src="../../static/images/timeIcon.png"
             class="timeicon"
           ></image>
-          <text class="screen">按时间</text>
+          <view class="dateSelect">
+            <view class="uni-list">
+              <view class="uni-list-cell">
+                <view class="uni-list-cell-db">
+                  <picker mode="date" :value="date" @change="bindDateChange">
+                    <view class="uni-input">{{
+                      date.slice(5) ? date.slice(5) : '日期'
+                    }}</view>
+                  </picker>
+                </view>
+              </view>
+            </view>
+          </view>
         </view>
       </view>
       <view class="header-bar">
         <view
           class="item"
-          @tap="changeTab(1)"
+          @tap="changeTab(1, 'pay')"
           :class="{ active: isactive === 1 }"
         >
           <view class="ordertype">已付款</view>
@@ -43,7 +61,7 @@
         </view>
         <view
           class="item"
-          @tap="changeTab(2)"
+          @tap="changeTab(2, 'accomplish')"
           :class="{ active: isactive === 2 }"
         >
           <view class="ordertype">已完成</view>
@@ -51,7 +69,7 @@
         </view>
         <view
           class="item"
-          @tap="changeTab(3)"
+          @tap="changeTab(3, 'refundorder')"
           :class="{ active: isactive === 3 }"
         >
           <view class="ordertype">退款</view>
@@ -61,54 +79,274 @@
       </view>
     </view>
     <view style="height: 192upx;"></view>
+
     <view class="order-content" v-if="isactive === 1">
-      <view class="order-list" @tap='todetail'>
+      <view
+        class="order-list"
+        @tap="todetail"
+        v-for="(item, index) in orderList"
+        :key="index"
+      >
         <view class="order-title">
           <text class="ordernum"
-            >订单号:<text class="num">15648464184616</text></text
+            >订单号:<text class="num">{{ item.ordersNo }}</text></text
           >
-          <text class="ordertime">09:26</text>
+          <text class="ordertime">{{ item.orderTime.substring(11) }}</text>
         </view>
         <view class="order-detail">
-          <view class="name">仙女山成人票</view>
-          <view class="door">门店:<text class="message">1</text></view>
-          <view class="num">门店:<text class="message">2</text></view>
-          <view class="status">门店:<text class="message">3</text></view>
-          <view class="playtime">门店:<text class="message">4</text></view>
+          <view class="name">{{ item.goodsName }}</view>
+          <view class="door"
+            >门店:<text class="message">{{ item.merchName }}</text></view
+          >
+          <view class="num"
+            >数量:<text class="message">{{ item.num }}</text></view
+          >
+          <view class="status"
+            >状态:<text class="message">{{ item.statusName }}</text></view
+          >
+          <view class="playtime"
+            >游玩时间:<text class="message">{{ item.palyTime }}</text></view
+          >
         </view>
       </view>
     </view>
+    <view class="order-content" v-if="isactive === 2">
+      <view
+        class="order-list"
+        @tap="todetail"
+        v-for="(item, index) in orderList"
+        :key="index"
+      >
+        <view class="order-title">
+          <text class="ordernum"
+            >订单号:<text class="num">{{ item.ordersNo }}</text></text
+          >
+          <text class="ordertime">{{ item.orderTime.substring(11) }}</text>
+        </view>
+        <view class="order-detail">
+          <view class="name">{{ item.goodsName }}</view>
+          <view class="door"
+            >门店:<text class="message">{{ item.merchName }}</text></view
+          >
+          <view class="num"
+            >数量:<text class="message">{{ item.num }}</text></view
+          >
+          <view class="status"
+            >状态:<text class="message">{{ item.statusName }}</text></view
+          >
+          <view class="playtime"
+            >游玩时间:<text class="message">{{ item.palyTime }}</text></view
+          >
+        </view>
+      </view>
+    </view>
+    <view class="order-content" v-if="isactive === 3">
+      <view
+        class="order-list"
+        @tap="todetail"
+        v-for="(item, index) in orderList"
+        :key="index"
+      >
+        <view class="order-title">
+          <text class="ordernum"
+            >订单号:<text class="num">{{ item.ordersNo }}</text></text
+          >
+          <text class="ordertime">{{ item.orderTime.substring(11) }}</text>
+        </view>
+        <view class="order-detail">
+          <view class="name">{{ item.goodsName }}</view>
+          <view class="door"
+            >门店:<text class="message">{{ item.merchName }}</text></view
+          >
+          <view class="num"
+            >数量:<text class="message">{{ item.num }}</text></view
+          >
+          <view class="status"
+            >状态:<text class="message">{{ item.statusName }}</text></view
+          >
+          <view class="playtime"
+            >游玩时间:<text class="message">{{ item.palyTime }}</text></view
+          >
+        </view>
+      </view>
+    </view>
+
+    <!-- 按订单或者手机号查询的订单 -->
+    <!-- <view class="order-content">
+      <view
+        class="order-list"
+        @tap="todetail(orderMessage)"
+        :key="index"
+      >
+        <view class="order-title">
+          <text class="ordernum"
+            >订单号:<text class="num">{{ orderMessage.ordersNo }}</text></text
+          >
+          <text class="ordertime">{{ orderMessage.orderTime.substring(11) ? orderMessage.orderTime.substring(11): '' }}</text>
+        </view>
+        <view class="order-detail">
+          <view class="name">{{ orderMessage.goodsName }}</view>
+          <view class="door"
+            >门店:<text class="message">{{ orderMessage.merchName }}</text></view
+          >
+          <view class="num"
+            >数量:<text class="message">{{ orderMessage.num }}</text></view
+          >
+          <view class="status"
+            >状态:<text class="message">{{ orderMessage.statusName }}</text></view
+          >
+          <view class="playtime"
+            >游玩时间:<text class="message">{{ orderMessage.palyTime }}</text></view
+          >
+        </view>
+      </view>
+    </view> -->
+
+    <uni-load-more :status="more"> </uni-load-more>
+    <rf-loading v-if="loading"></rf-loading>
   </view>
 </template>
 
 <script>
+import moment from '@/common/moment';
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 export default {
   name: 'order',
-  components: {},
+  components: { uniLoadMore },
   data() {
     //这里存放数据
     return {
-      array: ['中国', '美国', '巴西', '日本'],
+      loading: false,
+      isShowList: true,
+      shopArray: [{ name: '全部', id: 0 }],
       index: 0,
+      shopID: 0,
       isactive: 1,
+      more: 'more', // more  loading noMore
+
+      date: moment().format('YYYY-MM-DD'),
+
+      orderFlag: 'pay', // pay accomplish refundorder
+      pageNum: 1,
+      pageSize: 10,
+      pages: 0,
+      pageTotal: 0,
+      orderList: [],
+      orderbynumber: '',
+      orderMessage: null,
     };
   },
+
+  // 下拉刷新page.json中要配置
+  onPullDownRefresh() {
+    this.pageNum = 1;
+    this.getOrderList();
+  },
+  // 页面触底加载
+  onReachBottom() {
+    this.more = 'more';
+    this.loadMoreList();
+  },
+  onLoad() {
+    this.getShopList();
+    this.getOrderList();
+
+    uni.showNavigationBarLoading(); //显示加载动画
+
+    // uni.hideNavigationBarLoading(); //关闭加载动画
+  },
   //方法集合
   methods: {
-    bindPickerChange: function (e) {
-      console.log('picker发送选择改变,携带值为', e.target.value);
-      this.index = e.target.value;
+    // 搜索
+    orderByNum() {
+      this.isShowList = false;
+      const pattern = /^1[345678]\d{9}$/;
+      let isphone = pattern.test(this.orderbynumber);
+      console.log(isphone);
+      console.log(this.orderbynumber);
+      this.$http
+        .get(`/orders/getOrdersByNo/${this.orderbynumber}`)
+        .then((res) => {
+          console.log(res);
+          if (res.data) {
+            this.orderMessage = res.data;
+            this.$mRouter.push({ route: '/pages/order/orderdetail' });
+          }
+        })
+        .catch((error) => {
+          this.$mHelper.toast('请输入有效的手机号或者订单号');
+        });
+    },
+    // 商铺选择
+    bindPickerChange(e) {
+      this.shopID = null;
+      this.index = e.detail.value;
+      this.shopID = this.shopArray[this.index].id;
+    },
+    // 时间选择器
+    bindDateChange: function (e) {
+      this.date = e.target.value;
     },
     // tab
-    changeTab(type) {
+    changeTab(type, falg) {
+      this.isShowList = true;
       this.isactive = type;
+      this.orderFlag = falg;
+      this.getOrderList();
     },
-
     // 跳转详情
     todetail() {
-      console.log(1);
-      this.$mRouter.push({route: ""})
-    }
+      this.$mRouter.push({ route: '' });
+    },
+    // 获取店铺列表
+    async getShopList() {
+      await this.$http.get('/homePage/getShopByMerId').then((res) => {
+        if (res.data && res.code === 200) {
+          let newarr = [{ name: '全部', id: 0 }];
+          this.shopArray = newarr.concat(res.data);
+        }
+      });
+    },
+    // 订单列表
+    async getOrderList() {
+      this.loading = true;
+      let listarr = [];
+      await this.$http
+        .post('/orders/proList', {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          orderFlag: this.orderFlag,
+        })
+        .then(async (res) => {
+          if (res.data) {
+            listarr = res.data.list;
+            this.orderList = listarr;
+            this.pages = res.data.pages;
+            this.pageTotal = res.data.total;
+            this.loading = false;
+          }
+        });
+    },
+    // 上拉加载
+    async loadMoreList() {
+      this.pageNum++;
+      await this.$http
+        .post('/orders/proList', {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          orderFlag: this.orderFlag,
+        })
+        .then(async (res) => {
+          if (res.data.list.length != 0) {
+            if (this.pages <= res.data.pages) {
+              this.orderList = this.orderList.concat(res.data.list);
+            }
+          } else if (res.data.list.length === 0) {
+            uni.stopPullDownRefresh(); // 貌似没有用
+            this.more = 'noMore';
+          }
+        });
+    },
   },
 };
 </script>
@@ -175,11 +413,6 @@ export default {
           width: 25upx;
           height: 28upx;
         }
-        .screen {
-          margin-left: 5upx;
-          font-size: 24upx;
-          color: #8f8f8f;
-        }
       }
     }
     .header-bar {

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác