Browse Source

tb的bug处理

ltx529596 4 years ago
parent
commit
d387a31e63

+ 2 - 2
src/config/index.config.js

@@ -12,8 +12,8 @@ const CONFIG = {
     production: {
         assetsPath: '/static', // 静态资源路径
         // baseUrl: 'http://tyou.xiudo.cn/merch',  // 后台接口请求地址
-        baseUrl: 'http://192.168.100.135:83/merch',  // 后台接口请求地址
-        hostUrl: 'http://h5.tinyshop.rageframe.com',        // H5地址(前端运行地址)
+        baseUrl: 'https://tyou.xiudo.cn/merch',  // 后台接口请求地址
+        hostUrl: 'https://tyou.xiudo.cn',        // H5地址(前端运行地址)
         websocketUrl: '',        // websocket服务端地址
         weixinAppId: '' // 微信公众号appid
     }

+ 13 - 11
src/pages/index/conversion.vue

@@ -9,12 +9,8 @@
         <view class="ordername titlebar"
           >产品名称:<text class="txt">{{ orderDetail.goodsName }}</text></view
         >
-        <view class="shopname titlebar"
-          >店铺名称:<text class="txt">{{ orderDetail.shopName }}</text></view
-        >
-        <view class="waternum titlebar"
-          >流水号:<text class="txt">{{ orderDetail.outOrderNo }}</text></view
-        >
+        <view class="shopname titlebar">店铺名称:<text class="txt">{{ orderDetail.shopName }}</text></view>
+        <view class="waternum titlebar" v-if="orderDetail.outOrderNo === '1'">流水号:<text class="txt">{{ orderDetail.outOrderNo }}</text></view>
         <view class="ordernum titlebar"
           >订单号:<text class="txt">{{ orderDetail.ordersNo }}</text></view
         >
@@ -23,11 +19,11 @@
           >手机号:<text class="txt">{{ orderDetail.buyPhone }}</text></view
         >
         <view class="goindate titlebar"
-          >入园日期:<text class="txt">{{ orderDetail.orderTime }}</text></view
+          >入园日期:<text class="txt">{{ orderDetail.timePart ? orderDetail.timePart : orderDetail.palyTime }}</text></view
         >
         <view class="price titlebar"
           >产品价格:<text class="txt">{{
-            orderDetail.ordersPrice
+            orderDetail.ordersPrice | doMoney
           }}</text></view
         >
         <view class="buynum titlebar"
@@ -36,7 +32,7 @@
           }}</text></view
         >
         <view class="palytime titlebar"
-          >游玩时间:<text class="txt">{{ orderDetail.payTime }}</text></view
+          >游玩时间:<text class="txt">{{ orderDetail.timePart ? orderDetail.timePart : orderDetail.palyTime }}</text></view
         >
         <view class="orderstatus titlebar"
           >订单状态:<text class="txt">{{ orderDetail.statusName }}</text>
@@ -61,12 +57,12 @@
         <view class="title">支付信息</view>
         <view class="shoppric"
           >产品价格:<text class="money"
-            >{{ orderDetail.ordersPrice }}</text
+            >{{ orderDetail.ordersPrice | doMoney}}</text
           ></view
         >
         <view class="realitypirc"
           >实付金额:<text class="money"
-            >{{ orderDetail.ordersPrice }}</text
+            >{{ orderDetail.ordersPrice | doMoney}}</text
           ></view
         >
       </view>
@@ -88,6 +84,7 @@
 </template>
 
 <script>
+let showCode = true
 import Header from '../components/header.vue';
 import mask from '../components/mask';
 export default {
@@ -109,6 +106,11 @@ export default {
       type: false,
     };
   },
+  filters :{
+    doMoney (val){
+      return `¥${val/100}`
+    }
+  },
   onLoad() {
     console.log(this.orderDetail);
   },

+ 49 - 22
src/pages/index/index.vue

@@ -39,7 +39,7 @@
 			<view class="" style="height: 284upx;"></view>
      
       <!-- 输入框 -->
-      <view class="input-code" :class="{heiden : isScroll === true}">
+      <view class="input-code" :animation="animationData">
         <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>
@@ -195,8 +195,6 @@
 						<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">
@@ -206,7 +204,8 @@
 						</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>
+              <text class="loadingMore" v-if="loadingMore1">加载中...</text>
+              <image class="shopsellimg" :src="shopsellimg" v-if="!loadingMore1"></image>
 						</view>
 					</view>
           <!-- 产品销售金额走势 -->
@@ -214,8 +213,6 @@
 						<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">
@@ -225,17 +222,15 @@
 						</view>
 						<view class="qiun-charts">
 							<canvas canvas-id="shopmoneyEcharts" id="shopmoneyEcharts" class="shopmoneyEcharts" @touchstart="shopMoneyTouch"></canvas>
-              <image class="shopmoneyimg" :src="shopmoneyimg"></image>
+              <text class="loadingMore" v-if="loadingMore2">加载中...</text>
+              <image class="shopmoneyimg" :src="shopmoneyimg" v-if="!loadingMore2"></image>
 						</view>
 					</view>
           <!-- 未来7天预定 -->
 					<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>
+								<text class="future">未来七天预定</text>
 							</view>
 							<view class="right">
 								<view class="today-icon"></view><text class="title">今日</text>
@@ -243,7 +238,8 @@
 						</view>
 						<view class="qiun-charts">
 							<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchstart="touchLineA"></canvas>
-              <image class="futureimg" :src="futureimg"></image>
+              <text class="loadingMore" v-if="loadingMore3">加载中...</text>
+              <image class="futureimg" :src="futureimg" v-if="!loadingMore3"></image>
 						</view>
 					</view>
 				</view>
@@ -255,7 +251,8 @@
 					</view>
 					<view class="shop-echarts">
 						<canvas canvas-id="shopecharts" id="shopecharts" class="shopecharts" @touchstart="touchPie"></canvas>
-            <image class="shopimg" :src="shopimg"></image>
+            <text class="loadingMore" v-if="loadingMore4">加载中...</text>
+            <image class="shopimg" :src="shopimg" v-if="!loadingMore4"></image>
 					</view>
 				</view>
 
@@ -283,7 +280,10 @@ export default {
   },
   data() {
     return {
-      isScroll: false,
+      loadingMore1: true,
+      loadingMore2: true,
+      loadingMore3: true,
+      loadingMore4: true,
       //用户信息
       userInfo: uni.getStorageSync('wechatUserInfo'),
       loading: true,
@@ -353,7 +353,7 @@ export default {
       shopsellimg: '',
       shopmoneyimg: '',
       futureimg: '',
-      shopimg: '',
+      shopimg: ''
     };
   },
   // 此处定义传入的数据
@@ -365,11 +365,7 @@ export default {
   },
   // 监听也面滚动
   onPageScroll (e) {
-    console.log(e);
-    this.isScroll = true
-    if ( !e.scrollTop) {
-      this.isScroll = false
-    }
+    
   },
   // 页面生命周期 监听页面加载
   onLoad() {
@@ -535,6 +531,7 @@ export default {
 
     // 商品销售数量走势
     async shopSellTrend() {
+      this.loadingMore1 = true
       if (this.shopID === 0) {
         this.shopI = '';
       }
@@ -636,6 +633,7 @@ export default {
             fileType: 'png',
             canvasId: id,
             success: function (res) {
+              _self.loadingMore1 = false
               _self.shopsellimg = res.tempFilePath;
             },
             fail: function (res) {},
@@ -654,6 +652,7 @@ export default {
 
     // 商品销售金额走势
     async shopSellMoneyTrend() {
+      this.loadingMore2 = true
       if (this.shopID === 0) {
         this.shopI = '';
       }
@@ -754,6 +753,7 @@ export default {
             fileType: 'png',
             canvasId: id,
             success: function (res) {
+              _self.loadingMore2 = false
               _self.shopmoneyimg = res.tempFilePath;
             },
             fail: function (res) {},
@@ -772,6 +772,7 @@ export default {
 
     // 未来七天
     async futureDayData() {
+      this.loadingMore3 = true
       if (this.shopID === 0) {
         this.shopID = '';
       }
@@ -858,6 +859,7 @@ export default {
             fileType: 'png',
             canvasId: canvasId,
             success: function (res) {
+              _self.loadingMore3 = false
               _self.futureimg = res.tempFilePath;
             },
             fail: function (res) {},
@@ -876,10 +878,10 @@ export default {
 
     // 商品销售占比
     async shopSellData() {
+      this.loadingMore4 = true
       await this.$http
         .get('/homePage/getData1', {
-          // date: this.today,
-          date: '2020-07-28',
+          date: this.today,
           shopId: this.shopID,
         })
         .then(async (res) => {
@@ -940,6 +942,7 @@ export default {
             fileType: 'png',
             canvasId: canvasId,
             success: function (res) {
+              _self.loadingMore4 = false
               _self.shopimg = res.tempFilePath;
             },
             fail: function (res) {},
@@ -1338,8 +1341,20 @@ canvas {
 
       /* 样式的width和height一定要与定义的cWidth和cHeight相对应 */
       .qiun-charts {
+        position: relative;
         width: 690rpx;
         height: 300rpx;
+        .loadingMore {
+          position: absolute;
+          left: 0;
+          top: 0;
+          width: 690rpx;
+          height: 300rpx;
+          text-align: center;
+          line-height: 300upx;
+          font-size: 28upx;
+          color: #cccece;
+        }
       }
 
       .charts {
@@ -1402,8 +1417,20 @@ canvas {
       }
 
       .shop-echarts {
+        position: relative;
         width: 690rpx;
         height: 300rpx;
+        .loadingMore {
+          position: absolute;
+          left: 0;
+          top: 0;
+          width: 690rpx;
+          height: 300rpx;
+          text-align: center;
+          line-height: 300upx;
+          font-size: 28upx;
+          color: #cccece;
+        }
       }
 
       .shopecharts {

+ 1 - 1
src/pages/order/order.vue

@@ -230,7 +230,7 @@ export default {
     this.enddate = '';
     this.sunday = 0;
     this.dateArr = [];
-    this.pageNum = 1;
+    this.params.pageNum = 1;
     this.orderbynumber = '';
     this.getOrderList();
   },

+ 13 - 7
src/pages/order/orderdetail.vue

@@ -8,14 +8,14 @@
 				<view class="title">订单信息</view>
 				<view class="ordername titlebar">产品名称:<text class="txt">{{orderMessage.goodsName }}</text></view>
 				<view class="shopname titlebar">店铺名称:<text class="txt">{{orderMessage.shopName}}</text></view>
-				<view class="waternum titlebar">流水号:<text class="txt">{{orderMessage.outOrderNo}}</text></view>
+				<view class="waternum titlebar" v-if="orderMessage.outOrderNo">流水号:<text class="txt">{{orderMessage.outOrderNo}}</text></view>
 				<view class="ordernum titlebar">订单号:<text class="txt">{{orderMessage.ordersNo}}</text></view>
 				<view class="phonenum titlebar">手机号:<text class="txt">{{orderMessage.buyPhone}}</text></view>
-				<view class="goindate titlebar">入园日期:<text class="txt">{{orderMessage.orderTime}}</text></view>
-				<view class="price titlebar">产品价格:<text class="txt">{{orderMessage.ordersPrice}}</text></view>
+				<view class="goindate titlebar">入园日期:<text class="txt">{{orderMessage.timePart ? orderMessage.timePart : orderMessage.palyTime}}</text></view>
+				<view class="price titlebar">产品价格:<text class="txt">{{orderMessage.ordersPrice | doMoney}}</text></view>
 				<view class="buynum titlebar">购买数量:<text class="txt">{{orderMessage.playManList.length}}</text></view>
-				<view class="palytime titlebar">游玩时间:<text class="txt">{{orderMessage.payTime}}</text></view>
-				<view class="orderstatus titlebar">订单状态:<text class="txt">{{orderMessage.remark}}</text> </view>
+				<view class="palytime titlebar">游玩时间:<text class="txt">{{orderMessage.timePart ? orderMessage.timePart : orderMessage.palyTime}}</text></view>
+				<view class="orderstatus titlebar">订单状态:<text class="txt">{{orderMessage.statusName}}</text> </view>
 				<view class="tourist">
 					<view class="title">游客信息</view>
 					<view v-for="(item,index) in orderMessage.playManList" :key="index">
@@ -26,8 +26,8 @@
 			</view>
 			<view class="paymessage">
 				<view class="title">支付信息</view>
-				<view class="shoppric">产品价格:<text class="money">{{orderMessage.ordersPrice}}</text></view>
-				<view class="realitypirc">实付金额:<text class="money">{{orderMessage.ordersPrice}}</text></view>
+				<view class="shoppric">产品价格:<text class="money">{{orderMessage.ordersPrice | doMoney}}</text></view>
+				<view class="realitypirc">实付金额:<text class="money">{{orderMessage.ordersPrice | doMoney}}</text></view>
 			</view>
 		</view>
 	</view>
@@ -46,11 +46,17 @@
 				ordernum: ''
 			}
 		},
+		filters:{
+			doMoney (val) {
+				return `¥${(val / 100)}`
+			}
+		},
 		onLoad() {
 			this.ordernum = uni.getStorageSync('order')
 			console.log(this.ordernum);
 			this.getOrderDetail()
 		},
+
 		methods: {
 			
 			// 详情

+ 1 - 0
src/pages/shop/classify.vue

@@ -110,6 +110,7 @@ export default {
       padding: 28upx 31upx 0;
       border-radius: 10upx;
       background-color: #ffffff;
+      margin-top: 25upx;
       .warp-top {
         padding-bottom: 30upx;
         border-bottom: 1px solid #e7e7e7;

+ 10 - 10
src/pages/shop/shop.vue

@@ -93,7 +93,7 @@
           </view>
 
           <view class="right"
-            >¥<text class="price">{{ item.price }}</text></view
+            >¥<text class="price">{{ item.price | dounit }}</text></view
           >
         </view>
         <view class="operate">
@@ -126,7 +126,7 @@
           </view>
 
           <view class="right"
-            >¥<text class="price">{{ item.price }}</text></view
+            >¥<text class="price">{{ item.price | dounit}}</text></view
           >
         </view>
         <view class="operate">
@@ -159,7 +159,7 @@
           </view>
 
           <view class="right"
-            >¥<text class="price">{{ item.price }}</text></view
+            >¥<text class="price">{{ item.price | dounit}}</text></view
           >
         </view>
         <view class="operate">
@@ -200,8 +200,8 @@ export default {
       scenicID: 0, // 景区id 唯一(一个账号代表一个景区)
       loading: false,
       more: 'loading', // more  loading noMore
-      shopArray: [{ name: '全部', id: 0 }],
-      shopID: 0,
+      shopArray: [{ name: '全部', id: '' }],
+      shopID: '',
       index: 0,
 
       isactive: 1,
@@ -241,6 +241,9 @@ export default {
         return '审核未通过';
       }
     },
+    dounit (val) {
+      return (val/100)
+    }
   },
   // 下拉刷新
   onPullDownRefresh() {
@@ -313,7 +316,7 @@ export default {
     bindPickerChange(e) {
       this.more = 'loading';
       this.params.pageNum = 1;
-      this.shopID = null;
+      this.shopID = '';
       this.index = e.detail.value;
       this.params.shopId = this.shopArray[this.index].id;
       this.getTicketShopList();
@@ -322,7 +325,7 @@ export default {
     async getShopList() {
       await this.$http.get('/homePage/getShopByMerId').then((res) => {
         if (res.data && res.code === 200) {
-          let newarr = [{ name: '全部', id: 0 }];
+          let newarr = [{ name: '全部', id: '' }];
           this.shopArray = newarr.concat(res.data);
         }
       });
@@ -379,10 +382,8 @@ 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) {
           this.shoplist = res.data.list;
-          console.log(this.shoplist);
           if (res.data.nextPage === 0) {
             this.more = 'noMore';
           }
@@ -416,7 +417,6 @@ export default {
     },
     // 通过审核
     passGet(id) {
-      console.log(id);
     },
     // 下架
     shopPutDown(id) {