(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{1002:function(e,t,o){"use strict";o.r(t);o(12),o(13),o(6),o(16),o(11),o(17);var n=o(4),r=(o(29),o(14),o(90),o(34),o(24),o(95),o(36),o(76),o(47),o(93),o(5)),l=o(879),c=o.n(l);function d(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,o)}return t}function m(e){for(var i=1;i-1?c()(e.yz_redirect):e.yz_redirect:"",!t.wechat_qrcode_config.is_open||1!=t.wechat_qrcode_config.wechat_login_type&&2!=t.wechat_qrcode_config.wechat_login_type||(t.login_type=2,t.tabs[0].isShow=!0,t.select="1",t.login({is_pc_qrcode:1,yz_redirect:e.yz_redirect})))):e.$message.error(o.msg)}))},changeSelect:function(e){this.timer&&(clearInterval(this.timer),this.timer=null),this.timer2&&(clearInterval(this.timer2),this.timer2=null),this.select=e.id},jumpH5:function(e){var t=["/o2o/home","/entry_orders/home","/microShop/home","/o2o/category/"],path="/"+e.match(/#\/(\S*)\?/)[1],o=e.match(/#\/(\S*)?/)[1],n=!1;if(["/login","/register","/findpwd","/home","/category","/category_child/","/search","/goods/","/cart","/goodsorder","/supplier_shop2/","/coupon/coupon_index","/coupon/coupon_store","/member/integral_v2","/member/balance","/member/address","/member/extension","/member/workerApply","/member/workerOrderlist","/member/workerOrderDetail/","member/userOrderlist","/member/userOrderDetail/","/knowledge/home","/knowledge/knowledge_whole","/knowledge/knowledge_search","/knowledge/knowledge_detail/"].map((function(e){path.indexOf(e)>-1&&-1==t.indexOf(path)&&(n=!0)})),n)window.location.href="".concat(this.fun.getSiteRoot(),"/plugins/shop_server/").concat(o);else{var r="";[{h5:"/member",pc:"/order"},{h5:"/member/orderList/0",pc:"/order"},{h5:"/member/orderdetail/",pc:"/order"}].map((function(e){e.h5.indexOf(path)>-1&&(r=e.pc)})),window.location.href=r?"".concat(this.fun.getSiteRoot(),"/plugins/shop_server").concat(r,"?i=").concat(this.fun.getKeyByI(),"&mid=").concat(this.fun.getKeyByMid()):e}},verificationCode_V2:function(){var e=this;if(this.mobileForm.mobile)if(!this.imgcode||this.mobileForm.captcha){var t={mobile:this.mobileForm.mobile,captcha:this.mobileForm.captcha};this.fun.$post("member.register.sendCodeV2",t,"...").then((function(t){1===t.result?(e.$message.success("已发送"),e.timer||(e.count=60,e.timer=setInterval((function(){e.count>0&&e.count<=60?e.count--:(clearInterval(e.timer),e.timer=null)}),1e3))):e.$message.error(t.msg)}),(function(t){e.$message.error(t.msg)}))}else this.$message.error("请填图形验证码");else this.$message.error("请先填写手机号")},getPrepBind:function(){var e=this;console.log(this.mobileForm),this.mobileForm.mobile?!this.imgcode||this.mobileForm.captcha?this.mobileForm.code?this.fun.$post("member.member.prepBind",this.mobileForm,"绑定中...").then((function(t){1==t.result?t.data.is_show?(e.showChangeID=!0,e.changidInfo.uid=t.data.uid,e.changidInfo.change_uid=t.data.change_uid):e.register():e.$message.error(t.msg)}),(function(t){e.$message.error(t.msg)})):this.$message.error("请填验证码"):this.$message.error("图形验证码不能为空"):this.$message.error("请填写手机号")},register:function(){var e=this,t={country:"86",mobile:this.mobileForm.mobile,captcha:this.mobileForm.captcha,code:this.mobileForm.code,close:1};this.fun.$post("member.member.bindMobile",t,"绑定中...").then((function(t){1==t.result?(e.$message.success("绑定成功"),e.showChangeID=!1,e.login_back_url?e.login_back_url.indexOf("addons/yun_shop")>-1?e.jumpH5(e.login_back_url):window.location.href=e.login_back_url:e.$router.push(e.fun.getUrl("home"))):e.$message.error(t.msg)}),(function(t){e.$message.error(t.msg)}))},login:function(data,e){var t,o,n=this,r=this,l="",c="正在获取";"0"==this.is_enable?(t="member.login.index",o=data):(t="plugin.account-login.frotend.member.login",o={account:data.mobile,mobileErr:data.mobileErr,password:data.password,passwordErr:data.passwordErr,uuid:data.uuid,mid:data.mid,code:data.code,captcha:data.captcha}),r.wechat_qrcode_config.is_open&&2==r.wechat_qrcode_config.wechat_login_type&&"1"==r.select&&(l="16",1==e&&(this.pc_token=""),this.pc_token&&(o.pc_token=this.pc_token,c="")),this.fun.$post(t,o,c,l).then((function(t){if(1===t.result)r.fun.isPc()&&11==t.data.status?(n.pc_token=t.data.pc_token,n.account_url=t.data.account_url,1==e&&n.timer2&&(clearInterval(n.timer2),n.timer2=null),n.timer2||1==n.pc_bind_mobile||(n.timer2=setInterval((function(){r.login({is_pc_qrcode:1,yz_redirect:n.yz_redirect})}),5e3))):r.fun.isPc()&&1==t.data.status?(n.pc_bind_mobile=t.data.pc_bind_mobile,n.timer2&&(clearInterval(n.timer2),n.timer2=null),n.$message.success("欢迎登录"),n.$store.commit("setLogin",{is_login:!0}),n.login_back_url=t.data.url,1!=n.pc_bind_mobile&&(t.data.url?t.data.url.indexOf("addons/yun_shop")>-1?n.jumpH5(t.data.url):window.location.href=t.data.url:r.$router.push(n.fun.getUrl("home")))):(n.timer2&&(clearInterval(n.timer2),n.timer2=null),n.$message.success("欢迎登录"),n.$store.commit("setLogin",{is_login:!0}),t.data.url?t.data.url.indexOf("addons/yun_shop")>-1?n.jumpH5(t.data.url):window.location.href=t.data.url:r.$router.push(n.fun.getUrl("home")));else if(r.fun.isPc()&&9==t.data.status){var o=t.msg.url;o&&(r.appid=r.getParam("appid",o),r.redirect_uri=r.getParam("redirect_uri",o),r.scope=r.getParam("scope",o),r.state=r.getParam("state",o)),n.login_obj=new WxLogin({id:"login_code",appid:r.appid,scope:r.scope,redirect_uri:encodeURIComponent(r.redirect_uri),state:r.state})}else 10!=t.data.status&&n.$message.error(t.msg)}))},getParam:function(e,t){var o=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i");if(t.indexOf("?")>-1){var n=t.split("?")[1].match(o);return null!=n?unescape(n[2]):null}return null},mobile_login:function(){if(this.fun.isTextEmpty(this.form.mobile))this.$message.error("请填写手机号");else{if(1!=this.mobile_login_code){if(this.fun.isTextEmpty(this.form.password))return void this.$message.error("请填写密码");delete this.form.code}this.form.uuid=0,this.form.mid=null==this.fun.isTextEmpty(window.localStorage.getItem("mid"))?0:window.localStorage.getItem("mid"),this.form.is_sms=this.mobile_login_code,1!=this.mobile_login_code&&delete this.form.code,this.yz_redirect&&(this.form.yz_redirect=this.yz_redirect.indexOf("http")>-1?c()(this.yz_redirect):this.yz_redirect),this.login(this.form)}}}},_=(o(880),o(1)),component=Object(_.a)(h,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"login_index",style:{backgroundImage:"url("+(e.basicSet.set&&e.basicSet.set.login_advert_src?e.basicSet.set.login_advert_src:"")+")"}},[o("div",{staticClass:"login_content flex flex-a-c flex-j-c m-auto"},[o("div",{staticClass:"right-input"},[o("div",{staticClass:"tabs flex flex-j-c flex-a-c"},e._l(e.tabs,(function(t,n){return t.isShow?o("div",{key:n,staticClass:"flex flex-j-c flex-a-c",staticStyle:{width:"50%",height:"100%"}},[o("div",{staticClass:"tab flex flex-a-c flex-j-c",class:{color:e.select==t.id},on:{click:function(o){return e.changeSelect(t)}}},[e._v("\n "+e._s(t.text)+"\n "),e.select==t.id?o("div",{staticClass:"line"}):e._e()])]):e._e()})),0),e._v(" "),"0"==e.select?o("div",{staticClass:"right-content flex flex-j-c"},[o("el-form",[o("el-form-item",{attrs:{label:""}},[o("el-input",{attrs:{placeholder:"1"==e.is_enable?"请输入账号":"请输入手机号"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),e._v(" "),e.imgcode&&1==e.mobile_login_code?o("el-form-item",{attrs:{label:""}},[o("div",{staticClass:"flex flex-a-c "},[o("div",{staticClass:"flex flex-a-c imgwrap",staticStyle:{position:"relative"}},[o("el-input",{attrs:{placeholder:"请输入右侧图形验证码"},model:{value:e.form.captcha,callback:function(t){e.$set(e.form,"captcha",t)},expression:"form.captcha"}}),e._v(" "),o("img",{staticClass:"imgCode",attrs:{src:e.imgcode},on:{click:e.getimgdata}})],1)])]):e._e(),e._v(" "),0==e.mobile_login_code?o("el-form-item",{attrs:{label:""}},[o("el-input",{attrs:{placeholder:"请输入密码","show-password":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.mobile_login.apply(null,arguments)}},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1):e._e(),e._v(" "),1==e.mobile_login_code?o("el-form-item",{attrs:{label:""}},[o("div",{staticClass:"flex flex-a-c",staticStyle:{position:"relative"}},[o("el-input",{attrs:{placeholder:"验证码"},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}}),e._v(" "),e.isVerify?o("div",{staticClass:"getCode",on:{click:e.verificationCode}},[e._v("获取验证码\n ")]):e._e(),e._v(" "),e.isVerify?e._e():o("div",{staticClass:"getCode",staticStyle:{color:"#666"}},[e._v("重新发送("+e._s(e.timeNumber)+"秒)\n ")])],1)]):e._e(),e._v(" "),e.enable_btn?o("el-form-item",{attrs:{label:"是否开启账号登录"}},[o("el-switch",{attrs:{"inactive-value":"0","active-value":"1"},on:{change:e.changeSwitch},model:{value:e.is_enable,callback:function(t){e.is_enable=t},expression:"is_enable"}})],1):e._e(),e._v(" "),o("el-form-item",{staticStyle:{"margin-top":"40px"},attrs:{label:""}},[o("div",{staticClass:"flex flex-a-c flex-j-c",staticStyle:{width:"100%"}},[o("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.mobile_login}},[e._v("登录\n ")])],1),e._v(" "),1==e.mobile_login_code?o("p",{staticClass:"login-tips"},[e._v("使用手机号验证码快捷注册/登录")]):e._e()]),e._v(" "),1==e.mobile_login_code?o("div",{staticClass:"login-tips"},[e._v("注册即同意 "),o("span",{staticClass:"blue",on:{click:function(t){return t.stopPropagation(),e.toRegisterText.apply(null,arguments)}}},[e._v("《"+e._s(e.protocol_title||"平台用户协议")+"》")])]):e._e(),e._v(" "),0==e.mobile_login_code?o("div",{staticClass:"bottom-text flex flex-a-c"},[o("span",{staticClass:"reg",on:{click:e.toRegister}},[e._v("立即注册")]),o("span",{staticClass:"ge"}),e._v(" "),o("span",{staticClass:"fwd",on:{click:function(t){return e.toUrl("findpwd")}}},[e._v("忘记密码")])]):e._e()],1)],1):e._e(),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.select&&2==e.login_type,expression:"select=='1'&&login_type==2"}],staticClass:"right-content"},[1!=e.pc_bind_mobile?o("div",{staticClass:"refresh flex",style:{marginLeft:2==e.wechat_qrcode_config.wechat_login_type?"155px":"",bottom:2==e.wechat_qrcode_config.wechat_login_type?"50px":""},on:{click:function(t){return e.login({is_pc_qrcode:1,yz_redirect:e.yz_redirect},1)}}},[o("i",{staticClass:"iconfont icon-fontclass-gengxin"}),e._v(" 刷新\n ")]):e._e(),e._v(" "),2==e.wechat_qrcode_config.wechat_login_type&&1!=e.pc_bind_mobile?o("div",{staticClass:"wrp_code_2"},[o("div",{staticClass:"code_title"},[e._v("微信登录")]),e._v(" "),e.account_url?o("img",{staticClass:"lightBorder_2",attrs:{src:e.account_url,alt:""}}):e._e(),e._v(" "),e._m(0)]):e._e(),e._v(" "),1==e.pc_bind_mobile?o("div",{staticStyle:{width:"83%",margin:"0 auto"}},[o("p",{staticClass:"bind-tips"},[e._v("绑定手机号开通专属服务")]),e._v(" "),o("el-form",[o("el-form-item",{attrs:{label:""}},[o("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:e.mobileForm.mobile,callback:function(t){e.$set(e.mobileForm,"mobile",t)},expression:"mobileForm.mobile"}})],1),e._v(" "),e.imgcode?o("el-form-item",{attrs:{label:""}},[o("div",{staticClass:"flex flex-a-c "},[o("div",{staticClass:"flex flex-a-c imgwrap",staticStyle:{position:"relative"}},[o("el-input",{attrs:{placeholder:"请输入右侧图形验证码"},model:{value:e.mobileForm.captcha,callback:function(t){e.$set(e.mobileForm,"captcha",t)},expression:"mobileForm.captcha"}}),e._v(" "),o("img",{staticClass:"imgCode",attrs:{src:e.imgcode},on:{click:e.getimgdata}})],1)])]):e._e(),e._v(" "),o("el-form-item",{attrs:{label:""}},[o("div",{staticClass:"flex flex-a-c",staticStyle:{position:"relative"}},[o("el-input",{attrs:{placeholder:"验证码"},model:{value:e.mobileForm.code,callback:function(t){e.$set(e.mobileForm,"code",t)},expression:"mobileForm.code"}}),e._v(" "),e.isVerify?o("div",{staticClass:"getCode",on:{click:e.verificationCode_V2}},[e._v("获取验证码\n ")]):e._e(),e._v(" "),e.isVerify?e._e():o("div",{staticClass:"getCode",staticStyle:{color:"#666"}},[e._v("重新发送("+e._s(e.timeNumber)+"秒)\n ")])],1)]),e._v(" "),o("el-form-item",{staticStyle:{"margin-top":"40px"},attrs:{label:""}},[o("div",{staticClass:"flex flex-a-c flex-j-c",staticStyle:{width:"100%"}},[o("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.getPrepBind}},[e._v("开通专属服务\n ")])],1)])],1)],1):e._e(),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:1==e.wechat_qrcode_config.wechat_login_type&&1!=e.pc_bind_mobile,expression:"wechat_qrcode_config.wechat_login_type == 1 && pc_bind_mobile != 1"}],staticStyle:{"margin-top":"-20px"},attrs:{id:"login_code"}}),e._v(" "),o("div",{staticClass:"login-tips",style:{marginTop:2==e.wechat_qrcode_config.wechat_login_type?"61px":""}},[e._v("注册即同意 "),o("span",{staticClass:"blue",on:{click:function(t){return t.stopPropagation(),e.toRegisterText.apply(null,arguments)}}},[e._v("《"+e._s(e.protocol_title||"平台用户协议")+"》")])])])])]),e._v(" "),o("el-dialog",{attrs:{title:"重要提示",visible:e.showChangeID,width:"30%","show-close":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.showChangeID=t}}},[o("p",{staticClass:"changeId_warnText"},[e._v("\n 当前绑定绑定操作会导致用户ID变更:原会员ID:"+e._s(e.changidInfo.uid)+",变更后会员ID:"+e._s(e.changidInfo.change_uid)+";绑定后所有数据记录以变更后会员ID"+e._s(e.changidInfo.change_uid)+"为准,\n "),o("em",{staticStyle:{color:"#d53125"}},[e._v("原会员ID"+e._s(e.changidInfo.uid)+"数据将被删除,数据不会进行合并,且不可找回!")]),e._v("请谨慎操作! "),o("br"),e._v("绑定后请注意重新生成推广海报、重新发送推广链接!\n ")]),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.showChangeID=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.register}},[e._v("确认合并")])],1)])],1)}),[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"tips_title"},[o("p",[e._v("请使用微信扫描二维码关注公众号登录")])])}],!1,null,"3be3a580",null);t.default=component.exports},792:function(e,t,o){var content=o(881);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(8).default)("313f640d",content,!0,{sourceMap:!1})},879:function(e,t,o){(function(t){o(6),o(47),o(55),o(48),e.exports=function(e){if("undefined"==typeof window)return new t(e).toString("base64");if(void 0!==window.btoa)return window.btoa(decodeURIComponent(encodeURIComponent(e)));var h1,h2,h3,h4,o,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=0,r=0,l="",c=[];if(!e)return e;e=decodeURIComponent(encodeURIComponent(e));do{h1=(o=e.charCodeAt(i++)<<16|e.charCodeAt(i++)<<8|e.charCodeAt(i++))>>18&63,h2=o>>12&63,h3=o>>6&63,h4=63&o,c[r++]=n.charAt(h1)+n.charAt(h2)+n.charAt(h3)+n.charAt(h4)}while(i