This commit is contained in:
Teng 2025-09-02 16:48:59 +08:00
parent 2c518a294f
commit ede767d8ef
193 changed files with 938 additions and 761 deletions

View File

@ -1,246 +1,236 @@
<template>
<view class="move-circle" :style="{ bottom: `${movebottom}rpx`, left: `${moveleft}rpx` }" @touchend="onLongPressEnd"
@touchcancel="onLongPressEnd">
<view class="move-circle" :style="{ bottom: `${movebottom}rpx`, left: `${moveleft}rpx` }">
<!-- 返回 -->
<view :class="beblue === 5 ? 'click-box-target' : 'click-box'" @tap="onTap(5)" style="position: relative;"
@longpress="(e) => onLongPressStart(5, e)">
<image :src="`/static/index/newruler/${beblue === 5 ? 1:0}.png`" style="position: absolute;width: 100%;
height: 100%;" />
<view
:class="beblue === 5 ? 'click-box-target' : 'click-box'"
@tap="onTap(5)"
@longpress="() => onLongPressStart(5)"
@touchend="onLongPressEnd"
@touchcancel="onLongPressEnd"
style="position: relative;"
>
<image :src="`/static/index/newruler/${beblue === 5 ? 1:0}.png`" style="position: absolute;width: 100%; height: 100%;" />
<span style="z-index: 1;font-size: 30rpx;" :class="beblue === 5 ? 'grad-text' : ''">{{leftbuttonname}}</span>
</view>
<!-- -->
<view :class="beblue === 0 ? 'click-box-target' : 'click-box'" @tap="onTap(0)" style="position: relative;"
@longpress="(e) => onLongPressStart(0, e)">
<image :src="`/static/index/newruler/${beblue === 0 ? 1:0}.png`" style="position: absolute;width: 100%;
height: 100%;" />
<view
:class="beblue === 0 ? 'click-box-target' : 'click-box'"
@tap="onTap(0)"
@longpress="() => onLongPressStart(0)"
@touchend="onLongPressEnd"
@touchcancel="onLongPressEnd"
style="position: relative;"
>
<image :src="`/static/index/newruler/${beblue === 0 ? 1:0}.png`" style="position: absolute;width: 100%; height: 100%;" />
<image :src="`/static/index/newruler/fangxiang${beblue===0 ? 'target' : ''}.png`" class="image-photo" />
</view>
<!-- 确定 -->
<view :class="beblue === 4 ? 'click-box-target' : 'click-box'" @tap="onTap(4)" style="position: relative;"
@longpress="(e) => onLongPressStart(4, e)">
<image :src="`/static/index/newruler/${beblue === 4 ? 1:0}.png`" style="position: absolute;width: 100%;
height: 100%;" />
<view
:class="beblue === 4 ? 'click-box-target' : 'click-box'"
@tap="onTap(4)"
@longpress="() => onLongPressStart(4)"
@touchend="onLongPressEnd"
@touchcancel="onLongPressEnd"
style="position: relative;"
>
<image :src="`/static/index/newruler/${beblue === 4 ? 1:0}.png`" style="position: absolute;width: 100%; height: 100%;" />
<span style="z-index: 1;font-size: 30rpx;" :class="beblue === 4 ? 'grad-text' : ''">{{rightbuttonname}}</span>
</view>
<!-- -->
<view :class="beblue === 3 ? 'click-box-target' : 'click-box'" @tap="onTap(3)" style="position: relative;"
@longpress="(e) => onLongPressStart(3, e)">
<image :src="`/static/index/newruler/${beblue === 3 ? 1:0}.png`" style="position: absolute;width: 100%;
height: 100%;" />
<image style="transform: rotate(270deg);transform-origin: center;" :src="`/static/index/newruler/fangxiang${beblue===3 ? 'target' : ''}.png`"
class="image-photo" />
<view
:class="beblue === 3 ? 'click-box-target' : 'click-box'"
@tap="onTap(3)"
@longpress="() => onLongPressStart(3)"
@touchend="onLongPressEnd"
@touchcancel="onLongPressEnd"
style="position: relative;"
>
<image :src="`/static/index/newruler/${beblue === 3 ? 1:0}.png`" style="position: absolute;width: 100%; height: 100%;" />
<image style="transform: rotate(270deg);transform-origin: center;" :src="`/static/index/newruler/fangxiang${beblue===3 ? 'target' : ''}.png`" class="image-photo" />
</view>
<!-- -->
<view :class="beblue === 2 ? 'click-box-target' : 'click-box'" @tap="onTap(2)" style="position: relative;"
@longpress="(e) => onLongPressStart(2, e)">
<image :src="`/static/index/newruler/${beblue === 2 ? 1:0}.png`" style="position: absolute;width: 100%;
height: 100%;" />
<view
:class="beblue === 2 ? 'click-box-target' : 'click-box'"
@tap="onTap(2)"
@longpress="() => onLongPressStart(2)"
@touchend="onLongPressEnd"
@touchcancel="onLongPressEnd"
style="position: relative;"
>
<image :src="`/static/index/newruler/${beblue === 2 ? 1:0}.png`" style="position: absolute;width: 100%; height: 100%;" />
<image style="transform: rotate(180deg);transform-origin: center;" :src="`/static/index/newruler/fangxiang${beblue===2 ? 'target' : ''}.png`" class="image-photo" />
</view>
<!-- -->
<view :class="beblue === 1 ? 'click-box-target' : 'click-box'" @tap="onTap(1)" style="position: relative;"
@longpress="(e) => onLongPressStart(1, e)">
<image :src="`/static/index/newruler/${beblue === 1 ? 1:0}.png`" style="position: absolute;width: 100%;
height: 100%;" />
<view
:class="beblue === 1 ? 'click-box-target' : 'click-box'"
@tap="onTap(1)"
@longpress="() => onLongPressStart(1)"
@touchend="onLongPressEnd"
@touchcancel="onLongPressEnd"
style="position: relative;"
>
<image :src="`/static/index/newruler/${beblue === 1 ? 1:0}.png`" style="position: absolute;width: 100%; height: 100%;" />
<image style="transform: rotate(90deg);transform-origin: center;" :src="`/static/index/newruler/fangxiang${beblue===1 ? 'target' : ''}.png`" class="image-photo" />
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onBeforeUnmount } from 'vue'
import { ref, onBeforeUnmount } from 'vue'
const emit = defineEmits<{ (e : 'movecard', dir : number) : void }>()
const emit = defineEmits<{ (e : 'movecard', dir : number) : void }>()
let clickResetTimer : ReturnType<typeof setTimeout> | null = null
let longPressInterval : ReturnType<typeof setInterval> | null = null
let isLongPress = false
const beblue = ref<number>(-1)
let activeLongPressDir : number | null = null
let clickResetTimer : ReturnType<typeof setTimeout> | null = null
let longPressTimer : ReturnType<typeof setTimeout> | null = null
let isLongPress = false
const beblue = ref<number>(-1)
let activeLongPressDir : number | null = null
const props = defineProps({
movebottom: {
type: Number,
default: 30,
},
moveleft: {
type: Number,
default: 10,
},
leftbuttonname: {
type: String,
default: "返回"
},
rightbuttonname: {
type: String,
default: "确定"
},
})
const props = defineProps({
movebottom: { type: Number, default: 30 },
moveleft: { type: Number, default: 10 },
leftbuttonname: { type: String, default: "返回" },
rightbuttonname: { type: String, default: "确定" },
})
function clearClickResetTimer() {
if (clickResetTimer) {
clearTimeout(clickResetTimer)
clickResetTimer = null
}
function clearClickResetTimer() {
if (clickResetTimer) {
clearTimeout(clickResetTimer)
clickResetTimer = null
}
}
function clearLongPressInterval() {
if (longPressInterval) {
clearInterval(longPressInterval)
longPressInterval = null
}
isLongPress = false
activeLongPressDir = null
function clearLongPressTimer() {
if (longPressTimer) {
clearTimeout(longPressTimer)
longPressTimer = null
}
isLongPress = false
activeLongPressDir = null
}
//
function onTap(dir : number) {
//
clearLongPressInterval()
clearClickResetTimer()
//
function onTap(dir : number) {
clearLongPressTimer()
clearClickResetTimer()
beblue.value = dir
emit('movecard', dir)
beblue.value = dir
emit('movecard', dir)
// 800ms
clickResetTimer = setTimeout(() => {
beblue.value = -1
clickResetTimer = null
}, 500)
clickResetTimer = setTimeout(() => {
beblue.value = -1
clickResetTimer = null
}, 500)
}
//
function onLongPressStart(dir : number) {
clearClickResetTimer()
clearLongPressTimer()
beblue.value = dir
emit('movecard', dir)
activeLongPressDir = dir
isLongPress = true
function loop() {
if (!isLongPress || activeLongPressDir === null) return
// emit('movecard', activeLongPressDir)
longPressTimer = setTimeout(loop, 500)
}
longPressTimer = setTimeout(loop, 500)
}
// longpress
function onLongPressStart(dir : number, e ?: any) {
//
clearClickResetTimer()
clearLongPressInterval()
//
function onLongPressEnd() {
if (!isLongPress) return
clearLongPressTimer()
beblue.value = dir
emit('movecard', dir)
clearClickResetTimer()
clickResetTimer = setTimeout(() => {
beblue.value = -1
clickResetTimer = null
}, 500)
}
// 500ms
activeLongPressDir = dir
isLongPress = true
longPressInterval = setInterval(() => {
if (activeLongPressDir !== null) emit('movecard', activeLongPressDir)
}, 500)
}
// touchend / touchcancel
function onLongPressEnd() {
//
if (!isLongPress) return
// interval
clearLongPressInterval()
// 0.8s
clearClickResetTimer()
clickResetTimer = setTimeout(() => {
beblue.value = -1
clickResetTimer = null
}, 500)
}
onBeforeUnmount(() => {
clearClickResetTimer()
clearLongPressInterval()
})
onBeforeUnmount(() => {
clearClickResetTimer()
clearLongPressTimer()
})
</script>
<style lang="less" scoped>
.move-circle {
position: absolute;
bottom: 0rpx;
left: 0rpx;
width: 500rpx;
display: flex;
flex-wrap: wrap;
z-index: 99;
touch-action: none;
}
.move-circle {
position: absolute;
bottom: 0rpx;
left: 0rpx;
width: 500rpx;
display: flex;
flex-wrap: wrap;
z-index: 99;
touch-action: none;
}
.click-box,
.click-box-target {
// background-color: red;
width: 150rpx;
height: 137rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 0rpx;
// border-radius: 30rpx;
font-size: 28rpx;
transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.25s ease;
-webkit-tap-highlight-color: transparent;
margin-bottom: 10rpx;
}
.click-box,
.click-box-target {
width: 150rpx;
height: 137rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.25s ease;
-webkit-tap-highlight-color: transparent;
margin-bottom: 10rpx;
}
.click-box {
color: #888d99;
}
.click-box {
color: #888d99;
}
/* 选中态:背景径向渐变 + 中心缩放动画(从中间放大再回到原样) */
.click-box-target {
color: transparent;
/* 文字使用渐变填充 */
animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1);
transform-origin: center center;
}
.click-box-target {
color: transparent;
animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1);
transform-origin: center center;
}
@keyframes scalePulse {
0% {
transform: scale(1);
}
@keyframes scalePulse {
0% { transform: scale(1); }
25% { transform: scale(0.94); }
65% { transform: scale(1.08); }
100% { transform: scale(1); }
}
25% {
/* 先收缩一点点 */
transform: scale(0.94);
}
.grad-text {
background-image: linear-gradient(90deg, #5b8bb3, #87a1bd);
background-size: 200% 100%;
background-position: 0% 50%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
transition: background-position 0.8s linear;
}
65% {
/* 再放大到略超出的感觉 */
transform: scale(1.08);
}
.click-box-target .grad-text {
background-position: 100% 50%;
}
100% {
transform: scale(1);
}
}
.image-photo {
width: 25%;
height: 25%;
transition: transform 0.18s ease, filter 0.18s ease;
}
/* 文本渐变(用于返回/确定文字) */
.grad-text {
background-image: linear-gradient(90deg, #5b8bb3, #87a1bd);
background-size: 200% 100%;
background-position: 0% 50%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
transition: background-position 0.8s linear;
}
/* 选中时文字渐变滚动效果 */
.click-box-target .grad-text {
background-position: 100% 50%;
}
.image-photo {
width: 25%;
height: 25%;
transition: transform 0.18s ease, filter 0.18s ease;
}
/* 选中时图片略微放大 */
.click-box-target .image-photo {
/* 让图片跟随父元素缩放,不额外放大,保留平滑过渡 */
transform: none;
transition: transform 0.18s ease, filter 0.18s ease;
filter: none;
}
</style>
.click-box-target .image-photo {
transform: none;
transition: transform 0.18s ease, filter 0.18s ease;
filter: none;
}
</style>

View File

@ -74,8 +74,6 @@
// /
function openDrawer() {
isVisible.value = true
// const optionSub = uni.getSubNVueById('optionSub')
// optionSub.show('fade-in')
emit('open')
}
@ -90,8 +88,6 @@
}else{
openDrawer()
}
// isVisible.value = !isVisible.value
rotate180()
}
defineExpose({
@ -119,21 +115,9 @@
const halfPx = screenWidth.value * (props.widNumber / 100) / 2
if (currentOffset.value > halfPx) {
closeDrawer()
rotate180()
}
currentOffset.value = 0
}
//
const angle = ref(0)
const boxStyle = computed(() => ({
transform: `rotate(${angle.value}deg)`,
transition: 'transform 0.6s ease'
}))
function rotate180() {
angle.value += 180
}
</script>
<style lang="less" scoped>

View File

@ -146,6 +146,7 @@
//
if(res.data.data.update_url){
that.dshow = true;
that.update_tips = res.data.data.update_tips;
that.forceupgrade = res.data.data.forceupdate==1;
that.version_url = res.data.data.update_url;

View File

@ -2,8 +2,8 @@
"name" : "护理单元",
"appid" : "__UNI__FB2D473",
"description" : "护理单元",
"versionName" : "1.5.6",
"versionCode" : 156,
"versionName" : "1.6.0",
"versionCode" : 160,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -46,7 +46,8 @@
"<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_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
},

View File

@ -19,13 +19,13 @@
},
//
{
"path": "pages/ceshianzhuo",
"style": {
// "navigationStyle": "custom"
}
// {
// "path": "pages/ceshianzhuo",
// "style": {
// // "navigationStyle": "custom"
// }
},
// },
{
"path": "pages/index/index",
"style": {
@ -57,19 +57,19 @@
"height": "450px",
"background": "transparent"
}
},
{
"id": "optionSub",
"path": "pages/option",
"style": {
"position": "absolute",
"right": "110px",
"bottom": "0px",
"width": "170px",
"height": "170px",
"background": "transparent"
}
}
// {
// "id": "optionSub",
// "path": "pages/option",
// "style": {
// "position": "absolute",
// "right": "110px",
// "bottom": "0px",
// "width": "170px",
// "height": "170px",
// "background": "transparent"
// }
// }
]
}
}

View File

@ -53,6 +53,7 @@ export default {
uni.$on('monitor:flipImage', (payload) => this.flipImage(payload));
uni.$on('monitor:resumeOrPause', this.resumeOrPause);
uni.$on('monitor:changeQuality', this.changeQuality);
uni.$on('monitor:toggleVolume', this.toggleVolume);
uni.$on('monitor:test', this.test);
},
onUnload() {
@ -69,6 +70,7 @@ export default {
uni.$off('monitor:flipImage', (payload) => this.flipImage(payload));
uni.$off('monitor:resumeOrPause', this.resumeOrPause);
uni.$off('monitor:changeQuality', this.changeQuality);
uni.$off('monitor:toggleVolume', this.toggleVolume);
uni.$off('monitor:test', this.test);
},
methods: {
@ -109,7 +111,9 @@ export default {
changeQuality() {
this.$refs.monitor.changeQuality && this.$refs.monitor.changeQuality();
},
toggleVolume(){
this.$refs.monitor.toggleVolume && this.$refs.monitor.toggleVolume();
},
test() {
this.$refs.monitor && this.$refs.monitor.test && this.$refs.monitor.test();
},

View File

@ -122,7 +122,7 @@
</view>
<!-- 自动更新组件 -->
<zy-update ref="zyupgrade" :noticeflag="true" theme="blue" :h5preview="false" oldversion="1.0.0"
:appstoreflag="true" :autocheckupdate="true"></zy-update>
:appstoreflag="true" :autocheckupdate="true" @showupdateTips="canJump"></zy-update>
<view class="bg-mask" v-if="huakuaiOpen" @click="huakuaiOpen=false">
<huakuai @click.stop @success="huakuaisuccess" />
</view>
@ -231,7 +231,16 @@
openbottom.value = true;
}
}
const loading = ref(false)
const canJump = () => {
if (loading.value === 2) {
setTimeout(() => {
jumpTo(`/pages/watch/index`)
}, 500)
} else {
loading.value++
}
}
const loading = ref(0)
const huakuaisuccess = () => {
form.checkKey = time.value
huakuaiOpen.value = false
@ -245,14 +254,20 @@
uni.setStorageSync('token', res.result.token);
uni.setStorageSync('username', form.username);
uni.setStorageSync('realname', res.result.userInfo.realname);
if (!loading.value) {
loading.value = true
} else {
// if (!loading.value) {
// loading.value = true
// } else {
// setTimeout(() => {
// jumpTo(`/pages/watch/index`)
// }, 500)
// }
if (loading.value === 2) {
setTimeout(() => {
jumpTo(`/pages/watch/index`)
}, 500)
} else {
loading.value++
}
} else {
uni.showToast({
title: res.message,
@ -273,12 +288,12 @@
onShow(() => {
zyupgrade.value?.check_update();
if (uni.getStorageSync('token') && uni.getStorageSync('token') !== 1) {
if (!loading.value) {
loading.value = true
} else {
if (loading.value === 2) {
setTimeout(() => {
jumpTo(`/pages/watch/index`)
}, 500)
} else {
loading.value++
}
}
});
@ -297,7 +312,7 @@
port: 8888,
}
monitorModule.cloudLoginIn(loginfo, (r) => {
console.log("?????",r)
console.log("?????", r)
if (!loading.value) {
loading.value = true
} else {

19
pages/watch/api/lunpan.js Normal file
View File

@ -0,0 +1,19 @@
// 引入 request 文件
import request from '@/request/guanli.js'
// 以下 api 为博主项目示例,实际与项目相匹配
// 用你给的四个固定值
export const movedirection = (direction,startOrNot) => {
const url = `/iot/tplink/cameraInfo/motionCtrl?deviceIndex=5&direction=${direction}&startOrNot=${startOrNot}&speed=1`;
return request({ url, method: 'get' });
}
// // 移动表格
// export const addBatch = (params) => {
// return request({
// url: '/nuIpadApi/nuBizNuCustomerServer/addBatch',
// method: 'post',
// data: params,
// })
// }

View File

@ -38,12 +38,11 @@
@touchend.stop.prevent="onTouchEnd2" @touchcancel.stop.prevent="onTouchEnd2" :style="wrapperStyle2"
v-show="target !== -1">
<view v-for="(item, i) in items2" :key="i" class="compass-item" :style="itemStyle2(item.baseAngle)">
<text class="item-label-second" :class="i===target2&&opensecondmenu?`targetbutton`: ``"
:style="labelStyle2">
<text class="item-label-second" :style="labelStyle2">
<view
style="z-index: 2;display: flex;flex-direction: column;justify-content: center;align-items: center;">
<image style="width: 70rpx;height: 70rpx;margin-bottom: 0rpx;"
:src="`/static/index/watch/Wheel/${target === -1 ? 0 : target+1}${i}${i===secondMapTarget[target]?1:0}.png`" />
:class="i===target2&&opensecondmenu?`pulse`: ``" :src="`/static/index/watch/Wheel/${target === -1 ? 0 : target+1}${i}${i===secondMapTarget[target]?1:0}.png`" />
<view v-show="target!==-1" :style="i===secondMapTarget[target]?{color:'#0E86EA'}:{}">
{{ item.label }}
</view>
@ -72,7 +71,7 @@
const emit = defineEmits(["firstIndex", "secondIndex"])
/* ========== 基础数据 ========== */
const labels = ['静音', '对讲', '截屏', '录制', '方位', '清晰度', '分屏', '翻转', '告警']
const secondMapTarget = ref([1, 1, 1, 1, 1, 0, 0, 3, 1])
const secondMapTarget = ref([0, 1, 1, 1, 1, 0, 0, 3, 1])
const count = labels.length
const items = reactive(labels.map((label, idx) => ({
@ -94,14 +93,6 @@
const startchange = () => {
secondMapTarget.value[target.value] = target2.value;
// console.log("????",target.value ,target2.value)
if (target.value === 4 && target2.value === 0) {
const optionSub = uni.getSubNVueById('optionSub')
optionSub.show('fade-in')
}else if(target.value === 4 && target2.value === 1){
const optionSub = uni.getSubNVueById('optionSub')
optionSub.hide('fade-out')
}
}
@ -138,17 +129,6 @@
displayAngle.value = currentAngle.value
focusIndex(init, false)
})
//
// function chuangti() {
// const optionSub = uni.getSubNVueById('optionSub')
// if (target.value === 4) {
// //
// optionSub.show('fade-in') //
// } else {
// //
// optionSub.hide('fade-out')
// }
// }
/* ========== 显示样式依赖 displayAngle ========== */
const transitioning = ref(false)
@ -221,7 +201,7 @@
function startRestoreTimer2() {
clearTimeout(restoreTimer2)
restoreTimer2 = setTimeout(() => {
if (target2.value === -1) target2.value = saveindex2.value
if (target2.value === -1) target2.value = saveindex2.value ;emit("secondIndex", target2.value)
}, RESTORE_MS) as unknown as number
}
@ -373,7 +353,7 @@
'静音': ['开启静音', '关闭静音',], '对讲': ['开启对讲', '关闭对讲',], '截屏': ["截屏"], '录制': ['开启录制', '关闭录制',], '方位': ['开启方位', '关闭方位',],
'清晰度': ['高清', '流畅'],
'分屏': ['原图', '四分屏', '180°全景', '360°全景', '环状全景'],
'翻转': [ '左右翻转','上下翻转', '中心翻转','关闭'],
'翻转': ['左右翻转', '上下翻转', '中心翻转', '关闭'],
'告警': ['开启告警', '关闭告警',]
}
@ -416,6 +396,7 @@
currentOffset2.value = 0
step2.value = 0
target2.value = -1
emit("secondIndex", target2.value)
return
}
for (let i = 0; i < list.length; i++) {
@ -423,7 +404,7 @@
}
currentOffset2.value = 0
step2.value = 22.5
nextTick(() => { target2.value = getLeftmostIndex2() })
nextTick(() => { target2.value = getLeftmostIndex2();emit("secondIndex", target2.value) })
}
function getLeftmostIndex2() {
if (!items2.length) return -1
@ -458,6 +439,7 @@
startOffset2 = currentOffset2.value
transitioning2.value = false
target2.value = -1
emit("secondIndex", target2.value)
dragging.value = 'second'
startRestoreTimer2()
}
@ -497,14 +479,14 @@
emit("firstIndex", next)
target.value = next
}
// chuangti()
}
function moveFirstDown() {
if (dragging.value === 'first') return
const cur = getLeftmostIndex(); if (cur < 0) return
const next = (cur + 1) % items.length
focusIndex(next, true);
focusIndex(next, true);
if (target.value !== next) {
emit("firstIndex", next)
target.value = next
@ -526,7 +508,7 @@
// offset 180°
target2.value = getLeftmostIndex2()
emit("secondIndex", target2.value)
setTimeout(() => (transitioning2.value = false), 250)
}
@ -681,8 +663,8 @@
.pulse {
/* 可调参数 */
--scale: 1.8;
--dur: 0.8s;
--scale: 1.5;
--dur: 1.1s;
animation: pulse var(--dur) ease-in-out infinite;
transform-origin: center center;

View File

@ -3,7 +3,7 @@
<view class="view-left">
<view class="title-father">
<image class="title-img" src="/static/index/watch/uni.png" />
<view class="title-font" @click="ceshi">
<view class="title-font">
护理单元
</view>
</view>
@ -14,7 +14,7 @@
:class="{warning: item.warning,target: index === leftTargetIndex}" :style="[
index === menuIndex ? { backgroundColor: '#fff' } : {},
leftTargetIndex === index ? { backgroundColor: '#ddf0ff' } : {}
]" @click="menuIndex=index;leftTargetIndex =index">
]" @click="menuIndex=index;">
<view class="menu-img">
<donghua :width="`65rpx`" :height="`65rpx`" :links="item.url" :playing="menuIndex===index" />
</view>
@ -283,7 +283,7 @@
</specialDrawerVue>
<arrowkeys @movecard="movecard" :getblue="getblue" :moveleft="5" />
<!-- 自动更新组件 -->
<!-- <zy-update ref="zyupgrade" :noticeflag="true" theme="blue" :h5preview="false" oldversion="1.0.0"
<!-- <zy-update ref="zyupgrade" :noticeflag="true" theme="blue" :h5preview="false" oldversion="1.0.0"
:appstoreflag="true" :autocheckupdate="true"></zy-update> -->
</view>
@ -291,10 +291,12 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed } from 'vue';
import ZyUpdate from '@/component/zy-upgrade/zy-upgrade.vue'
// import ZyUpdate from '@/component/zy-upgrade/zy-upgrade.vue'
import { onShow, onLoad } from "@dcloudio/uni-app"
import specialDrawerVue from '../../component/public/specialDrawer.vue';
import bigroll from './drawer/index.vue';
import { movedirection } from './api/lunpan.js'
onLoad(() => {
const globalEvent = uni.requireNativePlugin("globalEvent");
@ -305,14 +307,7 @@
duration: 2000,
});
});
const optionSub = uni.getSubNVueById('optionSub')
optionSub.hide('fade-out') //
})
const ceshi = () => {
uni.navigateTo({
url: "/pages/ceshianzhuo"
})
}
const zyupgrade = ref(null);
const menuIndex = ref(-1);
const typeNow = ref(-1);
@ -333,16 +328,16 @@
const first = ref(5);
const second = ref(0);
const firstIndex = (index : number) => {
first.value = index
first.value = index;
yuntai.value = false;
}
const secondIndex = (index : number) => {
second.value = index
second.value = index;
yuntai.value = false;
}
// const change
const opendrawer = () => {
gobackdrawer.value.openDrawer();
const optionSub = uni.getSubNVueById('optionSub')
optionSub.show('fade-in')
}
function clamp(v, a, b) { return Math.max(a, Math.min(b, v)); }
@ -617,6 +612,7 @@
}
const movecard = (type : number) => {
if (leftTargetIndex.value !== -1) {
switch (type) {
case 0:
@ -625,6 +621,9 @@
typeNow.value = 0
leftTargetIndex.value = menuIndex.value
ensureVisible(menuIndex.value)
} else {
topTargetIndex.value = typeNow.value
leftTargetIndex.value = -1
}
break
@ -770,6 +769,7 @@
menuIndex.value = 0
leftTargetIndex.value = menuIndex.value
ensureVisible(menuIndex.value)
openright.value = false;
break
}
} else if (openfirstmenu.value) {
@ -799,6 +799,8 @@
openright.value = true
break
}
} else if (yuntai.value) {
handleKey(type)
} else if (opensecondmenu.value) {
switch (type) {
case 0:
@ -839,56 +841,70 @@
const clickDownsecond = useThrottle(() => doSomething(), 700)
const gaoqing = ref(0);
function doSomething(){
const yuntai = ref(false);
const savefirst = ref(-1);
function doSomething() {
wheelRef.value?.startchange()
console.log("index",first.value,second.value)
if(first.value===1){
if(second.value){
// console.log("???",first.value)
if (first.value === 0) {
if (second.value) {
uni.$emit('monitor:toggleVolume');
} else {
uni.$emit('monitor:toggleVolume');
}
}
if (first.value === 1) {
if (second.value) {
uni.$emit('monitor:stopTalk');
}else{
} else {
uni.$emit('monitor:openTalk');
}
}
if(first.value===2){
if (first.value === 2) {
uni.$emit('monitor:doSnapshot');
}
if(first.value===3){
if(second.value){
if (first.value === 3) {
if (second.value) {
uni.$emit('monitor:stopRecord');
}else{
} else {
uni.$emit('monitor:startRecord');
}
}
if(first.value===5){
if(gaoqing.value !== second.value){
if (first.value === 4) {
if (!second.value) {
savefirst.value = first.value
first.value = -1;
yuntai.value = true;
} else {
}
}
if (first.value === 5) {
if (gaoqing.value !== second.value) {
gaoqing.value = second.value
uni.$emit('monitor:changeQuality'); //
}
}
if(first.value===6){
uni.$emit('monitor:switchDisplay',second.value)
if (first.value === 6) {
uni.$emit('monitor:switchDisplay', second.value)
}
if(first.value===7){
if(second.value===3){
uni.$emit('monitor:flipImage',6)
}else{
uni.$emit('monitor:flipImage',second.value)
if (first.value === 7) {
if (second.value === 3) {
uni.$emit('monitor:flipImage', 6)
} else {
uni.$emit('monitor:flipImage', second.value)
}
// if(second.value){
// uni.$emit('monitor:stopAlarm')
// }else{
// uni.$emit('monitor:startAlarm')
// }
}
if(first.value===8){
if(second.value){
if (first.value === 8) {
if (second.value) {
uni.$emit('monitor:stopAlarm')
}else{
} else {
uni.$emit('monitor:startAlarm')
}
}
// if()
}
@ -925,6 +941,76 @@
// zyupgrade.value?.check_update();
});
// 0,1,2,3
// -1
let activeDir = -1
// mapkey =
const stopTimers : Record<number, any> = {}
//
function handleKey(type : number) {
switch (type) {
case 0: runDirection(1, 0); break //
case 1: runDirection(5, 1); break //
case 2: runDirection(7, 2); break //
case 3: runDirection(3, 3); break //
case 4: //
first.value = savefirst.value
yuntai.value = false
savefirst.value = -1
moveUpsecond()
clickDownsecond()
break
case 5: //
first.value = savefirst.value
yuntai.value = false
savefirst.value = -1
moveUpsecond()
clickDownsecond()
break
}
}
// /
function runDirection(dirCode : number, type : number) {
//
if (activeDir !== -1 && activeDir !== type) {
stopDirection(activeDir)
}
activeDir = type
//
movedirection(dirCode, 1).then((res : any) => {
console.log("start", dirCode, res)
})
// stop
if (stopTimers[type]) clearTimeout(stopTimers[type])
stopTimers[type] = setTimeout(() => {
stopDirection(type)
}, 550) // 550ms
}
//
function stopDirection(type : number) {
if (type === -1) return
let dirCode = 0
switch (type) {
case 0: dirCode = 1; break
case 1: dirCode = 5; break
case 2: dirCode = 7; break
case 3: dirCode = 3; break
}
movedirection(dirCode, 0).then((res : any) => {
// console.log("stop", dirCode, res)
})
clearTimeout(stopTimers[type])
stopTimers[type] = null
if (activeDir === type) activeDir = -1
}
</script>
<style lang="less" scoped>

92
request/guanli.js Normal file
View File

@ -0,0 +1,92 @@
// 全局请求封装
const base_url = 'https://www.focusnu.com/devopsapi'
// 请求超出时间
const timeout = 5000
// 需要修改token和根据实际修改请求头
export default (params) => {
let url = params.url;
let method = params.method || "get";
let data = params.data || {};
let header = {
'X-Access-Token': uni.getStorageSync('token') || '',
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
// 'Tenant-Id': uni.getStorageSync('tenantId') || 'xxx', // avue配置相关
...params.header
}
return new Promise((resolve, reject) => {
uni.request({
// https开头的不修改不是的话则添加base为啥呢因为有两种base啊
url: /^https?:\/\//.test(url) ? url : base_url + url,
method: method,
header: header,
data: data,
timeout,
success(response) {
const res = response
// 根据返回的状态码做出对应的操作
//获取成功
// console.log(res.statusCode);
if (res.statusCode == 200) {
resolve(res.data);
} else {
console.log("http", /^https?:\/\//.test(url) ? url : base_url + url)
console.log("res",response)
console.log("data",data)
switch (res.statusCode) {
case 401:
uni.showModal({
title: "提示",
content: "登录过期",
showCancel: false,
success() {
uni.clearStorageSync()
setTimeout(() => {
uni.navigateTo({
url: "/pages/login/login",
})
}, 1000);
},
});
break;
case 404:
uni.showToast({
title: '请求地址不存在...',
duration: 2000,
})
break;
default:
uni.showToast({
title: '请重试...',
duration: 2000,
})
break;
}
}
},
fail(err) {
console.log(err)
if (err.errMsg.indexOf('request:fail') !== -1) {
uni.showToast({
title: '网络异常',
icon: "error",
duration: 2000
})
} else {
uni.showToast({
title: '未知异常',
duration: 2000
})
}
reject(err);
},
complete() {
// 不管成功还是失败都会执行
uni.hideLoading();
uni.hideToast();
}
});
}).catch(() => {});
};

View File

@ -31,7 +31,9 @@ export default (params) => {
if (res.statusCode == 200) {
resolve(res.data);
} else {
// uni.clearStorageSync()
console.log("http", /^https?:\/\//.test(url) ? url : base_url + url)
console.log("res",response)
console.log("data",data)
switch (res.statusCode) {
case 401:
uni.showModal({

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -39,6 +39,7 @@ const _sfc_main = {
uni.$on("monitor:flipImage", (payload) => this.flipImage(payload));
uni.$on("monitor:resumeOrPause", this.resumeOrPause);
uni.$on("monitor:changeQuality", this.changeQuality);
uni.$on("monitor:toggleVolume", this.toggleVolume);
uni.$on("monitor:test", this.test);
},
onUnload() {
@ -53,32 +54,33 @@ const _sfc_main = {
uni.$off("monitor:flipImage", (payload) => this.flipImage(payload));
uni.$off("monitor:resumeOrPause", this.resumeOrPause);
uni.$off("monitor:changeQuality", this.changeQuality);
uni.$off("monitor:toggleVolume", this.toggleVolume);
uni.$off("monitor:test", this.test);
},
methods: {
/* ------------------ 原有功能 ------------------ */
handleTelEvent(event) {
formatAppLog("log", "at pages/camera.nvue:77", "Tel event detail:", event.detail);
formatAppLog("log", "at pages/camera.nvue:79", "Tel event detail:", event.detail);
},
switchDisplay(mode) {
formatAppLog("log", "at pages/camera.nvue:82", "zzzzz", mode);
formatAppLog("log", "at pages/camera.nvue:84", "zzzzz", mode);
this.$refs.monitor && this.$refs.monitor.switchDisplayModeFragment(mode);
},
startAlarm() {
this.isAlarming = true;
this.$refs.monitor.startOrStopManualAlarm(this.isAlarming, (res) => {
formatAppLog("log", "at pages/camera.nvue:89", "startAlarm callback:", res);
formatAppLog("log", "at pages/camera.nvue:91", "startAlarm callback:", res);
});
},
stopAlarm() {
this.isAlarming = false;
this.$refs.monitor.startOrStopManualAlarm(this.isAlarming, (res) => {
formatAppLog("log", "at pages/camera.nvue:95", "stopAlarm callback:", res);
formatAppLog("log", "at pages/camera.nvue:97", "stopAlarm callback:", res);
});
},
flipImage(type) {
this.$refs.monitor.changeImageSwitch(type, (res) => {
formatAppLog("log", "at pages/camera.nvue:101", "flipImage callback:", res);
formatAppLog("log", "at pages/camera.nvue:103", "flipImage callback:", res);
});
},
resumeOrPause() {
@ -87,6 +89,9 @@ const _sfc_main = {
changeQuality() {
this.$refs.monitor.changeQuality && this.$refs.monitor.changeQuality();
},
toggleVolume() {
this.$refs.monitor.toggleVolume && this.$refs.monitor.toggleVolume();
},
test() {
this.$refs.monitor && this.$refs.monitor.test && this.$refs.monitor.test();
},
@ -106,12 +111,12 @@ const _sfc_main = {
}
try {
this.$refs.monitor.snapShot((res) => {
formatAppLog("log", "at pages/camera.nvue:139", "snapShot callback:", res);
formatAppLog("log", "at pages/camera.nvue:143", "snapShot callback:", res);
this._handleSnapshotResultFromNative(res, payload.reqId);
});
uni.showToast({ title: "正在截屏...", icon: "none", duration: 800 });
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:144", "snapShot 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:148", "snapShot 调用失败", err);
uni.showToast({ title: "snapShot 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "snapShot_call_failed", detail: String(err) });
@ -130,7 +135,7 @@ const _sfc_main = {
}
try {
this.$refs.monitor.startRecord((res) => {
formatAppLog("log", "at pages/camera.nvue:164", "startRecord callback:", res);
formatAppLog("log", "at pages/camera.nvue:168", "startRecord callback:", res);
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: true, res });
}
@ -138,7 +143,7 @@ const _sfc_main = {
this.isRecording = true;
uni.showToast({ title: "录屏已开始", icon: "none" });
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:173", "startRecord 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:177", "startRecord 调用失败", err);
uni.showToast({ title: "startRecord 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "startRecord_call_failed", detail: String(err) });
@ -160,11 +165,11 @@ const _sfc_main = {
}
try {
this.$refs.monitor.stopRecord((res) => {
formatAppLog("log", "at pages/camera.nvue:199", "stopRecord callback:", res);
formatAppLog("log", "at pages/camera.nvue:203", "stopRecord callback:", res);
this._handleRecordResultFromNative(res, payload.reqId);
});
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:204", "stopRecord 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:208", "stopRecord 调用失败", err);
uni.showToast({ title: "stopRecord 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "stopRecord_call_failed", detail: String(err) });
@ -186,7 +191,7 @@ const _sfc_main = {
}
try {
this.$refs.monitor.openTalk((res) => {
formatAppLog("log", "at pages/camera.nvue:228", "openTalk callback:", res);
formatAppLog("log", "at pages/camera.nvue:232", "openTalk callback:", res);
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: true, res });
}
@ -194,7 +199,7 @@ const _sfc_main = {
this.isTalking = true;
uni.showToast({ title: "尝试建立对讲连接...", icon: "none" });
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:237", "openTalk 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:241", "openTalk 调用失败", err);
uni.showToast({ title: "openTalk 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "openTalk_call_failed", detail: String(err) });
@ -213,14 +218,14 @@ const _sfc_main = {
}
try {
this.$refs.monitor.stopTalk((res) => {
formatAppLog("log", "at pages/camera.nvue:257", "stopTalk callback:", res);
formatAppLog("log", "at pages/camera.nvue:261", "stopTalk callback:", res);
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: true, res });
}
});
this.isTalking = false;
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:264", "stopTalk 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:268", "stopTalk 调用失败", err);
uni.showToast({ title: "stopTalk 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "stopTalk_call_failed", detail: String(err) });
@ -231,19 +236,19 @@ const _sfc_main = {
// 处理来自模板 @onSnapShot 的事件event.detail
handleSnapShotEvent(event) {
const payload = event && event.detail ? event.detail : event;
formatAppLog("log", "at pages/camera.nvue:277", "onSnapShot event:", payload);
formatAppLog("log", "at pages/camera.nvue:281", "onSnapShot event:", payload);
this._handleSnapshotResultFromNative(payload);
},
// 处理来自模板 @onRecord 的事件event.detail
handleRecordEvent(event) {
const payload = event && event.detail ? event.detail : event;
formatAppLog("log", "at pages/camera.nvue:285", "onRecord event:", payload);
formatAppLog("log", "at pages/camera.nvue:289", "onRecord event:", payload);
this._handleRecordResultFromNative(payload);
},
// 处理来自模板 @onTalkStatus 的事件
handleTalkEvent(event) {
const payload = event && event.detail ? event.detail : event;
formatAppLog("log", "at pages/camera.nvue:292", "onTalkStatus event:", payload);
formatAppLog("log", "at pages/camera.nvue:296", "onTalkStatus event:", payload);
const status = payload && payload.talkStatus;
const tips = payload && payload.tips;
uni.$emit("monitor:talk:status", payload);
@ -287,7 +292,7 @@ const _sfc_main = {
let payload = res;
if (res.detail)
payload = res.detail;
formatAppLog("log", "at pages/camera.nvue:345", "snapshot payload normalized:", payload);
formatAppLog("log", "at pages/camera.nvue:349", "snapshot payload normalized:", payload);
if (reqIdFromCallback) {
uni.$emit(`monitor:response:${reqIdFromCallback}`, { ok: !!payload.snapShotResult, payload });
}
@ -307,7 +312,7 @@ const _sfc_main = {
} else {
const err = payload.snapShotErrorCode || payload.error || "unknown";
uni.showToast({ title: "截图失败: " + err, icon: "none", duration: 2e3 });
formatAppLog("warn", "at pages/camera.nvue:372", "snapshot failed reason:", err, payload);
formatAppLog("warn", "at pages/camera.nvue:376", "snapshot failed reason:", err, payload);
}
},
_handleRecordResultFromNative(res, reqIdFromCallback = null) {
@ -322,7 +327,7 @@ const _sfc_main = {
let payload = res;
if (res.detail)
payload = res.detail;
formatAppLog("log", "at pages/camera.nvue:388", "record payload normalized:", payload);
formatAppLog("log", "at pages/camera.nvue:392", "record payload normalized:", payload);
if (reqIdFromCallback) {
uni.$emit(`monitor:response:${reqIdFromCallback}`, { ok: !!(payload.recordUrl || payload.snapShotResult), payload });
}
@ -336,11 +341,11 @@ const _sfc_main = {
if (payload.recordUrl) {
uni.showToast({ title: "录屏完成", icon: "success", duration: 1400 });
this.isRecording = false;
formatAppLog("log", "at pages/camera.nvue:409", "录屏地址:", payload.recordUrl);
formatAppLog("log", "at pages/camera.nvue:413", "录屏地址:", payload.recordUrl);
} else if (payload.recordFailedReason) {
uni.showToast({ title: "录屏失败: " + payload.recordFailedReason, icon: "none", duration: 2e3 });
this.isRecording = false;
formatAppLog("warn", "at pages/camera.nvue:413", "record failed reason:", payload.recordFailedReason);
formatAppLog("warn", "at pages/camera.nvue:417", "record failed reason:", payload.recordFailedReason);
} else {
if (payload.snapShotResult === true) {
uni.showToast({ title: "录屏操作已完成(返回未知)", icon: "none" });

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,8 +7,8 @@
"id": "__UNI__FB2D473",
"name": "护理单元",
"version": {
"name": "1.5.6",
"code": 156
"name": "1.6.0",
"code": 160
},
"description": "护理单元",
"developer": {
@ -93,7 +93,8 @@
"<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_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
],
"abiFilters": [
"armeabi-v7a",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -1,3 +1,14 @@
import "vue";
function requireNativePlugin(name) {
return weex.requireModule(name);
}
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
@ -6,5 +17,7 @@ const _export_sfc = (sfc, props) => {
return target;
};
export {
_export_sfc as _
_export_sfc as _,
formatAppLog as f,
requireNativePlugin as r
};

View File

@ -1,11 +1,5 @@
Promise.resolve("./pages/ceshianzhuo.js").then((res) => {
res();
});
Promise.resolve("./pages/camera.js").then((res) => {
res();
});
Promise.resolve("./pages/option.js").then((res) => {
res();
});
Promise.resolve("./app.css.js").then(() => {
});

View File

@ -1,7 +1,22 @@
import { r as requireNativePlugin, f as formatAppLog } from "../uni-app.es.js";
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode } from "vue";
import { _ as _export_sfc } from "../_plugin-vue_export-helper.js";
function requireNativePlugin(name) {
return weex.requireModule(name);
}
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
const _style_0 = { "center-column": { "": { "width": 600, "height": 450, "borderRadius": 30, "overflow": "hidden" } } };
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main = {
data() {
return {
@ -39,6 +54,7 @@ const _sfc_main = {
uni.$on("monitor:flipImage", (payload) => this.flipImage(payload));
uni.$on("monitor:resumeOrPause", this.resumeOrPause);
uni.$on("monitor:changeQuality", this.changeQuality);
uni.$on("monitor:toggleVolume", this.toggleVolume);
uni.$on("monitor:test", this.test);
},
onUnload() {
@ -53,32 +69,33 @@ const _sfc_main = {
uni.$off("monitor:flipImage", (payload) => this.flipImage(payload));
uni.$off("monitor:resumeOrPause", this.resumeOrPause);
uni.$off("monitor:changeQuality", this.changeQuality);
uni.$off("monitor:toggleVolume", this.toggleVolume);
uni.$off("monitor:test", this.test);
},
methods: {
/* ------------------ 原有功能 ------------------ */
handleTelEvent(event) {
formatAppLog("log", "at pages/camera.nvue:77", "Tel event detail:", event.detail);
formatAppLog("log", "at pages/camera.nvue:79", "Tel event detail:", event.detail);
},
switchDisplay(mode) {
formatAppLog("log", "at pages/camera.nvue:82", "zzzzz", mode);
formatAppLog("log", "at pages/camera.nvue:84", "zzzzz", mode);
this.$refs.monitor && this.$refs.monitor.switchDisplayModeFragment(mode);
},
startAlarm() {
this.isAlarming = true;
this.$refs.monitor.startOrStopManualAlarm(this.isAlarming, (res) => {
formatAppLog("log", "at pages/camera.nvue:89", "startAlarm callback:", res);
formatAppLog("log", "at pages/camera.nvue:91", "startAlarm callback:", res);
});
},
stopAlarm() {
this.isAlarming = false;
this.$refs.monitor.startOrStopManualAlarm(this.isAlarming, (res) => {
formatAppLog("log", "at pages/camera.nvue:95", "stopAlarm callback:", res);
formatAppLog("log", "at pages/camera.nvue:97", "stopAlarm callback:", res);
});
},
flipImage(type) {
this.$refs.monitor.changeImageSwitch(type, (res) => {
formatAppLog("log", "at pages/camera.nvue:101", "flipImage callback:", res);
formatAppLog("log", "at pages/camera.nvue:103", "flipImage callback:", res);
});
},
resumeOrPause() {
@ -87,6 +104,9 @@ const _sfc_main = {
changeQuality() {
this.$refs.monitor.changeQuality && this.$refs.monitor.changeQuality();
},
toggleVolume() {
this.$refs.monitor.toggleVolume && this.$refs.monitor.toggleVolume();
},
test() {
this.$refs.monitor && this.$refs.monitor.test && this.$refs.monitor.test();
},
@ -106,12 +126,12 @@ const _sfc_main = {
}
try {
this.$refs.monitor.snapShot((res) => {
formatAppLog("log", "at pages/camera.nvue:139", "snapShot callback:", res);
formatAppLog("log", "at pages/camera.nvue:143", "snapShot callback:", res);
this._handleSnapshotResultFromNative(res, payload.reqId);
});
uni.showToast({ title: "正在截屏...", icon: "none", duration: 800 });
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:144", "snapShot 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:148", "snapShot 调用失败", err);
uni.showToast({ title: "snapShot 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "snapShot_call_failed", detail: String(err) });
@ -130,7 +150,7 @@ const _sfc_main = {
}
try {
this.$refs.monitor.startRecord((res) => {
formatAppLog("log", "at pages/camera.nvue:164", "startRecord callback:", res);
formatAppLog("log", "at pages/camera.nvue:168", "startRecord callback:", res);
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: true, res });
}
@ -138,7 +158,7 @@ const _sfc_main = {
this.isRecording = true;
uni.showToast({ title: "录屏已开始", icon: "none" });
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:173", "startRecord 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:177", "startRecord 调用失败", err);
uni.showToast({ title: "startRecord 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "startRecord_call_failed", detail: String(err) });
@ -160,11 +180,11 @@ const _sfc_main = {
}
try {
this.$refs.monitor.stopRecord((res) => {
formatAppLog("log", "at pages/camera.nvue:199", "stopRecord callback:", res);
formatAppLog("log", "at pages/camera.nvue:203", "stopRecord callback:", res);
this._handleRecordResultFromNative(res, payload.reqId);
});
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:204", "stopRecord 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:208", "stopRecord 调用失败", err);
uni.showToast({ title: "stopRecord 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "stopRecord_call_failed", detail: String(err) });
@ -186,7 +206,7 @@ const _sfc_main = {
}
try {
this.$refs.monitor.openTalk((res) => {
formatAppLog("log", "at pages/camera.nvue:228", "openTalk callback:", res);
formatAppLog("log", "at pages/camera.nvue:232", "openTalk callback:", res);
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: true, res });
}
@ -194,7 +214,7 @@ const _sfc_main = {
this.isTalking = true;
uni.showToast({ title: "尝试建立对讲连接...", icon: "none" });
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:237", "openTalk 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:241", "openTalk 调用失败", err);
uni.showToast({ title: "openTalk 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "openTalk_call_failed", detail: String(err) });
@ -213,14 +233,14 @@ const _sfc_main = {
}
try {
this.$refs.monitor.stopTalk((res) => {
formatAppLog("log", "at pages/camera.nvue:257", "stopTalk callback:", res);
formatAppLog("log", "at pages/camera.nvue:261", "stopTalk callback:", res);
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: true, res });
}
});
this.isTalking = false;
} catch (err) {
formatAppLog("error", "at pages/camera.nvue:264", "stopTalk 调用失败", err);
formatAppLog("error", "at pages/camera.nvue:268", "stopTalk 调用失败", err);
uni.showToast({ title: "stopTalk 调用失败", icon: "none" });
if (payload.reqId) {
uni.$emit(`monitor:response:${payload.reqId}`, { ok: false, error: "stopTalk_call_failed", detail: String(err) });
@ -231,19 +251,19 @@ const _sfc_main = {
// 处理来自模板 @onSnapShot 的事件event.detail
handleSnapShotEvent(event) {
const payload = event && event.detail ? event.detail : event;
formatAppLog("log", "at pages/camera.nvue:277", "onSnapShot event:", payload);
formatAppLog("log", "at pages/camera.nvue:281", "onSnapShot event:", payload);
this._handleSnapshotResultFromNative(payload);
},
// 处理来自模板 @onRecord 的事件event.detail
handleRecordEvent(event) {
const payload = event && event.detail ? event.detail : event;
formatAppLog("log", "at pages/camera.nvue:285", "onRecord event:", payload);
formatAppLog("log", "at pages/camera.nvue:289", "onRecord event:", payload);
this._handleRecordResultFromNative(payload);
},
// 处理来自模板 @onTalkStatus 的事件
handleTalkEvent(event) {
const payload = event && event.detail ? event.detail : event;
formatAppLog("log", "at pages/camera.nvue:292", "onTalkStatus event:", payload);
formatAppLog("log", "at pages/camera.nvue:296", "onTalkStatus event:", payload);
const status = payload && payload.talkStatus;
const tips = payload && payload.tips;
uni.$emit("monitor:talk:status", payload);
@ -287,7 +307,7 @@ const _sfc_main = {
let payload = res;
if (res.detail)
payload = res.detail;
formatAppLog("log", "at pages/camera.nvue:345", "snapshot payload normalized:", payload);
formatAppLog("log", "at pages/camera.nvue:349", "snapshot payload normalized:", payload);
if (reqIdFromCallback) {
uni.$emit(`monitor:response:${reqIdFromCallback}`, { ok: !!payload.snapShotResult, payload });
}
@ -307,7 +327,7 @@ const _sfc_main = {
} else {
const err = payload.snapShotErrorCode || payload.error || "unknown";
uni.showToast({ title: "截图失败: " + err, icon: "none", duration: 2e3 });
formatAppLog("warn", "at pages/camera.nvue:372", "snapshot failed reason:", err, payload);
formatAppLog("warn", "at pages/camera.nvue:376", "snapshot failed reason:", err, payload);
}
},
_handleRecordResultFromNative(res, reqIdFromCallback = null) {
@ -322,7 +342,7 @@ const _sfc_main = {
let payload = res;
if (res.detail)
payload = res.detail;
formatAppLog("log", "at pages/camera.nvue:388", "record payload normalized:", payload);
formatAppLog("log", "at pages/camera.nvue:392", "record payload normalized:", payload);
if (reqIdFromCallback) {
uni.$emit(`monitor:response:${reqIdFromCallback}`, { ok: !!(payload.recordUrl || payload.snapShotResult), payload });
}
@ -336,11 +356,11 @@ const _sfc_main = {
if (payload.recordUrl) {
uni.showToast({ title: "录屏完成", icon: "success", duration: 1400 });
this.isRecording = false;
formatAppLog("log", "at pages/camera.nvue:409", "录屏地址:", payload.recordUrl);
formatAppLog("log", "at pages/camera.nvue:413", "录屏地址:", payload.recordUrl);
} else if (payload.recordFailedReason) {
uni.showToast({ title: "录屏失败: " + payload.recordFailedReason, icon: "none", duration: 2e3 });
this.isRecording = false;
formatAppLog("warn", "at pages/camera.nvue:413", "record failed reason:", payload.recordFailedReason);
formatAppLog("warn", "at pages/camera.nvue:417", "record failed reason:", payload.recordFailedReason);
} else {
if (payload.snapShotResult === true) {
uni.showToast({ title: "录屏操作已完成(返回未知)", icon: "none" });

View File

@ -1,6 +1,5 @@
import { r as requireNativePlugin, f as formatAppLog } from "../uni-app.es.js";
import { _ as _export_sfc, r as requireNativePlugin, f as formatAppLog } from "../_plugin-vue_export-helper.js";
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, withCtx, createTextVNode } from "vue";
import { _ as _export_sfc } from "../_plugin-vue_export-helper.js";
const _style_0 = { "center-column": { "": { "display": "flex", "flexDirection": "column", "alignItems": "center" } }, "button-group": { "": { "display": "flex", "flexDirection": "row", "flexWrap": "wrap", "justifyContent": "center", "marginTop": 40, "width": 620 } }, "button": { "": { "marginTop": 6, "marginRight": 6, "marginBottom": 6, "marginLeft": 6, "paddingTop": 8, "paddingRight": 12, "paddingBottom": 8, "paddingLeft": 12, "minWidth": "120px", "height": 44, "borderRadius": 6, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#dddddd", "backgroundColor": "#ffffff" } } };
const _sfc_main = {
data() {

Some files were not shown because too many files have changed in this diff Show More