Преглед изворни кода

Merge branch 'master' of http://git.topboom0912.com/czj/rebatedine-mini

dreamnight пре 5 година
родитељ
комит
320cc137bf

+ 37 - 35
src/pages/classification.vue

@@ -1,25 +1,22 @@
 <template>
   <view class="class-main">
     <network-error />
-    <u-sticky
-      :enable="enable"
-      offset-top="0"
-      h5-nav-height="0"
-      @fixed="stickyFixed"
-      @unfixed="unStickyFixed"
-    >
+    <u-sticky :enable="enable"
+              offset-top="0"
+              h5-nav-height="0"
+              @fixed="stickyFixed"
+              @unfixed="unStickyFixed">
       <view class="class-tabs">
-        <u-tabs
-          is-scroll
-          :list="list"
-          name="category_name"
-          :current="currentTab"
-          height="72"
-          font-size="28"
-          active-color="#111111"
-          inactive-color="#111111"
-          :gutter="32"
-          :bar-style="{
+        <u-tabs is-scroll
+                :list="list"
+                name="category_name"
+                :current="currentTab"
+                height="72"
+                font-size="28"
+                active-color="#111111"
+                inactive-color="#111111"
+                :gutter="32"
+                :bar-style="{
             bottom: '16rpx',
             marginLeft: '-8rpx',
             width: '56rpx',
@@ -28,21 +25,21 @@
             backgroundColor: '#FD5B36',
             boxShadow: '0px 1px 1px 0px rgba(255, 102, 50, 0.3)'
           }"
-          @change="changeTab"
-        >
+                @change="changeTab">
         </u-tabs>
       </view>
     </u-sticky>
     <block v-if="isLocation">
-      <view class="activity-list" :style="{marginTop: `${activityListMT}rpx`}">
+      <view class="activity-list"
+            :style="{marginTop: `${activityListMT}rpx`}">
         <block v-if="activityList.length !== 0">
-          <view class="activity-card u-border-bottom" v-for="(item, index) in activityList" :key="index">
-            <activity-card
-              :value="item"
-              @sign-up="toActivityDetail"
-              @click-ybm="toActivityDetail"
-              @click-yqg="toActivityDetail"
-            >
+          <view class="activity-card u-border-bottom"
+                v-for="(item, index) in activityList"
+                :key="index">
+            <activity-card :value="item"
+                           @sign-up="toActivityDetail"
+                           @click-ybm="toActivityDetail"
+                           @click-yqg="toActivityDetail">
             </activity-card>
           </view>
           <view class="touch-bottom u-font-22 line-32 u-text-center">{{isLoadMore ? '加载中...' : '到底了~'}}</view>
@@ -158,10 +155,15 @@ export default {
       }
       const { code, data } = await getActivityList(params)
       if (code === 200) {
+        if (this.total === -1) {
+          this.activityList = data.rows
+        } else {
+          this.activityList = this.activityList.concat(data.rows)
+        }
         this.total = data.total_count
-        this.activityList = this.activityList.concat(data.rows)
         this.isLoadMore = this.total !== this.activityList.length
       }
+      uni.stopPullDownRefresh()
     },
     changeTab (index) {
       this.currentTab = index
@@ -193,7 +195,8 @@ export default {
     padding: 0;
     background-color: #fff;
   }
-  .no-location, .activity-list {
+  .no-location,
+  .activity-list {
     padding: 0 28px;
     min-height: 100vh;
     background-color: #fff;
@@ -202,7 +205,7 @@ export default {
     }
     .touch-bottom {
       padding: 30px 0;
-      color: #BABBBC;
+      color: #babbbc;
     }
   }
   .back-color {
@@ -213,11 +216,10 @@ export default {
     padding-top: 252px;
   }
 }
-
 </style>
 
 <style >
-  .class-tabs >>> .u-tab-item {
-    z-index: 10;
-  }
+.class-tabs >>> .u-tab-item {
+  z-index: 10;
+}
 </style>

+ 9 - 5
src/pages/index.vue

@@ -57,18 +57,18 @@
                     active-color="#111111"
                     inactive-color="#111111"
                     :gutter="0"
+                    :item-width="104"
+                    :bar-width="104"
                     :bar-style="{
                 bottom: '-10rpx',
-                marginLeft: '-34rpx',
                 width: '104rpx',
                 height: '10rpx',
-                borderRadius: 0,
                 backgroundColor: '#FD6D4E',
-                boxShadow: '0px 1px 1px 0px rgba(255, 102, 50, 0.3)'
+                boxShadow: '0rpx 1rpx 1rpx 0rpx rgba(255, 102, 50, 0.3)'
               }"
                     @change="tabsChange">
             </u-tabs>
-            <view class="u-font-22 u-content-color">单平台门店每天只能报名1次</view>
+            <view class="u-font-22 u-content-color">每门店单平台每天只能报名1次</view>
           </view>
         </view>
       </u-sticky>
@@ -206,8 +206,12 @@ export default {
       }
       const { code, data } = await getActivityList(params)
       if (code === 200) {
+        if (this.total === -1) {
+          this.activityList = data.rows
+        } else {
+          this.activityList = this.activityList.concat(data.rows)
+        }
         this.total = data.total_count
-        this.activityList = this.activityList.concat(data.rows)
         this.isLoadMore = this.total !== this.activityList.length
       }
       uni.stopPullDownRefresh()

+ 7 - 1
src/pages/order.vue

@@ -139,10 +139,16 @@ export default {
       }
       const { code, data } = await getOrderList(params)
       if (code === 200) {
-        this.orderList = this.orderList.concat(data.rows)
+        if (this.total === -1) {
+          this.orderList = data.rows
+        } else {
+          this.orderList = this.orderList.concat(data.rows)
+        }
+
         this.total = data.total_count
         this.isLoadMore = this.total !== this.orderList.length
       }
+      uni.stopPullDownRefresh()
     },
     // 取消报名
     async joinActivity (id) {

+ 7 - 4
src/pagesSub/activity/activityDetail.vue

@@ -44,14 +44,14 @@
         <view class="divider-right"></view>
         <block v-if="detail.plat_type === 8">
           <view class="to-btn u-p-l-28"
-                @click="openOtherApplte(8)">
+                @click="openOtherApplte()">
             <view class="icon-mt-wh icon-elm"></view>
             <view class="u-m-t-2 u-font-22 u-content-color line-32">打开饿了么</view>
           </view>
         </block>
         <block v-if="detail.plat_type === 9">
           <view class="to-btn u-p-l-28"
-                @click="openOtherApplte(9)">
+                @click="openOtherApplte()">
             <view class="icon-mt-wh icon-mt"></view>
             <view class="u-m-t-2 u-font-22 u-content-color line-32">打开美团</view>
           </view>
@@ -388,8 +388,11 @@ export default {
         url: `/pagesSub/order/submitOrder?activityId=${this.detail.id}&userActivityId=${this.detail.user_activity_id}`
       })
     },
-    openOtherApplte (platType) {
-      this.$store.dispatch('toOtherApplte', platType)
+    openOtherApplte () {
+      uni.navigateToMiniProgram({
+        appId: this.detail.app_info.appid,
+        path: this.detail.app_info.path
+      })
     }
   },
   filters: {

+ 38 - 34
src/pagesSub/other/noviceStrategy.vue

@@ -50,7 +50,7 @@
       <view class="desc u-m-t-8 line-34">参与活动共有4个步骤:</view>
       <view class="item">
         <view class="line-40 bold">1.报名规则</view>
-        <view class="u-m-t-8 u-new-color line-34">用户定位10km范围以外活动不能够报名。 同平台(例如美团、饿了么)单用户每天只能报名一次。</view>
+        <view class="u-m-t-8 u-new-color line-34">用户定位10km范围以外活动不能够报名。同平台(例如美团、饿了么)单门店单用户每天只能报名一次。</view>
         <view class="desc line-34">霸王餐与返利餐均为限时限量活动,当活动时间过期或参与名额为零时,则无法报名。</view>
       </view>
       <view class="item">
@@ -82,42 +82,46 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-  .novice-main {
-    .z-index-10 {
-      z-index: 10;
-      position: relative;
-    }
-    .content {
-      margin-top: 16px;
-      padding: 32px;
-      background-color: #fff;
-      .title {
-        font-size: 36px;
-        line-height: 50px;
-        font-weight: bold;
-        .title-bg {
-          position: relative;
-          &::before {
-            position: absolute;
-            left: 0;
-            bottom: 0;
-            content: "";
-            width: 262px;
-            height: 14px;
-            background: linear-gradient(90deg, #FEB268 0%, rgba(254, 176, 104, 0) 100%);
-          }
+.novice-main {
+  .z-index-10 {
+    z-index: 10;
+    position: relative;
+  }
+  .content {
+    margin-top: 16px;
+    padding: 32px;
+    background-color: #fff;
+    .title {
+      font-size: 36px;
+      line-height: 50px;
+      font-weight: bold;
+      .title-bg {
+        position: relative;
+        &::before {
+          position: absolute;
+          left: 0;
+          bottom: 0;
+          content: '';
+          width: 262px;
+          height: 14px;
+          background: linear-gradient(
+            90deg,
+            #feb268 0%,
+            rgba(254, 176, 104, 0) 100%
+          );
         }
       }
-      .desc {
-        color: $u-other-color;
-      }
-      .item {
-        margin-top: 24px;
-      }
     }
-    .tips {
-      padding: 32px 0;
-      text-align: center;
+    .desc {
+      color: $u-other-color;
     }
+    .item {
+      margin-top: 24px;
+    }
+  }
+  .tips {
+    padding: 32px 0;
+    text-align: center;
   }
+}
 </style>