From 70f5b82bc3fceafac2faf470280876b0eca6fac8 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期四, 13 七月 2023 09:40:23 +0800
Subject: [PATCH] no message

---
 uniapp/components/indexPage.vue |   62 ++++++++++++++++++++++++++++--
 1 files changed, 57 insertions(+), 5 deletions(-)

diff --git a/uniapp/components/indexPage.vue b/uniapp/components/indexPage.vue
index 02c7e68..bc0f62c 100644
--- a/uniapp/components/indexPage.vue
+++ b/uniapp/components/indexPage.vue
@@ -392,6 +392,7 @@
 						v-if="bottomGoodsList.length>0">
 						<block v-for="(items,index) in bottomGoodsList" :key="index">
 							<view class="goods-items" @click="goDetails(items)">
+								 <!-- <colGoodsImg v-if="index==0&&itembannerList&&itembannerList.length>0" :popBannerSList="itembannerList"></colGoodsImg> -->
 								<colGoods :items="items"></colGoods>
 							</view>
 						</block>
@@ -411,6 +412,7 @@
 	import slideTop from './slideTop.vue'
 	import colGoods from './colGoods.vue'
 	import empowerModel from './empowerModel.vue'
+		import colGoodsImg from '@/components/colGoodsImg.vue'
 	export default {
 		props: {
 			recomendType: {
@@ -432,10 +434,12 @@
 		components: {
 			slideTop,
 			colGoods,
-			empowerModel
+			empowerModel,
+			colGoodsImg
 		},
 		data() {
 			return {
+				popBannerSList:[],
 				fallingList: [],
 				pageHeight: '',
 				headerColor: '',
@@ -491,9 +495,14 @@
 				swpidx: 0,
 				canrefresh: true,
 				fastenter:[],
-				popBannerSList:[],
+				itembannerList:[],
 				enterTop:[],
-				enterDown:[]
+				enterDown:[],
+				tbbanner:[],
+				jdbanner:[],
+				dybanner:[],
+				pddbanner:[],
+				wphbanner:[],
 			}
 		},
 		watch: {
@@ -529,6 +538,7 @@
 			this.getbottomGoodsList(this.bottomType);
 			this.getGOODSfalling();
 			this.getRQList();
+			//this.getPageImg();
 		},
 		mounted() {
 			this.$emit('scrolltoTop')
@@ -595,7 +605,6 @@
 			},
 			onRestore() {
 				this.swpidx = 0
-				console.log('涓嬫媺琚粓姝�');
 			},
 			pagescroll(e) {
 				this.$emit('scrollNum', e.detail.scrollTop)
@@ -688,7 +697,49 @@
 					that.dyList = e.data.dygoods;
 				}).catch(function(err) {})
 			},
-
+			getPageImg()
+			{
+			 	var that=this;
+				this.$u.api.getBanner({
+					type: '11,16,17,18,19,20'
+				}).then(e => {
+					if (e.code == 1) return that.$alert(e.msg);
+					var res = e.data.info;
+					that.tbbanner=res.tmImg;
+					that.jdbanner=res.jdImg;
+					that.dybanner=res.dyImg;
+					that.pddbanner=res.pddImg;
+					that.wphbanner=res.wphImg;
+					that.changeBanner(that.bottomCurrent);
+				}).catch(function(err) {
+					console.log(err)
+				})
+			},
+			changeBanner(type)
+			{
+				switch(type)
+				{
+					case 2://浜笢
+					  this.itembannerList=this.jdbanner;
+					  break;
+					case 6://鎶栭煶
+					  this.itembannerList=this.dybanner;
+					  break;
+					case 3://鎷煎澶�
+					   this.itembannerList=this.pddbanner;
+					   break;
+					case 4://鍞搧浼�
+						this.itembannerList=this.wphbanner;
+						break;
+					default:
+					this.itembannerList=[];
+						break;
+				}
+				if(this.itembannerList&&this.itembannerList>0)
+				{
+					that.bottomGoodsList.unshift(this.itembannerList[0]);
+				}
+			},
 			getbottomGoodsList(type) {
 				var that = this;
 				this.$u.api.getGoodThing({
@@ -744,6 +795,7 @@
 				if (this.bottomCurrent != idx) {
 					this.currentPage = 1;
 					this.bottomType = info.type;
+					this.changeBanner(info.type);
 					this.getbottomGoodsList(this.bottomType);
 					this.$nextTick(() => {
 						this.$emit('scrolltoview')

--
Gitblit v1.9.3