zs 1 rok pred
rodič
commit
8b04b8e044

+ 42 - 25
pagesHome/rank/index.vue

@@ -8,25 +8,20 @@
 			<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="rank" :class="[`rank${index+1}`]">top{{index+1}}</view>
 						<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.name||'暂无'}}</view>
-							<view class="other">
-								<text v-if="item.year">{{item.year||'暂无'}}| </text>
-								<text v-if="item.kilometer">{{item.kilometer||'暂无'}} | </text>
-								<text v-if="item.city">{{item.city||'暂无'}}</text>
-							</view>
+							<view class="name textOver">{{item.brand||'暂无'}}</view>
 							<view class="right_1">
 								<view class="money">
 									<text>{{item.money||'0'}}</text>
 									<text>万</text>
 								</view>
 								<view>
-									<button @tap.stop="toChat(item)" class="button" size="mini"
-										type="default">询底价</button>
+									<u-icon color="#000" name="heart" size="20"></u-icon>
 								</view>
 							</view>
 						</view>
@@ -58,7 +53,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/1.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '夏朗',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -67,7 +62,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/2.jpg' }],
-			name: '捷豹XEL 2020款 2.0T 200PS S进取优雅版',
+			brand: '捷豹',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -76,7 +71,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/3.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '大众',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -85,7 +80,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/4.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '大众',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -94,7 +89,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/5.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '大众',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -103,7 +98,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/6.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '大众',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -112,7 +107,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/7.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '奔驰',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -121,7 +116,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/8.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '丰田',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -130,7 +125,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/9.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '大众',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -139,7 +134,7 @@
 		{
 			id: '1',
 			file: [{ url: 'https://cdn.uviewui.com/uview/album/10.jpg' }],
-			name: '夏朗 2013款 1.8TSI 标配型 欧IV',
+			brand: '本田',
 			year: '2014年 ',
 			city: '丹东',
 			kilometer: '8万公里',
@@ -238,12 +233,38 @@
 				position: relative;
 				display: flex;
 				margin: 1vw 0 0 0;
-				padding: 1vw;
+				padding: 2vw 2vw 0 2vw;
+
+				.rank {
+					position: absolute;
+					top: -2px;
+					left: 2px;
+					padding: 2px 4px;
+					font-size: var(--font12Size);
+					border-top-left-radius: 8px;
+					/* 左上角 */
+					border-bottom-right-radius: 8px;
+					/* 右下角 */
+					background-color: var(--f99Color);
+				}
+
+				.rank1 {
+					background-color: #817AE3;
+				}
+
+				.rank2 {
+					background-color: #FF6A88;
+				}
+
+				.rank3 {
+					background-color: #FBAB7E;
+				}
+
 
 				.left {
 					.image {
-						width: 130px;
-						height: 100px;
+						width: 100px;
+						height: 60px;
 						border-radius: 2px;
 					}
 				}
@@ -277,10 +298,6 @@
 								font-size: var(--font18Size);
 							}
 						}
-
-						.button {
-							background-color: var(--fFFColor);
-						}
 					}
 				}
 			}

+ 32 - 49
unpackage/dist/dev/mp-weixin/pagesHome/rank/index.js

@@ -2,11 +2,13 @@
 const common_vendor = require("../../common/vendor.js");
 if (!Array) {
   const _easycom_u_subsection2 = common_vendor.resolveComponent("u-subsection");
-  _easycom_u_subsection2();
+  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
+  (_easycom_u_subsection2 + _easycom_u_icon2)();
 }
 const _easycom_u_subsection = () => "../../node-modules/uview-plus/components/u-subsection/u-subsection.js";
+const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
 if (!Math) {
-  _easycom_u_subsection();
+  (_easycom_u_subsection + _easycom_u_icon)();
 }
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "index",
@@ -22,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/1.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "夏朗",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -31,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/2.jpg" }],
-        name: "捷豹XEL 2020款 2.0T 200PS S进取优雅版",
+        brand: "捷豹",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -40,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/3.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "大众",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -49,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/4.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "大众",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -58,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/5.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "大众",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -67,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/6.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "大众",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -76,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/7.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "奔驰",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -85,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/8.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "丰田",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -94,7 +96,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/9.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "大众",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -103,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       {
         id: "1",
         file: [{ url: "https://cdn.uviewui.com/uview/album/10.jpg" }],
-        name: "夏朗 2013款 1.8TSI 标配型 欧IV",
+        brand: "本田",
         year: "2014年 ",
         city: "丹东",
         kilometer: "8万公里",
@@ -133,20 +135,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         url: `/pagesHome/car/index?id=${item.id || item._id}`
       });
     };
-    const toChat = (item) => {
-      common_vendor.index.makePhoneCall({
-        phoneNumber: item.shop || "110",
-        success: function() {
-          console.log("拨打电话成功");
-        },
-        fail: function() {
-          common_vendor.index.showToast({
-            title: "拨打电话失败",
-            icon: "error"
-          });
-        }
-      });
-    };
     const toPage = () => {
       if (total.value > list.value.length) {
         common_vendor.index.showLoading({
@@ -170,32 +158,27 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           current: curNow.value
         }),
         c: common_vendor.f(list.value, (item, index, i0) => {
-          return common_vendor.e({
-            a: item.file && item.file.length > 0 ? item.file[0].url : "",
-            b: common_vendor.t(item.name || "暂无"),
-            c: item.year
-          }, item.year ? {
-            d: common_vendor.t(item.year || "暂无")
-          } : {}, {
-            e: item.kilometer
-          }, item.kilometer ? {
-            f: common_vendor.t(item.kilometer || "暂无")
-          } : {}, {
-            g: item.city
-          }, item.city ? {
-            h: common_vendor.t(item.city || "暂无")
-          } : {}, {
-            i: common_vendor.t(item.money || "0"),
-            j: common_vendor.o(($event) => toChat(item), index),
-            k: index,
-            l: common_vendor.o(($event) => toView(item), index)
-          });
+          return {
+            a: common_vendor.t(index + 1),
+            b: common_vendor.n(`rank${index + 1}`),
+            c: item.file && item.file.length > 0 ? item.file[0].url : "",
+            d: common_vendor.t(item.brand || "暂无"),
+            e: common_vendor.t(item.money || "0"),
+            f: "581af8d0-1-" + i0,
+            g: index,
+            h: common_vendor.o(($event) => toView(item), index)
+          };
+        }),
+        d: common_vendor.p({
+          color: "#000",
+          name: "heart",
+          size: "20"
         }),
-        d: is_bottom.value
+        e: is_bottom.value
       }, is_bottom.value ? {
-        e: common_vendor.t(config.value.bottom_title || "没有更多了!")
+        f: common_vendor.t(config.value.bottom_title || "没有更多了!")
       } : {}, {
-        f: common_vendor.o(toPage)
+        g: common_vendor.o(toPage)
       });
     };
   }

+ 2 - 1
unpackage/dist/dev/mp-weixin/pagesHome/rank/index.json

@@ -6,6 +6,7 @@
   "backgroundColorTop": "#F4F5F6",
   "backgroundColorBottom": "#F4F5F6",
   "usingComponents": {
-    "u-subsection": "../../node-modules/uview-plus/components/u-subsection/u-subsection"
+    "u-subsection": "../../node-modules/uview-plus/components/u-subsection/u-subsection",
+    "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon"
   }
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/rank/index.wxml


+ 24 - 6
unpackage/dist/dev/mp-weixin/pagesHome/rank/index.wxss

@@ -21,11 +21,32 @@
   position: relative;
   display: flex;
   margin: 1vw 0 0 0;
-  padding: 1vw;
+  padding: 2vw 2vw 0 2vw;
+}
+.content .bottom .list .rank.data-v-581af8d0 {
+  position: absolute;
+  top: -2px;
+  left: 2px;
+  padding: 2px 4px;
+  font-size: var(--font12Size);
+  border-top-left-radius: 8px;
+  /* 左上角 */
+  border-bottom-right-radius: 8px;
+  /* 右下角 */
+  background-color: var(--f99Color);
+}
+.content .bottom .list .rank1.data-v-581af8d0 {
+  background-color: #817AE3;
+}
+.content .bottom .list .rank2.data-v-581af8d0 {
+  background-color: #FF6A88;
+}
+.content .bottom .list .rank3.data-v-581af8d0 {
+  background-color: #FBAB7E;
 }
 .content .bottom .list .left .image.data-v-581af8d0 {
-  width: 130px;
-  height: 100px;
+  width: 100px;
+  height: 60px;
   border-radius: 2px;
 }
 .content .bottom .list .right.data-v-581af8d0 {
@@ -54,9 +75,6 @@
 .content .bottom .list .right .right_1 .money text.data-v-581af8d0:first-child {
   font-size: var(--font18Size);
 }
-.content .bottom .list .right .right_1 .button.data-v-581af8d0 {
-  background-color: var(--fFFColor);
-}
 .scroll-view.data-v-581af8d0 {
   position: absolute;
   top: 0;