李书文 1 年之前
父節點
當前提交
1e0b4acf5c
共有 2 個文件被更改,包括 24 次插入23 次删除
  1. 0 1
      pages/index/index.vue
  2. 24 22
      pages/market/one/list.vue

+ 0 - 1
pages/index/index.vue

@@ -69,7 +69,6 @@ export default {
 		this.getBannerList();
 		this.getNewsList();
 		this.getRoleMenu();
-		this.getMenu();
 	},
 	methods: {
 		getBannerList() {

+ 24 - 22
pages/market/one/list.vue

@@ -43,28 +43,9 @@ export default {
 		return {
 			show: false,
 			user: this.getUser(),
-			sort: [
-				{
-					name: '综合',
-					key: 1,
-					isAsc: 'desc',
-					check: false
-				},
-				{
-					name: '日期',
-					key: 2,
-					isAsc: 'desc',
-					check: false
-				},
-				{
-					name: '价格',
-					key: 3,
-					isAsc: 'desc',
-					check: false
-				}
-			],
+			sort: [{ name: '综合' }, { name: '日期' }, { name: '价格' }],
 			list: [],
-			param: { pageNo: 1, pageSize: 10, },
+			param: { pageNo: 1, pageSize: 10 },
 			loadMore: true
 		};
 	},
@@ -74,7 +55,7 @@ export default {
 	methods: {
 		getData() {
 			this.http.request({
-				url: '/level-one-server/TbGoodsTransit/getTransitList',
+				url: '/level-one-server/app/TbGoodsTransit/getList',
 				data: this.param,
 				loading: 'false',
 				success: res => {
@@ -107,6 +88,27 @@ export default {
 		},
 		detail(id) {
 			uni.navigateTo({ url: '/pages/market/one/detail?id=' + id });
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNo = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNo++;
+			this.getData();
 		}
 	}
 };