ccj vor 3 Jahren
Ursprung
Commit
fde8e520d4

+ 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({

+ 9 - 2
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">
@@ -114,6 +114,12 @@
 			this.scrollTop = e.scrollTop;
 		},
 		methods: {
+			preview(img,index){
+				uni.previewImage({
+				    urls: img,
+				    current:index
+				});
+			},
 			getData() {
 				this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
 						currentPage: 1,
@@ -124,6 +130,7 @@
 					.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){

+ 3 - 2
pages/grain_pulse/home.vue

@@ -523,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 {

+ 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}}

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) {