index.js 9.0 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/annex/settled/index"],{"15cd":function(t,i,e){"use strict";var n=e("361f"),a=e.n(n);a.a},"2b1a":function(t,i,e){"use strict";e.r(i);var n=e("ac37"),a=e("8aad");for(var s in a)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(s);e("15cd");var o=e("f0c5"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"5a69b5ae",null,!1,n["a"],void 0);i["default"]=u.exports},"361f":function(t,i,e){},"8aad":function(t,i,e){"use strict";e.r(i);var n=e("f568"),a=e.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(s);i["default"]=a.a},a2f9:function(t,i,e){"use strict";(function(t,i){var n=e("4ea4");e("4789");n(e("66fd"));var a=n(e("2b1a"));t.__webpack_require_UNI_MP_PLUGIN__=e,i(a.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])},ac37:function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return s})),e.d(i,"a",(function(){return n}));var n={jyfParser:function(){return Promise.all([e.e("common/vendor"),e.e("components/jyf-parser/jyf-parser")]).then(e.bind(null,"47fd"))}},a=function(){var t=this,i=t.$createElement,e=(t._self._c,-1!=t.status||t.inloading?null:t.$t("代理商名称")),n=-1!=t.status||t.inloading?null:t.$t("请输入代理商名称"),a=-1!=t.status||t.inloading?null:t.$t("用户姓名"),s=-1!=t.status||t.inloading?null:t.$t("请输入姓名"),o=-1!=t.status||t.inloading?null:t.$t("联系电话"),u=-1!=t.status||t.inloading?null:t.$t("请输入手机号"),l=-1!=t.status||t.inloading?null:t.$t("验证码"),r=-1!=t.status||t.inloading?null:t.$t("填写验证码"),c=-1!=t.status||t.inloading?null:t.$t("邀请码"),d=-1!=t.status||t.inloading?null:t.$t("请输入代理商邀请码"),h=-1!=t.status||t.inloading?null:t.$t("请上传营业执照及行业相关资质证明图片"),f=-1!=t.status||t.inloading?null:t.$t("图片最多可上传10张,图片格式支持JPG、PNG、JPEG"),m=-1!=t.status||t.inloading?null:t.images.length,g=-1==t.status&&!t.inloading&&m<10?t.$t("上传图片"):null,p=-1!=t.status||t.inloading?null:t.$t("已阅读并同意"),v=-1!=t.status||t.inloading?null:t.$t("代理商协议"),$=-1!=t.status||t.inloading?null:t.$t("提交申请"),y=-1==t.status&&!t.inloading&&t.showProtocol?t.$t("代理商入驻协议"):null,b=-1==t.status&&!t.inloading||0!=t.status?null:t.$t("恭喜,您的资料提交成功!"),_=-1==t.status&&!t.inloading||0!=t.status?null:t.$t("返回首页"),w=-1==t.status&&!t.inloading||0==t.status||1!=t.status?null:t.$t("恭喜,您的资料通过审核!"),T=-1==t.status&&!t.inloading||0==t.status||1!=t.status?null:t.$t("返回首页"),A=-1==t.status&&!t.inloading||0==t.status||1==t.status||2!=t.status?null:t.$t("您的申请未通过!"),x=-1==t.status&&!t.inloading||0==t.status||1==t.status||2!=t.status?null:t.$t("重新申请"),D=-1==t.status&&!t.inloading||0==t.status||1==t.status||2!=t.status?null:t.$t("返回首页");t._isMounted||(t.e0=function(i){t.showProtocol=!1}),t.$mp.data=Object.assign({},{$root:{m0:e,m1:n,m2:a,m3:s,m4:o,m5:u,m6:l,m7:r,m8:c,m9:d,m10:h,m11:f,g0:m,m12:g,m13:p,m14:v,m15:$,m16:y,m17:b,m18:_,m19:w,m20:T,m21:A,m22:x,m23:D}})},s=[]},f568:function(t,i,e){"use strict";(function(t){var n=e("4ea4");Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a=n(e("2eee")),s=n(e("c973")),o=n(e("9523")),u=(e("86eb"),e("2a39")),l=e("d1ea"),r=e("26cb"),c=n(e("19b6")),d=n(e("dc9d")),h=getApp(),f={components:{Verify:function(){e.e("pages/annex/components/verify/verify").then(function(){return resolve(e("f628"))}.bind(null,e)).catch(e.oe)},"jyf-parser":function(){Promise.all([e.e("common/vendor"),e.e("components/jyf-parser/jyf-parser")]).then(function(){return resolve(e("47fd"))}.bind(null,e)).catch(e.oe)},authorize:function(){e.e("components/Authorize").then(function(){return resolve(e("ad23"))}.bind(null,e)).catch(e.oe)}},mixins:[d.default,c.default],data:function(){var t;return t={inloading:!0,status:-1,isAuto:!1,isShowAuth:!1,text:this.$t("获取验证码"),codeUrl:"",disabled:!1,isAgree:!1,showProtocol:!1,isShowCode:!1,loading:!1,merchantData:{agent_name:"",name:"",phone:"",classification:"",division_invite:""},validate:!1,successful:!1,keyCode:"",codeVal:"",protocol:h.globalData.sys_intention_agree,timer:"",index:0,index1:0,mer_classification:"",mer_storeType:"",images:[],tagStyle:{img:"width:100%;display:block;",table:"width:100%",video:"width:100%"},mer_i_id:null,isType:!1,id:0,refusal_reason:""},(0,o.default)(t,"keyCode",""),(0,o.default)(t,"type",""),t},beforeDestroy:function(){clearTimeout(this.timer)},computed:(0,r.mapGetters)(["isLogin"]),onLoad:function(i){this.isLogin?this.$nextTick((function(){this.getGoodsDetails()})):(this.isAuto=!0,this.$set(this,"isShowAuth",!0)),i.id&&(this.id=id,t.showLoading({title:this.$t("正在加载中")}))},onShow:function(){},methods:{getAgentAgreement:function(){var t=this;(0,u.getAgentAgreement)().then((function(i){t.isType=!1,t.showProtocol=!0,t.protocol=i.data.content}))},code:function(){return this.merchantData.phone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.merchantData.phone)?void this.$refs.verify.show():this.$util.Tips({title:this.$t("请输入正确的手机号码")}):this.$util.Tips({title:this.$t("请填写手机号码")})},successVerify:function(t){var i=this;this.$refs.verify.hide(),(0,u.getCodeApi)().then((function(e){i.keyCode=e.data.key,i.getCode(t)})).catch((function(t){i.$util.Tips({title:t})}))},getCode:function(t){var i=this;return(0,s.default)(a.default.mark((function e(){var n;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=i,e.next=3,(0,u.registerVerify)({phone:n.merchantData.phone,type:n.type,key:n.keyCode,captchaType:i.captchaType,captchaVerification:t.captchaVerification}).then((function(t){i.sendCode(),n.$util.Tips({title:t.msg})})).catch((function(t){n.$util.Tips({title:t})}));case 3:case"end":return e.stop()}}),e)})))()},getGoodsDetails:function(){var i=this;(0,u.getGoodsDetails)().then((function(e){i.status=e.data.status;var n=e.data;if(-1!==e.data.status){var a=Object.keys(i.merchantData);a.map((function(t){i.merchantData[t]=n[t]})),t.hideLoading()}2===i.status&&(i.refusal_reason=n.refusal_reason),i.inloading=!1}))},getCategoryName:function(t,i){for(var e=0;e<i.length;e++)if(i[e].merchant_category_id===t)return i[e]["category_name"]},getPhotoClickIdx:function(t){var i=t.currentTarget.dataset.index;this.imgPreview(this.images,i)},imgPreview:function(i,e){i&&i.length>0&&t.previewImage({current:i[e],urls:i})},onLoadFun:function(){this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},toggleTab:function(t){this.$refs[t].show()},goHome:function(){t.switchTab({url:"/pages/index/index"})},applyAgain:function(){this.status=-1},uploadpic:function(){var t=this,i=this;i.$util.uploadImageOne("upload/image",(function(e){t.images.push(e.data.url),i.$set(i,"images",i.images)}))},DelPic:function(t){this.images[t];this.images.splice(t,1),this.$set(this,"images",this.images)},getcaptcha:function(){var t=this;(0,l.getCaptcha)().then((function(i){t.codeUrl=i.data.captcha,t.codeVal=i.data.code,t.codeKey=i.data.key})),t.isShowCode=!0},sendCode:function(){var t=this;if(!this.disabled){this.disabled=!0;var i=60;this.text=i+"s";var e=setInterval((function(){i-=1,i<0&&clearInterval(e),t.text=i+"s",t.text<"0s"&&(t.disabled=!1,t.text=t.$t("重新获取"))}),1e3)}},onConfirm:function(t){this.region=t.checkArr[0]+"-"+t.checkArr[1]+"-"+t.checkArr[2]},ChangeIsAgree:function(t){this.isAgree=!this.isAgree,this.validateBtn()},formSubmit:function(t){var i=this,e=this;if(e.validateForm()&&e.validate){var n={uid:this.$store.state.app.uid,phone:e.merchantData.phone,agent_name:e.merchantData.agent_name,name:e.merchantData.name,code:e.merchantData.code,division_invite:e.merchantData.division_invite,images:e.images,id:this.id};(0,u.create)(n).then((function(t){200==t.status&&(i.timer=setTimeout((function(){e.getGoodsDetails()}),1e3))})).catch((function(t){e.$util.Tips({title:t})}))}},validateBtn:function(){var t=this.merchantData;t.agent_name&&t.name&&t.phone&&/^1(3|4|5|7|8|9|6)\d{9}$/i.test(t.phone)&&t.code&&this.isAgree&&t.classification&&(this.isShowCode?this.codeVal?this.validate=!0:this.validate=!1:this.validate=!0)},validateForm:function(){var t=this.merchantData;return t.agent_name?t.name?t.phone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(t.phone)?t.code?this.isShowCode&&!this.codeVal?this.$util.Tips({title:this.$t("请填写图片验证码")}):this.images.length?this.isAgree?(this.validate=!0,!0):this.$util.Tips({title:this.$t("请勾选并同意入驻协议")}):this.$util.Tips({title:this.$t("请上传营业执照")}):this.$util.Tips({title:this.$t("填写验证码")}):this.$util.Tips({title:this.$t("请输入正确的手机号码")}):this.$util.Tips({title:this.$t("请输入手机号")}):this.$util.Tips({title:this.$t("请输入姓名")}):this.$util.Tips({title:this.$t("请输入代理商名称")})},jumpToList:function(){t.navigateTo({url:"/pages/store/applicationRecord/index"})}}};i.default=f}).call(this,e("543d")["default"])}},[["a2f9","common/runtime","common/vendor"]]]);