guojy 1 年間 前
コミット
fba73bd110

+ 1 - 0
src/view/course/deal/dealOrder.vue

@@ -55,6 +55,7 @@
         show-toolbar
         :columns="columnsOptions"
         @confirm="onConfirm"
+        @cancel="popupShow = false"
       />
     </van-popup>
     <van-number-keyboard

+ 40 - 20
src/view/course/home.vue

@@ -56,8 +56,8 @@
     </div>
     <div class="user_course_tabs">
       <div class="tbsL" v-if='user_info.marketable'>
-        <div class="tbsi" :class="{active:tbsIndex==0}" @click="selectTbs()">我的推广</div>
-        <div class="tbsi" :class="{active:tbsIndex==1}" @click="selectTbs()">我的学习</div>
+        <div class="tbsi" :class="{active:tbsIndex==0}" @click="selectTbs(0)">我的推广</div>
+        <div class="tbsi" :class="{active:tbsIndex==1}" @click="selectTbs(1)">我的学习</div>
       </div>
       <div class="tbsR" v-if='user_info.marketable' @click="toMoreUrl">
         <span>名额变动明细</span>
@@ -72,14 +72,15 @@
     />
     <div class="courScroll" :style="{height:user_info.marketable?'calc(100vh - 3.32rem) !important':'calc(-2.05rem + 100vh) !important'}">
       <scroller ref="scroller" :isInitRefresh="false">
-        <div class="myCourseList" v-if="user_info.marketable&&tbsIndex==0">
+        <van-loading v-show="showLoad" style="margin: 0px auto;position: relative;left: 50%;transform: translateX(-0.25rem);"/>
+        <div class="myCourseList" v-if="user_info.marketable&&tbsIndex==0&&!showLoad">
           <courseList
             :dataList="courseClass.proCourse.courseList"
             :showNum="1"
             :fixedTitle="courseClass.proCourse.title"
           ></courseList>
         </div>
-        <div class="myCourseList" v-if="tbsIndex==1">
+        <div class="myCourseList" v-if="tbsIndex==1&&!showLoad">
           <courseList
             :dataList="courseClass.learnCourse.courseList"
             :fixedTitle="courseClass.learnCourse.title"
@@ -118,6 +119,7 @@ export default {
   },
   data() {
     return {
+      showLoad:false,
       tbsIndex:0,
       clipboard: null,
       qrVisible: false,
@@ -163,12 +165,20 @@ export default {
     }
   },
   methods: {
-    selectTbs(){
+    selectTbs(i){
       if(this.user_info.marketable){
-        if(this.tbsIndex == 1){
+        if(i == 0&&this.tbsIndex != 0){
           this.tbsIndex = 0;
-        }else{
+          this.showLoad = true;
+          setTimeout(()=>{
+            this.getDealerCourseList()
+          },1000)
+        }else if(i == 1&&this.tbsIndex != 1){
           this.tbsIndex = 1;
+          this.showLoad = true;
+          setTimeout(()=>{
+            this.getUserCourseList()
+          },1000)
         }
       }
     },
@@ -188,10 +198,14 @@ export default {
           if (this.$route.query && this.$route.query.pid) {
             localStorage.setItem("pid", this.$route.query.pid);
             this.$router.push(`/courseLogin?pid=${this.$route.query.pid}`);
-          } else if (this.user_info.marketable) {
-            getDealerCourseList();
+          } else{
+            if (this.user_info.marketable) {
+              getDealerCourseList();
+            } else if (!this.user_info.marketable){
+              this.tbsIndex = 1;
+            }
+            getUserCourseList();
           }
-          getUserCourseList();
         });
       });
     },
@@ -204,12 +218,14 @@ export default {
             if (this.$route.query && this.$route.query.pid) {
               localStorage.setItem("pid", this.$route.query.pid);
               this.$router.push(`/courseLogin?pid=${this.$route.query.pid}`);
-            } else if (this.user_info.marketable) {
-              this.getDealerCourseList();
-            } else if (!this.user_info.marketable){
-              this.tbsIndex = 1;
+            } else{
+              if (this.user_info.marketable) {
+                this.getDealerCourseList();
+              } else if (!this.user_info.marketable){
+                this.tbsIndex = 1;
+              }
+              this.getUserCourseList();
             }
-            this.getUserCourseList();
           } else {
             this.getUerInfo(this.wxId);
           }
@@ -220,12 +236,14 @@ export default {
             if (this.$route.query && this.$route.query.pid) {
               localStorage.setItem("pid", this.$route.query.pid);
               this.$router.push(`/courseLogin?pid=${this.$route.query.pid}`);
-            } else if (this.user_info.marketable) {
-              this.getDealerCourseList();
-            } else if (!this.user_info.marketable){
-              this.tbsIndex = 1;
+            } else{
+              if (this.user_info.marketable) {
+                this.getDealerCourseList();
+              } else if (!this.user_info.marketable){
+                this.tbsIndex = 1;
+              }
+              this.getUserCourseList();
             }
-            this.getUserCourseList();
           } else {
             this.getUerInfo(this.wxId);
           }
@@ -236,6 +254,7 @@ export default {
       getDealerCourseList().then(res => {
         this.courseClass.proCourse.total = res.total;
         this.courseClass.proCourse.courseList = res.list;
+        this.showLoad = false;
         if (done) done();
       });
     },
@@ -256,6 +275,7 @@ export default {
           list.push(data);
         });
         this.courseClass.learnCourse.courseList = list;
+        this.showLoad = false;
         if (done) done();
       });
     },

+ 1 - 1
src/view/course/user/courseAdDeal.vue

@@ -250,7 +250,7 @@ export default {
     },
     getMoreList(done) {
       console.log("到底了");
-      if (!this.noDate1) {
+      if (!this.noDate) {
         setTimeout(() => {
           this.getRecord(done);
         }, 300);

+ 1 - 1
src/view/course/user/deal.vue

@@ -218,7 +218,7 @@ export default {
       let data = {
         page: this.page1.cur,
         pageSize: this.page1.size,
-        status: -1
+        status: 2
       };
       getDealerRecord(this.$route.params.id, data).then(res => {
         this.page1.cur = res.current;

+ 1 - 1
src/view/user/wxInit.vue

@@ -122,7 +122,7 @@ export default {
                 getUSerInfo(data.wo_token).then(ress=>{
                   localStorage.setItem("wx_user_info", JSON.stringify(ress));
                   if(request.type == 10&&request.pid){
-                    this.$router.push(`/courseLogin?pid=${request.pid}`)
+                    this.$router.push(`/courseHome?pid=${request.pid}`)
                   }else if(request.type == 11&&request.expendCode){
                     let arr = request.expendCode.toString().split('-');
                     this.$router.push({