浏览代码

bug修改:订单核销,关键指数,数据概况,时间段赛选,订单搜索,首页层级,商品管理头部样式

ltx529596 4 年之前
父节点
当前提交
d697294d40

+ 31 - 17
src/pages/index/conversion.vue

@@ -13,7 +13,7 @@
           >店铺名称:<text class="txt">{{ orderDetail.shopName }}</text></view
         >
         <view class="waternum titlebar"
-          >流水号:<text class="txt">{{orderDetail.outOrderNo}}</text></view
+          >流水号:<text class="txt">{{ orderDetail.outOrderNo }}</text></view
         >
         <view class="ordernum titlebar"
           >订单号:<text class="txt">{{ orderDetail.ordersNo }}</text></view
@@ -105,6 +105,8 @@ export default {
       masktxt: '是的',
 
       orderDetail: uni.getStorageSync('orderDetail'),
+
+      type: false,
     };
   },
   onLoad() {
@@ -113,34 +115,46 @@ export default {
   methods: {
     // 取消兑换
     cancelChange() {
-      this.masktxt = '已取消兑换';
+      this.type = false;
+      this.masktxt = '是否取消兑换?';
       this.iconShow = false;
       this.isShowMask = true;
     },
 
     //  确认兑换
     sureconvert() {
+      this.type = true;
       this.iconShow = true;
-      this.masktxt = '兑换成功!';
+      this.masktxt = '是否兑换?';
       this.isShowMask = true;
     },
 
     // 监听遮罩层行为
     isSureConver(e) {
-      console.log(e);
-      if (e) {
-        this.$http
-          .get('/orders/verOrdersByNo/' + this.orderDetail.ordersNo)
-          .then((res) => {
-						if (res.data === 1) {
-							this.$mHelper.toast('核销成功!')
-						} else {
-							this.$mHelper.toast('订单异常,核销失败!')
-						}
-          });
-      } else {
-				this.$mHelper.toast('已取消核销该订单')
-			}
+      // 兑换
+      if (this.type) {
+        if (e) {
+          this.$http
+            .get('/orders/verOrdersByNo/' + this.orderDetail.qrcode)
+            .then((res) => {
+              console.log(res);
+              if (res.code === 200 ) {
+                this.$mHelper.toast('核销成功!');
+              }
+            }).catch(err0r=>{
+              this.$mHelper.toast(res.msg);
+            });
+        } else {
+          this.$mHelper.toast('已取消核销该订单');
+        }
+      } else {  // 取消兑换
+        if (e) {
+          this.$mHelper.toast('已取消兑换')
+        } else {
+          this.isShowMask = false
+          return
+        }
+      }
       this.isShowMask = false;
       this.$mRouter.back();
     },

+ 230 - 107
src/pages/index/index.vue

@@ -23,9 +23,7 @@
 				<view class="user">
 					<view class="user-left">
             <open-data type="userAvatarUrl" class="usericon"></open-data>
-						<!-- <image :src="userInfo.avatarUrl" mode="" class="usericon"></image> -->
 						<view class="message">
-							<!-- <view class="name">{{userInfo.nickName}}</view> -->
               <open-data type="userNickName" class="name"></open-data>
 							<view class="tele"></view>
 						</view>
@@ -41,7 +39,7 @@
 			<view class="" style="height: 284upx;"></view>
      
       <!-- 输入框 -->
-      <view class="input-code">
+      <view class="input-code" :class="{heiden : isScroll === true}">
         <input type="text" v-model="ordernum" maxlength="-1" placeholder-style="color:#b8bbbb;font-size:28upx;" class="code" placeholder="请输入验证码核验">
         <view class="search" @tap="searchOrder">搜索</view>
       </view>
@@ -53,7 +51,8 @@
 							关键指数
 						</view>
 						<view class="time">
-							数据截至:2020.07.03 <text class="hour">10:10</text>
+							数据截至:{{ this_day }}
+               <!-- <text class="hour">10:10</text> -->
 						</view>
 					</view>
 					<view class="exponent-list">
@@ -92,7 +91,7 @@
 								</view>
 							</view>
 							<view class="right">
-								<image src="../../static/images/sealenum.png" mode="" class="logoicon"></image>
+								<image src="../../static/images/ordernum.png" mode="" class="logoicon"></image>
 							</view>
 						</view>
 						<view class="item todayseale">
@@ -111,7 +110,7 @@
 								</view>
 							</view>
 							<view class="right">
-								<image src="../../static/images/sealenum.png" mode="" class="logoicon"></image>
+								<image src="../../static/images/purse.png" mode="" class="logoicon"></image>
 							</view>
 						</view>
 						<view class="item todayorder">
@@ -130,7 +129,7 @@
 								</view>
 							</view>
 							<view class="right">
-								<image src="../../static/images/sealenum.png" mode="" class="logoicon"></image>
+								<image src="../../static/images/todayordernum.png" mode="" class="logoicon"></image>
 							</view>
 						</view>
 					</view>
@@ -195,8 +194,9 @@
 					<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 class="future">产品销售数量走势
+                  <!-- <text class="num">0</text>
+									<text class="yesterday">昨日全天:<text class="daynum">0</text></text> -->
 								</text>
 							</view>
 							<view class="right">
@@ -206,14 +206,16 @@
 						</view>
 						<view class="qiun-charts">
 							<canvas canvas-id="shopsellEcharts" id="shopsellEcharts" class="shopsellEcharts" disable-scroll=true  @touchend="shopSellEndTouch"></canvas>
+              <image class="shopsellimg" :src="shopsellimg"></image>
 						</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 class="future">产品销售金额走势
+                  <!-- <text class="num">0</text>
+									<text class="yesterday">昨日全天:<text class="daynum">0</text></text> -->
 								</text>
 							</view>
 							<view class="right">
@@ -223,14 +225,16 @@
 						</view>
 						<view class="qiun-charts">
 							<canvas canvas-id="shopmoneyEcharts" id="shopmoneyEcharts" class="shopmoneyEcharts" @touchstart="shopMoneyTouch"></canvas>
+              <image class="shopmoneyimg" :src="shopmoneyimg"></image>
 						</view>
 					</view>
           <!-- 未来7天预定 -->
-					<view class="echarts">
+					<view class="echarts future">
 						<view class="title">
 							<view class="left">
-								<text class="future">未来七天预定:<text class="num">0</text>
-									<text class="yesterday">昨日全天:<text class="daynum">0</text></text>
+								<text class="future">未来七天预定
+                  <!-- <text class="num">0</text>
+									<text class="yesterday">昨日全天:<text class="daynum">0</text></text> -->
 								</text>
 							</view>
 							<view class="right">
@@ -239,6 +243,7 @@
 						</view>
 						<view class="qiun-charts">
 							<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchstart="touchLineA"></canvas>
+              <image class="futureimg" :src="futureimg"></image>
 						</view>
 					</view>
 				</view>
@@ -250,12 +255,11 @@
 					</view>
 					<view class="shop-echarts">
 						<canvas canvas-id="shopecharts" id="shopecharts" class="shopecharts" @touchstart="touchPie"></canvas>
+            <image class="shopimg" :src="shopimg"></image>
 					</view>
 				</view>
 
         <view id="testecharts"></view>
-
-				<view class="" style="height: 40upx;"></view>
 			</view>
 		</view>
     <mask :txt="masktxt" :iconShow="iconShow" v-if="isShowMask" @isSureConver="isSureConver"></mask>
@@ -265,7 +269,7 @@
 <script>
 import uCharts from '../../js_sdk/u-charts/u-charts/u-charts';
 import moment from '@/common/moment';
-import mask from '../components/mask'
+import mask from '../components/mask';
 
 let _self;
 let canvaLineA = null;
@@ -275,19 +279,19 @@ let shopMoneyLine = null;
 export default {
   name: 'Header',
   components: {
-    mask
+    mask,
   },
   data() {
     return {
+      isScroll: false,
       //用户信息
-      userInfo:uni.getStorageSync('wechatUserInfo'),
+      userInfo: uni.getStorageSync('wechatUserInfo'),
       loading: true,
-      
+
       // 遮罩层
       isShowMask: false,
       iconShow: false,
-      masktxt:'',
-
+      masktxt: '',
 
       shopArray: [{ name: '全部', id: 0 }],
       shopID: 0,
@@ -314,6 +318,7 @@ export default {
       orderMessage: {},
 
       today: moment().format('YYYY-MM-DD'),
+      this_day: moment().format('YYYY.MM.DD'),
 
       // 数据还可以优化
       sellSun: {
@@ -345,6 +350,10 @@ export default {
         payorder: 0,
         refund: 0,
       },
+      shopsellimg: '',
+      shopmoneyimg: '',
+      futureimg: '',
+      shopimg: '',
     };
   },
   // 此处定义传入的数据
@@ -354,6 +363,14 @@ export default {
       value: null,
     },
   },
+  // 监听也面滚动
+  onPageScroll (e) {
+    console.log(e);
+    this.isScroll = true
+    if ( !e.scrollTop) {
+      this.isScroll = false
+    }
+  },
   // 页面生命周期 监听页面加载
   onLoad() {
     _self = this;
@@ -364,57 +381,51 @@ export default {
 
     this.getShopList();
     this.loading = false;
-
-    
   },
+
   methods: {
     // 监听遮罩层行为
-		isSureConver(e) {
-			this.isShowMask = false;
-			this.$mRouter.back()
+    isSureConver(e) {
+      this.isShowMask = false;
+      this.$mRouter.back();
     },
-     // 扫码订单
+    // 扫码订单
     scanCode() {
       // 允许从相机和相册扫码
       uni.scanCode({
         success: function (res) {
-          _self.ordernum = res.result
-          _self.searchOrder()
+          _self.ordernum = res.result;
+          _self.searchOrder();
         },
       });
     },
-     // 搜索框根据订单号查询订单
+    // 搜索框根据订单号查询订单
     searchOrder() {
+      this.loading = true
       if (this.ordernum === '') {
-        this.$mHelper.toast('请输入正确的订单号进行查询,不能为空!')
-        return
+        this.$mHelper.toast('请输入正确的订单号进行查询,不能为空!');
+        return;
       }
-      this.$http.get('/orders/getOrdersByNo/'+this.ordernum).then(res=>{
-        if (res.code === 200 ) {
-          this.ordernum = ''
-          if (res.data === "该订单已失效!") {
-            this.iconShow = false
-            this.isShowMask = true
-            this.masktxt = res.data
-          } else if (res.data === "未查询到该订单,请输入正确的核销码!") {
-            this.iconShow = false
-            this.isShowMask = true
-            this.masktxt = "未查询到该订单,请重新输入!"
-          } else {
+      this.$http
+        .get('/orders/getOrdersByNo/' + this.ordernum)
+        .then((res) => {
+          if (res.code === 200) {
+            this.ordernum = '';
             uni.setStorageSync('orderDetail', res.data);
             this.$mRouter.push({ route: '/pages/index/conversion' });
+            this.orderMessage = res.data;
+            this.loading = false
           }
-          this.orderMessage = res.data
-        }
-      
-      }).catch( error=>{
-        this.ordernum = ''
-      })
-      
+        })
+        .catch((error) => {
+          this.ordernum = '';
+          this.loading = false
+        });
     },
 
     // 选择商铺
     bindPickerChange(e) {
+      this.loading = true
       this.shopID = null;
       this.index = e.detail.value;
       this.shopID = this.shopArray[this.index].id;
@@ -424,6 +435,7 @@ export default {
       this.shopSellData();
       this.shopSellTrend();
       this.shopSellMoneyTrend();
+      this.loading = false
     },
 
     // 跳转设置页
@@ -443,7 +455,6 @@ export default {
           this.shopSellMoneyTrend();
           this.futureDayData();
           this.shopSellData();
-
         }
       });
     },
@@ -460,16 +471,14 @@ export default {
         })
         .then(async (res) => {
           if (res.code === 200 && res.data) {
-            let todaynum = 0;
-            let yesnum = 0;
             // 销售总额
             this.dataDo(res.data.xsze, this.sellSun);
             // 今日销售总额
             this.dataDo(res.data.jrxxe, this.todaysellSun);
             // 订单总量
-            this.dataDo(res.data.xsze, this.orderSun);
+            this.dataDo(res.data.ddzl, this.orderSun);
             // 今日订单总量
-            this.dataDo(res.data.xsze, this.todayorderSun);
+            this.dataDo(res.data.jrdds, this.todayorderSun);
           }
         });
     },
@@ -524,7 +533,7 @@ export default {
         });
     },
 
-    // 商品销售走势
+    // 商品销售数量走势
     async shopSellTrend() {
       if (this.shopID === 0) {
         this.shopI = '';
@@ -563,12 +572,13 @@ export default {
         dataLabel: true,
         duration: 500,
         dataPointShape: false, // 折点
+        animation: false,
         background: '#FFFFFF',
         pixelRatio: _self.pixelRatio,
         categories: echartsData.xdata, // x轴数据
         series: [
           {
-            textColor:'#ffcc01',
+            textColor: '#ffcc01',
             color: '#ffcc01',
             data: echartsData.jrdata,
             name: '今日',
@@ -578,7 +588,7 @@ export default {
           },
           {
             color: '#7d66f3',
-            textColor:'#7d66f3',
+            textColor: '#7d66f3',
             data: echartsData.zrdata,
             name: '昨日',
             pointShape: 'circle',
@@ -586,12 +596,11 @@ export default {
             type: 'line',
           },
         ], // 值
-        animation: true,
         // enableScroll: true,
         xAxis: {
           type: 'grid',
           disableGrid: true,
-          labelCount: 7
+          labelCount: 7,
         },
         yAxis: {
           gridType: 'solid',
@@ -599,29 +608,48 @@ export default {
           min: 0,
           max: 180,
           data: [
-          {
-            axisLine: false,
-            format: (val) => {
-            return val.toFixed(0);
-          },
-          }],
+            {
+              axisLine: false,
+              format: (val) => {
+                return val.toFixed(0);
+              },
+            },
+          ],
         },
         width: _self.cWidth * _self.pixelRatio,
         height: _self.cHeight * _self.pixelRatio,
-        padding: [15,15,4,15],
+        padding: [15, 15, 4, 15],
         extra: {
           line: {
             type: 'curve', // 平滑曲线; straight直线
           },
         },
       });
+      setTimeout(() => {
+        uni.canvasToTempFilePath(
+          {
+            //将图表转成图片
+            x: 0,
+            y: 0,
+            width: _self.cWidth * _self.pixelRatio,
+            height: _self.cHeight * _self.pixelRatio,
+            fileType: 'png',
+            canvasId: id,
+            success: function (res) {
+              _self.shopsellimg = res.tempFilePath;
+            },
+            fail: function (res) {},
+          },
+          _self
+        );
+      }, 1000);
     },
     shopSellEndTouch(e) {
       shopSellLine.showToolTip(e, {
-					format: function (item, category) {
-						return category + ' ' + item.name + ':' + item.data 
-					}
-				});
+        format: function (item, category) {
+          return category + ' ' + item.name + ':' + item.data;
+        },
+      });
     },
 
     // 商品销售金额走势
@@ -668,7 +696,7 @@ export default {
         categories: echartsData.xdata, // x轴数据
         series: [
           {
-            textColor: '#f79554',            
+            textColor: '#f79554',
             color: '#f79554',
             data: echartsData.jrdata,
             name: '今日',
@@ -686,33 +714,53 @@ export default {
             type: 'line',
           },
         ], // 值
-        animation: true,
+        animation: false,
         xAxis: {
           type: 'grid',
           disableGrid: true,
-          labelCount: 7
+          labelCount: 7,
         },
         yAxis: {
           gridType: 'solid',
           gridColor: '#CCCCCC',
           min: 0,
           max: 180,
-          data: [{ 
-            axisLine: false,
-            format: (val) => {
-              return val.toFixed(2);
-            }
-          }],
+          data: [
+            {
+              axisLine: false,
+              format: (val) => {
+                return val.toFixed(2);
+              },
+            },
+          ],
         },
         width: _self.cWidth * _self.pixelRatio,
         height: _self.cHeight * _self.pixelRatio,
-        padding: [15,15,4,15],
+        padding: [15, 15, 4, 15],
         extra: {
           line: {
             type: 'curve', // 平滑曲线; straight直线
           },
         },
       });
+      setTimeout(() => {
+        uni.canvasToTempFilePath(
+          {
+            //将图表转成图片
+            x: 0,
+            y: 0,
+            width: _self.cWidth * _self.pixelRatio,
+            height: _self.cHeight * _self.pixelRatio,
+            fileType: 'png',
+            canvasId: id,
+            success: function (res) {
+              _self.shopmoneyimg = res.tempFilePath;
+            },
+            fail: function (res) {},
+          },
+          _self
+        );
+      }, 1000);
     },
     shopMoneyTouch(e) {
       shopMoneyLine.showToolTip(e, {
@@ -746,7 +794,6 @@ export default {
           }
         });
     },
-    // 折线图表
     showLineA(canvasId, chartData) {
       canvaLineA = new uCharts({
         $this: _self,
@@ -759,12 +806,12 @@ export default {
         dataLabel: true, // 图表中是否显示数据
         duration: 500,
         dataPointShape: false, // 折点
-        background: '#FFFFFF',
         pixelRatio: _self.pixelRatio,
         categories: chartData.categories, // x轴数据
         series: [
           {
-            color: '#ffcc01',
+            textColor: '#ed70c1',
+            color: '#ed70c1',
             data: chartData.series,
             name: '人次',
             pointShape: 'circle',
@@ -772,7 +819,7 @@ export default {
             type: 'line',
           },
         ], // 值
-        animation: true,
+        animation: false,
         xAxis: {
           type: 'grid',
           disableGrid: true,
@@ -782,22 +829,42 @@ 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],
+        padding: [15, 15, 4, 15],
         extra: {
           line: {
             type: 'curve', // 平滑曲线; straight直线
           },
         },
       });
+      setTimeout(() => {
+        uni.canvasToTempFilePath(
+          {
+            //将图表转成图片
+            x: 0,
+            y: 0,
+            width: _self.cWidth * _self.pixelRatio,
+            height: _self.cHeight * _self.pixelRatio,
+            fileType: 'png',
+            canvasId: canvasId,
+            success: function (res) {
+              _self.futureimg = res.tempFilePath;
+            },
+            fail: function (res) {},
+          },
+          _self
+        );
+      }, 1000);
     },
     touchLineA(e) {
       canvaLineA.showToolTip(e, {
@@ -813,7 +880,7 @@ export default {
         .get('/homePage/getData1', {
           // date: this.today,
           date: '2020-07-28',
-          shopId: this.shopID
+          shopId: this.shopID,
         })
         .then(async (res) => {
           let pie = {
@@ -822,7 +889,7 @@ export default {
           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})
+              pie.series.push({ name: element.name, data: element.value });
             }
             _self.showPie('shopecharts', pie);
           } else {
@@ -852,7 +919,7 @@ export default {
         background: '#FFFFFF',
         pixelRatio: _self.pixelRatio,
         series: chartData.series,
-        animation: true,
+        animation: false,
         width: _self.bWidth * _self.pixelRatio,
         height: _self.bHeight * _self.pixelRatio,
         dataLabel: true,
@@ -862,6 +929,24 @@ export default {
           },
         },
       });
+      setTimeout(() => {
+        uni.canvasToTempFilePath(
+          {
+            //将图表转成图片
+            x: 0,
+            y: 0,
+            width: _self.cWidth * _self.pixelRatio,
+            height: _self.cHeight * _self.pixelRatio,
+            fileType: 'png',
+            canvasId: canvasId,
+            success: function (res) {
+              _self.shopimg = res.tempFilePath;
+            },
+            fail: function (res) {},
+          },
+          _self
+        );
+      }, 1000);
     },
     touchPie(e) {
       canvaPie.showToolTip(e, {
@@ -874,6 +959,18 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+canvas {
+  position: absolute;
+  left: -999999upx;
+}
+.shopsellimg,
+.shopmoneyimg,
+.futureimg,
+.shopimg {
+  width: 690upx;
+  height: 300upx;
+}
+
 .header {
   width: 100%;
   padding: 0 30rpx;
@@ -1012,11 +1109,15 @@ export default {
     margin-left: 20upx;
   }
 }
+.heiden {
+  transition: all 0.5s linear;
+  opacity: 0;
+}
 .index {
   background-color: #fafafa;
 
   .index-content {
-    padding: 85upx 33rpx;
+    padding: 85upx 33rpx 41upx;
 
     .exponent {
       .title-warp {
@@ -1180,48 +1281,41 @@ export default {
         border-radius: 10rpx;
         margin-bottom: 30upx;
       }
-
       .title {
         display: flex;
         justify-content: space-between;
+        align-items: center;
         color: #333333;
-        padding-top: 30rpx;
+        padding-top: 20rpx;
         padding-left: 15rpx;
-        padding-bottom: 30rpx;
+        padding-bottom: 20rpx;
         box-sizing: border-box;
-
         .left {
           .future {
             font-size: 28rpx;
-
             .num {
               font-size: 30rpx;
             }
-
             .yesterday {
               margin-left: 10rpx;
             }
           }
         }
-
         .right {
           display: flex;
           justify-content: center;
           align-items: center;
           box-sizing: border-box;
-
           .today-icon {
             width: 20rpx;
             height: 9rpx;
             background-color: #ff9c2f;
             margin-right: 10rpx;
           }
-
           .title {
             font-size: 20rpx;
             margin-right: 20rpx;
           }
-
           .yesterday-icon {
             width: 20rpx;
             height: 9rpx;
@@ -1258,12 +1352,41 @@ export default {
           width: 690rpx;
           height: 300rpx;
         }
+        .title {
+          .right {
+            .today-icon {
+              background-color: #ffcc01;
+            }
+            .yesterday-icon {
+              background-color: #7d66f3;
+            }
+          }
+        }
       }
       .shopmoney {
         .shopmoneyEcharts {
           width: 690rpx;
           height: 300rpx;
         }
+        .title {
+          .right {
+            .today-icon {
+              background-color: #f79554;
+            }
+            .yesterday-icon {
+              background-color: #2ad3a1;
+            }
+          }
+        }
+      }
+      .future {
+        .title {
+          .right {
+            .today-icon {
+              background-color: #ed70c1;
+            }
+          }
+        }
       }
     }
 

+ 1 - 1
src/pages/index/setting/notice.vue

@@ -39,7 +39,7 @@ export default {
         mid: 53,
         pageNo: 1,
         pageSize: 10,
-        type: '1',
+        type: '2',
       },
       noticeList: []
     };

+ 8 - 9
src/pages/order/order.vue

@@ -177,7 +177,7 @@
     </view>
 
     <uni-load-more :status="more"> </uni-load-more>
-    <rf-loading v-if="loading"></rf-loading>
+    <!-- <rf-loading v-if="loading"></rf-loading> -->
     <view style="height: 250upx;"></view>
   </view>
 </template>
@@ -192,7 +192,7 @@ export default {
   data() {
     //这里存放数据
     return {
-      loading: false,
+      // loading: false,
       shopArray: [{ name: '全部', id: '' }],
       index: 0,
       shopID: 0,
@@ -205,7 +205,7 @@ export default {
       // startdate: moment().subtract(1, 'day').format('YYYY-MM-DD'),
       startdate: '',
       enddate: '',
-      sunday: 0,
+      sunday: 1,
 
       orderFlag: 'pay', // pay accomplish refundorder
 
@@ -256,7 +256,7 @@ export default {
     // 确认时间后
     confirm(e) {
       this.more = 'loading';
-      this.loading = true;
+      // this.loading = true;
 
       this.startdate = e.range.before;
       this.enddate = e.range.after;
@@ -271,16 +271,16 @@ export default {
     orderByNum() {
       this.more = 'loading';
       let num = '';
+      num = this.params.buyPhone;
       const pattern = /^1[345678]\d{9}$/;
       if (pattern.test(this.params.buyPhone)) {
-        num = this.params.buyPhone;
         this.params.buyPhone = num;
         this.params.ordersNo = '';
-        this.getOrderList();
       } else {
         this.params.buyPhone = '';
-        this.getOrderList();
+        this.params.ordersNo = num
       }
+      this.getOrderList()
     },
 
     // 商铺选择
@@ -317,7 +317,7 @@ export default {
     async getOrderList() {
       this.soleStatus = 1;
       this.orderList = [];
-      this.loading = true;
+      // this.loading = true;
       await this.$http
         .post('/orders/proList', this.params)
         .then(async (res) => {
@@ -330,7 +330,6 @@ export default {
           } else {
             this.more = 'noMore';
           }
-          this.loading = false;
         });
     },
     // 上拉加载

+ 58 - 47
src/pages/shop/shop.vue

@@ -3,23 +3,6 @@
   <view class="shop">
     <view class="header-warp">
       <view class="header-search">
-        <view class="uni-list-cell">
-          <view class="uni-list-cell-db">
-            <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"
-            ></image>
-          </view>
-        </view>
         <view class="search">
           <input
             type="text"
@@ -38,6 +21,27 @@
           ></image>
         </view>
       </view>
+
+      <view class="uni-list-cell">
+        <view class="uni-list-cell-db">
+          <picker
+            @change="bindPickerChange"
+            :value="index"
+            :range="shopArray"
+            range-key="name"
+            class="uni-upd"
+          >
+            <view class="uni-input">{{ shopArray[index].name }}</view>
+          </picker>
+          <view class="icon-warp">
+            <image
+              src="../../static/images/moreicon.png"
+              class="iconRight"
+            ></image>
+          </view>
+        </view>
+      </view>
+
       <view class="header-bar">
         <view
           class="item"
@@ -66,7 +70,7 @@
         <view class="line"></view>
       </view>
     </view>
-    <view style="height: 192upx;"></view>
+    <view style="height: 272upx;"></view>
     <!-- 审核 -->
     <view class="order-content" v-if="isactive === 1">
       <view class="order-list" v-for="(item, index) in shoplist" :key="index">
@@ -94,7 +98,7 @@
         </view>
         <view class="operate">
           <view class="btn stick" id="one" @tap="sticktop(item.id)">置顶</view>
-          <view class="btn sold" @tap="passGet(item.id)">审核</view>
+          <!-- <view class="btn sold" @tap="passGet(item.id)">审核</view> -->
           <view class="btn compile" @tap="topage(item.id)">编辑</view>
           <view class="btn delete" @tap="deleteshop(item.id)">删除</view>
         </view>
@@ -240,8 +244,8 @@ export default {
   },
   // 下拉刷新
   onPullDownRefresh() {
-    this.more = 'loading'
-    this.isactive = 1
+    this.more = 'loading';
+    this.isactive = 1;
     this.params = {
       pageNum: 1,
       pageSize: 10,
@@ -262,7 +266,7 @@ export default {
       this.getMoreByStatus();
     }
   },
-  onShow () {
+  onShow() {
     this.getShopList();
     this.getShopMessage();
   },
@@ -274,16 +278,15 @@ export default {
   methods: {
     // 跳转详情
     topage(id) {
-      console.log(id);
       if (id) {
         uni.setStorageSync('Id', id);
       }
-      this.$mRouter.push({ route: '/pages/shop/shopdetail'});
+      this.$mRouter.push({ route: '/pages/shop/shopdetail' });
     },
     // 删除商品
     async deleteshop(id) {
       this.deleteId = id;
-      this.masktxt = '是否删除该订单?';
+      this.masktxt = '是否删除该商品?';
       this.isShowMask = true;
     },
     // 监听遮罩层行为
@@ -363,7 +366,7 @@ export default {
         }
       });
     },
-    
+
     // 商品列表(待审核状态)
     async getTicketShopList() {
       this.soleStatus = 1;
@@ -399,7 +402,6 @@ export default {
         delete this.params.upDown;
       }
       await this.$http.get('/goods/list', this.params).then((res) => {
-        console.log(res);
         if (res.data.list.length > 0) {
           listArr = res.data.list;
           this.shoplist = this.shoplist.concat(listArr);
@@ -470,26 +472,6 @@ export default {
       display: flex;
       align-items: center;
 
-      .uni-list-cell {
-        width: 92upx;
-
-        .uni-list-cell-db {
-          height: 80upx;
-          font-size: 28upx;
-          display: flex;
-          justify-content: center;
-          align-items: center;
-          background-color: #fff;
-          color: #8f8f8f;
-
-          .icon {
-            width: 17upx;
-            height: 12upx;
-            margin-left: 10upx;
-          }
-        }
-      }
-
       .search {
         flex: 1;
         display: flex;
@@ -532,6 +514,35 @@ export default {
       }
     }
 
+    .uni-list-cell {
+      padding: 0 20upx;
+      border-bottom: 1px solid #f4f4f4;
+      .uni-list-cell-db {
+        height: 80upx;
+        font-size: 28upx;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        background-color: #fff;
+        color: #8f8f8f;
+        font-size: 30upx;
+        .uni-upd {
+          width: 100%;
+        }
+      }
+      .uni-input {
+        height: 100%;
+        line-height: 80upx;
+      }
+      .icon-warp {
+        width: 19upx;
+        .iconRight {
+          width: 19upx;
+          height: 27upx;
+        }
+      }
+    }
+
     .header-bar {
       display: flex;
       justify-content: center;

二进制
src/static/images/notfound.jpg


+ 1 - 0
src/utils/request/index.js

@@ -27,6 +27,7 @@ http.setConfig((config) => { /* 设置全局配置 */
 let isRefreshing = false;
 let requests = [];
 http.interceptor.request((config) => { /* 请求之前拦截器 */
+	config.header['X-TOKEN'] = uni.getStorageSync('user');
 	config.header['x-api-key'] = uni.getStorageSync('accessToken');
 	// 单商户
 	// config.header['merchant-id'] = uni.getStorageSync('merchantId') || 1;