zhengkaixin 1 year ago
parent
commit
82b24eb5a5

+ 1 - 1
.env.dev.js

@@ -16,7 +16,7 @@ const UNI_APP = {
 	openId:"zkxtest",//zkx
 	openId:"zkxtest",//zkx
 	
 	
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
-	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",

BIN
assets/img/buy/ptzy.png


BIN
assets/img/buy/shopList.png


+ 4 - 5
pages/article/newsNotice.vue

@@ -2,10 +2,8 @@
 	<view style="background-color: #fff;" >
 	<view style="background-color: #fff;" >
 		<ujp-navbar title="活动公告"></ujp-navbar>
 		<ujp-navbar title="活动公告"></ujp-navbar>
 		
 		
-		<view class="options">
-			<view class="options-item">
-				<u-tabs :font-size="elderStatus ? 36 : 30" :list="tabList" :current="current" @change="change" :show-bar="false" active-color="#333" inactive-color="#c4c0c0"></u-tabs>
-			</view>
+		<view class="options-item">
+			<u-tabs :font-size="elderStatus ? 36 : 30" :list="tabList" :current="current" @change="change" :show-bar="false" active-color="#333" inactive-color="#c4c0c0"></u-tabs>
 		</view>
 		</view>
 		
 		
 		<view class="swiper-box" 
 		<view class="swiper-box" 
@@ -218,5 +216,6 @@
 		}
 		}
 	}
 	}
 	
 	
-
+	
+	
 </style>
 </style>

+ 132 - 5
pages/index/activity.vue

@@ -1,7 +1,10 @@
 <template>
 <template>
-	<view>
-			<ujp-navbar title="优惠活动" :is-back="false" ></ujp-navbar>
-			<view class="background">
+	<view style="background-color: #fff;">
+			<ujp-navbar title="优惠活动" :is-back="false"  v-if="false" ></ujp-navbar>
+			<view class="options-item">
+				<u-tabs  :list="tabList" :current="current" @change="change" :show-bar="false" active-color="#00B962 " inactive-color="#c4c0c0"></u-tabs>
+			</view>
+			<view class="background" v-show="current==0">
 				<view class="banner" v-for="(item,i) in bannerList"
 				<view class="banner" v-for="(item,i) in bannerList"
 				
 				
 				 :key="i">
 				 :key="i">
@@ -17,6 +20,19 @@
 				</view>
 				</view>
 				<u-divider  bg-color="#F2F4F4" >已经到底了</u-divider>
 				<u-divider  bg-color="#F2F4F4" >已经到底了</u-divider>
 				
 				
+			</view>
+			<view class="news"  v-show="current==1">
+				<view class="news-content" v-for="(item,index) in newsList" :key="item.id" @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
+					<view class="content-text">
+						<view class="content-title oldTextjp2" oldstyle="font-size: 18px;">{{item.title}}</view>
+						<view class="news-time">{{item.createTime ? item.createTime.slice(5,16) : ''}}</view>
+					</view>
+					<view class="content-img">
+						<img :src="item.pic ? item.pic : 'static/img/image_default.png'" alt="">
+					</view>
+				</view>
+				<u-divider v-if="newsList.length!=0&&newsList.length ==recordsTotal">已经到底了</u-divider>
+				
 			</view>
 			</view>
 			
 			
 			<Tabbar :current="1" ref="tabbarMain" ></Tabbar>
 			<Tabbar :current="1" ref="tabbarMain" ></Tabbar>
@@ -31,7 +47,18 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-					bannerList: [],
+				tabList: [
+					
+					{name: '优惠活动',type: 'YHHD'},
+					{name: '通知公告',type: 'TZGG'},
+				
+				],
+				current: 0,
+				newsList: [],
+				pageIndex: 1,
+				newsType: 'TZGG',
+				recordsTotal: 0,
+				bannerList: [],
 			}
 			}
 		},
 		},
 		components: {
 		components: {
@@ -46,8 +73,53 @@
 		},onLoad() {
 		},onLoad() {
 			this.getBannerInfo("HDYM");
 			this.getBannerInfo("HDYM");
 		},
 		},
-		
+		onReachBottom() {
+			if (this.current==1&&this.newsList.length < this.recordsTotal) {			
+				this.myLoadmore();
+			}
+		},
 		methods: {
 		methods: {
+			change(index) {
+				this.current = index;
+				//this.newsType = this.tabList[index].type;
+				if(this.newsList.length==0){
+					this.getNewsList()
+				}
+				
+			},
+			getNewsList(bl) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				if (bl) {
+					this.newsList = [];
+					this.pageIndex = 1;
+				}
+				
+				newsApi.newsInfoList({
+					pageIndex: this.pageIndex,
+					pageSize: 20,
+					shortName: this.newsType
+				}).then((res) => {
+					uni.hideLoading()
+					
+					this.newsList = [
+						...this.newsList,
+						...res.data.data
+					];
+					this.recordsTotal = res.data.recordsTotal		
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			myLoadmore() {
+				this.pageIndex += 1;
+				this.getNewsList()
+			},
 			getBannerInfo(code) {
 			getBannerInfo(code) {
 				uni.showLoading({
 				uni.showLoading({
 					title: "加载中",
 					title: "加载中",
@@ -145,4 +217,59 @@
 		margin: 24rpx;
 		margin: 24rpx;
 		
 		
 	}
 	}
+	.options-item{
+		    width: 100%;
+		    display: flex;
+		    justify-content: center;
+		    background: rgb(255, 255, 255);
+	}
+	
+	.news {
+		background-color: #fff;
+		margin: 0 16px ;
+	    border-radius: 8px;
+		.news-content {
+			display: flex;
+			justify-content: space-between;
+			margin-bottom: 24px;
+	
+			.content-text {
+				width: 56.2%;
+				height: 100%;
+				line-height: 21px;
+				color: #101010;
+				text-align: left;
+				font-size: 14px;
+			}
+	
+			.content-title {
+				width: 100%;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 3;
+			}
+	
+			.content-img {
+				width: 40.57%;
+				height: 100%;
+				border-radius: 4px;
+				overflow: hidden;
+	
+				img {
+					width: 100%;
+					height: 80%;
+				}
+			}
+	
+			.news-time {
+				margin-top: 10%;
+				color: #999999;
+				width: 100px;
+				height: 20px;
+				font-size: 14px;
+			}
+		}
+	}
 </style>
 </style>

+ 91 - 34
pages/index/index.vue

@@ -631,30 +631,46 @@
 		</view>
 		</view>
 
 
 		<!-- 新闻 -->
 		<!-- 新闻 -->
-		<view class="news-title" v-if="newsList.length > 0">
-			<view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
+		<view class="news-title" v-if="newsList.length > 0" >
+			<!-- <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
 				<view class="line" style="margin-top:4px;"></view>活动公告
 				<view class="line" style="margin-top:4px;"></view>活动公告
 			</view>
 			</view>
 
 
-			<view class="more oldTextjp2" oldstyle="font-size:16px;" @click="toNewsNotice">更多<view
+			<view class="more oldTextjp2" oldstyle="font-size:16px;" >更多<view
 					class="more-icon iconfont"> &#xe600;</view>
 					class="more-icon iconfont"> &#xe600;</view>
-			</view>
-
+			</view> -->
 
 
-		</view>
-		<view class="news">
+					<u-notice-bar mode="horizontal"
+					 color="#FF3D00" bg-color="#fff"
+					 :list="newsList"></u-notice-bar>
 
 
-			<view class="news-content" v-for="(item,index) in newsList" :key="index"
-				@click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
-				<view class="content-text">
-					<view class="content-title oldTextjp2" oldstyle="font-size: 18px;">{{item.title}}</view>
-					<view class="news-time">{{item.createTime?item.createTime.slice(5,10):''}}</view>
-				</view>
-				<view class="content-img">
-					<img :src="item.pic ? item.pic : 'static/img/image_default.png'" alt="">
-				</view>
-			</view>
+		</view>
+		<view class="news-title"  >
+			 <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
+				<view class="line" style="margin-top:4px;"></view>51商城
+			</view>
+		
+			<view class="more oldTextjp2" oldstyle="font-size:16px;" >
+				备货中,敬请期待!
+			</view>
+			
+		</view>
+		<view  class="shopList" @click="bhz" >
+			<view class="shopItem" v-for="(item,i) in shopList" :key="i">
+				<view class="shopItemImg">
+					<img  src="@/assets/img/buy/shopList.png"  >
+				</view>
+				<view class="shopItemName" ><img style="width:52px; height:16px;    vertical-align: middle;" src="@/assets/img/buy/ptzy.png">家用7kW交流充电桩</view>
+				<view class="shopItemPrice" >
+					<view class="shopItemPrice1" >¥***</view>
+					<view class="shopItemPrice2">
+						
+						<u-icon name="shopping-cart"></u-icon>
+					</view>
+				</view>
+			</view>
 		</view>
 		</view>
+	
 		<view class="bottom">
 		<view class="bottom">
 			<view class="bot">
 			<view class="bot">
 				<view class="bot-line"></view>
 				<view class="bot-line"></view>
@@ -760,7 +776,8 @@
 				couponSelect: {},
 				couponSelect: {},
 				pageIndex2: 1,
 				pageIndex2: 1,
 				recordsTotal2: 0,
 				recordsTotal2: 0,
-				defaultStation:[],
+				defaultStation:[],
+				shopList:[{},{}]
 
 
 			}
 			}
 		},
 		},
@@ -1453,6 +1470,12 @@
 						icon: "none"
 						icon: "none"
 					})
 					})
 				})
 				})
+			},
+			bhz(){
+				uni.showToast({
+					title: "备货中,敬请期待",
+					icon: "none"
+				})
 			},
 			},
 			getPointTimeOut() {
 			getPointTimeOut() {
 
 
@@ -1502,8 +1525,12 @@
 				})
 				})
 			},
 			},
 			toNewsNotice() {
 			toNewsNotice() {
-				uni.navigateTo({
-					url: '/pages/article/newsNotice'
+				// uni.navigateTo({
+				// 	url: '/pages/article/newsNotice'
+				// })
+				
+				uni.navigateTo({
+					url: '/pages/index/activity'
 				})
 				})
 			},
 			},
 			//微信扫二维码
 			//微信扫二维码
@@ -1715,23 +1742,20 @@
 					title: "加载中",
 					title: "加载中",
 					mask: true,
 					mask: true,
 				})
 				})
-				if (bl) {
-					this.newsList = [];
-					this.pageIndex = 1;
-				}
+			
 
 
 				newsApi.newsInfoList({
 				newsApi.newsInfoList({
-					pageIndex: this.pageIndex,
-					pageSize: 3,
-					shortName:'TZGG',
+					pageIndex: 1,
+					pageSize: 5,
+					shortName:'GDXW',
+					//shortName:'TZGG'
 				}).then((res) => {
 				}).then((res) => {
 					uni.hideLoading()
 					uni.hideLoading()
 
 
-					this.newsList = [
-						...this.newsList,
-						...res.data.data
-					];
-					this.recordsTotal = res.data.recordsTotal
+					this.newsList =   res.data.data.map(item=>{
+						return item.title
+					})
+					 
 				}).catch(error => {
 				}).catch(error => {
 					uni.showToast({
 					uni.showToast({
 						title: error,
 						title: error,
@@ -2789,18 +2813,30 @@
 			margin-top: -60px;
 			margin-top: -60px;
 		}
 		}
 	}
 	}
+	.shopItemPrice2{
+		border-radius: 25px;
+		height: 40rpx;
+		width: 40rpx;
+		display: flex;
+		    justify-content: center;
+		/* text-decoration: underline; */
 	
 	
+			color: #fff;
+		text-align: center;
+		
+		background: linear-gradient(180deg, rgba(255,98,0,1) 0%,rgba(255,40,0,1) 100%);
+	}
 	.slogan-4 {
 	.slogan-4 {
 		margin-top: 10px;
 		margin-top: 10px;
 		display: flex;
 		display: flex;
 		    justify-content: center;
 		    justify-content: center;
 		/* text-decoration: underline; */
 		/* text-decoration: underline; */
-		color: #9F9C99;
+	
 	
 	
 		text-align: center;
 		text-align: center;
 		position: fixed;
 		position: fixed;
 		/* top: 40px; */
 		/* top: 40px; */
-		bottom: 120px;
+		bottom: 180px;
 		right: 20px;
 		right: 20px;
 		height: 80rpx;
 		height: 80rpx;
 		width: 80rpx;
 		width: 80rpx;
@@ -2825,5 +2861,26 @@
 	50% { transform: rotate(0deg); }
 	50% { transform: rotate(0deg); }
 	75% { transform: rotate(-8deg); }
 	75% { transform: rotate(-8deg); }
 	100% { transform: rotate(0deg); }
 	100% { transform: rotate(0deg); }
+	}
+	.shopList{
+		    width: 91.4%;
+		    margin: 8px auto 0;
+		    border-radius: 8px;
+		    padding: 12px 12px 12px 11px;
+		    background-color: #fff;
+			    display: flex;
+				    justify-content: space-around;
+		.shopItem{
+			width: 45%;
+			margin: 3px;
+			.shopItemPrice{
+				 display: flex;
+				 justify-content: space-between;
+				.shopItemPrice1{
+					color:#FF2800 
+				}
+			}
+			
+		}
 	}
 	}
 </style>
 </style>

+ 17 - 5
pages/user/company-vip.vue

@@ -18,6 +18,10 @@
 					<view class="sign">
 					<view class="sign">
 						{{platformN}}
 						{{platformN}}
 					</view>
 					</view>
+					<view class="sign2">
+						{{cardNo}}
+					</view>
+					
 				</view>
 				</view>
 				
 				
 			</view>
 			</view>
@@ -122,6 +126,7 @@
 				list: [],
 				list: [],
 				electricQuantity:0,
 				electricQuantity:0,
 				recordsTotal: 0,
 				recordsTotal: 0,
+				cardNo:"",
 			}
 			}
 		},
 		},
 		onReachBottom() {
 		onReachBottom() {
@@ -138,6 +143,7 @@
 				for(var i in list){
 				for(var i in list){
 					if(list[i].platform==this.platform){
 					if(list[i].platform==this.platform){
 						this.platformN=list[i].platformN
 						this.platformN=list[i].platformN
+						this.cardNo=list[i].cardNo
 					}
 					}
 				}
 				}
 			}
 			}
@@ -349,16 +355,22 @@
 			.user-name{
 			.user-name{
 				margin-left: 12px;
 				margin-left: 12px;
 				.name{
 				.name{
-					line-height: 24px;
+					line-height: 40rpx;
 					color: rgba(33, 41, 48, 100);
 					color: rgba(33, 41, 48, 100);
-					font-size: 24px;
+					font-size: 40rpx;
 					font-weight: 550;
 					font-weight: 550;
 				}
 				}
 				.sign{
 				.sign{
 					color: rgba(76, 89, 111, 100);
 					color: rgba(76, 89, 111, 100);
-					font-size: 16px;
-					line-height: 16px;
-					margin-top: 8px;
+					font-size: 28rpx;
+					line-height: 28rpx;
+					margin-top: 16rpx;
+				}
+				.sign2{
+					color: #6C6F73 ;
+					font-size: 24rpx;
+					line-height: 24rpx;
+					margin-top: 16rpx;
 				}
 				}
 			}
 			}
 		}
 		}