| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/views/saoCode/saoCode"],{"0b7a":function(e,t,n){"use strict";n.r(t);var o=n("55c1"),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=a.a},"55c1":function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n("7eb4")),i=o(n("ee10")),c=n("f414"),r=n("e34d"),s={name:"saoCode",data:function(){return{webViewType:!1,baseUrl:c.config.saoCodeTypeUrl,code:"",type:""}},onLoad:function(t){console.log("option",t);if(t.q){var n=decodeURIComponent(t.q),o=n.split("?")[1].split("&"),a={};o.forEach((function(e){a[e.split("=")[0]]=e.split("=")[1]})),e.getStorageSync("token")?this.codeRecognize(a):(e.setStorageSync("codeData",a),e.reLaunch({url:"/pages/views/login/login"}))}else{var i=e.getStorageSync("codeData");e.removeStorageSync("codeData"),this.codeRecognize(i)}},mounted:function(){},methods:{codeRecognize:function(t){t.type?11==t.type?this.chemicalAioVerifyScanLogin(t.code,t.subId,t.macId):12==t.type?this.chemicalAioVerifyAppletLogin(t.doorId,t.subId,t.macId,t.code):13==t.type?this.laboratoryAppBoardScanCodeVerification(t.macId,t.subId,t.code):14==t.type?e.reLaunch({url:"/pages/views/saoCode/chemicalsInstructionsVideo"}):7==t.type?e.reLaunch({url:"/pages/views/pages_patrolInspector/courseQRcode?code="+t.code}):8==t.type?e.reLaunch({url:"/pages/views/pages_patrolInspector/chemicalCabinetQRcode?code="+t.code}):9==t.type?e.reLaunch({url:"/pages/views/pages_patrolInspector/chemicalDetail?code="+t.code}):1==t.type||2==t.type||3==t.type?(this.$set(this,"code",t.code),this.$set(this,"type",t.type),this.$set(this,"webViewType",!0)):5==t.type?this.laboratoryAppletGetSubDetailInfo(t.code):10==t.type?(e.showToast({mask:!0,icon:"none",position:"center",title:"专项检查功能请从安全检查进入",duration:2e3}),setTimeout((function(){e.reLaunch({url:"/pages/views/home/home"})}),2e3)):(e.showToast({mask:!0,icon:"none",position:"center",title:"二维码异常,请联系管理员",duration:2e3}),setTimeout((function(){e.reLaunch({url:"/pages/views/home/home"})}),2e3)):(e.showToast({mask:!0,icon:"none",position:"center",title:"请扫描正确的小程序二维码",duration:2e3}),setTimeout((function(){e.reLaunch({url:"/pages/views/home/home"})}),2e3))},chemicalAioVerifyScanLogin:function(t,n,o){return(0,i.default)(a.default.mark((function i(){var c,s;return a.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,r.chemicalAioVerifyScanLogin)({code:t,subId:n,userId:e.getStorageSync("userId"),macId:o});case 2:c=a.sent,s=c.data,e.showToast({mask:!0,icon:"none",position:"center",title:s.message,duration:2e3}),setTimeout((function(){e.reLaunch({url:"/pages/views/mine/mine"})}),2e3);case 6:case"end":return a.stop()}}),i)})))()},chemicalAioVerifyAppletLogin:function(t,n,o,c){return(0,i.default)(a.default.mark((function i(){var s,u;return a.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,r.chemicalAioVerifyAppletLogin)({doorId:t,subId:n,macId:o,code:c,userId:e.getStorageSync("userId")});case 2:s=a.sent,u=s.data,e.showToast({mask:!0,icon:"none",position:"center",title:u.message,duration:2e3}),setTimeout((function(){e.reLaunch({url:"/pages/views/mine/mine"})}),2e3);case 6:case"end":return a.stop()}}),i)})))()},laboratoryAppBoardScanCodeVerification:function(t,n,o){return(0,i.default)(a.default.mark((function i(){var c,s;return a.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,r.laboratoryAppBoardScanCodeVerification)({macId:t,subId:n,code:o,userId:e.getStorageSync("userId")});case 2:c=a.sent,s=c.data,e.showToast({mask:!0,icon:"none",position:"center",title:s.message,duration:2e3}),setTimeout((function(){e.reLaunch({url:"/pages/views/mine/mine"})}),2e3);case 6:case"end":return a.stop()}}),i)})))()},laboratoryAppletGetSubDetailInfo:function(t){return(0,i.default)(a.default.mark((function n(){var o,i;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,r.laboratoryAppletGetSubDetailInfo)({infoId:t});case 2:o=n.sent,i=o.data,200==i.code&&e.reLaunch({url:"/pages_manage/views/laboratory/safetyCardScan?infoData="+encodeURIComponent(JSON.stringify(i.data))+"&saoCode=true"});case 5:case"end":return n.stop()}}),n)})))()}}};t.default=s}).call(this,n("df3c")["default"])},"5ee3":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},a=[]},ad0d:function(e,t,n){"use strict";n.r(t);var o=n("5ee3"),a=n("0b7a");for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);n("c061");var c=n("828b"),r=Object(c["a"])(a["default"],o["b"],o["c"],!1,null,"7d2bfd5e",null,!1,o["a"],void 0);t["default"]=r.exports},c061:function(e,t,n){"use strict";var o=n("ebd9"),a=n.n(o);a.a},c398:function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("e7a6");o(n("3240"));var a=o(n("ad0d"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},ebd9:function(e,t,n){}},[["c398","common/runtime","common/vendor"]]]);
|