Kaynağa Gözat

语音输入

zouling 3 ay önce
ebeveyn
işleme
3c0dafa424

+ 5 - 0
user_ui/1.txt

@@ -10,3 +10,8 @@ SHA1: BC:CC:2F:16:32:84:D8:EE:F7:2A:8C:26:F2:11:8E:FA:EE:16:9B:16
 高德key:f55857365884963baed205a0974d6e96
 高德key:f55857365884963baed205a0974d6e96
 
 
 极光appkey:
 极光appkey:
+百度语音
+
+语音识别: AppID:30799445
+	API Key :MuVtMTc6EHaLbrr38WEhqjml
+	Secret Key:rPGCiA3L41VwuTCBHkwkmcOt0IPTsi8z

+ 30 - 13
user_ui/manifest.json

@@ -8,9 +8,9 @@
     "app-plus" : {
     "app-plus" : {
         "usingComponents" : true,
         "usingComponents" : true,
         "nvueCompiler" : "uni-app",
         "nvueCompiler" : "uni-app",
-		"compatible" : {
-		    "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
-		},
+        "compatible" : {
+            "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
+        },
         "splashscreen" : {
         "splashscreen" : {
             "alwaysShowBeforeRender" : true,
             "alwaysShowBeforeRender" : true,
             "waiting" : true,
             "waiting" : true,
@@ -18,25 +18,30 @@
             "delay" : 0
             "delay" : 0
         },
         },
         "modules" : {
         "modules" : {
-            "Maps" : {}
+            "Maps" : {},
+            "Speech" : {}
         },
         },
         "distribute" : {
         "distribute" : {
             "android" : {
             "android" : {
                 "permissions" : [
                 "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ]
                 ]
             },
             },
@@ -51,6 +56,13 @@
                         "appkey_ios" : "f55857365884963baed205a0974d6e96",
                         "appkey_ios" : "f55857365884963baed205a0974d6e96",
                         "appkey_android" : "f55857365884963baed205a0974d6e96"
                         "appkey_android" : "f55857365884963baed205a0974d6e96"
                     }
                     }
+                },
+                "speech" : {
+                    "baidu" : {
+                        "appid" : "30799445",
+                        "apikey" : "MuVtMTc6EHaLbrr38WEhqjml",
+                        "secretkey" : "rPGCiA3L41VwuTCBHkwkmcOt0IPTsi8z"
+                    }
                 }
                 }
             },
             },
             "icons" : {
             "icons" : {
@@ -63,7 +75,12 @@
     },
     },
     "quickapp" : {},
     "quickapp" : {},
     "mp-weixin" : {
     "mp-weixin" : {
-        "appid" : "wxccd7e2a0911b3397",
+        "appid" : "wx694b1ba10320b8bc",
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "获取当前位置" // 此处可以修改成自己的权限提示文本
+            }
+        },
         "setting" : {
         "setting" : {
             "urlCheck" : false,
             "urlCheck" : false,
             "es6" : false,
             "es6" : false,

+ 1 - 1
user_ui/mine/components/popup/popup.vue

@@ -88,7 +88,7 @@
 				fdelimg:require('@/work/static/fjdel.png'),
 				fdelimg:require('@/work/static/fjdel.png'),
 				
 				
 				baseUrl:config.baseUrl,
 				baseUrl:config.baseUrl,
-				closeimg:require("@/work/static/close.png"),
+				closeimg:require("@/static/images/close.png"),
 				syqxidx:'',
 				syqxidx:'',
 				datainfo:{
 				datainfo:{
 					iszc:""
 					iszc:""

+ 1 - 1
user_ui/mine/pages/car/index.vue

@@ -50,7 +50,7 @@
 		onReachBottom() {
 		onReachBottom() {
 			if (this.reachflag) {
 			if (this.reachflag) {
 				this.pageNum++
 				this.pageNum++
-				this.getrefreshData()
+				this.getDataFn()
 			}
 			}
 		},
 		},
 		methods:{
 		methods:{

+ 0 - 411
user_ui/news/components/popup/popup.vue

@@ -1,411 +0,0 @@
-<template>
-	<view>
-		<!-- 弹窗 -->
-		<view class="bgbox" @click="getClose" v-if="type"></view>
-		<!-- 建议回复 -->
-		<view v-if="type=='reply'" class="assignbox pra">
-			<view class="assbox">
-				<view class="asstit">回复</view>
-				<uni-easyinput maxlength='200' type="textarea" autoHeight v-model="datainfo.companyIntroduction" :inputBorder='false' placeholder="请输入回复内容,最多不超过200字…" />
-				<view class="voice mb20">
-					<view class="flexc">
-						<image :src="voice"></image>
-						语音输入
-					</view>
-				</view>
-				<view class="fjtxt mb18 flexcj">附件信息
-					<lsj-upload ref="lsjUpload" childId="upload1" :loanApplicationId="loanApplicationId" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
-						    @progress="" @uploadEnd="onuploadEnd" fileName="123" fileVal='dbxmhfhgb' bigType="c">
-						<view class="fjbtns co02" :style="{width: width,height: height}">上传附件</view>
-					</lsj-upload>
-				</view>
-				<view class="fjlists"  v-for="(fite,fidx) in filelist" :key='fidx'>
-					<view class="flext" @click="getDown(fite.url)">
-						<view class="imgl"><image :src="filico" ></image></view>
-						<view class="tit">{{fite.name}}</view>
-					</view>
-					<view class="delimg flex0" @click.stop="getDelFj(fidx)">
-						<image :src="fdelimg"></image>
-					</view>
-				</view>
-				<view class="rhbtn mt40"  @click="getSure">确定</view>
-			</view>
-			
-			<image :src="closeimg" class="closeimg"  @click="getClose"></image>
-		</view>
-	</view>
-</template>
-
-<script>
-	import config from '@/config'
-	const baseUrl = config.baseUrl
-	import { getToken } from '@/utils/auth'
-	import {uploadmore} from '@/utils/common.js'
-	export default{
-		components:{},
-		props:{
-			type: {
-				type: String,
-				default () {
-					return ''
-				}
-			},
-			finshtype:{
-				type: [String,Number],
-				default () {
-					return ''
-				}
-			}
-		},
-		data(){
-			return{
-				//附件
-				option: {
-				    // 上传服务器地址,需要替换为你的接口地址
-				    url: baseUrl+'/common/uploadNew', // 该地址非真实路径,需替换为你项目自己的接口地址
-				    // 上传附件的key
-				    name: 'file',
-				    // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
-				    header: {
-				        // 示例参数可删除
-				        'Authorization':  'Bearer ' + getToken(),
-				    },
-				    // 根据你接口需求自定义body参数
-				    formData: {
-						loanApplicationNumber:'',
-						loanApplicationId:'',
-					}
-				},
-				// 借据上传
-				jjoption: {
-				    // 上传服务器地址,需要替换为你的接口地址
-				    url: baseUrl+'/common/uploadNewOcr', // 该地址非真实路径,需替换为你项目自己的接口地址
-				    // 上传附件的key
-				    name: 'file',
-				    // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
-				    header: {
-				        // 示例参数可删除
-				        'Authorization':  'Bearer ' + getToken(),
-				    },
-				    // 根据你接口需求自定义body参数
-				    formData: {
-						loanApplicationNumber:'',
-						loanApplicationId:'',
-					}
-				},
-				// 选择文件后是否立即自动上传,true=选择后立即上传
-				instantly: true,
-				// 必传宽高且宽高应与slot宽高保持一致
-				width: '',
-				height: '40rpx',
-				// 限制允许上传的格式,空串=不限制,默认为空
-				formats: 'doc,docx,xls,xlsx,ppt,txt,pdf,zip,rar,word,png,jpg,jpeg',
-				// 文件上传大小限制
-				size: 100,
-				// 文件数量限制 默认10
-				count: 5,
-				// 文件回显列表
-				files: new Map(),
-				// 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
-				wxFiles: [],
-				// 是否打印日志
-				debug: false,
-				filelist:[],
-				filico:require('@/work/static/filico.png'),
-				fdelimg:require('@/work/static/fjdel.png'),
-				
-				baseUrl:config.baseUrl,
-				closeimg:require("@/work/static/close.png"),
-				rimg: require('@/work/static/people/rimg.png'),
-				headbg: require('@/work/static/service/headbg.png'),
-				addpho: require('@/work/static/service/addpho.png'),
-				rdelimg: require('@/work/static/service/rdel.png'),
-				voice: require('@/work/static/service/voice.png'),
-				syqxidx:'',
-				datainfo:{
-					iszc:""
-				},
-				sexs: [{
-					text: '男',
-					value: 1
-				}, {
-					text: '女',
-					value: 2
-				}],
-				peoval:0,
-				peolist:[]
-			}
-		},
-		mounted() {
-			this.baseUrl=baseUrl
-		},
-		watch:{
-			loanApplicationNumber(val){
-				this.option.formData.loanApplicationNumber=val
-				this.jjoption.formData.loanApplicationNumber=val
-			},
-			loanApplicationId(val){
-				this.option.formData.loanApplicationId=val
-				this.jjoption.formData.loanApplicationId=val
-			},
-			type(val){
-				// this.filelist=[];
-				// this.shtext='';
-				// this.isty='2';
-				// this.phofile=[];
-			}
-		},
-		methods:{
-			bindDateChange(){
-				var val=e.detail.value;
-			},
-			getClose(){
-				this.$emit('getClose')
-			},
-			getSure(){
-				this.$emit('getSure')
-			},
-			getChose(val){
-				this.peoval=val
-			},
-			getPreviewImage(arr,idx){
-				var newArr=[];
-				arr.forEach(ite=>{
-					var ds=this.baseUrl+ite
-					newArr.push(ds)
-				})
-				uni.previewImage({
-					urls: newArr,
-					current:idx,
-					success: function(data) {
-						
-					},
-					fail: function(err) {
-						
-					}
-				});
-			},
-			// 上传
-			onuploadEnd(item,fileVal,bigType) {
-				var newobj={}
-				var responseText=JSON.parse(item.responseText)
-				if(responseText.code==200){
-					if(fileVal=='qtfj'){
-						newobj.name=responseText.originalFilename;
-					}else{
-						newobj.name=responseText.newFileName;
-					}
-					newobj.oldName=responseText.originalFilename;
-					newobj.url=responseText.fileName;
-					newobj.type=fileVal;
-					newobj.bigType=bigType;
-					newobj.loanApplicationId=this.loanApplicationId;
-					newobj.loanApplicationNumber=this.loanApplicationNumber;
-					this.filelist.push(newobj)
-				}else{
-					this.$toast(responseText.msg)
-				}
-			},
-			getDelFj(idx){
-				var that=this;
-				uni.showModal({
-					title: '确认删除',
-					content: "是否确认删除",
-					cancelText: '取消',
-					confirmText: '确认',
-					success: function(res) {
-						if (res.confirm) {
-							that.filelist.splice(idx,1)
-						} else if (res.cancel) {
-						}
-					}
-				});
-			},
-			getDown(path,name){
-				console.log(path,name)
-				// #ifdef APP-PLUS
-				self.getFilePermissions(function(res){
-					if(res==1){
-						uni.showLoading({
-							title: '加载中'
-						});
-						var url = baseUrl + path;
-						let dtask = plus.downloader.createDownload(url, {
-							filename: 'file://storage/emulated/0/'+baseName+'/' + name
-						}, (d, status) => {
-							//d为下载的文件对象
-							if (status == 200) {
-								uni.hideLoading();
-								uni.showToast({
-									icon: 'none',
-									mask: true,
-									title: '已保存到文件夹:/'+baseName+'/'+ name, //保存路径
-									duration: 3000,
-								});
-								
-								//下载成功,d.filename是文件在保存在本地的相对路径,使用下面的API可转为平台绝对路径
-								let fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
-								setTimeout(() => {
-									plus.runtime.openFile(d.filename); //选择软件打开文件
-								}, 1500)
-							} else {
-								//下载失败
-								uni.hideLoading();
-								plus.downloader.clear(); //清除下载任务
-								uni.showToast({
-									icon: 'none',
-									mask: true,
-									title: '下载失败,请稍后重试',
-								});
-							}
-						})
-						dtask.start();
-					}else{
-						uni.hideLoading();
-						uni.showToast({
-							title: '无法获取权限,文件下载将出错!',
-							icon: 'none',
-						})
-					}			
-				})
-				// #endif
-				// #ifndef APP-PLUS
-				this.getDownloader(path)
-				// #endif
-			},
-			getDownloader(e){
-				uni.showLoading({
-					title: '加载中'
-				});
-				var url=baseUrl+e;
-				let index1 = e.lastIndexOf("."); // 得到一个索引值
-				let index2 = e.length;
-				let type = e.substring(index1, index2);
-				if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
-					uni.previewImage({
-						current: 0,
-						urls: [url],
-						// background: '#ffffff'
-					});
-					uni.hideLoading();
-				} else {
-				uni.downloadFile({
-					url: url,//文件的下载路径
-					success(result) {
-							uni.hideLoading()
-						var filePath = result.tempFilePath;
-						   uni.openDocument({
-						     filePath: filePath,
-						     showMenu: true,
-						     success: function (res) {
-						       // console.log('打开文档成功');
-						     }
-						   });
-					},
-					fail(res) {uni.hideLoading()}
-				})
-				}
-			},
-			getDelFn(){
-				var that=this;
-				uni.showModal({
-					title: '确认删除',
-					content: "是否确认删除",
-					cancelText: '取消',
-					confirmText: '确认',
-					success: function(res) {
-						if (res.confirm) {
-							// that.filelist.splice(idx,1)
-						} else if (res.cancel) {
-						}
-					}
-				});
-			},
-			getaddImage(e){
-				let that = this;
-				let file =[],count=9
-				uni.chooseImage({
-					count: 1,
-					success:function(res){
-						let img= res.tempFilePaths;
-						if(img.length + file.length > count){
-							uni.showToast({
-								title: '最多上传'+count+'张图片',
-								icon: 'none',
-								duration: 2000
-							})
-						}else{
-							let imglen = res.tempFilePaths.length;
-							var fuwufile = [];
-							uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
-								var resurl=rs[0];
-								// if(e=='front'){
-								// 	that.datainfo.front=resurl.fileName;
-								// }else{
-								// 	that.datainfo.back=resurl.fileName;
-								// }
-							})	
-						}
-					}
-				});
-			},
-			
-		}
-	}
-</script>
-
-<style lang="scss" scoped>	
-// 指派
-.assignbox{background: #FFFFFF;border-radius: 20rpx;position: fixed;left:56rpx;right:54rpx;z-index: 10;top: 50%;transform: translateY(-50%);padding: 32rpx 38rpx 36rpx;
-	.assbox{max-height: calc(100vh - 300rpx);overflow: auto;}
-	.asstit{font-weight: bold;font-size: 30rpx;color: #272727;text-align: center;padding-left: 16rpx;margin-bottom: 28rpx;}
-	.rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
-		image{width: 100%;height: 100%;}
-	}
-	.asline{border-bottom: 2rpx solid #E5E5E5;padding: 30rpx 0;margin-bottom: 40rpx;}
-	.tabtit{font-weight: bold;font-size: 26rpx;color: #272727;line-height: 36rpx;margin-bottom: 24rpx;padding-left: 14rpx;}
-	.asslists{display: flex;flex-wrap: wrap;
-		.asslist{width: 252rpx;height: 76rpx;border-radius: 20rpx;border: 2rpx solid #DADADA;position: relative;display: flex;align-items: center;box-sizing: border-box;padding: 0 22rpx;margin: 0 14rpx 24rpx 14rpx;overflow: hidden;
-			&.act{border-color: #0256FD;
-				.altit{color: #0256FD;}
-			}
-			image{position: absolute;right: -2rpx;bottom: -2rpx;width: 34rpx;height: 32rpx;}
-			.altit{font-weight: bold;font-size: 26rpx;color: #666666;flex: 1;}
-			.altxt{font-weight: bold;font-size: 22rpx;flex: 0 0 auto;}
-		}
-	}
-	
-	// 上传图片
-	&.pra{left: 100rpx;right: 100rpx;}
-	.assadd{display: flex;flex-direction: column;align-items: center;justify-content: center;border-radius: 10rpx;height: 192rpx;
-border: 2rpx dashed #A7A7A7;box-sizing: border-box;margin-bottom: 32rpx;
-		image{width:48rpx;height: 40rpx;margin-bottom: 16rpx;}
-		view{font-weight: bold;font-size: 26rpx;color: #272727;}
-	}
-	.assimgs{display: flex;align-items: center;flex-wrap: wrap;margin-bottom: 8rpx;
-		.assimg{width: 140rpx;height: 140rpx;position: relative;overflow: hidden;margin: 0 24rpx 24rpx 0;
-			&:nth-of-type(3n){margin-right: 0;}
-			.img{width: 100%;height: 100%;}
-			.delimg{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
-		}
-	}
-}
-.voice{font-weight: 500;display: flex;justify-content:flex-end;align-items: center;margin-top: 40rpx;
-font-size: 24rpx;
-color: #45CB99;
-		image{width: 24rpx;height: 24rpx;margin-right: 8rpx;}
-	}
-// 附件
-	.fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 20rpx;
-		&:last-child{margin-bottom: 0;}
-		.imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;flex: 0 0 auto;
-			image{width: 26rpx;height: 24rpx;}
-		}
-		.tit{font-size: 26rpx;color: #222327;font-weight: 500;margin-top: 4rpx;word-break: break-all;}
-		.delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;flex: 0 0 auto;
-			image{width: 24rpx;height: 24rpx;}
-		}
-		.txta{color: #28C529;font-weight: 500;line-height: 40rpx;flex: 0 0 auto;margin-left: 18rpx;padding: 0 6rpx;}
-	}
-.closeimg{width: 32rpx;height: 32rpx;position: absolute;bottom: -62rpx;left: 50%;margin-left: -16rpx;}
-</style>

+ 476 - 0
user_ui/news/components/popup/voice.vue

@@ -0,0 +1,476 @@
+<template>
+	<view>
+		<view class="bgbox"  v-if="voiceflag"  @click="getClose"></view>
+		<view class="voice" v-if="voiceflag">
+			<image :src="closeimg" class="choseimg" @click="getClose"></image>
+			<view v-if="isShow">
+				<view v-if="sendLock" class="tip">
+					<view class="txt">试试这样说</view>
+					<view class="txt-bt">科技</view>
+				</view>
+				<view v-else>
+					<!-- @click="resultClick" -->
+					<view class="res-txt" >
+						<text :style="{
+							color: (resultText == '正在识别中2...' || resultText == '未检测到语音,请重试') ? 
+							'#919098' : 
+							'#2979ff'}">
+							{{resultText}}
+						</text>
+						<!-- <image v-if="resultText != '正在识别中.1..' && resultText != '未检测到语音,请重试'"
+							src="/static/img/xiaoshou.png" mode="widthFix"></image> -->
+					</view>
+				</view>
+			</view>
+		 
+			<view v-else class="tip">
+				<view v-if="!sendLock" class="tipbox">{{voicetext}}</view>
+				<view v-html="text" class="txt" style="color: #8e8d9a;"></view>
+				<view v-if="!sendLock" class="prompt-loader">
+					<view class="em" :style="randomRgb()" v-for="(item,index) in 30" :key="index"></view>
+				</view>
+				<view v-else class="prompt-loader"></view>
+			</view>
+		 
+			<view class="btn" @longpress="handleRecordStart" @touchmove="handleTouchMove" @touchend="handleRecordStop">
+				<view class="btn-cont">
+					长按开始语音搜索
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const recorderManager = uni.getRecorderManager();
+	//播放录音
+	const innerAudioContext = uni.createInnerAudioContext();
+	innerAudioContext.autoplay = true;
+	export default{
+		props:{
+			voiceflag:{
+				type: Boolean,
+				default () {
+					return false
+				}
+			}
+		},
+		watch:{
+			sendLock(newVal, oldVal) {
+				var that=this;
+				recorderManager.onStop(res => {
+					if (newVal) return //上锁不发送
+					//解锁发送网络请求
+					setTimeout(function(res){
+						if(!that.voicetext&&!that.partialResult){
+							that.resultText='未检测到语音,请重试';
+							that.sendLock=true;
+						}else{
+							that.resultText=that.voicetext||that.partialResult;
+							// console.log(that.resultText,85)
+							// that.xmmc=that.xmmc+that.resultText;
+							setTimeout(function(){
+								that.$emit('getVoice',that.resultText)
+								// that.voiceflag=false;
+								that.sendLock=true;
+							},1200)
+						}
+						
+					},1000)
+					// console.log(res.tempFilePath, '获取录音文件')
+				});
+			},
+		},
+		data(){
+			return {
+				// speechimg:require('@/static/images/index/speech.png'),
+				xmmc:'',
+				
+				closeimg:require("@/static/images/close.png"),
+				// voiceflag:true,
+				voiceToken: '',
+				timer: null,
+				text: '',
+				resultText: '正在识别中...',
+				startPoint: {},
+				sendLock: true,
+				isShow: true,
+				adioFileData: '',
+				adioSize: '',
+				resContent: '',
+				luyinStatus: true,
+				voicetext:'',
+				options: {}, // 语音转文字的设置
+				partialResult:'',//临时语音
+			}
+		},
+		mounted() {
+			// if(!this.xmmc){
+			// 	this.xmmc=this.name
+			// }
+			var that=this;
+			// #ifdef APP-PLUS
+					// 监听语音识别事件
+					plus.speech.addEventListener('start', this.ontStart, false);
+					plus.speech.addEventListener('volumeChange', this.onVolumeChange, false);
+					plus.speech.addEventListener('recognizing', this.onRecognizing, false);
+					plus.speech.addEventListener('recognition', this.onRecognition, false);
+					plus.speech.addEventListener('end', this.onEnd, false);
+			// #endif
+			
+			recorderManager.onStop(function(res) {
+				//录音后的回调函数
+				// console.log('recorder stop' + JSON.stringify(res));
+				// console.log(res.tempFilePath);
+				that.voicePath = res.tempFilePath;
+				// self.voicePath = 
+			});
+		},
+		onUnload() {
+		},
+		unmounted() {
+		},
+		methods:{
+			getClose(){
+				// this.voiceflag=false;
+				this.sendLock=true;
+				this.$emit('getClose')
+			},
+			onRecognizing(e){
+				this.partialResult=this.partialResult+e.partialResult;
+			},
+			// 录音转文字
+			handleVoice() {
+				// console.log('语音输入')
+				let _this = this;
+				this.options.engine = 'baidu'
+				// this.options.timeout = 60 * 1000; //超时时间
+				this.options.continue = true;//语音识别是否采用持续模式
+				this.options.punctuation = false; // 是否需要标点符号 
+				this.options.userInterface = false; // 是否显示语音界面
+				plus.speech.startRecognize(this.options, (s) => {
+					console.log(s,1)
+					_this.voicetext+=s;
+					// plus.speech.stopRecognize(); // 关
+				});
+			},
+			//长按录音方法
+			handleRecordStart(e) {
+				this.voicetext='';
+				this.partialResult='';
+				this.startPoint = e.touches[0]; //记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
+				recorderManager.start({duration: 60000}); //开始录音
+				this.handleVoice()
+				this.text = `<text style="color:#333">上划取消识别</text>`;
+				this.sendLock = false; //长按时不上锁。
+				this.isShow = false;
+				this.resultText = '正在识别中...';
+				// 按钮
+			},
+			//结束录音 (手指松开)时触发
+			handleRecordStop(e) {
+				var that=this;
+				this.isShow = true;
+				setTimeout(function(){
+					plus.speech.stopRecognize();
+					recorderManager.stop(); //结束录音
+				},1200)
+				
+			},
+			//上划取消搜索
+			handleTouchMove(e) {
+				let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY;
+				if (Math.abs(moveLenght) > 50) {
+					this.text = `松开手指,<text style="color:#333">取消搜索</text>`;
+					this.sendLock = true; //触发了上滑取消搜索,上锁
+					this.isShow = false;
+				} else {
+					this.text = `<text style="color:#333">上划取消搜索</text>`;
+					this.sendLock = false; //上划距离不足,可以搜索,不上锁
+					this.isShow = false;
+				}
+			},
+			//获取录音结果子传父
+			resultClick() {
+				if (this.resultText == '正在识别中...' || this.resultText == '未检测到语音,请重试') return;
+				this.$emit('getVoice',this.resultText)
+				// this.voiceflag=false;
+				this.sendLock=true;
+				// this.$emit('voiceResult', this.resultText)
+			},
+			//弹窗关闭之后的操作,点击遮罩层或关闭按钮
+			// afterHide() {
+			// 	this.sendLock = true;
+			// 	this.$emit('closePopup');
+			// 	clearInterval(this.timer);
+			// 	this.resultText = '正在识别中...';
+			// },
+			randomRgb() {
+				let R = Math.floor(Math.random() * 130 + 110);
+				let G = Math.floor(Math.random() * 130 + 110);
+				let B = Math.floor(Math.random() * 130 + 110);
+				return {
+					background: `rgb(${R},${G},${B}, 1)`
+				};
+			},
+			// 语音转文字
+			getSeep(){
+				this.voicetext='';
+				this.partialResult='';
+				this.voiceflag=true;		
+			},
+			onEnd() {
+				// let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
+				//   let curRoute = routes[routes.length - 1].route //获取当前页面路由
+				//   if(curRoute=='pages/work/shprogress'){
+					  
+				//   }else{
+				// 	  if(this.xmmc){
+				// 	  	this.getVoice()
+				// 	  }
+				//   }
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	// 搜索
+.listtopa{border: 6rpx solid #FD5001;border-radius: 32rpx;height:64rpx;box-sizing: border-box;padding:0 140rpx 0 32rpx ;position: relative;
+ input{}
+ image{width: 20rpx;height: 30rpx;margin-right: 16rpx;}
+ .btn{background: #FA5F03;border-radius: 32rpx;width: 120rpx;position: absolute;right: -2rpx;top: -2rpx;bottom:-2rpx;}
+ }
+ 
+ .bgbox{z-index: 1900;}
+ .choseimg{width: 34rpx;height: 34rpx;position: absolute;left: 36rpx;top: 54rpx;}
+ .voice {
+		min-height: 500rpx;
+ 		padding: 100rpx 60rpx 0 60rpx;
+ 		position: relative;
+ 		background-color: #fff;
+ 		position: fixed;
+ 		left:0;right:0;bottom:0;z-index: 2000;
+		padding-bottom: 180rpx;
+ 		.res-txt {
+ 			text-align: center;
+ 			margin-top: 40rpx;
+ 			font-size: 36rpx;
+ 			color: #919098;
+  
+ 			image {
+ 				display: block;
+ 				margin: auto;
+ 				margin-top: 10rpx;
+ 				width: 60rpx;
+ 				animation: bounce-down 2.6s linear infinite;
+ 			}
+ 		}
+  
+ 		.tip {
+ 			margin-top: 15rpx;
+ 			text-align: center;
+  
+ 			.txt {
+ 				font-size: 36rpx;
+ 				color: #151823;
+ 			}
+  
+ 			.txt-bt {
+ 				margin-top: 20rpx;
+ 				color: #919098;
+ 			}
+ 		}
+  
+ 		.btn {
+ 			width: 50%;
+ 			height: 80rpx;
+ 			display: flex;
+ 			align-items: center;
+ 			justify-content: center;
+ 			color: #fff;
+ 			border-radius: 50rpx;
+ 			background: #3484fd;
+ 			position: absolute;
+			bottom: 80rpx;
+ 			left: 50%;
+ 			transform: translateX(-50%);
+  
+ 			.btn-cont {
+ 				display: flex;
+ 				align-items: center;
+ 			}
+ 		}
+ 	}
+  
+ 	@-webkit-keyframes bounce-down {
+ 		25% {
+ 			-webkit-transform: translateY(-10px);
+ 		}
+  
+ 		50%,
+ 		100% {
+ 			-webkit-transform: translateY(0);
+ 		}
+  
+ 		75% {
+ 			-webkit-transform: translateY(13px);
+ 		}
+ 	}
+ 	.content{background-color: #f5f5f5;position: fixed;left: 0;right: 0;bottom: 0;z-index: 10000;height: 500rpx;}
+ 	/* 语音动画 */
+ 	.prompt-loader {
+ 		width: 100%;
+ 		height: 35px;
+ 		display: flex;
+ 		align-items: center;
+ 		justify-content: space-between;
+ 		margin: 30rpx auto;
+ 	}
+  
+ 	.prompt-loader .em {
+ 		height: 15%;
+ 		width: 2px;
+ 		float: left;
+ 		display: block;
+ 		background: #333333;
+ 	}
+  
+ 	.prompt-loader .em:last-child {
+ 		margin-right: 0px;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(1) {
+ 		animation: load 1.3s 0.4s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(2) {
+ 		animation: load 1.3s 0.2s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(3) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(4) {
+ 		animation: load 1.3s 0.8s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(5) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(6) {
+ 		animation: load 1.3s 0.4s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(7) {
+ 		animation: load 1.3s 0.2s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(8) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(9) {
+ 		animation: load 1.3s 0.2s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(10) {
+ 		animation: load 1.3s 0.4s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(11) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(12) {
+ 		animation: load 1.3s 0.8s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(13) {
+ 		animation: load 1.3s 1s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(14) {
+ 		animation: load 1.3s 0.2s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(15) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(16) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(17) {
+ 		animation: load 1.3s 0.8s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(18) {
+ 		animation: load 1.3s 0.2s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(19) {
+ 		animation: load 1.3s 0.4s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(20) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(21) {
+ 		animation: load 1.3s 0.5s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(22) {
+ 		animation: load 1.3s 0.2s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(23) {
+ 		animation: load 1.3s 0.4s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(24) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(25) {
+ 		animation: load 1.3s 0.8s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(26) {
+ 		animation: load 1.3s 0.2s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(27) {
+ 		animation: load 1.3s 0.4s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(28) {
+ 		animation: load 1.3s 0.1s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(29) {
+ 		animation: load 1.3s 0.3s infinite linear;
+ 	}
+  
+ 	.prompt-loader .em:nth-child(30) {
+ 		animation: load 1.3s 0.6s infinite linear;
+ 	}
+  
+ 	@keyframes load {
+ 		0% {
+ 			height: 15%;
+ 		}
+  
+ 		50% {
+ 			height: 100%;
+ 		}
+  
+ 		100% {
+ 			height: 15%;
+ 		}
+ 	}
+</style>

+ 33 - 6
user_ui/news/pages/complaint/add.vue

@@ -16,9 +16,9 @@
 									<view class="rimg"></view>
 									<view class="rimg"></view>
 								</view>
 								</view>
 							</uni-forms-item>
 							</uni-forms-item>
-							<uni-easyinput type="textarea" autoHeight v-model="datainfo.content" :inputBorder='false' placeholder="请详细描述您的投诉建议内容(最多可输入200字哦)" />
+							<uni-easyinput type="textarea" maxlength="200" autoHeight v-model="datainfo.content" :inputBorder='false' placeholder="请详细描述您的投诉建议内容(最多可输入200字哦)" />
 							<view class="voice mb28">
 							<view class="voice mb28">
-								<view class="flexc">
+								<view class="flexc" @click="getVoiceFn">
 									<image :src="voice"></image>
 									<image :src="voice"></image>
 									语音输入
 									语音输入
 								</view>
 								</view>
@@ -49,7 +49,8 @@
 			</view>
 			</view>
 		</uni-forms>
 		</uni-forms>
 	<loading></loading>	
 	<loading></loading>	
-	</view>
+	<voice-input  :voiceflag="voiceflag" @getVoice="getVoice" @getClose="getvoiceClose"></voice-input>
+	</view> 
 </template>
 </template>
 
 
 <script>
 <script>
@@ -57,9 +58,9 @@
 	import { checkPermi,checkRole } from "@/utils/permission"; // 权限判断函数
 	import { checkPermi,checkRole } from "@/utils/permission"; // 权限判断函数
 	import {uploadIdentify,uploadmore} from '@/utils/common.js'
 	import {uploadIdentify,uploadmore} from '@/utils/common.js'
 	import {suggestionAdd,suggestionlPut} from "@/api/work/news.js"
 	import {suggestionAdd,suggestionlPut} from "@/api/work/news.js"
-	
+	import voiceInput from "@/news/components/popup/voice.vue"
 	export default{
 	export default{
-		components:{},
+		components:{voiceInput},
 		data(){
 		data(){
 			return{
 			return{
 				rimg:require('@/static/images/rimg.png'),
 				rimg:require('@/static/images/rimg.png'),
@@ -81,16 +82,25 @@
 				},
 				},
 				phofile:[],
 				phofile:[],
 				baseUrl:config.baseUrl,
 				baseUrl:config.baseUrl,
+				voiceflag:false,
 			}
 			}
 		},
 		},
 		onLoad: function() {
 		onLoad: function() {
-		
 		},
 		},
 		methods:{
 		methods:{
 			checkPermi,checkRole,
 			checkPermi,checkRole,
 			getAddFn(){
 			getAddFn(){
 				// this.$tab.navigateTo("/mine/pages/house/addaddress")
 				// this.$tab.navigateTo("/mine/pages/house/addaddress")
 			},
 			},
+			getVoiceFn(){
+				this.voiceflag=true;
+			},
+			getvoiceClose(){
+				this.voiceflag=false;
+			},
+			getVoice(data){
+				this.datainfo.content=data;
+			},
 			getTabFn(val){
 			getTabFn(val){
 				this.tabval=val
 				this.tabval=val
 			},
 			},
@@ -184,6 +194,23 @@
 					}
 					}
 				});
 				});
 			},
 			},
+			getSeep(){
+				// #ifdef MP-WEIXIN
+				wx.startRecord({
+				  success(res) {
+				    const tempFilePath = res.tempFilePath;
+				    wx.translateVoice({
+				      localId: tempFilePath,
+				      isShowProgressTips: 1,
+				      success(res) {
+				        const text = res.translateResult;
+				        console.log('识别结果:', text);
+				      }
+				    });
+				  }
+				});
+				// #endif
+			}
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 1 - 3
user_ui/news/pages/complaint/detail.vue

@@ -66,7 +66,6 @@
 			<view class="btna">不予公开</view>
 			<view class="btna">不予公开</view>
 			<view class="btnb" @click="getReplyFn">回复</view>
 			<view class="btnb" @click="getReplyFn">回复</view>
 		</view> -->
 		</view> -->
-	<pop-up :type="type" @getClose='getClose'  @getSure="getSure"></pop-up>
 	<loading></loading>	
 	<loading></loading>	
 	</view>
 	</view>
 </template>
 </template>
@@ -74,11 +73,10 @@
 <script>
 <script>
 	import config from '@/config'
 	import config from '@/config'
 	const baseUrl = config.baseUrl
 	const baseUrl = config.baseUrl
-	import popUp from "@/work/components/popup/popup.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	import {suggestionlDet} from "@/api/work/news.js"
 	import {suggestionlDet} from "@/api/work/news.js"
 	export default{
 	export default{
-		components:{popUp},
+		components:{},
 		data(){
 		data(){
 			return{
 			return{
 				replay:require('@/news/static/complaint/replay.png'),
 				replay:require('@/news/static/complaint/replay.png'),

+ 1 - 1
user_ui/pages.json

@@ -433,7 +433,7 @@
 	}
 	}
   ],
   ],
   "preloadRule":{
   "preloadRule":{
-	"/pages/index/index": {
+	"pages/index/index": {
 		"network": "all",
 		"network": "all",
 		"packages": ["work","mine","health"]
 		"packages": ["work","mine","health"]
 	}, 
 	}, 

+ 11 - 1
user_ui/pages/index/index.vue

@@ -160,6 +160,7 @@ import {houseInfoList} from "@/api/work/work.js"
 import {gesettingsList} from "@/api/work/index.js"
 import {gesettingsList} from "@/api/work/index.js"
 import {newsList} from "@/api/work/manage.js"
 import {newsList} from "@/api/work/manage.js"
 import self from '@/utils/location.js';
 import self from '@/utils/location.js';
+import store from "@/store"
   export default {
   export default {
 	components:{footers,notice,boxList,popUp},
 	components:{footers,notice,boxList,popUp},
 	data(){
 	data(){
@@ -201,7 +202,7 @@ import self from '@/utils/location.js';
 			incolorh:'#E6E6E6',
 			incolorh:'#E6E6E6',
 			activecolorh:'#A7A7A7',
 			activecolorh:'#A7A7A7',
 			indicatorDotsh: true,
 			indicatorDotsh: true,
-			city:'幸福大街',
+			city:'合肥市',
 			list:[{tit:'123'},{tit:'123'},{tit:'123'}],
 			list:[{tit:'123'},{tit:'123'},{tit:'123'}],
 			userId:this.$store.state.user.userId,
 			userId:this.$store.state.user.userId,
 			nickName:this.$store.state.user.nickName,
 			nickName:this.$store.state.user.nickName,
@@ -252,6 +253,15 @@ import self from '@/utils/location.js';
 			houseInfoList(params).then(res=>{
 			houseInfoList(params).then(res=>{
 				if(res.code==200){
 				if(res.code==200){
 					this.houselist = JSON.parse(JSON.stringify(res.rows));
 					this.houselist = JSON.parse(JSON.stringify(res.rows));
+					if(res.rows&&res.rows.length){
+						var info=res.rows[0];
+						var obj={
+							houseId:info.houseId,
+							communityName:info.communityName,
+							detailedAddress:info.detailedAddress,
+						}
+						store.commit('SET_HOUSE', obj)
+					}
 				}else{
 				}else{
 					this.$toast(res.msg)
 					this.$toast(res.msg)
 				}
 				}

+ 5 - 1
user_ui/pages/mine/index.vue

@@ -18,7 +18,7 @@
 						</view>
 						</view>
 					</view>
 					</view>
 					<!-- <view class="txt">点击详情 享受更多精彩信息</view> -->
 					<!-- <view class="txt">点击详情 享受更多精彩信息</view> -->
-					<view class="txt">幸福小区12#1101</view>
+					<view class="txt">{{house.communityName}}{{house.detailedAddress}}</view>
 					<!-- <view class="flexc pr" v-if="deptName">
 					<!-- <view class="flexc pr" v-if="deptName">
 						<image :src="headl"></image>
 						<image :src="headl"></image>
 							<view class="txt">{{deptName}}点击登录 享受更多精彩信息</view>
 							<view class="txt">{{deptName}}点击登录 享受更多精彩信息</view>
@@ -202,6 +202,7 @@
 				baseUrl:config.baseUrl,
 				baseUrl:config.baseUrl,
 				name: this.$store.state.user.nickName,
 				name: this.$store.state.user.nickName,
 				deptName:this.$store.state.user.deptName,
 				deptName:this.$store.state.user.deptName,
+				house:this.$store.state.user.house,
 				// version: getApp().globalData.config.appInfo.version,
 				// version: getApp().globalData.config.appInfo.version,
 				footerindex: 'mine',
 				footerindex: 'mine',
 				isfootflag: true,
 				isfootflag: true,
@@ -250,6 +251,9 @@
 		
 		
 		methods: {
 		methods: {
 			checkPermi,checkRole,
 			checkPermi,checkRole,
+			getClockcontFn(){
+				
+			},
 			// 设置
 			// 设置
 			handleToSetting() {
 			handleToSetting() {
 			  this.$tab.navigateTo('/pages/mine/setting/index')
 			  this.$tab.navigateTo('/pages/mine/setting/index')

+ 1 - 0
user_ui/store/getters.js

@@ -9,6 +9,7 @@ const getters = {
   autologin:state => state.user.autologin,
   autologin:state => state.user.autologin,
   userId:state=>state.user.userId,
   userId:state=>state.user.userId,
   phonenumber: state => state.user.phonenumber,
   phonenumber: state => state.user.phonenumber,
+  house: state => state.user.house,
   loading: state => state.user.loading,
   loading: state => state.user.loading,
 }
 }
 export default getters
 export default getters

+ 5 - 0
user_ui/store/modules/user.js

@@ -18,6 +18,7 @@ const user = {
 	autologin:storage.get(constant.autologin),
 	autologin:storage.get(constant.autologin),
 	userId: storage.get(constant.userId),
 	userId: storage.get(constant.userId),
 	phonenumber: storage.get(constant.phonenumber),
 	phonenumber: storage.get(constant.phonenumber),
+	house: storage.get(constant.house),
 	loading: false,
 	loading: false,
   },
   },
 
 
@@ -70,6 +71,10 @@ const user = {
 	  state.phonenumber = phonenumber
 	  state.phonenumber = phonenumber
 	  storage.set(constant.phonenumber, phonenumber)
 	  storage.set(constant.phonenumber, phonenumber)
 	},
 	},
+	SET_HOUSE: (state, house) => {
+	  state.house = house
+	  storage.set(constant.house, house)
+	},
   },
   },
 
 
   actions: {
   actions: {

+ 1 - 0
user_ui/utils/constant.js

@@ -8,6 +8,7 @@ const constant = {
    wgtcode:'vuex_wgtcode',
    wgtcode:'vuex_wgtcode',
    userId: 'vuex_userId',
    userId: 'vuex_userId',
    phonenumber:'vuex_phonenumber',
    phonenumber:'vuex_phonenumber',
+   house:'vuex_house',
  }
  }
 
 
  export default constant
  export default constant

+ 1 - 1
user_ui/utils/storage.js

@@ -4,7 +4,7 @@ import constant from './constant'
 let storageKey = 'storage_data'
 let storageKey = 'storage_data'
 
 
 // 存储节点变量名
 // 存储节点变量名
-let storageNodeKeys = [constant.avatar, constant.name,constant.nickName, constant.roles, constant.permissions,constant.autologin,constant.wgtcode,constant.userId,constant.phonenumber,]
+let storageNodeKeys = [constant.avatar, constant.name,constant.nickName, constant.roles, constant.permissions,constant.autologin,constant.wgtcode,constant.userId,constant.phonenumber,constant.house,]
 
 
 const storage = {
 const storage = {
   set: function(key, value) {
   set: function(key, value) {

+ 1 - 1
user_ui/work/components/popup/popup.vue

@@ -88,7 +88,7 @@
 				// fdelimg:require('@/work/static/fjdel.png'),
 				// fdelimg:require('@/work/static/fjdel.png'),
 				
 				
 				baseUrl:config.baseUrl,
 				baseUrl:config.baseUrl,
-				// closeimg:require("@/work/static/close.png"),
+				// closeimg:require("@/static/images/close.png"),
 				syqxidx:'',
 				syqxidx:'',
 				datainfo:{
 				datainfo:{
 					iszc:""
 					iszc:""

+ 15 - 3
user_ui/work/pages/service/warrantyadd.vue

@@ -35,9 +35,9 @@
 						    >
 						    >
 						    </w-select>
 						    </w-select>
 					</uni-forms-item>
 					</uni-forms-item>
-					<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.repairDetails" :inputBorder='false' placeholder="请详细描述您要报修的内容(最多可输入200字哦" />
+					<uni-easyinput type="textarea" maxlength="200" :disabled="isdisabled" autoHeight v-model="datainfo.repairDetails" :inputBorder='false' placeholder="请详细描述您要报修的内容(最多可输入200字哦" />
 					<view class="voice mb28">
 					<view class="voice mb28">
-						<view class="flexc">
+						<view class="flexc" @click="getVoiceFn">
 							<image :src="voice"></image>
 							<image :src="voice"></image>
 							语音输入
 							语音输入
 						</view>
 						</view>
@@ -73,6 +73,7 @@
 		<view class="rfbtn mt30" @click="getEditFn" v-if="isdisabled">修改</view>
 		<view class="rfbtn mt30" @click="getEditFn" v-if="isdisabled">修改</view>
 		<view class="rfbtn mt30" @click="getSubmit" v-else>提交信息</view>
 		<view class="rfbtn mt30" @click="getSubmit" v-else>提交信息</view>
 	<loading></loading>	
 	<loading></loading>	
+	<voice-input  :voiceflag="voiceflag" @getVoice="getVoice" @getClose="getvoiceClose"></voice-input>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -85,8 +86,9 @@
 	import {repairAdd,repairPut,repairDet} from "@/api/work/service.js"
 	import {repairAdd,repairPut,repairDet} from "@/api/work/service.js"
 	import {getDictionaryFn} from "@/api/system/user.js"
 	import {getDictionaryFn} from "@/api/system/user.js"
 	import wSelect from "@/work/components/w-select/w-select.vue"
 	import wSelect from "@/work/components/w-select/w-select.vue"
+	import voiceInput from "@/news/components/popup/voice.vue"
 	export default{
 	export default{
-		components:{wSelect},
+		components:{wSelect,voiceInput},
 		data(){
 		data(){
 			return{
 			return{
 				rimg:require('@/static/images/rimg.png'),
 				rimg:require('@/static/images/rimg.png'),
@@ -120,6 +122,7 @@
 				chooseValue:'',
 				chooseValue:'',
 				filterable:true,
 				filterable:true,
 				userId:this.$store.state.user.userId,
 				userId:this.$store.state.user.userId,
+				voiceflag:false,
 			}
 			}
 		},
 		},
 		onLoad: function(e) {
 		onLoad: function(e) {
@@ -138,6 +141,15 @@
 				this.datainfo.maintenanceCategory=this.bxlbList[val].dictValue;
 				this.datainfo.maintenanceCategory=this.bxlbList[val].dictValue;
 				this.bxlb=this.bxlbList[val].dictLabel;
 				this.bxlb=this.bxlbList[val].dictLabel;
 			},
 			},
+			getVoiceFn(){
+				this.voiceflag=true;
+			},
+			getvoiceClose(){
+				this.voiceflag=false;
+			},
+			getVoice(data){
+				this.datainfo.repairDetails=data;
+			},
 			getEditFn(){
 			getEditFn(){
 				this.isdisabled=false;
 				this.isdisabled=false;
 			},
 			},

+ 2 - 1
user_ui/work/pages/visitor/index.vue

@@ -13,7 +13,7 @@
 						<image :src="more"></image>
 						<image :src="more"></image>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="txt mb10 fw5">幸福大街幸福小区1号楼3单元1101</view>
+				<view class="txt mb10 fw5">{{house.communityName}}{{house.detailedAddress}}</view>
 				
 				
 				<view class="txt">open the door</view>
 				<view class="txt">open the door</view>
 				<image :src="visbg" class="houseimg"></image>
 				<image :src="visbg" class="houseimg"></image>
@@ -39,6 +39,7 @@
 				more:require("@/work/static/visitor/more.png"),
 				more:require("@/work/static/visitor/more.png"),
 				// adrs:require('@/mine/static/house/adrs.png'),
 				// adrs:require('@/mine/static/house/adrs.png'),
 				backgroundColor: "transparent",
 				backgroundColor: "transparent",
+				house:this.$store.state.user.house,
 				nvaHeight:44,
 				nvaHeight:44,
 				list:[],
 				list:[],
 				pageSize: 10,
 				pageSize: 10,

+ 41 - 17
user_ui/work/pages/visitor/vdetail.vue

@@ -20,7 +20,7 @@
 						<view class="list mw50"><text>来访事由:</text>{{datainfo.reason}}</view>
 						<view class="list mw50"><text>来访事由:</text>{{datainfo.reason}}</view>
 					</view>
 					</view>
 					<view class="flexc">
 					<view class="flexc">
-						<view class="list mw50"><text>车牌号码:</text>{{datainfo.plateNumber}}</view>
+						<view class="list mw50"><text>车牌号码:</text>{{datainfo.plateNumber||''}}</view>
 						<view class="list mw50"><text>手机号码:</text>{{datainfo.mobileNumber}}</view>
 						<view class="list mw50"><text>手机号码:</text>{{datainfo.mobileNumber}}</view>
 					</view>	
 					</view>	
 				</view>
 				</view>
@@ -67,9 +67,13 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<!-- #ifdef APP-PLUS -->
 			<!-- #ifdef APP-PLUS -->
-			<!-- <view class="rhbtn mt30" @click="getShareFn">分享</view> -->
-			<!-- #endif -->
 			<view class="rhbtn mt30" @click="getShareFn">分享</view>
 			<view class="rhbtn mt30" @click="getShareFn">分享</view>
+			<!-- #endif -->
+			<!-- #ifdef MP-WEIXIN -->
+			<button open-type="share" class="rhbtn mt30">分享</button>
+			<!-- #endif -->
+			<!-- <button class="rhbtn mt30" @click="getShareFn">分享</button> -->
+			<!-- <view class="rhbtn mt30" @click="getShareFn">分享</view> -->
 <!-- 			<view class="rhbtn mt30" @click="getPutFn">修改</view> -->
 <!-- 			<view class="rhbtn mt30" @click="getPutFn">修改</view> -->
 		</view>	
 		</view>	
 	<loading></loading>	
 	<loading></loading>	
@@ -90,7 +94,7 @@
 	key='8de52b560193f01932ad997dba3e76c0'
 	key='8de52b560193f01932ad997dba3e76c0'
 	// #endif
 	// #endif
 	// #ifdef MP-WEIXIN
 	// #ifdef MP-WEIXIN
-	key='ccbe52b1ec5f66295fa4609c90a819b7'
+	key='8de52b560193f01932ad997dba3e76c0'
 	// #endif
 	// #endif
 	export default{
 	export default{
 		components:{},
 		components:{},
@@ -144,6 +148,25 @@
 				this.backgroundColor = 'transparent'
 				this.backgroundColor = 'transparent'
 			}
 			}
 		},
 		},
+		onShareAppMessage(res) {
+			this.comflag=false;
+			if (res.from === 'button') {// 来自页面内分享按钮
+			    var data=res.target.dataset;
+				var newobj={
+					title: "邀请你来我家",
+					path: 'http://192.168.101.147:9091'
+				}
+				// if(data.img){
+				// 	newobj.imageUrl=this.baseUrl+data.img
+				// }
+				return newobj
+			}else{
+				return {
+				  title: '智能校管家',
+				  path: '/pages/trends/index'
+				}
+			}
+		},
 		methods:{
 		methods:{
 			checkPermi, checkRole,
 			checkPermi, checkRole,
 			getcreateMap(){
 			getcreateMap(){
@@ -154,19 +177,18 @@
 				
 				
 			},
 			},
 			getShareFn(){
 			getShareFn(){
-				// uni.share({
-				// 	provider: "weixin",
-				// 	scene: "WXSceneSession",
-				// 	type: 1,
-				// 	summary: "我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",
-				// 	success: function (res) {
-				// 		console.log("success:" + JSON.stringify(res));
-				// 	},
-				// 	fail: function (err) {
-				// 		console.log("fail:" + JSON.stringify(err));
-				// 	}
-				// });
-				// this.$tab.navigateTo("/work/pages/visitor/vshare")
+				// #ifdef APP-PLUS
+					uni.shareWithSystem({
+					  summary: '邀请你来我家',
+					  href: 'http://192.168.101.147:9091',
+					  success(){
+					    // 分享完成,请注意此时不一定是成功分享
+					  },
+					  fail(){
+					    // 分享失败
+					  }
+					})
+				// #endif
 			},
 			},
 			getPutFn(){
 			getPutFn(){
 				this.$tab.navigateTo("/work/pages/visitor/vadd?id="+this.id)
 				this.$tab.navigateTo("/work/pages/visitor/vadd?id="+this.id)
@@ -185,6 +207,7 @@
 				});
 				});
 			},
 			},
 			async getLocation(address) {
 			async getLocation(address) {
+				console.log(address,111)
 				var that=this;
 				var that=this;
 			      if (!address) {
 			      if (!address) {
 			        uni.showToast({ title: '请输入地址', icon: 'none' });
 			        uni.showToast({ title: '请输入地址', icon: 'none' });
@@ -195,6 +218,7 @@
 			        const { latitude, longitude } = await geocodeAddress(address, key);
 			        const { latitude, longitude } = await geocodeAddress(address, key);
 			        this.center.lat = latitude;
 			        this.center.lat = latitude;
 			        this.center.lng = longitude;
 			        this.center.lng = longitude;
+					console.log(latitude,longitude)
 					that.covers = [];
 					that.covers = [];
 					that.covers = [{
 					that.covers = [{
 						id:3,
 						id:3,