Bläddra i källkod

前端小程序 sdy

zhongtianhaoyuan 3 år sedan
förälder
incheckning
208fd114e6

+ 2 - 2
App.vue

@@ -60,7 +60,7 @@
 						});
 						if(value != 0){
 							uni.setTabBarBadge({
-								index:3,
+								index:4,
 								text:value+""
 							})
 						}
@@ -120,7 +120,7 @@
 
 <style lang='scss'>
 	@import 'static/css/common.css';
-	@import "static/css/font.css";
+	/* @import "static/css/font.css"; */
 	@import "static/iconfont/iconfont.css";
 	@import "components/colorui/main.css";
 	@import "components/colorui/icon.css";

+ 80 - 51
components/linzq-citySelect/linzq-citySelect.vue

@@ -1,41 +1,41 @@
 <template>
-	<div class="wrapper" :style="'top:'+statusBarHeight+'px'">
+	<div class="wrapper">
 		<div class="header">
-			<view class="back_div">
+<!-- 			<view class="back_div">
 				<image class="back_img" @click="back_city()" src="../../static/img/login/logo@2x.png" mode=""></image>
-			</view>
-			<input class="input" @input="onInput" placeholder="中文/拼音/首字母" v-model="searchValue" />
+			</view> -->
+			<input class="input" @input="onInput" placeholder="请输入城市中文/拼音/首字母" v-model="searchValue" />
 		</div>
 		<scroll-view class="calendar-list" scroll-y="true" :scroll-into-view="scrollIntoId">
 			<view v-if="disdingwei" id="hot">
 				<!-- 定位模块 -->
 				<view class="dingwei">
 					<view class="dingwei_Tips">
-						当前定位
+						当前城市
 					</view>
-					<view class="dingwei_city">
-						<view class="dingwei_city_one">
+					<view class="dingwei_citytop">
+						<view class="" style="margin-bottom: 0;">
 							{{position}}
 						</view>
 						<view class="dingweis_div" @click="getWarpweft">
-							<image class="dingweis" src="../../static/img/login/logo@2x.png" mode=""></image>
 							<text>{{po_tips}}</text>
 						</view>
 					</view>
 				</view>
 
-				<!-- 最近模块 -->
-				<view class="dingwei" v-if="Visit.length>=0">
-					<view class="dingwei_Tips">
-						最近访问
-					</view>
-					<view class="dingwei_city dingwei_city_zuijin">
-						<view class="dingwei_city_one toright" v-for="(item,index) in Visit" v-if="index<2" @click="back_city(item)">
-							{{item.cityName}}
-						</view> 
-					</view>
-				</view>
+		
 
+			</view>
+			<!-- 最近模块 -->
+			<view class="dingwei vist-list" v-if="Visit.length>=0">
+				<view class="dingwei_Tips">
+					访问记录
+				</view>
+				<view class="dingwei_city dingwei_city_zuijin">
+					<view class="dingwei_city_one toright" v-for="(item,index) in Visit" @click="back_city(item)">
+						{{item.cityName}}
+					</view> 
+				</view>
 			</view>
 
 
@@ -54,7 +54,7 @@
 
 		<!-- 右侧字母 -->
 		<view class="letters" v-if="searchValue == ''">
-			<view class="letters-item" @click="scrollTo('hot')">最近</view>
+			<!-- <view class="letters-item" @click="scrollTo('hot')">最近</view> -->
 			<view class="letters-item" v-for="item in letter" :key="item" @click="scrollTo(item)">{{ item }}</view>
 		</view>
 
@@ -83,7 +83,8 @@
 
 		data() {
 			return {
-				statusBarHeight: this.statusBarHeight,
+				// statusBarHeight: this.statusBarHeight,
+				statusBarHeight: 45,
 				ImgUrl: this.ImgUrl,
 				letter: [],
 				selectLetter: '',
@@ -95,7 +96,7 @@
 				showMask: false,
 				disdingwei: true,
 				Visit: [], //最近访问
-				position: '青岛',
+				position: '营口',
 				longitude: '', //经度
 				latitude: '', //纬度
 				seconds: 3,
@@ -225,12 +226,13 @@
 				let countdown = setInterval(() => {
 					that.seconds--;
 					uni.getLocation({
-						type: 'wgs84',
+						type: 'gcj02',
 						success: function(res) {
 							console.log('当前位置的经度:' + res.longitude);
 							console.log('当前位置的纬度:' + res.latitude);
 							that.longitude = res.longitude
 							that.latitude = res.latitude
+							that.position = res.address.city
 						}
 					});
 					if (that.seconds <= 0) {
@@ -248,7 +250,7 @@
 	.wrapper {
 		position: fixed;
 		z-index: 999999;
-		background: #ffffff;
+		/* background: #ffffff; */
 		height: 100%;
 		width: 100%;
 		top: 0px;
@@ -273,7 +275,7 @@
 		width: 120upx;
 		border-radius: 60upx;
 		display: flex;
-		background: rgba(0, 0, 0, 0.5);
+		background:#22C572;
 		justify-content: center;
 		align-items: center;
 		font-size: 40upx;
@@ -283,14 +285,15 @@
 	.content {
 		height: 100%;
 		width: 100%;
-		background-color: #ffffff;
+		/* background-color: #ffffff; */
 	}
 
 	.header {
 		height: 85upx;
 		display: flex;
-		justify-content: flex-start;
+		justify-content: center;
 		align-items: center;
+		background: white;
 	}
 
 
@@ -309,7 +312,7 @@
 
 	.input {
 		font-size: 28upx;
-		width: 620upx;
+		width: 90%;
 		height: 55upx;
 		border-radius: 40upx;
 		background-color: #F5F5F5;
@@ -346,7 +349,7 @@
 		top: 83upx;
 		bottom: 0upx;
 		width: 100%;
-		background-color: #FFFFFF;
+		/* background-color: #FFFFFF; */
 	}
 
 	.letters {
@@ -355,7 +358,7 @@
 		bottom: 0px;
 		width: 50upx;
 		top: 260upx;
-		color: #2f9bfe;
+		color: #333333;
 		text-align: center;
 		font-size: 24upx;
 	}
@@ -398,7 +401,9 @@
 		width: 100%;
 		padding-top: 25upx;
 		box-sizing: border-box;
-		margin-bottom: 26upx;
+		/* margin-bottom: 26upx; */
+		background: reds;
+		padding-bottom: 20rpx;
 	}
 
 	.dingwei_Tips {
@@ -410,32 +415,38 @@
 
 	.dingwei_city {
 		width: 100%;
-		height: 60upx;
-		padding-left: 55upx;
-		padding-right: 70upx;
-		box-sizing: border-box;
+		/* height: 60upx; */
+/* 		padding-left: 55upx;
+		padding-right: 70upx; */
+/* 		box-sizing: border-box;
 		display: flex;
-		justify-content: space-between;
+		justify-content: space-between; */
+		/* width: 25%; */
+		padding-left: 20rpx;
+		display: inline-block;
 	}
 
 	.dingwei_city_one {
-		width: 185upx;
-		height: 60upx;
-		background-color: #F5F5F5;
-		border-radius: 10upx;
-		font-size: 32upx;
+		
+		display: inline-block;
+		text-align: center;
+		line-height: 60rpx;
+		width: 25%;
+		height: 60rpx;
+        background: #F5F6F9;
+		border-radius: 40rpx;
+		font-size: 24rpx;
 		color: #333333;
-		display: flex;
-		justify-content: center;
-		align-items: center;
+		margin-bottom: 20rpx;
+		
 	}
 
 	.dingweis_div {
-		display: flex;
-		align-content: flex-end;
-		align-items: center;
+		display: inline-block;
 		font-size: 24upx;
-		color: #FD5745;
+		color: #22C572;
+		font-weight: 400;
+		
 	}
 
 	.dingweis {
@@ -444,11 +455,29 @@
 	}
 
 	.dingwei_city_zuijin {
-		display: flex;
-		justify-content: flex-start;
+/* 		display: flex;
+		justify-content: flex-start; */
 	}
 
 	.toright {
-		margin-right: 25upx;
+		margin-right: 30upx;
+	}
+	.dingwei_citytop{
+		/* background: red; */
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 30rpx;
+	}
+	#hot{
+		background:white;
+		font-size: 28rpx;
+		padding-bottom: 1rpx;
+		border-radius: 0 0 30rpx 30rpx;
+	}
+	.vist-list{
+		background: white;
+		margin-top: 20rpx;
+		border-radius: 30rpx 30rpx 0 0 ;
 	}
 </style>

+ 134 - 0
components/uni-segmented-control/uni-segmented-control.vue

@@ -0,0 +1,134 @@
+<template>
+	<view class="segmented-control" :class="styleType" :style="wrapStyle">
+		<view v-for="(item, index) in values" class="segmented-control-item" :class="styleType" :key="index" :style="index === currentIndex ? activeStyle : itemStyle" @click="onClick(index)">
+			{{item}}
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'uni-segmented-control',
+		props: {
+			current: {
+				type: Number,
+				default: 0
+			},
+			values: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			activeColor: {
+				type: String,
+				default: '#007aff'
+			},
+			styleType: {
+				type: String,
+				default: 'button'
+			}
+		},
+		data() {
+			return {
+				currentIndex: this.current
+			}
+		},
+		watch: {
+			current(val) {
+				if (val !== this.currentIndex) {
+					this.currentIndex = val;
+				}
+			}
+		},
+		computed: {
+			wrapStyle() {
+				let styleString = '';
+				switch (this.styleType) {
+					case 'text':
+						styleString = `border:0;`;
+						break;
+					default:
+						styleString = `border-color: ${this.activeColor}`;
+						break;
+				}
+				return styleString;
+			},
+			itemStyle() {
+				let styleString = '';
+				switch (this.styleType) {
+					case 'text':
+						styleString = `color:#000;border-left:0;`;
+						break;
+					default:
+						styleString = `color:${this.activeColor};border-color:${this.activeColor};`;
+						break;
+				}
+				return styleString;
+			},
+			activeStyle() {
+				let styleString = '';
+				switch (this.styleType) {
+					case 'text':
+						styleString = `color:${this.activeColor};border-left:0;border-bottom-style:solid;`;
+						break;
+					default:
+						styleString = `color:#fff;border-color:${this.activeColor};background-color:${this.activeColor}`;
+						break;
+				}
+				return styleString;
+			}
+		},
+		methods: {
+			onClick(index) {
+				if (this.currentIndex !== index) {
+					this.currentIndex = index;
+					this.$emit('clickItem', index);
+				}
+			}
+		},
+	}
+</script>
+
+<style>
+	.segmented-control {
+		display: flex;
+		flex-direction: row;
+		justify-content: center;
+		width: 75%;
+		font-size: 28upx;
+		border-radius: 10upx;
+		box-sizing: border-box;
+		margin: 0 auto;
+		overflow: hidden;
+	}
+
+	.segmented-control.button {
+		border: 2upx solid;
+	}
+
+	.segmented-control.text {
+		border: 0;
+		border-radius: 0upx;
+	}
+
+
+	.segmented-control-item {
+		flex: 1;
+		text-align: center;
+		line-height: 60upx;
+		box-sizing: border-box;
+	}
+
+	.segmented-control-item.button {
+		border-left: 1upx solid;
+	}
+
+	.segmented-control-item.text {
+		border-left: 0;
+	}
+
+	.segmented-control-item:first-child {
+		border-left-width: 0;
+	}
+</style>

+ 1 - 1
components/upload.vue

@@ -17,7 +17,7 @@
 				:src="item.url || item.path" :mode="imageMode"></image>
 		</view>
 		<slot name="file" :file="lists"></slot>
-		<view style="display: inline-block;" :class="custom&&options.bgc==''?'customStyle':'customStyleBgc'"
+		<view style="display: inline-block;" :class="custom?'customStyle':''"
 			@tap="selectFile" v-if="maxCount > lists.length">
 			<slot name="addBtn"></slot>
 			<img v-if="custom&&options.bgc!=''" :src="options.bgc" alt="" class="imgstyle">

+ 611 - 0
components/upload_small.vue

@@ -0,0 +1,611 @@
+<template>
+	<view class="u-upload" v-if="!disabled">
+		<view
+			v-if="showUploadList"
+			class="u-list-item u-preview-wrap"
+			v-for="(item, index) in lists"
+			:key="index"
+			:style="{
+				width: width + 'rpx',
+				height: width + 'rpx'
+			}"
+		>
+			<view
+				v-if="deletable"
+				class="u-delete-icon"
+				@tap.stop="deleteItem(index)"
+				:style="{
+					background: delBgColor
+				}"
+			>
+				<u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon>
+			</view>
+			<u-line-progress
+				v-if="showProgress && item.progress > 0 && !item.error"
+				:show-percent="false"
+				height="16"
+				class="u-progress"
+				:percent="item.progress"
+			></u-line-progress>
+			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">点击重试</view>
+			<image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image" v-if="!item.isImage" :src="item.url || item.path" :mode="imageMode"></image>
+		</view>
+		<slot name="file" :file="lists"></slot>
+		<view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length">
+			<slot name="addBtn"></slot>
+			<view
+				v-if="!customBtn"
+				class="u-list-item u-add-wrap"
+				hover-class="u-add-wrap__hover"
+				hover-stay-time="150"
+				:style="{
+					width: width + 'rpx',
+					height: width + 'rpx'
+				}"
+			>
+				<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
+				<view class="u-add-tips">{{ uploadText }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+/**
+ * upload 图片上传
+ * @description 该组件用于上传图片场景
+ * @tutorial https://www.uviewui.com/components/upload.html
+ * @property {String} action 服务器上传地址
+ * @property {String Number} max-count 最大选择图片的数量(默认99)
+ * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
+ * @property {Boolean} show-progress 是否显示进度条(默认true)
+ * @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)
+ * @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)
+ * @property {String} del-icon 右上角删除图标名称,只能为uView内置图标
+ * @property {String} del-bg-color 右上角关闭按钮的背景颜色
+ * @property {String} del-color 右上角关闭按钮图标的颜色
+ * @property {Object} header 上传携带的头信息,对象形式
+ * @property {Object} form-data 上传额外携带的参数
+ * @property {String} name 上传文件的字段名,供后端获取使用(默认file)
+ * @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])
+ * @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])
+ * @property {Boolean} preview-full-image	是否可以通过uni.previewImage预览已选择的图片(默认true)
+ * @property {Boolean} multiple	是否开启图片多选,部分安卓机型不支持(默认true)
+ * @property {Boolean} deletable 是否显示删除图片的按钮(默认true)
+ * @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)
+ * @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性
+ * @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)
+ * @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)
+ * @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)
+ * @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)
+ * @event {Function} on-oversize 图片大小超出最大允许大小
+ * @event {Function} on-preview 全屏预览图片时触发
+ * @event {Function} on-remove 移除图片时触发
+ * @event {Function} on-success 图片上传成功时触发
+ * @event {Function} on-change 图片上传后,无论成功或者失败都会触发
+ * @event {Function} on-error 图片上传失败时触发
+ * @event {Function} on-progress 图片上传过程中的进度变化过程触发
+ * @event {Function} on-uploaded 所有图片上传完毕触发
+ * @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表
+ * @example <u-upload :action="action" :file-list="fileList" ></u-upload>
+ */
+
+import uploadImage from '@/components/ossutil/uploadFile.js';
+export default {
+	name: 'upload',
+	props: {
+		//是否显示组件自带的图片预览功能
+		showUploadList: {
+			type: Boolean,
+			default: true
+		},
+		// 后端地址
+		action: {
+			type: String,
+			default: ''
+		},
+		// 最大上传数量
+		maxCount: {
+			type: [String, Number],
+			default: 52
+		},
+		//  是否显示进度条
+		showProgress: {
+			type: Boolean,
+			default: true
+		},
+		// 是否启用
+		disabled: {
+			type: Boolean,
+			default: false
+		},
+		// 预览上传的图片时的裁剪模式,和image组件mode属性一致
+		imageMode: {
+			type: String,
+			default: 'aspectFill'
+		},
+		// 头部信息
+		header: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		// 额外携带的参数
+		formData: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		// 上传的文件字段名
+		name: {
+			type: String,
+			default: 'file'
+		},
+		// 所选的图片的尺寸, 可选值为original compressed
+		sizeType: {
+			type: Array,
+			default() {
+				return ['original', 'compressed'];
+			}
+		},
+		sourceType: {
+			type: Array,
+			default() {
+				return ['album', 'camera'];
+			}
+		},
+		// 是否在点击预览图后展示全屏图片预览
+		previewFullImage: {
+			type: Boolean,
+			default: true
+		},
+		// 是否开启图片多选,部分安卓机型不支持
+		multiple: {
+			type: Boolean,
+			default: true
+		},
+		// 是否展示删除按钮
+		deletable: {
+			type: Boolean,
+			default: true
+		},
+		// 文件大小限制,单位为byte
+		maxSize: {
+			type: [String, Number],
+			default: Number.MAX_VALUE
+		},
+		// 显示已上传的文件列表
+		fileList: {
+			type: Array,
+			default() {
+				return [];
+			}
+		},
+		// 上传区域的提示文字
+		uploadText: {
+			type: String,
+			default: '选择图片'
+		},
+		// 是否自动上传
+		autoUpload: {
+			type: Boolean,
+			default: true
+		},
+		// 是否显示toast消息提示
+		showTips: {
+			type: Boolean,
+			default: true
+		},
+		// 是否通过slot自定义传入选择图标的按钮
+		customBtn: {
+			type: Boolean,
+			default: false
+		},
+		// 内部预览图片区域和选择图片按钮的区域宽度,高等于宽
+		width: {
+			type: [String, Number],
+			default: 200
+		},
+		// 右上角关闭按钮的背景颜色
+		delBgColor: {
+			type: String,
+			default: '#fa3534'
+		},
+		// 右上角关闭按钮的叉号图标的颜色
+		delColor: {
+			type: String,
+			default: '#ffffff'
+		},
+		// 右上角删除图标名称,只能为uView内置图标
+		delIcon: {
+			type: String,
+			default: 'close'
+		},
+		// 如果上传后的返回值为json字符串,是否自动转json
+		toJson: {
+			type: Boolean,
+			default: true
+		},
+		// 上传前的钩子,每个文件上传前都会执行
+		beforeUpload: {
+			type: Function,
+			default: null
+		}
+	},
+	mounted() {},
+	data() {
+		return {
+			lists: [],
+			isInCount: true,
+			uploading: false
+		};
+	},
+	watch: {
+		fileList: {
+			immediate: true,
+			handler(val) {
+				val.map(value => {
+					this.lists.push({ url: value.url, error: false, progress: 100 });
+				});
+			}
+		}
+	},
+	methods: {
+		// 清除列表
+		clear() {
+			this.lists = [];
+			// 如果是清空形式的话,发出"on-list-change"事件
+			this.$emit('on-list-change', this.lists);
+		},
+		// 重新上传队列中上传失败的所有文件
+		reUpload() {
+			this.uploadFile();
+		},
+		// 选择图片
+		selectFile() {
+			if (this.disabled) return;
+			const { name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType } = this;
+			let chooseFile = null;
+			const newMaxCount = maxCount - lists.length;
+			// 设置为只选择图片的时候使用 chooseImage 来实现
+			chooseFile = new Promise((resolve, reject) => {
+				uni.chooseImage({
+					count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,
+					sourceType: sourceType,
+					sizeType,
+					success: resolve,
+					fail: reject
+				});
+			});
+			chooseFile
+				.then(res => {
+					let file = null;
+					let listOldLength = this.lists.length;
+					res.tempFiles.map((val, index) => {
+						// 如果是非多选,index大于等于1或者超出最大限制数量时,不处理
+						if (!multiple && index >= 1) return;
+						if (val.size > maxSize) {
+							this.$emit('on-oversize', val, this.lists);
+							this.showToast('超出允许的文件大小');
+						} else {
+							if (maxCount <= lists.length) {
+								this.$emit('on-exceed', val, this.lists);
+								this.showToast('超出最大允许的文件个数');
+								return;
+							}
+							let fileName = '';
+							let fileNameLength='';
+							let fileFormat = '';
+							//#ifdef H5
+								fileName = val.name.lastIndexOf(".");
+								fileNameLength = val.name.length;
+								fileFormat = val.name.substring(fileName + 1, fileNameLength).toLowerCase();
+							//#endif
+							//#ifndef H5
+								fileName = val.path.lastIndexOf(".");
+								fileNameLength = val.path.length;
+								fileFormat = val.path.substring(fileName + 1, fileNameLength).toLowerCase();
+							//#endif
+							lists.push({
+								url: val.path,
+								fileType: fileFormat,
+								progress: 0,
+								error: false
+							});
+							// 列表发生改变,发出事件,第二个参数为当前发生变化的项的索引
+							this.$emit('on-list-change', this.lists);
+						}
+					});
+					// 每次图片选择完,抛出一个事件,并将当前内部选择的图片数组抛出去
+					this.$emit('on-choose-complete', this.lists);
+					if (this.autoUpload) this.uploadFile(listOldLength);
+				})
+				.catch(error => {
+					// this.$emit('on-error', error);
+				});
+		},
+		// 提示用户消息
+		showToast(message, force = false) {
+			if (this.showTips || force) {
+				uni.showToast({
+					title: message,
+					icon: 'none'
+				});
+			}
+		},
+		// 该方法供用户通过ref调用,手动上传
+		upload() {
+			this.uploadFile();
+		},
+		// 对失败的图片重新上传
+		retry(index) {
+			this.lists[index].progress = 0;
+			this.lists[index].error = false;
+			this.lists[index].response = null;
+			uni.showLoading({
+				title: '重新上传'
+			});
+			this.uploadFile(index);
+		},
+		// 上传图片
+		async uploadFile(index = 0) {
+			if (this.disabled) return;
+			if (this.uploading) return;
+			// 全部上传完成
+			if (index >= this.lists.length) {
+				this.$emit('on-uploaded', this.lists);
+				return;
+			}
+			// 检查上传地址
+			if (!this.action) {
+				this.showToast('请配置上传地址', true);
+				return;
+			}
+			// 检查是否是已上传或者正在上传中
+			if (this.lists[index].progress == 100) {
+				if (this.autoUpload == false) this.uploadFile(index + 1);
+				return;
+			}
+			// 执行before-upload钩子
+			if(this.beforeUpload && typeof(this.beforeUpload) === 'function') {
+				// 执行回调,同时传入索引和文件列表当作参数
+				let beforeResponse = this.beforeUpload(index, this.lists);
+				// 判断是否返回了promise
+				if (!!beforeResponse && typeof beforeResponse.then === 'function') {
+					await beforeResponse.then(res => {
+						// promise返回成功,不进行动作,继续上传
+					}).catch(err => {
+						// 进入catch回调的话,继续下一张
+						return this.uploadFile(index + 1);
+					})
+				} else if(beforeResponse === false) {
+					 // 如果返回false,继续下一张图片的上传
+					return this.uploadFile(index + 1);
+				}
+			}
+			this.lists[index].error = false;
+			this.uploading = true;
+			uploadImage(this.lists[index].url, 'appData/',
+					result => {
+						// 上传成功
+						this.lists[index].response = result;
+						this.lists[index].progress = 0;
+						this.lists[index].error = false;
+						this.$emit('on-success', result, index, this.lists);
+					}
+				)
+			// // 创建上传对象
+			// const task = uni.uploadFile({
+			// 	url: this.action,
+			// 	filePath: this.lists[index].url,
+			// 	name: this.name,
+			// 	formData: this.formData,
+			// 	header: this.header,
+			// 	success: res => {
+			// 		// 判断是否json字符串,将其转为json格式
+			// 		let data = this.toJson && this.checkIsJSON(res.data) ? JSON.parse(res.data) : res.data;
+			// 		if (![200, 201].includes(res.statusCode)) {
+			// 			this.uploadError(index, data);
+			// 		} else {
+			// 			// 上传成功
+			// 			this.lists[index].response = data;
+			// 			this.lists[index].progress = 0;
+			// 			this.lists[index].error = false;
+			// 			this.$emit('on-success', data, index, this.lists);
+			// 		}
+			// 	},
+			// 	fail: e => {
+			// 		this.uploadError(index, e);
+			// 	},
+			// 	complete: res => {
+			// 		uni.hideLoading();
+			// 		this.uploading = false;
+			// 		this.uploadFile(index + 1);
+			// 		this.$emit('on-change', res, index, this.lists);
+			// 	}
+			// });
+			// task.onProgressUpdate(res => {
+			// 	if (res.progress > 0) {
+			// 		this.lists[index].progress = res.progress;
+			// 		this.$emit('on-progress', res, index, this.lists);
+			// 	}
+			// });
+		},
+		// 上传失败
+		uploadError(index, err) {
+			this.lists[index].progress = 0;
+			this.lists[index].error = true;
+			this.lists[index].response = null;
+			this.$emit('on-error', err, index, this.lists);
+			this.showToast('上传失败,请重试');
+		},
+		// 删除一个图片
+		deleteItem(index) {
+			uni.showModal({
+				title: '提示',
+				content: '您确定要删除此项吗?',
+				success: res => {
+					if (res.confirm) {
+						if (this.lists[index].process < 100 && this.lists[index].process > 0) {
+							typeof this.lists[index].uploadTask != 'undefined' && this.lists[index].uploadTask.abort();
+						}
+						this.lists.splice(index, 1);
+						this.$forceUpdate();
+						this.$emit('on-remove', index, this.lists);
+						this.showToast('移除成功');
+						// 列表发生改变,发出事件
+						this.$emit('on-list-change', this.lists);
+					}
+				}
+			});
+		},
+		// 用户通过ref手动的形式,移除一张图片
+		remove(index) {
+			// 判断索引的合法范围
+			if (index >= 0 && index < this.lists.length) {
+				this.lists.splice(index, 1);
+				this.$emit('on-list-change', this.lists);
+			}
+		},
+		// 预览图片
+		doPreviewImage(url, index) {
+			if (!this.previewFullImage) return;
+			const images = this.lists.map(item => item.url || item.path);
+			uni.previewImage({
+				urls: images,
+				current: url,
+				success: () => {
+					this.$emit('on-preview', url, this.lists);
+				},
+				fail: () => {
+					uni.showToast({
+						title: '预览图片失败',
+						icon: 'none'
+					});
+				}
+			});
+		},
+		// 判断是否json字符串
+		checkIsJSON(str) {
+			if (typeof str == 'string') {
+				try {
+					var obj = JSON.parse(str);
+					if (typeof obj == 'object' && obj) {
+						return true;
+					} else {
+						return false;
+					}
+				} catch (e) {
+					return false;
+				}
+			}
+			return false;
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+// nvue不能用标签命名样式
+/* #ifndef APP-NVUE */
+image {
+	display: inline-block;
+	// 解决图片加载时可能会瞬间变形的问题
+	will-change: transform;
+}
+
+view,
+text {
+	box-sizing: border-box;
+	flex-direction: row;
+}
+/* #endif */
+.u-upload {
+	display: flex;
+	flex-wrap: wrap;
+	align-items: center;
+}
+
+.u-list-item {
+	width: 200rpx;
+	height: 200rpx;
+	overflow: hidden;
+	margin: 10rpx;
+	background: rgb(244, 245, 246);
+	position: relative;
+	border-radius: 10rpx;
+	display: inline-flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.u-preview-wrap {
+	border: 1px solid rgb(235, 236, 238);
+}
+
+.u-add-wrap {
+	flex-direction: column;
+	color: $u-content-color;
+	font-size: 28rpx;
+}
+
+.u-add-tips {
+	margin-top: 20rpx;
+}
+
+.u-add-wrap__hover {
+	background-color: rgb(235, 236, 238);
+}
+
+.u-preview-image {
+	display: block;
+	width: 100%;
+	height: 100%;
+	border-radius: 10rpx;
+}
+
+.u-delete-icon {
+	position: absolute;
+	top: 10rpx;
+	right: 10rpx;
+	z-index: 10;
+	background-color: $u-type-error;
+	border-radius: 100rpx;
+	width: 44rpx;
+	height: 44rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.u-icon {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.u-progress {
+	position: absolute;
+	bottom: 10rpx;
+	left: 8rpx;
+	right: 8rpx;
+	z-index: 9;
+	width: auto;
+}
+
+.u-error-btn {
+	color: #ffffff;
+	background-color: $u-type-error;
+	font-size: 20rpx;
+	padding: 4px 0;
+	text-align: center;
+	position: absolute;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	z-index: 9;
+	line-height: 1;
+}
+</style>

+ 272 - 0
js_sdk/wa-permission/permission.js

@@ -0,0 +1,272 @@
+/**
+ * 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
+ */
+
+var isIos
+// #ifdef APP-PLUS
+isIos = (plus.os.name == "iOS")
+// #endif
+
+// 判断推送权限是否开启
+function judgeIosPermissionPush() {
+	var result = false;
+	var UIApplication = plus.ios.import("UIApplication");
+	var app = UIApplication.sharedApplication();
+	var enabledTypes = 0;
+	if (app.currentUserNotificationSettings) {
+		var settings = app.currentUserNotificationSettings();
+		enabledTypes = settings.plusGetAttribute("types");
+		console.log("enabledTypes1:" + enabledTypes);
+		if (enabledTypes == 0) {
+			console.log("推送权限没有开启");
+		} else {
+			result = true;
+			console.log("已经开启推送功能!")
+		}
+		plus.ios.deleteObject(settings);
+	} else {
+		enabledTypes = app.enabledRemoteNotificationTypes();
+		if (enabledTypes == 0) {
+			console.log("推送权限没有开启!");
+		} else {
+			result = true;
+			console.log("已经开启推送功能!")
+		}
+		console.log("enabledTypes2:" + enabledTypes);
+	}
+	plus.ios.deleteObject(app);
+	plus.ios.deleteObject(UIApplication);
+	return result;
+}
+
+// 判断定位权限是否开启
+function judgeIosPermissionLocation() {
+	var result = false;
+	var cllocationManger = plus.ios.import("CLLocationManager");
+	var status = cllocationManger.authorizationStatus();
+	result = (status != 2)
+	console.log("定位权限开启:" + result);
+	// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
+	/* var enable = cllocationManger.locationServicesEnabled();
+	var status = cllocationManger.authorizationStatus();
+	console.log("enable:" + enable);
+	console.log("status:" + status);
+	if (enable && status != 2) {
+		result = true;
+		console.log("手机定位服务已开启且已授予定位权限");
+	} else {
+		console.log("手机系统的定位没有打开或未给予定位权限");
+	} */
+	plus.ios.deleteObject(cllocationManger);
+	return result;
+}
+
+// 判断麦克风权限是否开启
+function judgeIosPermissionRecord() {
+	var result = false;
+	var avaudiosession = plus.ios.import("AVAudioSession");
+	var avaudio = avaudiosession.sharedInstance();
+	var permissionStatus = avaudio.recordPermission();
+	console.log("permissionStatus:" + permissionStatus);
+	if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
+		console.log("麦克风权限没有开启");
+	} else {
+		result = true;
+		console.log("麦克风权限已经开启");
+	}
+	plus.ios.deleteObject(avaudiosession);
+	return result;
+}
+
+// 判断相机权限是否开启
+function judgeIosPermissionCamera() {
+	var result = false;
+	var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
+	var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
+	console.log("authStatus:" + authStatus);
+	if (authStatus == 3) {
+		result = true;
+		console.log("相机权限已经开启");
+	} else {
+		console.log("相机权限没有开启");
+	}
+	plus.ios.deleteObject(AVCaptureDevice);
+	return result;
+}
+
+// 判断相册权限是否开启
+function judgeIosPermissionPhotoLibrary() {
+	var result = false;
+	var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
+	var authStatus = PHPhotoLibrary.authorizationStatus();
+	console.log("authStatus:" + authStatus);
+	if (authStatus == 3) {
+		result = true;
+		console.log("相册权限已经开启");
+	} else {
+		console.log("相册权限没有开启");
+	}
+	plus.ios.deleteObject(PHPhotoLibrary);
+	return result;
+}
+
+// 判断通讯录权限是否开启
+function judgeIosPermissionContact() {
+	var result = false;
+	var CNContactStore = plus.ios.import("CNContactStore");
+	var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
+	if (cnAuthStatus == 3) {
+		result = true;
+		console.log("通讯录权限已经开启");
+	} else {
+		console.log("通讯录权限没有开启");
+	}
+	plus.ios.deleteObject(CNContactStore);
+	return result;
+}
+
+// 判断日历权限是否开启
+function judgeIosPermissionCalendar() {
+	var result = false;
+	var EKEventStore = plus.ios.import("EKEventStore");
+	var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
+	if (ekAuthStatus == 3) {
+		result = true;
+		console.log("日历权限已经开启");
+	} else {
+		console.log("日历权限没有开启");
+	}
+	plus.ios.deleteObject(EKEventStore);
+	return result;
+}
+
+// 判断备忘录权限是否开启
+function judgeIosPermissionMemo() {
+	var result = false;
+	var EKEventStore = plus.ios.import("EKEventStore");
+	var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
+	if (ekAuthStatus == 3) {
+		result = true;
+		console.log("备忘录权限已经开启");
+	} else {
+		console.log("备忘录权限没有开启");
+	}
+	plus.ios.deleteObject(EKEventStore);
+	return result;
+}
+
+// Android权限查询
+function requestAndroidPermission(permissionID) {
+	return new Promise((resolve, reject) => {
+		plus.android.requestPermissions(
+			[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
+			function(resultObj) {
+				var result = 0;
+				for (var i = 0; i < resultObj.granted.length; i++) {
+					var grantedPermission = resultObj.granted[i];
+					console.log('已获取的权限:' + grantedPermission);
+					result = 1
+				}
+				for (var i = 0; i < resultObj.deniedPresent.length; i++) {
+					var deniedPresentPermission = resultObj.deniedPresent[i];
+					console.log('拒绝本次申请的权限:' + deniedPresentPermission);
+					result = 0
+				}
+				for (var i = 0; i < resultObj.deniedAlways.length; i++) {
+					var deniedAlwaysPermission = resultObj.deniedAlways[i];
+					console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
+					result = -1
+				}
+				resolve(result);
+				// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
+				// if (result != 1) {
+				// gotoAppPermissionSetting()
+				// }
+			},
+			function(error) {
+				console.log('申请权限错误:' + error.code + " = " + error.message);
+				resolve({
+					code: error.code,
+					message: error.message
+				});
+			}
+		);
+	});
+}
+
+// 使用一个方法,根据参数判断权限
+function judgeIosPermission(permissionID) {
+	if (permissionID == "location") {
+		return judgeIosPermissionLocation()
+	} else if (permissionID == "camera") {
+		return judgeIosPermissionCamera()
+	} else if (permissionID == "photoLibrary") {
+		return judgeIosPermissionPhotoLibrary()
+	} else if (permissionID == "record") {
+		return judgeIosPermissionRecord()
+	} else if (permissionID == "push") {
+		return judgeIosPermissionPush()
+	} else if (permissionID == "contact") {
+		return judgeIosPermissionContact()
+	} else if (permissionID == "calendar") {
+		return judgeIosPermissionCalendar()
+	} else if (permissionID == "memo") {
+		return judgeIosPermissionMemo()
+	}
+	return false;
+}
+
+// 跳转到**应用**的权限页面
+function gotoAppPermissionSetting() {
+	if (isIos) {
+		var UIApplication = plus.ios.import("UIApplication");
+		var application2 = UIApplication.sharedApplication();
+		var NSURL2 = plus.ios.import("NSURL");
+		// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");		
+		var setting2 = NSURL2.URLWithString("app-settings:");
+		application2.openURL(setting2);
+
+		plus.ios.deleteObject(setting2);
+		plus.ios.deleteObject(NSURL2);
+		plus.ios.deleteObject(application2);
+	} else {
+		// console.log(plus.device.vendor);
+		var Intent = plus.android.importClass("android.content.Intent");
+		var Settings = plus.android.importClass("android.provider.Settings");
+		var Uri = plus.android.importClass("android.net.Uri");
+		var mainActivity = plus.android.runtimeMainActivity();
+		var intent = new Intent();
+		intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+		var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
+		intent.setData(uri);
+		mainActivity.startActivity(intent);
+	}
+}
+
+// 检查系统的设备服务是否开启
+// var checkSystemEnableLocation = async function () {
+function checkSystemEnableLocation() {
+	if (isIos) {
+		var result = false;
+		var cllocationManger = plus.ios.import("CLLocationManager");
+		var result = cllocationManger.locationServicesEnabled();
+		console.log("系统定位开启:" + result);
+		plus.ios.deleteObject(cllocationManger);
+		return result;
+	} else {
+		var context = plus.android.importClass("android.content.Context");
+		var locationManager = plus.android.importClass("android.location.LocationManager");
+		var main = plus.android.runtimeMainActivity();
+		var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+		var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
+		console.log("系统定位开启:" + result);
+		return result
+	}
+}
+
+module.exports = {
+	judgeIosPermission: judgeIosPermission,
+	requestAndroidPermission: requestAndroidPermission,
+	checkSystemEnableLocation: checkSystemEnableLocation,
+	gotoAppPermissionSetting: gotoAppPermissionSetting
+}

+ 4 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "1.1.1",
-    "versionCode" : 111,
+    "versionName" : "1.1.2",
+    "versionCode" : 112,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},
@@ -46,6 +46,7 @@
     },
     "app-plus" : {
         "runmode" : "liberate",
+        "nvueStyleCompiler" : "uni-app",
         "privacy" : {
             "prompt" : "template",
             "template" : {
@@ -150,7 +151,7 @@
                 }
             }
         },
-        "nvueCompiler" : "weex",
+        "nvueCompiler" : "uni-app",
         "modules" : {
             "SQLite" : {},
             "Push" : {},

+ 5 - 1
pageA/product/lookup.vue

@@ -211,6 +211,7 @@
 					this.isShowKeywordList = true
 					this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo', {
 							commonId: this.userInfo.id,
+							functionType:"1",
 							searchContent: this.searchKeyWord
 						}).then(res => {})
 						.catch(res => {
@@ -266,6 +267,7 @@
 				this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo', {
 						pageSize: this.pageSize,
 						currentPage: this.currentPage,
+						functionType:"1",
 						commonId: this.userInfo.id
 					}).then(res => {
 						uni.hideLoading()
@@ -339,6 +341,7 @@
 				this.$api.doRequest('get', '/searchRecordsInfo/selectSearchRecordsInfo', {
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
+					functionType:"1",
 					commonId: this.userInfo.id
 				}).then(res => {
 					uni.hideLoading()
@@ -393,7 +396,8 @@
 					success: (res) => {
 						if (res.confirm) {
 							this.$api.doRequest('post', '/searchRecordsInfo/api/deleteSearchRecordsInfo', {
-									commonId: this.userInfo.id
+									commonId: this.userInfo.id,
+									functionType:"1",
 								}).then(res => {
 									if (res.data.code == 200) {
 										uni.showToast({

+ 77 - 52
pages.json

@@ -22,12 +22,12 @@
 				"selectedIconPath": "static/img/jiaoyi_check.png",
 				"text": "交易"
 			},
-			{
-				"pagePath": "pages/grain_pulse/home",
-				"iconPath": "static/img/liangmai.png",
-				"selectedIconPath": "static/img/liangmai_check.png",
-				"text": "粮脉"
-			},
+			// {
+			// 	"pagePath": "pages/grain_pulse/home",
+			// 	"iconPath": "static/img/liangmai.png",
+			// 	"selectedIconPath": "static/img/liangmai_check.png",
+			// 	"text": "粮脉"
+			// },
 			{
 				"pagePath": "pages/tran/tran",
 				"iconPath": "static/img/wuliu.png",
@@ -120,6 +120,13 @@
 				"navigationBarTitleText": "搜索"
 			}
 		},
+		{
+			"path": "pages/grain_pulse/my_grain_pulse",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "我的粮脉"
+			}
+		},
 		{
 			"path": "pages/sale/portprice",
 			"style": {
@@ -537,56 +544,74 @@
             
         }
 
-	    ,{
-            "path" : "pages/grain_pulse/distribution/distribution",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "分布",
-                "enablePullDownRefresh": false,
-				"app-plus": {  
-				                "subNVues":[{  
-				                    "id": "popup", 
-				                    "path": "pages/grain_pulse/distribution/popup",
-				                    "type": "popup",
-				                    "style": {  
-				                        "position": "absolute",  
-				                        "dock": "bottom",  
-				                        "width": "100upx",  
-				                        "height": "150upx",  
-				                        "background": "transparent"  
-				                    }  
-				                }]  
-				            } 
-            }
+	 //    ,{
+  //           "path" : "pages/grain_pulse/distribution/distribution",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "分布",
+  //               "enablePullDownRefresh": false
+		// 		// "app-plus": {  
+		// 		//                 "subNVues":[{  
+		// 		//                     "id": "popup", 
+		// 		//                     "path": "pages/grain_pulse/distribution/subNvue/popup.nvue",
+		// 		//                     "type": "popup",
+		// 		//                     "style": {  
+		// 		//                         "position": "absolute",  
+		// 		//                         "dock": "bottom",  
+		// 		//                         "width": "100upx",  
+		// 		//                         "height": "150upx",  
+		// 		//                         "background": "red"  
+		// 		//                     }  
+		// 		//                 }]  
+		// 		//             } 
+  //   //             "enablePullDownRefresh": false
+  //           }
+  //       }
+  //       ,{
+  //           "path" : "pages/grain_pulse/position/position",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "定位",
+  //               "enablePullDownRefresh": false
+  //           }
             
-        }
-        ,{
-            "path" : "pages/grain_pulse/position/position",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "定位",
-                "enablePullDownRefresh": false
-            }
+  //       }
+  //       ,{
+  //           "path" : "pages/grain_pulse/selectCity/selectCity",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "城市",
+  //               "enablePullDownRefresh": false
+  //           }
             
-        }
-        ,{
-            "path" : "pages/grain_pulse/selectCity/selectCity",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "城市",
-                "enablePullDownRefresh": false
-            }
+  //       }
+  //       ,{
+  //           "path" : "pages/grain_pulse/localtion/localtion",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "位置",
+  //               "enablePullDownRefresh": false
+  //           }
             
-        }
-        ,{
-            "path" : "pages/grain_pulse/localtion/localtion",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "位置",
-                "enablePullDownRefresh": false
-            }
+  //       }
+		// ,{
+		//     "path" : "pages/grain_pulse/localtion/coordinate",
+		//     "style" :                                                                                    
+		//     {
+		//         "navigationBarTitleText": "坐标",
+		//         "enablePullDownRefresh": false
+		//     }
+		    
+		// }
+  //       ,{
+  //           "path" : "pages/grain_pulse/distribution/distribution",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "",
+  //               "enablePullDownRefresh": false
+  //           }
             
-        }
+  //       }
     ],
 	"subpackages": [{
 			"root": "pageA",

+ 1 - 1
pages/attestation/indexTwo.vue

@@ -402,7 +402,7 @@
 					showCancel: true,
 					confirmText: '确定',
 					success: (e) => {
-						if (res.confirm) {
+						if (e.confirm) {
 							this.$api.doRequest('post',
 								'/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', {
 									id: item.id

+ 1 - 1
pages/business/business.vue

@@ -153,7 +153,7 @@
 					});
 					if (value != 0) {
 						uni.setTabBarBadge({
-							index: 3,
+							index: 4,
 							text: value + ""
 						})
 					}

+ 32 - 10
pages/grain_pulse/details.vue

@@ -20,13 +20,13 @@
 		</view>
 		<view class='company'>
 			<view style='padding:21px;'>
-				<view style='font-size:24px;' class='Medium'>中天昊元粮库中天昊元粮库</view>
+				<view style='font-size:24px;' class='Medium'>{{companylist.compName}}</view>
 				<view style='margin-top:3px;' class='flex'>
 					<view class='aptitude'>
 						<image class='aptitudeImage' :src="aptiutudeStatus?'../../static/img/liangmai/bg_no_check.png':'../../static/img/liangmai/bg_check.png'" mode=""></image>
 						<text class='aptitudeText Medium'>资质</text>
 					</view>
-					<view class='Regular' style='font-size:13px;'>主营:<text>烘干塔 粮库 加工厂</text></view>
+					<view class='Regular' style='font-size:13px;'>主营:<text v-for='item in mainBusiness'> {{item}} </text></view>
 				</view>
 				<view style='margin:12.5px 0;' class='flex'>
 					<view class="tag Regular">
@@ -45,8 +45,8 @@
 			<view class="generalSituation">
 				<view class="title Medium">企业概况</view>
 				<view class="content Regular">
-					黑龙江中天昊元贸易有限公司成立至今,从仅2名员工的人资力量以及从俭的办公条件,现以发展转型为员工70余人,年贸易周转量150余万吨的规模性粮食贸易公司…
-				</view>
+					{{companylist.companyContant}}
+					</view>
 			</view>
 			<view class='contactWay'>
 				<view class="title Medium">联系方式</view>
@@ -54,27 +54,27 @@
 					<view class='flex linkman'>
 						<view style='flex:1;' class='title Regular'>联系人</view>
 						<view style='flex:3;'>
-							<view class='Regular linkmanItem' v-for='item in linkmanList'>
-								{{item.name}} <a :href="item.phone"><image class="phone" src="../../static/img/liangmai/dianhau.png" mode=""></image></a>
+							<view class='Regular linkmanItem' v-for='item in companylist.settledCompanyContacts'>
+								{{item.contacts}} <a :href="item.contactsPhone"><image class="phone" src="../../static/img/liangmai/dianhau.png" mode=""></image></a>
 							</view>
 						</view>
 					</view>
 					<view class="flex mailbox">
 						<view style='flex:1;' class='title Regular'>邮箱</view>
 						<view class='Regular' style='font-size:14px;flex:3;'>
-							12345678@xx.com
+							{{companylist.email}}
 						</view>
 					</view>
 					<view class="flex fax">
 						<view style='flex:1;' class='title Regular'>传真</view>
 						<view class='Regular' style='font-size:14px;flex:3;'>
-							12345678@xx.com
+							{{companylist.fax}}
 						</view>
 					</view>
 					<view class="flex fax">
 						<view style='flex:1;' class='title Regular'>地址</view>
 						<view style='font-size:14px;flex:3;' class='Regular'>
-							12345678@xx.com
+							{{companylist.province}}{{companylist.city}}{{companylist.area}}{{companylist.detailedAddress}}
 						</view>
 					</view>
 				</view>
@@ -103,15 +103,37 @@
 					{name:'廖经理',phone:'18513069273'},
 					{name:'廖经理',phone:'18513069273'},
 				],
+				id:0,
 				dotStyle: false,
 				status: 0,
+				companylist:{
+					settledCompanyContacts:[]
+				},
 				show:false,
+				mainBusiness:[],
+				label:[],
 				selector:['纠错','举报'],
 				aptiutudeStatus:false,
 				iscollect:false
 			}
 		},
-		onLoad(){
+		
+		onLoad(options){
+			this.id=options.id
+		},
+		onShow(){
+			var that=this
+			this.$nextTick(function(){
+				that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
+				if(res.data.code==200){
+					that.companylist=res.data.data
+					that.mainBusiness=res.data.data.mainBusinessType.split(',')
+					if(res.data.data.label){
+						that.label=res.data.data.label.split(',')
+					}
+				}
+			})
+			})
 			
 		},
 		methods: {

+ 269 - 0
pages/grain_pulse/distribution/distribution.nvue

@@ -0,0 +1,269 @@
+<template>
+	<view class="container">
+		<view class="header">
+			<view class="now-location">
+				<u-icon name="map" size="36" class="icon"></u-icon>
+				<text class="text Medium title">{{address}}</text>
+			</view>
+			<view class="selectType">
+				<text @click="selectType" class="header-type Regular">{{typeStr}}</text>
+				<!-- 				<u-icon :style="{transform:(showType?'rotate(180deg)':'')}" name="arrow-down-fill" size="8"
+					color="#AFB3BF" class="icon"></u-icon> -->
+			</view>
+		</view>
+		<view class="uni-common-mt">
+			<view class="content">
+				<map class="map" @markertap="markertap" :latitude="nowLocation.latitude"
+					:longitude="nowLocation.longitude" :markers="covers" :enable-poi="true">
+				</map>
+			</view>
+		</view>
+		<view class="alert">
+			<view class="select-alert" v-if="showType">
+				<view class="select-top">
+					<text class="cancel" @click="cancel">取消</text>
+					<text class="confirm" @click="confirm">确定</text>
+				</view>
+				<view class="select">
+					<text class="select-item" v-for="(item,index) in typeList" :key="index">
+						{{item.name}}
+					</text>
+				</view>
+			</view>
+		</view>
+
+		<view class="content2">
+			<view class="no-enterprise Regular" v-if="enterpriseList.length!=0">
+				附近暂无相关企业
+			</view>
+			<view class="warp">
+				<view class="top-line"></view>
+				<view class="bottom-list-item">
+					<view class="left"><img src="../../../static/img/location.png" alt=""></view>
+					<view class="middle">
+						<view class="title Medium">中天昊元粮库中天昊元粮库</view>
+						<view class="location Regular">辽宁省营口市鲅鱼圈区xx路108号</view>
+					</view>
+					<view class="line"></view>
+					<view class="right">
+						<view class="top">
+							<img src="../../../static/img/location.png" alt="">
+						</view>
+						<view class="bottom Regular">500m</view>
+					</view>
+				</view>
+				<view class="bottom-list-item">
+					<view class="left"><img src="../../../static/img/location.png" alt=""></view>
+					<view class="middle">
+						<view class="title Medium">中天昊元粮库中天昊元粮库</view>
+						<view class="location Regular">辽宁省营口市鲅鱼圈区xx路108号</view>
+					</view>
+					<view class="line"></view>
+					<view class="right">
+						<view class="top">
+							<img src="../../../static/img/location.png" alt="">
+						</view>
+						<view class="bottom Regular">500m</view>
+					</view>
+				</view>
+			</view>
+
+		</view>
+	</view>
+</template>
+<script>
+	// import amap from '@/js_sdk/js-amap/amap-wx.130.js'
+	export default {
+		data() {
+			return {
+				address: {},
+				nowLocation: {
+					longitude: '',
+					latitude: ''
+				},
+				showType: false,
+				enterpriseList: [],
+				typeStr: '全部类型',
+				typeList: [{
+						name: "全部"
+					},
+					{
+						name: "粮库"
+					},
+					{
+						name: "加工厂"
+					}
+				],
+				title: 'map',
+				latitude: 39.909,
+				longitude: 116.39742,
+				covers: [{
+					id: 0,
+					latitude: 39.9085,
+					longitude: 116.39747,
+					iconPath: '../../../static/img/location.png',
+				}]
+			}
+		},
+		onShow() {
+
+		},
+		onLoad() {
+			//获取当前位置
+			this.getLocation()
+			// var subnvue = uni.getSubNVueById('popup') // 获取nvue
+			// 	subnvue.show()  // 显示nvue
+			// uni.$on('popup', (data) => {
+			// 	console.log(data)
+			// })  
+		},
+		methods: {
+			confirm() {
+				console.log('确定')
+				this.showType = false
+			},
+			cancel() {
+				console.log('取消')
+				this.showType = false
+			},
+			selectType() {
+				this.showType = true
+				console.log(1)
+			},
+			typeConfirm(e) {
+				console.log(e)
+				this.typeStr = this.typeList[e[0]].name
+
+			},
+			getLocation() {
+				let that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					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
+						let _coverrsData = []
+						for (let i = 0; i < 50; i++) {
+							let _obj = {
+								id: i,
+								latitude: res.latitude += 0.00150,
+								longitude: res.longitude + 0.00150,
+								iconPath: '../../../static/img/location.png',
+								width:30,
+								height:30,
+								callout: {
+									content: '中天昊元粮库',
+									color: '#333333',
+									fontSize: 24,
+									borderRadius: 20,
+									padding:10,
+									bgColor: 'white',
+									display: 'ALWAYS',
+								},
+							}
+							_coverrsData.push(_obj)
+						}
+						that.covers = _coverrsData
+						console.log('获取位置数据:', res);
+						console.log('当前位置的经度:' + res.longitude);
+						console.log('当前位置的纬度:' + res.latitude);
+						//拼接当前定位回显地址
+						let _address = res.address
+
+						that.address = _address.province + _address.city + _address.district + _address.poiName
+						console.log(that.address)
+					}
+				});
+			},
+			markertap(e) {
+				console.log(e)
+				uni.showToast({
+					title: "点击id为" + e.detail.markerId + "的坐标",
+					icon: 'none',
+					duration: 2000
+				})
+			}
+
+		}
+	}
+</script>
+<style scoped>
+	.header {
+		flex-direction: row;
+		justify-content: space-between;
+		margin-bottom: 20rpx;
+		padding: 20rpx;
+	}
+
+	.title {
+		font-size: 32rpx;
+	}
+
+	.content {
+		width: 750px;
+		flex: 1;
+	}
+
+	.map {
+		height: 1350rpx;
+	}
+
+	.content2 {
+		position: fixed;
+		bottom: 0;
+		width: 750rpx;
+		flex: 1;
+		font-size: 34px;
+		background: pink;
+	}
+
+	.header-type {
+		font-size: 26rpx;
+	}
+
+	.alert {
+		flex: 1;
+	}
+
+	.select-alert {
+		background-color: green;
+		position: fixed;
+		bottom: 0;
+		width: 750rpx;
+		flex: 1;
+	}
+
+	.select-top {
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-around;
+		background: yellow;
+		height: 80rpx;
+	}
+
+
+	.select {
+		width: 750rpx;
+		flex: 1;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		background: white;
+	}
+	.cancel{
+		font-size: 24rpx;
+		color: white;
+		font-weight: bold;
+	}
+	.confirm{
+		font-size: 24rpx;
+		color: green;
+		font-weight: bold;
+	}
+	.select-item{
+		font-size: 24rpx;
+	}
+</style>

+ 101 - 151
pages/grain_pulse/distribution/distribution.vue

@@ -1,27 +1,38 @@
 <template>
 	<view class="container">
-<!-- 		<view class="header">
+		<view class="header">
 			<view class="now-location">
 				<u-icon name="map" size="36" class="icon"></u-icon>
-				<view class="text Medium">{{address}}</view>
+				<text class="text Medium title">{{address}}</text>
 			</view>
 			<view class="selectType">
-				<view @click="selectType" class="header-type Regular">{{typeStr}}</view>
-				<u-icon :style="{transform:(showType?'rotate(180deg)':'')}" name="arrow-down-fill" size="8"
-					color="#AFB3BF" class="icon"></u-icon>
+				<text @click="selectType" class="header-type Regular">{{typeStr}}</text>
+				<!-- 				<u-icon :style="{transform:(showType?'rotate(180deg)':'')}" name="arrow-down-fill" size="8"
+					color="#AFB3BF" class="icon"></u-icon> -->
 			</view>
-			<u-picker mode="selector" v-model="showType" @confirm='typeConfirm' confirm-color='#22C572'
-				:range="typeList" range-key="name" :default-selector="[0]"></u-picker>
-		</view> -->
+		</view>
 		<view class="uni-common-mt">
 			<view class="content">
 				<map class="map" @markertap="markertap" :latitude="nowLocation.latitude"
 					:longitude="nowLocation.longitude" :markers="covers" :enable-poi="true">
 				</map>
-				<view @click='show'>显示</view>
 			</view>
 		</view>
-<!-- 		<view class="content2">
+		<view class="alert">
+			<view class="select-alert" v-if="showType">
+				<view class="select-top">
+					<text class="cancel" @click="cancel">取消</text>
+					<text class="confirm" @click="confirm">确定</text>
+				</view>
+				<view class="select">
+					<text class="select-item" v-for="(item,index) in typeList" :key="index">
+						{{item.name}}
+					</text>
+				</view>
+			</view>
+		</view>
+
+		<view class="content2">
 			<view class="no-enterprise Regular" v-if="enterpriseList.length!=0">
 				附近暂无相关企业
 			</view>
@@ -57,7 +68,7 @@
 				</view>
 			</view>
 
-		</view> -->
+		</view>
 	</view>
 </template>
 <script>
@@ -65,7 +76,7 @@
 	export default {
 		data() {
 			return {
-				address: "黑龙江中天...",
+				address: {},
 				nowLocation: {
 					longitude: '',
 					latitude: ''
@@ -95,25 +106,29 @@
 			}
 		},
 		onShow() {
-		
+
 		},
 		onLoad() {
 			//获取当前位置
 			this.getLocation()
-			 var subnvue = uni.getSubNVueById('popup') // 获取nvue
-					subnvue.show()  // 显示nvue
-					uni.$on('popup', (data) => {
-					    vm.title = data.title;  
-					    vm.content = data.content;  
-					})  
+			// var subnvue = uni.getSubNVueById('popup') // 获取nvue
+			// 	subnvue.show()  // 显示nvue
+			// uni.$on('popup', (data) => {
+			// 	console.log(data)
+			// })  
 		},
 		methods: {
-			show(){
-				var subnvue = uni.getSubNVueById('popup') // 获取nvue
-									subnvue.show()
+			confirm() {
+				console.log('确定')
+				this.showType = false
+			},
+			cancel() {
+				console.log('取消')
+				this.showType = false
 			},
 			selectType() {
 				this.showType = true
+				console.log(1)
 			},
 			typeConfirm(e) {
 				console.log(e)
@@ -137,11 +152,14 @@
 								latitude: res.latitude += 0.00150,
 								longitude: res.longitude + 0.00150,
 								iconPath: '../../../static/img/location.png',
+								width:30,
+								height:30,
 								callout: {
 									content: '中天昊元粮库',
 									color: '#333333',
-									fontSize: 12,
+									fontSize: 24,
 									borderRadius: 20,
+									padding:10,
 									bgColor: 'white',
 									display: 'ALWAYS',
 								},
@@ -153,8 +171,10 @@
 						console.log('当前位置的经度:' + res.longitude);
 						console.log('当前位置的纬度:' + res.latitude);
 						//拼接当前定位回显地址
-						// let _address = res.address
-						// this.address = _address
+						let _address = res.address
+
+						that.address = _address.province + _address.city + _address.district + _address.poiName
+						console.log(that.address)
 					}
 				});
 			},
@@ -170,150 +190,80 @@
 		}
 	}
 </script>
-<style lang="scss" scoped>
+<style scoped>
 	.header {
-		display: flex;
-		padding: 20rpx 35rpx;
-		background: white;
+		flex-direction: row;
 		justify-content: space-between;
-		align-items: center;
-
-		.selectType {
-			display: flex;
-			justify-content: center;
-			align-items: flex-end;
-
-			.icon {
-				position: relative;
-				top: -4rpx
-			}
-		}
-
-		.header-type {
-			font-size: 26rpx;
-			color: #333333;
-			margin-right: 10rpx;
-
-		}
-
-		.now-location {
-			display: flex;
-			align-items: center;
-
-			.icon {
-				margin-right: 10rpx;
-			}
+		margin-bottom: 20rpx;
+		padding: 20rpx;
+	}
 
-			.text {
-				font-size: 32rpx;
-				color: #333333;
-			}
-		}
+	.title {
+		font-size: 32rpx;
 	}
 
 	.content {
-		height: calc(100vh - 100px);
-
-		.map {
-			width: 100%;
-			height: 100%;
-		}
+		width: 750px;
+		flex: 1;
 	}
 
-	.no-enterprise {
-		position: fixed;
-		bottom: 20px;
-		height: 84rpx;
-		width: 94%;
-		left: 0;
-		right: 0;
-		margin: auto;
-		background: #FFFFFF;
-		font-size: 26rpx;
-		color: #333333;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		border-radius: 20rpx;
+	.map {
+		height: 1350rpx;
 	}
 
 	.content2 {
-
 		position: fixed;
 		bottom: 0;
-		width: 100%;
-		background: white;
-		border-radius: 20px 20px 0 0;
-		padding: 37rpx 35rpx 20rpx 35rpx;
-
-		.warp {
-			.top-line {
-				width: 68rpx;
-				height: 8rpx;
-				background: #B4B7C3;
-				border-radius: 4px;
-				content: '';
-				display: block;
-				position: absolute;
-				top: 16rpx;
-				left: 0;
-				right: 0;
-				margin: auto;
-			}
-
-			.bottom-list-item {
-				display: flex;
-				justify-content: space-between;
-				align-items: flex-start;
-				border-bottom: 1px solid #EEEEEE;
-				padding: 20rpx 0;
-
-				.left {
-					img {
-						width: 102rpx;
-						border-radius: 10px;
-						background: red;
-					}
-				}
-
-				.middle {
-					position: relative;
-					left: -10rpx;
+		width: 750rpx;
+		flex: 1;
+		font-size: 34px;
+		background: pink;
+	}
 
-					.title {
-						font-size: 32rpx;
-						color: #333333;
-						margin-bottom: 6rpx;
-					}
+	.header-type {
+		font-size: 26rpx;
+	}
 
-					.location {
-						font-size: 24rpx;
-						color: #AFB3BF;
-					}
-				}
+	.alert {
+		flex: 1;
+	}
 
-				.line {
-					width: 1px;
-					height: 80rpx;
-					border: 1px solid #EEEEEE;
-				}
+	.select-alert {
+		background-color: green;
+		position: fixed;
+		bottom: 0;
+		width: 750rpx;
+		flex: 1;
+	}
 
-				.right {
-					display: flex;
-					flex-direction: column;
-					justify-content: center;
-					align-items: center;
+	.select-top {
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-around;
+		background: yellow;
+		height: 80rpx;
+	}
 
-					img {
-						width: 21px;
-					}
 
-					.bottom {
-						font-size: 24rpx;
-						color: #AFB3BF;
-					}
-				}
-			}
-		}
+	.select {
+		width: 750rpx;
+		flex: 1;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		background: white;
+	}
+	.cancel{
+		font-size: 24rpx;
+		color: white;
+		font-weight: bold;
+	}
+	.confirm{
+		font-size: 24rpx;
+		color: green;
+		font-weight: bold;
+	}
+	.select-item{
+		font-size: 24rpx;
 	}
 </style>

+ 0 - 127
pages/grain_pulse/distribution/subNvue/popup.nvue

@@ -1,127 +0,0 @@
-<template>
-	<view class="videos">
-		<view class="videos_e">
-			<view class="videos_title">
-				<view class="videos_titles">
-					<text class="videos_titles_one">提示</text>
-				</view>
-				<view class="videos_titless">
-					<text class="videos_titless_one">是否保存为草稿?</text>
-				</view>
-			</view>
-			<view class="videos_operation">
-				<view class="videos_operations">
-					<text class="videos_operations_one" >取消</text>
-				</view>
-				<view class="videos_operationss">
-					<text class="videos_operationss_one">确认</text>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-
-			}
-		},
-		onLoad() {
-
-		},
-		onShow() {
-
-		},
-		methods: {
-			// 默认给父级加一个定时器就不会出现点击关闭子窗体的问题了
-			onEvents() {
-
-			},
-			// 取消
-			onCancel() {
-				//向原生子窗体传递数据
-				uni.$emit('page-popup', {
-					msg: "取消"
-				});
-			},
-			// 确定
-			onDetermine() {
-				//向原生子窗体传递数据
-				uni.$emit('page-popup', {
-					msg: "确定"
-				});
-			}
-		}
-	}
-</script>
-
-<style>
-	.videos {
-		background-color: rgba(0, 0, 0, 0);
-		align-items: center;
-		justify-content: center;
-	}
-
-	.videos_e {
-		background-color: #FFFFFF;
-		height: 299rpx;
-		width: 560rpx;
-		border-radius: 30rpx;
-	}
-
-	.videos_title {
-		width: 560rpx;
-		height: 200rpx;
-		align-items: center;
-		justify-content: center;
-		border-bottom-width: 1rpx;
-		border-color: #E5E5E5;
-		border-style: solid;
-	}
-
-	.videos_titles_one {
-		font-size: 38rpx;
-		font-weight: 700;
-	}
-
-	.videos_titless {
-		margin-top: 15rpx;
-	}
-
-	.videos_titless_one {
-		font-size: 32rpx;
-
-	}
-
-	.videos_operation {
-		width: 560rpx;
-		height: 99rpx;
-		flex-direction: row;
-	}
-
-	.videos_operationss {
-		border-left-width: 1rpx;
-		border-color: #E5E5E5;
-		border-style: solid;
-	}
-
-	.videos_operations,
-	.videos_operationss {
-		width: 280rpx;
-		height: 99rpx;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.videos_operations_one {
-		font-size: 36rpx;
-		color: #343434;
-	}
-
-	.videos_operationss_one {
-		font-size: 36rpx;
-		color: #FF0423;
-	}
-</style>

+ 63 - 33
pages/grain_pulse/enter.vue

@@ -9,32 +9,32 @@
 		<u-form class="forList">
 			<view class="modular">
 				<u-form-item label="公司名称" label-width="30%" class="title Regular">
-					<u-input v-model="deptList.name" input-align="right" class="write Medium" placeholder="请输入公司名称" />
+					<u-input v-model="deptList.compName" input-align="right" class="write Medium" placeholder="请输入公司名称" />
 				</u-form-item>
 				<view>
 					<view class="title Regular" style="margin-top: 15rpx;">主要类型(可多选,必须为真实经营类型)</view>
 					<view v-for="(item,index) in management" class="choice">
 						<!-- 	<u-tag :type="types[index] == null ? 'info' : types[index]" :text="item" show="show"
 							@click="singleClick(index)"></u-tag> -->
-						<view :class="anNiuCss[index] == null ? 'types' : anNiuCss[index]" @click="singleClick(index)">
-							{{item}}
+						<view :class="!item.checked ? '' : 'types1'" class='types' @click="singleClick(item)">
+							{{item.name}}
 						</view>
 					</view>
 				</view>
 			</view>
 			<view class="modular">
 				<u-form-item label="标题" label-width="30%" class="title Regular">
-					<u-input v-model="deptList.name" input-align="right" class="write Regular"
+					<u-input v-model="deptList.title" input-align="right" class="write Regular"
 						placeholder="用于封面展示,2-16个字" />
 				</u-form-item>
 				<u-form-item label="公司简介" label-width="30%" class="title Regular">
-					<u-input v-model="deptList.name" input-align="right" class="write Regular" type="textarea"
+					<u-input v-model="deptList.companyProfile" input-align="right" class="write Regular" type="textarea"
 						placeholder="请输入企业简介,如经营项目、产品类型、企业规模等,10-60个字" />
 				</u-form-item>
 			</view>
 			<view class="modular">
-				<u-form-item label="上传坐标" label-width="30%" class="title Regular">
-					<text @click="upload"
+				<u-form-item  label="上传坐标" label-width="30%" class="title Regular">
+					<text @click='naviageToPage("/pages/grain_pulse/localtion/coordinate")'
 						class="con-list Regular">{{deptList.buyer == null ? "未上传":deptList.buyer}}<text
 							class='tip_text cuIcon-right'></text></text>
 				</u-form-item>
@@ -43,20 +43,20 @@
 						placeholder="自动获取" />
 				</u-form-item>
 				<u-form-item label="详细地址" label-width="30%" class="title Regular">
-					<u-input v-model="deptList.name" input-align="right" class="write Regular"
+					<u-input v-model="deptList.detailedAddress" input-align="right" class="write Regular"
 						placeholder="如街道和门牌号,2-12个字" maxlength="12" />
 				</u-form-item>
 				<view>
 					<view class="title Regular" style="margin-top: 15rpx;">上传图片</view>
-					<view v-if="license1 != ''">
+		<view v-if="license1 != ''">
 						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
 							:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
 							@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
 							:options="uploadOptions" :custom="uploadCustom" @on-progress="onProgress"></upload>
 					</view>
-					<view v-if="license2 != ''">
+								<view v-if="license2 != ''">
 						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
-							:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
+							:size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError"
 							@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
 							:options="uploadOptions1" :custom="uploadCustom" @on-progress="onProgress"></upload>
 					</view>
@@ -103,9 +103,18 @@
 					"text": "上传营业执照",
 					"bgc": ""
 				},
+				mainBusinessType:[],
 				uploadCustom: true,
 				deptList: {},
-				management: ["粮库", "加工厂", "烘干厂", "饲料厂", "养殖场", "粮贸", "期货"],
+				management: [
+					{name:"粮库",checked:false},
+					{name:"加工厂",checked:false},
+					{name:"烘干厂",checked:false},
+					{name:"饲料厂",checked:false},
+					{name:"养殖场",checked:false},
+					{name:"粮贸",checked:false},
+					{name:"期货",checked:false},
+					 ],
 				types: [],
 				show: false,
 				// anNiuCss:"types",
@@ -116,16 +125,23 @@
 			}
 		},
 		methods: {
-			singleClick(index) {
-				for (let i = 0; i < this.management.length; i++) {
-					this.anNiuCss[i] = "types"
-				}
-				if (this.anNiuCss[index] == null) {
-					this.anNiuCss[index] = "types1"
-				} else if (this.anNiuCss[index] == "types") {
-					this.anNiuCss[index] = "types1"
-				} else if (this.anNiuCss[index] == "types1") {
-					this.anNiuCss[index] = "types"
+			getImgUrl(res){
+				console.log(res)
+				this.deptList.attachmentAddress=res
+			},
+			naviageToPage(item){
+				uni.navigateTo({
+					url:item
+				})
+			},
+			getImgUrl1(res){
+				console.log(res)
+				this.deptList.licenseAddress=res
+			},
+			singleClick(item) {
+				if(this.mainBusinessType.indexOf(item)==-1){
+					this.mainBusinessType.push(item.name)
+					item.checked=true
 				}
 			},
 			filterFileType(index, lists) {
@@ -141,7 +157,11 @@
 				}
 			},
 			navBack() {
-				uni.navigateBack(1)
+				this.$api.doRequest('post','/settledCompanyInfo/api/addSettledCompanyInfo',this.deptList).then(res => {
+					if(res.data.code==200){
+						uni.navigateBack(1)
+					}
+				})
 			},
 			upload() {
 				uni.navigateTo({
@@ -154,26 +174,36 @@
 				})
 			},
 			submit() {
+				var that = this
 				// if (!this.deptList.title) {
 				// 	this.$api.msg('标题不能为空')
 				// 	return
 				// }
-				this.show = true
-				return
+				// this.show = true
+				// return
+				this.deptList.mainBusinessType=this.mainBusinessType.toString()
+				this.deptList.longitude='40.22077'
+				this.deptList.latitude='116.23128'
 				uni.showModal({
 					content: "确定提交企业信息??",
 					showCancel: true,
 					confirmText: '确定',
 					success: function(res) {
 						if (res.confirm) {
-							//成功后
-							if (res.data.code == 200) {
-								uni.showToast({
-									title: '提交成功',
-									icon: 'none',
-									duration: 2000
-								})
-							}
+							this.show = true
+							// that.$api.doRequest('post','/settledCompanyInfo/api/addSettledCompanyInfo',that.deptList).then(res => {
+							// 	if(res.data.code==200){
+									
+							// 	}
+							// })
+							// //成功后
+							// if (res.data.code == 200) {
+							// 	uni.showToast({
+							// 		title: '提交成功',
+							// 		icon: 'none',
+							// 		duration: 2000
+							// 	})
+							// }
 						}
 					},
 				})

+ 260 - 145
pages/grain_pulse/home.vue

@@ -2,11 +2,13 @@
 	<view>
 		<view class="header">
 			<view class="flex justify-between map">
-				<view class='Medium flex align-item-center locationwrap'>
+				<view class='Medium flex align-item-center locationwrap'
+					@click='naviageToPage("/pages/grain_pulse/position/position")'>
 					<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
-					黑龙江中天昊元…
+					{{position}}
 				</view>
-				<view class='Regular flex align-item-center distribution justify-center'>
+				<view @click='naviageToPage("/pages/grain_pulse/distribution/distribution")'
+					class='Regular flex align-item-center distribution justify-center'>
 					<image class='cangku' src="../../static/img/liangmai/cangku.png" mode=""></image>
 					分布
 				</view>
@@ -18,7 +20,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="content" >
+		<view class="content">
 			<view @click='friendcircle' class="friendcircle">
 				<view class='title flex align-item-center Medium'>
 					<image class='icon-friendcircle' src="../../static/img/liangmai/icon.png" mode=""></image>
@@ -27,31 +29,37 @@
 				<view class='friendcircle-content flex justify-between'>
 					<image class='bg' src="../../static/img/liangmai/bg.png" mode=""></image>
 					<view class='friendcircle-content-right'>
-						<view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
-						<view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
-						<view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
-						<view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
+						<view class='friendcircle-content-right-item Regular flex align-item-center'>
+							<image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…
+						</view>
+						<view class='friendcircle-content-right-item Regular flex align-item-center'>
+							<image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…
+						</view>
+						<view class='friendcircle-content-right-item Regular flex align-item-center'>
+							<image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…
+						</view>
+						<view class='friendcircle-content-right-item Regular flex align-item-center'>
+							<image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…
+						</view>
 					</view>
 				</view>
 			</view>
-			<view class='list-type'>
-				<view :class='status==0?"Semibold active":"Regular"' class="typeitem">全部</view>
-				<view :class='status==0?"Semibold active":"Regular"' class="typeitem">粮库</view>
-				<view :class='status==0?"Semibold active":"Regular"' class="typeitem">加工厂</view>
-				<view :class='status==0?"Semibold active":"Regular"' class="typeitem">烘干塔</view>
-				<view :class='status==0?"Semibold active":"Regular"' class="typeitem">饲料厂</view>
-				<view :class='status==0?"Semibold active":"Regular"' class="typeitem">饲料厂</view>
-			</view>
-			<view @click='todetails' class="listitem">
+			<scroll-view scroll-x="true" scroll-with-animation="true" class='list-type'>
+				<view v-for='item in searchTypes' @click='mainBusinessTypecahnge(item)'
+					:class='mainBusinessTypeKey==item.value?"Semibold active":"Regular"' class="typeitem">{{item.name}}
+				</view>
+			</scroll-view>
+			<view v-for='item in datalist' @click='todetails(item)' class="listitem">
 				<view class="flex">
-					<image class='listitem-left' src="../../static/img/authentication/bankup(2).png" mode=""></image>
+					<image class='listitem-left' :src="item.attachmentAddress" mode=""></image>
 					<view class="listitem-right">
-						<view class="companyname Medium">中天昊元粮库中天昊元粮库</view>
-						<view class='Regular introduce'>我是企业介绍我是企业介绍我是企业介绍我是</view>
+						<view class="companyname Medium">{{item.compName}}</view>
+						<view class='Regular introduce'>{{item.companyProfile}}</view>
 					</view>
 				</view>
 				<view class="flex  align-item-center justify-between">
-					<view class='companylocation flex align-item-center Regular'>
+					<view @click.stop='naviageToPage("/pages/grain_pulse/localtion/localtion")'
+						class='companylocation flex align-item-center Regular'>
 						<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
 						辽宁省营口市鲅鱼圈区xx路108号
 					</view>
@@ -59,47 +67,115 @@
 				</view>
 			</view>
 		</view>
-		<view class="enter" @click="enter">
+		<view v-if='datalist.length==0' class="enter" @click="enter">
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
 			<view class='enter-content'>入驻</view>
 		</view>
-		
+
 	</view>
 </template>
 
 <script>
 	export default {
-        components: {
-            
-        },
+		components: {
+
+		},
 		data() {
 			return {
-				status:0
+				position: "未设置",
+				status: 0,
+				mainBusinessType: '',
+				mainBusinessTypeKey: '0',
+				pageSize: 10,
+				currentPage: 1,
+				searchTypes: [{
+						name: '全部',
+						value: '0'
+					}, {
+						name: '粮库',
+						value: '1'
+					}, {
+						name: '加工厂',
+						value: '2'
+					},
+					{
+						name: '烘干塔',
+						value: '3'
+					}, {
+						name: '饲料厂',
+						value: '4'
+					}, {
+						name: '养殖场',
+						value: '5'
+					},
+					{
+						name: '粮贸',
+						value: '6'
+					}, {
+						name: '期货',
+						value: '7'
+					}
+				],
+				datalist: []
 			}
 		},
-		onLoad(){
-			
+		onShow(val) {
+
+			this.$api.doRequest('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
+				mainBusinessType: this.mainBusinessType,
+				pageSize: this.pageSize,
+				currentPage: this.currentPage,
+				pcFlag: 2
+			}).then(res => {
+				if (res.data.code == 200) {
+					this.datalist = res.data.data.records
+				}
+			})
+			uni.getStorage({
+				key: 'setLocaltion',
+				success: (res) => {
+					console.log(res.data)
+					this.position = res.data
+					uni.removeStorage({
+						key: 'setLocaltion'
+					})
+				},
+
+			})
+		},
+		onLoad(option) {
+			if (option.position)
+				this.position = option.position
 		},
 		methods: {
-			enter(){
+			mainBusinessTypecahnge(item) {
+				if (item.name != '全部') {
+					this.mainBusinessType = item.name
+				} else {
+					this.mainBusinessType = ''
+				}
+				this.mainBusinessTypeKey = item.value
+			},
+			enter() {
 				//入驻
 				uni.navigateTo({
-					url:'/pages/grain_pulse/enter'
+					url: '/pages/grain_pulse/enter'
 				})
 			},
-			friendcircle(){
+			friendcircle() {
 				uni.navigateTo({
-					url:'/pages/grain_pulse/friendcircle'
+					url: '/pages/grain_pulse/friendcircle'
 				})
 			},
-			todetails(){
+			todetails(item) {
 				uni.navigateTo({
-					url:'/pages/grain_pulse/details'
+					url: '/pages/grain_pulse/details?id=' + item.id
 				})
 			},
-			naviageToPage(item){
+			naviageToPage(item) {
+				console.log(item)
 				uni.navigateTo({
-					url:item
+					url: item
 				})
 			}
 		}
@@ -108,162 +184,201 @@
 
 <style scoped>
 	/* 《--头部 */
-	.header{
-		padding:0 12.5px;
-		background:#fff;
-		border-radius:0 0 10px 10px;
+	.header {
+		padding: 0 12.5px;
+		background: #fff;
+		border-radius: 0 0 10px 10px;
 	}
+
 	/* 头部--》 */
 	/* 《--定位 */
-	.location{
-		width:15.5px;height:17.5px;margin-right:2.5px;
+	.location {
+		width: 15.5px;
+		height: 17.5px;
+		margin-right: 2.5px;
 	}
-	.locationwrap{
-		font-size:16px;
+
+	.locationwrap {
+		font-size: 16px;
 	}
+
 	/* 定位 --》 */
 	/* 《--分布 */
-	.map{
-		padding:8.5px 0;
+	.map {
+		padding: 8.5px 0;
 	}
-	.cangku{
-		width:16.5px;height:16.5px;margin-right:5px;
+
+	.cangku {
+		width: 16.5px;
+		height: 16.5px;
+		margin-right: 5px;
 	}
-	.distribution{
-		background:#F5F6FA;
+
+	.distribution {
+		background: #F5F6FA;
 		width: 71.5px;
-		height:32px;
-		border-radius:15px;
-		font-size:12px;
+		height: 32px;
+		border-radius: 15px;
+		font-size: 12px;
 	}
+
 	/* 分布--》 */
 	/* 《--搜索 */
-	.cu-bar .search-form{
-		background:#F5F6F9;
-		margin:0;
-		margin-bottom:18px;
-		padding:10px 18px;
+	.cu-bar .search-form {
+		background: #F5F6F9;
+		margin: 0;
+		margin-bottom: 18px;
+		padding: 10px 18px;
 	}
-	.icon-scarch{
-		width:15px;
-		height:15px;
-		margin-right:5px;
+
+	.icon-scarch {
+		width: 15px;
+		height: 15px;
+		margin-right: 5px;
 	}
+
 	/* 搜索--》 */
 	/* 《--内容 */
-	.content{
-		margin-top:13px;
+	.content {
+		margin-top: 13px;
 	}
+
 	/* 内容--》 */
 	/* 《--圈友说 */
-	.friendcircle{
-		background:#fff;
-		margin:0 9px;
-		border-radius:4px;
+	.friendcircle {
+		background: #fff;
+		margin: 0 9px;
+		border-radius: 4px;
 	}
-	.friendcircle .title{
-		font-size:16px;
-		padding:11.5px 14.5px;
+
+	.friendcircle .title {
+		font-size: 16px;
+		padding: 11.5px 14.5px;
 	}
-	.icon-friendcircle{
-		width:17px;height: 17px;margin-right:5.5px;
+
+	.icon-friendcircle {
+		width: 17px;
+		height: 17px;
+		margin-right: 5.5px;
 	}
-	.bg{
-		width:110px;height:124px;
+
+	.bg {
+		width: 110px;
+		height: 124px;
 	}
-	.friendcircle-content{
-		padding:0 17px 18px;
+
+	.friendcircle-content {
+		padding: 0 17px 18px;
 	}
-	.friendcircle-content-right{
-		margin-left:15.5px;
+
+	.friendcircle-content-right {
+		margin-left: 15.5px;
 	}
-	.friendcircle-content-right-item{
+
+	.friendcircle-content-right-item {
 		background: linear-gradient(90deg, #F5F6FA 0%, #FFFFFF 100%);
-		border-radius:12.5px;
-		margin-bottom:10px;
-		width:205.5px;
-		font-size:12px;
-		padding:3px 0;
+		border-radius: 12.5px;
+		margin-bottom: 10px;
+		width: 205.5px;
+		font-size: 12px;
+		padding: 3px 0;
 	}
-	.headportrait{
-		width:22.5px;height:22.5px;
-		margin-right:8.5px;
+
+	.headportrait {
+		width: 22.5px;
+		height: 22.5px;
+		margin-right: 8.5px;
 	}
+
 	/* 圈友说--》 */
 	/* 《--类型 */
-	.list-type{
+	.list-type {
 		background: linear-gradient(180deg, #F5F6FA 0%, #FFFFFF 100%);
-		width:100%;
-		padding-top:5px;
-		height:49px;
+		width: 100vw;
+		padding-top: 5px;
+		height: 49px;
 		overflow-x: scroll;
+		white-space: nowrap;
 	}
-	.typeitem{
-		margin:10px;
-		position:relative;
-		display:inline-block;
-		padding-top:8px;
-		padding-bottom:5px;
+
+	.typeitem {
+		margin: 10px;
+		position: relative;
+		display: inline-block;
+		padding-top: 8px;
+		padding-bottom: 5px;
 	}
-	.typeitem.active{
-		font-size:16px;
+
+	.typeitem.active {
+		font-size: 16px;
 	}
-	.typeitem.active:after{
-		content:'';
-		display:block;
-		position:absolute;
-		height:3px;
-		bottom:0;
-		background:#22C572;
-		width:50%;
-		left:50%;
+
+	.typeitem.active:after {
+		content: '';
+		display: block;
+		position: absolute;
+		height: 3px;
+		bottom: 0;
+		background: #22C572;
+		width: 50%;
+		left: 50%;
 		transform: translateX(-50%);
 	}
+
 	/* 类型--》 */
 	/* 《--数据 */
-	.listitem{
-		background:#fff;
-		margin:10px;
-		padding:15px 19px;
+	.listitem {
+		background: #fff;
+		margin: 10px;
+		padding: 15px 19px;
 	}
-	.listitem-left{
-		width:98.5px;
-		height:96.5px;
-		margin-right:8px;
-		border-radius:5px;
+
+	.listitem-left {
+		width: 98.5px;
+		height: 96.5px;
+		margin-right: 8px;
+		border-radius: 5px;
 	}
-	.companyname{
-		font-size:14px;
-		color:#333;
+
+	.companyname {
+		font-size: 14px;
+		color: #333;
 	}
-	.introduce{
-		font-size:12px;
-		color:#676E80;
+
+	.introduce {
+		font-size: 12px;
+		color: #676E80;
 	}
-	.companylocation{
-		color:#676E80;
-		background:#F5F6FA;
-		margin-top:8px;
-		padding:4px 10px;
-		border-radius:15px;
+
+	.companylocation {
+		color: #676E80;
+		background: #F5F6FA;
+		margin-top: 8px;
+		padding: 4px 10px;
+		border-radius: 15px;
 	}
-	.distance{
-		color:#AFB3BF;
-		padding:4px;
-		margin-top:8px;
+
+	.distance {
+		color: #AFB3BF;
+		padding: 4px;
+		margin-top: 8px;
 	}
+
 	/* 数据--》 */
-	.enter{
-		position:fixed;
-		right:0;
-		width:56.5px;height:28px;
+	.enter {
+		position: fixed;
+		right: 0;
+		top: 80%;
+		width: 56.5px;
+		height: 28px;
 	}
-	.enter-content{
-		position:absolute;
-		right:5px;
-		top:50%;
+
+	.enter-content {
+		position: absolute;
+		right: 5px;
+		top: 50%;
 		transform: translateY(-50%);
-		color:#fff;
-		
+		color: #fff;
+
 	}
 </style>

+ 37 - 7
pages/grain_pulse/jubao.vue

@@ -11,12 +11,15 @@
 			</view>
 			<view class="uploading">
 				<view class="title Regular">上传图片</view>
-				<u-upload width='140' height='140' :file-list="fileList" :custom-btn="true"  :show-upload-list="showUploadList" ref="uUpload" :max-size="5 * 1024 * 1024" max-count="6" :action="$uploadUrl">
+	<!-- 			<u-upload width='140' height='140' :file-list="fileList" :custom-btn="true"  :show-upload-list="showUploadList" ref="uUpload" :max-size="5 * 1024 * 1024" max-count="6" :action="$uploadUrl">
 					<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
 						<image style='width:23px;height:23px;margin-top:10px;' src="../../static/img/liangmai/xiangji-2.png" mode=""></image>
 						<view style='color:#AFB3BF;font-size:10px;' class='Medium'>上传图片</view>
 					</view>
-				</u-upload>
+				</u-upload> -->
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" :custom="uploadCustom" :options="uploadOptions" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
 			</view>
 		</view>
 		<view class="commitwrap">
@@ -27,24 +30,51 @@
 </template>
 
 <script>
+		import upload from '@/components/upload.vue';
 	export default {
-	    components: {
-	        
-	    },
+	   components: {
+	   	upload
+	   },
 		data() {
 			return {
+				action: this.$uploadUrl,
+				maxSize: 5 * 1024 * 1024, //限制文件大小 5M
+				btnLoading: false, //防止重复点击
+				isAdd: true,
+				imgUrls: [],
 				status:'',
-				fileList:[]
+				fileList:[],
+				uploadOptions: {
+					"text": "",
+					"bgc": ""
+				},
 			}
 		},
 		onReady() {
 			// 得到整个组件对象,内部图片列表变量为"lists"
-			this.fileList = this.$refs.uUpload.lists;
+			// this.fileList = this.$refs.uUpload.lists;
 		},
 		onLoad(){
 			
 		},
 		methods: {
+			filterFileType(index, lists) {
+				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
+					lists.splice(index, 1);
+					// 当前文件不支持
+					uni.showModal({
+						title: '暂不支持当前图片类型',
+						showCancel: false
+					});
+				} else {
+					this.isAdd = false;
+				}
+			},
+			getImgUrl(res) {
+				console.log(res)
+				console.log('------------res-----------')
+				this.imgUrls.push(res);
+			},
 			commit(){
 				console.log(this.fileList)
 			}

+ 135 - 0
pages/grain_pulse/localtion/coordinate.nvue

@@ -0,0 +1,135 @@
+<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"
+				:style="{height: nowMapIndex ? nintyPercentScreenHeight : seventyPercentScreenHeight,width:'750rpx,flex:1'}">
+			</map>
+		</view>
+		<view class="bottom">
+			<text>
+				{{longitude}},{{latitude}}
+			</text>
+			<view class="" @click="config">确定</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				nowMapIndex: true,
+				phoneHeight: '', //屏幕高
+				phoneWidth: '', //屏幕宽
+				detail: {
+					longitude: '',
+					latitude: ''
+				},
+				nowLocation: {
+					longitude: '',
+					latitude: '',
+					address: '山海广场'
+				},
+				title: 'map',
+				latitude: 39.909,
+				longitude: 116.39742,
+				covers: [{
+					id: 0,
+					latitude: 39.9085,
+					longitude: 116.39747,
+					iconPath: '../../../static/img/location.png',
+				}]
+			}
+		},
+		onReady() {
+			// 计算屏幕高度 ,宽度
+			let _this = this;
+			uni.getSystemInfo({
+				success(res) {
+					_this.phoneHeight = res.windowHeight;
+					_this.phoneWidth = res.windowWidth
+				}
+			});
+		},
+		computed: { //计算
+			nintyPercentScreenHeight() { //百分之九十的屏幕高
+				if (this.phoneHeight !== '' && this.phoneWidth !== '') {
+					return 750 / (this.phoneWidth) * (this.phoneHeight) * 0.9 + 'rpx'
+				} else {
+					return '1250rpx'
+				}
+
+			},
+			seventyPercentScreenHeight() { //百分之七十的屏幕高
+				if (this.phoneHeight !== '' && this.phoneWidth !== '') {
+					return 750 / (this.phoneWidth) * (this.phoneHeight) * 0.7 + 'rpx'
+				} else {
+					return '1000rpx'
+				}
+
+			},
+		},
+		onLoad() {
+			this.getLocation()
+		},
+		methods: {
+			getLocation() {
+				let that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					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
+					}
+				});
+			},
+			tap(e) {
+				this.longitude = e.detail.longitude;
+				this.latitude = e.detail.latitude;
+				console.log(this.longitude)
+				console.log(this.latitude)
+
+			},
+			config(){
+				uni.navigateTo({
+					
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.content {
+flex: 1;
+width: 750rpx;
+	}
+	
+	.bottom {
+		width: 96%;
+		background: white;
+		position: fixed;
+		bottom: 54rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+		padding: 27rpx 37rpx;
+	}
+
+	.title-style {
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #333333;
+	}
+</style>

+ 146 - 0
pages/grain_pulse/localtion/coordinate.vue

@@ -0,0 +1,146 @@
+<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"
+				: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>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				nowMapIndex: true,
+				phoneHeight: '', //屏幕高
+				phoneWidth: '', //屏幕宽
+				detail: {
+					longitude: '',
+					latitude: ''
+				},
+				nowLocation: {
+					longitude: '',
+					latitude: '',
+					address: '山海广场'
+				},
+				title: 'map',
+				latitude: 39.909,
+				longitude: 116.39742,
+				covers: [{
+					id: 0,
+					latitude: 39.9085,
+					longitude: 116.39747,
+					iconPath: '../../../static/img/location.png',
+				}]
+			}
+		},
+		onReady() {
+	
+		},
+		computed: { //计算
+			nintyPercentScreenHeight() { //百分之九十的屏幕高
+				if (this.phoneHeight !== '' && this.phoneWidth !== '') {
+					return 750 / (this.phoneWidth) * (this.phoneHeight) * 0.9 + 'rpx'
+				} else {
+					return '1250rpx'
+				}
+
+			},
+			seventyPercentScreenHeight() { //百分之七十的屏幕高
+				if (this.phoneHeight !== '' && this.phoneWidth !== '') {
+					return 750 / (this.phoneWidth) * (this.phoneHeight) * 0.7 + 'rpx'
+				} else {
+					return '1000rpx'
+				}
+
+			},
+		},
+		onLoad() {
+			// 计算屏幕高度 ,宽度
+			let _this = this;
+			uni.getSystemInfo({
+				success(res) {
+					_this.phoneHeight = res.windowHeight;
+					_this.phoneWidth = res.windowWidth
+				}
+			});
+			this.getLocation()
+		},
+		methods: {
+			getLocation() {
+				let that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					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
+					}
+				});
+			},
+			tap(e) {
+				this.longitude = e.detail.longitude;
+				this.latitude = e.detail.latitude;
+				console.log(this.longitude)
+				console.log(this.latitude)
+
+			},
+			config() {
+				uni.navigateTo({
+
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.content {
+		flex: 1;
+		width: 750rpx;
+	}
+
+	.bottom {
+		width: 750rpx;
+		flex: 1;
+		background: white;
+		position: fixed;
+		bottom: 54rpx;
+		left: 0;
+		right: 0;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		height: 84rpx;
+		align-items: center;
+	}
+
+	.title-style {
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #333333;
+	}
+	.bottom-text{
+		
+	}
+	.config{
+		background:#22C572 ;
+	}
+</style>

+ 135 - 0
pages/grain_pulse/localtion/localtion.nvue

@@ -0,0 +1,135 @@
+<template>
+	<view class="container">
+		<view class="content">
+			<map class="map" @markertap="markertap" :latitude="nowLocation.latitude" :longitude="nowLocation.longitude"
+				:markers="covers">
+			</map>
+		</view>
+		<view class="bottom">
+			<view class="title Medium">
+				{{dataList.title}}
+			</view>
+			<view class="bottom-content Regular">
+				{{dataList.content}}
+			</view>
+			<view class="Regular location">
+				<view class="left">
+					<u-icon name="map" size="36" class="icon"></u-icon>
+					<view>{{dataList.localtion}}</view>
+				</view>
+				
+				<view class="metre">
+				<u-line color="#A3A9B8" direction='col' length="20rpx"/>
+				<text  class="line" >
+				{{dataList.rice}}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				dataList: {
+					title: '中天昊元粮库中天昊元粮库',
+					content: '我是企业介绍我是企业介绍我是企业介绍我是企业介绍我是企业介绍…',
+					localtion: "辽宁省营口市鲅鱼圈区熊岳镇火车站…",
+					rice: '500m'
+				},
+				nowLocation: {
+					longitude: '',
+					latitude: ''
+				},
+				title: 'map',
+				latitude: 39.909,
+				longitude: 116.39742,
+				covers: [{
+					id: 0,
+					latitude: 39.9085,
+					longitude: 116.39747,
+					iconPath: '../../../static/img/location.png',
+				}]
+			}
+		},
+		onLoad() {
+			this.getLocation()
+		},
+		methods: {
+			getLocation() {
+				let that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					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
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		width: 100vw;
+		height: 100vh;
+	}
+
+	.map {
+		width: 100%;
+		height: 100%;
+	}
+
+	.bottom {
+		width: 96%;
+		background: white;
+		position: fixed;
+		bottom: 54rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+		padding: 27rpx 37rpx;
+
+		.title {
+			font-size: 30rpx;
+			color: #333333;
+			margin-bottom: 12rpx;
+		}
+
+		.bottom-content {
+			font-size: 22rpx;
+		}
+
+		.location {
+			color: #AFB3BF;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			margin-top: 15rpx;
+
+			.left {
+				display: flex;
+				flex-wrap: nowrap;
+			}
+			.metre{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				.line{
+					margin-left:13rpx ;
+				}
+			}
+		}
+	}
+</style>

+ 250 - 0
pages/grain_pulse/my_grain_pulse.vue

@@ -0,0 +1,250 @@
+<template>
+	<view>
+		<scroll-view  scroll-x="true" scroll-with-animation="true" class='list-type'>
+			<view  v-for='item in searchTypes' @click='changetype(item)' :class='mainBusinessType==item.name?"Semibold active":"Regular"' class="typeitem">{{item.name}}</view>
+		</scroll-view>
+		<view v-for='item in datalist' class="listitem">
+			<view class="flex" v-if='mainBusinessType=="我的企业"'>
+				<image class='listitem-left' :src="item.attachmentAddress" mode=""></image>
+				<view class="listitem-right">
+					<view class="flex justify-between">
+						<view class="companyname Medium">{{item.compName}}</view>
+						<view v-if='item.status=="待审核"' class='listitemStatus audit Regular'>审核中</view>
+					</view>
+					<view class='companylocation flex align-item-center Regular'>
+						<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
+						辽宁省营口市鲅鱼圈区xx路108号
+					</view>
+					<view>
+						<view class="button Regular">隐藏</view>
+						<view class="button Regular">编辑</view>
+						<view class="button Regular">删除</view>
+					</view>
+				</view>
+			</view>
+			<view v-else>
+				<view class="flex">
+					<image class='listitem-left' src="../../static/img/authentication/bankup(2).png" mode=""></image>
+					<view class="listitem-right">
+						<view class="flex justify-between">
+							<view class="companyname Medium">中天昊元粮库中天昊元粮库</view>
+							<image style='width:12px;height:12px;' :src="status1?'../../static/img/liangmai/my_shoucang1.png':'../../static/img/liangmai/my_shoucang.png'" mode=""></image>
+						</view>
+						<view class='Regular introduce'>我是企业介绍我是企业介绍我是企业介绍我是</view>
+					</view>
+				</view>
+				<view class="flex  align-item-center justify-between">
+					<view class='companylocation flex align-item-center Regular'>
+						<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
+						辽宁省营口市鲅鱼圈区xx路108号
+					</view>
+					<view class='distance Regular'>50m</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+        components: {
+            
+        },
+		data() {
+			return {
+				status:0,
+				mainBusinessType:'我的企业',
+				pageSize: 10,
+				currentPage: 1,
+				datalist:[],
+				status1:true,
+				searchTypes:[
+				{name:'我的企业',value:'1'},{name:'我的收藏',value:'1'}
+				],
+			}
+		},
+		onShow(){
+			this.getList()
+			
+		},
+		onLoad(){
+			
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		methods: {
+			getList(){
+				if(this.mainBusinessType=='我的企业'){
+					this.$api.doRequest('get','/settledCompanyInfo/selectSettledCompanyInfo',{mainBusinessType:'',pageSize: this.pageSize,
+							currentPage: this.currentPage,pcFlag:2}).then(res => {
+					if(res.data.code==200){
+						this.datalist=res.data.data.records
+					}
+				})
+				}else{
+					this.$api.doRequest('get','/settledCompanyInfo/myCollection',{commonId:this.userInfo.id,phone:this.userInfo.phone,pageSize:this.pageSize,
+							currentPage: this.currentPage,pcFlag:2}).then(res => {
+					if(res.data.code==200){
+						this.datalist=res.data.data.records
+					}
+					})
+				}
+			},
+			friendcircle(){
+				uni.navigateTo({
+					url:'/pages/grain_pulse/friendcircle'
+				})
+			},
+			todetails(){
+				uni.navigateTo({
+					url:'/pages/grain_pulse/details'
+				})
+			},
+			naviageToPage(item){
+				uni.navigateTo({
+					url:item
+				})
+			},
+			changetype(item){
+				this.mainBusinessType=item.name
+				this.getList()
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	/* 《--头部 */
+	.header{
+		padding:0 12.5px;
+		background:#fff;
+		border-radius:0 0 10px 10px;
+	}
+	/* 头部--》 */
+	/* 《--定位 */
+	.location{
+		width:15.5px;height:17.5px;margin-right:2.5px;
+	}
+	.locationwrap{
+		font-size:16px;
+	}
+	/* 定位 --》 */
+	/* 《--分布 */
+	.map{
+		padding:8.5px 0;
+	}
+	.cangku{
+		width:16.5px;height:16.5px;margin-right:5px;
+	}
+	.distribution{
+		background:#F5F6FA;
+		width: 71.5px;
+		height:32px;
+		border-radius:15px;
+		font-size:12px;
+	}
+	/* 分布--》 */
+	/* 《--搜索 */
+	.cu-bar .search-form{
+		background:#F5F6F9;
+		margin:0;
+		margin-bottom:18px;
+		padding:10px 18px;
+	}
+	.icon-scarch{
+		width:15px;
+		height:15px;
+		margin-right:5px;
+	}
+	/* 搜索--》 */
+	/* 《--内容 */
+	.content{
+		margin-top:13px;
+	}
+	/* 内容--》 */
+	/* 《--类型 */
+	.list-type{
+		background: #fff;
+		width:100vw;
+		padding-top:5px;
+		height:49px;
+		overflow-x: scroll;
+		white-space: nowrap;
+	}
+	.typeitem{
+		margin:10px;
+		position:relative;
+		display:inline-block;
+		padding-bottom:10px;
+		font-size:17px;
+	}
+	.typeitem.active:after{
+		content:'';
+		display:block;
+		position:absolute;
+		height:3px;
+		bottom:0;
+		background:#22C572;
+		width:18px;
+		left:50%;
+		transform: translateX(-50%);
+	}
+	/* 类型--》 */
+	/* 《--数据 */
+	.listitem{
+		background:#fff;
+		margin:10px;
+		padding:15px 19px;
+		border-radius:10px;
+	}
+	.listitem-left{
+		width:98.5px;
+		height:96.5px;
+		margin-right:8px;
+		border-radius:5px;
+	}
+	.companyname{
+		font-size:14px;
+		color:#333;
+	}
+	.introduce{
+		font-size:12px;
+		color:#676E80;
+	}
+	.companylocation{
+		color:#676E80;
+		font-size:12px;
+		margin-top:8px;
+		padding:4px 9px;
+	}
+	.distance{
+		color:#AFB3BF;
+		padding:4px;
+		margin-top:8px;
+	}
+	/* 数据--》 */
+	.button{
+		display:inline-block;
+		border:1px solid #CDCDCD;
+		padding:6px 15px;
+		border-radius:15px;
+		margin:5px 5px;
+	}
+	.listitemStatus{
+		margin-left:2px;
+	}
+	.listitemStatus.audit{
+		color:#FE6430;
+	}
+	.listitemStatus.notPass{
+		color:#FB1E1E;
+	}
+	.listitemStatus.pass{
+		color:#22C572;
+	}
+</style>
+

+ 247 - 21
pages/grain_pulse/position/position.vue

@@ -2,10 +2,11 @@
 	<view class="">
 		<view class="header">
 			<view class="city Medium">
-				<text class="select-city">营口市</text>
+				<text class="select-city" @click="loadCity">{{city}}</text>
 				<u-icon name="arrow-down"></u-icon>
 			</view>
-			<u-search input-align="left" :show-action="false" height="70" placeholder="请输入位置信息"></u-search>
+			<u-search input-align="left" :disabled="true" @click="searchAddress" :show-action="false" height="70"
+				placeholder="请输入位置信息" v-model="addressName"></u-search>
 		</view>
 		<view class="header2">
 			<view class="header2-tip Regular">
@@ -14,36 +15,240 @@
 			<view class="header2-content">
 				<view class="left Medium">
 					<u-icon name="arrow-down"></u-icon>
-					<view class="">山海广场</view>
+					<view class="">{{address}}</view>
+					<view class="" v-if="isposition">{{text}}</view>
 				</view>
-				<view class="reposition Regular">重新定位</view>
+				<view class="reposition Regular" @click="reloadPosition">{{po_tips}}</view>
 			</view>
 
 		</view>
+
 		<view class="position-list Regular">
-			<view class="list-item">
-				<view class="row row1">
-					<view>
-						山海广场
-					</view>
-					<view>4.2千米</view>
-				</view>
-				<view class="row row2">
-					山海广场
+			<view class="search">
+				<view>最近搜索</view>
+				<u-icon name="trash-fill" color="#AFB3BF" size="28" @click="delList"></u-icon>
+			</view>
+			<view class="search-list">
+				<view v-for="(item,index) in list" class="search-list-item" @click="toHome(item)">
+					{{item}}
 				</view>
 			</view>
+
 		</view>
 
 	</view>
 </template>
 
 <script>
+	import permision from "@/js_sdk/wa-permission/permission.js"
+	import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
 	export default {
-		components: {},
+		components: {
+			uniSegmentedControl
+		},
 		data() {
-			return {}
+			return {
+				addressName: "",
+				isposition: false,
+				isIos: true,
+				address: "定位失败,请点击重新定位",
+				city: '营口市',
+				list: [],
+				position: '',
+				addressObj: {},
+				seconds: 3,
+				po_tips: '重新定位',
+			}
 		},
-		methods: {}
+		onLoad(e) {
+			if (e.city) {
+				this.city = e.city
+			}
+			let that = this
+			uni.getStorage({
+				key: 'SearchList_key',
+				success: function(res) {
+					that.list = res.data
+				}
+			});
+			this.getLocation()
+			// 获取定位
+			// this.utils.getLocation().then(function(res) {
+			// 	debugger
+			// 	console.log("定位信息",res)
+			// 	this.city = res.address.city
+			// 	this.address = res.address.poiName
+			// 	console.log('city',this.city)
+			// 	console.log('poiName',this.address)
+			// 	if (res.errMsg != "getLocation:ok") {
+			// 		// 定位权限未开启,引导设置
+			// 		uni.showModal({
+			// 			title: '温馨提示',
+			// 			content: '您已拒绝定位,请开启',
+			// 			confirmText: '去设置',
+			// 			success(res) {
+			// 				if (res.confirm) {
+			// 					//打开授权设置
+			// 					this.utils.openSetting()
+			// 				}
+			// 			}
+			// 		})
+			// 	}
+			// })
+		},
+		methods: {
+			// 删除最近搜索
+			delList() {
+				uni.setStorage({
+					key: 'SearchList_key',
+					data: []
+				});
+			},
+			getLocation() {
+				let that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: function(res) {
+						console.log('获取位置数据:', res);
+						console.log('当前位置的经度:' + res.longitude);
+						console.log('当前位置的纬度:' + res.latitude);
+						//拼接当前定位回显地址
+						// #ifdef APP-PLUS
+						let _address = res.address
+						that.city = _address.city
+						that.address = _address.province + _address.city + _address.district + _address.poiName
+						console.log(that.address)
+						// #endif
+					}
+				});
+			},
+			// 重新定位
+			reloadPosition() {
+				var that = this
+				that.po_tips = '定位中...'
+				let countdown = setInterval(() => {
+					that.seconds--;
+					uni.getLocation({
+						type: 'gcj02',
+						success: function(res) {
+							console.log('当前位置的经度:' + res.longitude);
+							console.log('当前位置的纬度:' + res.latitude);
+							// #ifdef APP-PLUS
+							let _address = res.address
+							that.city = _address.city
+							that.longitude = res.longitude
+							that.latitude = res.latitude
+							that.address = _address.province + _address.city + _address.district +
+								_address.poiName
+							// #endif
+						}
+					});
+					if (that.seconds <= 0) {
+						that.seconds = 3
+						that.po_tips = '重新定位'
+						clearInterval(countdown);
+					}
+				}, 1000);
+			},
+			openSetting() {
+				// App跳转系统的设置界面
+				// #ifdef APP-PLUS
+				uni.getSystemInfo({
+					success(res) {
+						if (res.platform == 'ios') { //IOS
+							plus.runtime.openURL("app-settings://");
+						} else if (res.platform == 'android') { //安卓
+							let main = plus.android.runtimeMainActivity();
+							let Intent = plus.android.importClass("android.content.Intent");
+							let mIntent = new Intent('android.settings.ACTION_SETTINGS');
+							main.startActivity(mIntent);
+						}
+					}
+				});
+				// #endif
+			},
+			// 跳转ios权限界面
+			judgeIosPermission: function(permisionID) {
+				var result = permision.judgeIosPermission(permisionID)
+				console.log(result);
+				var strStatus = (result) ? "已" : "未"
+				uni.showModal({
+					content: permisionID + '权限' + strStatus + "获得授权",
+					showCancel: false
+				});
+			},
+			// 跳转安卓权限界面
+			async requestAndroidPermission(permisionID) {
+				var result = await permision.requestAndroidPermission(permisionID)
+				var strStatus
+				if (result == 1) {
+					strStatus = "已获得授权"
+				} else if (result == 0) {
+					strStatus = "未获得授权"
+				} else {
+					strStatus = "被永久拒绝权限"
+				}
+				uni.showModal({
+					content: permisionID + strStatus,
+					showCancel: false
+				});
+			},
+			// 搜索
+			searchAddress(val) {
+				// console.log(val)
+				let that = this;
+				uni.chooseLocation({
+					success: function(res) {
+						console.log(res)
+						// console.log('位置名称:' + res.name);
+						// console.log('详细地址:' + res.address);
+						// console.log('纬度:' + res.latitude);
+						// console.log('经度:' + res.longitude);
+						that.list.push(res.name)
+						this.position = res.name
+						uni.setStorage({
+							key: 'SearchList_key',
+							data: that.list
+						});
+						uni.setStorage({
+							key: 'setLocaltion',
+							data: res.name,
+							success() {
+								uni.switchTab({
+									url: "../home"
+								});
+							}
+
+						})
+					}
+				});
+
+			},
+			// 切换城市
+			loadCity() {
+				uni.navigateTo({
+					url: "../selectCity/selectCity"
+				})
+			},
+			toHome(item) {
+				console.log("跳转首页")
+				uni.setStorage({
+					key: 'setLocaltion',
+					data: item,
+					success() {
+						uni.switchTab({
+							url: "../home",
+							success(e) {
+								console.log(e)
+
+							}
+						});
+					}
+
+				})
+			}
+		}
 	}
 </script>
 
@@ -101,10 +306,31 @@
 			}
 		}
 	}
-	.position-list{
-		background: pink;
-		border-radius: 20rpx;
-		
-		
+
+	.position-list {
+		margin-top: 20rpx;
+		background: white;
+		border-radius: 20rpx 20rpx 0 0;
+		padding: 10rpx;
+
+
+	}
+
+	.search {
+		display: flex;
+		justify-content: space-between;
+		padding: 0 20rpx;
+	}
+
+	.search-list {
+		padding: 20rpx;
+	}
+
+	.search-list-item {
+		display: inline-block;
+		background: #F5F6F9;
+		border-radius: 32rpx;
+		padding: 16rpx 24rpx;
+		margin: 0 20rpx 20rpx 0;
 	}
 </style>

+ 5 - 1
pages/grain_pulse/search.vue

@@ -189,6 +189,7 @@
 					this.isShowKeywordList = true
 					this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo', {
 							commonId: this.userInfo.id,
+							functionType:"2",
 							searchContent: this.searchKeyWord
 						}).then(res => {})
 						.catch(res => {
@@ -244,6 +245,7 @@
 				this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo', {
 						pageSize: this.pageSize,
 						currentPage: this.currentPage,
+						functionType:"2",
 						commonId: this.userInfo.id
 					}).then(res => {
 						uni.hideLoading()
@@ -317,6 +319,7 @@
 				this.$api.doRequest('get', '/searchRecordsInfo/selectSearchRecordsInfo', {
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
+					functionType:"2",
 					commonId: this.userInfo.id
 				}).then(res => {
 					uni.hideLoading()
@@ -371,7 +374,8 @@
 					success: (res) => {
 						if (res.confirm) {
 							this.$api.doRequest('post', '/searchRecordsInfo/api/deleteSearchRecordsInfo', {
-									commonId: this.userInfo.id
+									commonId: this.userInfo.id,
+									functionType:"2",
 								}).then(res => {
 									if (res.data.code == 200) {
 										uni.showToast({

+ 15 - 3
pages/grain_pulse/selectCity/selectCity.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="container">
-		<view>定位</view>
 		<citySelect @back_city="back_city"></citySelect>
 	</view>
 </template>
@@ -13,15 +12,28 @@
 		},
 		data() {
 			return {
+				statusBarHeight:''
 			}
 		},
+		onLoad() {
+			uni.getSystemInfo({
+				success: function(res) {
+					console.log("statusBarHeight", res.statusBarHeight)
+					that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
+				},
+			});
+		},
 		methods: {
 			back_city(e) {
 				if (e !== 'no') {
 					this.region = e.cityName 
-					this.$refs.popupRef.close();
+					// this.$refs.popupRef.close();
+					uni.navigateTo({
+						url:"../position/position?city="+this.region
+					})
+					
 				} else {
-					this.$refs.popupRef.close();
+					// this.$refs.popupRef.close();
 				}
 			}
 		}

+ 2 - 2
pages/sale/information.vue

@@ -189,7 +189,7 @@
 					});
 					if (value != 0) {
 						uni.setTabBarBadge({
-							index: 3,
+							index: 4,
 							text: value + ""
 						})
 					}
@@ -277,7 +277,7 @@
 					});
 					if (value != 0) {
 						uni.setTabBarBadge({
-							index: 3,
+							index: 4,
 							text: value + ""
 						})
 					}

+ 1 - 1
pages/tran/tran.vue

@@ -138,7 +138,7 @@
 						});
 						if(value != 0){
 							uni.setTabBarBadge({
-								index:3,
+								index:4,
 								text:value+""
 							})
 						}

+ 13 - 4
pages/user/user.vue

@@ -104,6 +104,15 @@
 					},
 					{
 						num: 1,
+						name: '我的粮脉',
+						// icon: 'cuIcon-apps',
+						src:'../../static/img/sign/authentication@2x.png',
+						tips: 0,
+						url: '/pages/grain_pulse/my_grain_pulse',
+						show: true
+					},
+					{
+						num: 2,
 						name: '我的合同',
 						// icon: 'cuIcon-calendar',
 						src:'../../static/img/sign/myContract@2x.png',
@@ -112,7 +121,7 @@
 						show: true
 					},
 					{
-						num: 2,
+						num: 3,
 						name: '我的任务',
 						// icon: 'cuIcon-copy',
 						src:'../../static/img/sign/myTask@2x.png',
@@ -121,7 +130,7 @@
 						show: true
 					},
 					{
-						num: 3,
+						num: 4,
 						name: '我的发布',
 						// icon: 'cuIcon-news',
 						src:'../../static/img/sign/myRelease@2x.png',
@@ -130,7 +139,7 @@
 						show: true
 					},
 					{
-						num: 4,
+						num: 5,
 						name: '货运收发',
 						// icon: 'cuIcon-copy',
 						src:'../../static/img/sign/receiveGoods@2x.png',
@@ -210,7 +219,7 @@
 						});
 						if(value != 0){
 							uni.setTabBarBadge({
-								index:3,
+								index:4,
 								text:value+""
 							})
 						}

BIN
static/img/liangmai/my_shoucang.png


BIN
static/img/liangmai/my_shoucang1.png


+ 48 - 5
util/util.js

@@ -373,7 +373,7 @@ const utils = {
 	isNumber: function(val) {
 		let regPos = /^\d+(\.\d+)?$/; //非负浮点数
 		let regNeg =
-		/^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+			/^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
 		if (regPos.test(val) || regNeg.test(val)) {
 			return true;
 		} else {
@@ -399,11 +399,51 @@ const utils = {
 		}
 	},
 	// null赋值空字符串
-	nullToString:function(obj){
-		for(key in obj){
-			if(obj[key]==null) obj[key] = ""
+	nullToString: function(obj) {
+		for (key in obj) {
+			if (obj[key] == null) obj[key] = ""
 		}
 	},
+	//获取当前定位
+	getPosition: function(option) {
+
+	},
+
+	getLocation: function() {
+		return new Promise(function(resolve, reject) {
+			uni.getLocation({
+				type: 'gcj02',
+				geocode: true,
+				success: function(res) {
+					if (res.errMsg == "getLocation:ok") {
+						resolve(res);
+					} else {
+						reject(res);
+					}
+				},
+				fail(e) {
+					reject(err);
+				}
+			});
+		});
+	},
+	openSetting: function() {
+		// App跳转系统的设置界面
+		// #ifdef APP-PLUS
+		uni.getSystemInfo({
+			success(res) {
+				if (res.platform == 'ios') { //IOS
+					plus.runtime.openURL("app-settings://");
+				} else if (res.platform == 'android') { //安卓
+					let main = plus.android.runtimeMainActivity();
+					let Intent = plus.android.importClass("android.content.Intent");
+					let mIntent = new Intent('android.settings.ACTION_SETTINGS');
+					main.startActivity(mIntent);
+				}
+			}
+		});
+		// #endif
+	},
 	expireTime: function(str) {
 		if (!str) {
 			return;
@@ -547,5 +587,8 @@ module.exports = {
 	expireTime: utils.expireTime,
 	payOrder: utils.payOrder,
 	login: utils.login,
-	nullToString:utils.nullToString
+	nullToString: utils.nullToString,
+	getLocation: utils.getLocation,
+	openSetting: utils.openSetting,
+
 }

+ 1 - 1
websocket_sdk.js

@@ -300,7 +300,7 @@ export default class Websocket {
 			    		});
 						if(value != 0){
 							uni.setTabBarBadge({
-								index:3,
+								index:4,
 								text:value+""
 							})
 						}