(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/authorize_record/authorize_record"],{"20dc":function(e,t,a){"use strict";var n=a("4276"),o=a.n(n);o.a},4276:function(e,t,a){},"6af4":function(e,t,a){"use strict";a.r(t);var n=a("e3c3"),o=a.n(n);for(var i in n)"default"!==i&&function(e){a.d(t,e,(function(){return n[e]}))}(i);t["default"]=o.a},b56b:function(e,t,a){"use strict";a.r(t);var n=a("fbc1"),o=a("6af4");for(var i in o)"default"!==i&&function(e){a.d(t,e,(function(){return o[e]}))}(i);a("20dc");var r,s=a("f0c5"),u=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"a0684d24",null,!1,n["a"],r);t["default"]=u.exports},dd5a:function(e,t,a){"use strict";(function(e){a("4518");n(a("66fd"));var t=n(a("b56b"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,a("543d")["createPage"])},e3c3:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("1332"),o=getApp(),i={data:function(){return{count:0,codeModelShow:!1,codeImg:"",accessToken:"",shareData:{},shareShow:!1,shareList:[{text:"分享给好友"},{text:"生成二维码"}],doorNeedAudit:0,list:null}},components:{},props:{},onLoad:function(t){this.doorNeedAudit=e.getStorageSync("doorNeedAudit"),this.getRecord()},onShow:function(){var t=e.getStorageSync("isFlush");t&&(this.getRecord(),e.setStorageSync("isFlush",!1))},onShareAppMessage:function(e){var t="访问房间："+this.shareData.roomName+"; 有效期:   "+this.shareData.beginDate+" 到 "+this.shareData.endDate,a="/pages/guest/guest_form?id="+this.shareData.id+"&doorNeedAudit="+this.doorNeedAudit+"&memberId="+o.globalData.member.id;return this.shareShow=!1,{title:t,path:a,imageUrl:"/static/clock.png"}},methods:{createQrcode:function(){this.shareShow=!1,this.getAccessToken()},getAccessToken:function(){var e=this,t={appId:this.$wxData.APPID,secret:this.$wxData.SECRET,grantType:this.$wxData.GRANTTYPE};e.$http.getAccessToken(t).then((function(t){e.getGenerateCode(t.data.access_token)}))},getGenerateCode:function(t){e.showLoading({title:"二维码生成中.."});var a=this,n={access_token:t,scene:this.shareData.id+","+this.doorNeedAudit+","+o.globalData.member.id,page:"pages/guest/guest_form",width:80};setTimeout((function(){a.$http.generateCode(n).then((function(t){a.codeImg=t.data,e.hideLoading(),a.codeModelShow=!0}))}),1e3)},addOpenPassword:function(){e.navigateTo({url:"/pages/authorize_record/openPass/openPass"})},getRecord:function(){var e=this,t={pageSize:50};t["member_id"]=o.globalData.member.id,e.$http.getGuestAuthorizeList(t).then((function(t){if(console.info("获取数据结构"+t.data.result_msg),1==t.data.result_code){var a=t.data.list;for(var o in a)a[o].beginDate=n.formatTime(a[o].beginDate),a[o].endDate=n.formatTime(a[o].endDate);e.setData({list:a})}}))},backout:function(e){var t=e.currentTarget.dataset.id,a=this,n={};n["guest_authorize_id"]=t,n["member_id"]=o.globalData.member.id,a.$http.guestAuthorizeCancel(n).then((function(e){console.info("获取数据结构"+e.data.result_msg),1==e.data.result_code?o.globalData.oneFailHint(e.data.result_msg,(function(){a.getRecord()})):o.globalData.oneFailHint(e.data.result_msg)}))}}};t.default=i}).call(this,a("543d")["default"])},fbc1:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return n}));var n={uPopup:function(){return a.e("uview-ui/components/u-popup/u-popup").then(a.bind(null,"4d7c"))},uBadge:function(){return a.e("uview-ui/components/u-badge/u-badge").then(a.bind(null,"9994"))},uIcon:function(){return a.e("uview-ui/components/u-icon/u-icon").then(a.bind(null,"c55a"))}},o=function(){var e=this,t=e.$createElement,a=(e._self._c,e.$isEmpty(e.list)),n=e.$isEmpty(e.list);e._isMounted||(e.e0=function(t,a){var n=arguments[arguments.length-1].currentTarget.dataset,o=n.eventParams||n["event-params"];a=o.item;e.shareData=a,e.shareShow=!0},e.e1=function(t){e.shareShow=!1}),e.$mp.data=Object.assign({},{$root:{m0:a,m1:n}})},i=[]}},[["dd5a","common/runtime","common/vendor"]]]);