|
@@ -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();
|
|
|
});
|
|
|
},
|