gjy 3 anni fa
parent
commit
a63ae4fe5f

+ 9 - 4
components/uview-ui/components/u-back-top/u-back-top.vue

@@ -7,7 +7,8 @@
 		opacity: opacity
 	}, customStyle]">
 		<view class="u-back-top__content" v-if="!$slots.default && !$slots.$default">
-			<u-icon @click="backToTop" :name="icon" :custom-style="iconStyle"></u-icon>
+			<!-- <u-icon @click="backToTop" :name="icon" :custom-style="iconStyle"></u-icon> -->
+			<image class="totop" @click="backToTop" src="../../../../static/img/jiaoyi/totop.png"></image>
 			<view class="u-back-top__content__tips">
 				{{tips}}
 			</view>
@@ -124,7 +125,11 @@
 
 <style lang="scss" scoped>
 	@import "../../libs/css/style.components.scss";
-	
+	.totop{
+		width: 90rpx;
+		height: 90rpx;
+		z-index: 10;
+	}
 	.u-back-top {
 		width: 80rpx;
 		height: 80rpx;
@@ -133,11 +138,11 @@
 		@include vue-flex;
 		flex-direction: column;
 		justify-content: center;
-		background-color: #E1E1E1;
+		// background-color: #ffffff;
 		color: $u-content-color;
 		align-items: center;
 		transition: opacity 0.4s;
-		
+		// box-shadow: 0 5upx 10upx rgba(134, 134, 134, 0.1);
 		&__content {
 			@include vue-flex;
 			flex-direction: column;

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "1.1.5",
-    "versionCode" : 115,
+    "versionName" : "1.1.6",
+    "versionCode" : 116,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},

+ 2 - 3
pages/business/business.vue

@@ -96,9 +96,8 @@
 		<image v-if='topState' @click='top' class='back' src="../../static/img/jiaoyi/back@3x.png" mode=""></image>
 		<image @click='show=true' class='fabu' src="../../static/img/jiaoyi/ic_fabu@3x.png" mode=""></image>
 		<u-picker mode="selector" @confirm='confirmrelease' v-model="show"   :range="releaseType"></u-picker>
-		<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>
-
+		<!-- <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>
 

+ 9 - 2
pages/grain_pulse/details.vue

@@ -5,8 +5,8 @@
 				:indicator-dots="false" :circular="true"  interval="5000" 
 				 :current="status" @change="topSwiperTab">
 				<swiper-item class="swiper-item" v-for="(item,index) in sitePhotoAddress" :key="index"
-					:class="status==index?'text-white':''">
-					<image :src="item"></image>
+					:class="status==index?'text-white':''" @click="preview(sitePhotoAddress,index)">
+					<image  :src="item"></image>
 					<!-- 	<view style='position:absolute;top:50%;left:50%;transform: translate(-50%,-50%);'>11111</view> -->
 				</swiper-item>
 			</swiper>
@@ -152,6 +152,13 @@
 			
 		},
 		methods: {
+			preview(img,index){
+				console.log("preview",img,index)
+				uni.previewImage({
+				    urls: img,
+				    current:index
+				});
+			},
 			contactUs(item) {
 				const that = this
 				uni.makePhoneCall({

+ 19 - 5
pages/grain_pulse/dynamic.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="center">
-		<u-search placeholder="请输入货名" v-model="keyword" @clear="searchClear" style="width: 96%; margin: 0 auto;"
+		<u-search placeholder="请输入关键字" v-model="keyword" @clear="searchClear" style="width: 96%; margin: 0 auto;"
 			@search="getData" @custom="getData"></u-search>
 		<view class="bottom flex">
 			<view class="bottonCss" @click="release">
@@ -37,7 +37,7 @@
 				</view>
 				<view class="imgList flex" v-if="item.address != ''">
 					<view v-for="(items,count) in item.imgList" style="width: 30%;margin-left: 20rpx;">
-						<image :src="items" style="height: 220rpx;border-radius: 16rpx;"></image>
+						<image @click="preview(item.imgList,count)" :src="items" style="height: 220rpx;border-radius: 16rpx;"></image>
 					</view>
 				</view>
 				<view class="flex">
@@ -56,6 +56,7 @@
 		<view style='height:12vh;background:#F5F6FA;line-height:12vh;text-align:center;' v-if='releaseList.length == 0'>
 			当前暂无结果
 		</view>
+		<u-back-top :scroll-top="scrollTop" mode="circle" icon="arrow-upward"></u-back-top>
 	</view>
 </template>
 
@@ -78,7 +79,8 @@
 					backgroundImage: "none",
 					paddingTop: "0",
 					marginTop: "20rpx"
-				}
+				},
+				scrollTop: 0,
 			}
 		},
 		computed: {
@@ -108,16 +110,27 @@
 			this.portraits = this.userInfo.avatarUrl
 			this.getData()
 		},
+		onPageScroll(e) {
+			this.scrollTop = e.scrollTop;
+		},
 		methods: {
+			preview(img,index){
+				uni.previewImage({
+				    urls: img,
+				    current:index
+				});
+			},
 			getData() {
 				this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
 						currentPage: 1,
 						pageSize:10,
-						searchKeyWord: this.keyword
+						searchKeyWord: this.keyword,
+						searchType:2
 					})
 					.then(res => {
 						if (res.data.code == 200) {
 							this.releaseList = res.data.data.records
+							console.log("releaseList",this.releaseList)
 							for (let i = 0; i < this.releaseList.length; i++) {
 								if (this.releaseList[i].address != null) {
 									if(this.releaseList[i].address.indexOf(',')!=-1){
@@ -135,7 +148,8 @@
 				this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
 						currentPage: this.currentPage,
 						pageSize: this.pageSize,
-						searchKeyWord: this.keyword
+						searchKeyWord: this.keyword,
+						searchType:2
 					})
 					.then(res => {
 						if (res.data.code == 200) {

+ 13 - 7
pages/grain_pulse/home.vue

@@ -71,7 +71,7 @@
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
 			<view class='enter-content'>入驻</view>
 		</view>
-
+		<u-back-top :scroll-top="scrollTop" mode="circle" icon="arrow-upward"></u-back-top>
 	</view>
 </template>
 
@@ -125,12 +125,16 @@
 					}
 				],
 				notlist:false,
-				datalist: []
+				datalist: [],
+				scrollTop: 0,
 			}
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
+		onPageScroll(e) {
+			this.scrollTop = e.scrollTop;
+		},
 		onPullDownRefresh() {
 		    this.getList()
 			this.isLoadMore = false
@@ -197,8 +201,9 @@
 				
 				this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
 						currentPage: 1,
-						pageSize: 4,
-						searchKeyWord: this.keyword
+						pageSize: 3,
+						searchKeyWord: this.keyword,
+						searchType:2
 					})
 					.then(res => {
 						if (res.data.code == 200) {
@@ -518,11 +523,12 @@
 
 	.companylocation {
 		color: #676E80;
-		background: #F5F6FA;
+		/* background: #F5F6FA; */
 		margin-top: 8px;
-		padding: 4px 10px;
+		/* padding: 4px 10px; */
 		border-radius: 15px;
 		font-size: 12px;
+		/* width: 65%; */
 	}
 
 	.distance {
@@ -536,7 +542,7 @@
 	.enter {
 		position: fixed;
 		right: 0;
-		top: 80%;
+		top: 70%;
 		width: 56.5px;
 		height: 28px;
 	}

+ 6 - 4
pages/grain_pulse/position/position.vue

@@ -3,7 +3,7 @@
 		<view class="header">
 			<view class="city Medium">
 				<view class="select-city" @click="loadCity">{{city}}</view>
-				<u-icon name="arrow-down"></u-icon>
+				<u-icon size="20rpx" name="arrow-down"></u-icon>
 			</view>
 			<u-search input-align="left" @change="searchAddress" :show-action="false" height="70" placeholder="请输入位置信息"
 				v-model="addressName"></u-search>
@@ -14,8 +14,8 @@
 			</view>
 			<view class="header2-content">
 				<view class="left Medium" @click="selectPosition">
-					<u-icon name="arrow-down"></u-icon>
-					<view class="">{{address}}</view>
+					<image style="width: 30rpx;height:30rpx;margin-top: 15rpx;" src="../../../static/img/liangmai/dingwei.png"></image>
+					<view style="padding-left: 15rpx;">{{address}}</view>
 					<view class="" v-if="isposition">{{text}}</view>
 				</view>
 				<view class="reposition Regular" @click="reloadPosition">{{po_tips}}</view>
@@ -38,7 +38,9 @@
 				@click="addressClick(item)">
 				<view class="top">
 					<view v-html="item.newName" class="content"></view>
-					<view class="distance" v-if="address!='定位失败,请点击重新定位'">{{item.distance}}千米</view>
+					<view class="distance" v-if="address!='定位失败,请点击重新定位'&& item.distance > 1">{{item.distance}}km</view>
+					<view class="distance" v-if="address!='定位失败,请点击重新定位'&& item.distance <= 1">{{(item.distance*1000).toFixed(0)}}m</view>
+					
 				</view>
 				<view class="bottom">
 					{{item.adname}}{{item.address}}

+ 1 - 29
pages/sale/information.vue

@@ -111,6 +111,7 @@
 
 			</view>
 		</view>
+		<u-back-top :scroll-top="scrollTop" mode="circle" icon="arrow-upward"></u-back-top>
 	</view>
 </template>
 
@@ -394,20 +395,6 @@
 				this.pages = 1
 				this.loadData()
 			},
-			//回到顶部
-			goTop(e) { // 一键回到顶部
-				console.log(e)
-				if (wx.pageScrollTo) {
-					wx.pageScrollTo({
-						scrollTop: 0
-					})
-				} else {
-					wx.showModal({
-						title: '提示',
-						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
-					})
-				}
-			},
 			async loadData() {
 				console.log("sale loadData pages " + this.pages)
 				const that = this
@@ -663,21 +650,6 @@
 	.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;
 	}

BIN
static/img/jiaoyi/totop.png


BIN
static/img/liangmai/dingwei.png


BIN
static/img/liangmai/icon_ditu.png


+ 7 - 1
util/util.js

@@ -313,7 +313,13 @@ const utils = {
 				Math.sin(b / 2), 2)));
 		s = s * 6378.137;
 		s = Math.round(s * 10000) / 10000;
-		s = '(距您' + s.toFixed(2) + '公里)' //保留两位小数
+		if(s > 1){
+			s = s.toFixed(2) + 'km' //保留两位小数
+		}
+		else{
+			s = s*1000
+			s = s.toFixed(0) + 'm' //保留两位小数
+		}
 		return s
 	},
 	isMobile: function(mobile) {