Browse Source

推荐位修改

xuqiaoying 2 years ago
parent
commit
2ae9b046fb
2 changed files with 15 additions and 7 deletions
  1. 2 2
      common/request.js
  2. 13 5
      pages/index/index.vue

+ 2 - 2
common/request.js

@@ -6,11 +6,11 @@ var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地
-export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
+// export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
 
  //图片上传api
 // export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release

+ 13 - 5
pages/index/index.vue

@@ -113,16 +113,17 @@
 					</template>
 				</scroll-view>
 			</view>
-			<view class="filters">
+			<!-- v-if="tabNum == 0" -->
+			<!-- <view class="filters">
 				<scroll-view class="scroll_view_H" scroll-x="true" >
-					<!-- v-if="tabNum == 0" -->
+					
 					<template >
 						<view v-for="(item, index) in subjectList" :key="index" class="filter_item"  @click="changeSub(item.id, index)">
 							<view class="name" :class="{nactive: subIndex == index}">{{ item.subjectName }}</view>
 						</view>
 					</template>
 				</scroll-view>
-			</view>
+			</view> -->
 			<view class="course-list" v-show="tabCurrent==0">
 				<template v-if="list1.length">
 					<!-- hover-class="none" -->
@@ -872,8 +873,15 @@ export default {
 		tab(e) {
 			this.tabCurrent = e;
 			this.tabNum = e
-			let recommendId = e == 0 ? this.courseId : this.bankId
-			this.getSubjectList(recommendId)
+			this.paramList[this.tabNum].pageNum = 1 
+			if (e == 0) {
+				this.list1 = []
+			} else {
+				this.list2 = []
+			}
+			this.courseLists()
+			// let recommendId = e == 0 ? this.courseId : this.bankId
+			// this.getSubjectList(recommendId)
 		},
 		updateHomePlan() {
 			this.$refs.home.init();