liujd %!s(int64=6) %!d(string=hai) anos
pai
achega
997b7ace04

+ 19 - 13
mobile-code/src/pages/goods/detail.vue

@@ -36,7 +36,7 @@
 		<div class="module-wrap shop-detail">
 			<div class="module-tit app-size-30">商品详情</div>
 			<div class="module-det">
-				<img :src="imgNormal" alt mode="widthFix" />
+				<!-- <app-img :src="imgNormal" alt mode="widthFix" /> -->
 				<div class="module-det-text" v-html="data.content"></div>
 			</div>
 		</div>
@@ -56,6 +56,7 @@
 </template>
 
 <script>
+import AppImg from '@/components/app-img'
 import AppSwiper from '@/components/app-swiper'
 import AppTag from '@/components/module/app-tag.vue'
 import AppTrademark from '@/components/module/app-trademark'
@@ -69,7 +70,8 @@ export default {
 		AppTag,
 		AppTrademark,
 		BuyFoot,
-		SelPopup
+		SelPopup,
+		AppImg
 	},
 	data() {
 		return {
@@ -83,13 +85,13 @@ export default {
 		this.init()
 	},
 	computed: {
-		imgNormal() {
-			if (!this.$util.isEmpty(this.data)) {
-				return this.data.imgList[0].normal
-			} else {
-				return ''
-			}
-		}
+		// imgNormal() {
+		// 	if (!this.$util.isEmpty(this.data)) {
+		// 		return this.data.imgList[0]
+		// 	} else {
+		// 		return ''
+		// 	}
+		// }
 	},
 	methods: {
 		init() {
@@ -97,11 +99,15 @@ export default {
 		},
 		_getDetail() {
 			getDetail({ id: this.option.id }).then(res => {
+				if (this.$util.isEmpty(res.data)) return false
 				this.data = res.data
-				this.imgList = this.data.imgList.filter(e => {
-					e.img = e.middle
-					return e
-				})
+				let newArr = []
+				for (let i in res.data.imgList) {
+					newArr.push({
+						img: res.data.imgList[i]
+					})
+				}
+				this.imgList = newArr
 			})
 		},
 		// 更换数量

+ 8 - 3
mobile-code/src/pages/home/components/goods-list-big.vue

@@ -3,20 +3,21 @@
 		<div class="title-tag">
 			<div class="title-text">{{ info.categoryName }}</div>
 			<div class="title-img">
+				<!-- <img :src="`${constant.imgUrl}/retail/home/goods-small-tit.png`" alt /> -->
 				<img :src="`${constant.imgUrl}/retail/home/goods-big-tit.png`" alt />
 			</div>
 		</div>
 		<div class="goods-wrap">
-			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index">
+			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 				<div class="goods-img">
-					<img :src="item.img" alt="商品图片" mode="aspectFit" />
+					<app-img :src="item.smallImgList[0]" alt="商品图片" mode="aspectFit" />
 				</div>
 				<div class="goods-det">
 					<div class="goods-left">
 						<div class="goods-name">{{ item.goodsName }}</div>
 						<div class="app-price">¥{{ item.price }}</div>
 					</div>
-					<div class="button-com red buy-com-btn" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">购买</div>
+					<div class="button-com red buy-com-btn">购买</div>
 				</div>
 			</div>
 		</div>
@@ -24,8 +25,12 @@
 </template>
 
 <script>
+import AppImg from '@/components/app-img'
 export default {
 	name: 'goods-list-big',
+	components: {
+		AppImg
+	},
 	props: {
 		info: {
 			type: Object,

+ 1 - 1
mobile-code/src/pages/home/components/goods-list-middle.vue

@@ -7,7 +7,7 @@
 			</div>
 		</div>
 		<div class="goods-wrap">
-			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index">
+			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 				<div class="goods-img">
 					<img :src="item.img" alt="商品图片" mode="aspectFit" />
 				</div>

+ 26 - 8
mobile-code/src/pages/home/components/goods-list-small.vue

@@ -3,20 +3,20 @@
 		<div class="title-tag">
 			<div class="title-text">{{ info.categoryName }}</div>
 			<div class="title-img">
-				<img :src="`${constant.imgUrl}/retail/home/goods-small-tit.png`" alt />
+				<img :src="`${constant.imgUrl}/retail/home/goods-big-tit.png`" alt />
 			</div>
 		</div>
 		<div class="goods-wrap">
-			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index">
+			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 				<div class="goods-img">
-					<img :src="item.img" alt="商品图片" mode="aspectFit" />
+					<app-img :src="item.smallImgList[0]" alt="商品图片" mode="aspectFit" />
 				</div>
 				<div class="goods-det">
 					<div class="goods-left">
 						<div class="goods-name">{{ item.goodsName }}</div>
 						<div class="app-price">¥{{ item.price }}</div>
 					</div>
-					<div class="button-com red buy-com-btn" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">购买</div>
+					<div class="button-com red buy-com-btn">购买</div>
 				</div>
 			</div>
 		</div>
@@ -24,8 +24,12 @@
 </template>
 
 <script>
+import AppImg from '@/components/app-img'
 export default {
 	name: 'goods-list-big',
+	components: {
+		AppImg
+	},
 	props: {
 		info: {
 			type: Object,
@@ -37,16 +41,30 @@ export default {
 
 <style lang="scss" scoped>
 	.goods-list-big-module {
+		// .title-tag {
+		// 	.title-text {
+        //         font-size: 38px;
+        //         text-align: center;
+        //     }
+        //     .title-img {
+        //         width: 296px;
+        //         margin: 10px auto 48px;
+        //     }
+		// }
 		.title-tag {
+            position: relative;
 			.title-text {
-                font-size: 38px;
+                position: absolute;
+                left: 0;
+                right: 0;
+                font-size: 34px;
                 text-align: center;
             }
             .title-img {
-                width: 296px;
-                margin: 10px auto 48px;
+                width: 94%;
+                margin: 0 auto 30px;
             }
-		}
+        }
 		.goods-wrap {
 			@include disFlex(flex-start, space-between);
 			flex-wrap: wrap;

+ 1 - 2
mobile-code/src/pages/home/index.vue

@@ -1,7 +1,6 @@
 <template>
 	<div class="app-main app-content">
-		<!-- <button @click="toPay">去支付页</button>
-		<button @click="$util.pageTo('/pages/user/register')">注册</button>
+		<!-- <button @click="$util.pageTo('/pages/user/register')">注册</button>
 		<button @click="$util.pageTo('/pages/chat/index')">聊天</button>-->
 		<!-- <app-footer /> -->
 		<app-swiper v-if="!$util.isEmpty(ad)" :list="ad" @detail="adDetailFn" />

+ 1 - 0
mobile-code/src/pages/home/shop.vue

@@ -121,6 +121,7 @@ export default {
 	.list-content {
 		background-color: #fff;
 		.tui-list {
+			width: calc(100% - 20px);
 			@include disFlex(center, space-between);
 			padding-left: 0 !important;
 			margin-left: 20px;