Преглед на файлове

订单列表页按钮重新加载

lgh преди 1 месец
родител
ревизия
743f08d7a8
променени са 5 файла, в които са добавени 30 реда и са изтрити 11 реда
  1. 2 0
      pages/index/detail.vue
  2. 2 0
      pages/index/index.vue
  3. 21 9
      pages/order/index.vue
  4. 3 0
      pages/order/orderDetail.vue
  5. 2 2
      pages/user/index.vue

+ 2 - 0
pages/index/detail.vue

@@ -51,6 +51,8 @@ export default {
             packagesEntity: [],
             configs: [],
             type: "",
+            more_minup: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_more_minup.png',
+			more_mindown: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_more_mindown.png',
         };
     },
     onLoad(options) {

+ 2 - 0
pages/index/index.vue

@@ -183,7 +183,9 @@
 			}
 		},
 		onLoad() {
+
 			this.getData()
+
 		},
 		onShow() {
 			this.changeTabbar()

+ 21 - 9
pages/order/index.vue

@@ -20,7 +20,7 @@
         <view class="order-list" v-if="arrList && arrList.length">
           <view class="tab-content" v-for="(item, index) in arrList" :key="index" @click="goOrderDetail(item)">
             <view class="order-top flex-start">
-              <text class="name">{{ item.packageName }}({{ item.quantity }})</text>
+              <text class="name">{{ item.packageName }}({{ item.quantity }}条视频)</text>
               <text v-if="item.paymentStatus==='CANCELLED'" class="status cancel">{{
                   item.paymentStatus | orderStatus
                 }}
@@ -158,6 +158,13 @@ export default {
   },
   computed: {},
   watch: {},
+  onShow() {
+    // this.mescroll.upOption.page.num = 1;
+    this.arrList = [];
+    if (this.mescroll) {
+      this.mescroll.resetUpScroll(); // 触发上拉加载
+    }
+  },
   onLoad(options) {
     if(options.status) this.paymentStatus = options.status 
     if(options.current) this.current = options.current
@@ -222,9 +229,9 @@ export default {
     },
     tabsChange(item) {
       if(this.paymentStatus == item.value) return
-      this.paymentStatus = item.value
-      this.mescroll.resetUpScroll()
-      this.mescroll.scrollTo(0, 300)
+        this.paymentStatus = item.value
+        this.mescroll.resetUpScroll()
+        this.mescroll.scrollTo(0, 300)
     },
     // upCallback(){
     //     console.log('123456');
@@ -271,7 +278,8 @@ export default {
             cancelOrder({
               orderId: Number(orderId)
             }).then(() => {
-              that.arrList.splice(that.arrList.findIndex(item => item.orderId === orderId), 1)
+              that.mescroll.resetUpScroll()
+              that.mescroll.scrollTo(0, 300)
             })
           } else if (res.cancel) {
             console.log('用户点击取消');
@@ -290,7 +298,8 @@ export default {
             updateOrder({
               orderId: Number(orderId),
             }).then(() => {
-              that.arrList.splice(that.arrList.findIndex(item => item.orderId === orderId), 1)
+              that.mescroll.resetUpScroll()
+              that.mescroll.scrollTo(0, 300)
             })
           } else if (res.cancel) {
             console.log('用户点击取消');
@@ -308,7 +317,8 @@ export default {
             checkOrder({
               orderId: Number(orderId),
             }).then(() => {
-              that.arrList.splice(that.arrList.findIndex(item => item.orderId === orderId), 1)
+              that.mescroll.resetUpScroll()
+              that.mescroll.scrollTo(0, 300)
             })
           } else if (res.cancel) {
             console.log('用户点击取消');
@@ -326,7 +336,8 @@ export default {
             aftermarketOrder({
               orderId: Number(orderId)
             }).then(() => {
-              that.arrList.splice(that.arrList.findIndex(item => item.orderId === orderId), 1)
+              that.mescroll.resetUpScroll()
+              that.mescroll.scrollTo(0, 300)
             })
           } else if (res.cancel) {
             console.log('用户点击取消');
@@ -345,7 +356,8 @@ export default {
             cancelAftermarketOrder({
               orderId: Number(orderId)
             }).then(() => {
-              that.arrList.splice(that.arrList.findIndex(item => item.orderId === orderId), 1)
+              that.mescroll.resetUpScroll()
+              that.mescroll.scrollTo(0, 300)
             })
           } else if (res.cancel) {
             console.log('用户点击取消');

+ 3 - 0
pages/order/orderDetail.vue

@@ -504,4 +504,7 @@
 		line-height: 40rpx;
 		margin-left: 16rpx;
 	}
+	.btn{
+		border-radius: 84rpx;
+	}
 </style>

+ 2 - 2
pages/user/index.vue

@@ -5,7 +5,7 @@
       <image :src="logoImg" mode="heightFix"></image>
     </view>
     <view class="news">
-      <image :src="avatar"></image>
+      <image :src="avatarImg"></image>
       <view v-if="realName" class="phone">{{ realName }}</view>
       <view v-else class="phone" @click="toLogin()">未登录</view>
     </view>
@@ -68,7 +68,7 @@ export default {
       tongzhi: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_tongzhi%403x.png",
       moreImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_more%403x.png",
       cantact: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_kefurexian%403x.png",
-      avatar: '',
+      avatarImg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_avatar.png',
       orderList: [
         {
           value: '',