36 files modified
8 files added
| | |
| | | }, |
| | | /* 模块配置 */ |
| | | "modules" : { |
| | | "VideoPlayer" : {} |
| | | "VideoPlayer" : {}, |
| | | "LivePusher" : {} |
| | | }, |
| | | /* 应用发布信息 */ |
| | | "distribute" : { |
| | | /* android打包配置 */ |
| | | "android" : { |
| | | "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-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.GET_ACCOUNTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
| | | "<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.GET_ACCOUNTS\"/>", |
| | | "<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.RECORD_AUDIO\"/>", |
| | | "<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
| | | ], |
| | | "abiFilters" : [ "armeabi-v7a", "x86" ] |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/registerUser/idphoto", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "人脸识别", |
| | | "navigationStyle":"custom", |
| | | "backgroundColor":"#000000" |
| | | } |
| | | |
| | | }, |
| | | { |
| | | "path": "pages/home/home", |
| | | "style": { |
| | | |
| | | "navigationBarTitleText": "首页", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | pathUrl: "http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | totalColor: "#51A2FE", |
| | | noloadColor: "#000000", |
| | | loadColor: "#000000", |
| | |
| | | if (this.$store.state.puserID) { |
| | | //获取全部的数据 |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "alarm/alarm/APP-getAlarmListPage", |
| | | url: that.$store.state.piAPI + "alarm/alarm/APP-getAlarmListPage", |
| | | method: "GET", |
| | | data: { |
| | | securityId: this.$store.state.puserID, |
| | |
| | | data() { |
| | | return { |
| | | // pathUrl:"http://localhost:89/", |
| | | pathUrl: "http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | page: 1, |
| | | pagesize: 10, |
| | | status: 'loadmore', |
| | |
| | | content:"", |
| | | article:{}, |
| | | video:false, |
| | | pathUrl:"http://s16s652780.51mypc.cn/api", |
| | | pathUrl:this.$store.state.piAPI + "", |
| | | } |
| | | }, |
| | | onLoad(event) { |
| | |
| | | this.getOneselfInFo(); |
| | | //long 转换为字符串 |
| | | var code = JSON.stringify(this.$store.state.puserID.toString()); |
| | | this.urls = "http://s16s652780.51mypc.cn/xcxjingqingmap_clock_sign_in/xcxmap.html?snumber="+code; |
| | | this.urls = "http://223.82.109.183:2082/xcxjingqingmap_clock_sign_in/xcxmap.html?snumber="+code; |
| | | }, |
| | | methods: { |
| | | //获取当前位置信息 |
| | |
| | | var that = this; |
| | | //保安信息查询 |
| | | uni.request({ |
| | | url:'http://s16s652780.51mypc.cn/api/blade-user/details?id='+this.$store.state.puserID, |
| | | url:that.$store.state.piAPI + '/blade-user/details?id='+this.$store.state.puserID, |
| | | method:'POST', |
| | | success(resdata) { |
| | | that.name = resdata.data.data.realName; |
| | |
| | | tenantNameArrayIndex:0, |
| | | tenantNameArrayType:'请选择客户', |
| | | tenantNameColor:"#808080", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api", |
| | | pathUrl:this.$store.state.piAPI + "", |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | var that = this; |
| | | that.senId = WxStorage.get("ids"); |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chat-records/getSingleMessagePage", |
| | | url:that.$store.state.piAPI + "/chat-records/getSingleMessagePage", |
| | | method:"get", |
| | | data:{ |
| | | senderId: that.senId, |
| | |
| | | var resdata = res.data.data.user; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | if(resdata[i].avatar == null || resdata[i].avatar == ""){ |
| | | resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/img-logo.png"; |
| | | resdata[i].avatar = "http://223.82.109.183:2082/img/bg/img-logo.png"; |
| | | } |
| | | |
| | | if(resdata[i].id == that.senId){ |
| | |
| | | } |
| | | |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chat-records/insertSingleChat", |
| | | url:that.$store.state.piAPI + "/chat-records/insertSingleChat", |
| | | method:"post", |
| | | data:{ |
| | | senderId: that.senId, |
| | |
| | | var that = this; |
| | | that.senId = WxStorage.get("ids"); |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chatgroupc/selectList", |
| | | url:that.$store.state.piAPI + "/chatgroupc/selectList", |
| | | method:"post", |
| | | header: { |
| | | 'content-type': 'application/x-www-form-urlencoded', |
| | |
| | | var resdata = res.data.data; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | if(resdata[i].avatar == null || resdata[i].avatar == ""){ |
| | | resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/img-logo.png"; |
| | | resdata[i].avatar = "http://223.82.109.183:2082/img/bg/img-logo.png"; |
| | | }else{ |
| | | resdata[i].avatar = resdata[i].avatar; |
| | | } |
| | |
| | | } |
| | | |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chatgroupc/submit", |
| | | url:that.$store.state.piAPI + "/chatgroupc/submit", |
| | | method:"post", |
| | | data:{ |
| | | senderId: that.senId, |
| | |
| | | |
| | | var that = this; |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chat-records/getSingleMessagePage", |
| | | url:that.$store.state.piAPI + "/chat-records/getSingleMessagePage", |
| | | method:"get", |
| | | data:{ |
| | | senderId: WxStorage.get("ids"), |
| | |
| | | var resdata = res.data.data.user; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | if(resdata[i].avatar == null || resdata[i].avatar == ""){ |
| | | resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/img-logo.png"; |
| | | resdata[i].avatar = "http://223.82.109.183:2082/img/bg/img-logo.png"; |
| | | } |
| | | |
| | | if(resdata[i].senderId == WxStorage.get("ids")){ |
| | |
| | | var that = this; |
| | | if(this.current == 0){ |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chat-records/getChatListPage", |
| | | url:that.$store.state.piAPI + "/chat-records/getChatListPage", |
| | | method:"get", |
| | | data:{ |
| | | senderId: WxStorage.get("ids") |
| | |
| | | var resdata = res.data.data; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | if(resdata[i].avatar == null || resdata[i].avatar == ""){ |
| | | resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/img-logo.png"; |
| | | resdata[i].avatar = "http://223.82.109.183:2082/img/bg/img-logo.png"; |
| | | } |
| | | } |
| | | that.dataListP = resdata; |
| | |
| | | }); |
| | | }else if(this.current == 1){ |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chatgroup/selectList", |
| | | url:that.$store.state.piAPI + "/chatgroup/selectList", |
| | | method:"POST", |
| | | data:{ |
| | | senderId: WxStorage.get("ids") |
| | |
| | | var resdata = res.data.data; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | if(resdata[i].avatar == null || resdata[i].avatar == ""){ |
| | | resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/qunz.png"; |
| | | resdata[i].avatar = "http://223.82.109.183:2082/img/bg/qunz.png"; |
| | | } |
| | | } |
| | | that.dataListQZ = resdata; |
| | |
| | | }) |
| | | }else if(this.current == 2){ |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api//blade-user/pagetxl?current=1&size=9999", |
| | | url:that.$store.state.piAPI + "//blade-user/pagetxl?current=1&size=9999", |
| | | method:"get", |
| | | data:{ |
| | | senderId: WxStorage.get("ids") |
| | |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | |
| | | if(resdata[i].avatar == null || resdata[i].avatar == ""){ |
| | | resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/img-logo.png"; |
| | | resdata[i].avatar = "http://223.82.109.183:2082/img/bg/img-logo.png"; |
| | | } |
| | | } |
| | | that.dataListTXL = resdata; |
| | |
| | | typeArray:["学校","医院","小区"], |
| | | typeArrayIndex:0, |
| | | typeArrayType:'请选择客户类型', |
| | | pathUrl:"http://s16s652780.51mypc.cn/api", |
| | | pathUrl:this.$store.state.piAPI + "", |
| | | // pathUrl: "http://localhost:8106" |
| | | } |
| | | }, |
| | |
| | | typeArray:["学校","医院","小区"], |
| | | typeArrayIndex:0, |
| | | typeArrayType:'请选择客户类型', |
| | | pathUrl:"http://s16s652780.51mypc.cn/api", |
| | | pathUrl:this.$store.state.piAPI + "", |
| | | // pathUrl: "http://localhost:8106", |
| | | } |
| | | }, |
| | |
| | | var longitude = wx.getStorageSync("longitude"); |
| | | |
| | | // alert(wx.getStorageSync("longitude")); |
| | | that.urls = "http://s16s652780.51mypc.cn/xcxjingqingmap_lxdh/lxdhmap.html?data=" + data + "&latitude=" + |
| | | that.urls = "http://223.82.109.183:2082/xcxjingqingmap_lxdh/lxdhmap.html?data=" + data + "&latitude=" + |
| | | latitude + "&longitude=" + longitude; |
| | | |
| | | |
| | |
| | | // console.log(options.html) |
| | | var a = options.html != undefined ? options.html : "xcxMapJQ/xcxmap.html"; |
| | | // console.log(a) |
| | | this.urls = "http://s16s652780.51mypc.cn/" + a + "?data=" + data; |
| | | this.urls = "http://223.82.109.183:2082/" + a + "?data=" + data; |
| | | // this.dataList = data; |
| | | // console.log(this.urls); |
| | | }, |
| | |
| | | return { |
| | | birthday:"", |
| | | birthdayColor:"#808080", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | pathUrl:this.$store.state.piAPI + "/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | |
| | | data (){ |
| | | return { |
| | | email:"", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | pathUrl:this.$store.state.piAPI + "/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | |
| | | data (){ |
| | | return { |
| | | name:"", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | pathUrl:this.$store.state.piAPI + "/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | |
| | | data (){ |
| | | return { |
| | | phone:"", |
| | | pathUrl:"http://s16s652780.51mypc.cn/api/blade-user", |
| | | pathUrl:this.$store.state.piAPI + "/blade-user", |
| | | // pathUrl:"http://localhost:8102" |
| | | } |
| | | }, |
| | |
| | | var userID = WxStorage.get("ids") |
| | | console.log(userID) |
| | | uni.request({ |
| | | url: 'http://s16s652780.51mypc.cn/api/blade-user/details?id='+this.$store.state.puserID, |
| | | url: that.$store.state.piAPI + '/blade-user/details?id='+this.$store.state.puserID, |
| | | method:'POST', |
| | | success: (res) => { |
| | | that.user=res.data.data; |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | useimg: 'http://s16s652780.51mypc.cn/img/bg/batx.png', |
| | | useimg: 'http://223.82.109.183:2082/img/bg/batx.png', |
| | | showTextmsg: false, |
| | | textmsg: { |
| | | title: '提示', |
| | |
| | | var that = this; |
| | | //保安信息查询 |
| | | uni.request({ |
| | | url:'http://s16s652780.51mypc.cn/api/blade-user/details?id='+this.$store.state.puserID, |
| | | url:that.$store.state.piAPI + '/blade-user/details?id='+this.$store.state.puserID, |
| | | method:'POST', |
| | | success(resdata) { |
| | | that.name = resdata.data.data.realName; |
| | |
| | | that.$store.state.avatar = that.useimg; |
| | | //修改用户头像信息 |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/blade-user/updateUserInfo", |
| | | url:that.$store.state.piAPI + "/blade-user/updateUserInfo", |
| | | method:"POST", |
| | | data:{ |
| | | id: that.$store.state.puserID, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | pathUrl: "http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | totalColor: "#51A2FE", |
| | | noloadColor: "#000000", |
| | | loadColor: "#000000", |
| | |
| | | //long 转换为字符串 |
| | | var code = JSON.stringify(this.$store.state.puserID.toString()); |
| | | // var code = JSON.stringify("1370564873280430082"); |
| | | // this.urls = "http://s16s652780.51mypc.cn/xcxjingqingmap_patrol/xcxmap.html?snumber="+code; |
| | | this.urls = "http://s16s652780.51mypc.cn/xcxMapPatrol/xcxmap.html?snumber="+code; |
| | | // this.urls = "http://223.82.109.183:2082/xcxjingqingmap_patrol/xcxmap.html?snumber="+code; |
| | | this.urls = "http://223.82.109.183:2082/xcxMapPatrol/xcxmap.html?snumber="+code; |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | }) |
| | | // console.log(dataList); |
| | | wx.request({ |
| | | url: 'http://s16s652780.51mypc.cn/api/feedback/feedback/saves', //仅为示例,并非真实接口地址。 |
| | | url: that.$store.state.piAPI + '/feedback/feedback/saves', //仅为示例,并非真实接口地址。 |
| | | data: dataList, |
| | | method: 'POST', |
| | | header: { |
| | |
| | | mask: true |
| | | }) |
| | | wx.request({ |
| | | url: 'http://s16s652780.51mypc.cn/api/feedback/feedback/saves', //仅为示例,并非真实接口地址。 |
| | | url: that.$store.state.piAPI + '/feedback/feedback/saves', //仅为示例,并非真实接口地址。 |
| | | data: dataList, |
| | | method: 'POST', |
| | | header: { |
| New file |
| | |
| | | <template> |
| | | <view class="live-camera" :style="{ width: windowWidth, height: windowHeight }"> |
| | | <view class="title"> |
| | | <text style="color: #ffffff;"> |
| | | {{second}}秒之后开始识别 |
| | | </text> |
| | | </view> |
| | | <view class="preview" :style="{ width: windowWidth, height: windowHeight - 80 }"> |
| | | <live-pusher id="livePusher" ref="livePusher" class="livePusher" mode="SD" beauty="1" whiteness="0" |
| | | :aspect="aspect" min-bitrate="1000" audio-quality="16KHz" device-position="back" :auto-focus="true" |
| | | :muted="true" :enable-camera="true" :enable-mic="false" :zoom="false" @statechange="statechange" |
| | | :style="{ width: cameraWidth, height: cameraHeight }"></live-pusher> |
| | | |
| | | <!--提示语--> |
| | | <cover-view class="remind"> |
| | | <text class="remind-text" style="">{{ message }}</text> |
| | | </cover-view> |
| | | |
| | | <!--辅助线--> |
| | | <cover-view class="outline-box" :style="{ width: windowWidth, height: windowHeight - 80 }"> |
| | | <cover-image class="outline-img" src="/static/live-camera/outline/portrait.png" style=""></cover-image> |
| | | </cover-view> |
| | | </view> |
| | | |
| | | <view class="menu"> |
| | | <!--底部菜单区域背景--> |
| | | <cover-image class="menu-mask" src="/static/live-camera/bar.png"></cover-image> |
| | | <button v-if="buttonShow" class="submit" style="background: #14b9c8;"; @click="again"> |
| | | <text style='color: #FFF'>重新识别</text> |
| | | </button> |
| | | <!--返回键--> |
| | | <!-- <cover-image class="menu-back" @tap="back" src="/static/live-camera/back.png"></cover-image> --> |
| | | <!--快门键--> |
| | | <!-- <cover-image class="menu-snapshot" @tap="snapshot" src="/static/live-camera/shutter.png"></cover-image> --> |
| | | <!--反转键--> |
| | | <!-- <cover-image class="menu-flip" @tap="flip" src="/static/live-camera/flip.png"></cover-image> --> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | let _this = null; |
| | | export default { |
| | | data() { |
| | | return { |
| | | dotype: 'idphoto', //操作类型 |
| | | message: '', //提示 |
| | | aspect: '2:3', //比例 |
| | | cameraWidth: '', //相机画面宽度 |
| | | cameraHeight: '', //相机画面宽度 |
| | | windowWidth: '', //屏幕可用宽度 |
| | | windowHeight: '', //屏幕可用高度 |
| | | camerastate: false, //相机准备好了 |
| | | livePusher: null, //流视频对象 |
| | | snapshotsrc: null, //快照 |
| | | //倒计时 |
| | | second: 0, |
| | | ifPhoto: false, |
| | | faceNext:false, |
| | | buttonShow:false, |
| | | dataForm:"", |
| | | }; |
| | | }, |
| | | onLoad(e) { |
| | | _this = this; |
| | | this.dataForm = JSON.parse(decodeURIComponent(e.data)); |
| | | if (e.dotype != undefined) this.dotype = e.dotype; |
| | | this.initCamera(); |
| | | setTimeout(() => { |
| | | //倒计时 |
| | | this.getCount() |
| | | }, 500); |
| | | }, |
| | | onReady() { |
| | | this.livePusher = uni.createLivePusherContext('livePusher', this); |
| | | this.startPreview(); //开启预览并设置摄像头 |
| | | this.livePusher.switchCamera(); |
| | | }, |
| | | methods: { |
| | | //初始化相机 |
| | | initCamera() { |
| | | uni.getSystemInfo({ |
| | | success: function(res) { |
| | | _this.windowWidth = res.windowWidth; |
| | | _this.windowHeight = res.windowHeight; |
| | | _this.cameraWidth = res.windowWidth; |
| | | _this.cameraHeight = res.windowWidth * 1.5; |
| | | } |
| | | }); |
| | | }, |
| | | //开始预览 |
| | | startPreview() { |
| | | this.livePusher.startPreview({ |
| | | success: a => { |
| | | console.log(a); |
| | | } |
| | | }); |
| | | }, |
| | | //停止预览 |
| | | stopPreview() { |
| | | this.livePusher.stopPreview({ |
| | | success: a => { |
| | | _this.camerastate = false; //标记相机未启动 |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //状态 |
| | | statechange(e) { |
| | | //状态改变 |
| | | // console.log('摄像头', e); |
| | | if (this.ifPhoto == true) { |
| | | //拍照 |
| | | this.snapshot(); |
| | | } |
| | | }, |
| | | |
| | | //返回 |
| | | back() { |
| | | uni.navigateBack(); |
| | | }, |
| | | |
| | | //抓拍 |
| | | snapshot() { |
| | | var that = this; |
| | | this.livePusher.snapshot({ |
| | | success(res) { |
| | | that.FaceVerification(res); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //反转 |
| | | flip() { |
| | | this.livePusher.switchCamera(); |
| | | }, |
| | | |
| | | //设置 |
| | | setImage() { |
| | | let pages = getCurrentPages(); |
| | | let prevPage = pages[pages.length - 2]; //上一个页面 |
| | | |
| | | //直接调用上一个页面的setImage()方法,把数据存到上一个页面中去 |
| | | prevPage.$vm.setImage({ |
| | | path: _this.snapshotsrc, |
| | | dotype: this.dotype |
| | | }); |
| | | } |
| | | // 倒计时 |
| | | , |
| | | getCount() { |
| | | this.second = 5 |
| | | let timer = setInterval(() => { |
| | | this.second--; |
| | | if (this.second < 1) { |
| | | clearInterval(timer); |
| | | this.second = 0 |
| | | this.ifPhoto = true |
| | | this.statechange() |
| | | } |
| | | }, 1000); |
| | | }, |
| | | again(){ |
| | | this.getCount(); |
| | | }, |
| | | //人脸验证 |
| | | FaceVerification(res){ |
| | | var that = this; |
| | | uni.showLoading({title: '人脸验证中'}); |
| | | //console.log("222222222",res.message.tempImagePath) |
| | | var url = that.$store.state.piAPI + 'blade-user/faceCompare', |
| | | // var url = 'http://192.168.0.114:82/' + 'blade-user/faceCompare', |
| | | data = { |
| | | // "name": that.dataForm.name, |
| | | // "idCardNo": that.dataForm.carId, |
| | | "name": "曾杭", |
| | | "idCardNo": "360728199712210012" |
| | | }; |
| | | uni.uploadFile({ |
| | | url: url, |
| | | filePath: res.message.tempImagePath, |
| | | name: 'file', |
| | | formData: data, |
| | | success: (data) => { |
| | | console.log("1111111111111",data) |
| | | uni.hideLoading(); |
| | | if (data.statusCode == 200) { |
| | | var data = JSON.parse(data.data); |
| | | if (data.data.result == 0) { |
| | | that.buttonShow = false; |
| | | uni.showToast({ |
| | | title: '人脸识别成功!', |
| | | icon: "none", |
| | | duration: 1000 |
| | | }); |
| | | } else { |
| | | that.buttonShow = true; |
| | | uni.showToast({ |
| | | title: data.data.errMsg == "pic not has face" ? |
| | | '未检测到人脸' : data.data.errMsg, |
| | | icon: "none", |
| | | duration: 1000 |
| | | }); |
| | | } |
| | | } else { |
| | | that.buttonShow = true; |
| | | uni.showToast({ |
| | | title: '服务器连接失败!', |
| | | icon: "none", |
| | | duration: 1000 |
| | | }); |
| | | } |
| | | // console.log(data) |
| | | } |
| | | }); |
| | | }, |
| | | //帐号注册 |
| | | insterAccounts(d){ |
| | | var url = that.$store.state.piAPI + '/zc/inster', |
| | | data = { |
| | | // deptid: , |
| | | password: d.pass, |
| | | password2: d.passTwo, |
| | | phone: d.phone, |
| | | sex: d.sex == '男' ? 1 : 2, |
| | | sname: d.name, |
| | | username: d.user, |
| | | deptid:d.objId |
| | | } |
| | | uni.request({ |
| | | url: url, |
| | | method: 'POST', |
| | | data: data, |
| | | success: (res) => { |
| | | uni.showToast({ |
| | | title: '注册成功,请等待审核', |
| | | icon:'none', |
| | | duration: 2000 |
| | | }); |
| | | setTimeout(function(){ |
| | | uni.navigateTo({ |
| | | url: '/pages/loging/loging' |
| | | }) |
| | | },2000); |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | .submit { |
| | | margin: 30rpx 50rpx 0; |
| | | border: none; |
| | | width: 572rpx; |
| | | height: 86rpx; |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | } |
| | | .live-camera { |
| | | .preview { |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .outline-box { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | bottom: 0; |
| | | z-index: 99; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .outline-img { |
| | | width: 1000rpx; |
| | | height: 1500rpx; |
| | | } |
| | | } |
| | | |
| | | .remind { |
| | | position: absolute; |
| | | top: 880rpx; |
| | | width: 750rpx; |
| | | z-index: 100; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .remind-text { |
| | | color: #dddddd; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | .title { |
| | | font-size: 35rpx; |
| | | background-color: #0BB9C8; |
| | | color: #ffffff; |
| | | line-height: 80rpx; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .menu { |
| | | position: absolute; |
| | | left: 0; |
| | | bottom: 0; |
| | | width: 750rpx; |
| | | height: 180rpx; |
| | | z-index: 98; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .menu-mask { |
| | | position: absolute; |
| | | left: 0; |
| | | bottom: 0; |
| | | width: 750rpx; |
| | | height: 180rpx; |
| | | z-index: 98; |
| | | } |
| | | |
| | | .menu-back { |
| | | position: absolute; |
| | | left: 30rpx; |
| | | bottom: 50rpx; |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | z-index: 99; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .menu-snapshot { |
| | | width: 130rpx; |
| | | height: 130rpx; |
| | | z-index: 99; |
| | | } |
| | | |
| | | .menu-flip { |
| | | position: absolute; |
| | | right: 30rpx; |
| | | bottom: 50rpx; |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | z-index: 99; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="registerUser"> |
| | | <u-form :model="form" ref="uForm"> |
| | | <u-form-item :label="item.title" :prop="item.froms" label-width="200" :left-icon="item.img" :required="item.requireds" |
| | | v-for="(item, index) in list" :key="index"> |
| | | <u-input v-model="form[item.froms]" :placeholder="item.placeholder" /> |
| | | <u-form-item :label="item.title" :prop="item.froms" label-width="200" :left-icon="item.img" |
| | | :required="item.requireds" v-for="(item, index) in list" :key="index"> |
| | | <u-input v-model="form[item.froms]" :placeholder="item.placeholder" /> |
| | | </u-form-item> |
| | | <u-form-item label="部门" left-icon="account-fill" label-width="200" :required="true"> |
| | | <u-input v-model="form.obj" type="select" placeholder="请选择部门" :border="true" @click="depl" /> |
| | | <u-select v-model="show" mode="mutil-column-auto" :list="listbm" @confirm="confirm"></u-select> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="性别" label-width="200" left-icon="man"> |
| | | <u-radio-group v-model="form.sex"> |
| | | <u-radio v-for="(item, index) in sex" :key="index" :name="item.name" :disabled="item.disabled"> |
| | |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | </u-form> |
| | | |
| | | <u-button class="submit" @click="zc"> |
| | | 注册{{faceMsg}}</u-button> |
| | | 下一步</u-button> |
| | | <!-- <u-button class="submit" @click="submit">提交</u-button> --> |
| | | </view> |
| | | </template> |
| | |
| | | title: '账号', |
| | | img: 'man-add-fill', |
| | | froms: 'user', |
| | | requireds:true, |
| | | requireds: true, |
| | | placeholder: '请输入帐号' |
| | | }, |
| | | { |
| | | title: '密码', |
| | | img: 'lock-fill', |
| | | froms: 'pass', |
| | | requireds:true, |
| | | requireds: true, |
| | | placeholder: '请输入密码' |
| | | }, |
| | | { |
| | | title: '确认密码', |
| | | img: 'lock-fill', |
| | | froms: 'passTwo', |
| | | requireds:true, |
| | | requireds: true, |
| | | placeholder: '请确认密码' |
| | | }, |
| | | { |
| | | title: '姓名', |
| | | img: 'account', |
| | | froms: 'name', |
| | | requireds:true, |
| | | requireds: true, |
| | | placeholder: '请输入姓名' |
| | | }, |
| | | // { |
| | | // title: '身份证', |
| | | // img: 'fingerprint', |
| | | // froms: 'carId', |
| | | // placeholder: '请输入身份证' |
| | | // }, |
| | | { |
| | | title: '身份证', |
| | | img: 'fingerprint', |
| | | froms: 'carId', |
| | | requireds: true, |
| | | placeholder: '请输入身份证' |
| | | }, |
| | | { |
| | | title: '手机号', |
| | | img: 'phone-fill', |
| | | froms: 'phone', |
| | | requireds:false, |
| | | requireds: false, |
| | | placeholder: '请输入手机号' |
| | | }, |
| | | // { |
| | |
| | | // froms: 'depl', |
| | | // placeholder: '请选择部门' |
| | | // }, |
| | | |
| | | |
| | | ], |
| | | sex: [{ |
| | | name: '男', |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | zc(){ |
| | | zc() { |
| | | var that = this; |
| | | if(that.form.obj == "" || that.form.obj == null){ |
| | | uni.showToast({ |
| | | title: '请选择部门', |
| | | icon:'none', |
| | | duration: 2000 |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // if (that.form.obj == "" || that.form.obj == null) { |
| | | // uni.showToast({ |
| | | // title: '请选择部门', |
| | | // icon: 'none', |
| | | // duration: 2000 |
| | | // }); |
| | | // return; |
| | | // } |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | console.log(this.form); |
| | | var d = this.form; |
| | | var url = 'http://s16s652780.51mypc.cn/api/zc/inster', |
| | | data = { |
| | | // deptid: , |
| | | password: d.pass, |
| | | password2: d.passTwo, |
| | | phone: d.phone, |
| | | sex: d.sex == '男' ? 1 : 2, |
| | | sname: d.name, |
| | | username: d.user, |
| | | deptid:d.objId |
| | | } |
| | | uni.request({ |
| | | url: url, |
| | | method: 'POST', |
| | | data: data, |
| | | success: (res) => { |
| | | uni.showToast({ |
| | | title: '注册成功,请等待审核', |
| | | icon:'none', |
| | | duration: 2000 |
| | | if (true) { |
| | | var d = this.form; |
| | | uni.navigateTo({ |
| | | url: '/pages/registerUser/idphoto?data= '+encodeURIComponent(JSON.stringify(d)) |
| | | }); |
| | | setTimeout(function(){ |
| | | uni.navigateTo({ |
| | | url: '/pages/loging/loging' |
| | | }) |
| | | },2000); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | depl(){ |
| | | depl() { |
| | | var that = this; |
| | | uni.request({ |
| | | url: "http://s16s652780.51mypc.cn/api/blade-system/dept/trees", |
| | | url: that.$store.state.piAPI + "/blade-system/dept/trees", |
| | | method: 'get', |
| | | success: (res) => { |
| | | var routerArr = res.data.data; |
| | |
| | | for (var i = 0; i < e.length; i++) { |
| | | arr += e[i].value + ","; |
| | | } |
| | | var obj = arr.substr(0,arr.length-1); |
| | | var obj = arr.substr(0, arr.length - 1); |
| | | this.form.objId = obj; |
| | | }, |
| | | formatRoutes(routerArr){ |
| | | formatRoutes(routerArr) { |
| | | var that = this; |
| | | const arr = []; |
| | | let obj = {}; |
| | | routerArr.forEach(router => { |
| | | const tmp = { ...router }; |
| | | let obj = {}; |
| | | routerArr.forEach(router => { |
| | | const tmp = { |
| | | ...router |
| | | }; |
| | | if (tmp.hasChildren == true) { |
| | | tmp.children = that.formatRoutes(tmp.children); |
| | | |
| | | const {id, title} = router; |
| | | |
| | | |
| | | const { |
| | | id, |
| | | title |
| | | } = router; |
| | | |
| | | obj = { |
| | | label: tmp.title, |
| | | value: tmp.id, |
| | | children: tmp.children |
| | | } |
| | | }else if(tmp.hasChildren == false){ |
| | | } |
| | | } else if (tmp.hasChildren == false) { |
| | | obj = { |
| | | label: tmp.title, |
| | | value: tmp.id, |
| | |
| | | let that = this; |
| | | uni.showToast({ |
| | | title: '功能研发中', |
| | | icon:'none', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | // uni.showLoading({ |
| | |
| | | // console.log('验证通过'); |
| | | console.log(this.form); |
| | | var d = this.form; |
| | | var url = 'http://s16s652780.51mypc.cn/api/zc/inster', |
| | | var url = that.$store.state.piAPI + '/zc/inster', |
| | | data = { |
| | | // deptid: , |
| | | password: d.pass, |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | .warp { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | .rect { |
| | | text-align: center; |
| | | width: 120px; |
| | | height: 120px; |
| | | } |
| | | .submit { |
| | | margin: 30rpx 50rpx 0; |
| | | border: none; |
| | |
| | | border-radius: 15rpx; |
| | | background-color: #14b9c8; |
| | | color: #ffffff; |
| | | |
| | | |
| | | &::after { |
| | | content: none; |
| | | } |
| | | |
| | | |
| | | &::before { |
| | | content: none; |
| | | } |
| | | |
| | | |
| | | &[disabled='true'] { |
| | | background: #e4e4e4; |
| | | font-size: 36rpx; |
| | |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | |
| | | .registerUser { |
| | | padding: 0 1.2rem; |
| | | } |
| | |
| | | display1:'none', |
| | | display2:'none', |
| | | display3:'none', |
| | | pathUrl:"http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | // pathUrl: "http://localhost:89", |
| | | riskClassArray:["一级","二级","三级","四级"], |
| | | riskClassArrayIndex:0, |
| | |
| | | display1:'none', |
| | | display2:'none', |
| | | display3:'none', |
| | | pathUrl:"http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | // pathUrl: "http://localhost:89", |
| | | tenantArr:[], |
| | | ynameArray:[], |
| | |
| | | }, |
| | | ], |
| | | pasw = md5(data.pass), |
| | | url = 'http://s16s652780.51mypc.cn/api/blade-auth/oauth/token?tenantId=000000&username=' + data.name + |
| | | url = this.state.piAPI + '/blade-auth/oauth/token?tenantId=000000&username=' + data.name + |
| | | ' &password=' + pasw + '&grant_type=password&scope=all&type=account'; |
| | | // url ='http://192.168.0.109:82/blade-auth/oauth/token'; |
| | | // url ='http://192.168.0.109:82/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password'; |
| | |
| | | useName: '过客 ', |
| | | }, |
| | | logPath: '', |
| | | piAPI: 'http://s16s652780.51mypc.cn/api/', |
| | | piAPI: 'http://223.82.109.183:2082/api/', |
| | | //piAPI: 'http://s16s652780.51mypc.cn/api/', |
| | | // piAPI: 'http://localhost:82/', |
| | | puserName: '', |
| | | puserID: '', |
| | |
| | | beginMap(map, data) { |
| | | var that = this, |
| | | center = [data[0].wd, data[0].jd], |
| | | url = `http://s16s652780.51mypc.cn/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | url = `http://223.82.109.183:2082/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | // url = `http://localhost:89/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | this.nowPosition = center; |
| | | axios.post(url).then((res) => { |
| | |
| | | beginMap(map, data) { |
| | | var that = this, |
| | | center = [data[0].wd, data[0].jd], |
| | | url = `http://s16s652780.51mypc.cn/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | url = `http://223.82.109.183:2082/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | // url = `http://localhost:89/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | this.nowPosition = center; |
| | | axios.post(url).then((res) => { |
| | |
| | | |
| | | //基础路径 |
| | | // pathUrl: "http://localhost:89", |
| | | pathUrl: "http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | |
| | | // move: null, //存放移动实例 |
| | | |
| | |
| | | |
| | | //基础路径 |
| | | // pathUrl: "http://localhost:89", |
| | | pathUrl: "http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | |
| | | layer: null, |
| | | |
| | |
| | | //保安信息查询 |
| | | axios({ |
| | | method: "POST", |
| | | url: `http://s16s652780.51mypc.cn/api/blade-user/details`, |
| | | url: `http://223.82.109.183:2082/api/blade-user/details`, |
| | | params: { |
| | | id: that.snumber, |
| | | }, |
| | |
| | | } |
| | | var nowstr = null; |
| | | if (type == 1) { |
| | | nowstr = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second; |
| | | nowstr = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second; |
| | | } |
| | | if (type == 2) { |
| | | nowstr = year + "年" + month + "月" + date + "日 " + hour + ":" + minute + ":" + second; |
| | | nowstr = year + "年" + month + "月" + date + "日 " + hour + ":" + minute + ":" + second; |
| | | } |
| | | return nowstr; |
| | | }, |
| | |
| | | //警情点查询 |
| | | axios({ |
| | | method: "post", |
| | | url: `http://s16s652780.51mypc.cn/api/alarm/alarm/APP-getAlarming`, |
| | | url: `http://223.82.109.183:2082/api/alarm/alarm/APP-getAlarming`, |
| | | params: { |
| | | securityId: "1370564873280430082", |
| | | }, |
| | |
| | | |
| | | //基础路径 |
| | | // pathUrl: "http://localhost:89", |
| | | pathUrl: "http://s16s652780.51mypc.cn/api", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | |
| | | layer: null, |
| | | |