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 |  132 ++++++++++++++++++++++++++++++++++++-------
 1 files changed, 109 insertions(+), 23 deletions(-)

diff --git a/uniapp/components/indexPage.vue b/uniapp/components/indexPage.vue
index a65c8d5..bc0f62c 100644
--- a/uniapp/components/indexPage.vue
+++ b/uniapp/components/indexPage.vue
@@ -58,11 +58,17 @@
 								</swiper-item>
 							</swiper>
 						</view> -->
+						<!--蹇嵎鍏ュ彛鍥炬爣-->
+						<view class="c-loading-img rowCenCen">
+							<view class="imgbox defIcon" v-for="(eitem,index) in fastenter" :key="index" @click="goUrl(eitem)">
+								<image :src="eitem.image"></image>
+							</view>
+						</view>
 						<!--宸﹁疆鎾紝鍙充袱琛�-->
 						<view class="centerflex f_contant">
 							<view class="f_centerSwiper-container swiper-box swiper-item f_left">
-								<swiper class="swiper-box" :autoplay="true" :interval="5000" :duration="300" circular>
-									<swiper-item v-for="(items,index) in singleLineList" :key='index'>
+								<swiper class="swiper-box" :autoplay="true" :interval="3000" :duration="300" :indicator-active-color="'#fff'" :indicator-dots="true" circular>
+									<swiper-item v-for="(items,index) in popBannerSList" :key='index'>
 										<view class="swiper-item defIcon" @click="goUrl(items)">
 											<image :src="items.image" mode="aspectFit"></image>
 										</view>
@@ -70,11 +76,11 @@
 								</swiper>
 							</view>
 							<view class="f_right">
-								<view class="f_imgcon">
-									<image src="https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E6%9C%80%E9%AB%9823888%E5%85%83-1054%20330.jpg"></image>
+								<view class="f_imgcon" v-if='enterTop.length>0' >
+									<image :src="enterTop[0].image"  @click="goUrl(enterTop[0])"></image>
 								</view>
-								<view class="f_imgcon">
-									<image src="https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E6%9C%80%E9%AB%9823888%E5%85%83-1054%20330.jpg"></image>
+								<view class="f_imgcon" v-if='enterDown.length>0'>
+									<image :src="enterDown[0].image"  @click="goUrl(enterDown[0])"></image>
 								</view>
 							</view>
 						</view>
@@ -103,7 +109,7 @@
 						</swiper>
 					</view>
 					<!--鍏ㄧ綉鐑攢-->
-					<view class="van-row">
+					<!-- <view class="van-row">
 						<view class="van-col van-col--12" style="padding-right: 10rpx;">
 							<view class="home-row" @click="gorxb()">
 								<view class="title"><text class="name">鍏ㄧ綉鐑攢姒�</text>
@@ -151,7 +157,7 @@
 								</view>
 							</view>
 						</view>
-					</view>
+					</view> -->
 					<!-- 澶у閮藉湪涔� -->
 					<!-- <view class="everysBuying-container colCen" v-if="zdmList.length>0">
 						<view class="box-bar-content rowCen">
@@ -386,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>
@@ -405,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: {
@@ -426,10 +434,12 @@
 		components: {
 			slideTop,
 			colGoods,
-			empowerModel
+			empowerModel,
+			colGoodsImg
 		},
 		data() {
 			return {
+				popBannerSList:[],
 				fallingList: [],
 				pageHeight: '',
 				headerColor: '',
@@ -440,16 +450,12 @@
 				navbarShowList: [],
 				navbarList: [],
 				sliderH: '',
-
 				scrollTop: 0,
 				scrollindex: 0,
-
-
 				zdmList: [],
 				phbList: [],
 				dyList: [],
 				rqList: [],
-
 				typedataList: [
 					{
 						mainTitle: '浜笢',
@@ -488,9 +494,19 @@
 				triggeredstate: true,
 				swpidx: 0,
 				canrefresh: true,
+				fastenter:[],
+				itembannerList:[],
+				enterTop:[],
+				enterDown:[],
+				tbbanner:[],
+				jdbanner:[],
+				dybanner:[],
+				pddbanner:[],
+				wphbanner:[],
 			}
 		},
 		watch: {
+			
 			recomendType(nval, oval){
 				if(nval != oval)this.changeRecommend()
 			},
@@ -522,6 +538,7 @@
 			this.getbottomGoodsList(this.bottomType);
 			this.getGOODSfalling();
 			this.getRQList();
+			//this.getPageImg();
 		},
 		mounted() {
 			this.$emit('scrolltoTop')
@@ -588,7 +605,6 @@
 			},
 			onRestore() {
 				this.swpidx = 0
-				console.log('涓嬫媺琚粓姝�');
 			},
 			pagescroll(e) {
 				this.$emit('scrollNum', e.detail.scrollTop)
@@ -612,21 +628,28 @@
 			onAbort() {
 				console.log('refushstop');
 			},
-
+			
 			getBannerInfo() {
 				// banner鏁版嵁
 				var that = this;
 				this.$u.api.getBanner({
-					type: '1,3,4,5'
+					type: '1,3,4,5,11,12,13,14'
 				}).then(e => {
-					console.log(e)
 					if (e.code == 1) return that.$alert(e.msg);
 					var res = e.data.info;
-					this.topBannerList = res.topBannerList;
-					this.headerColor = this.topBannerList[0].colour;
+					if(res.topBannerList&&res.topBannerList.length>0)
+					{
+						this.topBannerList = res.topBannerList;
+						this.headerColor = this.topBannerList[0].colour;
+					}
+					
 					this.singleLineList = res.singleLineList;
 					this.doubleLineList = res.doubleLineList;
 					this.bottomBannerList = res.bottomBannerList;
+					this.fastenter=res.indexbanner;
+					this.popBannerSList=res.popBannerSList;
+					this.enterTop=res.enterTop;
+					this.enterDown=res.enterDown;
 					setTimeout(() => {
 						this.triggeredstate = false;
 						this._freshing = false;
@@ -642,7 +665,6 @@
 				})
 			},
 			
-
 			godydetails(itm) {
 				const info = {}
 				info.nowInfo = itm
@@ -675,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({
@@ -686,7 +750,6 @@
 					pageSize: 10,
 					type: type
 				}).then(e => {
-				    console.log(e)
 					if (e.code != 0) return that.$alert(e.msg)
 					var res = e.data.list;
 					if (res.length < 10) {
@@ -732,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')
@@ -758,7 +822,12 @@
 			goUrl(info) {
 				utils.goUrl(info, this)
 			},
-
+			goFUrl(info)
+			{
+				uni.navigateTo({
+					url: info.url
+				});
+			},
 			gojgqUrl(info) {
 				if (info.urlType == '0') {
 					uni.navigateTo({
@@ -871,6 +940,23 @@
 				}
 			}
 	}
+	
+	.c-loading-img {
+		     width: 96%;
+		    height: 132rpx;
+		    background: #fff;
+		    margin: auto;
+			margin-top: 20rpx;
+			border-radius: 12rpx;
+			justify-content:space-between;
+			padding:5rpx;
+			
+		.imgbox {
+			width: 158rpx;
+			height: 105rpx;
+			// max-height: 72rpx;
+		}
+	}
 	.juan {
 		height: 28rpx;
 		background: linear-gradient(90deg, #ff8873 0, #ff4f4f 100%);

--
Gitblit v1.9.3