~
This commit is contained in:
parent
f74ce6eb90
commit
2e34db2aec
@ -12,51 +12,38 @@
|
||||
<view class="skills">
|
||||
<view class="left">
|
||||
<image src="../../static/direction_keys.png" mode=""></image>
|
||||
<image class="left_arrow" src="../../static/left_arrow.png" mode=""></image>
|
||||
<image class="right_arrow" src="../../static/right_arrow.png" mode=""></image>
|
||||
<image class="up_arrow" src="../../static/up_arrow.png" mode=""></image>
|
||||
<image class="down_arrow" src="../../static/down_arrow.png" mode=""></image>
|
||||
<image class="left_arrow" src="../../static/left_arrow.png" mode="" @touchstart='ytControl(2)' @touchend='ytControlStop(2)' ></image>
|
||||
<image class="right_arrow" src="../../static/right_arrow.png" mode="" @touchstart='ytControl(3)' @touchend='ytControlStop(3)'></image>
|
||||
<image class="up_arrow" src="../../static/up_arrow.png" mode="" @touchstart='ytControl(0)' @touchend='ytControlStop(0)'></image>
|
||||
<image class="down_arrow" src="../../static/down_arrow.png" mode="" @touchstart='ytControl(1)' @touchend='ytControlStop(1)'></image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="right_item">
|
||||
<view :class="flag1?'add_act':'add'" @click="focus_addClick">
|
||||
<view :class="flag1?'add_act':'add'" @touchstart='ytControlFocusAdd(10)' @touchend='ytControlStopFocusAdd(10)'>
|
||||
<image src="../../static/add_act.png" mode="" v-if="flag1==true"></image>
|
||||
<image src="../../static/add.png" mode="" v-if="flag1==false"></image>
|
||||
</view>
|
||||
<view class="focus">
|
||||
焦距
|
||||
</view>
|
||||
<view :class="flag1?'subtract':'subtract_act'" @click="focus_subtractClick">
|
||||
<view :class="flag1?'subtract':'subtract_act'" @touchstart='ytControlFocusSubtract(11)' @touchend='ytControlStopFocusSubtract(11)'>
|
||||
<image src="../../static/subtract.png" mode="" v-if="flag1==true"></image>
|
||||
<image src="../../static/subtract_act.png" mode="" v-if="flag1==false"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right_item">
|
||||
<view :class="flag2?'add_act':'add'" @click="scale_addClick">
|
||||
<view :class="flag2?'add_act':'add'" @touchstart='ytControlScaleAdd(8)' @touchend='ytControlStopScaleAdd(8)'>
|
||||
<image src="../../static/add_act.png" mode="" v-if="flag2==true"></image>
|
||||
<image src="../../static/add.png" mode="" v-if="flag2==false"></image>
|
||||
</view>
|
||||
<view class="focus">
|
||||
缩放
|
||||
</view>
|
||||
<view :class="flag2?'subtract':'subtract_act'" @click="scale_subtractClick">
|
||||
<view :class="flag2?'subtract':'subtract_act'" @touchstart='ytControlScaleSubtract(9)' @touchend='ytControlStopScaleSubtract(9)'>
|
||||
<image src="../../static/subtract.png" mode="" v-if="flag2==true"></image>
|
||||
<image src="../../static/subtract_act.png" mode="" v-if="flag2==false"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right_item">
|
||||
<view :class="flag3?'add_act':'add'" @click="aperture_addClick">
|
||||
<image src="../../static/add_act.png" mode="" v-if="flag3==true"></image>
|
||||
<image src="../../static/add.png" mode="" v-if="flag3==false"></image>
|
||||
</view>
|
||||
<view class="focus">
|
||||
光圈
|
||||
</view>
|
||||
<view :class="flag3?'subtract':'subtract_act'" @click="aperture_subtractClick">
|
||||
<image src="../../static/subtract.png" mode="" v-if="flag3==true"></image>
|
||||
<image src="../../static/subtract_act.png" mode="" v-if="flag3==false"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -74,7 +61,6 @@
|
||||
|
||||
flag1:true,
|
||||
flag2:true,
|
||||
flag3:true,
|
||||
cameraSerialNumber:'',
|
||||
cameraChannelNumber:'',
|
||||
accesstoken:'',
|
||||
@ -105,28 +91,88 @@
|
||||
})
|
||||
},
|
||||
|
||||
ytControl(num){
|
||||
let that = this;
|
||||
// console.log("start");
|
||||
uni.request({
|
||||
url: 'https://open.ys7.com/api/lapp/device/ptz/start',
|
||||
method: 'POST',
|
||||
data:{
|
||||
accessToken: that.accesstoken,
|
||||
deviceSerial: that.cameraSerialNumber,
|
||||
channelNo: that.cameraChannelNumber,
|
||||
direction:num,
|
||||
speed: 1,
|
||||
},
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 焦距
|
||||
focus_addClick(){
|
||||
this.flag1 = true
|
||||
ytControlStop(num){
|
||||
let that = this;
|
||||
// console.log("stop");
|
||||
uni.request({
|
||||
url:'https://open.ys7.com/api/lapp/device/ptz/stop',
|
||||
method: 'POST',
|
||||
data:{
|
||||
accessToken: that.accesstoken,
|
||||
deviceSerial: that.cameraSerialNumber,
|
||||
channelNo: that.cameraChannelNumber,
|
||||
direction:num,
|
||||
speed: 1,
|
||||
},
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
focus_subtractClick(){
|
||||
this.flag1 = false
|
||||
|
||||
|
||||
// 焦距-放大
|
||||
ytControlFocusAdd(num){
|
||||
this.flag1 = true;
|
||||
this.ytControl(num)
|
||||
|
||||
},
|
||||
// 缩放
|
||||
scale_addClick(){
|
||||
this.flag2 = true
|
||||
ytControlStopFocusAdd(num){
|
||||
this.ytControlStop(num);
|
||||
},
|
||||
scale_subtractClick(){
|
||||
this.flag2 = false
|
||||
|
||||
// 焦距-缩小
|
||||
ytControlFocusSubtract(num){
|
||||
this.flag1 = false;
|
||||
this.ytControl(num)
|
||||
|
||||
},
|
||||
// 光圈
|
||||
aperture_addClick(){
|
||||
this.flag3 = true
|
||||
ytControlStopFocusSubtract(num){
|
||||
this.ytControlStop(num);
|
||||
},
|
||||
|
||||
// 缩放-放大
|
||||
ytControlScaleAdd(num){
|
||||
this.flag2 = true;
|
||||
this.ytControl(num)
|
||||
},
|
||||
ytControlStopScaleAdd(){
|
||||
this.ytControlStop(num);
|
||||
},
|
||||
|
||||
// 缩放-缩小
|
||||
ytControlScaleSubtract(num){
|
||||
this.flag2 = false;
|
||||
this.ytControl(num)
|
||||
},
|
||||
ytControlStopScaleSubtract(num){
|
||||
this.ytControlStop(num);
|
||||
},
|
||||
aperture_subtractClick(){
|
||||
this.flag3 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -198,7 +244,9 @@
|
||||
.right{
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.right_item{
|
||||
width: 240rpx;
|
||||
|
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
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
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
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
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
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
@ -158,7 +158,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(uni) {
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
@ -216,19 +216,6 @@ exports.default = void 0;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
var _default = {
|
||||
data: function data() {
|
||||
return {
|
||||
@ -238,7 +225,6 @@ var _default = {
|
||||
},
|
||||
flag1: true,
|
||||
flag2: true,
|
||||
flag3: true,
|
||||
cameraSerialNumber: '',
|
||||
cameraChannelNumber: '',
|
||||
accesstoken: '',
|
||||
@ -269,30 +255,84 @@ var _default = {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 焦距
|
||||
focus_addClick: function focus_addClick() {
|
||||
ytControl: function ytControl(num) {
|
||||
var that = this;
|
||||
// console.log("start");
|
||||
uni.request({
|
||||
url: 'https://open.ys7.com/api/lapp/device/ptz/start',
|
||||
method: 'POST',
|
||||
data: {
|
||||
accessToken: that.accesstoken,
|
||||
deviceSerial: that.cameraSerialNumber,
|
||||
channelNo: that.cameraChannelNumber,
|
||||
direction: num,
|
||||
speed: 1
|
||||
},
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success: function success(res) {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
ytControlStop: function ytControlStop(num) {
|
||||
var that = this;
|
||||
// console.log("stop");
|
||||
uni.request({
|
||||
url: 'https://open.ys7.com/api/lapp/device/ptz/stop',
|
||||
method: 'POST',
|
||||
data: {
|
||||
accessToken: that.accesstoken,
|
||||
deviceSerial: that.cameraSerialNumber,
|
||||
channelNo: that.cameraChannelNumber,
|
||||
direction: num,
|
||||
speed: 1
|
||||
},
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success: function success(res) {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 焦距-放大
|
||||
ytControlFocusAdd: function ytControlFocusAdd(num) {
|
||||
this.flag1 = true;
|
||||
this.ytControl(num);
|
||||
},
|
||||
focus_subtractClick: function focus_subtractClick() {
|
||||
ytControlStopFocusAdd: function ytControlStopFocusAdd(num) {
|
||||
this.ytControlStop(num);
|
||||
},
|
||||
// 焦距-缩小
|
||||
ytControlFocusSubtract: function ytControlFocusSubtract(num) {
|
||||
this.flag1 = false;
|
||||
this.ytControl(num);
|
||||
},
|
||||
// 缩放
|
||||
scale_addClick: function scale_addClick() {
|
||||
ytControlStopFocusSubtract: function ytControlStopFocusSubtract(num) {
|
||||
this.ytControlStop(num);
|
||||
},
|
||||
// 缩放-放大
|
||||
ytControlScaleAdd: function ytControlScaleAdd(num) {
|
||||
this.flag2 = true;
|
||||
this.ytControl(num);
|
||||
},
|
||||
scale_subtractClick: function scale_subtractClick() {
|
||||
ytControlStopScaleAdd: function ytControlStopScaleAdd() {
|
||||
this.ytControlStop(num);
|
||||
},
|
||||
// 缩放-缩小
|
||||
ytControlScaleSubtract: function ytControlScaleSubtract(num) {
|
||||
this.flag2 = false;
|
||||
this.ytControl(num);
|
||||
},
|
||||
// 光圈
|
||||
aperture_addClick: function aperture_addClick() {
|
||||
this.flag3 = true;
|
||||
},
|
||||
aperture_subtractClick: function aperture_subtractClick() {
|
||||
this.flag3 = false;
|
||||
ytControlStopScaleSubtract: function ytControlStopScaleSubtract(num) {
|
||||
this.ytControlStop(num);
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.default = _default;
|
||||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
@ -1 +1 @@
|
||||
<view class="videoLive data-v-0ceca996"><u-navbar vue-id="deadeba0-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="摄像机01" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-0ceca996" bind:__l="__l"></u-navbar><view class="center data-v-0ceca996"><view class="video_live data-v-0ceca996"><video style="width:100%;height:100%;" id="myVideo" src="{{src}}" controls="{{true}}" class="data-v-0ceca996"></video></view><view class="skills data-v-0ceca996"><view class="left data-v-0ceca996"><image src="../../static/direction_keys.png" mode class="data-v-0ceca996"></image><image class="left_arrow data-v-0ceca996" src="../../static/left_arrow.png" mode></image><image class="right_arrow data-v-0ceca996" src="../../static/right_arrow.png" mode></image><image class="up_arrow data-v-0ceca996" src="../../static/up_arrow.png" mode></image><image class="down_arrow data-v-0ceca996" src="../../static/down_arrow.png" mode></image></view><view class="right data-v-0ceca996"><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['focus_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag1?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag1==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">焦距</view><view data-event-opts="{{[['tap',[['focus_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag1?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag1==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['scale_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag2?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag2==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">缩放</view><view data-event-opts="{{[['tap',[['scale_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag2?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag2==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['aperture_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag3?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag3==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag3==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">光圈</view><view data-event-opts="{{[['tap',[['aperture_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag3?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag3==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag3==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view></view></view></view></view>
|
||||
<view class="videoLive data-v-0ceca996"><u-navbar vue-id="deadeba0-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="摄像机01" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-0ceca996" bind:__l="__l"></u-navbar><view class="center data-v-0ceca996"><view class="video_live data-v-0ceca996"><video style="width:100%;height:100%;" id="myVideo" src="{{src}}" controls="{{true}}" class="data-v-0ceca996"></video></view><view class="skills data-v-0ceca996"><view class="left data-v-0ceca996"><image src="../../static/direction_keys.png" mode class="data-v-0ceca996"></image><image class="left_arrow data-v-0ceca996" src="../../static/left_arrow.png" mode data-event-opts="{{[['touchstart',[['ytControl',[2]]]],['touchend',[['ytControlStop',[2]]]]]}}" bindtouchstart="__e" bindtouchend="__e"></image><image class="right_arrow data-v-0ceca996" src="../../static/right_arrow.png" mode data-event-opts="{{[['touchstart',[['ytControl',[3]]]],['touchend',[['ytControlStop',[3]]]]]}}" bindtouchstart="__e" bindtouchend="__e"></image><image class="up_arrow data-v-0ceca996" src="../../static/up_arrow.png" mode data-event-opts="{{[['touchstart',[['ytControl',[0]]]],['touchend',[['ytControlStop',[0]]]]]}}" bindtouchstart="__e" bindtouchend="__e"></image><image class="down_arrow data-v-0ceca996" src="../../static/down_arrow.png" mode data-event-opts="{{[['touchstart',[['ytControl',[1]]]],['touchend',[['ytControlStop',[1]]]]]}}" bindtouchstart="__e" bindtouchend="__e"></image></view><view class="right data-v-0ceca996"><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['touchstart',[['ytControlFocusAdd',[10]]]],['touchend',[['ytControlStopFocusAdd',[10]]]]]}}" class="{{['data-v-0ceca996',flag1?'add_act':'add']}}" bindtouchstart="__e" bindtouchend="__e"><block wx:if="{{flag1==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">焦距</view><view data-event-opts="{{[['touchstart',[['ytControlFocusSubtract',[11]]]],['touchend',[['ytControlStopFocusSubtract',[11]]]]]}}" class="{{['data-v-0ceca996',flag1?'subtract':'subtract_act']}}" bindtouchstart="__e" bindtouchend="__e"><block wx:if="{{flag1==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['touchstart',[['ytControlScaleAdd',[8]]]],['touchend',[['ytControlStopScaleAdd',[8]]]]]}}" class="{{['data-v-0ceca996',flag2?'add_act':'add']}}" bindtouchstart="__e" bindtouchend="__e"><block wx:if="{{flag2==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">缩放</view><view data-event-opts="{{[['touchstart',[['ytControlScaleSubtract',[9]]]],['touchend',[['ytControlStopScaleSubtract',[9]]]]]}}" class="{{['data-v-0ceca996',flag2?'subtract':'subtract_act']}}" bindtouchstart="__e" bindtouchend="__e"><block wx:if="{{flag2==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view></view></view></view></view>
|
@ -84,6 +84,9 @@
|
||||
.videoLive .center .skills .right.data-v-0ceca996 {
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.videoLive .center .skills .right .right_item.data-v-0ceca996 {
|
||||
width: 240rpx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user