(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-confirm-code-confirm-code"],{"0efd":function(e,t,o){"use strict";o.r(t);var n=o("80f3"),a=o("6118");for(var c in a)"default"!==c&&function(e){o.d(t,e,function(){return a[e]})}(c);o("804d");var i=o("2877"),s=Object(i["a"])(a["default"],n["a"],n["b"],!1,null,"27a3c48a",null);t["default"]=s.exports},6118:function(e,t,o){"use strict";o.r(t);var n=o("fb98"),a=o.n(n);for(var c in n)"default"!==c&&function(e){o.d(t,e,function(){return n[e]})}(c);t["default"]=a.a},"684d":function(e,t,o){t=e.exports=o("2350")(!1),t.push([e.i,"uni-page-body[data-v-27a3c48a]{background:#f5f5f5}.code-view[data-v-27a3c48a]{position:absolute;left:calc(50% - %?50?%);top:calc(50% - %?60?%);width:%?100?%;height:%?100?%}.code-text[data-v-27a3c48a]{position:absolute;width:%?100?%;text-align:center;font-size:%?10.41?%;left:calc(50% - %?50?%);top:calc(50% + %?60?%);display:block}body.?%PAGE?%[data-v-27a3c48a]{background:#f5f5f5}",""])},"71c0":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createUUID=void 0,o("6b54"),o("87b3"),o("a481");var n=function(e){return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,o="x"==e?t:3&t|8;return o.toString(16)})};t.createUUID=n},"804d":function(e,t,o){"use strict";var n=o("db7e"),a=o.n(n);a.a},"80f3":function(e,t,o){"use strict";var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return e.showCode?o("v-uni-view",[o("v-uni-view",{staticClass:"code-view"},[o("tki-qrcode",{ref:"qrcode",attrs:{val:e.val,size:100,unit:"upx",onval:!0,loadMake:!0,showLoading:!1,usingComponents:!0}})],1),o("v-uni-text",{staticClass:"code-text"},[e._v("请使用微信扫码验证")])],1):e._e()},a=[];o.d(t,"a",function(){return n}),o.d(t,"b",function(){return a})},"9bdb":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n;function a(e,t){var o=this;"a"==t&&(n=e),uni.connectSocket({url:"wss://kd.biutag.com:9903/ukeerWechatWebsocketServer.action"}),uni.onSocketOpen(function(e){uni.hideLoading(),uni.showToast({title:"网络已连接",duration:2e3});var t=uni.getStorageSync("openId");void 0!=t&&""!=t||(t="not found"),uni.sendSocketMessage({data:'{ "openId": "'+t+'", "state": "menu" }'}),setInterval(function(){console.log("heard"),uni.sendSocketMessage({data:'{ "my": "huozhe", "state": "heard" }'})},2e4),console.log("WebSocket连接已打开!"),!0}),uni.onSocketError(function(e){console.log("WebSocket连接打开失败,请检查!")}),uni.onSocketClose(function(t){uni.showLoading({title:"网络断开,重连中...",mask:!0}),uni.closeSocket(),console.log("WebSocket 已关闭!重连中..."),setTimeout(function(){o.getWebSocket(e)},2e3)}),uni.onSocketMessage(function(o){console.log(o);var a=JSON.parse(o.data);if("id"==a.message)e.VXCode("https://kd.biutag.com:9903/weChat/menu/"+a.data),"a"==t&&n.VXCode("https://kd.biutag.com:9903/weChat/menu/"+a.data);else if("login"==a.message){if("success"==a.data.state){a.data.openId;e.loginPage(a.data)}}else"pay"==a.message&&("start"==a.data?n.getWxCode("https://kd.biutag.com:9903/user/weChat_or_ali/"+uni.getStorageSync("openId")):"end"==a.data&&n.getWxCode())})}var c={getWebSocket:a};t.default=c},db7e:function(e,t,o){var n=o("684d");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var a=o("4f06").default;a("85dd23e0",n,!0,{sourceMap:!1,shadowMode:!1})},fb98:function(e,t,o){"use strict";var n=o("e54b"),a=o("288e");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=a(o("6e82")),i=(o("71c0"),n(o("596e"))),s=a(o("9bdb")),u={components:{tkiQrcode:c.default},data:function(){return{val:"https://u.wechat.com/MGCFEPwjKx0ZXPaED6LSwB4",showCode:!1,socketMsgQueue:""}},onLoad:function(){this.checkLogin()},onShow:function(){},methods:{checkLogin:function(){var e=this;i.checkLogin().then(function(t){"success"==t.message?uni.redirectTo({url:"/pages/store-commodity/store-commodity"}):(e.showCode=!0,e.getWebSocketRes())})},VXCode:function(e){this.showCode=!0,this.val=e,uni.setStorageSync("id",e)},loginPage:function(e){uni.setStorageSync("openId",e.openId),uni.redirectTo({url:"/pages/store-commodity/store-commodity"})},getWebSocketRes:function(){var e=s.default.getWebSocket(this,"b");uni.setStorageSync("socket",e)}}};t.default=u}}]);