Jelajahi Sumber

中秋主题

lhl 4 tahun lalu
induk
melakukan
871a107039
3 mengubah file dengan 1088 tambahan dan 96 penghapusan
  1. 10 1
      pages.json
  2. 24 95
      pages/index/index.vue
  3. 1054 0
      pages/index/index_cate.vue

+ 10 - 1
pages.json

@@ -43,7 +43,16 @@
 				"navigationBarTitleText": "商品分类"
 			}
 		},
-		
+		{
+			"path": "pages/index/index_cate",
+			"style": {
+				"navigationBarTitleText": "商品分类",
+				"navigationStyle": "custom",
+				"app-plus": {
+					"scrollIndicator": false //禁用原生导航栏
+				}
+			}
+		},
 		{
 			"path": "pages/news_list/index",
 			"style": {

+ 24 - 95
pages/index/index.vue

@@ -14,7 +14,7 @@
 					<text class="iconnum bg-color-red" v-if="userInfo.total_unread">{{userInfo.total_unread}}</text>
 				</navigator>
 			</view>
-			<tabNav class="tabNav" :class="{'fixed':isFixed}" :tabTitle="navTop" @changeTab='changeTab'></tabNav>
+			
 		</view>
 		<!-- #endif -->
 		<!-- #ifdef MP -->
@@ -29,7 +29,7 @@
 						搜索商品</navigator>
 				</view>
 			</view>
-			<tabNav class="tabNav" :tabTitle="navTop" @changeTab='changeTab'></tabNav>
+			<!-- <tabNav class="tabNav" :tabTitle="navTop" @changeTab='changeTab'></tabNav> -->
 		</view>
 		<!-- #endif -->
 		<!-- 首页展示 -->
@@ -37,9 +37,20 @@
 			<!-- #ifdef MP -->
 			<!-- <view class="mp-bg"></view> -->
 			<!-- #endif -->
+			<!-- menu -->
+			<view class='nav acea-row' v-if="menus.length">
+				<block v-for="(item,index) in menus" :key="index">
+					<view class="item" @click="goMenuDetail(item)">
+						<view class='pictrue'>
+							<image :src='item.pic'></image>
+						</view>
+						<view class="menu-txt area-row">{{item.name}}</view>
+					</view>
+				</block>
+			</view>
 			<!-- banner -->
 			<view class="swiper" v-if="imgUrls.length">
-				<swiper indicator-dots="true" :autoplay="true" :circular="circular" :interval="interval" :duration="duration"
+				<swiper :indicator-dots="false" :autoplay="true" :circular="circular" :interval="interval" :duration="duration"
 				 indicator-color="#E4E4E4" indicator-active-color="#E93323" previous-margin="40rpx" next-margin="40rpx" :current="swiperCur"
 				 @change="swiperChange">
 					<block v-for="(item,index) in imgUrls" :key="index">
@@ -51,20 +62,13 @@
 					</block>
 				</swiper>
 			</view>
-			<!-- menu -->
-			<view class='nav acea-row' v-if="menus.length">
-				<block v-for="(item,index) in menus" :key="index">
-					<view class="item" @click="goMenuDetail(item)">
-						<view class='pictrue'>
-							<image :src='item.pic'></image>
-						</view>
-						<view class="menu-txt area-row">{{item.name}}</view>
-					</view>
-				</block>
-			</view>
+			<!-- 导航 -->
+			<tabNav class="tabNav" :class="{'fixed':isFixed}" :tabTitle="navTop" @changeTab='changeTab'></tabNav>
+			<!-- 广告 -->
 			<navigator v-if="ad.home_ad_pic" class="ad" :url="ad.home_ad_url" hover-class="none">
 				<image mode="" :src="ad.home_ad_pic"></image>
 			</navigator>
+			
 			<!--秒杀-->
 			<view class="main" v-if="spikeList.length > 0">
 				<view class="seckill-count">
@@ -282,6 +286,7 @@
 				<!-- #ifdef MP-TOUTIAO -->
 				<view class="hot-img" style="margin-top:20rpx" v-if="power">
 					<navigator :url="item.url" class="item" v-for="(item,index) in hot" :key="index" hover-class="none">
+						<image src="../../static/img/dhbg.png" mode="" class="dhbg"></image>
 						<view class="title area-row">{{item.title}}</view>
 						<view class="msg area-row" :style="'color:'+item.color+';'">{{item.s_title}}</view>
 						<view class="img">
@@ -354,57 +359,6 @@
 				</view>
 			</view>
 		</view>
-		<!-- 分类页 -->
-
-		<view class="productList" v-if="navIndex>0" :style="'margin-top:'+prodeuctTop+'px;'">
-			<view class="sort acea-row" :class="sortList.length ? '' : 'no_pad'" :style="{marginTop:sortMarTop+'px'}">
-				<navigator hover-class='none' :url="'/pages/columnGoods/goods_list/index?id='+item.store_category_id+'&title='+item.cate_name"
-				 class="item" v-for="(item,index) in sortList" :key="index">
-					<view class="pictrue">
-						<image :src="item.pic"></image>
-					</view>
-					<view class="text">{{item.cate_name}}</view>
-				</navigator>
-				<view class="item" @click="bindMore()" v-if="sortList.length">
-					<view class="pictrues acea-row row-center-wrapper">
-						<text class="iconfont icon-gengduo1"></text>
-					</view>
-					<view class="text" style="margin-top: 22rpx;">更多</view>
-				</view>
-			</view>
-			<block v-if="sortProduct.length>0">
-				<view class='list acea-row row-between-wrapper'>
-					<navigator @tap="goDetails(item)" class='item' v-for="(item,index) in sortProduct"
-					 :key="index">
-						<view class='pictrue'>
-							<image :src='item.image'></image>
-						</view>
-						<view class='text'>
-							<view class='name line1'><text v-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red">自营</text>
-							<span v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</span>
-							{{item.store_name}}</view>
-
-							<view class="acea-row row-middle">
-								<view class='money font-color-red'>¥<text class='num'>{{item.price}}</text></view>
-								<text class="coupon font-color-red" v-if="item.issetCoupon">领券</text>
-							</view>
-						</view>
-					</navigator>
-					<view class='loadingicon acea-row row-center-wrapper' v-if='sortProduct.length > 0 || sortProductLoading'>
-						<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
-					</view>
-				</view>
-			</block>
-			<block v-if="sortProduct.length == 0">
-				<view class="noCommodity">
-					<view class='pictrue' style="margin: 0 auto;">
-						<image src='/static/images/noShopper.png'></image>
-					</view>
-					<recommend :hostProduct="hostProduct"></recommend>
-				</view>
-
-			</block>
-		</view>
 		<!-- #ifdef MP -->
 		<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize>
 		<!-- #endif -->
@@ -1017,34 +971,9 @@
 			changeTab(e) {
 				let self = this
 				if (this.navIndex == e.index) return
-				this.navIndex = e.index;
-				if (e.index > 0) {
-					storeCategory({
-						pid: e.pid
-					}).then(res => {
-						this.sortList = res.data.length > 9 ? res.data.splice(0, 9) : res.data;
-						if (this.sortList.length > 0) {
-							this.where.pid = e.pid;
-							this.where.page = 1;
-							this.loadend = false;
-							this.loading = false;
-							this.sortProduct = [];
-							this.get_product_list();
-						}
-					});
-					// #ifdef MP
-					setTimeout(res => {
-
-						let info = uni.createSelectorQuery().select(".mp-header");
-						info.boundingClientRect(function(data) { //data - 各种参数
-							self.sortMarTop = data.height + 10
-						}).exec()
-					}, 0)
-					// #endif
-					// #ifdef H5
-					self.sortMarTop = 10
-					// #endif	
-				}
+				uni.navigateTo({
+					url: '/pages/index/index_cate?e=' + JSON.stringify(e) + '&navIndex=' + e.index
+				})
 			},
 			//分类产品
 			get_product_list: function() {
@@ -2170,10 +2099,10 @@
 				display: flex;
 				align-items: center;
 				justify-content: center;
-				height: 118rpx;
+				height: 170rpx;
 
 				.title {
-					padding: 15rpx 150rpx;
+					padding: 40rpx 120rpx;
 					font-size: 34rpx;
 					// color: $theme-color;
 					color: #bc7b00;

File diff ditekan karena terlalu besar
+ 1054 - 0
pages/index/index_cate.vue


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini