徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
6.0 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/supplier/index"],{"0baa":function(t,e,n){"use strict";var i=n("adf1"),r=n.n(i);r.a},"1d5b":function(t,e,n){"use strict";n.r(e);var i=n("1f99"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},"1f99":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("7eb4")),a=i(n("ee10")),s=i(n("7ca3")),o=(n("7ba4"),n("8f59")),c=n("77d7"),u=i(n("cef6")),f=i(n("6ec3")),l=n("bad7");function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){(0,s.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=t.getSystemInfoSync().statusBarHeight,m={data:function(){return{sysHeight:d,form:{system_name:"",name:"",phone:"",captcha:"",images:[]},canvasWidth:"",canvasHeight:"",canvasStatus:!1,isSelect:!1,keyCode:"",id:0,showModal:!1,supplierAgreement:"",tagStyle:{img:"width:100%;display:block;"}}},components:{Verify:function(){n.e("pages/users/components/verify/verify").then(function(){return resolve(n("a4ec"))}.bind(null,n)).catch(n.oe)},tuiModal:function(){n.e("components/tui-modal/index").then(function(){return resolve(n("ac66"))}.bind(null,n)).catch(n.oe)},parser:function(){Promise.all([n.e("common/vendor"),n.e("components/jyf-parser/jyf-parser")]).then(function(){return resolve(n("a04c"))}.bind(null,n)).catch(n.oe)}},mixins:[f.default,u.default],watch:{isLogin:{handler:function(t,e){},deep:!0}},computed:p(p({},(0,o.mapGetters)(["isLogin"])),{},{isSelectStar:function(){if(this.form.system_name&&this.form.name&&this.form.phone&&this.form.captcha&&this.form.images.length)return!0},headerBg:function(){return{backgroundImage:"url("+l.HTTP_REQUEST_URL+"/statics/images/supplier/apply_header.png)"}},mainHeight:function(){var e=t.getSystemInfoSync(),n=e.windowHeight;return n-90-this.sysHeight}}),onLoad:function(t){this.id=t.id||0,t.id&&this.getInfo()},methods:{DelPic:function(t){this.form.images[t];this.form.images.splice(t,1),this.$set(this.form,"images",this.form.images)},uploadpic:function(){var t=this,e=this;this.canvasStatus=!0,e.$util.uploadImageChange({count:8,url:"upload/image"},(function(t){e.form.images.push(t.data.url)}),(function(e){t.canvasStatus=!1}),(function(e){t.canvasWidth=e.w,t.canvasHeight=e.h}))},code:function(){return this.form.phone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.form.phone)?void this.$refs.verify.show():this.$util.Tips({title:"请输入正确的手机号码"}):that.$util.Tips({title:"请填写手机号码"})},success:function(t){var e=this;this.$refs.verify.hide(),(0,c.getCodeApi)().then((function(n){e.keyCode=n.data.key,e.getCode(t)})).catch((function(t){e.$util.Tips({title:t})}))},getCode:function(t){var e=this;return(0,a.default)(r.default.mark((function n(){var i;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=e,e.form.phone){n.next=3;break}return n.abrupt("return",i.$util.Tips({title:"请填写手机号码"}));case 3:if(/^1(3|4|5|7|8|9|6)\d{9}$/i.test(e.form.phone)){n.next=5;break}return n.abrupt("return",e.$util.Tips({title:"请输入正确的手机号码"}));case 5:return n.next=7,(0,c.registerVerify)({phone:i.form.phone,type:"supplier",key:i.keyCode,captchaType:"blockPuzzle",captchaVerification:t.captchaVerification}).then((function(t){i.$util.Tips({title:t.msg}),i.sendCode()})).catch((function(t){i.$util.Tips({title:t})}));case 7:case"end":return n.stop()}}),n)})))()},proviceSelect:function(){this.isSelect=!this.isSelect},getInfo:function(){var t=this;(0,c.userApply)(this.id).then((function(e){var n=e.data;t.form.system_name=n.system_name,t.form.name=n.name,t.form.phone=n.phone,t.form.images=n.images})).catch((function(e){return t.$util.Tips({title:e})}))},submitSupply:function(){var e=this;return this.isSelectStar?this.isSelect?void(0,c.spplyCreateApi)(this.id,this.form).then((function(e){t.showToast({title:e.msg}),t.navigateTo({url:"/pages/users/supplier/state?id="+e.data.id})})).catch((function(t){return e.$util.Tips({title:t})})):this.$util.Tips({title:"请阅读并同意协议"}):this.$util.Tips({title:"请完整填写表单信息"})},pageBack:function(){t.navigateBack()},goRecord:function(){t.navigateTo({url:"/pages/users/supplier/record"})},getAgreement:function(){var t=this;(0,c.getUserAgreement)("supplier").then((function(e){t.supplierAgreement=e.data.content,t.showModal=!0})).catch((function(t){that.$util.Tips({title:t.msg})}))},hideModal:function(){this.showModal=!1}}};e.default=m}).call(this,n("df3c")["default"])},"25d8":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("7561");i(n("3240"));var r=i(n("8469"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"6df5":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var i={jyfParser:function(){return Promise.all([n.e("common/vendor"),n.e("components/jyf-parser/jyf-parser")]).then(n.bind(null,"a04c"))}},r=function(){var t=this.$createElement,e=(this._self._c,this.__get_style([this.headerBg])),n=this.form.images.length;this.$mp.data=Object.assign({},{$root:{s0:e,g0:n}})},a=[]},8469:function(t,e,n){"use strict";n.r(e);var i=n("6df5"),r=n("1d5b");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("0baa");var s=n("828b"),o=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=o.exports},adf1:function(t,e,n){}},[["25d8","common/runtime","common/vendor","pages/users/common/vendor"]]]);