|
@@ -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;
|