zs vor 1 Jahr
Ursprung
Commit
1e4e2fb727

+ 16 - 137
pages/home/index.vue

@@ -1,33 +1,22 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
-		<view class="top">
+		<view class="one">
 			<u-swiper :list="config.file" height="240px" indicator indicatorMode="line" circular></u-swiper>
 			<u-swiper :list="config.file" height="240px" indicator indicatorMode="line" circular></u-swiper>
 		</view>
 		</view>
-		<view class="bottom">
-			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-				<view class="list-scroll-view">
-					<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
-						<view class="list_1">
-							<view class="left">
-								<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''">
-								</image>
-							</view>
-							<view class="right">
-								<view class="name textOver">{{item.series||'暂无'}} {{item.year||'暂无'}}款
-									{{item.style||'暂无'}}
-								</view>
-								<view class="money">
-									<text>{{item.total_money||'0'}}</text>
-									<text>万</text>
-								</view>
-							</view>
-						</view>
-					</view>
-					<view class="is_bottom" v-if="is_bottom">
-						<text>{{config.bottom_title||'没有更多了!'}}</text>
-					</view>
+		<view class="two">
+			正在申办
+		</view>
+		<view class="thr">
+			<view class="list" v-for="(item, index) in menuList" :key="index" @click="toCommon(item.route)">
+				<image class="image" mode="aspectFill" :src="item.url"></image>
+				<view class="left">
+					<view class="name">{{item.title}}</view>
+					<view class="other">{{item.brief}}</view>
+				</view>
+				<view class="right">
+					<u-icon name="arrow-right" size="20"></u-icon>
 				</view>
 				</view>
-			</scroll-view>
+			</view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -43,21 +32,9 @@
 	const config = ref({ logo: [], file: [] });
 	const config = ref({ logo: [], file: [] });
 	const list = ref([]);
 	const list = ref([]);
 	const total = ref(0);
 	const total = ref(0);
-	const skip = ref(0);
-	const limit = ref(6);
-	const page = ref(0);
-	// 数据是否触底
-	const is_bottom = ref(false);
-	const scrollTop = ref(0);
 	onShow(async () => {
 	onShow(async () => {
 		await searchConfig();
 		await searchConfig();
-		await clearPage();
-		await search();
-	})
-	onPullDownRefresh(async () => {
-		await clearPage();
 		await search();
 		await search();
-		uni.stopPullDownRefresh();
 	})
 	})
 	// config信息
 	// config信息
 	const searchConfig = async () => {
 	const searchConfig = async () => {
@@ -66,8 +43,8 @@
 	// 查询
 	// 查询
 	const search = async () => {
 	const search = async () => {
 		const info = {
 		const info = {
-			skip: skip.value,
-			limit: limit.value,
+			skip: 0,
+			limit: 2,
 			status: '0'
 			status: '0'
 		}
 		}
 		// const res = await $api('car', 'GET', info);
 		// const res = await $api('car', 'GET', info);
@@ -81,12 +58,6 @@
 		// 	});
 		// 	});
 		// }
 		// }
 	};
 	};
-	// 搜索
-	const toChange = () => {
-		uni.navigateTo({
-			url: `/pagesHome/type/index`
-		})
-	};
 	const toCommon = (item) => {
 	const toCommon = (item) => {
 		uni.navigateTo({
 		uni.navigateTo({
 			url: `/pagesHome/search/index?type=${item.type || ''}`
 			url: `/pagesHome/search/index?type=${item.type || ''}`
@@ -98,26 +69,6 @@
 			url: `/pagesHome/car/index?id=${item.id || item._id}`
 			url: `/pagesHome/car/index?id=${item.id || item._id}`
 		})
 		})
 	};
 	};
-	// 分页
-	const toPage = () => {
-		if (total.value > list.value.length) {
-			uni.showLoading({
-				title: '加载中',
-				mask: true
-			})
-			page.value = page.value + 1;
-			skip.value = page.value * limit.value;
-			search();
-			uni.hideLoading();
-		} else is_bottom.value = true
-	};
-	// 清空列表
-	const clearPage = () => {
-		list.value = []
-		skip.value = 0
-		limit.value = 6
-		page.value = 0
-	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	.content {
 	.content {
@@ -125,77 +76,5 @@
 		flex-direction: column;
 		flex-direction: column;
 		width: 100vw;
 		width: 100vw;
 		height: 100vh;
 		height: 100vh;
-
-		.top {}
-
-		.bottom {
-			position: relative;
-			flex-grow: 1;
-
-			.list {
-				width: 47vw;
-				margin: 2vw 0 0 0;
-				border-radius: 5px;
-				border: 1px solid var(--f5Color);
-
-				.list_1 {
-					.left {
-						.image {
-							width: 100%;
-							height: 120px;
-							border-radius: 5px 5px 0 0;
-						}
-					}
-
-					.right {
-						display: flex;
-						flex-direction: column;
-						justify-content: space-between;
-						padding: 0 2vw;
-
-						.name {
-							font-size: var(--font14Size);
-						}
-
-						.money {
-							color: var(--fF0Color);
-							font-size: var(--font12Size);
-							margin: 0 0 1vw 0;
-
-							text:first-child {
-								font-size: var(--font18Size);
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			justify-content: space-between;
-			flex-wrap: wrap;
-			padding: 0 2vw;
-		}
-	}
-
-	.is_bottom {
-		width: 100%;
-		text-align: center;
-
-		text {
-			padding: 2vw 0;
-			display: inline-block;
-			color: var(--f85Color);
-			font-size: var(--font12Size);
-		}
 	}
 	}
 </style>
 </style>

+ 79 - 81
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -10096,7 +10096,6 @@ const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
 };
 };
 const onShow = /* @__PURE__ */ createHook(ON_SHOW);
 const onShow = /* @__PURE__ */ createHook(ON_SHOW);
 const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
 const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
-const onPullDownRefresh = /* @__PURE__ */ createHook(ON_PULL_DOWN_REFRESH);
 //! moment.js
 //! moment.js
 //! version : 2.30.1
 //! version : 2.30.1
 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
@@ -14205,84 +14204,6 @@ const props$6 = {
     }
     }
   }
   }
 };
 };
-const props$5 = {
-  props: {
-    // 头像图片路径(不能为相对路径)
-    src: {
-      type: String,
-      default: defprops.avatar.src
-    },
-    // 头像形状,circle-圆形,square-方形
-    shape: {
-      type: String,
-      default: defprops.avatar.shape
-    },
-    // 头像尺寸
-    size: {
-      type: [String, Number],
-      default: defprops.avatar.size
-    },
-    // 裁剪模式
-    mode: {
-      type: String,
-      default: defprops.avatar.mode
-    },
-    // 显示的文字
-    text: {
-      type: String,
-      default: defprops.avatar.text
-    },
-    // 背景色
-    bgColor: {
-      type: String,
-      default: defprops.avatar.bgColor
-    },
-    // 文字颜色
-    color: {
-      type: String,
-      default: defprops.avatar.color
-    },
-    // 文字大小
-    fontSize: {
-      type: [String, Number],
-      default: defprops.avatar.fontSize
-    },
-    // 显示的图标
-    icon: {
-      type: String,
-      default: defprops.avatar.icon
-    },
-    // 显示小程序头像,只对百度,微信,QQ小程序有效
-    mpAvatar: {
-      type: Boolean,
-      default: defprops.avatar.mpAvatar
-    },
-    // 是否使用随机背景色
-    randomBgColor: {
-      type: Boolean,
-      default: defprops.avatar.randomBgColor
-    },
-    // 加载失败的默认头像(组件有内置默认图片)
-    defaultUrl: {
-      type: String,
-      default: defprops.avatar.defaultUrl
-    },
-    // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
-    colorIndex: {
-      type: [String, Number],
-      // 校验参数规则,索引在0-19之间
-      validator(n2) {
-        return index$1.$u.test.range(n2, [0, 19]) || n2 === "";
-      },
-      default: defprops.avatar.colorIndex
-    },
-    // 组件标识符
-    name: {
-      type: String,
-      default: defprops.avatar.name
-    }
-  }
-};
 const icons = {
 const icons = {
   "uicon-level": "",
   "uicon-level": "",
   "uicon-column-line": "",
   "uicon-column-line": "",
@@ -14497,7 +14418,7 @@ const icons = {
   "uicon-zh": "",
   "uicon-zh": "",
   "uicon-en": ""
   "uicon-en": ""
 };
 };
-const props$4 = {
+const props$5 = {
   props: {
   props: {
     // 图标类名
     // 图标类名
     name: {
     name: {
@@ -14586,6 +14507,84 @@ const props$4 = {
     }
     }
   }
   }
 };
 };
+const props$4 = {
+  props: {
+    // 头像图片路径(不能为相对路径)
+    src: {
+      type: String,
+      default: defprops.avatar.src
+    },
+    // 头像形状,circle-圆形,square-方形
+    shape: {
+      type: String,
+      default: defprops.avatar.shape
+    },
+    // 头像尺寸
+    size: {
+      type: [String, Number],
+      default: defprops.avatar.size
+    },
+    // 裁剪模式
+    mode: {
+      type: String,
+      default: defprops.avatar.mode
+    },
+    // 显示的文字
+    text: {
+      type: String,
+      default: defprops.avatar.text
+    },
+    // 背景色
+    bgColor: {
+      type: String,
+      default: defprops.avatar.bgColor
+    },
+    // 文字颜色
+    color: {
+      type: String,
+      default: defprops.avatar.color
+    },
+    // 文字大小
+    fontSize: {
+      type: [String, Number],
+      default: defprops.avatar.fontSize
+    },
+    // 显示的图标
+    icon: {
+      type: String,
+      default: defprops.avatar.icon
+    },
+    // 显示小程序头像,只对百度,微信,QQ小程序有效
+    mpAvatar: {
+      type: Boolean,
+      default: defprops.avatar.mpAvatar
+    },
+    // 是否使用随机背景色
+    randomBgColor: {
+      type: Boolean,
+      default: defprops.avatar.randomBgColor
+    },
+    // 加载失败的默认头像(组件有内置默认图片)
+    defaultUrl: {
+      type: String,
+      default: defprops.avatar.defaultUrl
+    },
+    // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
+    colorIndex: {
+      type: [String, Number],
+      // 校验参数规则,索引在0-19之间
+      validator(n2) {
+        return index$1.$u.test.range(n2, [0, 19]) || n2 === "";
+      },
+      default: defprops.avatar.colorIndex
+    },
+    // 组件标识符
+    name: {
+      type: String,
+      default: defprops.avatar.name
+    }
+  }
+};
 const props$3 = {
 const props$3 = {
   props: {
   props: {
     // 是否显示组件
     // 是否显示组件
@@ -14951,7 +14950,6 @@ exports.mpMixin = mpMixin;
 exports.n = n;
 exports.n = n;
 exports.o = o;
 exports.o = o;
 exports.onLoad = onLoad;
 exports.onLoad = onLoad;
-exports.onPullDownRefresh = onPullDownRefresh;
 exports.onShow = onShow;
 exports.onShow = onShow;
 exports.openType = openType;
 exports.openType = openType;
 exports.p = p;
 exports.p = p;

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.js


+ 1 - 1
unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.js

@@ -6,7 +6,7 @@ const _sfc_main = {
     return {};
     return {};
   },
   },
   emits: ["click"],
   emits: ["click"],
-  mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$2],
+  mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$1],
   computed: {
   computed: {
     uClasses() {
     uClasses() {
       let classes = [];
       let classes = [];

+ 20 - 55
unpackage/dist/dev/mp-weixin/pages/home/index.js

@@ -2,11 +2,13 @@
 const common_vendor = require("../../common/vendor.js");
 const common_vendor = require("../../common/vendor.js");
 if (!Array) {
 if (!Array) {
   const _easycom_u_swiper2 = common_vendor.resolveComponent("u-swiper");
   const _easycom_u_swiper2 = common_vendor.resolveComponent("u-swiper");
-  _easycom_u_swiper2();
+  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
+  (_easycom_u_swiper2 + _easycom_u_icon2)();
 }
 }
 const _easycom_u_swiper = () => "../../node-modules/uview-plus/components/u-swiper/u-swiper.js";
 const _easycom_u_swiper = () => "../../node-modules/uview-plus/components/u-swiper/u-swiper.js";
+const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
 if (!Math) {
 if (!Math) {
-  _easycom_u_swiper();
+  (_easycom_u_swiper + _easycom_u_icon)();
 }
 }
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "index",
   __name: "index",
@@ -15,59 +17,24 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
     (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
     const config = common_vendor.ref({ logo: [], file: [] });
     const config = common_vendor.ref({ logo: [], file: [] });
-    const list = common_vendor.ref([]);
-    const total = common_vendor.ref(0);
-    const skip = common_vendor.ref(0);
-    const limit = common_vendor.ref(6);
-    const page = common_vendor.ref(0);
-    const is_bottom = common_vendor.ref(false);
+    common_vendor.ref([]);
     common_vendor.ref(0);
     common_vendor.ref(0);
     common_vendor.onShow(async () => {
     common_vendor.onShow(async () => {
       await searchConfig();
       await searchConfig();
-      await clearPage();
       await search();
       await search();
     });
     });
-    common_vendor.onPullDownRefresh(async () => {
-      await clearPage();
-      await search();
-      common_vendor.index.stopPullDownRefresh();
-    });
     const searchConfig = async () => {
     const searchConfig = async () => {
       config.value = common_vendor.index.getStorageSync("config");
       config.value = common_vendor.index.getStorageSync("config");
     };
     };
     const search = async () => {
     const search = async () => {
-      ({
-        skip: skip.value,
-        limit: limit.value,
-        status: "0"
-      });
     };
     };
-    const toView = (item) => {
+    const toCommon = (item) => {
       common_vendor.index.navigateTo({
       common_vendor.index.navigateTo({
-        url: `/pagesHome/car/index?id=${item.id || item._id}`
+        url: `/pagesHome/search/index?type=${item.type || ""}`
       });
       });
     };
     };
-    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;
-      limit.value = 6;
-      page.value = 0;
-    };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
-      return common_vendor.e({
+      return {
         a: common_vendor.p({
         a: common_vendor.p({
           list: config.value.file,
           list: config.value.file,
           height: "240px",
           height: "240px",
@@ -75,23 +42,21 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           indicatorMode: "line",
           indicatorMode: "line",
           circular: true
           circular: true
         }),
         }),
-        b: common_vendor.f(list.value, (item, index, i0) => {
+        b: common_vendor.f(_ctx.menuList, (item, index, i0) => {
           return {
           return {
-            a: item.file && item.file.length > 0 ? item.file[0].url : "",
-            b: common_vendor.t(item.series || "暂无"),
-            c: common_vendor.t(item.year || "暂无"),
-            d: common_vendor.t(item.style || "暂无"),
-            e: common_vendor.t(item.total_money || "0"),
-            f: index,
-            g: common_vendor.o(($event) => toView(item), index)
+            a: item.url,
+            b: common_vendor.t(item.title),
+            c: common_vendor.t(item.brief),
+            d: "4978fed5-1-" + i0,
+            e: index,
+            f: common_vendor.o(($event) => toCommon(item.route), index)
           };
           };
         }),
         }),
-        c: is_bottom.value
-      }, is_bottom.value ? {
-        d: common_vendor.t(config.value.bottom_title || "没有更多了!")
-      } : {}, {
-        e: common_vendor.o(toPage)
-      });
+        c: common_vendor.p({
+          name: "arrow-right",
+          size: "20"
+        })
+      };
     };
     };
   }
   }
 });
 });

+ 2 - 1
unpackage/dist/dev/mp-weixin/pages/home/index.json

@@ -2,6 +2,7 @@
   "navigationBarTitleText": "赋强公证",
   "navigationBarTitleText": "赋强公证",
   "navigationStyle": "custom",
   "navigationStyle": "custom",
   "usingComponents": {
   "usingComponents": {
-    "u-swiper": "../../node-modules/uview-plus/components/u-swiper/u-swiper"
+    "u-swiper": "../../node-modules/uview-plus/components/u-swiper/u-swiper",
+    "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon"
   }
   }
 }
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/index.wxml


+ 0 - 55
unpackage/dist/dev/mp-weixin/pages/home/index.wxss

@@ -9,59 +9,4 @@
   flex-direction: column;
   flex-direction: column;
   width: 100vw;
   width: 100vw;
   height: 100vh;
   height: 100vh;
-}
-.content .bottom.data-v-4978fed5 {
-  position: relative;
-  flex-grow: 1;
-}
-.content .bottom .list.data-v-4978fed5 {
-  width: 47vw;
-  margin: 2vw 0 0 0;
-  border-radius: 5px;
-  border: 1px solid var(--f5Color);
-}
-.content .bottom .list .list_1 .left .image.data-v-4978fed5 {
-  width: 100%;
-  height: 120px;
-  border-radius: 5px 5px 0 0;
-}
-.content .bottom .list .list_1 .right.data-v-4978fed5 {
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  padding: 0 2vw;
-}
-.content .bottom .list .list_1 .right .name.data-v-4978fed5 {
-  font-size: var(--font14Size);
-}
-.content .bottom .list .list_1 .right .money.data-v-4978fed5 {
-  color: var(--fF0Color);
-  font-size: var(--font12Size);
-  margin: 0 0 1vw 0;
-}
-.content .bottom .list .list_1 .right .money text.data-v-4978fed5:first-child {
-  font-size: var(--font18Size);
-}
-.scroll-view.data-v-4978fed5 {
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-}
-.scroll-view .list-scroll-view.data-v-4978fed5 {
-  display: flex;
-  justify-content: space-between;
-  flex-wrap: wrap;
-  padding: 0 2vw;
-}
-.is_bottom.data-v-4978fed5 {
-  width: 100%;
-  text-align: center;
-}
-.is_bottom text.data-v-4978fed5 {
-  padding: 2vw 0;
-  display: inline-block;
-  color: var(--f85Color);
-  font-size: var(--font12Size);
 }
 }