Browse Source

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

gjy 3 years ago
parent
commit
c0cc001d13

+ 26 - 23
pageA/product/business_buy.vue

@@ -1,13 +1,12 @@
 <template>
-	<view class="center">
+	<view class="center Regular">
 		<view class="transaction">
-
-
 			<view class="c-row b-b">
 				<view class="title">卖方</view>
-				<view class="con-list">
+				<view class="con-list Medium">
 					<view v-if='goods.customerTypeFlag==2' class="title" @click="liang">
-						{{purchaseOrder.compName?purchaseOrder.compName:goods.compName}}&nbsp>
+						{{purchaseOrder.compName?purchaseOrder.compName:goods.compName}}
+						<u-icon name="arrow-right" color="#AFB3BF" :custom-style="{'marginLeft':'10px','marginRight':'0px'}" ></u-icon>
 					</view>
 					<view v-else class="title" @click="liang">
 						{{purchaseOrder.customer?purchaseOrder.customer:goods.customerName}}>
@@ -17,7 +16,7 @@
 			<view class="c-row">
 				<view class="title">买方</view>
 				<view class="con-list">
-					<view class="title">{{purchaseOrder.buyer}}</view>
+					<view class="title Medium">{{purchaseOrder.buyer}}</view>
 				</view>
 			</view>
 		</view>
@@ -25,7 +24,7 @@
 			<view class="c-row b-b margin-top">
 				<view class="title">收货地区</view>
 				<view class="con-list">
-					<view class="title">
+					<view class="title Medium">
 						{{purchaseOrder.receivePrivate}}{{purchaseOrder.receiveCity}}{{purchaseOrder.receiveArea}}
 					</view>
 				</view>
@@ -33,26 +32,26 @@
 			<view class="c-row b-b ">
 				<view class="title">收货库</view>
 				<view class="con-list">
-					<view class="title">{{purchaseOrder.receiveWarehouse}}</view>
+					<view class="title Medium">{{purchaseOrder.receiveWarehouse}}</view>
 				</view>
 			</view>
 			<view v-if='companyId!=2' class="c-row b-b">
 				<view class="title">货名</view>
 				<view class="con-list">
-					<text>{{purchaseOrder.goodsName}}</text>
+					<text class="Medium">{{purchaseOrder.goodsName}}</text>
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">最小成交量(吨)</view>
 				<view class="con-list">
-					<text>{{purchaseOrder.minimumVolume}}</text>
+					<text class="NumberMedium">{{purchaseOrder.minimumVolume}}</text>
 				</view>
 			</view>
 			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row">
 				<view class="title">今日基差(元/吨)</view>
 				<view class="con-list">
 					<view class="picker">
-						<text>{{purchaseOrder.basis}}</text>
+						<text class="NumberMedium">{{purchaseOrder.basis}}</text>
 					</view>
 				</view>
 			</view>
@@ -61,7 +60,7 @@
 				<view class="title">采购单价(元/吨)</view>
 				<view class="con-list">
 					<view class="picker">
-						<text>{{purchaseOrder.procurementPrice}}</text>
+						<text class="NumberMedium">{{purchaseOrder.procurementPrice}}</text>
 					</view>
 				</view>
 			</view>
@@ -69,56 +68,58 @@
 		<view class="transaction">
 			<view class="c-row b-b margin-top">
 				<view class="title">发票类型</view>
-				<view class="con-list">
+				<view class="con-list Medium">
 					<picker @change="invoiceChange" :value="invoiceIndex" :range="invoiceType">
 						<view class="picker">
 							{{invoiceIndex>-1?invoiceType[invoiceIndex]:'请选择'}}
 						</view>
 					</picker>
 				</view>
+				<u-icon name="arrow-right" color="#AFB3BF" :custom-style="{'marginLeft':'10px','marginRight':'0px'}" ></u-icon>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">出售数量(吨)</view>
-				<view class="con-list">
+				<view class="con-list NumberMedium">
 					<input v-model='purchaseOrder.transactionsNumber' type="number" placeholder="请填写出售数量"
 						placeholder-style="font-size: 12px;" name="input"></input>
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">包装方式</view>
-				<view class="con-list">
+				<view class="con-list Medium">
 					<picker @change="packingChange" :value="packingIndex" :range="packingType">
 						<view class="picker">
 							{{packingIndex>-1?packingType[packingIndex]:'请选择'}}
 						</view>
 					</picker>
 				</view>
+				<u-icon name="arrow-right" color="#AFB3BF" :custom-style="{'marginLeft':'10px','marginRight':'0px'}" ></u-icon>
 			</view>
 			<view v-if='packingIndex!=0' class=" beizhu align-start">
 				<view class="title">袋装备注</view>
 				<view>
 					<textarea maxlength="-1" v-model='purchaseOrder.baggingNotes'
 						placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" placeholder-style="font-size: 12px;"
-						class="textareas"></textarea>
+						class="textareas Medium"></textarea>
 				</view>
 			</view>
 			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
 				<view class="title">点价(元/吨)</view>
-				<view class="con-list">
+				<view class="con-list NumberMedium">
 					<input placeholder="请填写点价" name="input" type="number" placeholder-style="font-size: 12px;"
 						@input='someprice' v-model="purchaseOrder.pointPrice"></input>
 				</view>
 			</view>
 			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
 				<view class="title">发票费用(元/吨)</view>
-				<view class="con-list">
+				<view class="con-list NumberMedium">
 					<input disabled placeholder="请填写发票费用" name="input" @input='someprice'
 						v-model="purchaseOrder.invoiceFee"></input>
 				</view>
 			</view>
 			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
 				<view class="title">包装费(元/吨)</view>
-				<view class="con-list">
+				<view class="con-list NumberMedium">
 					<input placeholder="请填写包装费" name="input" placeholder-style="font-size: 12px;" @input='someprice' v-model="packingFee"></input>
 					
 				</view>
@@ -126,8 +127,11 @@
 			<view v-if="purchaseOrder.procurementPlanType=='期货'" class=" align-start ">
 				<view class="titles">结算价格</view>
 				<text class="textA">结算价格=点价+基差+发票费用+包装费</text>
-				<text
-					style="font-size: 18px;color: #FD714F;margin-left: 25px;">¥{{purchaseOrder.settlementPrice}}</text>
+				<text style="color:#FD714F;margin-left: 25px;">
+					<text  style="font-size:26rpx;">¥</text>
+					<text style="font-size:42rpx;" class="NumberMedium">{{purchaseOrder.settlementPrice}}</text>
+				</text>
+				
 				<!-- <input placeholder="请填写 例:袋装XX斤/散装" name="input" @input='packingInput' v-model="purchaseOrder.settlementPrice"></input> -->
 			</view>
 		</view>
@@ -530,14 +534,13 @@
 		color: #303133;
 		line-height: 40rpx;
 		text-align: right;
-		padding-right: 20rpx;
 	}
 
 	.transaction {
 		background-color: #FFFFFF;
 		margin-top: 10px;
 		padding-bottom: 10px;
-		border-radius: 20px;
+		border-radius: 20rpx;
 	}
 
 	.btn {

+ 10 - 9
pageA/product/business_sale.vue

@@ -105,15 +105,16 @@
 			<input disabled placeholder="请填写发票费用" placeholder-style="font-size: 12px;" name="input" @input='someprice' v-model="purchaseOrder.invoiceFee"></input>
 			</view>
 		</view>
-		<view  v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
+		<!-- <view  v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
 			<view class="title">包装费(元/吨)</view>
 			<view class="con-list">
 		<input placeholder="请填写包装费" name="input" type="number" placeholder-style="font-size: 12px;" @input='someprice' v-model="purchaseOrder.packingFee"></input>
 		</view>
-		</view>
+		</view> -->
 		<view  v-if="purchaseOrder.salePlanType=='期货'" class=" align-start ">
 			<view class="titles">结算价格</view>
-			<text class="textA">结算价格=点价+基差+发票费用+包装费</text>
+			<text class="textA">结算价格=点价+基差+发票费用</text>
+			<!-- <text class="textA">结算价格=点价+基差+发票费用+包装费</text> -->
 			<text style="font-size: 18px;color: #FD714F;margin-left: 25px;">¥{{purchaseOrder.settlementPrice}}</text>
 			<!-- <input placeholder="请填写 例:袋装XX斤/散装" name="input" @input='packingInput' v-model="purchaseOrder.settlementPrice"></input> -->
 		</view>
@@ -294,14 +295,14 @@
 							if(this.purchaseOrder.pointPrice.split(".")[1].length>2){
 								this.$api.msg('点价输入错误')
 								return
+							}
 						}
+						// this.purchaseOrder.packingFee=-this.purchaseOrder.packingFee
+						// if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
+						// 	this.$api.msg('包装费输入错误')
+						// 	return
+						// }
 					}
-					this.purchaseOrder.packingFee=-this.purchaseOrder.packingFee
-					if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
-						this.$api.msg('包装费输入错误')
-						return
-					}
-				}
 					if(!this.purchaseOrder.customer){
 						if(this.goods.customerTypeFlag==1){
 							this.purchaseOrder.customer=this.goods.customerName

+ 1 - 5
pageA/product/detail.vue

@@ -407,11 +407,7 @@
 					this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
 						if(res.data.code==200){
 							uni.navigateTo({
-								url: `/pageA/product/business_buy?id=${this.goods.id}&receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}
-										&goodsName=${this.goods.goodsName}&receiveCity=${this.goods.receiveCity}&receivePrivate=${this.goods.receivePrivate}&buyer=${this.goods.buyer}
-										&basisPrice=${this.goods.basisPrice}&procurementPrice=${this.goods.procurementPrice}&receiveWarehouse=${this.goods.receiveWarehouse}
-										&procurementPlanType=${this.goods.procurementPlanType}&procurementPlan=${this.goods.procurementPlanNo}&compId=${this.goods.compId}
-										&invoiceFeeCompany=${this.goods.invoiceFeeCompany}&invoiceFeePerson=${this.goods.invoiceFeePerson}`
+								url: `/pageA/product/business_buy?id=${this.goods.id}&receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}&goodsName=${this.goods.goodsName}&receiveCity=${this.goods.receiveCity}&receivePrivate=${this.goods.receivePrivate}&buyer=${this.goods.buyer}&basisPrice=${this.goods.basisPrice}&procurementPrice=${this.goods.procurementPrice}&receiveWarehouse=${this.goods.receiveWarehouse}&procurementPlanType=${this.goods.procurementPlanType}&procurementPlan=${this.goods.procurementPlanNo}&compId=${this.goods.compId}&invoiceFeeCompany=${this.goods.invoiceFeeCompany}&invoiceFeePerson=${this.goods.invoiceFeePerson}`
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}
 							// 	&companyId=${this.goods.companyId}&sellerPhone=${this.goods.sellerPhone}&minSale=${this.goods.minSale}

+ 445 - 264
pageA/product/lookup.vue

@@ -1,68 +1,80 @@
 <template>
 	<view class="content">
-		
-			<view style='background:#fff;display:flex;' class="cu-bar search">
-			<view style='flex:6;' class="search-form round Medium" >
+
+		<view style='background:#fff;display:flex;' class="cu-bar search">
+			<view style='flex:6;' class="search-form round Medium">
 				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-				<input type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()" @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
-				
+				<input type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()"
+					@input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
 			</view>
 			<view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
-			<text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text>
-			</view>
-			<!-- mSearch组件 如果使用原样式,删除组件元素-->
-			<!-- <mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword" @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch> -->
-			<!-- 原样式 如果使用原样式,恢复下方注销代码 -->
-			<!-- 			
+			<u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34" name="close-circle-fill" color="#D6D9E0"></u-icon>
+			<!-- <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text> -->
+		</view>
+		<!-- mSearch组件 如果使用原样式,删除组件元素-->
+		<!-- <mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword" @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch> -->
+		<!-- 原样式 如果使用原样式,恢复下方注销代码 -->
+		<!-- 			
 			<view class="input-box">
 				<input type="text" :placeholder="defaultKeyword" @input="inputChange" v-model="keyword" @confirm="doSearch(false)"
 				 placeholder-class="placeholder-class" confirm-type="search">
 			</view>
 			<view class="search-btn" @tap="doSearch(false)">搜索</view> 
 			-->
-			<!-- 原样式 end -->
+		<!-- 原样式 end -->
 		<view class="search-keyword" @touchstart="blur">
-			<scroll-view style='background:#F5F6FA;' class="keyword-list-box" v-show="isShowKeywordList&&keywordList.length>0" scroll-y>
-				<view style='background:#fff;padding:0 15px;'>
+			<scroll-view style='background:#F5F6FA;' class="keyword-list-box"
+				v-show="isShowKeywordList&&keywordList.length>0" scroll-y>
+				<view style='background:#fff;padding:0 15px;border-radius:0rpx 0rpx 30rpx 30rpx;' class="Semibold">
 					<view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
-					<view @click='tabcarchange(1)' class='line'  :class='TabCur==1?"active":""'>销售</view>
+					<view @click='tabcarchange(1)' class='line' :class='TabCur==1?"active":""'>销售</view>
 				</view>
 				<view class="introduce-section">
-					<view v-for="(item, index) in keywordList" :key="index" class="guess-item" @click="navToDetailPage(item)">
+					<view v-for="(item, index) in keywordList" :key="index" class="guess-item"
+						@click="navToDetailPage(item)">
 						<view class="price-box">
-							<view class="title">{{item.title}}</view>
-							<view style='dsiplay:flex;' class='flex justify-between'>
+							<view class="title Medium">{{item.title}}</view>		
+							<view class='flex justify-between align-item-center Regular'>
 								<view v-if='TabCur==0' class='address'>
 									{{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}{{item.receiveWarehouse}}
 								</view>
 								<view v-if='TabCur==1' class='address'>
 									{{item.sendPrivate}}{{item.sendCity}}{{item.sendArea}}{{item.sendWarehouse}}
 								</view>
-								<view class='price' v-if='item.procurementPlanType=="期货"'>{{item.basisPrice}}<text
-										style='font-size:13px;color:#333333;'>元/吨</text></view>
-								<view class='price' v-if='item.procurementPlanType=="现货"'>{{item.unitPrice}}<text
-										style='font-size:13px;color:#333;'>元/吨</text></view>
-								<view class='price' v-if='item.salePlanType=="期货"'>{{item.basisPrice}}<text
-									style='font-size:13px;color:#333333;'>元/吨</text></view>
-								<view class='price' v-if='item.salePlanType=="现货"'>{{item.unitPrice}}<text
-									style='font-size:13px;color:#333;'>元/吨</text></view>
+								<view class='price NumberBold' v-if='item.procurementPlanType=="期货"'>
+									<text class="number-style">{{item.basisPrice}}</text><text style='font-size:13px;color:#333333;'
+										class="Semibold">元/吨</text></view>
+								<view class='price NumberBold' v-if='item.procurementPlanType=="现货"'>
+									<text class="number-style">{{item.procurementPrice}}</text><text style='font-size:13px;color:#333;'
+										class="Semibold">元/吨</text></view>
+								<view class='price NumberBold' v-if='item.salePlanType=="期货"'><text class="number-style">+{{item.basisPrice}}</text><text
+										style='font-size:13px;color:#333333;' class="Semibold">元/吨</text></view>
+								<view class='price NumberBold' v-if='item.salePlanType=="现货"'><text class="number-style">{{item.salePrice}}</text><text
+										style='font-size:13px;color:#333;' class="Semibold">元/吨</text></view>
 							</view>
 						</view>
-						<view class='flex justify-between'>
-							<view>
-								<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="现货"'>现货</view>
-								<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="期货"'>期货</view>
-								<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="现货"'>现货</view>
-								<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="期货"'>期货</view>
-								<view class='tag1 tag-yellow radius line-green'>{{item.goodsName}}</view>
-								<view class='tag1 tag-red radius line-yellow'>{{item.weight}}吨</view>
-							</view>
-							<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货"'>今日基差</view>
-							<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货"'>采购价格</view>
-							<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="期货"'>今日基差</view>
-							<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="现货"'>采购价格</view>
+				<view class='flex justify-between Regular'>
+					<view class="Regular">
+						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="现货"'>现货</view>
+						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="期货"'>期货</view>
+						<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="现货"'>现货</view>
+						<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="期货"'>期货</view>
+						<view class='tag1 tag-yellow radius line-green'>{{item.goodsName}}</view>
+						<view class='tag1 tag-red radius line-yellow' v-if="TabCur== 0">{{item.plannedPurchaseVolume}}吨
+						</view>
+						<view class='tag1 tag-red radius line-yellow' v-if="TabCur== 1">{{item.plannedSaleVolume}}吨
 						</view>
 					</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货" && TabCur== 0'>
+						今日基差</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货" && TabCur== 0'>
+						采购价格</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="期货" && TabCur== 1'>今日基差
+					</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="现货" && TabCur== 1'>销售价格
+					</view>
+				</view>
+					</view>
 					<view v-show="isLoadMore">
 						<uni-load-more :status="loadStatus"></uni-load-more>
 					</view>
@@ -71,7 +83,7 @@
 			<view style='height:80vh;' v-show="isShowKeywordList&&keywordList.length==0">
 				<view style='background:#fff;padding:0 15px;'>
 					<view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
-					<view @click='tabcarchange(1)' class='line'  :class='TabCur==1?"active":""'>销售</view>
+					<view @click='tabcarchange(1)' class='line' :class='TabCur==1?"active":""'>销售</view>
 				</view>
 				<view style='background:#F5F6FA;height:100%;line-height:80vh;text-align:center;'>
 					暂无相关结果
@@ -82,27 +94,32 @@
 					<view class="keyword-list-header Medium">
 						<view style='font-size:16px;font-weight:600;'>最近搜索</view>
 						<view>
-							<image @tap="oldDelete" style='width:16px;height:16px;' src="../../static/img/jiaoyi/shanchu@3x.png"></image>
+							<image @tap="oldDelete" style='width:16px;height:16px;'
+								src="../../static/img/jiaoyi/shanchu@3x.png"></image>
 							<!-- <image @tap="oldDelete" src="./static/delete.png"></image> -->
-						<!-- 	<text class="cuIcon-delete text-gray "  ></text> -->
-							
+							<!-- 	<text class="cuIcon-delete text-gray "  ></text> -->
+
 						</view>
 					</view>
 					<view class="keyword Regular">
-						<view v-for="(keyword,index) in oldKeywordList.records" @tap="doSearch(keyword)" :key="index">{{keyword.searchContent}}</view>
+						<view v-for="(keyword,index) in oldKeywordList.records" @tap="doSearch(keyword)" :key="index">
+							{{keyword.searchContent}}
+						</view>
 					</view>
 				</view>
-				 <view class="keyword-block Medium">
+				<view class="keyword-block Medium">
 					<view class="keyword-list-header">
 						<view style='font-size:16px;font-weight:600;'>推荐搜索</view>
 						<view>
-							 <image @tap="hotToggle" :src="'/static/HM-search/attention'+forbid+'.png'"></image> 
+							<image @tap="hotToggle" :src="'/static/HM-search/attention'+forbid+'.png'"></image>
 						</view>
 					</view>
 					<view class="keyword Regular" v-if="forbid==''">
-						<view v-for="(keyword,index) in hotKeywordList" @tap="doSearch(keyword)" :key="index">{{keyword.searchContent}}</view>
+						<view v-for="(keyword,index) in hotKeywordList" @tap="doSearch(keyword)" :key="index">
+							{{keyword.searchContent}}
+						</view>
 					</view>
-				</view> 
+				</view>
 			</scroll-view>
 		</view>
 	</view>
@@ -119,26 +136,26 @@
 			return {
 				defaultKeyword: "",
 				searchKeyWord: "",
-				pageSize:10,
-				currentPage:1,
+				pageSize: 10,
+				currentPage: 1,
 				oldKeywordList: [],
 				hotKeywordList: [],
 				keywordList: [],
 				forbid: '',
 				isShowKeywordList: false,
-				TabCur:0,
-				isLoadMore:false,
-				loadStatus:'',
-				content:'搜索'
+				TabCur: 0,
+				isLoadMore: false,
+				loadStatus: '',
+				content: '搜索'
 			}
 		},
 		onLoad(options) {
-			if(options.searchKeyWord){
-				this.searchKeyWord=options.searchKeyWord
+			if (options.searchKeyWord) {
+				this.searchKeyWord = options.searchKeyWord
 			}
 			this.TabCur = options.TabCur
-			if(this.searchKeyWord){
-				this.isShowKeywordList=true
+			if (this.searchKeyWord) {
+				this.isShowKeywordList = true
 				this.getData()
 			}
 		},
@@ -172,138 +189,144 @@
 				this.loadHotKeyword();
 
 			},
-			search(e){
-				if(e.detail.value.length==0){
-					this.isShowKeywordList=false
+			search(e) {
+				if (e.detail.value.length == 0) {
+					this.isShowKeywordList = false
 					this.loadOldKeyword()
 					this.loadHotKeyword()
-				}
-				else{
+				} else {
 					this.searchKeyWord = e.detail.value
 				}
 			},
-			blur(){
+			blur() {
 				uni.hideKeyboard()
 			},
-			doSearch(keyword){
+			doSearch(keyword) {
 				console.log(keyword)
-				if(keyword){
-					this.searchKeyWord=keyword.searchContent
+				if (keyword) {
+					this.searchKeyWord = keyword.searchContent
 
 				}
-				if(this.searchKeyWord.length>0){
-						this.isShowKeywordList=true
-						this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:this.searchKeyWord}).then(res => {
-						})
+				if (this.searchKeyWord.length > 0) {
+					this.isShowKeywordList = true
+					this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo', {
+							commonId: this.userInfo.id,
+							searchContent: this.searchKeyWord
+						}).then(res => {})
 						.catch(res => {
-							
+
 						});
-					}else{
-						this.isShowKeywordList=false
-						this.loadOldKeyword()
-						this.loadHotKeyword()
-					}
+				} else {
+					this.isShowKeywordList = false
+					this.loadOldKeyword()
+					this.loadHotKeyword()
+				}
 				uni.showLoading({
 					title: '正在加载',
-					mask:true
+					mask: true
 				})
-				var param1=''
+				var param1 = ''
 				if (this.TabCur == 0) {
 					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
 				} else {
 					param1 = '/salePlanInfo/selectSalePlanInfo'
 				}
-				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
-				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-					uni.hideLoading()
-					this.keywordList=res.data.data.records
-				})
-				.catch(res => {
-					uni.hideLoading()
-					if(res.errmsg){
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none',
-							duration: 2000
-						})
-					}
-					else{
-						uni.showToast({
-							title: "系统异常,请联系管理员",
-							icon: 'none',
-							duration: 2000
-						})
-					}
-				});
+				this.$api.doRequest('get', param1, {
+						pageSize: this.pageSize,
+						currentPage: this.currentPage,
+						searchKeyWord: this.searchKeyWord
+					}).then(res => {
+						uni.hideLoading()
+						this.keywordList = res.data.data.records
+					})
+					.catch(res => {
+						uni.hideLoading()
+						if (res.errmsg) {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
+						} else {
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
 			},
-			emptysearch(){
-				this.searchKeyWord=''
-				this.isShowKeywordList=false
+			emptysearch() {
+				this.searchKeyWord = ''
+				this.isShowKeywordList = false
 				this.loadOldKeyword()
 				this.loadHotKeyword()
 			},
-			loadHotKeyword(){
-				this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo',{pageSize:this.pageSize,
-				currentPage:this.currentPage,commonId:this.userInfo.id}).then(res => {
-					uni.hideLoading()
-					this.hotKeywordList=res.data.data.records
-				})
-				.catch(res => {
-					if(res.errmsg){
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none',
-							duration: 2000
-						})
-					}
-					else{
-						uni.showToast({
-							title: "系统异常,请联系管理员",
-							icon: 'none',
-							duration: 2000
-						})
-					}
-				});
+			loadHotKeyword() {
+				this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo', {
+						pageSize: this.pageSize,
+						currentPage: this.currentPage,
+						commonId: this.userInfo.id
+					}).then(res => {
+						uni.hideLoading()
+						this.hotKeywordList = res.data.data.records
+					})
+					.catch(res => {
+						if (res.errmsg) {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
+						} else {
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
 			},
 			tabSelect(e) {
-				if(e.currentTarget.dataset.id){
+				if (e.currentTarget.dataset.id) {
 					this.TabCur = e.currentTarget.dataset.id;
-				}
-				else{
+				} else {
 					this.TabCur = e.target.current;
 				}
 				this.pages = 1
 				this.isLoadMore = false
 				this.loadData()
 			},
-			getData(){
-				var param1=''
+			getData() {
+				var param1 = ''
 				if (this.TabCur == 0) {
 					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
 				} else {
 					param1 = '/salePlanInfo/selectSalePlanInfo'
 				}
-				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
-				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-					uni.hideLoading()
-					this.keywordList=res.data.data.records
-				})
-				.catch(res => {
-					if(res.errmsg){
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none',
-							duration: 2000
-						})
-					}
-					else{
-						uni.showToast({
-							title: "系统异常,请联系管理员",
-							icon: 'none',
-							duration: 2000
-						})
-					}
-				});
+				this.$api.doRequest('get', param1, {
+						pageSize: this.pageSize,
+						currentPage: this.currentPage,
+						searchKeyWord: this.searchKeyWord
+					}).then(res => {
+						uni.hideLoading()
+						this.keywordList = res.data.data.records
+					})
+					.catch(res => {
+						if (res.errmsg) {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
+						} else {
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
 			},
 			//加载默认搜索关键字
 			loadDefaultKeyword() {
@@ -312,18 +335,21 @@
 			},
 			//加载历史搜索,自动读取本地Storage
 			loadOldKeyword() {
-				var that=this
-				this.$api.doRequest('get', '/searchRecordsInfo/selectSearchRecordsInfo',{pageSize:this.pageSize,
-				currentPage:this.currentPage,commonId:this.userInfo.id}).then(res => {
+				var that = this
+				this.$api.doRequest('get', '/searchRecordsInfo/selectSearchRecordsInfo', {
+					pageSize: this.pageSize,
+					currentPage: this.currentPage,
+					commonId: this.userInfo.id
+				}).then(res => {
 					uni.hideLoading()
-					that.oldKeywordList=res.data.data
+					that.oldKeywordList = res.data.data
 					console.log(that.oldKeywordList)
 				})
 			},
 			//监听输入
 			inputChange(event) {
 				//兼容引入组件时传入参数情况
-				var keyword = event.detail?event.detail.value:event;
+				var keyword = event.detail ? event.detail.value : event;
 				// if (!keyword) {
 				// 	this.keywordList = [];
 				// 	this.isShowKeywordList = false;
@@ -361,28 +387,30 @@
 			},
 			//清除历史搜索
 			oldDelete() {
-				var that=this
+				var that = this
 				uni.showModal({
 					content: '确定清除历史搜索记录?',
 					success: (res) => {
 						if (res.confirm) {
-							this.$api.doRequest('post', '/searchRecordsInfo/api/deleteSearchRecordsInfo',{commonId:this.userInfo.id}).then(res => {
-								if(res.data.code==200){
+							this.$api.doRequest('post', '/searchRecordsInfo/api/deleteSearchRecordsInfo', {
+									commonId: this.userInfo.id
+								}).then(res => {
+									if (res.data.code == 200) {
+										uni.showToast({
+											title: '清除历史搜索成功',
+											icon: 'none',
+											duration: 2000
+										})
+										that.oldKeywordList.records = []
+									}
+								})
+								.catch(res => {
 									uni.showToast({
 										title: '清除历史搜索成功',
-										icon:'none',
+										icon: 'none',
 										duration: 2000
 									})
-									that.oldKeywordList.records=[]
-								}
-							})
-							.catch(res => {
-								uni.showToast({
-									title: '清除历史搜索成功',
-									icon:'none',
-									duration: 2000
-								})
-							});
+								});
 						} else if (res.cancel) {
 							console.log('用户点击取消');
 						}
@@ -402,7 +430,7 @@
 			// 			this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e.detail.value}).then(res => {
 			// 			})
 			// 			.catch(res => {
-							
+
 			// 			});
 			// 		}else{
 			// 			this.content='搜索'
@@ -419,7 +447,7 @@
 			// 			this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e}).then(res => {
 			// 			})
 			// 			.catch(res => {
-							
+
 			// 			})
 			// 		}else{
 			// 			this.content='搜索'
@@ -461,38 +489,40 @@
 			// 	// 	url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
 			// 	// })
 			// },
-			tabcarchange(status){
-				this.TabCur=status
+			tabcarchange(status) {
+				this.TabCur = status
 				var param1 = ''
 				if (this.TabCur == 0) {
 					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
 				} else {
 					param1 = '/salePlanInfo/selectSalePlanInfo'
 				}
-				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
-				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-					if(res.data.code==200){
-						this.keywordList=res.data.data.records
-					}else{
-						uni.showToast({
-							title: res.data.message,
-							icon:'none',
-							duration: 2000
-						})
-						
-					}
-					uni.hideLoading()
+				this.$api.doRequest('get', param1, {
+						pageSize: this.pageSize,
+						currentPage: this.currentPage,
+						searchKeyWord: this.searchKeyWord
+					}).then(res => {
+						if (res.data.code == 200) {
+							this.keywordList = res.data.data.records
+						} else {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+
+						}
+						uni.hideLoading()
 					})
 					.catch(res => {
 						uni.hideLoading()
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -537,113 +567,259 @@
 	}
 </script>
 <style scoped>
-	.search-form{
-		    background: #F5F6F9;
+	.search-form {
+		background: #F5F6F9;
 	}
-	.line{
-		display:inline-block;
-		padding:5px;
-		position:relative;
-		font-size:17px;
+
+	.line {
+		display: inline-block;
+		padding: 5px;
+		position: relative;
+		font-size: 17px;
 	}
-	.line.active{
-		font-size:19px;
+
+	.line.active {
+		font-size: 19px;
 		font-weight: 900;
 	}
-	.line.active:after{
-		content:'';
-		display:block;
-		position:absolute;
-		width:18px;
-		left:50%;
+
+	.line.active:after {
+		content: '';
+		display: block;
+		position: absolute;
+		width: 36rpx;
+		height: 6rpx;
+		left: 50%;
 		transform: translateX(-50%);
-		bottom:0;
-		border-bottom:1px solid #22C572;
-	}
-	.search-box {width:100%;background-color:rgb(242,242,242);padding:15upx 2.5%;display:flex;justify-content:space-between;}
-	.search-box .mSearch-input-box{width: 100%;}
-	.search-box .input-box {width:85%;flex-shrink:1;display:flex;justify-content:center;align-items:center;}
-	.search-box .search-btn {width:15%;margin:0 0 0 2%;display:flex;justify-content:center;align-items:center;flex-shrink:0;font-size:28upx;color:#fff;background:linear-gradient(to right,#ff9801,#ff570a);border-radius:60upx;}
-	.search-box .input-box>input {width:100%;height:60upx;font-size:32upx;border:0;border-radius:60upx;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 3%;margin:0;background-color:#ffffff;}
-	.placeholder-class {color:#9e9e9e;}
-	.search-keyword {width:100%;background-color:rgb(242,242,242);}
-	.keyword-list-box {background:#F5F6FA;height:calc(100vh - 110upx);padding-top:10upx;border-radius:20upx 20upx 0 0;}
-	.keyword-entry-tap {background-color:#eee;}
-	.keyword-entry {width:94%;height:80upx;margin:0 3%;font-size:30upx;color:#333;display:flex;justify-content:space-between;align-items:center;border-bottom:solid 1upx #e7e7e7;}
-	.keyword-entry image {width:60upx;height:60upx;}
-	.keyword-entry .keyword-text,.keyword-entry .keyword-img {height:80upx;display:flex;align-items:center;}
-	.keyword-entry .keyword-text {width:90%;}
-	.keyword-entry .keyword-img {width:10%;justify-content:center;}
-	.keyword-box {height:calc(100vh - 110upx);border-radius:20upx 20upx 0 0;background-color:#fff;}
-	.keyword-box .keyword-block {padding:10upx 0;}
-	.keyword-box .keyword-block .keyword-list-header {width:94%;padding:10upx 3%;font-size:27upx;color:#333;display:flex;justify-content:space-between;}
-	.keyword-box .keyword-block .keyword-list-header image {width:40upx;height:40upx;}
-	.keyword-box .keyword-block .keyword {width:94%;padding:3px 3%;display:flex;flex-flow:wrap;justify-content:flex-start;}
-	.keyword-box .keyword-block .hide-hot-tis {display:flex;justify-content:center;font-size:28upx;color:#6b6b6b;}
-	.keyword-box .keyword-block .keyword>view {display:flex;justify-content:center;align-items:center;border-radius:60upx;padding:0 20upx;margin:10upx 20upx 10upx 0;height:60upx;font-size:28upx;background-color:rgb(242,242,242);color:#6b6b6b;}
-	.cuIcon-roundclosefill{
-		position:absolute;
-		right:80px;
+		bottom: 0;
+		background: #22C572;
+		/* border-bottom: 1px solid #22C572; */
+	}
+
+	.search-box {
+		width: 100%;
+		background-color: rgb(242, 242, 242);
+		padding: 15upx 2.5%;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.search-box .mSearch-input-box {
+		width: 100%;
+	}
+
+	.search-box .input-box {
+		width: 85%;
+		flex-shrink: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.search-box .search-btn {
+		width: 15%;
+		margin: 0 0 0 2%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-shrink: 0;
+		font-size: 28upx;
+		color: #fff;
+		background: linear-gradient(to right, #ff9801, #ff570a);
+		border-radius: 60upx;
+	}
+
+	.search-box .input-box>input {
+		width: 100%;
+		height: 60upx;
+		font-size: 32upx;
+		border: 0;
+		border-radius: 60upx;
+		-webkit-appearance: none;
+		-moz-appearance: none;
+		appearance: none;
+		padding: 0 3%;
+		margin: 0;
+		background-color: #ffffff;
+	}
+
+	.placeholder-class {
+		color: #9e9e9e;
+	}
+
+	.search-keyword {
+		width: 100%;
+		background-color: rgb(242, 242, 242);
+	}
+
+	.keyword-list-box {
+		background: #F5F6FA;
+		height: calc(100vh - 110upx);
+		/* padding-top: 10upx; */
+		border-radius: 20upx 20upx 0 0;
+	}
+
+	.keyword-entry-tap {
+		background-color: #eee;
+	}
+
+	.keyword-entry {
+		width: 94%;
+		height: 80upx;
+		margin: 0 3%;
+		font-size: 30upx;
+		color: #333;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		border-bottom: solid 1upx #e7e7e7;
+	}
+
+	.keyword-entry image {
+		width: 60upx;
+		height: 60upx;
+	}
+
+	.keyword-entry .keyword-text,
+	.keyword-entry .keyword-img {
+		height: 80upx;
+		display: flex;
+		align-items: center;
+	}
+
+	.keyword-entry .keyword-text {
+		width: 90%;
+	}
+
+	.keyword-entry .keyword-img {
+		width: 10%;
+		justify-content: center;
+	}
+
+	.keyword-box {
+		height: calc(100vh - 110upx);
+		border-radius: 20upx 20upx 0 0;
+		background-color: #fff;
+	}
+
+	.keyword-box .keyword-block {
+		padding: 10upx 0;
+	}
+
+	.keyword-box .keyword-block .keyword-list-header {
+		width: 94%;
+		padding: 10upx 3%;
+		font-size: 27upx;
+		color: #333;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.keyword-box .keyword-block .keyword-list-header image {
+		width: 40upx;
+		height: 40upx;
+	}
+
+	.keyword-box .keyword-block .keyword {
+		width: 94%;
+		padding: 3px 3%;
+		display: flex;
+		flex-flow: wrap;
+		justify-content: flex-start;
+	}
+
+	.keyword-box .keyword-block .hide-hot-tis {
+		display: flex;
+		justify-content: center;
+		font-size: 28upx;
+		color: #6b6b6b;
 	}
+
+	.keyword-box .keyword-block .keyword>view {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		border-radius: 60upx;
+		padding: 0 20upx;
+		margin: 10upx 20upx 10upx 0;
+		height: 60upx;
+		font-size: 28upx;
+		background-color: rgb(242, 242, 242);
+		color: #6b6b6b;
+	}
+
+	.cuIcon {
+		position: absolute;
+		right: 80px;
+	}
+
 	.tag1 {
-		background:#F5F6F9;
+		background: #F5F6F9;
 		padding: 5px;
-		color:#333333;
+		color: #333333;
 		display: inline-flex;
 		font-size: 22rpx;
 		border-radius: 3px;
 		margin: 3px;
 	}
+
 	.tag {
-		background:#F5F6F9;
+		background: #F5F6F9;
 		padding: 7px 12px;
-		color:#333333;
+		color: #333333;
 		display: inline-flex;
 		font-size: 22rpx;
 		border-radius: 15px;
 		margin: 3px;
 	}
+
 	.tag-bule {
 		background: #EBEEFA;
 		color: #5C76DF;
 	}
+
 	.tag-green {
 		background: #C6F7BC;
 		color: #065112;
 	}
+
 	.tag-yellow {
 		background: #F9F2EA;
 		color: #BE9C69;
 	}
+
 	.tag-red {
 		background: #FEECE6;
 		color: #FE6430;
 	}
-.introduce-section .title{
-	font-size: 17px;
-	font-weight: bold;
-	height:40px;
-	line-height: 40px;
-	flex: 2.5;
-	border-bottom:1px solid #EEEEEE;
-}
-.introduce-section .address{
-	color:#878C9C;
-	font-size:12px;
-	padding:15px 0 10px;
-}
-.introduce-section .price{
-	padding:10px 0 10px;
-	color:#FD714F;
-	font-size:19px;
-	font-weight:700;
-}
+
+	.introduce-section .title {
+		font-size: 17px;
+		height: 40px;
+		line-height: 40px;
+		flex: 2.5;
+		border-bottom: 1px solid #EEEEEE;
+	}
+
+	.introduce-section .address {
+		color: #878C9C;
+		font-size: 12px;
+		padding: 15px 0 10px;
+	}
+
+	.introduce-section .price {
+		padding: 10px 0 10px;
+		color: #FD714F;
+		font-size: 19px;
+		font-weight: 700;
+	}
+
 	/* 销售信息 */
 	.introduce-section {
 		background: #fff;
 		padding: 0upx 30upx 20upx;
-		margin:10px;
-		border-radius:4px;
+		margin: 10px;
+		border-radius: 4px;
 
 		.guess-item {
 			padding-bottom: 20upx;
@@ -696,27 +872,32 @@
 			}
 		}
 	}
-	.side-bg{
-		position:absolute;
+
+	.side-bg {
+		position: absolute;
 		width: 64px;
 		height: 64px;
 		z-index: 1;
 	}
+
 	.drag {
-		position:relative;
+		position: relative;
 		display: flex;
 		justify-content: center;
 		align-items: center;
 		color: $uni-text-color-inverse;
 		width: 64px;
 		height: 64px;
-		background:transparent;
+		background: transparent;
 		font-size: $uni-font-size-sm;
 		position: fixed;
 		z-index: 9;
-		
+
 		&.transition {
-			transition: left .3s ease,top .3s ease;
+			transition: left .3s ease, top .3s ease;
 		}
 	}
+	.number-style{
+		font-size: 44rpx;
+	}
 </style>

+ 1 - 5
pageA/product/sales_detail.vue

@@ -398,11 +398,7 @@
 					this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
 						if(res.data.code==200){
 							uni.navigateTo({
-								url: `/pageA/product/business_sale?id=${this.goods.id}&sendArea=${this.goods.sendArea}&minimumVolume=${this.goods.minimumVolume}
-										&goodsName=${this.goods.goodsName}&sendCity=${this.goods.sendCity}&sendPrivate=${this.goods.sendPrivate}&seller=${this.goods.seller}
-										&basisPrice=${this.goods.basisPrice}&salePrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}
-										&salePlanType=${this.goods.salePlanType}&salePlan=${this.goods.salePlanNo}&baggingNotes=${this.goods.baggingNotes}&compId=${this.goods.compId}
-										&invoiceFeeCompany=${this.goods.invoiceFeeCompany}&invoiceFeePerson=${this.goods.invoiceFeePerson}`
+								url: `/pageA/product/business_sale?id=${this.goods.id}&sendArea=${this.goods.sendArea}&minimumVolume=${this.goods.minimumVolume}&goodsName=${this.goods.goodsName}&sendCity=${this.goods.sendCity}&sendPrivate=${this.goods.sendPrivate}&seller=${this.goods.seller}&basisPrice=${this.goods.basisPrice}&salePrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}&salePlanType=${this.goods.salePlanType}&salePlan=${this.goods.salePlanNo}&baggingNotes=${this.goods.baggingNotes}&compId=${this.goods.compId}&invoiceFeeCompany=${this.goods.invoiceFeeCompany}&invoiceFeePerson=${this.goods.invoiceFeePerson}`
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}
 							// 	&companyId=${this.goods.companyId}&sellerPhone=${this.goods.sellerPhone}&minSale=${this.goods.minSale}

+ 61 - 44
pages/business/business.vue

@@ -6,10 +6,12 @@
 			<view style='background:#fff;border-bottom:1px solid #EEE;padding-bottom:10px;'>
 				<view class="cu-bar search">
 					<view style='position:absolute;left:30px;top:50%;transform: translateY(-50%);' @click='status=true'>
-						{{location}}<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;'
+						{{location}}
+						<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;'
 							src='../../static/img/jiaoyi/down.png'></image>
 					</view>
-					<u-picker mode="selector" @confirm='locationChange' v-model="status" :range="locationType"></u-picker>
+					<u-picker mode="selector" @confirm='locationChange' v-model="status" :range="locationType">
+					</u-picker>
 					<!-- <view>
 						<picker style='display:inline-block;' @change="locationChange" :value="location"
 							:range="locationType">
@@ -20,7 +22,7 @@
 						<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;'
 							src='../../static/img/jiaoyi/down.png'></image>
 					</view> -->
-					
+
 					<view class="search-form round" @click="naviageToPage('/pageA/product/lookup?TabCur=')">
 						<text style='color: #ccc;text-indent:56px;' class="cuIcon-search"></text>
 						<view class="Medium search-title"> 请输入货名或标题</view>
@@ -34,7 +36,7 @@
 					<view class='tag radius line-pink' @click="sousuo('高粱')">高粱</view>
 				</view>
 			</view>
-			<view style='background:#fff;padding:0 15px;' class="Semibold">
+			<view style='background:#fff;padding:0 15px;border-radius:0rpx 0rpx 30rpx 30rpx;' class="Semibold">
 				<view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
 				<view @click='tabcarchange(1)' class='line' :class='TabCur==1?"active":""'>销售</view>
 			</view>
@@ -51,29 +53,37 @@
 					<view v-if='TabCur==1' class='address'>
 						{{item.sendPrivate}}{{item.sendCity}}{{item.sendArea}}{{item.sendWarehouse}}
 					</view>
-					<view class='price NumberBold' v-if='item.procurementPlanType=="期货"'>{{item.basisPrice}}<text
+					<view class='price NumberBold' v-if='item.procurementPlanType=="期货"'>
+						<text class="number-style">{{item.basisPrice}}</text><text style='font-size:13px;color:#333333;'
+							class="Semibold">元/吨</text></view>
+					<view class='price NumberBold' v-if='item.procurementPlanType=="现货"'>
+						<text class="number-style">{{item.procurementPrice}}</text><text style='font-size:13px;color:#333;'
+							class="Semibold">元/吨</text></view>
+					<view class='price NumberBold' v-if='item.salePlanType=="期货"'><text class="number-style">+{{item.basisPrice}}</text><text
 							style='font-size:13px;color:#333333;' class="Semibold">元/吨</text></view>
-					<view class='price NumberBold' v-if='item.procurementPlanType=="现货"'>{{item.procurementPrice}}<text
+					<view class='price NumberBold' v-if='item.salePlanType=="现货"'><text class="number-style">{{item.salePrice}}</text><text
 							style='font-size:13px;color:#333;' class="Semibold">元/吨</text></view>
-					<view class='price NumberBold' v-if='item.salePlanType=="期货"'>+{{item.basisPrice}}<text
-						style='font-size:13px;color:#333333;' class="Semibold">元/吨</text></view>
-					<view class='price NumberBold' v-if='item.salePlanType=="现货"'>{{item.salePrice}}<text
-						style='font-size:13px;color:#333;' class="Semibold">元/吨</text></view>
 				</view>
-				<view class='flex justify-between'>
+				<view class='flex justify-between Regular'>
 					<view class="Regular">
 						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="现货"'>现货</view>
 						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="期货"'>期货</view>
 						<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="现货"'>现货</view>
 						<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="期货"'>期货</view>
 						<view class='tag1 tag-yellow radius line-green'>{{item.goodsName}}</view>
-						<view class='tag1 tag-red radius line-yellow' v-if="TabCur== 0">{{item.plannedPurchaseVolume}}吨</view>
-						<view class='tag1 tag-red radius line-yellow' v-if="TabCur== 1">{{item.plannedSaleVolume}}吨</view>
+						<view class='tag1 tag-red radius line-yellow' v-if="TabCur== 0">{{item.plannedPurchaseVolume}}吨
+						</view>
+						<view class='tag1 tag-red radius line-yellow' v-if="TabCur== 1">{{item.plannedSaleVolume}}吨
+						</view>
+					</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货" && TabCur== 0'>
+						今日基差</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货" && TabCur== 0'>
+						采购价格</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="期货" && TabCur== 1'>今日基差
+					</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="现货" && TabCur== 1'>销售价格
 					</view>
-					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货" && TabCur== 0'>今日基差</view>
-					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货" && TabCur== 0'>采购价格</view>
-					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="期货" && TabCur== 1'>今日基差</view>
-					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="现货" && TabCur== 1'>销售价格</view>
 				</view>
 			</view>
 			<view v-show="isLoadMore">
@@ -85,7 +95,7 @@
 		</view>
 		<u-back-top :scroll-top="scrollTop" tips="顶部" :custom-style="{backgroundColor: '#a0cfff',color: '#2979ff'}"
 			:iconStyle="{color: '#2979ff',fontSize: '34rpx'}" mode="square" icon="arrow-up"></u-back-top>
-		
+
 	</view>
 </template>
 
@@ -101,7 +111,7 @@
 				isLoadMore: false, //是否加载中
 				showTran: true,
 				scrollTop: 0,
-				status:false,
+				status: false,
 				pageSize: 10,
 				searchKeyWord: '',
 				receivePrivate: '全国',
@@ -116,22 +126,24 @@
 				TabCur: 0,
 				current: 1,
 				location: '全国',
-				params:{
+				params: {
 					province: true,
 				},
 				locationType: ['全国', '黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
 					'江西', '云南', '新疆', '山西', '广西', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
 					'宁夏', '天津', '海南', '青海', '西藏', '上海', '北京'
 				],
-				statusBarHeight:"height:"
+				statusBarHeight: "height:"
 			}
 		},
 		onShow() {
 			uni.showTabBar()
 			var userInfo = uni.getStorageSync("userInfo")
 			var that = this
-			console.log("userInfo",userInfo)
-			this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
+			console.log("userInfo", userInfo)
+			this.$api.doRequest('get', '/salePlanInfo/getTips', {
+				phone: userInfo.phone
+			}).then(res => {
 				if (res.data.data) {
 					let name = 'myTip';
 					let value = res.data.data.myTip;
@@ -139,10 +151,10 @@
 						name,
 						value
 					});
-					if(value != 0){
+					if (value != 0) {
 						uni.setTabBarBadge({
-							index:3,
-							text:value+""
+							index: 3,
+							text: value + ""
 						})
 					}
 					name = 'taskTip';
@@ -165,7 +177,7 @@
 			var that = this
 			uni.getSystemInfo({
 				success: function(res) {
-					console.log("statusBarHeight",res.statusBarHeight)
+					console.log("statusBarHeight", res.statusBarHeight)
 					that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
 				},
 			});
@@ -182,7 +194,7 @@
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.loadData()
-			setTimeout(function () {
+			setTimeout(function() {
 				uni.stopPullDownRefresh();
 			}, 1000);
 		},
@@ -274,14 +286,13 @@
 					})
 					.catch(res => {
 						uni.hideLoading()
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -372,14 +383,13 @@
 					})
 					.catch(res => {
 						uni.hideLoading()
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -420,7 +430,7 @@
 		left: 50%;
 		transform: translateX(-50%);
 		bottom: 0;
-		background:#22C572;
+		background: #22C572;
 		/* border-bottom: 1px solid #22C572; */
 	}
 
@@ -729,12 +739,13 @@
 			color: $base-color;
 		}
 	}
-	.introduce-section{
+
+	.introduce-section {
 		padding-top: 135px;
 	}
+
 	.introduce-section .title {
 		font-size: 17px;
-		font-weight: bold;
 		height: 40px;
 		line-height: 40px;
 		flex: 2.5;
@@ -759,7 +770,7 @@
 		background: #fff;
 		padding: 0upx 30upx 20upx;
 		margin: 8px;
-		border-bottom: 1px solid #ccc;
+		/* border-bottom: 1px solid #ccc; */
 	}
 
 	/* 销售信息 */
@@ -832,23 +843,29 @@
 			transition: left .3s ease, top .3s ease;
 		}
 	}
-	.top-style{
-		background: red;
+
+	.top-style {
 		position: fixed;
 		width: 100%;
 	}
-	
+
 	.status_bar {
 		width: 100%;
 	}
-	.search-title{
+
+	.search-title {
 		font-size: 28rpx;
 		color: #AFB3BF;
 	}
-	.tag{
+
+	.tag {
 		font-size: 24rpx;
 	}
-	.align-item-center{
+
+	.align-item-center {
 		align-items: center;
 	}
+	.number-style{
+		font-size: 44rpx;
+	}
 </style>

+ 12 - 7
pages/sale/newsinfo.vue

@@ -2,10 +2,10 @@
 	<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:19rpx;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 style='font-size:16px;height:54px;' class="Regular">{{item.title}}</view>
+						<view class="Regular" 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>
@@ -55,7 +55,8 @@
 					TabCur: 0,
 					category:0,
 					current: 0,
-					infoList1:[]
+					infoList1:[],
+					time:""
 				};
 			},
 			onReady() {
@@ -176,9 +177,11 @@
 					}).then(res => {
 						let data = res.data
 						for(var i=0;i<data.length;i++){
-							if(data[i].title.length > 20){
-								data[i].title = data[i].title.substring(0,20) + "..."
+							if(data[i].title.length > 25){
+								data[i].title = data[i].title.substring(0,25) + "..."
 							}
+							let _date = new Date(data[i].gmtUpdate)
+							data[i].gmtUpdate = this.$u.timeFormat(_date.getTime(), 'mm-dd hh:MM');
 						}
 						that.newsInfo = data
 						uni.hideLoading()
@@ -226,13 +229,15 @@
 						that.loadStatus = 'nomore'
 						if(that.pages>1){that.pages-=1}
 						uni.hideLoading()
-					}).then(res => {
+					}).then(res => {debugger
 						let data = res.data
 						if(data.length > 0){
 							for(var k =0;k<data.length;k++){
 								if(data[k].title.length > 20){
 									data[k].title = data[k].title.substring(0,20) + "..."
 								}
+								let _date = new Date(data[k].gmtUpdate)
+								data[k].gmtUpdate = this.$u.timeFormat(_date.getTime(), 'mm-dd hh:MM');
 							}
 							that.newsInfo = that.newsInfo.concat(data)
 							that.isLoadMore=false

+ 480 - 510
pages/sale/plant.vue

@@ -1,567 +1,537 @@
 <template>
 	<view>
 		<view class="guess-section">
-					<view class="cu-card article no-card" style='width: 100%;'>
-						<view class="cu-item  factoryItem justify-between align-center" style="display:flex;">
-							<view style='flex:1;color:#B2B3BB;'>工厂</view>
-							<view style='flex:1;color:#B2B3BB;'>价格</view>
-							<view style='flex:1;color:#B2B3BB;'>较昨日</view>
-						</view>
+			<view class="cu-card article no-card" style='width: 100%;'>
+				<view class="top-tap Regular" style="display:flex;">
+					<view class="top-tap-item">工厂</view>
+					<view class="top-tap-item">价格</view>
+					<view class="top-tap-item">较昨日</view>
+				</view>
+			</view>
+			<view class="guess-list">
+				<view class="guess-list-item" v-for="(item, index) in newsInfo" :key="index">
+					<view class="guess-item-item">
+						<view class='factory Medium'>{{item.factory}}</view>
+						<view class='wrap Regular'>{{item.city}} {{item.factoryType}}</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  factoryItem justify-between align-center"style="display:flex;">
-								<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 class='price NumberBold guess-item-item'>{{item.price}}</view>
+					<view class='positive NumberBold guess-item-item' v-if='item.comparePrice>0'>
+						<image class='up' src='../../static/img/homepage/shangsheng.png'>{{item.comparePrice}}
+						</image>
 					</view>
-					<view v-show="isLoadMore">
-					    <uni-load-more :status="loadStatus" ></uni-load-more>
+					<view class='negative NumberBold guess-item-item' v-if='item.comparePrice<0'>
+						<image class='down' src='../../static/img/homepage/xiajiang.png'>{{-item.comparePrice}}
+						</image>
 					</view>
+					<view class="guess-item-item Regular" v-if='item.comparePrice==0'>-</view>
 				</view>
+			</view>
+			<view v-show="isLoadMore">
+				<uni-load-more :status="loadStatus"></uni-load-more>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
 	import {
-			mapState
-		} from 'vuex';
+		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)
-							}
+		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]
 						}
-						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)
-				    },
-				})
+						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()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		methods: {
+
+			DotStyle(e) {
+				this.dotStyle = e.detail.value
 			},
-			onPageScroll(e) {
-				this.scrollTop = e.scrollTop;
+			cardSwiper(e) {
+				this.cardCur = e.detail.current
 			},
-			onReachBottom() { //上拉触底函数
-				if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
-					this.isLoadMore = true
-					this.pages += 1
-					this.getIndexSaleData()
-				}
+			hangqing() {
+				uni.navigateTo({
+					url: `/pageB/news/news`
+				})
 			},
-			onPullDownRefresh() {
+			tabSelect(e) {
+				this.TabCur = e.currentTarget.dataset.id;
+				this.category = this.TabCur
 				this.pages = 1
-				this.isLoadMore = false
-				this.loadStatus = 'loading'
 				this.loadData()
-				setTimeout(function () {
-					uni.stopPullDownRefresh();
-				}, 1000);
-			},
-			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`
+			//回到顶部
+			goTop(e) { // 一键回到顶部
+				console.log(e)
+				if (wx.pageScrollTo) {
+					wx.pageScrollTo({
+						scrollTop: 0
 					})
-				},
-				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()
+				} else {
+					wx.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
 					})
 				}
-	
 			},
-	
-			// #ifndef MP
-			// 标题栏input搜索框点击
-			onNavigationBarSearchInputClicked: async function(e) {
-				uni.navigateTo({
-					url: '/pageA/product/search'
+			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()
 				})
+
 			},
-			//点击导航栏 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;
+<style lang="scss" scoped>
+	.container {
+		margin: 10rpx 10rpx 10rpx 10rpx;
 	}
-	.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%;
+
+	.cu-tag.badge {
+		right: 26rpx;
+	}
+
+	.up,
+	.down {
+		width: 7.5px;
+		height: 9px;
+		position: relative;
+		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: 28rpx;
+	}
+
+	.positive {
+		color: #FD714F;
+		font-size: 28rpx;
+	}
+
+	.negative {
+		color: #22C572;
+		font-size: 28rpx;
+		font-weight: 900;
+	}
+
+	.wrap {
+		font-size: 24rpx;
+		color: #B2B3BB;
+	}
+
+	.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);
 		}
-		.goTop image{
-			width:32px;
-			height:32px;
+	}
+
+	.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;
 		}
-		.flex{
-			display:flex;
+
+		.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%);
+			}
 		}
-		.text-white{
-			color:#fff;
+	}
+
+	/* #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 {
+		padding: 0;
+		margin-top: 20rpx;
+	}
+
+	.guess-section .guess-item {
+		width: 100%;
+		background: green;
+		border-bottom: 1px solid #EEEEEE;
+	}
+
+	.guess-section .price {
+		font-size: 34rpx;
+		color: #FD714F;
+	}
+
+	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;
 		}
-		.cu-card{
-			border-bottom:1rpx solid #f8f8f8;
-			text-align: center;
+
+		.title {
+			font-size: 28upx;
+			color: $font-color-dark;
+			font-weight: bold;
+			height: 50upx;
+			line-height: 50upx;
+			flex: 2.5;
 		}
-		.factory{
-			font-size:26rpx;
-			font-weight:900;
+
+		.title-tip {
+			flex: 1;
 		}
-		.positive{
-			color:#FD714F;
-			font-size:26rpx;
-			font-weight:900;
+
+		.price-box {
+			display: flex;
+			align-items: baseline;
+			height: 70upx;
+			padding: 10upx 0;
+			font-size: 26upx;
+			color: $uni-color-primary;
 		}
-		.negative{
-			color:#22C572;
-			font-size:26rpx;
-			font-weight:900;
+
+		.price {
+			font-size: $font-lg + 2upx;
 		}
-		.wrap{
-			font-size:20rpx;
-			color: rgba(0,0,0,0.5);
+
+		.m-price {
+			margin: 0 12upx;
+			color: $font-color-light;
+			text-decoration: line-through;
 		}
-		.align-center{
+
+		.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);
 		}
-		.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 {
+
+		.bot-row {
+			display: flex;
+			align-items: center;
+			height: 50upx;
+			font-size: $font-sm;
+			color: $font-color-light;
+
+			view {
 				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;
+	}
+
+	.top-tap {
+		display: flex;
+		font-size: 27rpx;
+		padding: 20rpx 48rpx;
+		justify-content: space-between;
+
+		.top-tap-item {
+			color: #B2B3BB;
 		}
-		.guess-section .price{
-			color:#FD714F;
-			font-size: 34rpx;
-			font-weight:600;
+
+		.top-tap-item:nth-of-type(1) {
+			flex: 3;
+			display: flex;
+			justify-content: flex-start;
 		}
-		page {
-			background: #f5f5f5;
+
+		.top-tap-item:nth-of-type(2) {
+			flex: 3;
+			display: flex;
+			justify-content: center;
 		}
-	
-		.m-t {
-			margin-top: 16upx;
+
+		.top-tap-item:nth-of-type(3) {
+			flex: 1;
+			display: flex;
+			justify-content: flex-end;
 		}
-		
-		/* 销售信息 */
-		.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 {
+	}
+
+	.guess-list {
+		width: 100%;
+
+		.guess-list-item {
+			padding: 20rpx 47rpx;
+			display: flex;
+			width: 100%;
+			border-bottom: 1px solid #EEEEEE;
+
+			.guess-item-item:nth-of-type(1) {
+				flex: 3;
 				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;
+				justify-content: flex-start;
+				flex-direction: column;
+
 			}
-		
-			.coupon-tip {
+
+			;
+
+			.guess-item-item:nth-of-type(2) {
+				flex: 3;
+				display: flex;
+				justify-content: center;
 				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 {
+
+			.guess-item-item:nth-of-type(3) {
+				flex: 1;
 				display: flex;
+				justify-content: flex-end;
 				align-items: center;
-				height: 50upx;
-				font-size: $font-sm;
-				color: $font-color-light;
-		
-				view {
-					flex: 1;
-				}
 			}
 		}
+
+	}
 </style>

+ 404 - 523
pages/sale/portprice.vue

@@ -1,559 +1,440 @@
 <template>
 	<view>
 		<view class="guess-section">
-					<view class="cu-card article no-card" style='width: 100%;'>
-						<view class="cu-item shadow factoryItem justify-between align-center" style="display:flex;">
-							<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-card article no-card Regular" style='width: 100%;'>
+				<view class="top-tap Regular">
+					<view class="top-tap-item">港口</view>
+					<view class="top-tap-item">价格</view>
+					<view class="top-tap-item">较昨日</view>
+				</view>
+			</view>
+			<view class="guess-list">
+				<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 justify-between align-center" style="display:flex;">
-							<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 class="flex-item">
+								<view class='factory Regular'>{{item.port}}</view>
+								<view class='wrap Regular'>{{item.goodsName}}</view>
+							</view>
+							<view class="flex-item">
+								<view class='price NumberBold'>{{item.price}}</view>
+								<view class='wrap Regular'>
+									<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 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 class='flex-item positive NumberBold' v-if='item.comparePrice>0'>
+								<image class='up' src='../../static/img/homepage/shangsheng.png'>{{item.comparePrice}}
+								</image>
+							</view>
+							<view class='flex-item negative NumberBold' v-if='item.comparePrice<0'>
+								<image class='down' src='../../static/img/homepage/xiajiang.png'>{{-item.comparePrice}}
+								</image>
+							</view>
+							<view class="flex-item Regular" v-if='item.comparePrice==0'>-</view>
 						</view>
 					</view>
-					</view>
-					<view v-show="isLoadMore">
-					    <uni-load-more :status="loadStatus" ></uni-load-more>
-					</view>
 				</view>
+			</view>
+			<view v-show="isLoadMore">
+				<uni-load-more :status="loadStatus"></uni-load-more>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
 	import {
-			mapState
-		} from 'vuex';
+		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()
-				setTimeout(function () {
-					uni.stopPullDownRefresh();
-				}, 1000);
-			},
-			computed: {
-				...mapState(['hasLogin', 'userInfo'])
-			},
-			methods: {
-				
-				DotStyle(e) {
-					this.dotStyle = e.detail.value
-				},
-				cardSwiper(e) {
-					this.cardCur = e.detail.current
+		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'
 				},
-				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
-							})
+				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]
 						}
-					})
-				},
-				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'
+						if (data.goodsName) {
+							infoList.push(data)
 						}
-						uni.hideLoading()
-					})
-				}
-	
-			},
-	
-			// #ifndef MP
-			// 标题栏input搜索框点击
-			onNavigationBarSearchInputClicked: async function(e) {
-				uni.navigateTo({
-					url: '/pageA/product/search'
+					}
+					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()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		methods: {
+			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()
 				})
+			
 			},
-			//点击导航栏 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;
+<style scoped lang="scss">
+	.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;
+
+	.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: 28rpx;
+	}
+
+	.positive {
+		color: #FD714F;
+		font-size: 28rpx;
+	}
+
+	.negative {
+		color: #22C572;
+		font-size: 28rpx;
+	}
+
+	.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);
 		}
-		.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;
+	}
+
+	.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;
 		}
-		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-section {
-				padding: 0;
-	
-				.titleNview-placing {
-					padding-top: 0;
-					height: 0;
-				}
-	
-				.carousel {
-					.carousel-item {
-						padding: 0;
-					}
-				}
-	
-				.swiper-dots {
-					left: 50%;
-					bottom: 5upx;
-					transform: translateX(-50%);
+
+			.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;
+	}
+
+	/* #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;
+		padding: 0;
+
+		.guess-item {
+			width: 100%;
+			padding: 0 48rpx;
+			border-bottom: 1px solid #EEEEEE;
 		}
-		.guess-section .price{
-			color:#FD714F;
-			font-size: 34rpx;
-			font-weight:600;
+	}
+
+	.guess-section .price {
+		color: #FD714F;
+		font-size: 34rpx;
+		font-weight: 600;
+	}
+
+	page {
+		background: #f5f5f5;
+	}
+
+	.m-t {
+		margin-top: 16upx;
+	}
+
+
+	.top-tap {
+		display: flex;
+		font-size: 27rpx;
+		padding: 20rpx 48rpx;
+		justify-content: space-between;
+
+		.top-tap-item {
+			color: #B2B3BB;
 		}
-		page {
-			background: #f5f5f5;
+
+		.top-tap-item:nth-of-type(1) {
+			width: 40%;
+			display: flex;
+			justify-content: flex-start;
 		}
-	
-		.m-t {
-			margin-top: 16upx;
+
+		;
+
+		.top-tap-item:nth-of-type(2) {
+			width: 40%;
+			display: flex;
+			justify-content: center;
 		}
-		
-		/* 销售信息 */
-		.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;
-				}
-			}
+
+		;
+
+		.top-tap-item:nth-of-type(3) {
+			width: 20%;
+			display: flex;
+			justify-content: flex-end;
 		}
+	}
+
+	.flex-item:nth-of-type(1) {
+		width: 40%;
+		display: flex;
+		flex-direction: column;
+		align-items: flex-start;
+	}
+
+	.flex-item:nth-of-type(2) {
+		width: 40%;
+	}
+
+	.flex-item:nth-of-type(3) {
+		width: 20%;
+		display: flex;
+		justify-content: flex-end;
+	}
+
+	.guess-list {
+		width: 100%;
+	}
 </style>