zs 1 년 전
부모
커밋
6a08d2feb0
3개의 변경된 파일29개의 추가작업 그리고 20개의 파일을 삭제
  1. 3 2
      pagesHome/list/index.vue
  2. 25 17
      unpackage/dist/dev/mp-weixin/pagesHome/list/index.js
  3. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/list/index.wxml

+ 3 - 2
pagesHome/list/index.vue

@@ -8,7 +8,7 @@
 				<button size="mini" class="button" type="primary" @click="searchInfo">搜索</button>
 			</view>
 		</view>
-		<view class="two" v-if="total>0">
+		<view class="two">
 			<view class="two_1">
 				<scroll-view scroll-y="true" class="scroll-view">
 					<view class="list-scroll-view">
@@ -160,7 +160,8 @@
 	const toTab = async (data) => {
 		console.log(data);
 	};
-	const scrolltolower = () => {
+	// 分页
+	const toPage = () => {
 		if (total.value > list.value.length) {
 			uni.showLoading({
 				title: '加载中',

+ 25 - 17
unpackage/dist/dev/mp-weixin/pagesHome/list/index.js

@@ -107,6 +107,19 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const toTab = async (data) => {
       console.log(data);
     };
+    const toPage = () => {
+      if (total.value > list.value.length) {
+        common_vendor.index.showLoading({
+          title: "加载中",
+          mask: true
+        });
+        page.value = page.value + 1;
+        skip.value = page.value * limit.value;
+        search();
+        common_vendor.index.hideLoading();
+      } else
+        is_bottom.value = true;
+    };
     const clearPage = () => {
       list.value = [];
       skip.value = 0;
@@ -118,9 +131,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         a: nick_name.value,
         b: common_vendor.o(($event) => nick_name.value = $event.detail.value),
         c: common_vendor.o(searchInfo),
-        d: total.value > 0
-      }, total.value > 0 ? common_vendor.e({
-        e: common_vendor.f(subjectList.value, (item, index, i0) => {
+        d: common_vendor.f(subjectList.value, (item, index, i0) => {
           return {
             a: common_vendor.t(item.label),
             b: common_vendor.n(active.value == index ? "listActive" : ""),
@@ -128,40 +139,37 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             d: common_vendor.o(($event) => toChange(index, item), index)
           };
         }),
-        f: common_vendor.o(toTab),
-        g: common_vendor.p({
+        e: common_vendor.o(toTab),
+        f: common_vendor.p({
           list: gradeList.value,
           keyName: "label"
         }),
-        h: total.value > 0
+        g: total.value > 0
       }, total.value > 0 ? common_vendor.e({
-        i: common_vendor.f(list.value, (tag, index, i0) => {
+        h: common_vendor.f(list.value, (tag, index, i0) => {
           return {
             a: common_vendor.t(tag.nick_name),
             b: index,
             c: common_vendor.o(($event) => _ctx.toBuy(tag), index)
           };
         }),
-        j: is_bottom.value
+        i: is_bottom.value
       }, is_bottom.value ? {
-        k: common_vendor.t(config.value.bottom_title)
+        j: common_vendor.t(config.value.bottom_title)
       } : {}, {
+        k: common_vendor.o(toPage),
         l: common_vendor.o(
-          //@ts-ignore
-          (...args) => _ctx.toPage && _ctx.toPage(...args)
-        ),
-        m: common_vendor.o(
           //@ts-ignore
           (...args) => _ctx.toScroll && _ctx.toScroll(...args)
         )
       }) : {
-        n: common_vendor.p({
+        m: common_vendor.p({
           mode: "list",
           icon: "/static/list.png"
         })
-      }) : {}, {
-        o: common_vendor.o(showChange),
-        p: common_vendor.p({
+      }, {
+        n: common_vendor.o(showChange),
+        o: common_vendor.p({
           show: show.value
         })
       });

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/list/index.wxml