This commit is contained in:
parent
1694f91e7a
commit
20d99621fa
31
App.vue
31
App.vue
|
|
@ -4,10 +4,13 @@
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
// 生成设备唯一码
|
// 生成设备唯一码
|
||||||
// upapp()
|
|
||||||
|
|
||||||
|
uni.getPushClientId({
|
||||||
|
success: (res) => {}
|
||||||
|
})
|
||||||
let _Android =uni.getStorageSync('cid') || new Date().getTime()
|
let _Android =uni.getStorageSync('cid') || new Date().getTime()
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
|
|
||||||
// 获取设备码
|
// 获取设备码
|
||||||
function getAndroidId() {
|
function getAndroidId() {
|
||||||
plus.android.importClass("android.provider.Settings");
|
plus.android.importClass("android.provider.Settings");
|
||||||
|
|
@ -22,17 +25,39 @@
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
soket()
|
soket()
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/index"
|
url: "/pages/index",
|
||||||
|
success() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
// 检查是否要更新APP
|
||||||
|
setTimeout(()=>{
|
||||||
|
upapp()
|
||||||
|
},1000)
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/signIn"
|
url: "/pages/signIn",
|
||||||
|
success() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
// 检查是否要更新APP
|
||||||
|
setTimeout(()=>{
|
||||||
|
upapp()
|
||||||
|
},1000)
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
plus.navigator.setFullscreen(true)
|
plus.navigator.setFullscreen(true)
|
||||||
|
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@
|
||||||
"Geolocation" : {},
|
"Geolocation" : {},
|
||||||
"LivePusher" : {},
|
"LivePusher" : {},
|
||||||
"VideoPlayer" : {},
|
"VideoPlayer" : {},
|
||||||
"Camera" : {}
|
"Camera" : {},
|
||||||
|
"Push" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
|
|
@ -41,9 +42,14 @@
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAG\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.QUERY_ALL_PACKAGES\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
|
@ -70,7 +76,12 @@
|
||||||
"appkey_android" : "nWnzss8CKEBKcBLoYUdVybkrKl4o2izT"
|
"appkey_android" : "nWnzss8CKEBKcBLoYUdVybkrKl4o2izT"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"statics" : {}
|
"statics" : {},
|
||||||
|
"push" : {
|
||||||
|
"unipush" : {
|
||||||
|
"offline" : false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
"android" : {
|
"android" : {
|
||||||
|
|
@ -106,18 +117,25 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nativePlugins" : {
|
"nativePlugins" : {
|
||||||
"hk-preview" : {
|
"AS-HikVideoModule" : {
|
||||||
|
"android_appid" : "blyc.qjcs.com",
|
||||||
"__plugin_info__" : {
|
"__plugin_info__" : {
|
||||||
"name" : "海康视频实时预览插件",
|
"name" : "海康摄像头插件 - [试用版,仅用于自定义调试基座]",
|
||||||
"description" : "海康摄像头录像机直连插件,实现设备视频预览和云台控制",
|
"description" : "基于海康SDK开发,支持视频实时预览、视频抓拍、录像、摄像头旋转、缩放及回预置点等操作,支付后联系QQ提供源码,可根据需求有偿修改",
|
||||||
"platforms" : "Android",
|
"platforms" : "Android",
|
||||||
"url" : "https://ext.dcloud.net.cn/plugin?id=1981",
|
"url" : "https://ext.dcloud.net.cn/plugin?id=7190",
|
||||||
"android_package_name" : "blyc.qjcs.com",
|
"android_package_name" : "",
|
||||||
"ios_bundle_id" : "",
|
"ios_bundle_id" : "",
|
||||||
"isCloud" : true,
|
"isCloud" : true,
|
||||||
"bought" : 1,
|
"bought" : 0,
|
||||||
"pid" : "1981",
|
"pid" : "7190",
|
||||||
"parameters" : {}
|
"parameters" : {
|
||||||
|
"android_appid" : {
|
||||||
|
"des" : "参数描述",
|
||||||
|
"key" : "TM123456",
|
||||||
|
"value" : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
74
pages.json
74
pages.json
|
|
@ -7,41 +7,77 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/index",
|
"path": "pages/subNVue/camera",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/index",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"app-plus":{
|
||||||
|
"subNVues": [{
|
||||||
|
"id": "hkcamera", // 唯一标识
|
||||||
|
"path": "pages/subNVue/camera" // 页面路径
|
||||||
|
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/signIn",
|
"path": "pages/signIn",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none",
|
||||||
|
"scrollIndicator": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/upapp",
|
"path": "pages/upapp",
|
||||||
"style": {
|
"style": {
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"animationDuration": 200,
|
"animationDuration": 200,
|
||||||
"animationType": "fade-in",
|
"animationType": "fade-in",
|
||||||
"background": "transparent",
|
"background": "transparent",
|
||||||
"backgroundColorTop": "transparent",
|
"backgroundColorTop": "transparent",
|
||||||
"popGesture": "none",
|
"popGesture": "none",
|
||||||
"scrollIndicator": false,
|
"scrollIndicator": "none",
|
||||||
"titleNView": false
|
"titleNView": false,
|
||||||
},
|
"bounce": "none"
|
||||||
"disableScroll": true
|
},
|
||||||
}
|
"navigationStyle": "custom",
|
||||||
|
"background": "transparent",
|
||||||
|
"backgroundColorTop": "transparent",
|
||||||
|
"disableScroll": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "uni_modules/rt-uni-update/components/rt-uni-update/rt-uni-update",
|
||||||
|
"style": {
|
||||||
|
"app-plus": {
|
||||||
|
"animationDuration": 200,
|
||||||
|
"animationType": "fade-in",
|
||||||
|
"background": "transparent",
|
||||||
|
"backgroundColorTop": "transparent",
|
||||||
|
"popGesture": "none",
|
||||||
|
"scrollIndicator": false,
|
||||||
|
"titleNView": false
|
||||||
|
},
|
||||||
|
"disableScroll": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "区间测速",
|
"navigationBarTitleText": "区间测速",
|
||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
"pageOrientation": "portrait",
|
"pageOrientation": "portrait"
|
||||||
"backgroundColor": "#F8F8F8"
|
|
||||||
},
|
},
|
||||||
"uniIdRouter": {}
|
"uniIdRouter": {}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page" @click.stop="showsignOut=false">
|
<view class="page" @click.stop="hidesub()">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="logo" @click.stop="showsignOut=true">
|
<view class="logo" @click.stop="showsignOut=true">
|
||||||
|
|
@ -46,16 +46,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="title">设备:</view>
|
<view class="title">设备:</view>
|
||||||
<!-- <view class="item on" :class="{on1:selectindex==5}" @click="settab(5)">
|
|
||||||
<view class="l">
|
|
||||||
<image src="/static/equipmenton.png"></image>
|
|
||||||
<view class="name">设备001</view>
|
|
||||||
</view>
|
|
||||||
<view class="r"></view>
|
|
||||||
</view> -->
|
|
||||||
<view class="item" v-for="item in allDevices"
|
<view class="item" v-for="item in allDevices"
|
||||||
:class="{on1:(selectindex==5 && Devicesid==item.id),on:item.status==2}"
|
:class="{on1:(selectindex==5 && Devicesid==item.id),on:item.status==2}"
|
||||||
@click="setshowDevices(item)">
|
@click.stop="setshowDevices(item)">
|
||||||
<view class="l">
|
<view class="l">
|
||||||
<image src="/static/equipmentno.png"></image>
|
<image src="/static/equipmentno.png"></image>
|
||||||
<view class="name">设备{{item.encoding}}</view>
|
<view class="name">设备{{item.encoding}}</view>
|
||||||
|
|
@ -64,7 +57,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right" id="rightbox">
|
||||||
<view class="subpage" v-show="state[0]==1">
|
<view class="subpage" v-show="state[0]==1">
|
||||||
<warningInformation ref="refwarningInformation" />
|
<warningInformation ref="refwarningInformation" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -101,7 +94,23 @@
|
||||||
import statistics from "./pages/statistics.vue"
|
import statistics from "./pages/statistics.vue"
|
||||||
import passingTheCar from "./pages/passingTheCar.vue"
|
import passingTheCar from "./pages/passingTheCar.vue"
|
||||||
import warningInformation from "./pages/warningInformation.vue"
|
import warningInformation from "./pages/warningInformation.vue"
|
||||||
import qjcamera from "./pages/camera.vue"
|
import qjcamera from "./pages/camera.nvue"
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const subNVue = uni.getSubNVueById("hkcamera")
|
||||||
|
subNVue.hide()
|
||||||
|
nextTick(() => {
|
||||||
|
const query = uni.createSelectorQuery();
|
||||||
|
query
|
||||||
|
.select("#rightbox")
|
||||||
|
.boundingClientRect((data) => {
|
||||||
|
subNVue.setStyle({
|
||||||
|
width: data.width + 'px',
|
||||||
|
right: "0px"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.exec();
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
import {
|
import {
|
||||||
nextTick,
|
nextTick,
|
||||||
|
|
@ -140,11 +149,11 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
// 处理子页面弹窗 和详情页面打开 返回关闭详情页面不关闭应用
|
// 处理子页面弹窗 和详情页面打开 返回关闭详情页面不关闭应用
|
||||||
let _isback=false;
|
let _isback = false;
|
||||||
uni.$on('back',(e)=>{
|
uni.$on('back', (e) => {
|
||||||
_isback=e;
|
_isback = e;
|
||||||
})
|
})
|
||||||
onBackPress(()=>{
|
onBackPress(() => {
|
||||||
uni.$emit('close')
|
uni.$emit('close')
|
||||||
return _isback
|
return _isback
|
||||||
})
|
})
|
||||||
|
|
@ -157,7 +166,7 @@
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 获取设备信息
|
// 获取设备信息
|
||||||
getequipment().then(r => {
|
getequipment().then(r => {
|
||||||
allDevices.value =r.data?r.data.allDevices:[]
|
allDevices.value = r.data ? r.data.allDevices : []
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -174,19 +183,43 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hidesub() {
|
||||||
|
subNVue.hide('fade-out', 300)
|
||||||
|
showsignOut.value=false;
|
||||||
|
}
|
||||||
// 打开设备页面
|
// 打开设备页面
|
||||||
function setshowDevices(item) {
|
function setshowDevices(item) {
|
||||||
if (item.status == 2) {
|
|
||||||
Devicesid.value = item.id;
|
// subNVue.hide('fade-out', 300)
|
||||||
settab(5, {
|
// console.log(uni.getSubNVueById())
|
||||||
id: Devicesid.value
|
// // 打开 nvue 子窗体
|
||||||
})
|
|
||||||
}
|
subNVue.show('slide-in', 500, function() {
|
||||||
|
// 打开后进行一些操作...
|
||||||
|
//
|
||||||
|
});
|
||||||
|
uni.$emit("xxxxx","555555")
|
||||||
|
// 关闭 nvue 子窗体
|
||||||
|
// subNVue.hide('fade-out', 300)
|
||||||
|
// Devicesid.value = item.id;
|
||||||
|
// settab(5, {
|
||||||
|
// id: Devicesid.value
|
||||||
|
// })
|
||||||
|
// if (item.status == 2) {
|
||||||
|
// Devicesid.value = item.id;
|
||||||
|
// settab(5, {
|
||||||
|
// id: Devicesid.value
|
||||||
|
// })
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
// 查看网络状态
|
// 查看网络状态
|
||||||
uni.getNetworkType({
|
uni.getNetworkType({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log(res.networkType);
|
console.log(res.networkType);
|
||||||
|
},
|
||||||
|
fail(e) {
|
||||||
|
console.log(e, 8888);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 监听网络状态
|
// 监听网络状态
|
||||||
|
|
@ -246,6 +279,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function logOut() {
|
function logOut() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|
@ -270,6 +304,7 @@
|
||||||
left: 0px;
|
left: 0px;
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.7);
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
|
|
|
||||||
|
|
@ -1,221 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="camerapage">
|
|
||||||
<view class="title">摄像头设置</view>
|
|
||||||
<view class="box">
|
|
||||||
<video class="video" object-fit='contain' src="https://media.w3.org/2010/05/sintel/trailer.mp4"></video>
|
|
||||||
<!-- <sjy-vidbr :option="hp1option" bColor="#ffffff"></sjy-vidbr> -->
|
|
||||||
|
|
||||||
<view class="workbench">
|
|
||||||
<view class="direction">
|
|
||||||
<view class="item" v-for="(item,index) in 4" :class="{on:keyindex==index+1}"
|
|
||||||
@touchstart="press(index+1)" @touchend="release()">
|
|
||||||
<view class="icon">
|
|
||||||
<uv-icon name="arrow-up-fill" :color="keyindex==index+1?'#fff':'#4D7BFF'"
|
|
||||||
size="20rpx"></uv-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="key">
|
|
||||||
<view class="item" :class="{on:keyindex==5}" @touchstart="press(5)" @touchend="release()">
|
|
||||||
<image :src="`/static/camera/${keyindex==5?11:1}.png`"></image>
|
|
||||||
调焦 -
|
|
||||||
</view>
|
|
||||||
<view class="item" :class="{on:keyindex==6}" @touchstart="press(6)" @touchend="release()">
|
|
||||||
<image :src="`/static/camera/${keyindex==6?22:2}.png`"></image>
|
|
||||||
调焦 +
|
|
||||||
</view>
|
|
||||||
<view class="item" :class="{on:keyindex==7}" @touchstart="press(7)" @touchend="release()">
|
|
||||||
<image :src="`/static/camera/${keyindex==7?33:3}.png`"></image>
|
|
||||||
聚焦 -
|
|
||||||
</view>
|
|
||||||
<view class="item" :class="{on:keyindex==8}" @touchstart="press(8)" @touchend="release()">
|
|
||||||
<image :src="`/static/camera/${keyindex==8?44:4}.png`"></image>
|
|
||||||
聚焦 +
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
ref
|
|
||||||
} from 'vue'
|
|
||||||
|
|
||||||
const keyindex = ref("")
|
|
||||||
const hp1option = ref({
|
|
||||||
width: 426 * 1.5,
|
|
||||||
height: 240 * 1.5,
|
|
||||||
})
|
|
||||||
|
|
||||||
function load() {
|
|
||||||
console.log('预警信息load')
|
|
||||||
}
|
|
||||||
|
|
||||||
function hide() {
|
|
||||||
console.log('预警信息hide')
|
|
||||||
}
|
|
||||||
|
|
||||||
function show() {
|
|
||||||
console.log('预警信息show')
|
|
||||||
}
|
|
||||||
|
|
||||||
function press(index) {
|
|
||||||
keyindex.value = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
function release() {
|
|
||||||
keyindex.value = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
load,
|
|
||||||
hide,
|
|
||||||
show
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.camerapage {
|
|
||||||
padding: 15rpx;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-align: center;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 11rpx;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.workbench {
|
|
||||||
padding: 15rpx 30rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
|
|
||||||
.key {
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
gap: 20rpx 15rpx;
|
|
||||||
width: 265rpx;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
|
|
||||||
|
|
||||||
background: linear-gradient(180deg, #F4F4F4 0%, #E3E7EE 78%, #DCE0EA 100%);
|
|
||||||
box-shadow: 0rpx 0rpx 2rpx 0rpx rgba(0, 0, 0, 0.21), inset 0rpx 1rpx 1rpx 0rpx #FFFFFF;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 125rpx;
|
|
||||||
padding: 10rpx 15rpx;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 100rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 11rpx;
|
|
||||||
color: #223457;
|
|
||||||
|
|
||||||
&.on {
|
|
||||||
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
|
|
||||||
box-shadow: inset 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.33);
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 16rpx;
|
|
||||||
height: 16rpx;
|
|
||||||
margin-right: 15rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.direction {
|
|
||||||
width: 130rpx;
|
|
||||||
height: 130rpx;
|
|
||||||
|
|
||||||
|
|
||||||
background: linear-gradient(180deg, #F4F4F4 0%, #E3E7EE 78%, #DCE0EA 100%);
|
|
||||||
border: 1rpx solid #d2d2d2;
|
|
||||||
border-radius: 139rpx;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
transform: rotate(45deg);
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
width: 54rpx;
|
|
||||||
height: 54rpx;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
border-radius: 54rpx;
|
|
||||||
z-index: 2;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: 0rpx 0rpx 2rpx 0rpx rgba(0, 0, 0, 0.21), inset 0rpx 1rpx 15rpx 0rpx rgba(0, 0, 0, 0.21);
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
width: 50%;
|
|
||||||
height: 50%;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
transform-origin: 100% 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&.on {
|
|
||||||
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
|
|
||||||
box-shadow: inset 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.33);
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
// margin-left: 10rpx;
|
|
||||||
// margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-of-type(2) {
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-of-type(3) {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-of-type(4) {
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
margin-top: 15rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
._video_r1 {}
|
|
||||||
|
|
||||||
|
|
||||||
.video {
|
|
||||||
width: 100%;
|
|
||||||
height: 240rpx;
|
|
||||||
border-radius: 8rpx 8rpx 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
<view class="tbody">
|
<view class="tbody">
|
||||||
<view class="ul">
|
<view class="ul">
|
||||||
<view class="title">暂扣时间</view>
|
<view class="title">暂扣时间</view>
|
||||||
<view class="txt">{{info.detainTime?.detainTime || '/'}}</view>
|
<view class="txt">{{info.detainInfo?.detainTime || '/'}}</view>
|
||||||
<view class="title">放行时间</view>
|
<view class="title">放行时间</view>
|
||||||
<view class="txt">{{info.releaseInfo?.releaseTime || '/'}}</view>
|
<view class="txt">{{info.releaseInfo?.releaseTime || '/'}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,9 @@
|
||||||
onSearchComplete: (results) => {
|
onSearchComplete: (results) => {
|
||||||
let _Distance = 0; //单位KM
|
let _Distance = 0; //单位KM
|
||||||
let _Polylines = [];
|
let _Polylines = [];
|
||||||
|
if(!results._plans){
|
||||||
|
return
|
||||||
|
}
|
||||||
results._plans.map(r => {
|
results._plans.map(r => {
|
||||||
_Distance += r._distance;
|
_Distance += r._distance;
|
||||||
r._routes.map(res => {
|
r._routes.map(res => {
|
||||||
|
|
@ -384,9 +387,15 @@
|
||||||
},
|
},
|
||||||
setpoint(e) {
|
setpoint(e) {
|
||||||
|
|
||||||
|
|
||||||
|
// 删除所有覆盖物
|
||||||
|
_map.clearOverlays()
|
||||||
|
|
||||||
|
// 设置坐标信息
|
||||||
this.marker1.point = e.data.point1.point;
|
this.marker1.point = e.data.point1.point;
|
||||||
this.marker2.point = e.data.point2.point;
|
this.marker2.point = e.data.point2.point;
|
||||||
|
|
||||||
|
|
||||||
// 绘制坐标
|
// 绘制坐标
|
||||||
function createDOM() {
|
function createDOM() {
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,10 @@
|
||||||
},
|
},
|
||||||
updata(r) {
|
updata(r) {
|
||||||
|
|
||||||
if (window.echarts) {
|
if (window.echarts && r.overspeedStatistics) {
|
||||||
let allnum=r.overspeedStatistics.overspeed50Plus+r.overspeedStatistics.overspeed20To50+r.overspeedStatistics.overspeed10To20+r.overspeedStatistics.overspeedUnder10
|
let allnum=r.overspeedStatistics.overspeedOver50+r.overspeedStatistics.overspeed20To50+r.overspeedStatistics.overspeed10To20+r.overspeedStatistics.overspeedUnder10
|
||||||
myChart = echarts.init(document.getElementById("echart"))
|
myChart = echarts.init(document.getElementById("echart"))
|
||||||
myChart.setOption({
|
myChart.setOption({
|
||||||
|
|
||||||
grid: {
|
grid: {
|
||||||
top: 20,
|
top: 20,
|
||||||
right: 0,
|
right: 0,
|
||||||
|
|
@ -84,9 +83,11 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
|
axisLabel: { interval: 0 }
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
interval: 0,
|
||||||
data: ["超速50%以上", "超速20%-50%", "超速10%-20%", "超速10%以下"]
|
data: ["超速50%以上", "超速20%-50%", "超速10%-20%", "超速10%以下"]
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
|
|
@ -96,16 +97,16 @@
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'right',
|
position: 'right',
|
||||||
width:100,
|
interval: 0,
|
||||||
formatter:function(a){
|
formatter:function(a){
|
||||||
return Number(a.value/allnum*100).toFixed(2)+'%';
|
return Number(a.value/allnum*100 || 0).toFixed(2)+'%';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emphasis:{
|
emphasis:{
|
||||||
disabled:true
|
disabled:true
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
r.overspeedStatistics.overspeed50Plus,
|
r.overspeedStatistics.overspeedOver50,
|
||||||
r.overspeedStatistics.overspeed20To50,
|
r.overspeedStatistics.overspeed20To50,
|
||||||
r.overspeedStatistics.overspeed10To20,
|
r.overspeedStatistics.overspeed10To20,
|
||||||
r.overspeedStatistics.overspeedUnder10,
|
r.overspeedStatistics.overspeedUnder10,
|
||||||
|
|
@ -126,7 +127,7 @@
|
||||||
disabled:true
|
disabled:true
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
r.overspeedStatistics.overspeed50Plus,
|
r.overspeedStatistics.overspeedOver50,
|
||||||
r.overspeedStatistics.overspeed20To50,
|
r.overspeedStatistics.overspeed20To50,
|
||||||
r.overspeedStatistics.overspeed10To20,
|
r.overspeedStatistics.overspeed10To20,
|
||||||
r.overspeedStatistics.overspeedUnder10,
|
r.overspeedStatistics.overspeedUnder10,
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view :scroll-y="true" class="scroll-view">
|
<scroll-view :scroll-y="true" class="scroll-view">
|
||||||
<view v-for="item in info.data" class="item" @click.stop="listwithhold(item.encoding,status==2?1:2)">
|
<view v-for="(item,index) in info.data" :class="{hide:itemanimation && index==0}" class="item"
|
||||||
|
@click.stop="listwithhold(item.encoding,gettype(status))">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="t">
|
<view class="t">
|
||||||
<image v-if="status==2" src="/static/err.png"></image>
|
<image v-if="status==2" src="/static/err.png"></image>
|
||||||
|
|
@ -67,7 +68,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="tbody">
|
<view class="tbody">
|
||||||
<view>{{item.restDuration}}</view>
|
<view>{{item.restDuration}}</view>
|
||||||
<view>{{item.overspeedRatio}}</view>
|
<view>{{item.restDurationEndtime}}</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -76,21 +77,21 @@
|
||||||
<view>平均车速</view>
|
<view>平均车速</view>
|
||||||
<view>超速比例</view>
|
<view>超速比例</view>
|
||||||
<view>休息时长</view>
|
<view>休息时长</view>
|
||||||
<view>放行时间</view>
|
<view style="flex: 1.5;">放行时间</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tbody">
|
<view class="tbody">
|
||||||
<view>{{item.averageSpeed}}</view>
|
<view>{{item.averageSpeed}}</view>
|
||||||
<view>{{item.overspeedRatio}}</view>
|
<view>{{item.overspeedRatio}}</view>
|
||||||
<view>{{item.restDuration}}</view>
|
<view>{{item.restDuration}}</view>
|
||||||
<view>{{item.restDuration}}</view>
|
<view style="flex: 1.5;">{{item.releaseTime}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right red" v-if="status==2" @click.stop="withhold(item.encoding,1)">暂扣</view>
|
<view class="right red" v-if="status==2" @click.stop="withhold(item.encoding,1)">暂扣</view>
|
||||||
<view class="right green" v-if="status==3" @click.stop="withhold(item.encoding,2)">放行</view>
|
<view class="right green" v-if="status==3" @click.stop="withhold(item.encoding,2)">放行</view>
|
||||||
</view>
|
</view>
|
||||||
<nynull v-if="!info.data?.length"></nynull>
|
<nynull v-if="!info.data?.length"></nynull>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<pageanimation v-model="showdetails" @close="refdetails.hide()" >
|
<pageanimation v-model="showdetails" @close="refdetails.hide()">
|
||||||
<pagedetails ref="refdetails" @opneinfo='opneshowdetails' @refresh="getinfo" />
|
<pagedetails ref="refdetails" @opneinfo='opneshowdetails' @refresh="getinfo" />
|
||||||
</pageanimation>
|
</pageanimation>
|
||||||
|
|
||||||
|
|
@ -105,50 +106,117 @@
|
||||||
} from "/appapi/index.js"
|
} from "/appapi/index.js"
|
||||||
import pagedetails from "./details.vue";
|
import pagedetails from "./details.vue";
|
||||||
const refdetails = ref()
|
const refdetails = ref()
|
||||||
const showdetails=ref(false)
|
const showdetails = ref(false)
|
||||||
const status =ref(2)
|
const status = ref(2)
|
||||||
const pageSize=ref(999)
|
|
||||||
const info=ref({
|
// 分页相关
|
||||||
data:[]
|
const pageSize = ref(50);
|
||||||
|
const pageNum = ref(1);
|
||||||
|
const hasNextPage = ref(true)
|
||||||
|
|
||||||
|
|
||||||
|
const info = ref({
|
||||||
|
data: []
|
||||||
});
|
});
|
||||||
const keyword=ref("")
|
const keyword = ref("")
|
||||||
|
|
||||||
function load() {
|
function load() {
|
||||||
console.log('预警信息load')
|
console.log('预警信息load')
|
||||||
}
|
}
|
||||||
function opneshowdetails(){
|
|
||||||
showdetails.value=true;
|
function opneshowdetails() {
|
||||||
|
showdetails.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
console.log('预警信息hide')
|
console.log('预警信息hide')
|
||||||
showdetails.value=false;
|
showdetails.value = false;
|
||||||
refdetails.value.hide()
|
refdetails.value.hide()
|
||||||
}
|
}
|
||||||
function getinfo(){
|
|
||||||
info.value.data=[];
|
function getinfo() {
|
||||||
getwarningList({status:status.value,keyword:keyword.value,pageSize:pageSize.value}).then(r=>{
|
info.value.data = [];
|
||||||
info.value=r.data;
|
pageNum.value = 1;
|
||||||
})
|
hasNextPage.value = true;
|
||||||
|
getlist()
|
||||||
}
|
}
|
||||||
function setstatus(type){
|
|
||||||
status.value=type;
|
function gettype(t) {
|
||||||
|
if (t == 2) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
if (t == 3) {
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
function getlist() {
|
||||||
|
if (hasNextPage.value) {
|
||||||
|
getwarningList({
|
||||||
|
status: status.value,
|
||||||
|
keyword: keyword.value,
|
||||||
|
pageSize: pageSize.value,
|
||||||
|
pageNum: pageNum.value
|
||||||
|
}).then(r => {
|
||||||
|
r.data.data = r.data.data.map(res => {
|
||||||
|
res["hide"] = 2;
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
info.value = {
|
||||||
|
...r.data,
|
||||||
|
data: info.value.data.concat(r.data.data)
|
||||||
|
};
|
||||||
|
console.log(info.value)
|
||||||
|
hasNextPage.value = r.data.hasPreviousPage;
|
||||||
|
pageNum.value = pageNum.value + 1;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setstatus(type) {
|
||||||
|
status.value = type;
|
||||||
getinfo()
|
getinfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
getinfo()
|
getinfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击暂扣
|
const itemanimation=ref(false)
|
||||||
|
// 监听推送数据
|
||||||
|
uni.onSkt("SPEEDNEWDATA", (res) => {
|
||||||
|
// 预警列表接收推送数据
|
||||||
|
if (status.value == 2) {
|
||||||
|
itemanimation.value=true;
|
||||||
|
info.value.data = [...res, ...info.value.data]
|
||||||
|
setTimeout(()=>{
|
||||||
|
itemanimation.value=false;
|
||||||
|
},50)
|
||||||
|
// #ifdef APP
|
||||||
|
res.map(r=>{
|
||||||
|
uni.createPushMessage({
|
||||||
|
title: "超速预警",
|
||||||
|
content: `${r.vehicleNumber}超速${r.overspeedRatio}`
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 打开详情页面
|
// 打开详情页面
|
||||||
function listwithhold(id,type){
|
function listwithhold(id, type) {
|
||||||
showdetails.value=true;
|
showdetails.value = true;
|
||||||
refdetails.value.show(id,type)
|
refdetails.value.show(id, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
function withhold(id,type){
|
function withhold(id, type) {
|
||||||
// 打开详情弹窗
|
// 打开详情弹窗
|
||||||
refdetails.value.opneshowupimg(id,type)
|
refdetails.value.opneshowupimg(id, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|
@ -174,6 +242,26 @@
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 10rpx 15rpx;
|
padding: 10rpx 15rpx;
|
||||||
|
position: relative;
|
||||||
|
left: 0%;
|
||||||
|
transition:0.5s;
|
||||||
|
height: 75rpx;
|
||||||
|
opacity: 1;
|
||||||
|
&.hide{
|
||||||
|
left: 100%;
|
||||||
|
height: 0rpx;
|
||||||
|
transition:0s;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
&.show{
|
||||||
|
|
||||||
|
left: 0%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
left: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
.t {
|
.t {
|
||||||
|
|
@ -249,16 +337,18 @@
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.center2{
|
|
||||||
|
&.center2 {
|
||||||
.thead {
|
.thead {
|
||||||
view{
|
view {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.center3{
|
|
||||||
|
&.center3 {
|
||||||
.thead {
|
.thead {
|
||||||
view{
|
view {
|
||||||
width: 110rpx;
|
width: 110rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -273,15 +363,18 @@
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 5rpx 0;
|
padding: 5rpx 0;
|
||||||
&.green{
|
|
||||||
|
&.green {
|
||||||
border: 1rpx solid #4D7BFF;
|
border: 1rpx solid #4D7BFF;
|
||||||
color: #4D7BFF;
|
color: #4D7BFF;
|
||||||
}
|
}
|
||||||
&.red{
|
|
||||||
|
&.red {
|
||||||
border: 1rpx solid #D10B0B;
|
border: 1rpx solid #D10B0B;
|
||||||
color: #D10B0B;
|
color: #D10B0B;
|
||||||
}
|
}
|
||||||
&.grey{
|
|
||||||
|
&.grey {
|
||||||
border: 1rpx solid #666666;
|
border: 1rpx solid #666666;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
<view class="from">
|
<view class="from">
|
||||||
<view class="input" :class="{on:isname}">
|
<view class="input" :class="{on:isname}">
|
||||||
<image src="/static/signIn/2.png"></image>
|
<image src="/static/signIn/2.png"></image>
|
||||||
<input cursor-spacing='15' v-model="name" @focus="isname=true" @blur="isname=false" placeholder="请填写账号" />
|
<input cursor-spacing='15' v-model="name" @focus="isname=true" @blur="isname=false"
|
||||||
|
placeholder="请填写账号" />
|
||||||
</view>
|
</view>
|
||||||
<view class="input" :class="{on:ispassword}">
|
<view class="input" :class="{on:ispassword}">
|
||||||
<image src="/static/signIn/1.png"></image>
|
<image src="/static/signIn/1.png"></image>
|
||||||
|
|
@ -19,8 +20,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="checkbox" @click.stop="memory=!memory">
|
<view class="checkbox" @click.stop="memory=!memory">
|
||||||
<checkbox @click.stop="memory=!memory" activeBackgroundColor='#4D7BFF' :checked="memory" color="#ffffff"
|
<checkbox @click.stop="memory=!memory" activeBackgroundColor='#4D7BFF' :checked="memory"
|
||||||
style="transform:scale(0.7)" />
|
color="#ffffff" style="transform:scale(0.7)" />
|
||||||
记住密码
|
记住密码
|
||||||
</view>
|
</view>
|
||||||
<view class="submit" @click="submit">登录</view>
|
<view class="submit" @click="submit">登录</view>
|
||||||
|
|
@ -28,64 +29,94 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
applogin
|
applogin
|
||||||
} from "/appapi/index.js"
|
} from "/appapi/index.js"
|
||||||
import soket from "/utils/soket.js"
|
import soket from "/utils/soket.js"
|
||||||
import {onShow} from "@dcloudio/uni-app"
|
|
||||||
import {
|
import {
|
||||||
|
onShow
|
||||||
|
} from "@dcloudio/uni-app"
|
||||||
|
// var hikVideoModule = uni.requireNativePlugin("AS-HikVideoModule");
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const isname = ref(false);
|
const isname = ref(false);
|
||||||
const ispassword = ref(false);
|
const ispassword = ref(false);
|
||||||
const showpassword = ref(false)
|
const showpassword = ref(false)
|
||||||
const name = ref(uni.getStorageSync('name'));
|
const name = ref(uni.getStorageSync('name'));
|
||||||
const password = ref(uni.getStorageSync('password'))
|
const password = ref(uni.getStorageSync('password'))
|
||||||
const memory=ref(true)
|
const memory = ref(true)
|
||||||
onShow(()=>{
|
|
||||||
|
|
||||||
|
function opne() {
|
||||||
|
hikVideoModule.playVideo({
|
||||||
|
'Id': '1',
|
||||||
|
'CamIp': "192.168.1.65",
|
||||||
|
'CamPort': "8000",
|
||||||
|
'CamUser': "admin",
|
||||||
|
'CamPassword': "renyizhi001",
|
||||||
|
'CamFactory': "HAIKANG",
|
||||||
|
'Name': "1#站视频"
|
||||||
|
},
|
||||||
|
(ret) => {
|
||||||
|
modal.toast({
|
||||||
|
message: ret,
|
||||||
|
duration: 1.5
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
// 登录页面 关闭Socket
|
// 登录页面 关闭Socket
|
||||||
uni.closeSocket()
|
uni.closeSocket()
|
||||||
})
|
})
|
||||||
function submit(){
|
|
||||||
if(!name.value){
|
function submit() {
|
||||||
|
if (!name.value) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:"请填写账号",
|
title: "请填写账号",
|
||||||
icon:"none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!password.value){
|
if (!password.value) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:"请填写密码",
|
title: "请填写密码",
|
||||||
icon:"none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
applogin({
|
applogin({
|
||||||
username:name.value,
|
username: name.value,
|
||||||
password:password.value,
|
password: password.value,
|
||||||
deviceType:" android"
|
deviceType: " android"
|
||||||
}).then(r=>{
|
}).then(r => {
|
||||||
// 创建soket连接
|
// 创建soket连接
|
||||||
uni.setStorageSync('USERID',r.data.user.userId)
|
uni.setStorageSync('USERID', r.data.user.userId)
|
||||||
soket()
|
soket()
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:"/pages/index"
|
url: "/pages/index"
|
||||||
})
|
})
|
||||||
if(memory.value){
|
if (memory.value) {
|
||||||
uni.setStorageSync('name',name.value);
|
uni.setStorageSync('name', name.value);
|
||||||
uni.setStorageSync('password',password.value);
|
uni.setStorageSync('password', password.value);
|
||||||
}else{
|
} else {
|
||||||
uni.removeStorageSync('name')
|
uni.removeStorageSync('name')
|
||||||
uni.removeStorageSync('password')
|
uni.removeStorageSync('password')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function ccc(e){
|
|
||||||
|
function ccc(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -99,6 +130,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0rpx 118rpx 0 32rpx;
|
padding: 0rpx 118rpx 0 32rpx;
|
||||||
background: #f1f5fd;
|
background: #f1f5fd;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 410rpx;
|
width: 410rpx;
|
||||||
height: 310rpx;
|
height: 310rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue