Bläddra i källkod

首页改版,未完成

gcz 1 år sedan
förälder
incheckning
e922468d17
8 ändrade filer med 542 tillägg och 144 borttagningar
  1. 1 1
      center/center.vue
  2. 6 5
      common/config.js
  3. 11 11
      components/tabbar.vue
  4. 256 0
      pages/index/index-v1.vue
  5. 221 126
      pages/index/index.vue
  6. 6 0
      static/css/common.scss
  7. 40 0
      uni.scss
  8. 1 1
      xushuo/xushuo.vue

+ 1 - 1
center/center.vue

@@ -76,7 +76,7 @@
 				</view>
 			</view>
 		</u-overlay> -->
-		<tabbar :tabbarIndexProps="3" />
+		<tabbar :tabbarIndexProps="2" />
 	</view>
 </template>
 

+ 6 - 5
common/config.js

@@ -12,14 +12,15 @@
 // }
 
 //64
-// let baseUrl='https://xusfoodapi.hw.hongweisoft.com/appapi/app';
-// let upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
+let baseUrl='https://xusfoodapi.hw.hongweisoft.com/appapi/app';
+let upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
 // let staticUrl='http://res.hw.hongweisoft.com/xushuo/';
+let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
 
 //正式
-let baseUrl='https://xusapi.gzxsjt.cn/appapi/app';
-let upFileUrl='https://xusapi.gzxsjt.cn/thirdapi/upload/single/minio';
-let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
+// let baseUrl='https://xusapi.gzxsjt.cn/appapi/app';
+// let upFileUrl='https://xusapi.gzxsjt.cn/thirdapi/upload/single/minio';
+// let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
 
 const commonConfig = {
 	wxAppid: '', // 测试wxAppid

+ 11 - 11
components/tabbar.vue

@@ -8,7 +8,7 @@
 			:border="false"
 			inactiveColor="#666"
 			activeColor="#00A447"
-			:customStyle="{'padding-top':'5px'}"
+			:customStyle="{'padding-top':'5px','border-top':'1px solid #eee','z-index':'30'}"
 			:safeAreaInsetBottom="true"
 		>
 			<u-tabbar-item text="商城" >
@@ -23,7 +23,7 @@
 					:src="staticUrl+'/img/tabbar-mall-gray.png'"
 				></image>
 			</u-tabbar-item>
-			<u-tabbar-item text="分类" >
+	<!-- 		<u-tabbar-item text="分类" >
 				<image
 					class="u-page__item__slot-icon"
 					slot="active-icon"
@@ -34,7 +34,7 @@
 					slot="inactive-icon"
 					:src="staticUrl+'/img/tabbar-classify-gray.png'"
 				></image>
-			</u-tabbar-item>
+			</u-tabbar-item> -->
 			<u-tabbar-item text="关于旭烁" >
 				<image
 					class="u-page__item__slot-icon"
@@ -112,15 +112,15 @@ export default {
 			console.log('name====',name);
 			const tabBarRoutes = {
 			0: '/pages/index/index',
-			1: {
-			  url: '/shopping/producTypetList',
-			  query: {
-				navType: 'navigateTo'
-			  }
-			},
-			2: '/xushuo/xushuo',
+			// 1: {
+			//   url: '/shopping/producTypetList',
+			//   query: {
+			// 	navType: 'navigateTo'
+			//   }
+			// },
+			1: '/xushuo/xushuo',
 			// 3: '/shopping/cart',
-			3: '/center/center'
+			2: '/center/center'
 		  };
 		  
 		  const targetRoute = tabBarRoutes[name];

+ 256 - 0
pages/index/index-v1.vue

@@ -0,0 +1,256 @@
+<template>
+	<view class="pages">
+		<view class="" :style="{height: navHeight+'px' }"></view>
+		<view class="page-bg">
+			<img class="img" :src="staticUrl+'/img/index-bg.png'" alt="">
+		</view>
+		<view class="page-wrap">
+			<view class="search-out">
+				<u-search
+					placeholder="搜索商品" 
+					:clearabled="true"
+					:showAction="false"
+					height="80rpx"
+					disabled
+					@search="topSearch"
+					@click="$u.route('/shopping/searchhistory')"
+					bgColor="transparent"
+					v-model="goodsName">
+				</u-search>
+			</view>
+			<u-swiper
+				:list="bannerList"
+				indicator
+				height="130"
+				keyName="sliderImg"
+				indicatorMode="dot"
+				@click="bannerClick()"
+			></u-swiper>
+			<view class="advantage u-flex u-row-around">
+				<view class="u-flex">
+					<u-icon :size="advantageSize" class="icon" :name="staticUrl+'/img/zheng.png'"></u-icon>
+					正品保证
+				</view>
+				<view class="u-flex">
+					<u-icon :size="advantageSize" class="icon" :name="staticUrl+'/img/memberservice.png'"></u-icon>
+					会员服务
+					</view>
+				<view class="u-flex">
+					<u-icon :size="advantageSize" class="icon" :name="staticUrl+'/img/rmb.png'"></u-icon>
+					性价比高
+				</view>
+			</view>
+			
+			<view class="icon-nav u-flex u-row-around">
+			<!-- 	<view class="nav-item" @click="$u.route('/center/mybalance')">
+					<u--image class="image" :src="staticUrl+'/img/index-nav-4.png'" width="101rpx" height="101rpx"></u--image>
+					需要删除
+				</view> -->
+				<view class="nav-item" @click="$u.route('/shopping/productList',{typeId:1,typeName:'特价专区',type:'reLaunch'})">
+					<u--image class="image" :src="staticUrl+'/img/index-nav-1.png'" width="101rpx" height="101rpx"></u--image>
+					特价专区
+				</view>
+				<view class="nav-item" @click="$u.route('/shopping/productList',{typeId:2,typeName:'爆款专区',type:'reLaunch'})">
+					<u--image class="image" :src="staticUrl+'/img/index-nav-2.png'" width="101rpx" height="101rpx"></u--image>
+					爆款专区
+				</view>
+				<view class="nav-item" @click="$u.route('/credits/credits',{type:'reLaunch'})">
+					<u--image class="image" :src="staticUrl+'/img/index-nav-3.png'" width="101rpx" height="101rpx"></u--image>
+					积分商城
+				</view>
+				<view class="nav-item" @click="$u.route('/center/recharge',{type:'reLaunch'})">
+					<u--image class="image" :src="staticUrl+'/img/index-nav-4.png'" width="101rpx" height="101rpx"></u--image>
+					充值中心
+				</view>
+			</view>
+			
+			<view class="index-img">
+				<u-swiper
+					:list="centerImg"
+					:indicator="centerImg.length>1"
+					keyName="sliderImg"
+					indicatorMode="dot"
+					height="161rpx"
+					@click="centerImgClick()"
+				></u-swiper>
+			</view>
+			<view class="hot-product">
+				<view class="single-til u-flex u-row-between">
+					<text class="text">热销产品</text>
+					<!-- <view class="u-flex" @click="$u.route('/shopping/productList',{typeId:1,typeName:'热销产品',type:'redirectTo'})">
+						<text class="more-text">更多</text>
+						<u-icon name="arrow-right" color="#676767" size="24rpx"></u-icon>
+					</view> -->
+				</view>
+				<view class="product u-flex" @click="$u.route('/shopping/productdetails',{id:item.id})" v-for="item in hotGoods" :key="item.id">
+					<u--image :showLoading="true" :src="item.mainImg" width="180rpx" height="180rpx"></u--image>
+					<view class="text">
+						<view class="name ellipsis-2">{{item.goodsName}}</view>
+						<view class="u-flex u-row-between">
+							<view class="left">
+								<view class="up">
+									<view class="" v-if="vuex_member_info.priceType>1">
+										<text class="price">¥ <text class="price-num">{{item.vipPrice}}</text></text>
+										<text class="vip-icon">VIP</text>
+									</view>
+									<view class="" v-else>
+										<text class="price">¥ <text class="price-num">{{item.salePrice}}</text></text>
+									</view>
+								</view>
+								<view class="down">
+									<!-- <text class="discount">8.8折</text> -->
+									<text v-if="vuex_member_info.priceType>1" class="original-price gray line-through">¥ {{item.salePrice}}</text>
+									<!-- <text class="sales gray">销量 {{item.salePrice}}</text> -->
+								</view>
+							</view>
+							<u--image :showLoading="false" @click.native.stop="addCart(item.id)" :src="staticUrl+'/img/add.png'" width="48rpx" height="48rpx"></u--image>
+						</view>
+					</view>
+				</view>
+			</view>
+			<tabbar :tabbarIndexProps='0' />
+			<cartfixed ref="cartfixed" @getCartList="getCartList" />
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import { systemInfo } from "@/mixin.js";
+	import tabbar from "../../components/tabbar.vue";
+	import cartfixed from "../../components/cartfixed.vue"
+	export default {
+		components:{
+			tabbar,
+			cartfixed
+		},
+		mixins:[systemInfo],
+		data() {
+			return {
+				goodsName:'',
+				staticUrl:this.$commonConfig.staticUrl,
+				advantageSize:14,
+				bannerList: [],
+				centerImg:[],
+				hotGoods:[]
+			}
+		},
+		onLoad(query) {
+			const scene = decodeURIComponent(query.scene);
+			scene&&uni.setStorage({
+				key:'scene',
+				data:scene
+			});
+			// let userInfo = uni.getStorageSync('userInfo');
+			// console.log('userInfo',userInfo);
+			let that = this;
+			this.swiperList();
+			setTimeout(()=>{
+				that.getCenterImg();
+			},200);
+			this.getSystemInfo();
+			// console.log('statusBarHeight',this.statusBarHeight);
+			// console.log('navigationBarHeight',this.navigationBarHeight);
+			// console.log('windowHeight',this.windowHeight);
+			// console.log('navHeight',this.navHeight);
+		},
+		onShow() {
+			this.$refs.cartfixed.getCartList();
+			this.getHotGoods();
+		},
+		methods: {
+			swiperList(){
+				this.$u.api.swiperList({postion:1}).then(res=>{
+					this.bannerList = res.data.rows;
+					// console.log('res',res.data.rows);
+				}).catch(err=>{
+					console.log('swiperList',err.data);
+				})
+			},
+			getCenterImg(){
+				this.$u.api.swiperList({postion:2}).then(res=>{
+					this.centerImg = res.data.rows;
+					// console.log('res',res.data.rows);
+				}).catch(err=>{
+					console.log('swiperList',err.data);
+				})
+			},
+			bannerClick(e){
+				// console.log('e',e);
+				// console.log('bannerClick',this.bannerList[e]);
+				let item = this.bannerList[e];
+				uni.$u.route('/xushuo/dynamicdetails', {
+					type: 'swiperDetail',
+					id: item.id
+				});
+			},
+			centerImgClick(e){
+				let item = this.centerImg[e];
+				uni.$u.route('/xushuo/dynamicdetails', {
+					type: 'swiperDetail',
+					id: item.id
+				});
+			},
+			getHotGoods(){
+				this.$u.api.topGoodList({pageNum:1,pageSize:20}).then(res=>{
+					this.hotGoods = res.data.rows;
+					console.log('res',res);
+				}).catch(err=>{
+					console.log('getHotGoods',err.data);
+				})
+			},
+			addCart(id){
+				// console.log('addCart',id);
+				this.$u.api.addCart({goodsId:id}).then(res=>{
+					this.$refs.cartfixed.getCartList('isAdd');
+					console.log('res',res);
+					}).catch(err=>{
+					console.log('addCart',err.data);
+				})
+			},
+			topSearch(){
+				uni.$u.route('/shopping/productsearch', {
+					goodsName: this.goodsName
+				});
+				// console.log('topSearch',this.goodsName);
+			}
+		}
+	}
+</script>
+<style>
+page{
+	background-color: #F9F9F9;
+	padding-top: 0;
+}
+</style>
+<style lang="scss" scoped>
+.page-bg{
+	.img{
+		height: 100vh;
+	}
+}
+.search-out{
+	background-color: rgba(0,0,0,0.04);
+	border-radius: 100rpx;
+	margin-bottom: 20rpx;
+}
+.advantage{
+	margin-top: 20rpx;
+	margin-bottom: 50rpx;
+	font-size: 22rpx;
+	color: #ccc;
+	/deep/ .u-icon{
+		margin-right: 10rpx;
+	}
+}
+.index-img{
+	margin-bottom: 56rpx;
+}
+.hot-product{
+	.product{
+		padding: 30rpx;
+		background-color: #fff;
+		border: 0;
+	}
+}
+</style>

+ 221 - 126
pages/index/index.vue

@@ -1,66 +1,41 @@
 <template>
 	<view class="pages">
 		<view class="" :style="{height: navHeight+'px' }"></view>
-		<view class="page-bg">
-			<img class="img" :src="staticUrl+'/img/index-bg.png'" alt="">
-		</view>
-		<view class="page-wrap">
-			<view class="search-out">
-				<u-search
-					placeholder="搜索商品" 
-					:clearabled="true"
-					:showAction="false"
-					height="80rpx"
-					disabled
-					@search="topSearch"
-					@click="$u.route('/shopping/searchhistory')"
-					bgColor="transparent"
-					v-model="goodsName">
-				</u-search>
-			</view>
+		<view class="swiper-wrap">
 			<u-swiper
 				:list="bannerList"
 				indicator
-				height="130"
+				height="750rpx"
 				keyName="sliderImg"
 				indicatorMode="dot"
+				radius="0"
+				:circular="true"
+				imgMode="aspectFit"
 				@click="bannerClick()"
 			></u-swiper>
-			<view class="advantage u-flex u-row-around">
-				<view class="u-flex">
-					<u-icon :size="advantageSize" class="icon" :name="staticUrl+'/img/zheng.png'"></u-icon>
-					正品保证
-				</view>
-				<view class="u-flex">
-					<u-icon :size="advantageSize" class="icon" :name="staticUrl+'/img/memberservice.png'"></u-icon>
-					会员服务
+		</view>
+		<view class="swiper-block" :style="{height: ( 375 - navHeight )+'px' }"></view>
+		<view class="page-wrap">
+			
+			<view class="member-info u-flex u-row-between" :style="[memberInfoBg]">
+				<view class="left u-flex">
+					<u-avatar :src="avatar||staticUrl+'/img/avatar-white.png'" size="88rpx"></u-avatar>
+					<view class="text">
+						<view class="name">{{vuex_member_info.name}}</view>
+						<text class="level-name">{{vuex_member_info.levelName}}</text>
 					</view>
-				<view class="u-flex">
-					<u-icon :size="advantageSize" class="icon" :name="staticUrl+'/img/rmb.png'"></u-icon>
-					性价比高
+				</view>
+				<view class="right  u-flex">
+					<text class="credit-text">积分</text>
+					<text class="num">{{memberInfo.credit}}</text>
 				</view>
 			</view>
 			
-			<view class="icon-nav u-flex u-row-around">
-			<!-- 	<view class="nav-item" @click="$u.route('/center/mybalance')">
-					<u--image class="image" :src="staticUrl+'/img/index-nav-4.png'" width="101rpx" height="101rpx"></u--image>
-					需要删除
-				</view> -->
-				<view class="nav-item" @click="$u.route('/shopping/productList',{typeId:1,typeName:'特价专区',type:'reLaunch'})">
-					<u--image class="image" :src="staticUrl+'/img/index-nav-1.png'" width="101rpx" height="101rpx"></u--image>
-					特价专区
-				</view>
-				<view class="nav-item" @click="$u.route('/shopping/productList',{typeId:2,typeName:'爆款专区',type:'reLaunch'})">
-					<u--image class="image" :src="staticUrl+'/img/index-nav-2.png'" width="101rpx" height="101rpx"></u--image>
-					爆款专区
-				</view>
-				<view class="nav-item" @click="$u.route('/credits/credits',{type:'reLaunch'})">
-					<u--image class="image" :src="staticUrl+'/img/index-nav-3.png'" width="101rpx" height="101rpx"></u--image>
-					积分商城
-				</view>
-				<view class="nav-item" @click="$u.route('/center/recharge',{type:'reLaunch'})">
-					<u--image class="image" :src="staticUrl+'/img/index-nav-4.png'" width="101rpx" height="101rpx"></u--image>
-					充值中心
+			<view class="index-nav u-flex u-row-between u-flex-wrap">
+				<view class="nav-item" v-for="(item,index) in iconNavList" @click="indexNavClick(item)" :key="index">
+					<!-- <u--image class="image" :src="item.icon" width="101rpx" height="101rpx"></u--image> -->
+					<img class="image" :src="item.icon" alt="">
+					<view class="name">{{item.name}}</view>
 				</view>
 			</view>
 			
@@ -68,50 +43,68 @@
 				<u-swiper
 					:list="centerImg"
 					:indicator="centerImg.length>1"
+					radius="0"
 					keyName="sliderImg"
 					indicatorMode="dot"
-					height="161rpx"
+					imgMode="aspectFit"
+					height="240rpx"
 					@click="centerImgClick()"
 				></u-swiper>
 			</view>
-			<view class="hot-product">
+			
+			<view class="activity">
 				<view class="single-til u-flex u-row-between">
-					<text class="text">热销产品</text>
-					<!-- <view class="u-flex" @click="$u.route('/shopping/productList',{typeId:1,typeName:'热销产品',type:'redirectTo'})">
+					<view class="text u-flex">
+						活动专区
+						<text class="sub-title">Activity Zone</text>
+					</view>
+					<view class="u-flex" @click="$u.route('/shopping/producTypetList')">
 						<text class="more-text">更多</text>
 						<u-icon name="arrow-right" color="#676767" size="24rpx"></u-icon>
-					</view> -->
+					</view>
 				</view>
-				<view class="product u-flex" @click="$u.route('/shopping/productdetails',{id:item.id})" v-for="item in hotGoods" :key="item.id">
-					<u--image :showLoading="true" :src="item.mainImg" width="180rpx" height="180rpx"></u--image>
-					<view class="text">
+				<view class="">
+					
+				</view>
+			</view>
+			
+			<view class="product-list-v2">
+				<view class="single-til u-flex u-row-between">
+					<view class="text u-flex">
+						全部产品
+						<text class="sub-title">All Products</text>
+					</view>
+					<view class="u-flex" @click="$u.route('/shopping/producTypetList')">
+						<text class="more-text">更多</text>
+						<u-icon name="arrow-right" color="#676767" size="24rpx"></u-icon>
+					</view>
+				</view>
+				<view class="product-wrap u-flex u-flex-wrap u-row-between">
+					<view class="product-v2" @click="$u.route('/shopping/productdetails',{id:item.id})" v-for="item in hotGoods" :key="item.id">
+						<u--image :showLoading="true" :src="item.mainImg" width="100%" height="280rpx"></u--image>
 						<view class="name ellipsis-2">{{item.goodsName}}</view>
-						<view class="u-flex u-row-between">
-							<view class="left">
-								<view class="up">
-									<view class="" v-if="vuex_member_info.priceType>1">
-										<text class="price">¥ <text class="price-num">{{item.vipPrice}}</text></text>
-										<text class="vip-icon">VIP</text>
-									</view>
-									<view class="" v-else>
-										<text class="price">¥ <text class="price-num">{{item.salePrice}}</text></text>
-									</view>
-								</view>
-								<view class="down">
-									<!-- <text class="discount">8.8折</text> -->
-									<text v-if="vuex_member_info.priceType>1" class="original-price gray line-through">¥ {{item.salePrice}}</text>
-									<!-- <text class="sales gray">销量 {{item.salePrice}}</text> -->
-								</view>
+						<view class="price u-flex">
+							<view class="myprice" v-if="vuex_member_info.priceType>1">
+								¥ <text class="price-num">{{item.vipPrice}}</text>
+								<text class="gray line-through">{{item.salePrice}}</text>
+							</view>
+							<view class="myprice" v-else>
+								¥ <text class="price-num">{{item.salePrice}}</text>
 							</view>
-							<u--image :showLoading="false" @click.native.stop="addCart(item.id)" :src="staticUrl+'/img/add.png'" width="48rpx" height="48rpx"></u--image>
 						</view>
 					</view>
 				</view>
+				
 			</view>
-			<tabbar :tabbarIndexProps='0' />
-			<cartfixed ref="cartfixed" @getCartList="getCartList" />
 		</view>
-		<u-toast ref="uToast"></u-toast>
+		
+		<view class="goMap u-flex" @click="goMap" :style="{top:`${statusBarHeight}px`}">
+			<img class="image" :src="staticUrl+'/img/go-map-icon.png'" alt="">
+			<text class="text">去商场</text>
+		</view>
+		
+		<tabbar :tabbarIndexProps='0' />
+		<!-- <cartfixed ref="cartfixed" @getCartList="getCartList" /> -->
 	</view>
 </template>
 
@@ -122,43 +115,91 @@
 	export default {
 		components:{
 			tabbar,
-			cartfixed
+			// cartfixed
 		},
 		mixins:[systemInfo],
 		data() {
 			return {
-				goodsName:'',
 				staticUrl:this.$commonConfig.staticUrl,
-				advantageSize:14,
 				bannerList: [],
 				centerImg:[],
-				hotGoods:[]
+				hotGoods:[],
+				memberInfo:{},
+				avatar:'',
+				iconNavList:[
+					{name:'品牌导览',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-1.png`,url:''},
+					{name:'会员权益',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-2.png`,url:''},
+					{name:'线上商城',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-3.png`,url:'/shopping/producTypetList'},
+					{name:'积分兑换',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-4.png`,url:'/credits/credits'},
+					{name:'酒店预定',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-5.png`,url:''},
+					{name:'月子中心',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-6.png`,url:''},
+					{name:'限时抢购',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-7.png`,url:''},
+					{name:'爆款专区',icon:`${this.$commonConfig.staticUrl}/img/index-nav-icon-8.png`,url:'/shopping/productList',param:{typeId:2,typeName:'爆款专区'}},
+				],
+				xsIntro:{},
+				shopLatitude:'',
+				shopLongitude:'',
 			}
 		},
+		computed: {
+		    memberInfoBg() {
+		      return { backgroundImage: `url(${this.staticUrl}/img/index-member-info-bg.png)` }
+		    }
+		},
+		onShow() {
+			// this.$refs.cartfixed.getCartList();
+			this.getHotGoods();
+			this.getMemberInfo()
+		},
 		onLoad(query) {
 			const scene = decodeURIComponent(query.scene);
 			scene&&uni.setStorage({
 				key:'scene',
 				data:scene
 			});
-			// let userInfo = uni.getStorageSync('userInfo');
-			// console.log('userInfo',userInfo);
 			let that = this;
 			this.swiperList();
 			setTimeout(()=>{
 				that.getCenterImg();
 			},200);
 			this.getSystemInfo();
+			this.getIntro();
 			// console.log('statusBarHeight',this.statusBarHeight);
 			// console.log('navigationBarHeight',this.navigationBarHeight);
 			// console.log('windowHeight',this.windowHeight);
 			// console.log('navHeight',this.navHeight);
-		},
-		onShow() {
-			this.$refs.cartfixed.getCartList();
-			this.getHotGoods();
+
 		},
 		methods: {
+			getIntro(){
+				this.$u.api.xsGetIntro().then(res=>{
+					this.xsIntro = res.data;
+					// this.shopLatitude = res.data.shopLatitude;
+					// this.shopLongitude = res.data.shopLongitude;
+					// console.log('res',res);
+				}).catch(err=>{
+					console.log('xsGetIntro',err.data);
+				})
+			},
+			goMap(){
+				uni.openLocation({
+				  latitude:this.xsIntro.shopLatitude,	//维度
+				  longitude: this.xsIntro.shopLongitude, //经度
+				  name: "商行地址",	//目的地定位名称
+				  scale: 15,	//缩放比例
+				  address: this.xsIntro.shopAddress	//导航详细地址
+				})
+			},
+			getMemberInfo(){
+				this.$u.api.memberInfo({id:this.vuex_member_info.id}).then(res=>{
+					this.memberInfo = res.data;
+					this.avatar =  res.data.avatar;
+					this.$u.vuex('vuex_member_info', res.data);
+					// console.log('memberInfo',this.memberInfo);
+					}).catch(err=>{
+					console.log('memberInfo',err.data);
+				})
+			},
 			swiperList(){
 				this.$u.api.swiperList({postion:1}).then(res=>{
 					this.bannerList = res.data.rows;
@@ -191,6 +232,17 @@
 					id: item.id
 				});
 			},
+			indexNavClick(item){
+				if(item.url){
+					uni.$u.route(item.url,item.param );
+				}else{
+					uni.$u.toast('开发中,请等待')
+				}
+				
+				// if(item.param){
+				// 	uni.$u.route(item.url,item.param );
+				// }
+			},
 			getHotGoods(){
 				this.$u.api.topGoodList({pageNum:1,pageSize:20}).then(res=>{
 					this.hotGoods = res.data.rows;
@@ -199,58 +251,101 @@
 					console.log('getHotGoods',err.data);
 				})
 			},
-			addCart(id){
-				// console.log('addCart',id);
-				this.$u.api.addCart({goodsId:id}).then(res=>{
-					this.$refs.cartfixed.getCartList('isAdd');
-					console.log('res',res);
-					}).catch(err=>{
-					console.log('addCart',err.data);
-				})
-			},
-			topSearch(){
-				uni.$u.route('/shopping/productsearch', {
-					goodsName: this.goodsName
-				});
-				// console.log('topSearch',this.goodsName);
-			}
+
 		}
 	}
 </script>
 <style>
 page{
-	background-color: #F9F9F9;
-	padding-top: 0;
+	padding-bottom: 40rpx;
 }
 </style>
 <style lang="scss" scoped>
-.page-bg{
-	.img{
-		height: 100vh;
-	}
+.swiper-wrap{
+	position: absolute;
+	left: 0;
+	top: 0;
+	width: 100%;
+	z-index: 10;
 }
-.search-out{
-	background-color: rgba(0,0,0,0.04);
-	border-radius: 100rpx;
-	margin-bottom: 20rpx;
+.page-wrap{
+	position: relative;
+	z-index: 20;
+	background-color: #fff;
 }
-.advantage{
-	margin-top: 20rpx;
-	margin-bottom: 50rpx;
-	font-size: 22rpx;
-	color: #ccc;
-	/deep/ .u-icon{
-		margin-right: 10rpx;
+.member-info{
+	box-sizing: border-box;
+	height: 136rpx;
+	background: linear-gradient(270deg, #EACCA8 0%, #D6986B 100%);
+	background-size: contain;
+	background-repeat: no-repeat;
+	border-radius: 8rpx 8rpx 0rpx 0rpx;
+	padding: 24rpx;
+	margin-bottom: 60rpx;
+	color: #fff;
+	font-size: 34rpx;
+	.text{
+		margin-left: 20rpx;
+		.name{
+			font-weight: 600;
+			color: rgba(255,255,255,0.99);
+			// line-height: 48rpx;
+			// margin-bottom: 8rpx;
+		}
+		.level-name{
+			font-size: 22rpx;
+			font-weight: 400;
+			// line-height: 30rpx;
+		}
+	}
+	.right{
+		.credit-text{
+			font-size: 26rpx;
+			font-weight: 400;
+			color: rgba(255,255,255,0.99);
+			margin-right: 16rpx;
+		}
+		.num{
+			font-weight: 600;
+		}
+	}
+}
+.index-nav{
+	padding: 0 32rpx;
+	text-align: center;
+	margin-bottom: 60rpx;
+	.nav-item{
+		width: 25%;
+		margin-bottom: 30rpx;
+		.image{
+			margin-left: auto;
+			width: 80rpx;
+			height: 80rpx;
+		}
+		.name{
+			font-size: 26rpx;
+			font-weight: 400;
+			color: #666666;
+			line-height: 37rpx;
+		}
 	}
 }
 .index-img{
-	margin-bottom: 56rpx;
+	margin-bottom: 60rpx;
 }
-.hot-product{
-	.product{
-		padding: 30rpx;
-		background-color: #fff;
-		border: 0;
+.goMap{
+	position: absolute;
+	z-index: 31;
+	padding: 20rpx;
+	.image{
+		width: 34rpx;
+		height: 35rpx;
+	}
+	.text{
+		font-size: 30rpx;
+		font-weight: 400;
+		color: #FFFFFF;
+		margin-left: 12rpx;
 	}
 }
-</style>
+</style>

+ 6 - 0
static/css/common.scss

@@ -60,6 +60,12 @@
 		font-size: 32rpx;
 		color: #333;
 		font-weight: 600;
+		.sub-title{
+			margin-left: 20rpx;
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #999999;
+		}
 	}
 	.more-text{
 		font-size: 24rpx;

+ 40 - 0
uni.scss

@@ -267,6 +267,46 @@ page{
 	}
 }
 
+.product-list-v2{
+	.product-wrap{
+		
+	}
+	.product-v2{
+		width: calc( (100% - 22rpx )/2 );
+		margin-bottom: 22rpx;
+		border: 1rpx solid #EEEEEE;
+		box-sizing: border-box;
+		.name{
+			padding: 0 20rpx;
+			height: 76rpx;
+			font-size: 30rpx;
+			font-weight: 400;
+			color: #333333;
+			line-height: 38rpx;
+			margin-top: 20rpx;
+			margin-bottom: 16rpx;
+		}
+		.price{
+			padding: 0 20rpx;
+			margin-bottom: 20rpx;
+			font-size: 20rpx;
+			font-weight: 600;
+			color: #00A447;
+			.price-num{
+				font-size: 30rpx;
+				font-weight: 600;
+				margin-left: 5rpx;
+			}
+			.gray{
+				margin-left: 21rpx;
+				font-size: 22rpx;
+				font-weight: 400;
+				color: #999999;
+			}
+		}
+	}
+}
+
 .tabs-wrap{
 	margin-bottom: 30rpx;
 	.more{

+ 1 - 1
xushuo/xushuo.vue

@@ -80,7 +80,7 @@
 					</view>
 				</view>
 			</view>
-			<tabbar :tabbarIndexProps='2' />
+			<tabbar :tabbarIndexProps='1' />
 		</view>
 	</view>
 </template>