guhongwei 2 سال پیش
والد
کامیت
9739a66f80
3فایلهای تغییر یافته به همراه195 افزوده شده و 7 حذف شده
  1. 11 4
      common/css/font-icon.css
  2. 183 2
      pages/store/index.vue
  3. 1 1
      pagesHome/market/type.vue

+ 11 - 4
common/css/font-icon.css

@@ -2,9 +2,9 @@
   font-family: "iconfont"; /* Project id 3674157 */
   /* Color fonts */
   src: 
-       url('https://at.alicdn.com/t/c/font_3674157_sk2e3u9v5ba.woff2?t=1664433802254') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_3674157_sk2e3u9v5ba.woff?t=1664433802254') format('woff'),
-       url('https://at.alicdn.com/t/c/font_3674157_sk2e3u9v5ba.ttf?t=1664433802254') format('truetype');
+       url('https://at.alicdn.com/t/c/font_3674157_7xeq9ctlqo6.woff2?t=1664670177625') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_3674157_7xeq9ctlqo6.woff?t=1664670177625') format('woff'),
+       url('https://at.alicdn.com/t/c/font_3674157_7xeq9ctlqo6.ttf?t=1664670177625') format('truetype');
 }
 
 .iconfont {
@@ -19,6 +19,14 @@
   content: "\e684";
 }
 
+.icon-yduishoucangshixin-copy:before {
+  content: "\e8bf";
+}
+
+.icon-yduishoucangkongxin-copy:before {
+  content: "\e8c0";
+}
+
 .icon-yduishoucangkongxin:before {
   content: "\e6ac";
 }
@@ -134,4 +142,3 @@
 .icon-daipinglun:before {
   content: "\e602";
 }
-

+ 183 - 2
pages/store/index.vue

@@ -1,6 +1,41 @@
 <template>
 	<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
-		微店
+		<view class="main">
+			<view class="one">
+				<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">
+							<view class="list_1">
+								<view class="l">
+									<image class="image" :src="item.url" mode=""></image>
+								</view>
+								<view class="c">
+									<view class="name">
+										{{item.name}}
+									</view>
+									<view class="other">
+										<text>宝贝数<text>{{item.market_num}}</text></text>
+										<text>关注数<text>{{item.follow_num}}</text></text>
+									</view>
+								</view>
+								<view class="r" @tap="toFolllow(item)">
+									<text class="iconfont icon-yduishoucangshixin-copy" v-if="item.is_follow==true"></text>
+									<text class="iconfont icon-yduishoucangkongxin-copy" v-else></text>
+								</view>
+							</view>
+							<view class="list_2">
+								<view class="market" v-for="(tag,indexs) in item.market" :key="indexs">
+									<image class="image" :src="tag.url" mode=""></image>
+									<view class="money">
+										¥{{tag.money}}
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
 	</mobile-frame>
 </template>
 
@@ -11,19 +46,165 @@
 				frameStyle: {
 					useBar: true
 				},
+				list: [ //
+					{
+						url: require('@/static/test.png'),
+						name: '官方自营店',
+						market_num: 12,
+						follow_num: 12,
+						is_follow: true,
+						market: [ //
+							{
+								url: require('@/static/test.png'),
+								money: 10
+							},
+							{
+								url: require('@/static/test.png'),
+								money: 10
+							},
+							{
+								url: require('@/static/test.png'),
+								money: 10
+							}
+
+						]
+					},
+					{
+						url: require('@/static/test.png'),
+						name: '官方自营店',
+						market_num: 12,
+						follow_num: 12,
+						is_follow: false,
+						market: [ //
+							{
+								url: require('@/static/test.png'),
+								money: 10
+							}
+
+						]
+					}
+				]
 			};
 		},
 		onShow: function() {},
 		methods: {
+			// 分页
+			toPage() {
+
+			},
+			// 关注
+			toFolllow(e) {
+				console.log(e);
+			},
 			toPath(e) {
 				if (e && e.route) uni.redirectTo({
 					url: `/${e.route}`
 				})
-			}
+			},
 		}
 	}
 </script>
 
 <style lang="scss">
+	.main {
+		.one {
+			.list {
+				margin: 2vw 2vw 0 2vw;
+				padding: 2vw;
+				border-radius: 5px;
+				background-color: #f5f5f5;
+
+				.list_1 {
+					display: flex;
+					flex-direction: row;
+					margin: 0 0 1vw 0;
+
+					.l {
+						width: 20vw;
+
+						.image {
+							width: 100%;
+							height: 20vw;
+							border-radius: 5px;
+						}
+					}
+
+					.c {
+						padding: 0 0 0 2vw;
+						width: 60vw;
+
+						.name {
+							font-size: 16px;
+							font-weight: bold;
+							margin: 0 0 1vw 0;
+						}
+
+						.other {
+							font-size: 14px;
+
+							text {
+								padding: 0 2vw 0 0;
+							}
+						}
+					}
+
+					.r {
+						width: 10vw;
+						text-align: right;
+
+						text {
+							font-size: 30px;
+						}
+					}
 
+				}
+
+				.list_2 {
+					display: flex;
+					flex-direction: row;
+					flex-wrap: wrap;
+
+					.market {
+						position: relative;
+						margin: 0 2vw 2vw 0;
+						width: 29vw;
+
+						.image {
+							width: 100%;
+							height: 20vw;
+						}
+
+						.money {
+							position: absolute;
+							bottom: 0;
+							font-size: 10px;
+							width: 100%;
+							background-color: #0000005f;
+							color: #fff;
+							padding: 0.2vw 0;
+							text-align: center;
+							font-size: 14px;
+						}
+					}
+
+					.market:nth-child(3n) {
+						margin: 0 0 2vw 0;
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
 </style>

+ 1 - 1
pagesHome/market/type.vue

@@ -17,7 +17,7 @@
 				<view class="two_2">
 					<scroll-view scroll-y="true" class="scroll-view">
 						<view class="list-scroll-view">
-							<view class="list" v-for="(item,index) in list" :key="index">
+							<view class="list" v-for="(item,index) in list" :key="index" @tap="toCommon('pagesHome/market/search')">
 								<view class="title">
 									{{item.label}}
 								</view>