Selaa lähdekoodia

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

zhongtianhaoyuan 3 vuotta sitten
vanhempi
commit
88d6c95e7b

+ 27 - 0
pages.json

@@ -60,6 +60,33 @@
 				// #endif 
 			}
 		},
+		{
+			"path": "pages/sale/plant",
+			"style": {
+				// #ifdef MP 
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "工厂价格"
+				// #endif 
+			}
+		},
+		{
+			"path": "pages/sale/portprice",
+			"style": {
+				// #ifdef MP 
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "港口价格"
+				// #endif 
+			}
+		},
+		{
+			"path": "pages/sale/newsinfo",
+			"style": {
+				// #ifdef MP 
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "行业新闻"
+				// #endif 
+			}
+		},
 		{
 			"path": "pages/sale/index",
 			"style": {

+ 163 - 128
pages/sale/information.vue

@@ -23,112 +23,82 @@
 			</view> -->
 		</view> 
 		<swiper-up :list="infoList" ></swiper-up>
-		<scroll-view style='margin-top:12px;padding:0 20px;' scroll-x class="nav">
+<!-- 		<scroll-view style='margin-top:12px;padding:0 20px;' scroll-x class="nav">
 			<view class="flex text-center">
 				<view style='position:relative;' class="cu-item flex-sub" :class="item.value==TabCur?'text-white':''" v-for="item in categoryList"@tap="tabSelect" :data-id="item.value">
 					<image v-if='item.value==TabCur' style='width:100%;height:100%;position: absolute;z-index:1;left:0;' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/bg.png'></image>
 					<text style='position:relative;z-index:2;'>{{item.label}}</text>
 				</view>
 			</view>
-		</scroll-view>
+		</scroll-view> -->
 		
-		<view class="guess-section" v-if='TabCur==0'>
-			<view class="cu-card article no-card" style='width: 100%;'>
-				<view class="cu-item shadow factoryItem factorytitle flex justify-between align-center">
-					<view style='flex:1;'>工厂</view>
-					<view style='flex:1;'>价格</view>
-					<view style='flex:1;'>较昨日</view>
-				</view>
+		<view class="guess-section-wrap">
+			<view class='flex justify-between'>
+				<view class='title'>工厂价格</view>
+				<view style='color:#B2B3BB;' @click='more("/pages/sale/plant")'>更多</view>
 			</view>
-			<view
-				v-for="(item, index) in newsInfo" :key="index"
-				class="guess-item">
-				<view class="cu-card article no-card"  >
-					<view class="cu-item shadow factoryItem flex justify-between align-center">
-						<view style='flex:1;'>
-							<view class='factory'>{{item.factory}}</view>
-							<view class='wrap'>{{item.city}} {{item.factoryType}}</view>
-						</view>
-						<view style='flex:1;' class='price'>{{item.price}}</view>
-						<view style='flex:1;' class='positive' v-if='item.comparePrice>0'>{{item.comparePrice}}<image class='up' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/up.png'></image></view>
-						<view style='flex:1;' class='negative' v-if='item.comparePrice<0'>{{-item.comparePrice}}<image class='down' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/decline.png'></image></view>
-						<view style='flex:1;font-weight:900;' v-if='item.comparePrice==0'>-</view>
+			<view class='guess-section-wrap-content'>
+				<view class='guess-section-wrap-item clearfix' v-for='item in plantList'>
+					<view class='factory'>{{item.factory}}</view>
+					<view class='wrap'>{{item.city}} {{item.factoryType}}</view>
+					<view class='price'>
+						<text class='currectprice'>{{item.price}}</text>
+						较昨日
+						<image v-if='item.comparePrice>0' style="width:7.5px;height:9px;" src='../../static/img/homepage/shangsheng.png'></image>
+						<image v-if='item.comparePrice<0'  style="width:7.5px;height:9px;" src='../../static/img/homepage/xiajiang.png'></image>
+						<text v-if='item.comparePrice>0' class='yesterday up'>{{item.comparePrice}}</text>
+						<text v-if='item.comparePrice<0' class='yesterday down'>{{-item.comparePrice}}</text>
+						<text v-if='item.comparePrice==0' class='yesterday'>-</text>
 					</view>
 				</view>
 			</view>
-			<view v-show="isLoadMore">
-			    <uni-load-more :status="loadStatus" ></uni-load-more>
-			</view>
 		</view>
-		
-		<view class="guess-section" v-if='TabCur==1'>
-			<view class="cu-card article no-card" style='width: 100%;'>
-				<view class="cu-item shadow factoryItem flex justify-between align-center">
-					<view style='flex:1;'>港口</view>
-					<view style='flex:1;'>价格</view>
-					<view style='flex:1;'>较昨日</view>
-				</view>
+		<view class="guess-section-wrap">
+			<view class='flex justify-between'>
+				<view class='title'>港口价格</view>
+				<view style='color:#B2B3BB;'  @click='more("/pages/sale/portprice")'>更多</view>
 			</view>
-			<view
-				v-for="(item, index) in newsInfo" :key="index"
-				class="guess-item"
-			>
-			<view class="cu-card article no-card" >
-				<view class="cu-item shadow factoryItem flex justify-between align-center">
-					<view style='flex:1;'><view class='factory'>{{item.port}}</view><view class='wrap'>{{item.goodsName}}</view></view>
-					<view style='flex:1;' >
-						<view class='price'>{{item.price}}</view>
-						<view class='wrap'>
-							<text class="cu-tag radius line-blue text-water">{{item.waterContent}}</text>
-							<text class="cu-tag radius line-blue text-bluk">{{item.bulkDensity}}</text>
+			<view class='guess-section-wrap-content port'>
+				<view class='guess-section-wrap-item clearfix' v-for='item in portList'>
+					<view class='factory'>{{item.port}}</view>
+					<view class='wrap'>{{item.goodsName}}</view>
+					<view class='price'>
+						<text class='currectprice'>{{item.price}}</text>
+						较昨日
+						<image v-if='item.comparePrice>0' style="width:7.5px;height:9px;" src='../../static/img/homepage/shangsheng.png'></image>
+						<image v-if='item.comparePrice<0'  style="width:7.5px;height:9px;" src='../../static/img/homepage/xiajiang.png'></image>
+						<text v-if='item.comparePrice>0' class='yesterday up'>{{item.comparePrice}}</text>
+						<text v-if='item.comparePrice<0' class='yesterday down'>{{-item.comparePrice}}</text>
+						<text v-if='item.comparePrice==0' class='yesterday'>-</text>
+					</view>
+					<view style='color:#B2B3BB;' class='flex'>
+						<view style='margin-right:10px;'>
+							<image style='width:11px;height:11px;' src='../../static/img/homepage/water@3x.png'></image>
+							<={{item.waterContent}}
 						</view>
+						<view>
+							<image  style='width:11px;height:11px;' src='../../static/img/homepage/unitweight@3x.png'></image>
+						>={{item.bulkDensity}}
 						</view>
-					<view style='flex:1;' class='positive' v-if='item.comparePrice>0'>{{item.comparePrice}}<image class='up' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/up.png'></image></view>
-					<view style='flex:1;' class='negative' v-if='item.comparePrice<0'>{{-item.comparePrice}}<image class='down' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/decline.png'></image></view>
-					<view style='flex:1;font-weight:900;' v-if='item.comparePrice==0'>-</view>
+					</view>
 				</view>
-			</view>
-			</view>
-			<view v-show="isLoadMore">
-			    <uni-load-more :status="loadStatus" ></uni-load-more>
+				
 			</view>
 		</view>
-		
-		<view class="guess-section" v-if='TabCur==2'>
-			<view 
-				v-for="(item, index) in newsInfo" :key="index"
-				class="guess-item"
-				@click="navToDetailPage(item.id)"
-			>
-					<view class="content" style='padding:15rpx 30rpx;display: grid;grid-template-columns: 70% 30%; grid-column-gap: 10px;'>
-						<!-- <view class="desc">
-							<view class="title">
-								<view class="text-cut" style="text-align: left;">{{item.title}}</view>
-							</view>
-							<view style="margin-bottom: 30upx;text-align:left;">
-								<view class="cu-tag line-green light radius">{{item.gmtUpdate}}</view>
-								<view class="cu-tag line-blue light radius">{{item.from}}</view>
-							</view>
-						</view>
-						<image style='width:200rpx;height:120rpx;flex:1;' :src="item.titleImg"
-						 mode="aspectFill"></image> -->
-						 <view class="gird-left">
-							 <view class="title">
-							 	<view class="text-cut" style="text-align: left;">{{item.title}}</view>
-							 </view>
-							 <view style="margin-bottom: 30upx;text-align:left;margin-top: 10px;">
-							 	<view style='color:#2FBA23;' class="cu-tag line-green light radius">{{item.gmtUpdate}}</view>
-							 	<view style='color:#0C6EBA;' class="cu-tag line-blue light radius">{{item.from}}</view>
-							 </view>
-						 </view>
-						 <view class="gird-right">
-							 <image style='width:200rpx;height:120rpx;flex:1;border-radius: 3px;' :src="item.titleImg"
-							  mode="aspectFill"></image>
-						 </view>
-			</view>
+		<view class="guess-section-wrap1">
+			<view style='padding:15px;' class='flex justify-between'>
+				<view class='title'>行业新闻</view>
+				<view style='color:#B2B3BB;'>更多</view>
 			</view>
-			<view v-show="isLoadMore">
-			    <uni-load-more :status="loadStatus" ></uni-load-more>
+			<view style='border-bottom:1px solid #EEEEEE;' class='guess-section-wrap-content1'>
+				<view style='border-bottom:1px solid #eee;padding:15px;' class='flex justify-between'  v-for='(item, index) in newsInfo' :key="index" @click="navToDetailPage(item.id)">
+					<view>
+						<view style='font-size:16px;height:54px;'>{{item.title}}</view>
+						<view style='color:#B2B3BB;font-size:12px;'><text style='margin-right:5px;'>{{item.from}}</text>{{item.gmtUpdate}}</view>
+					</view>
+					<view><image style='width:100px;height:72px;border-radius:5px;' :src='item.titleImg'></image></view>
+				</view>
+				
 			</view>
 		</view>
 	</view>
@@ -159,6 +129,8 @@
 				salesTop: [],
 				saleInfo: [],
 				portInfo: [],
+				plantList:[],
+				portList:[],
 				banner: undefined,
 				isVip: false,
 				pages: 1, //页数
@@ -248,7 +220,12 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
-			
+			more(url){
+				console.log(url)
+				uni.navigateTo({
+					url: url
+				})
+			},
 			DotStyle(e) {
 				this.dotStyle = e.detail.value
 			},
@@ -302,23 +279,43 @@
 					title: '正在加载',
 					mask:true
 				})
-				var _gp=''
-                var _mt=''
-				if(this.TabCur==0){
-					_gp='news'
-					_mt='getFactoryPriceInfo'
-				}else if(this.TabCur==1){
-					_gp='news'
-					_mt='getPortPriceInfo'
-				}else if(this.TabCur==2){
-					_gp='news'
-					_mt='getNewsInfo'
-				}
-				// 新闻内容
-				that.$api.request(_gp, _mt,{
+				// 工厂价格
+				that.$api.request('news', 'getFactoryPriceInfo',{
 					category:this.category,
-					page: this.pages,
-					limit:this.limit
+					page: 1,
+					limit:2
+				}, failres => {
+					that.$api.msg(failres.errmsg)
+					this.isLoadMore = false
+					this.loadStatus = 'nomore'
+					if(this.pages>1){this.pages=1}
+					uni.hideLoading()
+				}).then(res => {
+					let data = res.data
+					that.plantList = data
+					uni.hideLoading()
+				})
+				// 港口价格
+				that.$api.request('news', 'getPortPriceInfo',{
+					category:this.category,
+					page: 1,
+					limit:2
+				}, failres => {
+					that.$api.msg(failres.errmsg)
+					this.isLoadMore = false
+					this.loadStatus = 'nomore'
+					if(this.pages>1){this.pages=1}
+					uni.hideLoading()
+				}).then(res => {
+					let data = res.data
+					that.portList = data
+					uni.hideLoading()
+				})
+				// 新闻内容
+				that.$api.request('news', 'getNewsInfo',{
+					category:2,
+					page: 1,
+					limit:10
 				}, failres => {
 					that.$api.msg(failres.errmsg)
 					this.isLoadMore = false
@@ -327,9 +324,6 @@
 					uni.hideLoading()
 				}).then(res => {
 					let data = res.data
-					for(var i =0;i<res.data.length;i++){
-						res.data[i].gmtUpdate=formatDate(Date.parse(res.data[i].gmtUpdate))
-					}
 					that.newsInfo = data
 					uni.hideLoading()
 				})
@@ -466,9 +460,9 @@
 					mask:true
 				})
 				that.$api.request('news', 'getNewsInfo', {
-					category:this.category,
-					page: pages,
-					limit:limit
+					category:2,
+					page: 1,
+					limit:10
 				},failres => {
 					that.$api.msg(failres.errmsg)
 					that.isLoadMore=false
@@ -477,18 +471,8 @@
 					uni.hideLoading()
 				}).then(res => {
 					let data = res.data
-					if(data.length > 0){
-						for(var k =0;k<data.length;k++){
-							data[k].gmtUpdate=formatDate(Date.parse(data[k].gmtUpdate))
-						}
-						that.newsInfo = that.newsInfo.concat(data)
+						that.newsInfo = data
 						that.isLoadMore=false
-					}
-					else{
-						if(that.pages>1){that.pages-=1}						
-						that.isLoadMore=true
-						that.loadStatus = 'nomore'
-					}
 					uni.hideLoading()
 				})
 			}
@@ -576,6 +560,24 @@
 		font-size:26rpx;
 		font-weight:900;
 	}
+	.currectprice{
+		color:rgba(253, 113, 79, 1);
+		font-size:18px;
+		font-weight:600;
+		vertical-align: middle;
+		margin-right:10px;
+	}
+	.yesterday{
+		font-size:18px;
+		font-weight:600;
+		vertical-align: middle;
+	}
+	.yesterday.up{
+		color:rgba(253, 113, 79, 1);
+	}
+	.yesterday.down{
+		color:#22C572;
+	}
 	.positive{
 		color:#E63113;
 		font-size:26rpx;
@@ -675,13 +677,46 @@
 	.swiper-item{
 		border-radius: 5%;
 	}
-	.guess-section {
-		margin-bottom: 120rpx;
-		margin-top:20rpx;
-	}
-	.guess-section .price{
-		color:#000;
-		font-size: 34rpx;
+	.guess-section-wrap {
+		padding:15px;
+		margin:10px 5px;
+		border-radius:5px;
+		background:#fff;
+		overflow:hidden;
+	}
+	.guess-section-wrap1 {
+		margin:10px 5px;
+		border-radius:5px;
+		background:#fff;
+		overflow:hidden;
+		height:366px;
+	}
+	.guess-section-wrap-content{
+		width:1500px;
+		// display:flex;
+	}
+	.guess-section-wrap-content.port{
+		width:3000px;
+	}
+	.guess-section-wrap-item{
+		float:left;
+		width:40vw;
+		background:#F9F9FA;
+		padding:10px;
+		margin:10px;
+		border-radius:3px;
+		// width:50%;
+	}
+	.guess-section-wrap-item:first-child{
+		margin-left:2px;
+	}
+	.clearfix:after{
+		content:"";
+		display:block;
+		clear:both;
+	}
+	.guess-section-wrap .price{
+		color:#B2B3BB;
 	}
 	page {
 		background: #f5f5f5;

+ 539 - 0
pages/sale/newsinfo.vue

@@ -0,0 +1,539 @@
+<template>
+	<view>
+		<view class="guess-section-wrap1">
+			<view class='guess-section-wrap-content'>
+				<view style='margin:15px;background:#fff;padding:15px;border-radius:5px;' class='flex justify-between'  v-for='(item, index) in newsInfo' :key="index" @click="navToDetailPage(item.id)">
+					<view style='margin-right:10px;'>
+						<view style='font-size:16px;height:54px;'>{{item.title}}</view>
+						<view style='color:#B2B3BB;font-size:12px;'><text style='margin-right:5px;'>{{item.from}}</text>{{item.gmtUpdate}}</view>
+					</view>
+					<view><image style='width:100px;height:72px;border-radius:5px;' :src='item.titleImg'></image></view>
+				</view>
+				
+			</view>
+			<view v-show="isLoadMore">
+			    <uni-load-more :status="loadStatus" ></uni-load-more>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+			mapState
+		} from 'vuex';
+	export default {
+			name: "sale",
+			data() {
+				return {
+					titleNViewBackground: '',
+					swiperCurrent: 0,
+					swiperLength: 0,
+					carouselList: [],
+					windowSpuList: [],
+					categoryPickList: [],
+					categoryButtomList: [],
+					salesTop: [],
+					saleInfo: [],
+					portInfo: [],
+					banner: undefined,
+					isVip: false,
+					pages: 1, //页数
+					limit: 10, //每次取条目数
+					loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+					isLoadMore: false, //是否加载中
+					showTran:true,
+					list: [],
+					scrollTop: 0,
+					cardCur: 0,
+			        dotStyle: false,
+					newsInfo: [],
+					categoryList:[],
+					pages:1,//页数
+					limit:10 ,//每次取条目数
+					loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+					TabCur: 0,
+					category:0,
+					current: 0,
+					infoList1:[]
+				};
+			},
+			onReady() {
+			},
+			onShow() {
+				uni.showTabBar()
+				this.pages = 1
+				this.isLoadMore = false
+				this.loadStatus = 'more'
+				this.loadData()
+			},
+			onLoad(options) {
+				var that = this
+				var infoList = [];
+				uni.request({
+				    url: "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207,A0,A2109,A2111,A2201,A2203,A2205,A2207",
+				    // url: "https://hq.sinajs.cn/list=C2109",
+				    header: {
+				        'content-type': 'application/x-www-form-urlencoded'
+				    },
+				    success: function(result) {
+				        // resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑
+						var tmp = result.data.split('"')
+						for(var i = 1; i<tmp.length;i=i+2){
+							var list = tmp[i].split(",")
+							var data = {
+								goodsName:list[0],
+								newPrice:list[6],
+								openPrice:list[2]
+							}
+							if(data.goodsName){
+								infoList.push(data)
+							}
+						}
+						let name = 'infoList';
+						let value = infoList;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						// console.log("infoList",infoList)
+				    },
+				    fail: function(e) {
+				        console.log('error in...')
+				        // reject调用后,即可传递到调用方使用catch或者async+await同步方式进行处理逻辑
+				        reject(e)
+				    },
+				})
+			},
+			onPageScroll(e) {
+				this.scrollTop = e.scrollTop;
+			},
+			onReachBottom() { //上拉触底函数
+				if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+					this.isLoadMore = true
+					this.pages += 1
+					this.getIndexSaleData()
+				}
+			},
+			onPullDownRefresh() {
+				this.pages = 1
+				this.isLoadMore = false
+				this.loadStatus = 'loading'
+				this.loadData()
+			},
+			computed: {
+				...mapState(['hasLogin', 'userInfo'])
+			},
+			methods: {
+				
+				DotStyle(e) {
+					this.dotStyle = e.detail.value
+				},
+				cardSwiper(e) {
+					this.cardCur = e.detail.current
+				},
+				hangqing() {
+					uni.navigateTo({
+						url: `/pageB/news/news`
+					})
+				},
+				tabSelect(e) {
+					this.TabCur = e.currentTarget.dataset.id;
+					this.category = this.TabCur
+					this.pages = 1
+					this.loadData()
+				},
+				 //回到顶部
+				  goTop(e) {  // 一键回到顶部
+				  console.log(e)
+				    if (wx.pageScrollTo) {
+				      wx.pageScrollTo({
+				        scrollTop: 0
+				      })
+				    } else {
+				      wx.showModal({
+				        title: '提示',
+				        content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+				      })
+				    }
+				  },
+				async loadData() {
+					var that=this
+					// 新闻内容
+					that.$api.request('news', 'getNewsInfo',{
+						category:2,
+						page: this.pages,
+						limit:this.limit
+					}, failres => {
+						that.$api.msg(failres.errmsg)
+						this.isLoadMore = false
+						this.loadStatus = 'nomore'
+						if(this.pages>1){this.pages=1}
+						uni.hideLoading()
+					}).then(res => {
+						let data = res.data
+						that.newsInfo = data
+						uni.hideLoading()
+					})
+					
+				},
+				//轮播图切换修改背景色
+				swiperChange(e) {
+					const index = e.detail.current;
+					this.swiperCurrent = index;
+					// this.titleNViewBackground = this.carouselList[index].color;
+				},
+				//详情
+				navToDetailPage(item) {
+					let id = item;
+					uni.navigateTo({
+						url: `/pageB/news/news_detail?id=${id}`
+					})
+				},
+				naviageToPage(page) {
+					uni.navigateTo({
+						url: page,
+						fail() {
+							uni.switchTab({
+								url: page
+							})
+						}
+					})
+				},
+				getIndexSaleData() {
+					// const that = this
+					// var pages = that.pages
+					// var limit = that.limit
+					// uni.showLoading({
+					// 	title: '正在加载'
+					// })
+					// that.$api.request('integral', 'getIndexSaleData', {
+					// 	page: pages,
+					// 	limit: limit
+					// }, failres => {
+					// 	that.$api.msg(failres.errmsg)
+					// 	that.isLoadMore = false
+					// 	that.loadStatus = 'nomore'
+					// 	if (that.pages > 1) {
+					// 		that.pages -= 1
+					// 	}
+					// 	uni.hideLoading()
+					// }).then(res => {
+					// 	let data = res.data
+					// 	//销售信息
+					// 	if (data.saleInfo.length > 0 ) {
+					// 		that.saleInfo = that.saleInfo.concat(data.saleInfo)
+					// 		that.isLoadMore = false
+					// 	} else {
+					// 		if (that.pages > 1) {
+					// 			that.pages -= 1
+					// 		}
+					// 		that.isLoadMore = true
+					// 		that.loadStatus = 'nomore'
+					// 	}
+					// 	if(data.saleInfo.length < that.limit){
+					// 		if (that.pages > 1) {
+					// 			that.pages -= 1
+					// 		}
+					// 		that.isLoadMore = true
+					// 		that.loadStatus = 'nomore'
+					// 	}
+					// 	uni.hideLoading()
+					// })
+					const that = this
+					var pages=that.pages
+					var limit=that.limit
+								   
+					uni.showLoading({
+						title: '正在加载',
+						mask:true
+					})
+					that.$api.request('news', 'getNewsInfo', {
+						category:this.category,
+						page: pages,
+						limit:limit
+					},failres => {
+						that.$api.msg(failres.errmsg)
+						that.isLoadMore=false
+						that.loadStatus = 'nomore'
+						if(that.pages>1){that.pages-=1}
+						uni.hideLoading()
+					}).then(res => {
+						let data = res.data
+						if(data.length > 0){
+							for(var k =0;k<data.length;k++){
+								data[k].gmtUpdate=formatDate(Date.parse(data[k].gmtUpdate))
+							}
+							that.newsInfo = that.newsInfo.concat(data)
+							that.isLoadMore=false
+						}
+						else{
+							if(that.pages>1){that.pages-=1}						
+							that.isLoadMore=true
+							that.loadStatus = 'nomore'
+						}
+						uni.hideLoading()
+					})
+				}
+	
+			},
+	
+			// #ifndef MP
+			// 标题栏input搜索框点击
+			onNavigationBarSearchInputClicked: async function(e) {
+				uni.navigateTo({
+					url: '/pageA/product/search'
+				})
+			},
+			//点击导航栏 buttons 时触发
+			// onNavigationBarButtonTap(e) {
+			// 	const index = e.index;
+			// 	if (index === 0) {
+			// 		this.$api.msg('点击了扫描');
+			// 	} else if (index === 1) {
+			// 		// #ifdef APP-PLUS
+			// 		const pages = getCurrentPages();
+			// 		const page = pages[pages.length - 1];
+			// 		const currentWebview = page.$getAppWebview();
+			// 		currentWebview.hideTitleNViewButtonRedDot({
+			// 			index
+			// 		});
+			// 		// #endif
+			// 		uni.navigateTo({
+			// 			url: '/pages/notice/notice'
+			// 		})
+			// 	}
+			// }
+			// #endif
+		}
+</script>
+
+<style>
+	.price{
+		color:#FD714F;
+	}
+	.container{
+			margin: 10rpx 10rpx 10rpx 10rpx;
+		}
+		.cu-tag.badge {
+		    right: 26rpx;
+		}
+		.up,.down{
+			width: 7.5px;
+			height: 9px;
+			position:relative;
+			top:-2px;
+			vertical-align: middle;
+			margin-right: 2px;
+		}
+		.gird-left,.gird-right{
+			
+		}
+		.cu-tag.radius[class*="line"]::after {
+	    border-radius: 66rpx;
+		}
+		.goTop{
+		  height: 32px;
+		  width: 32px;
+		  position: fixed;
+		  bottom: 200rpx;
+		  right: 30rpx;
+		  border-radius: 50%;
+		}
+		.goTop image{
+			width:32px;
+			height:32px;
+		}
+		.flex{
+			display:flex;
+		}
+		.text-white{
+			color:#fff;
+		}
+		.cu-card{
+			border-bottom:1rpx solid #f8f8f8;
+			text-align: center;
+		}
+		.factory{
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.positive{
+			color:#FD714F;
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.negative{
+			color:#22C572;
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.wrap{
+			font-size:20rpx;
+			color: rgba(0,0,0,0.5);
+		}
+		.align-center{
+			align-items: center;
+		}
+		.flex-direction-row{
+			flex-direction:row;
+		}
+		.factoryItem{
+			padding: 20rpx 0;
+		}
+		/* #ifdef MP */
+		.mp-search-box {
+			// position:relative;
+			left: 0;
+			top: 30upx;
+			z-index: 9999;
+			width: 100%;
+			padding: 0 80upx;
+			background: rgba(255, 170, 0, 0.6);
+	
+			.ser-input {
+				flex: 1;
+				height: 56upx;
+				line-height: 56upx;
+				text-align: center;
+				font-size: 28upx;
+				color: $font-color-base;
+				border-radius: 10px;
+				background: rgba(255, 255, 255, .6);
+			}
+		}
+		.desc{
+		    width:73%;
+			margin-right:2%;
+		}
+	    .justify-between{
+			justify-content: space-between;
+		}
+		page {
+			.cate-section {
+				position: relative;
+				z-index: 5;
+				border-radius: 16upx 16upx 0 0;
+				margin-top: -20upx;
+			}
+	
+			.carousel-section {
+				padding: 0;
+	
+				.titleNview-placing {
+					padding-top: 0;
+					height: 0;
+				}
+	
+				.carousel {
+					.carousel-item {
+						padding: 0;
+					}
+				}
+	
+				.swiper-dots {
+					left: 50%;
+					bottom: 5upx;
+					transform: translateX(-50%);
+				}
+			}
+		}
+	
+		/* #endif */
+		.cuIcon-notification::before{
+			color:#f37b1;
+		}
+		.cu-card.article>.cu-item .content>image {
+		    height: 3.4em;
+			margin-right: 0rpx;
+			margin-top: 24rpx;
+		}
+		.screen-swiper.price-swiper{
+			height:70rpx;
+			min-height: 70rpx;
+			background: #fff;
+			margin-bottom: 10px;
+		}
+		.swiper-item{
+			border-radius: 5%;
+		}
+		.guess-section {
+			margin-bottom: 120rpx;
+			margin-top:20rpx;
+		}
+		.guess-section .price{
+			color:#FD714F;
+			font-size: 34rpx;
+			font-weight:600;
+		}
+		page {
+			background: #f5f5f5;
+		}
+	
+		.m-t {
+			margin-top: 16upx;
+		}
+		
+		/* 销售信息 */
+		.introduce-section {
+			background: #fff;
+			padding: 20upx 30upx;
+			padding-bottom: 100upx;
+			.guess-item {
+				padding-bottom: 20upx;
+				border-bottom: 1px solid #ccc;
+			}
+			.title {
+				font-size: 28upx;
+				color: $font-color-dark;
+				font-weight:bold;
+				height: 50upx;
+				line-height: 50upx;
+				flex:2.5;
+			}
+			.title-tip {
+				flex:1;
+			}
+			.price-box {
+				display: flex;
+				align-items: baseline;
+				height: 70upx;
+				padding: 10upx 0;
+				font-size: 26upx;
+				color: $uni-color-primary;
+			}
+		
+			.price {
+				font-size: $font-lg + 2upx;
+			}
+		
+			.m-price {
+				margin: 0 12upx;
+				color: $font-color-light;
+				text-decoration: line-through;
+			}
+		
+			.coupon-tip {
+				align-items: center;
+				padding: 4upx 10upx;
+				background: $uni-color-primary;
+				font-size: $font-sm;
+				color: #fff;
+				border-radius: 6upx;
+				line-height: 1;
+				transform: translateY(-4upx);
+			}
+		
+			.bot-row {
+				display: flex;
+				align-items: center;
+				height: 50upx;
+				font-size: $font-sm;
+				color: $font-color-light;
+		
+				view {
+					flex: 1;
+				}
+			}
+		}
+</style>

+ 564 - 0
pages/sale/plant.vue

@@ -0,0 +1,564 @@
+<template>
+	<view>
+		<view class="guess-section">
+					<view class="cu-card article no-card" style='width: 100%;'>
+						<view class="cu-item shadow factoryItem factorytitle flex justify-between align-center">
+							<view style='flex:1;color:#B2B3BB;'>工厂</view>
+							<view style='flex:1;color:#B2B3BB;'>价格</view>
+							<view style='flex:1;color:#B2B3BB;'>较昨日</view>
+						</view>
+					</view>
+					<view
+						v-for="(item, index) in newsInfo" :key="index"
+						class="guess-item">
+						<view class="cu-card article no-card"  >
+							<view class="cu-item shadow factoryItem flex justify-between align-center">
+								<view style='flex:1;'>
+									<view class='factory'>{{item.factory}}</view>
+									<view class='wrap'>{{item.city}} {{item.factoryType}}</view>
+								</view>
+								<view style='flex:1;' class='price'>{{item.price}}</view>
+								<view style='flex:1;' class='positive' v-if='item.comparePrice>0'><image class='up' src='../../static/img/homepage/shangsheng.png'>{{item.comparePrice}}</image></view>
+								<view style='flex:1;' class='negative' v-if='item.comparePrice<0'><image class='down' src='../../static/img/homepage/xiajiang.png'>{{-item.comparePrice}}</image></view>
+								<view style='flex:1;font-weight:900;' v-if='item.comparePrice==0'>-</view>
+							</view>
+						</view>
+					</view>
+					<view v-show="isLoadMore">
+					    <uni-load-more :status="loadStatus" ></uni-load-more>
+					</view>
+				</view>
+	</view>
+</template>
+
+<script>
+	import {
+			mapState
+		} from 'vuex';
+	export default {
+			name: "sale",
+			data() {
+				return {
+					titleNViewBackground: '',
+					swiperCurrent: 0,
+					swiperLength: 0,
+					carouselList: [],
+					windowSpuList: [],
+					categoryPickList: [],
+					categoryButtomList: [],
+					salesTop: [],
+					saleInfo: [],
+					portInfo: [],
+					banner: undefined,
+					isVip: false,
+					pages: 1, //页数
+					limit: 10, //每次取条目数
+					loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+					isLoadMore: false, //是否加载中
+					showTran:true,
+					list: [],
+					scrollTop: 0,
+					cardCur: 0,
+			        dotStyle: false,
+					newsInfo: [],
+					categoryList:[],
+					pages:1,//页数
+					limit:10 ,//每次取条目数
+					loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+					TabCur: 0,
+					category:0,
+					current: 0,
+					infoList1:[]
+				};
+			},
+			onReady() {
+			},
+			onShow() {
+				uni.showTabBar()
+				this.pages = 1
+				this.isLoadMore = false
+				this.loadStatus = 'more'
+				this.loadData()
+			},
+			onLoad(options) {
+				var that = this
+				var infoList = [];
+				uni.request({
+				    url: "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207,A0,A2109,A2111,A2201,A2203,A2205,A2207",
+				    // url: "https://hq.sinajs.cn/list=C2109",
+				    header: {
+				        'content-type': 'application/x-www-form-urlencoded'
+				    },
+				    success: function(result) {
+				        // resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑
+						var tmp = result.data.split('"')
+						for(var i = 1; i<tmp.length;i=i+2){
+							var list = tmp[i].split(",")
+							var data = {
+								goodsName:list[0],
+								newPrice:list[6],
+								openPrice:list[2]
+							}
+							if(data.goodsName){
+								infoList.push(data)
+							}
+						}
+						let name = 'infoList';
+						let value = infoList;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						// console.log("infoList",infoList)
+				    },
+				    fail: function(e) {
+				        console.log('error in...')
+				        // reject调用后,即可传递到调用方使用catch或者async+await同步方式进行处理逻辑
+				        reject(e)
+				    },
+				})
+			},
+			onPageScroll(e) {
+				this.scrollTop = e.scrollTop;
+			},
+			onReachBottom() { //上拉触底函数
+				if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+					this.isLoadMore = true
+					this.pages += 1
+					this.getIndexSaleData()
+				}
+			},
+			onPullDownRefresh() {
+				this.pages = 1
+				this.isLoadMore = false
+				this.loadStatus = 'loading'
+				this.loadData()
+			},
+			computed: {
+				...mapState(['hasLogin', 'userInfo'])
+			},
+			methods: {
+				
+				DotStyle(e) {
+					this.dotStyle = e.detail.value
+				},
+				cardSwiper(e) {
+					this.cardCur = e.detail.current
+				},
+				hangqing() {
+					uni.navigateTo({
+						url: `/pageB/news/news`
+					})
+				},
+				tabSelect(e) {
+					this.TabCur = e.currentTarget.dataset.id;
+					this.category = this.TabCur
+					this.pages = 1
+					this.loadData()
+				},
+				 //回到顶部
+				  goTop(e) {  // 一键回到顶部
+				  console.log(e)
+				    if (wx.pageScrollTo) {
+				      wx.pageScrollTo({
+				        scrollTop: 0
+				      })
+				    } else {
+				      wx.showModal({
+				        title: '提示',
+				        content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+				      })
+				    }
+				  },
+				async loadData() {
+					var that=this
+					var _gp=''
+	                var _mt=''
+					if(this.TabCur==0){
+						_gp='news'
+						_mt='getFactoryPriceInfo'
+					}else if(this.TabCur==1){
+						_gp='news'
+						_mt='getPortPriceInfo'
+					}else if(this.TabCur==2){
+						_gp='news'
+						_mt='getNewsInfo'
+					}
+					// 新闻内容
+					that.$api.request(_gp, _mt,{
+						category:this.category,
+						page: this.pages,
+						limit:this.limit
+					}, failres => {
+						that.$api.msg(failres.errmsg)
+						this.isLoadMore = false
+						this.loadStatus = 'nomore'
+						if(this.pages>1){this.pages=1}
+						uni.hideLoading()
+					}).then(res => {
+						let data = res.data
+						that.newsInfo = data
+						uni.hideLoading()
+					})
+					
+				},
+				//轮播图切换修改背景色
+				swiperChange(e) {
+					const index = e.detail.current;
+					this.swiperCurrent = index;
+					// this.titleNViewBackground = this.carouselList[index].color;
+				},
+				//详情
+				navToDetailPage(item) {
+					let id = item;
+					uni.navigateTo({
+						url: `/pageB/news/news_detail?id=${id}`
+					})
+				},
+				naviageToPage(page) {
+					uni.navigateTo({
+						url: page,
+						fail() {
+							uni.switchTab({
+								url: page
+							})
+						}
+					})
+				},
+				getIndexSaleData() {
+					// const that = this
+					// var pages = that.pages
+					// var limit = that.limit
+					// uni.showLoading({
+					// 	title: '正在加载'
+					// })
+					// that.$api.request('integral', 'getIndexSaleData', {
+					// 	page: pages,
+					// 	limit: limit
+					// }, failres => {
+					// 	that.$api.msg(failres.errmsg)
+					// 	that.isLoadMore = false
+					// 	that.loadStatus = 'nomore'
+					// 	if (that.pages > 1) {
+					// 		that.pages -= 1
+					// 	}
+					// 	uni.hideLoading()
+					// }).then(res => {
+					// 	let data = res.data
+					// 	//销售信息
+					// 	if (data.saleInfo.length > 0 ) {
+					// 		that.saleInfo = that.saleInfo.concat(data.saleInfo)
+					// 		that.isLoadMore = false
+					// 	} else {
+					// 		if (that.pages > 1) {
+					// 			that.pages -= 1
+					// 		}
+					// 		that.isLoadMore = true
+					// 		that.loadStatus = 'nomore'
+					// 	}
+					// 	if(data.saleInfo.length < that.limit){
+					// 		if (that.pages > 1) {
+					// 			that.pages -= 1
+					// 		}
+					// 		that.isLoadMore = true
+					// 		that.loadStatus = 'nomore'
+					// 	}
+					// 	uni.hideLoading()
+					// })
+					const that = this
+					var pages=that.pages
+					var limit=that.limit
+								   
+					uni.showLoading({
+						title: '正在加载',
+						mask:true
+					})
+					that.$api.request('news', 'getNewsInfo', {
+						category:this.category,
+						page: pages,
+						limit:limit
+					},failres => {
+						that.$api.msg(failres.errmsg)
+						that.isLoadMore=false
+						that.loadStatus = 'nomore'
+						if(that.pages>1){that.pages-=1}
+						uni.hideLoading()
+					}).then(res => {
+						let data = res.data
+						if(data.length > 0){
+							for(var k =0;k<data.length;k++){
+								data[k].gmtUpdate=formatDate(Date.parse(data[k].gmtUpdate))
+							}
+							that.newsInfo = that.newsInfo.concat(data)
+							that.isLoadMore=false
+						}
+						else{
+							if(that.pages>1){that.pages-=1}						
+							that.isLoadMore=true
+							that.loadStatus = 'nomore'
+						}
+						uni.hideLoading()
+					})
+				}
+	
+			},
+	
+			// #ifndef MP
+			// 标题栏input搜索框点击
+			onNavigationBarSearchInputClicked: async function(e) {
+				uni.navigateTo({
+					url: '/pageA/product/search'
+				})
+			},
+			//点击导航栏 buttons 时触发
+			// onNavigationBarButtonTap(e) {
+			// 	const index = e.index;
+			// 	if (index === 0) {
+			// 		this.$api.msg('点击了扫描');
+			// 	} else if (index === 1) {
+			// 		// #ifdef APP-PLUS
+			// 		const pages = getCurrentPages();
+			// 		const page = pages[pages.length - 1];
+			// 		const currentWebview = page.$getAppWebview();
+			// 		currentWebview.hideTitleNViewButtonRedDot({
+			// 			index
+			// 		});
+			// 		// #endif
+			// 		uni.navigateTo({
+			// 			url: '/pages/notice/notice'
+			// 		})
+			// 	}
+			// }
+			// #endif
+		}
+</script>
+
+<style>
+	.price{
+		color:#FD714F;
+	}
+	.container{
+			margin: 10rpx 10rpx 10rpx 10rpx;
+		}
+		.cu-tag.badge {
+		    right: 26rpx;
+		}
+		.up,.down{
+			width: 7.5px;
+			height: 9px;
+			position:relative;
+			top:-2px;
+			vertical-align: middle;
+			margin-right: 2px;
+		}
+		.gird-left,.gird-right{
+			
+		}
+		.cu-tag.radius[class*="line"]::after {
+	    border-radius: 66rpx;
+		}
+		.goTop{
+		  height: 32px;
+		  width: 32px;
+		  position: fixed;
+		  bottom: 200rpx;
+		  right: 30rpx;
+		  border-radius: 50%;
+		}
+		.goTop image{
+			width:32px;
+			height:32px;
+		}
+		.flex{
+			display:flex;
+		}
+		.text-white{
+			color:#fff;
+		}
+		.cu-card{
+			border-bottom:1rpx solid #f8f8f8;
+			text-align: center;
+		}
+		.factory{
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.positive{
+			color:#FD714F;
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.negative{
+			color:#22C572;
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.wrap{
+			font-size:20rpx;
+			color: rgba(0,0,0,0.5);
+		}
+		.align-center{
+			align-items: center;
+		}
+		.flex-direction-row{
+			flex-direction:row;
+		}
+		.factoryItem{
+			padding: 20rpx 0;
+		}
+		/* #ifdef MP */
+		.mp-search-box {
+			// position:relative;
+			left: 0;
+			top: 30upx;
+			z-index: 9999;
+			width: 100%;
+			padding: 0 80upx;
+			background: rgba(255, 170, 0, 0.6);
+	
+			.ser-input {
+				flex: 1;
+				height: 56upx;
+				line-height: 56upx;
+				text-align: center;
+				font-size: 28upx;
+				color: $font-color-base;
+				border-radius: 10px;
+				background: rgba(255, 255, 255, .6);
+			}
+		}
+		.desc{
+		    width:73%;
+			margin-right:2%;
+		}
+	    .justify-between{
+			justify-content: space-between;
+		}
+		page {
+			.cate-section {
+				position: relative;
+				z-index: 5;
+				border-radius: 16upx 16upx 0 0;
+				margin-top: -20upx;
+			}
+	
+			.carousel-section {
+				padding: 0;
+	
+				.titleNview-placing {
+					padding-top: 0;
+					height: 0;
+				}
+	
+				.carousel {
+					.carousel-item {
+						padding: 0;
+					}
+				}
+	
+				.swiper-dots {
+					left: 50%;
+					bottom: 5upx;
+					transform: translateX(-50%);
+				}
+			}
+		}
+	
+		/* #endif */
+		.cuIcon-notification::before{
+			color:#f37b1;
+		}
+		.cu-card.article>.cu-item .content>image {
+		    height: 3.4em;
+			margin-right: 0rpx;
+			margin-top: 24rpx;
+		}
+		.screen-swiper.price-swiper{
+			height:70rpx;
+			min-height: 70rpx;
+			background: #fff;
+			margin-bottom: 10px;
+		}
+		.swiper-item{
+			border-radius: 5%;
+		}
+		.guess-section {
+			margin-bottom: 120rpx;
+			margin-top:20rpx;
+		}
+		.guess-section .price{
+			color:#FD714F;
+			font-size: 34rpx;
+			font-weight:600;
+		}
+		page {
+			background: #f5f5f5;
+		}
+	
+		.m-t {
+			margin-top: 16upx;
+		}
+		
+		/* 销售信息 */
+		.introduce-section {
+			background: #fff;
+			padding: 20upx 30upx;
+			padding-bottom: 100upx;
+			.guess-item {
+				padding-bottom: 20upx;
+				border-bottom: 1px solid #ccc;
+			}
+			.title {
+				font-size: 28upx;
+				color: $font-color-dark;
+				font-weight:bold;
+				height: 50upx;
+				line-height: 50upx;
+				flex:2.5;
+			}
+			.title-tip {
+				flex:1;
+			}
+			.price-box {
+				display: flex;
+				align-items: baseline;
+				height: 70upx;
+				padding: 10upx 0;
+				font-size: 26upx;
+				color: $uni-color-primary;
+			}
+		
+			.price {
+				font-size: $font-lg + 2upx;
+			}
+		
+			.m-price {
+				margin: 0 12upx;
+				color: $font-color-light;
+				text-decoration: line-through;
+			}
+		
+			.coupon-tip {
+				align-items: center;
+				padding: 4upx 10upx;
+				background: $uni-color-primary;
+				font-size: $font-sm;
+				color: #fff;
+				border-radius: 6upx;
+				line-height: 1;
+				transform: translateY(-4upx);
+			}
+		
+			.bot-row {
+				display: flex;
+				align-items: center;
+				height: 50upx;
+				font-size: $font-sm;
+				color: $font-color-light;
+		
+				view {
+					flex: 1;
+				}
+			}
+		}
+</style>

+ 556 - 0
pages/sale/portprice.vue

@@ -0,0 +1,556 @@
+<template>
+	<view>
+		<view class="guess-section">
+					<view class="cu-card article no-card" style='width: 100%;'>
+						<view class="cu-item shadow factoryItem flex justify-between align-center">
+							<view style='flex:1.5;color:#B2B3BB;'>港口</view>
+							<view style='flex:1;color:#B2B3BB;'>价格</view>
+							<view style='flex:1;color:#B2B3BB;'>较昨日</view>
+						</view>
+					</view>
+					<view
+						v-for="(item, index) in newsInfo" :key="index"
+						class="guess-item"
+					>
+					<view class="cu-card article no-card" >
+						<view class="cu-item shadow factoryItem flex justify-between align-center">
+							<view style='flex:1.5;'><view class='factory'>{{item.port}}</view><view class='wrap'>{{item.goodsName}}</view></view>
+							<view style='flex:1;' >
+								<view class='price'>{{item.price}}</view>
+								<view class='wrap'>
+									<text style='margin-right:5px;'><image style='width:11px;height:11px;' src='../../static/img/homepage/water@3x.png'></image><={{item.waterContent}}</text>
+									<text><image style='width:11px;height:11px;' src='../../static/img/homepage/unitweight@3x.png'></image>>={{item.bulkDensity}}</text>
+								</view>
+								</view>
+							<view style='flex:1;' class='positive' v-if='item.comparePrice>0'><image class='up' src='../../static/img/homepage/shangsheng.png'>{{item.comparePrice}}</image></view>
+							<view style='flex:1;' class='negative' v-if='item.comparePrice<0'><image class='down' src='../../static/img/homepage/xiajiang.png'>{{-item.comparePrice}}</image></view>
+							<view style='flex:1;font-weight:900;' v-if='item.comparePrice==0'>-</view>
+						</view>
+					</view>
+					</view>
+					<view v-show="isLoadMore">
+					    <uni-load-more :status="loadStatus" ></uni-load-more>
+					</view>
+				</view>
+	</view>
+</template>
+
+<script>
+	import {
+			mapState
+		} from 'vuex';
+	export default {
+			name: "sale",
+			data() {
+				return {
+					titleNViewBackground: '',
+					swiperCurrent: 0,
+					swiperLength: 0,
+					carouselList: [],
+					windowSpuList: [],
+					categoryPickList: [],
+					categoryButtomList: [],
+					salesTop: [],
+					saleInfo: [],
+					portInfo: [],
+					banner: undefined,
+					isVip: false,
+					pages: 1, //页数
+					limit: 10, //每次取条目数
+					loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+					isLoadMore: false, //是否加载中
+					showTran:true,
+					list: [],
+					scrollTop: 0,
+					cardCur: 0,
+			        dotStyle: false,
+					newsInfo: [],
+					categoryList:[],
+					pages:1,//页数
+					limit:10 ,//每次取条目数
+					loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+					TabCur: 0,
+					category:0,
+					current: 0,
+					infoList1:[]
+				};
+			},
+			onReady() {
+			},
+			onShow() {
+				uni.showTabBar()
+				this.pages = 1
+				this.isLoadMore = false
+				this.loadStatus = 'more'
+				this.loadData()
+			},
+			onLoad(options) {
+				var that = this
+				var infoList = [];
+				uni.request({
+				    url: "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207,A0,A2109,A2111,A2201,A2203,A2205,A2207",
+				    // url: "https://hq.sinajs.cn/list=C2109",
+				    header: {
+				        'content-type': 'application/x-www-form-urlencoded'
+				    },
+				    success: function(result) {
+				        // resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑
+						var tmp = result.data.split('"')
+						for(var i = 1; i<tmp.length;i=i+2){
+							var list = tmp[i].split(",")
+							var data = {
+								goodsName:list[0],
+								newPrice:list[6],
+								openPrice:list[2]
+							}
+							if(data.goodsName){
+								infoList.push(data)
+							}
+						}
+						let name = 'infoList';
+						let value = infoList;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						// console.log("infoList",infoList)
+				    },
+				    fail: function(e) {
+				        console.log('error in...')
+				        // reject调用后,即可传递到调用方使用catch或者async+await同步方式进行处理逻辑
+				        reject(e)
+				    },
+				})
+			},
+			onPageScroll(e) {
+				this.scrollTop = e.scrollTop;
+			},
+			onReachBottom() { //上拉触底函数
+				if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+					this.isLoadMore = true
+					this.pages += 1
+					this.getIndexSaleData()
+				}
+			},
+			onPullDownRefresh() {
+				this.pages = 1
+				this.isLoadMore = false
+				this.loadStatus = 'loading'
+				this.loadData()
+			},
+			computed: {
+				...mapState(['hasLogin', 'userInfo'])
+			},
+			methods: {
+				
+				DotStyle(e) {
+					this.dotStyle = e.detail.value
+				},
+				cardSwiper(e) {
+					this.cardCur = e.detail.current
+				},
+				hangqing() {
+					uni.navigateTo({
+						url: `/pageB/news/news`
+					})
+				},
+				tabSelect(e) {
+					this.TabCur = e.currentTarget.dataset.id;
+					this.category = this.TabCur
+					this.pages = 1
+					this.loadData()
+				},
+				 //回到顶部
+				  goTop(e) {  // 一键回到顶部
+				  console.log(e)
+				    if (wx.pageScrollTo) {
+				      wx.pageScrollTo({
+				        scrollTop: 0
+				      })
+				    } else {
+				      wx.showModal({
+				        title: '提示',
+				        content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+				      })
+				    }
+				  },
+				async loadData() {
+					var that=this
+					// 新闻内容
+					that.$api.request('news', 'getPortPriceInfo',{
+						category:this.category,
+						page: this.pages,
+						limit:this.limit
+					}, failres => {
+						that.$api.msg(failres.errmsg)
+						this.isLoadMore = false
+						this.loadStatus = 'nomore'
+						if(this.pages>1){this.pages=1}
+						uni.hideLoading()
+					}).then(res => {
+						let data = res.data
+						that.newsInfo = data
+						uni.hideLoading()
+					})
+					
+				},
+				//轮播图切换修改背景色
+				swiperChange(e) {
+					const index = e.detail.current;
+					this.swiperCurrent = index;
+					// this.titleNViewBackground = this.carouselList[index].color;
+				},
+				//详情
+				navToDetailPage(item) {
+					let id = item;
+					uni.navigateTo({
+						url: `/pageB/news/news_detail?id=${id}`
+					})
+				},
+				naviageToPage(page) {
+					uni.navigateTo({
+						url: page,
+						fail() {
+							uni.switchTab({
+								url: page
+							})
+						}
+					})
+				},
+				getIndexSaleData() {
+					// const that = this
+					// var pages = that.pages
+					// var limit = that.limit
+					// uni.showLoading({
+					// 	title: '正在加载'
+					// })
+					// that.$api.request('integral', 'getIndexSaleData', {
+					// 	page: pages,
+					// 	limit: limit
+					// }, failres => {
+					// 	that.$api.msg(failres.errmsg)
+					// 	that.isLoadMore = false
+					// 	that.loadStatus = 'nomore'
+					// 	if (that.pages > 1) {
+					// 		that.pages -= 1
+					// 	}
+					// 	uni.hideLoading()
+					// }).then(res => {
+					// 	let data = res.data
+					// 	//销售信息
+					// 	if (data.saleInfo.length > 0 ) {
+					// 		that.saleInfo = that.saleInfo.concat(data.saleInfo)
+					// 		that.isLoadMore = false
+					// 	} else {
+					// 		if (that.pages > 1) {
+					// 			that.pages -= 1
+					// 		}
+					// 		that.isLoadMore = true
+					// 		that.loadStatus = 'nomore'
+					// 	}
+					// 	if(data.saleInfo.length < that.limit){
+					// 		if (that.pages > 1) {
+					// 			that.pages -= 1
+					// 		}
+					// 		that.isLoadMore = true
+					// 		that.loadStatus = 'nomore'
+					// 	}
+					// 	uni.hideLoading()
+					// })
+					const that = this
+					var pages=that.pages
+					var limit=that.limit
+								   
+					uni.showLoading({
+						title: '正在加载',
+						mask:true
+					})
+					that.$api.request('news', 'getNewsInfo', {
+						category:this.category,
+						page: pages,
+						limit:limit
+					},failres => {
+						that.$api.msg(failres.errmsg)
+						that.isLoadMore=false
+						that.loadStatus = 'nomore'
+						if(that.pages>1){that.pages-=1}
+						uni.hideLoading()
+					}).then(res => {
+						let data = res.data
+						if(data.length > 0){
+							for(var k =0;k<data.length;k++){
+								data[k].gmtUpdate=formatDate(Date.parse(data[k].gmtUpdate))
+							}
+							that.newsInfo = that.newsInfo.concat(data)
+							that.isLoadMore=false
+						}
+						else{
+							if(that.pages>1){that.pages-=1}						
+							that.isLoadMore=true
+							that.loadStatus = 'nomore'
+						}
+						uni.hideLoading()
+					})
+				}
+	
+			},
+	
+			// #ifndef MP
+			// 标题栏input搜索框点击
+			onNavigationBarSearchInputClicked: async function(e) {
+				uni.navigateTo({
+					url: '/pageA/product/search'
+				})
+			},
+			//点击导航栏 buttons 时触发
+			// onNavigationBarButtonTap(e) {
+			// 	const index = e.index;
+			// 	if (index === 0) {
+			// 		this.$api.msg('点击了扫描');
+			// 	} else if (index === 1) {
+			// 		// #ifdef APP-PLUS
+			// 		const pages = getCurrentPages();
+			// 		const page = pages[pages.length - 1];
+			// 		const currentWebview = page.$getAppWebview();
+			// 		currentWebview.hideTitleNViewButtonRedDot({
+			// 			index
+			// 		});
+			// 		// #endif
+			// 		uni.navigateTo({
+			// 			url: '/pages/notice/notice'
+			// 		})
+			// 	}
+			// }
+			// #endif
+		}
+</script>
+
+<style>
+	.price{
+		color:#FD714F;
+	}
+	.container{
+			margin: 10rpx 10rpx 10rpx 10rpx;
+		}
+		.cu-tag.badge {
+		    right: 26rpx;
+		}
+		.up,.down{
+			width: 7.5px;
+			height: 9px;
+			position:relative;
+			top:-2px;
+			vertical-align: middle;
+			margin-right: 2px;
+		}
+		.gird-left,.gird-right{
+			
+		}
+		.cu-tag.radius[class*="line"]::after {
+	    border-radius: 66rpx;
+		}
+		.goTop{
+		  height: 32px;
+		  width: 32px;
+		  position: fixed;
+		  bottom: 200rpx;
+		  right: 30rpx;
+		  border-radius: 50%;
+		}
+		.goTop image{
+			width:32px;
+			height:32px;
+		}
+		.flex{
+			display:flex;
+		}
+		.text-white{
+			color:#fff;
+		}
+		.cu-card{
+			border-bottom:1rpx solid #f8f8f8;
+			text-align: center;
+		}
+		.factory{
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.positive{
+			color:#FD714F;
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.negative{
+			color:#22C572;
+			font-size:26rpx;
+			font-weight:900;
+		}
+		.wrap{
+			font-size:20rpx;
+			color: rgba(0,0,0,0.5);
+		}
+		.align-center{
+			align-items: center;
+		}
+		.flex-direction-row{
+			flex-direction:row;
+		}
+		.factoryItem{
+			padding: 20rpx 0;
+		}
+		/* #ifdef MP */
+		.mp-search-box {
+			// position:relative;
+			left: 0;
+			top: 30upx;
+			z-index: 9999;
+			width: 100%;
+			padding: 0 80upx;
+			background: rgba(255, 170, 0, 0.6);
+	
+			.ser-input {
+				flex: 1;
+				height: 56upx;
+				line-height: 56upx;
+				text-align: center;
+				font-size: 28upx;
+				color: $font-color-base;
+				border-radius: 10px;
+				background: rgba(255, 255, 255, .6);
+			}
+		}
+		.desc{
+		    width:73%;
+			margin-right:2%;
+		}
+	    .justify-between{
+			justify-content: space-between;
+		}
+		page {
+			.cate-section {
+				position: relative;
+				z-index: 5;
+				border-radius: 16upx 16upx 0 0;
+				margin-top: -20upx;
+			}
+	
+			.carousel-section {
+				padding: 0;
+	
+				.titleNview-placing {
+					padding-top: 0;
+					height: 0;
+				}
+	
+				.carousel {
+					.carousel-item {
+						padding: 0;
+					}
+				}
+	
+				.swiper-dots {
+					left: 50%;
+					bottom: 5upx;
+					transform: translateX(-50%);
+				}
+			}
+		}
+	
+		/* #endif */
+		.cuIcon-notification::before{
+			color:#f37b1;
+		}
+		.cu-card.article>.cu-item .content>image {
+		    height: 3.4em;
+			margin-right: 0rpx;
+			margin-top: 24rpx;
+		}
+		.screen-swiper.price-swiper{
+			height:70rpx;
+			min-height: 70rpx;
+			background: #fff;
+			margin-bottom: 10px;
+		}
+		.swiper-item{
+			border-radius: 5%;
+		}
+		.guess-section {
+			margin-bottom: 120rpx;
+			margin-top:20rpx;
+		}
+		.guess-section .price{
+			color:#FD714F;
+			font-size: 34rpx;
+			font-weight:600;
+		}
+		page {
+			background: #f5f5f5;
+		}
+	
+		.m-t {
+			margin-top: 16upx;
+		}
+		
+		/* 销售信息 */
+		.introduce-section {
+			background: #fff;
+			padding: 20upx 30upx;
+			padding-bottom: 100upx;
+			.guess-item {
+				padding-bottom: 20upx;
+				border-bottom: 1px solid #ccc;
+			}
+			.title {
+				font-size: 28upx;
+				color: $font-color-dark;
+				font-weight:bold;
+				height: 50upx;
+				line-height: 50upx;
+				flex:2.5;
+			}
+			.title-tip {
+				flex:1;
+			}
+			.price-box {
+				display: flex;
+				align-items: baseline;
+				height: 70upx;
+				padding: 10upx 0;
+				font-size: 26upx;
+				color: $uni-color-primary;
+			}
+		
+			.price {
+				font-size: $font-lg + 2upx;
+			}
+		
+			.m-price {
+				margin: 0 12upx;
+				color: $font-color-light;
+				text-decoration: line-through;
+			}
+		
+			.coupon-tip {
+				align-items: center;
+				padding: 4upx 10upx;
+				background: $uni-color-primary;
+				font-size: $font-sm;
+				color: #fff;
+				border-radius: 6upx;
+				line-height: 1;
+				transform: translateY(-4upx);
+			}
+		
+			.bot-row {
+				display: flex;
+				align-items: center;
+				height: 50upx;
+				font-size: $font-sm;
+				color: $font-color-light;
+		
+				view {
+					flex: 1;
+				}
+			}
+		}
+</style>

BIN
static/img/homepage/shangsheng.png


BIN
static/img/homepage/unitweight.png


BIN
static/img/homepage/unitweight@2x.png


BIN
static/img/homepage/unitweight@3x.png


BIN
static/img/homepage/water.png


BIN
static/img/homepage/water@2x.png


BIN
static/img/homepage/water@3x.png


BIN
static/img/homepage/xiajiang.png