gjy 3 år sedan
förälder
incheckning
1030006023

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 89 - 29
App.vue


+ 2 - 0
config/index.js

@@ -2,6 +2,8 @@ const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	baseUrlNew: 'http://192.168.1.120:8090/',
 	// baseUrlNew: 'http://api.eliangeyun.com/',
+	// baseUrlNew: 'http://192.168.1.107:8090/',
+	//baseUrlNew: 'http://api.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 19 - 19
pageB/contract/contract.vue

@@ -245,26 +245,26 @@
 			},
 			commit(item) {
 				console.log(item)
-				var list = item.addressUrl.toString().split(',')
-				if(list.length > 0){
-					uni.downloadFile({
-					  url: list[0],
-					  success: function (res) {
-					    var filePath = res.tempFilePath;
-					    uni.openDocument({
-					      filePath: filePath,
-					      success: function (res) {
-							  uni.hideLoading()
-					        console.log('打开文档成功');
-					      }
-					    });
-					  },
-					})
-				}
+				// var list = item.addressUrl.toString().split(',')
+				// if(list.length > 0){
+				// 	uni.downloadFile({
+				// 	  url: list[0],
+				// 	  success: function (res) {
+				// 	    var filePath = res.tempFilePath;
+				// 	    uni.openDocument({
+				// 	      filePath: filePath,
+				// 	      success: function (res) {
+				// 			  uni.hideLoading()
+				// 	        console.log('打开文档成功');
+				// 	      }
+				// 	    });
+				// 	  },
+				// 	})
+				// }
 				
-				// uni.navigateTo({
-				// 	url: `/pageB/contract/enclosures?addressUrl=${item.addressUrl}`
-				// })
+				uni.navigateTo({
+					url: `/pageB/contract/enclosures?addressUrl=${item.addressUrl}`
+				})
 			},
 			commit1(item) {
 				uni.navigateTo({

+ 50 - 135
pages/grain_pulse/distribution/distribution.nvue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="header">
 			<view class="now-location">
-				<u-icon name="map" size="36" class="icon"></u-icon>
+				<!-- <u-icon name="map" size="36" class="icon"></u-icon> -->
 				<text class="text Medium title">{{position.name}}</text>
 			</view>
 			<view class="selectType">
@@ -25,131 +25,25 @@
 				附近暂无相关企业
 			</view>
 			<view class="warp">
-				<view class="line-style"  @click="lineClick">
+				<view class="line-style" @click="lineClick">
 					<text class="top-line"></text>
 				</view>
 				<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
 					@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
+					<view class="bottom-list-item" v-for="(item,index) in datalist" :key="index">
+						<img class="left-img" :src="item.attachmentAddress" alt="">
 						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
+							<text class="title Medium">{{item.title}}</text>
+							<text
+								class="localtion Regular">{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</text>
 						</view>
 						<text class="line"></text>
 						<view class="right">
 							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
+							<text class="right-bottom Regular">{{metreList[index]}}</text>
 						</view>
 					</view>
+
 				</scroll-view>
 
 			</view>
@@ -160,6 +54,7 @@
 </template>
 <script>
 	// import amap from '@/js_sdk/js-amap/amap-wx.130.js'
+	import * as config from '@/config'
 	export default {
 		data() {
 			return {
@@ -168,6 +63,8 @@
 				old: {
 					scrollTop: 0
 				},
+				metreList: [],
+				datalist: [],
 				"isActive": false,
 				position: {},
 				nowLocation: {
@@ -185,34 +82,52 @@
 					latitude: 39.9085,
 					longitude: 116.39747,
 					iconPath: '../../../static/img/location.png',
-				}]
+				}],
 			}
 		},
 		onShow() {
 
 		},
 		onLoad(e) {
-			this.position =  JSON.parse(e.position)
-			console.log("地点",this.position)
-			this.nowLocation.latitude = this.position.location.split(',')[1]
-			this.nowLocation.longitude = this.position.location.split(',')[0]
-			//获取标记点
-			this.getMarkers()
+			if (Object.keys(e).length) {
+				this.position = JSON.parse(e.position)
+				this.nowLocation.latitude = this.position.location.split(',')[1]
+				this.nowLocation.longitude = this.position.location.split(',')[0]
+				//获取列表数据
+			}
+			this.getList()
 		},
 		methods: {
-			getMarkers(){
-				//点击列表标记改变颜色,显示气泡提示
-				// this.$api.doRequest('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
-				// 	pageSize: this.pageSize,
-				// 	currentPage: this.currentPage,
-				// }).then(res => {
-				// 	if (res.data.code == 200) {
-				// 		this.datalist = res.data.data.records
-				// 	}
-				// })
+			getList(val) {
+				this.metreList = []
+				let detailedAddress = ""
+				if (val) {
+					detailedAddress = this.position.name
+				}
+				console.log("-----------------------")
+				getApp().nvueRequst('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
+					pageSize: 10000,
+					currentPage: 1,
+					detailedAddress:detailedAddress
+				}).then(res => {
+						console.log('res',res)
+					if (res.data.code == 200) {debugger
+					
+						this.datalist = res.data.data.records
+						let lat1 = this.nowLocation.latitude
+						let lng1 = this.nowLocation.longitude
+						for(let i = 0;i<this.datalist.length;i++){
+							let lat2 = this.datalist[i].latitude
+							let lng2 = this.datalist[i].longitude
+							console.log("lat1,lng1,lat2,lng2",lat1,lng1,lat2,lng2)
+							let _metre = getApp().getDistance(lat1,lng1,lat2,lng2)
+							this.metreList.push(_metre)
+						}
+					}
+				})
 			},
-			lineClick(){
-				this.isActive= !this.isActive
+			lineClick() {
+				this.isActive = !this.isActive
 				// this.isscroll = !this.isscroll
 			},
 			upper: function(e) {
@@ -308,7 +223,7 @@
 </script>
 <style scoped>
 	.active {
-		height: 583rpx!important;
+		height: 583rpx !important;
 	}
 
 	.header {

+ 45 - 134
pages/grain_pulse/distribution/distribution.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="header">
 			<view class="now-location">
-				<u-icon name="map" size="36" class="icon"></u-icon>
+				<!-- <u-icon name="map" size="36" class="icon"></u-icon> -->
 				<text class="text Medium title">{{position.name}}</text>
 			</view>
 			<view class="selectType">
@@ -25,131 +25,25 @@
 				附近暂无相关企业
 			</view>
 			<view class="warp">
-				<view class="line-style"  @click="lineClick">
+				<view class="line-style" @click="lineClick">
 					<text class="top-line"></text>
 				</view>
 				<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
 					@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
+					<view class="bottom-list-item" v-for="(item,index) in datalist" :key="index">
+						<img class="left-img" :src="item.attachmentAddress" alt="">
 						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
+							<text class="title Medium">{{item.title}}</text>
+							<text
+								class="localtion Regular">{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</text>
 						</view>
 						<text class="line"></text>
 						<view class="right">
 							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
-						</view>
-					</view>
-					<view class="bottom-list-item">
-						<img class="left-img" src="/static/location.png" alt="">
-						<view class="middle">
-							<text class="title Medium">中天昊元粮库中天昊元粮库</text>
-							<text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
-						</view>
-						<text class="line"></text>
-						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
-							<text class="right-bottom Regular">500m</text>
+							<text class="right-bottom Regular">{{metreList[index]}}</text>
 						</view>
 					</view>
+
 				</scroll-view>
 
 			</view>
@@ -160,6 +54,7 @@
 </template>
 <script>
 	// import amap from '@/js_sdk/js-amap/amap-wx.130.js'
+	import * as config from '@/config'
 	export default {
 		data() {
 			return {
@@ -168,6 +63,8 @@
 				old: {
 					scrollTop: 0
 				},
+				metreList: [],
+				datalist: [],
 				"isActive": false,
 				position: {},
 				nowLocation: {
@@ -185,36 +82,50 @@
 					latitude: 39.9085,
 					longitude: 116.39747,
 					iconPath: '../../../static/img/location.png',
-				}]
+				}],
 			}
 		},
 		onShow() {
 
 		},
 		onLoad(e) {
-			if(e.position){
-				this.position =  JSON.parse(e.position)
-				console.log("地点",this.position)
+			if (Object.keys(e).length) {
+				this.position = JSON.parse(e.position)
 				this.nowLocation.latitude = this.position.location.split(',')[1]
 				this.nowLocation.longitude = this.position.location.split(',')[0]
+				//获取列表数据
 			}
-			//获取标记点
-			this.getMarkers()
+			this.getList()
 		},
 		methods: {
-			getMarkers(){
-				//点击列表标记改变颜色,显示气泡提示
-				// this.$api.doRequest('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
-				// 	pageSize: this.pageSize,
-				// 	currentPage: this.currentPage,
-				// }).then(res => {
-				// 	if (res.data.code == 200) {
-				// 		this.datalist = res.data.data.records
-				// 	}
-				// })
+			getList(val) {
+				this.metreList = []
+				let detailedAddress = ""
+				if (val) {
+					detailedAddress = this.position.name
+				}
+				console.log("-----------------------")
+				getApp().nvueRequst('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
+					pageSize: 10000,
+					currentPage: 1,
+					detailedAddress:detailedAddress
+				}).then(res => {
+						console.log('res',res)
+					if (res.data.code == 200) {debugger
+						this.datalist = res.data.data.records
+						let lat1 = this.nowLocation.latitude
+						let lng1 = this.nowLocation.longitude
+						for(let i = 0;i<this.datalist.length;i++){
+							let lat2 = this.datalist[i].latitude
+							let lng2 = this.datalist[i].longitude
+							let _metre = this.utils.getDistance(lat1,lng1,lat2,lng2) +"千米"
+							this.metreList.push(_metre)
+						}
+					}
+				})
 			},
-			lineClick(){
-				this.isActive= !this.isActive
+			lineClick() {
+				this.isActive = !this.isActive
 				// this.isscroll = !this.isscroll
 			},
 			upper: function(e) {
@@ -310,7 +221,7 @@
 </script>
 <style scoped>
 	.active {
-		height: 583rpx!important;
+		height: 583rpx !important;
 	}
 
 	.header {

+ 31 - 21
pages/grain_pulse/dynamic.vue

@@ -14,8 +14,6 @@
 				<view style="color: #656765;">记录</view>
 			</view>
 		</view>
-
-
 		<view v-for="(item,index) in releaseList">
 			<view class="modular">
 				<view class="flex">
@@ -29,7 +27,12 @@
 				</view>
 				<view class="title">{{item.title}}</view>
 				<view class="titleText">
-					{{item.content}}
+					<!-- {{item.content}} -->
+					<u-read-more show-height="200" :toggle="true" close-text="展开">
+						<!-- <rich-text :nodes="item.content"></rich-text> -->
+						 <!-- @load="parseLoaded" -->
+						<u-parse :html="item.content" ></u-parse>
+					</u-read-more>
 				</view>
 				<view class="imgList flex" v-if="item.address != ''">
 					<view v-for="(items,count) in item.imgList" style="width: 30%;margin-left: 20rpx;">
@@ -46,10 +49,10 @@
 			</view>
 		</view>
 		<view v-show="isLoadMore">
-			<uni-load-more :status="loadStatus"></uni-load-more>
-				<!-- <u-loadmore :status="status" /> -->
+			<!-- <uni-load-more :status="loadStatus" icon icon-type></uni-load-more> -->
+			<u-loadmore :status="loadStatus" icon icon-type="circle" margin-bottom="200"/>
 		</view>
-		<view style='height:12vh;background:#F5F6FA;line-height:24vh;text-align:center;' v-if='releaseInfo.length == 0'>
+		<view style='height:12vh;background:#F5F6FA;line-height:12vh;text-align:center;' v-if='releaseList.length == 0'>
 			当前暂无结果
 		</view>
 	</view>
@@ -64,11 +67,11 @@
 			return {
 				keyword: "",
 				releaseList: [],
-				 releaseInfo:[],
+				releaseInfo: [],
 				currentPage: 1,
 				pageSize: 10,
-				isLoadMore:false,
-				loadStatus:"loading"
+				isLoadMore: false,
+				loadStatus: "loading"
 			}
 		},
 		computed: {
@@ -82,13 +85,15 @@
 			}, 1000);
 		},
 		onReachBottom() { //上拉触底函数
+		var that = this
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
 				this.isLoadMore = true
 				this.currentPage += 1
 				setTimeout(function() {
-					uni.stopPullDownRefresh();
+					 uni.stopPullDownRefresh();
+					 that.getrelease()
 				}, 1000);
-				this.getrelease()
+				
 			}
 		},
 		onShow() {
@@ -97,6 +102,9 @@
 			this.getrelease()
 		},
 		methods: {
+			// parseLoaded() {
+			// 	this.$refs.uReadMore.init();
+			// },
 			getrelease() {
 				this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
 						currentPage: this.currentPage,
@@ -105,17 +113,20 @@
 					})
 					.then(res => {
 						if (res.data.code == 200) {
-							 this.releaseInfo = res.data.data.records
-							if(res.data.data.records.length > 0){
-								this.releaseList=this.releaseList.concat(this.releaseInfo)
+							this.releaseInfo = res.data.data.records
+							if (this.releaseInfo.length > 0) {
+								this.releaseList = this.releaseList.concat(this.releaseInfo)
 								this.isLoadMore = false
 								for (let i = 0; i < this.releaseList.length; i++) {
-									this.releaseList[i].imgList = this.releaseList[i].address.split(",")
+									if (this.releaseList[i].address != null) {
+										this.releaseList[i].imgList = this.releaseList[i].address.split(",")
+									}
+
 								}
-							}else{
+							} else {
 								this.loadStatus = 'nomore'
 							}
-							
+
 						}
 					})
 			},
@@ -155,15 +166,14 @@
 		height: 40rpx;
 		margin-top: 40rpx;
 		text-align: center;
-
 	}
 
 	.modular {
 		width: 94%;
-		margin: 20rpx auto;
+		margin: 40rpx auto;
 		background-color: #FFFFFF;
 		border-radius: 40rpx;
-		margin-top: 40rpx;
+		// margin-top: 40rpx;
 	}
 
 	.touxiang {
@@ -180,7 +190,7 @@
 	}
 
 	.titleText {
-		font-size: 34rpx;
+		font-size: 30rpx;
 		margin-left: 30rpx;
 		margin-top: 10rpx;
 	}

+ 49 - 29
pages/grain_pulse/localtion/coordinate.nvue

@@ -1,16 +1,19 @@
 <template>
 	<view class="container">
 		<view class="content">
-			<text class="title-style">{{nowLocation.address}}</text>
-			<map class="map" @tap="tap" @markertap="markertap" :latitude="nowLocation.latitude"
-				:longitude="nowLocation.longitude" :markers="covers"
+			<view @click='naviageToPage("/pages/grain_pulse/position/position")'>
+				<image class='location' src="@/static/img/liangmai/icon_ditu.png" mode=""></image>
+				<text class="title-style">{{position.name}}</text>
+			</view>
+			<map class="map" @tap="tap" @markertap="markertap" :latitude="position.latitude"
+				:longitude="position.longitude" :markers="covers"
 				:style="{height: nowMapIndex ? nintyPercentScreenHeight : seventyPercentScreenHeight,width:'750rpx,flex:1'}">
 			</map>
 		</view>
 		<view class="bottom">
 			<view class="bottom-left">
-				<text class="bottom-content">经度:{{longitude}}</text>
-				<text class="bottom-content">纬度:{{latitude}}</text>
+				<text class="bottom-content">经度:{{position.longitude}}</text>
+				<text class="bottom-content">纬度:{{position.latitude}}</text>
 			</view>
 			<text class="config-btn" @click="config">确定</text>
 		</view>
@@ -24,14 +27,14 @@
 				nowMapIndex: true,
 				phoneHeight: '', //屏幕高
 				phoneWidth: '', //屏幕宽
-				nowLocation: {
+				position: {
 					longitude: 116.39747,
 					latitude: 39.9085,
-					address: '山海广场'
+					address: '未指定地点'
 				},
+				longitude: 116.39747,
+				latitude: 39.9085,
 				title: 'map',
-				latitude: 39.909,
-				longitude: 116.39742,
 				// covers: [{
 				// 	id: 0,
 				// 	latitude: 39.9085,
@@ -69,40 +72,53 @@
 
 			},
 		},
+		onShow() {
+			let that = this
+			uni.getStorage({
+				key: 'setPosition',
+				success: (res) => {
+					console.log(res.data)
+					that.position = res.data
+					that.position.longitude = res.data.location.split(',')[0];
+					that.position.latitude = res.data.location.split(',')[1];
+					
+					console.log(that.position.longitude)
+					console.log(that.position.latitude)
+					// uni.removeStorage({
+					// 	key: 'setLocaltion'
+					// })
+				},
+			
+			})
+		},
 		onLoad() {
 			// this.getLocation()
 		},
 		methods: {
-			getLocation() {
-				let that = this;
-				uni.getLocation({
-					type: 'gcj02',
-					geocode: true,
+			naviageToPage(item) {
+				uni.setStorage({
+					key: 'setPositionType',
+					data:{type:1},
 					success: function(res) {
-						that.nowLocation.longitude = res.longitude
-						that.nowLocation.latitude = res.latitude
-						that.covers[0].longitude = res.longitude
-						that.covers[0].latitude = res.latitude
-						console.log('获取位置数据:', res);
-						console.log('当前位置的经度:' + res.longitude);
-						console.log('当前位置的纬度:' + res.latitude);
-						//拼接当前定位回显地址
-						// let _address = res.address
-						// this.address = _address
+						console.log(item)
+						uni.navigateTo({
+							url: item
+						})
 					}
 				});
+			
 			},
 			tap(e) {
 					let newmarker =[];
 							var id=1;
-				this.longitude = e.detail.longitude;
-				this.latitude = e.detail.latitude;
+				this.position.longitude = e.detail.longitude;
+				this.position.latitude = e.detail.latitude;
 				console.log(this.longitude)
 				console.log(this.latitude)
 				let maker= {
 					id: id++,
-					latitude: this.latitude,
-					longitude:this.longitude,
+					latitude: this.position.latitude,
+					longitude:this.position.longitude,
 					iconPath: '../../../static/img/location.png',
 				}
 				newmarker.push(maker)
@@ -111,7 +127,7 @@
 			},
 			config() {
 				uni.navigateTo({
-
+						url:"/pages/grain_pulse/enter?position="+JSON.stringify(this.position)
 				})
 			}
 		}
@@ -157,4 +173,8 @@
 	.bottom-content{
 		font-size: 28rpx;
 	}
+	.location {
+		width: 27rpx;
+		height: 31rpx;
+	}
 </style>

+ 98 - 64
pages/grain_pulse/localtion/coordinate.vue

@@ -1,17 +1,21 @@
 <template>
 	<view class="container">
 		<view class="content">
-			<text class="title-style">{{nowLocation.address}}</text>
-			<map class="map" @tap="tap" @markertap="markertap" :latitude="nowLocation.latitude"
-				:longitude="nowLocation.longitude" :markers="covers"
+			<view @click='naviageToPage("/pages/grain_pulse/position/position")'>
+				<image class='location' src="@/static/img/liangmai/icon_ditu.png" mode=""></image>
+				<text class="title-style">{{position.name}}</text>
+			</view>
+			<map class="map" @tap="tap" @markertap="markertap" :latitude="position.latitude"
+				:longitude="position.longitude" :markers="covers"
 				:style="{height: nowMapIndex ? nintyPercentScreenHeight : seventyPercentScreenHeight,width:'750rpx,flex:1'}">
 			</map>
 		</view>
 		<view class="bottom">
-			<text class="bottom-text">
-				{{longitude}},{{latitude}}
-			</text>
-			<text class="config" @click="config">确定</text>
+			<view class="bottom-left">
+				<text class="bottom-content">经度:{{position.longitude}}</text>
+				<text class="bottom-content">纬度:{{position.latitude}}</text>
+			</view>
+			<text class="config-btn" @click="config">确定</text>
 		</view>
 	</view>
 </template>
@@ -23,33 +27,37 @@
 				nowMapIndex: true,
 				phoneHeight: '', //屏幕高
 				phoneWidth: '', //屏幕宽
-				detail: {
-					longitude: '',
-					latitude: ''
-				},
-				nowLocation: {
-					longitude: '',
-					latitude: '',
-					address: '山海广场'
+				position: {
+					longitude: 116.39747,
+					latitude: 39.9085,
+					address: '未指定地点'
 				},
+				longitude: 116.39747,
+				latitude: 39.9085,
 				title: 'map',
-				latitude: 39.909,
-				longitude: 116.39742,
-				covers: [{
-					id: 0,
-					latitude: 39.9085,
-					longitude: 116.39747,
-					iconPath: '../../../static/img/location.png',
-				}]
+				// covers: [{
+				// 	id: 0,
+				// 	latitude: 39.9085,
+				// 	longitude: 116.39747,
+				// 	iconPath: '../../../static/img/location.png',
+				// }],
+				covers: []
 			}
 		},
 		onReady() {
-	
+			// 计算屏幕高度 ,宽度
+			let _this = this;
+			uni.getSystemInfo({
+				success(res) {
+					_this.phoneHeight = res.windowHeight;
+					_this.phoneWidth = res.windowWidth
+				}
+			});
 		},
 		computed: { //计算
-			nintyPercentScreenHeight() { //百分之九十的屏幕高
+			nintyPercentScreenHeight() { //百分之的屏幕高
 				if (this.phoneHeight !== '' && this.phoneWidth !== '') {
-					return 750 / (this.phoneWidth) * (this.phoneHeight) * 0.9 + 'rpx'
+					return 750 / (this.phoneWidth) * (this.phoneHeight) + 'rpx'
 				} else {
 					return '1250rpx'
 				}
@@ -64,47 +72,62 @@
 
 			},
 		},
+		onShow() {
+			let that = this
+			uni.getStorage({
+				key: 'setPosition',
+				success: (res) => {
+					console.log(res.data)
+					that.position = res.data
+					that.position.longitude = res.data.location.split(',')[0];
+					that.position.latitude = res.data.location.split(',')[1];
+					
+					console.log(that.position.longitude)
+					console.log(that.position.latitude)
+					// uni.removeStorage({
+					// 	key: 'setLocaltion'
+					// })
+				},
+			
+			})
+		},
 		onLoad() {
-			// 计算屏幕高度 ,宽度
-			let _this = this;
-			uni.getSystemInfo({
-				success(res) {
-					_this.phoneHeight = res.windowHeight;
-					_this.phoneWidth = res.windowWidth
-				}
-			});
-			this.getLocation()
+			// this.getLocation()
 		},
 		methods: {
-			getLocation() {
-				let that = this;
-				uni.getLocation({
-					type: 'gcj02',
-					geocode: true,
+			naviageToPage(item) {
+				uni.setStorage({
+					key: 'setPositionType',
+					data:{type:1},
 					success: function(res) {
-						that.nowLocation.longitude = res.longitude
-						that.nowLocation.latitude = res.latitude
-						that.covers[0].longitude = res.longitude
-						that.covers[0].latitude = res.latitude
-						console.log('获取位置数据:', res);
-						console.log('当前位置的经度:' + res.longitude);
-						console.log('当前位置的纬度:' + res.latitude);
-						//拼接当前定位回显地址
-						// let _address = res.address
-						// this.address = _address
+						console.log(item)
+						uni.navigateTo({
+							url: item
+						})
 					}
 				});
+			
 			},
 			tap(e) {
-				this.longitude = e.detail.longitude;
-				this.latitude = e.detail.latitude;
+					let newmarker =[];
+							var id=1;
+				this.position.longitude = e.detail.longitude;
+				this.position.latitude = e.detail.latitude;
 				console.log(this.longitude)
 				console.log(this.latitude)
+				let maker= {
+					id: id++,
+					latitude: this.position.latitude,
+					longitude:this.position.longitude,
+					iconPath: '../../../static/img/location.png',
+				}
+				newmarker.push(maker)
+				this.covers = newmarker
 
 			},
-			config() {
+			config() {debugger
 				uni.navigateTo({
-
+						url:"/pages/grain_pulse/enter?position="+JSON.stringify(this.position)
 				})
 			}
 		}
@@ -118,18 +141,18 @@
 	}
 
 	.bottom {
-		width: 750rpx;
-		flex: 1;
-		background: white;
 		position: fixed;
 		bottom: 54rpx;
-		left: 0;
+		left: 25rpx;
 		right: 0;
-		display: flex;
+		width:700rpx;
+		background: white;
 		flex-direction: row;
+		flex: 1;
 		justify-content: space-between;
-		height: 84rpx;
 		align-items: center;
+		padding: 22rpx 20rpx 22rpx 49rpx;
+		border-radius: 20rpx;
 	}
 
 	.title-style {
@@ -137,10 +160,21 @@
 		font-weight: 500;
 		color: #333333;
 	}
-	.bottom-text{
-		
+	.config-btn{
+		width: 144rpx;
+		height: 67rpx;
+		line-height: 67rpx;
+		background: #22C572;
+		border-radius: 10rpx;
+		color: white;
+		text-align: center;
+		font-size: 28rpx;
+	}
+	.bottom-content{
+		font-size: 28rpx;
 	}
-	.config{
-		background:#22C572 ;
+	.location {
+		width: 27rpx;
+		height: 31rpx;
 	}
 </style>

+ 76 - 38
pages/grain_pulse/position/position.vue

@@ -34,7 +34,8 @@
 
 		</view>
 		<view class="search-content" v-if="addressName!=''">
-			<view v-for="(item,index) in searchList" :key="index" class="search-contnet-item" @click="addressClick(item)">
+			<view v-for="(item,index) in searchList" :key="index" class="search-contnet-item"
+				@click="addressClick(item)">
 				<view class="top">
 					<view v-html="item.newName" class="content"></view>
 					<view class="distance" v-if="address!='定位失败,请点击重新定位'">{{item.distance}}千米</view>
@@ -74,6 +75,9 @@
 				seach: {
 					latitude: 39.92,
 					longitude: 116.46,
+				},
+				positionType: {
+					type: ""
 				}
 			}
 		},
@@ -87,10 +91,19 @@
 					this.seach.longitude = res.data.longitude
 					this.seach.latitude = res.data.latitude
 					that.city = res.data.positionName.cityName
+					console.log("that.city", that.city)
 					// console.log("city", that.city)
-					uni.removeStorage({
-						key: 'nowRegion'
-					})
+					// uni.removeStorage({
+					// 	key: 'nowRegion'
+					// })
+				},
+			})
+			uni.getStorage({
+				key: 'setPositionType',
+				success: (res) => {
+					console.log("positionType", res.data)
+					this.positionType = res.data
+
 				},
 			})
 		},
@@ -107,23 +120,34 @@
 			this.getLocation()
 		},
 		methods: {
-			addressClick(item){
+			addressClick(item) {
+				debugger
 				this.list.push(item)
 				uni.setStorage({
 					key: 'SearchList_key',
 					data: this.list
 				});
-				uni.setStorage({
-					key: 'setLocaltion',
-					data: item,
-					success: (res) => {
-						uni.switchTab({
-							url:'../home'
-						})
-					},
-				
-				})
-				
+				if (this.positionType.type == 1) {
+					uni.setStorage({
+						key: 'setPosition',
+						data: item,
+						success: (res) => {
+							uni.navigateTo({
+								url: '../localtion/coordinate'
+							})
+						}
+					})
+				} else {
+					uni.setStorage({
+						key: 'setLocaltion',
+						data: item,
+						success: (res) => {
+							uni.switchTab({
+								url: '../home'
+							})
+						},
+					})
+				}
 			},
 			// 排序
 			compare(property) {
@@ -168,7 +192,7 @@
 						//拼接当前定位回显地址
 						// #ifdef APP-PLUS
 						let _address = res.address
-						that.city = _address.city
+						// that.city = _address.city
 						that.seach.longitude = res.longitude
 						that.seach.latitude = res.latitude
 						that.address = _address.province + _address.city + _address.district + _address
@@ -291,21 +315,29 @@
 				})
 			},
 			toHome(item) {
-				console.log("跳转首页")
-				uni.setStorage({
-					key: 'setLocaltion',
-					data: item,
-					success() {
-						uni.switchTab({
-							url: "../home",
-							success(e) {
-								console.log(e)
+				if (this.positionType.type == 1) {
+					uni.setStorage({
+						key: 'setPosition',
+						data: item,
+						success: (res) => {
+							uni.navigateTo({
+								url: '../localtion/coordinate'
+							})
+						}
+					})
+				} else {
 
-							}
-						});
-					}
+					uni.setStorage({
+						key: 'setLocaltion',
+						data: item,
+						success: (res) => {
+							uni.switchTab({
+								url: '../home'
+							})
+						},
 
-				})
+					})
+				}
 			}
 		}
 	}
@@ -392,29 +424,35 @@
 		padding: 16rpx 24rpx;
 		margin: 0 20rpx 20rpx 0;
 	}
-	.search-content{
+
+	.search-content {
 		border-radius: 20rpx 20rpx 0 0;
 		margin-top: 20rpx;
-		padding:10rpx 20rpx;
+		padding: 10rpx 20rpx;
 		background: white;
-		.search-contnet-item{
-			border-bottom:1px solid #EEEEEE;
+
+		.search-contnet-item {
+			border-bottom: 1px solid #EEEEEE;
 			padding-bottom: 10rpx;
 			margin-top: 20rpx;
-			.top{
+
+			.top {
 				display: flex;
 				justify-content: space-between;
-				.content{
+
+				.content {
 					font-size: 28rpx;
 					font-weight: 400;
 				}
-				.distance{
+
+				.distance {
 					font-size: 24rpx;
 					font-weight: 400;
 					color: #AFB3BF;
 				}
 			}
-			.bottom{
+
+			.bottom {
 				margin-top: 6rpx;
 				font-size: 24rpx;
 				font-weight: 400;

+ 92 - 13
pages/grain_pulse/record.vue

@@ -31,10 +31,12 @@
 						<view style="color: #AFB3BF; margin-top: 4rpx;">{{item.updateDate}}</view>
 					</view>
 					<view class="flex" style="width: 40%; justify-content: flex-end;margin: 40rpx;">
-						<view style="color: #FE6430;" v-if="item.status == '审核中' || item.status == '未审核'|| item.status == '待审核'">{{item.status}}</view>
+						<view style="color: #FE6430;"
+							v-if="item.status == '审核中' || item.status == '未审核'|| item.status == '待审核'">{{item.status}}
+						</view>
 						<view style="color: #22C572;" v-if="item.status == '已通过'">{{item.status}}</view>
 						<view style="color: #FB1E1E;" v-if="item.status == '已驳回'">{{item.status}}</view>
-						
+
 					</view>
 				</view>
 				<view class="title">{{item.title}}</view>
@@ -61,6 +63,14 @@
 				</view>
 			</view>
 		</view>
+		<view v-show="isLoadMore">
+			<!-- <uni-load-more :status="loadStatus"></uni-load-more> -->
+			<!-- <u-loadmore :status="status" /> -->
+			<u-loadmore :status="loadStatus" icon icon-type="circle" margin-bottom="80" margin-top="60rpx" />
+		</view>
+		<view style='height:12vh;background:#F5F6FA;line-height:12vh;text-align:center;' v-if='release.length == 0'>
+			当前暂无结果
+		</view>
 	</view>
 </template>
 
@@ -99,14 +109,16 @@
 						changeCss: "label",
 					}
 				],
-				release: [{
-					imgList: [],
-				}],
+				release: [],
+				releaseInfo: [],
 				currentPage: 1,
 				pageSize: 10,
 				imgList: [],
 				userName: "",
 				searchType: "",
+				searchTypeInfo: "",
+				isLoadMore: false,
+				loadStatus: "loading",
 
 			}
 		},
@@ -118,6 +130,25 @@
 			this.portraits = this.userInfo.avatarUrl
 			this.getRelease()
 		},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.getRelease()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() { //上拉触底函数
+			var that = this
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.currentPage += 1
+				setTimeout(function() {
+					uni.stopPullDownRefresh();
+					that.getRelease()
+				}, 1000);
+				// this.getRelease()
+			}
+		},
 		methods: {
 			navBack() {
 				uni.navigateBack(1)
@@ -138,7 +169,7 @@
 					this.searchType = "2"
 				} else if (item.name == "未通过") {
 					this.searchType = "3"
-				} else{
+				} else {
 					this.searchType = ""
 				}
 				this.getRelease()
@@ -152,12 +183,53 @@
 					})
 					.then(res => {
 						if (res.data.code == 200) {
+							if (!this.searchType) {
+								this.releaseInfo = res.data.data.records
+								if (this.releaseInfo.length > 0) {
+									this.release = this.release.concat(this.releaseInfo)
+									this.count = this.release.length
+									this.isLoadMore = false
+									for (let i = 0; i < this.release.length; i++) {
+										this.release[i].imgList = this.release[i].address.split(",")
+									}
+								} else {
+									this.loadStatus = 'nomore'
+								}
+							} else {
+								debugger
+								if (this.searchTypeInfo == this.searchType) {
+									this.releaseInfo = res.data.data.records
+									if (this.releaseInfo.length > 0) {
+										this.release = this.release.concat(this.releaseInfo)
+										this.count = this.release.length
+										this.isLoadMore = false
+										for (let i = 0; i < this.release.length; i++) {
+											this.release[i].imgList = this.release[i].address.split(",")
+										}
+									} else {
+										this.loadStatus = 'nomore'
+									}
+								}else{
+										this.release = []
+										this.releaseInfo = res.data.data.records
+										if (this.releaseInfo.length > 0) {
+											this.release = this.release.concat(this.releaseInfo)
+											this.count = this.release.length
+											this.isLoadMore = false
+											for (let i = 0; i < this.release.length; i++) {
+												this.release[i].imgList = this.release[i].address.split(",")
+											}
+										} else {
+											this.loadStatus = 'nomore'
+										}
+								}
+								this.searchTypeInfo = this.searchType
 
-							this.release = res.data.data.records
-							this.count = this.release.length
-							for (let i = 0; i < this.release.length; i++) {
-								this.release[i].imgList = this.release[i].address.split(",")
 							}
+
+
+
+
 						}
 					})
 			},
@@ -222,11 +294,18 @@
 
 	.modular {
 		width: 94%;
-		margin: 0 auto;
+		margin: 40rpx auto;
 		background-color: #FFFFFF;
 		border-radius: 40rpx;
-		margin-top: 40rpx;
+		// margin-top: 40rpx;
+	}
 
+	.modular {
+		width: 94%;
+		margin: 20rpx auto;
+		background-color: #FFFFFF;
+		border-radius: 40rpx;
+		margin-top: 40rpx;
 	}
 
 	.introduce {
@@ -286,7 +365,7 @@
 	}
 
 	.titleText {
-		font-size: 34rpx;
+		font-size: 30rpx;
 		margin-left: 30rpx;
 		margin-top: 10rpx;
 	}

+ 69 - 34
pages/grain_pulse/release.vue

@@ -5,18 +5,18 @@
 				<view class="c-row b-b ">
 					<view style="width: 30%;color: #71747C;font-size: 30rpx;">发布主体</view>
 					<view class="flex" style="width: 70%;justify-content: flex-end;">
-						<picker :range="companyType" @change="companyChange($event)" style="margin-right: 0px;">
-							<view>{{companyIndex > -1?companyType[companyIndex]:'请选择发布主体'}}</view>
+						<picker :range="companyType" @change="companyChange($event)"
+							style="margin-right: 6rpx;font-size: 30rpx;">
+							<view>{{companyIndex > -1?companyType[companyIndex] :'请选择发布主体'}}</view>
 						</picker>
 						<u-icon name="arrow-right" color="#AFB3BF" :custom-style="{'marginRight':'10rpx'}"></u-icon>
 					</view>
-
 				</view>
-				<view class="c-row">
+				<view class="c-row" @click="location">
 					<view style="width: 30%;color: #71747C;font-size: 30rpx;">城市</view>
-					<view class="flex" style="width: 70%;justify-content: flex-end;">
-						{{chengshi == null || chengshi == "" ? "请选择城市": chengshi}}
-
+					<view class="flex"
+						style="width: 70%;justify-content: flex-end;margin-right: 6rpx;font-size: 30rpx;">
+						{{release.city == null || release.city == "" ? "请选择城市": release.city}}
 					</view>
 					<u-icon name="arrow-right" color="#AFB3BF" :custom-style="{'marginRight':'10rpx'}"></u-icon>
 				</view>
@@ -28,8 +28,8 @@
 				</view>
 				<view class="inputText">
 					<u-input v-model="release.content" type="textarea" :border="border" :height="height"
-						:auto-height="autoHeight" class="a" maxlength="200"
-						placeholder="请发布粮食类商品交易信息,建议包含联系方式、地址等信息,不超过200个字" @input="wordJiSuan" :clearable="clear" />
+						:auto-height="autoHeight" maxlength="200" placeholder="请发布粮食类商品交易信息,建议包含联系方式、地址等信息,不超过200个字"
+						@input="wordJiSuan" :clearable="clear" />
 				</view>
 				<view style="text-align: right;color: #C5CAD4;font-size: 30rpx;margin-right: 20rpx;">{{wordCount}}/200字
 				</view>
@@ -54,7 +54,7 @@
 		data() {
 			return {
 				deptList: {},
-				chengshi: "", //城市
+				chengshi: [], //城市
 				clear: false,
 				border: false,
 				height: 300,
@@ -69,15 +69,21 @@
 				companyType: [],
 				release: {},
 				address: [],
-				getCompany: {}
+				getCompany: {},
+				companyType1: [],
 			}
 		},
-		onShow() {
-			this.companyList()
-		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
+		onShow() {
+			this.chengshi = uni.getStorageSync("Visit_key")
+			if (this.chengshi.length > 0) {
+				this.release.city = this.chengshi[0].cityName
+			}
+			this.companyList()
+		},
+
 		methods: {
 			companyList() {
 				this.getCompany.loginPhone = this.userInfo.phone
@@ -140,33 +146,62 @@
 					}
 				}
 				if (!this.release.content && this.address.length == 0) {
-					console.log("进入")
 					this.$api.msg("动态内容和图片不能同时为空")
 					return
 				}
-				this.release.city = "营口"
-				this.release.address = this.address.toString()
-				this.release.phone = this.userInfo.phone
-				var that = this
-				uni.showModal({
-					content: "确定发布动态?",
-					showCancel: true,
-					confirmText: '确定',
-					success: function(res) {
-						if (res.confirm) {
-							that.$api.doRequest('post',
-									'/settledCompanyDynamics/api/addSettledCompanyDynamics', that.release)
-								.then(res => {
-									if (res.data.code == 200) {
-										uni.navigateBack(1)
-									}
+				if (this.companyType.length == 0) {
+					uni.showModal({
+						content: "您还没有入驻粮脉,不能发布,是否前去完善入驻信息!",
+						showCancel: true,
+						confirmText: '前往',
+						success: function(res) {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: `/pages/grain_pulse/enter`
 								})
+							}
 						}
-					}
-				})
-			}
+					})
+					return
+				} else {
+					this.release.address = this.address.toString()
+					this.release.phone = this.userInfo.phone
+					var that = this
+					uni.showModal({
+						content: "确定发布动态?",
+						showCancel: true,
+						confirmText: '确定',
+						success: function(res) {
+							if (res.confirm) {
+								that.$api.doRequest('post',
+										'/settledCompanyDynamics/api/addSettledCompanyDynamics', that.release)
+									.then(res => {
+										if (res.data.code == 200) {
+											uni.showToast({
+												title: '发布成功!',
+												icon: 'none',
+												duration: 2000,
+												success() {
+													setTimeout(function() {
+														uni.navigateBack(1)
+													}, 1000);
+												}
+											})
+
+										}
+									})
+							}
+						}
+					})
+				}
 
 
+			},
+			location() {
+				uni.navigateTo({
+					url: `/pages/grain_pulse/position/position`
+				})
+			}
 		}
 	}
 </script>

Vissa filer visades inte eftersom för många filer har ändrats