(my["webpackJsonp"]=my["webpackJsonp"]||[]).push([["pages/home/jobDetails"],{"4f71":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return o}));var o={uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,"1eac"))},uCell:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-cell/u-cell")]).then(n.bind(null,"9552"))},"u-Image":function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u--image/u--image")]).then(n.bind(null,"2788"))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-button/u-button")]).then(n.bind(null,"110b"))}},i=function(){var t=this.$createElement;this._self._c},c=[]},"67b1":function(t,e,n){"use strict";n.r(e);var o=n("69a3"),i=n.n(o);for(var c in o)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(c);e["default"]=i.a},"69a3":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("3c6c"),i={data:function(){return{outBizNo:"",visible:!1,visible2:!1,recruitId:"",detail:{},userInfo:[],token:"",signUp:!1,collect:!1,source:""}},onLoad:function(e){var n=this;if(this.$scope.onClose=this.onClose,this.$scope.onClose2=this.onClose2,this.$scope.onSuccess=this.onSuccess,this.$scope.onSuccess2=this.onSuccess2,this.$scope.onFailure=this.onFailure,this.$scope.onFailure2=this.onFailure2,this.recruitId=e.id,this.source=e.source||"",this.token=t.getStorageSync("jy-recruit-token")||"",this.$http.get("/public/recruit/details",{id:e.id}).then((function(t){n.detail=t.data,n.getSignRecord()})),this.getLoginInfo(),"jyzp"!=e.source&&!this.token){var o=this;t.login({success:function(e){o.$http.get("/public/ali/getopenId",{code:e.code}).then((function(e){var n=JSON.parse(e.code);console.log("getOpenId",n);var i=n.alipay_system_oauth_token_response.open_id;t.setStorageSync("openId",i),o.$http.post("/public/person/c",{openId:i}).then((function(e){t.request({url:"https://jyzp.365jft.com/jfb-recruit/loginform",method:"POST",data:{account:i,wxType:"wx"},header:{"Content-Type":"application/x-www-form-urlencoded"},success:function(e){t.setStorageSync("jy-recruit-token",e.data.token),o.token=e.data.token},fail:function(t){console.log("请求失败",t)}})}))}))}})}},methods:{generateOutBizNo:function(){var t=(new Date).getTime(),e=Math.floor(1e4*Math.random()).toString().padStart(4,"0");return"job_auth_".concat(t,"_").concat(e)},handleTap:function(){this.outBizNo=this.generateOutBizNo(),this.visible=!0},onFailure:function(t){var e=t.code,n=t.message;console.log(e,n),this.visible=!0},onClose:function(){this.visible=!1},onFailure2:function(t){console.log(111111,t),this.visible2=!0},onClose2:function(){this.visible2=!1},onSuccess:function(e){var n=this;this.visible=!1,(0,o.getResume)(e,(function(){t.showToast({title:"登录成功",icon:"none"}),n.token=t.getStorageSync("jy-recruit-token"),n.getSignRecord(),n.getLoginInfo()}))},onSuccess2:function(e){this.visible2=!1,console.log("投递成功",e),this.signUp=!0,"jyzp"==this.source?(console.log(2),t.showToast({title:"报名成功",icon:"none"})):t.showModal({content:"投递成功",confirmText:"返回支付宝就业",showCancel:!1,success:function(t){t.confirm&&my.exitMiniProgram()}})},toCompanyDetails:function(e){t.setStorageSync("ogrDetails",e),t.navigateTo({url:"/pages/home/companyDetails"})},getLoginInfo:function(){var e=this;t.getStorageSync("jy-recruit-token")&&this.$http.get("/person/person/details",{}).then((function(t){e.userInfo=t.data,e.$http.get("/objective/l",{personId:t.data.id}).then((function(t){e.userInfo.tabList=t.data.list||[]}))}))},shoucang:function(){var e=this;this.token?this.$http.post("/collect/c",{recruitId:this.recruitId}).then((function(n){e.collect=!e.collect,t.showToast({title:e.collect?"收藏成功":"取消成功",icon:"none"})})):this.handleTap()},getSignRecord:function(){var t=this;this.token&&(this.$http.post("/signRecord/have",{recruitId:this.recruitId}).then((function(e){t.signUp="1"==e.data})),this.$http.post("/collect/have",{recruitId:this.recruitId}).then((function(e){t.collect="1"==e.data})))},deliver:function(){this.token?(this.outBizNo=this.generateOutBizNo(),this.visible2=!0):this.handleTap()}}};e.default=i}).call(this,n("6861")["default"])},8008:function(t,e,n){"use strict";(function(t){var e=n("47a9");n("9db3");e(n("3240"));var o=e(n("e83e"));my.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("6861")["createPage"])},b924:function(t,e,n){},e44a:function(t,e,n){"use strict";var o=n("b924"),i=n.n(o);i.a},e83e:function(t,e,n){"use strict";n.r(e);var o=n("4f71"),i=n("67b1");for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);n("e44a");var s=n("828b"),u=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);e["default"]=u.exports}},[["8008","common/runtime","common/vendor"]]]);