33 lines
6.1 KiB
JavaScript
33 lines
6.1 KiB
JavaScript
|
|
"use weex:vue";
|
||
|
|
|
||
|
|
if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
|
||
|
|
Promise.prototype.finally = function(callback) {
|
||
|
|
const promise = this.constructor
|
||
|
|
return this.then(
|
||
|
|
value => promise.resolve(callback()).then(() => value),
|
||
|
|
reason => promise.resolve(callback()).then(() => {
|
||
|
|
throw reason
|
||
|
|
})
|
||
|
|
)
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
||
|
|
const global = uni.requireGlobal()
|
||
|
|
ArrayBuffer = global.ArrayBuffer
|
||
|
|
Int8Array = global.Int8Array
|
||
|
|
Uint8Array = global.Uint8Array
|
||
|
|
Uint8ClampedArray = global.Uint8ClampedArray
|
||
|
|
Int16Array = global.Int16Array
|
||
|
|
Uint16Array = global.Uint16Array
|
||
|
|
Int32Array = global.Int32Array
|
||
|
|
Uint32Array = global.Uint32Array
|
||
|
|
Float32Array = global.Float32Array
|
||
|
|
Float64Array = global.Float64Array
|
||
|
|
BigInt64Array = global.BigInt64Array
|
||
|
|
BigUint64Array = global.BigUint64Array
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
(()=>{var v=Object.create;var f=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var C=(l,t)=>()=>(t||l((t={exports:{}}).exports,t),t.exports);var w=(l,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _(t))!k.call(l,r)&&r!==i&&f(l,r,{get:()=>t[r],enumerable:!(s=y(t,r))||s.enumerable});return l};var b=(l,t,i)=>(i=l!=null?v(h(l)):{},w(t||!l||!l.__esModule?f(i,"default",{value:l,enumerable:!0}):i,l));var c=C((O,g)=>{g.exports=Vue});var e=b(c());function x(l){return weex.requireModule(l)}function u(l,t,...i){uni.__log__?uni.__log__(l,t,...i):console[l].apply(console,[...i,t])}var A={"center-column":{"":{display:"flex",flexDirection:"column",alignItems:"center"}},"button-group":{"":{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",marginTop:"20rpx"}}},I=(l,t)=>{let i=l.__vccOpts||l;for(let[s,r]of t)i[s]=r;return i},T={data(){return{phoneNumber:"1234567890",isAlarming:!1}},onLoad(){x("globalEvent").addEventListener("myEvent",t=>{u("log","at pages/ceshianzhuo.nvue:47","myEvent",t),uni.showToast({title:"myEvent: "+JSON.stringify(t),duration:2e3})})},methods:{handleTelEvent(l){u("log","at pages/ceshianzhuo.nvue:56","Tel event detail:",l.detail)},switchDisplay(l){u("log","at pages/ceshianzhuo.nvue:62","Tel event detail:",event.detail),this.$refs.monitor.switchDisplayModeFragment(l)},startAlarm(){this.isAlarming=!0,this.$refs.monitor.startOrStopManualAlarm(this.isAlarming,l=>{u("log","at pages/ceshianzhuo.nvue:70","startAlarm callback:",l)})},stopAlarm(){this.isAlarming=!1,this.$refs.monitor.startOrStopManualAlarm(this.isAlarming,l=>{u("log","at pages/ceshianzhuo.nvue:76","stopAlarm callback:",l)})},flipImage(l){this.$refs.monitor.changeImageSwitch(l,t=>{u("log","at pages/ceshianzhuo.nvue:83","flipImage callback:",t)})},resumeOrPause(){this.$refs.monitor.resumeOrPause()},changeQuality(){this.$refs.monitor.changeQuality()},test(){this.$refs.monitor.test()}}};function D(l,t,i,s,r,n){let d=(0,e.resolveComponent)("MonitorView"),a=(0,e.resolveComponent)("button");return(0,e.openBlock)(),(0,e.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,e.createElementVNode)("div",{class:"center-column"},[(0,e.createVNode)(d,{ref:"monitor",init:"5",style:{width:"300rpx",height:"200rpx","margin-top":"20rpx"},onOnTel:n.handleTelEvent},null,8,["onOnTel"]),(0,e.createElementVNode)("div",{class:"button-group"},[(0,e.createVNode)(a,{onClick:t[0]||(t[0]=o=>n.switchDisplay(0))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u539F\u56FE")]),_:1}),(0,e.createVNode)(a,{onClick:t[1]||(t[1]=o=>n.switchDisplay(1))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u56DB\u5206\u5C4F")]),_:1}),(0,e.createVNode)(a,{onClick:t[2]||(t[2]=o=>n.switchDisplay(2))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("180\xB0\u5168\u666F")]),_:1}),(0,e.createVNode)(a,{onClick:t[3]||(t[3]=o=>n.switchDisplay(3))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("360\xB0\u5168\u666F")]),_:1}),(0,e.createVNode)(a,{onClick:t[4]||(t[4]=o=>n.switchDisplay(4))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u73AF\u72B6\u5168\u666F")]),_:1}),(0,e.createVNode)(a,{onClick:n.startAlarm},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u5F00\u542F\u624B\u52A8\u62A5\u8B66")]),_:1},8,["onClick"]),(0,e.createVNode)(a,{onClick:n.stopAlarm},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u505C\u6B62\u624B\u52A8\u62A5\u8B66")]),_:1},8,["onClick"]),(0,e.createVNode)(a,{onClick:t[5]||(t[5]=o=>n.flipImage(0))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u5DE6\u53F3\u7FFB\u8F6C")]),_:1}),(0,e.createVNode)(a,{onClick:t[6]||(t[6]=o=>n.flipImage(1))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u4E0A\u4E0B\u7FFB\u8F6C")]),_:1}),(0,e.createVNode)(a,{onClick:t[7]||(t[7]=o=>n.flipImage(2))},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)("\u4E2D\u5FC3\u7FFB\u8F6C")]),_:1}),(0,e.createVNode)(a,{onClick:t[8]||(t[8]=o=>n.flipImage(3))},{def
|