gjy 3 yıl önce
ebeveyn
işleme
76baeadfb4

+ 2 - 3
components/linzq-citySelect/linzq-citySelect.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-	<div class="wrapper" :style="'top:'+statusBarHeight+'px'">
+	<div class="wrapper">
 		<div class="header">
 		<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>
 				<image class="back_img" @click="back_city()" src="../../static/img/login/logo@2x.png" mode=""></image>
@@ -191,7 +191,7 @@
 				}
 				}
 			},
 			},
 
 
-			back_city(item) {debugger
+			back_city(item) {
 				if (item) {
 				if (item) {
 					this.$emit('back_city', item);
 					this.$emit('back_city', item);
 					//unshift 把数据插入到首位,与push相反
 					//unshift 把数据插入到首位,与push相反
@@ -210,7 +210,6 @@
 						return newArr
 						return newArr
 					}
 					}
 					this.Visit = distinct(arr)
 					this.Visit = distinct(arr)
-					debugger
 					console.log(this.Visit, "---最近访问")
 					console.log(this.Visit, "---最近访问")
 					uni.setStorage({
 					uni.setStorage({
 						key: 'Visit_key',
 						key: 'Visit_key',

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

+ 1 - 0
config/index.js

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

+ 3 - 2
manifest.json

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

+ 5 - 1
pageA/product/lookup.vue

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

+ 63 - 63
pages.json

@@ -544,74 +544,74 @@
             
             
         }
         }
 
 
-	    ,{
-            "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/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/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/localtion/coordinate",
+		//     "style" :                                                                                    
+		//     {
+		//         "navigationBarTitleText": "坐标",
+		//         "enablePullDownRefresh": false
+		//     }
 		    
 		    
-		}
-        ,{
-            "path" : "pages/grain_pulse/distribution/distribution",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
+		// }
+  //       ,{
+  //           "path" : "pages/grain_pulse/distribution/distribution",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "",
+  //               "enablePullDownRefresh": false
+  //           }
             
             
-        }
+  //       }
     ],
     ],
 	"subpackages": [{
 	"subpackages": [{
 			"root": "pageA",
 			"root": "pageA",

+ 246 - 154
pages/grain_pulse/home.vue

@@ -2,11 +2,13 @@
 	<view>
 	<view>
 		<view class="header">
 		<view class="header">
 			<view class="flex justify-between map">
 			<view class="flex justify-between map">
-				<view class='Medium flex align-item-center locationwrap' @click='naviageToPage("/pages/grain_pulse/position/position")'>
+				<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>
 					<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
-					未指定位置
+					{{position}}
 				</view>
 				</view>
-				<view @click='naviageToPage("/pages/grain_pulse/distribution/distribution")' 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>
 					<image class='cangku' src="../../static/img/liangmai/cangku.png" mode=""></image>
 					分布
 					分布
 				</view>
 				</view>
@@ -18,7 +20,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<view class="content" >
+		<view class="content">
 			<view @click='friendcircle' class="friendcircle">
 			<view @click='friendcircle' class="friendcircle">
 				<view class='title flex align-item-center Medium'>
 				<view class='title flex align-item-center Medium'>
 					<image class='icon-friendcircle' src="../../static/img/liangmai/icon.png" mode=""></image>
 					<image class='icon-friendcircle' src="../../static/img/liangmai/icon.png" mode=""></image>
@@ -27,15 +29,25 @@
 				<view class='friendcircle-content flex justify-between'>
 				<view class='friendcircle-content flex justify-between'>
 					<image class='bg' src="../../static/img/liangmai/bg.png" mode=""></image>
 					<image class='bg' src="../../static/img/liangmai/bg.png" mode=""></image>
 					<view class='friendcircle-content-right'>
 					<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>
 			</view>
 			</view>
-			<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 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>
 			</scroll-view>
 			<view v-for='item in datalist' @click='todetails(item)' class="listitem">
 			<view v-for='item in datalist' @click='todetails(item)' class="listitem">
 				<view class="flex">
 				<view class="flex">
@@ -46,7 +58,8 @@
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="flex  align-item-center justify-between">
 				<view class="flex  align-item-center justify-between">
-					<view  @click.stop='naviageToPage("/pages/grain_pulse/localtion/localtion")' 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>
 						<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
 						辽宁省营口市鲅鱼圈区xx路108号
 						辽宁省营口市鲅鱼圈区xx路108号
 					</view>
 					</view>
@@ -58,70 +71,112 @@
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
 			<view class='enter-content'>入驻</view>
 			<view class='enter-content'>入驻</view>
 		</view>
 		</view>
-		
+
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
 	export default {
 	export default {
-        components: {
-            
-        },
+		components: {
+
+		},
 		data() {
 		data() {
 			return {
 			return {
-				status:0,
-				mainBusinessType:'',
-				mainBusinessTypeKey:'0',
+				position: "未设置",
+				status: 0,
+				mainBusinessType: '',
+				mainBusinessTypeKey: '0',
 				pageSize: 10,
 				pageSize: 10,
 				currentPage: 1,
 				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'}
+				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:[]
+				datalist: []
 			}
 			}
 		},
 		},
-		onShow(){
-			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
+		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
+			}
 		},
 		},
-		onLoad(val){
-		   this.position = val.position
-		  },
 		methods: {
 		methods: {
-			mainBusinessTypecahnge(item){
-				if(item.name!='全部'){
-					this.mainBusinessType=item.name
-				}else{
-					this.mainBusinessType=''
+			mainBusinessTypecahnge(item) {
+				if (item.name != '全部') {
+					this.mainBusinessType = item.name
+				} else {
+					this.mainBusinessType = ''
 				}
 				}
-				this.mainBusinessTypeKey=item.value
+				this.mainBusinessTypeKey = item.value
 			},
 			},
-			enter(){
+			enter() {
 				//入驻
 				//入驻
 				uni.navigateTo({
 				uni.navigateTo({
-					url:'/pages/grain_pulse/enter'
+					url: '/pages/grain_pulse/enter'
 				})
 				})
 			},
 			},
-			friendcircle(){
+			friendcircle() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url:'/pages/grain_pulse/friendcircle'
+					url: '/pages/grain_pulse/friendcircle'
 				})
 				})
 			},
 			},
-			todetails(item){
+			todetails(item) {
 				uni.navigateTo({
 				uni.navigateTo({
-					url:'/pages/grain_pulse/details?id='+item.id
+					url: '/pages/grain_pulse/details?id=' + item.id
 				})
 				})
 			},
 			},
-			naviageToPage(item){
+			naviageToPage(item) {
 				console.log(item)
 				console.log(item)
 				uni.navigateTo({
 				uni.navigateTo({
-					url:item
+					url: item
 				})
 				})
 			}
 			}
 		}
 		}
@@ -130,164 +185,201 @@
 
 
 <style scoped>
 <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;
 		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%);
 		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%);
 		background: linear-gradient(180deg, #F5F6FA 0%, #FFFFFF 100%);
-		width:100vw;
-		padding-top:5px;
-		height:49px;
+		width: 100vw;
+		padding-top: 5px;
+		height: 49px;
 		overflow-x: scroll;
 		overflow-x: scroll;
 		white-space: nowrap;
 		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%);
 		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;
-		top:80%;
-		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%);
 		transform: translateY(-50%);
-		color:#fff;
-		
+		color: #fff;
+
 	}
 	}
 </style>
 </style>

+ 5 - 12
pages/grain_pulse/jubao.vue

@@ -11,12 +11,8 @@
 			</view>
 			</view>
 			<view class="uploading">
 			<view class="uploading">
 				<view class="title Regular">上传图片</view>
 				<view class="title Regular">上传图片</view>
-				<u-upload  @on-remove="onRemove" @on-success="onSuccess" @on-error='onError' width='140' height='140' :file-list="fileList" :custom-btn="true"  ref="uUpload" :max-size="5 * 1024 * 1024" max-count="6" :action="$ossUrl">
-					<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>
+				<upload class="upload" ref="upload" :action="$ossUrl" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" @on-success="onSuccess"></upload>
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="commitwrap">
 		<view class="commitwrap">
@@ -27,9 +23,10 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import upload from '@/components/upload_small.vue';
 	export default {
 	export default {
 	    components: {
 	    components: {
-	        
+	        upload
 	    },
 	    },
 		data() {
 		data() {
 			return {
 			return {
@@ -54,8 +51,7 @@
 			},
 			},
 			//图片成功上传后的回调 data为服务器返回的数据,包括图片的存放地址和名称
 			//图片成功上传后的回调 data为服务器返回的数据,包括图片的存放地址和名称
 				onSuccess(data, index, lists){
 				onSuccess(data, index, lists){
-					console.log('https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/'+data.data)
-					// console.log(data, index, lists)
+					console.log(data, index, lists)
 					//页面上定义的临时存放图片的对象,提示也保存后台返回的图片名称
 					//页面上定义的临时存放图片的对象,提示也保存后台返回的图片名称
 					// let currentFile = {name: '', url: ''};
 					// let currentFile = {name: '', url: ''};
 					// currentFile.name = JSON.parse(data).name;
 					// currentFile.name = JSON.parse(data).name;
@@ -66,9 +62,6 @@
 					// this.form.pictureUrl = JSON.stringify(this.fileList)
 					// this.form.pictureUrl = JSON.stringify(this.fileList)
 					//console.log("打印图片List:onSuccess", this.fileList);
 					//console.log("打印图片List:onSuccess", this.fileList);
 				},
 				},
-				onError(res, index, lists, name){
-					console.log(res, index, lists, name)
-				},
 				//删除一张图片的回调,lists这是成功删除一个图片后,还剩余的图片集合
 				//删除一张图片的回调,lists这是成功删除一个图片后,还剩余的图片集合
 				onRemove(data, lists){
 				onRemove(data, lists){
 				    //lists.length > 0说明删除之前已经上传了多余两张的图片
 				    //lists.length > 0说明删除之前已经上传了多余两张的图片

+ 103 - 32
pages/grain_pulse/position/position.vue

@@ -18,7 +18,7 @@
 					<view class="">{{address}}</view>
 					<view class="">{{address}}</view>
 					<view class="" v-if="isposition">{{text}}</view>
 					<view class="" v-if="isposition">{{text}}</view>
 				</view>
 				</view>
-				<view class="reposition Regular" @click="reloadPosition">重新定位</view>
+				<view class="reposition Regular" @click="reloadPosition">{{po_tips}}</view>
 			</view>
 			</view>
 
 
 		</view>
 		</view>
@@ -54,12 +54,13 @@
 				address: "定位失败,请点击重新定位",
 				address: "定位失败,请点击重新定位",
 				city: '营口市',
 				city: '营口市',
 				list: [],
 				list: [],
-				src: {},
-				addressObj: {}
+				position: '',
+				addressObj: {},
+				seconds: 3,
+				po_tips: '重新定位',
 			}
 			}
 		},
 		},
 		onLoad(e) {
 		onLoad(e) {
-			debugger
 			if (e.city) {
 			if (e.city) {
 				this.city = e.city
 				this.city = e.city
 			}
 			}
@@ -67,29 +68,33 @@
 			uni.getStorage({
 			uni.getStorage({
 				key: 'SearchList_key',
 				key: 'SearchList_key',
 				success: function(res) {
 				success: function(res) {
-					debugger
 					that.list = res.data
 					that.list = res.data
 				}
 				}
 			});
 			});
+			this.getLocation()
 			// 获取定位
 			// 获取定位
-			this.utils.getLocation().then(function(res) {
-				debugger
-				console.log("定位信息",res)
-				if (res.errMsg != "getLocation:ok") {
-					// 定位权限未开启,引导设置
-					uni.showModal({
-						title: '温馨提示',
-						content: '您已拒绝定位,请开启',
-						confirmText: '去设置',
-						success(res) {
-							if (res.confirm) {
-								//打开授权设置
-								this.utils.openSetting()
-							}
-						}
-					})
-				}
-			})
+			// 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: {
 		methods: {
 			// 删除最近搜索
 			// 删除最近搜索
@@ -99,9 +104,52 @@
 					data: []
 					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() {
 			reloadPosition() {
-				// this.getLocation()
+				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() {
 			openSetting() {
 				// App跳转系统的设置界面
 				// App跳转系统的设置界面
@@ -148,20 +196,31 @@
 			},
 			},
 			// 搜索
 			// 搜索
 			searchAddress(val) {
 			searchAddress(val) {
-				console.log(val)
+				// console.log(val)
 				let that = this;
 				let that = this;
 				uni.chooseLocation({
 				uni.chooseLocation({
 					success: function(res) {
 					success: function(res) {
-						console.log('位置名称:' + res.name);
-						console.log('详细地址:' + res.address);
-						console.log('纬度:' + res.latitude);
-						console.log('经度:' + res.longitude);
+						console.log(res)
+						// console.log('位置名称:' + res.name);
+						// console.log('详细地址:' + res.address);
+						// console.log('纬度:' + res.latitude);
+						// console.log('经度:' + res.longitude);
 						that.list.push(res.name)
 						that.list.push(res.name)
-						this.src = res
+						this.position = res.name
 						uni.setStorage({
 						uni.setStorage({
 							key: 'SearchList_key',
 							key: 'SearchList_key',
 							data: that.list
 							data: that.list
 						});
 						});
+						uni.setStorage({
+							key: 'setLocaltion',
+							data: res.name,
+							success() {
+								uni.switchTab({
+									url: "../home"
+								});
+							}
+
+						})
 					}
 					}
 				});
 				});
 
 
@@ -173,8 +232,20 @@
 				})
 				})
 			},
 			},
 			toHome(item) {
 			toHome(item) {
-				uni.navigateTo({
-					url: "../home?src=" + this.src
+				console.log("跳转首页")
+				uni.setStorage({
+					key: 'setLocaltion',
+					data: item,
+					success() {
+						uni.switchTab({
+							url: "../home",
+							success(e) {
+								console.log(e)
+
+							}
+						});
+					}
+
 				})
 				})
 			}
 			}
 		}
 		}

+ 5 - 1
pages/grain_pulse/search.vue

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

+ 2 - 2
pages/grain_pulse/selectCity/selectCity.vue

@@ -17,14 +17,14 @@
 		},
 		},
 		onLoad() {
 		onLoad() {
 			uni.getSystemInfo({
 			uni.getSystemInfo({
-				success: function(res) {debugger
+				success: function(res) {
 					console.log("statusBarHeight", res.statusBarHeight)
 					console.log("statusBarHeight", res.statusBarHeight)
 					that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
 					that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
 				},
 				},
 			});
 			});
 		},
 		},
 		methods: {
 		methods: {
-			back_city(e) {debugger
+			back_city(e) {
 				if (e !== 'no') {
 				if (e !== 'no') {
 					this.region = e.cityName 
 					this.region = e.cityName 
 					// this.$refs.popupRef.close();
 					// this.$refs.popupRef.close();

+ 0 - 1
util/util.js

@@ -415,7 +415,6 @@ const utils = {
 				type: 'gcj02',
 				type: 'gcj02',
 				geocode: true,
 				geocode: true,
 				success: function(res) {
 				success: function(res) {
-					debugger
 					if (res.errMsg == "getLocation:ok") {
 					if (res.errMsg == "getLocation:ok") {
 						resolve(res);
 						resolve(res);
 					} else {
 					} else {