1 line
3.8 KiB
JavaScript
1 line
3.8 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-machine-openDoorByQrCode"],{"6f62":function(t,e,n){"use strict";n.r(e);var o=n("a6fc"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},a6fc:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("c90e"),i=(n("1803"),n("1c9a")),a=n("f731"),u={data:function(){return{communityName:"",communityId:"",memberId:"",qrCode:""}},onLoad:function(t){this.vc.onLoad(t),this.loadOwnerMachines()},methods:{loadOwnerMachines:function(){var t=this,e={communityId:(0,i.getCommunityId)(),page:1,row:300};(0,o.listOwnerMachines)(e).then((function(e){t._generatorQrCode(e)}))},_generatorQrCode:function(t){var e=this;null==t||t.length<1?wx.showToast({title:"当前没有权限开门",icon:"none",duration:2e3}):(0,o.getQrCode)({communityId:(0,i.getCommunityId)(),userRole:"owner",machineCode:t[0].machineCode}).then((function(t){var n=t.data;0==n.code?(e.qrCode=n.data,new a("openDoorQrcode",{text:e.qrCode?e.qrCode:"当前没有绑定门禁设备,暂时无法使用",width:250,height:250,colorDark:"#333333",colorLight:"#FFFFFF",correctLevel:a.CorrectLevel.L})):wx.showToast({title:n.msg,icon:"none",duration:2e3})}),(function(t){wx.hideLoading(),wx.showToast({title:t,icon:"none",duration:2e3})}))},_closeModal:function(){uni.navigateBack({delta:1})}}};e.default=u},b64b:function(t,e,n){"use strict";n.r(e);var o=n("fd19"),i=n("6f62");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);var u=n("828b"),r=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,"433f452b",null,!1,o["a"],void 0);e["default"]=r.exports},c90e:function(t,e,n){"use strict";n("6a54");var o=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.applyApplicationKey=function(t){return new Promise((function(t,e){(0,i.request)({url:a.default.applyApplicationKey,method:"POST",data:_objData,success:function(n){200!=n.statusCode?e(n):t(n)},fail:function(t){e(t)}})}))},e.getOwnerAcVideoUrl=function(t){return new Promise((function(e,n){(0,i.request)({url:a.default.queryOwnerAcVideoUrl,method:"GET",data:t,success:function(t){var o=t.data;0!=o.code?n(o.msg):e(o)},fail:function(t){n(t)}})}))},e.getQrCode=function(t){return new Promise((function(e,n){(0,i.request)({url:a.default.getQrCode,method:"POST",data:t,success:function(t){200!=t.statusCode?n(t):e(t)},fail:function(t){n(t)}})}))},e.listApplicationKeys=function(t){return new Promise((function(e,n){(0,i.request)({url:a.default.listApplicationKeys,method:"GET",data:t,success:function(t){if(200==t.statusCode){var o=t.data.applicationKeys;return _that.applicationKeys=o,void e(o)}n()},fail:function(t){n()}})}))},e.listOwnerMachines=function(t){return new Promise((function(e,n){(0,i.request)({url:a.default.listOwnerMachines,method:"GET",data:t,success:function(t){if(200!=t.statusCode)n(t);else{var o=t.data.data;e(o)}},fail:function(t){n(t)}})}))},e.openDoor=function(t){return new Promise((function(e,n){(0,i.request)({url:a.default.openDoor,method:"POST",data:t,success:function(t){200!=t.statusCode?n(t):e(t)},fail:function(t){n(t)}})}))},n("bf0f");var i=n("a7bc"),a=o(n("79d4"));o(n("bce4"))},fd19:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"padding-xl margin-top"},[n("v-uni-canvas",{staticStyle:{width:"520upx",height:"520upx",margin:"0 auto"},attrs:{"canvas-id":"openDoorQrcode"}})],1),n("v-uni-view",{staticClass:"padding flex flex-direction margin-top"},[n("v-uni-button",{staticClass:"cu-btn bg-green margin-tb-sm lg",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t._closeModal()}}},[t._v("关闭")])],1)],1)},i=[]}}]); |