guojy 1 年之前
父节点
当前提交
b7b2df6719

+ 1 - 1
src/view/course/api/index.js

@@ -47,7 +47,7 @@ export function getUSerInfo(token) {
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
         axiosKc('post', `/mkt/client/login`, {}, '', token).then((res) => {
         axiosKc('post', `/mkt/client/login`, {}, '', token).then((res) => {
             if (res.data.code == 1) {
             if (res.data.code == 1) {
-                Toast(`获取到用户信息${res.data.data.marketable}`)
+                // Toast(`获取到用户信息${res.data.data.marketable}`)
                 setWxToken(res.data.data.utoken)
                 setWxToken(res.data.data.utoken)
                 localStorage.setItem('wx_user_info', JSON.stringify(res.data.data))
                 localStorage.setItem('wx_user_info', JSON.stringify(res.data.data))
                 resolve(res.data.data)
                 resolve(res.data.data)

+ 1 - 1
src/view/course/components/CourseTeam.vue

@@ -4,7 +4,7 @@
       <van-search
       <van-search
         v-model="searchValue"
         v-model="searchValue"
         placeholder="请输入用户名搜索"
         placeholder="请输入用户名搜索"
-        @search="onSearch"
+        @input="onSearch"
       />
       />
     </form>
     </form>
     <div class="team-desc">
     <div class="team-desc">

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

@@ -70,7 +70,7 @@ export default {
         this.recordList = this.recordList.concat(res.list)
         this.recordList = this.recordList.concat(res.list)
         this.page.cur = res.current
         this.page.cur = res.current
         this.page.total = res.total
         this.page.total = res.total
-        if (res.pages == this.page.cur) {
+        if (res.pages == this.page.cur || res.pages == 0) {
           if (done) done(true);
           if (done) done(true);
           this.noDate = true;
           this.noDate = true;
         } else {
         } else {

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

@@ -272,7 +272,7 @@ export default {
         this.recordList = this.recordList.concat(res.list);
         this.recordList = this.recordList.concat(res.list);
         this.page.cur = res.current;
         this.page.cur = res.current;
         this.page.total = res.total;
         this.page.total = res.total;
-        if (res.pages == res.current) {
+        if (res.pages == res.current || res.pages == 0) {
           console.log("已无更多");
           console.log("已无更多");
           if (done) done(true);
           if (done) done(true);
           this.noDate = true;
           this.noDate = true;

+ 16 - 5
src/view/course/user/deal.vue

@@ -20,7 +20,17 @@
             :user_name="user_info.name"
             :user_name="user_info.name"
             width="1.12rem"
             width="1.12rem"
             height="1.12rem"
             height="1.12rem"
+            v-if="user_info.imgUrl"
           ></userImage>
           ></userImage>
+          <div style="background: #26A2FF;border-radius: 50%;overflow: hidden;" v-else>
+            <userImage
+              class="about-me__avatar"
+              :img_url="defaultImgUrl"
+              user_name="用户"
+              width="1.12rem"
+              height="1.12rem"
+            ></userImage>
+          </div>
           <div class="info">
           <div class="info">
             <span
             <span
               >{{ user_info.name
               >{{ user_info.name
@@ -112,6 +122,7 @@ export default {
   components: { courseList },
   components: { courseList },
   data() {
   data() {
     return {
     return {
+      defaultImgUrl:require('../../../assets/images/courseUser.png'),
       title: "交易",
       title: "交易",
       activeList: ["待确认接收的名额", "已确认接收的名额"],
       activeList: ["待确认接收的名额", "已确认接收的名额"],
       active: 0,
       active: 0,
@@ -129,9 +140,9 @@ export default {
       },
       },
       user_info: {
       user_info: {
         imgUrl: "",
         imgUrl: "",
-        id: "wx15451154555",
-        name: "新人",
-        mobile: "15270803986"
+        id: "",
+        name: "",
+        mobile: ""
       },
       },
       target_user_info: JSON.parse(localStorage.getItem("wx_user_info")),
       target_user_info: JSON.parse(localStorage.getItem("wx_user_info")),
       courseList: [],
       courseList: [],
@@ -208,7 +219,7 @@ export default {
         this.courseList = this.courseList.concat(res.list);
         this.courseList = this.courseList.concat(res.list);
         this.page.cur = res.current;
         this.page.cur = res.current;
         this.page.total = res.total;
         this.page.total = res.total;
-        if (res.pages == this.page.cur) {
+        if (res.pages == this.page.cur || res.pages == 0) {
           if (done) done(true);
           if (done) done(true);
           this.noDate = true;
           this.noDate = true;
         } else {
         } else {
@@ -229,7 +240,7 @@ export default {
         this.page1.cur = res.current;
         this.page1.cur = res.current;
         this.page1.total = res.total;
         this.page1.total = res.total;
         this.recordList = this.recordList.concat(res.list);
         this.recordList = this.recordList.concat(res.list);
-        if (res.pages == this.page1.cur) {
+        if (res.pages == this.page1.cur || res.pages == 0) {
           console.log("没有更多");
           console.log("没有更多");
           if (done) done(true);
           if (done) done(true);
           this.noDate1 = true;
           this.noDate1 = true;

+ 14 - 8
src/view/course/user/team.vue

@@ -11,7 +11,7 @@
       <scroller 
       <scroller 
       :isInitRefresh="false" 
       :isInitRefresh="false" 
       ref="recordScroller"
       ref="recordScroller"
-      :list="recordList"
+      :list="teamList"
       noDataText="没有更多..."
       noDataText="没有更多..."
       :on-infinite="getMoreList">
       :on-infinite="getMoreList">
         <Team
         <Team
@@ -20,11 +20,6 @@
           :count="page.total"
           :count="page.total"
           @search="search"
           @search="search"
         ></Team>
         ></Team>
-        <van-divider
-          :style="{ color: '#333', borderColor: '#333', padding: '10px 16px' }"
-          v-if="teamList.length == page.total"
-          >没有更多了</van-divider
-        >
       </scroller>
       </scroller>
     </div>
     </div>
   </div>
   </div>
@@ -60,6 +55,15 @@ export default {
     this.init();
     this.init();
   },
   },
   methods: {
   methods: {
+    debouce(callback,time){
+      let timer;
+      return ()=>{
+        clearTimeout(timer)
+        timer = setTimeout(()=>{
+          callback()
+        },time)
+      }
+    },
     // 触底加载
     // 触底加载
     getMoreList(done) {
     getMoreList(done) {
       console.log("到底了");
       console.log("到底了");
@@ -96,7 +100,8 @@ export default {
         getDealerTeam(data).then(res => {
         getDealerTeam(data).then(res => {
           this.teamList = res.list;
           this.teamList = res.list;
           this.page.total = res.total;
           this.page.total = res.total;
-          if (res.pages == res.current) {
+          this.page.cur = res.current;
+          if (res.pages == res.current || res.pages == 0) {
             console.log("已无更多");
             console.log("已无更多");
             if (done) done(true);
             if (done) done(true);
             this.noDate = true;
             this.noDate = true;
@@ -112,7 +117,7 @@ export default {
           this.teamList = res.list;
           this.teamList = res.list;
           this.page.total = res.total;
           this.page.total = res.total;
           this.page.cur = res.current;
           this.page.cur = res.current;
-          if (res.pages == res.current) {
+          if (res.pages == res.current || res.pages == 0) {
             console.log("已无更多");
             console.log("已无更多");
             if (done) done(true);
             if (done) done(true);
             this.noDate = true;
             this.noDate = true;
@@ -128,6 +133,7 @@ export default {
     // 搜索
     // 搜索
     search(val) {
     search(val) {
       this.keyword = val;
       this.keyword = val;
+      this.page.cur = 1;
       this.getList();
       this.getList();
     }
     }
   }
   }

+ 2 - 0
src/view/course/video/video.vue

@@ -160,6 +160,8 @@ img {
     .previewImg {
     .previewImg {
       border-radius: 0.1rem;
       border-radius: 0.1rem;
       overflow: hidden;
       overflow: hidden;
+      width: 100%;
+      height: 4rem;
       video {
       video {
         width: 100%;
         width: 100%;
         height: 4rem;
         height: 4rem;