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.3 KiB
1 lines
6.3 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-channel-apply"],{"25c8":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isLoad?n("v-uni-view",{staticClass:"apply-pages"},[n("v-uni-view",{staticClass:"apply-form"},[n("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[n("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[n("v-uni-view",{staticClass:"item-text"},[e._v("您的姓名")]),n("v-uni-input",{staticClass:"item-input flex-1",attrs:{type:"text",maxlength:"20",placeholder:e.rule[0].errorMsg},model:{value:e.form.user_name,callback:function(t){e.$set(e.form,"user_name",t)},expression:"form.user_name"}})],1),n("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[n("v-uni-view",{staticClass:"item-text"},[e._v("手机号码")]),n("v-uni-input",{staticClass:"item-input flex-1",attrs:{type:"text",placeholder:e.rule[1].errorMsg},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),n("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[n("v-uni-view",{staticClass:"item-text"},[e._v("申请渠道")]),n("v-uni-view",{staticClass:"item-input flex-1 text"},[n("v-uni-picker",{attrs:{value:e.channelInd,range:e.channelList,"range-key":"title"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange(t)}}},[n("v-uni-view",{staticClass:"flex-between",staticStyle:{color:"#A9A9A9"}},[e._v(e._s(-1!=e.channelInd&&e.channelList.length>0?e.channelList[e.channelInd].title:"请选择您能接入的渠道")),n("i",{staticClass:"iconfont icon-right ml-sm",staticStyle:{"font-size":"28rpx"}})])],1)],1)],1)],1),n("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[n("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[n("v-uni-view",{staticClass:"item-text"},[e._v("备注信息")]),n("v-uni-input",{staticClass:"item-input flex-1",attrs:{disabled:!0,type:"text"}})],1),n("v-uni-textarea",{staticClass:"item-textarea pd-lg",attrs:{maxlength:"300",placeholder:"输入备注信息"},model:{value:e.form.text,callback:function(t){e.$set(e.form,"text",t)},expression:"form.text"}}),n("v-uni-view",{staticClass:"text-right pb-lg pr-lg"},[e._v(e._s(e.form.text.length>300?300:e.form.text.length)+"/300")])],1)],1),n("v-uni-view",{staticClass:"space-max-footer"}),n("auth",{attrs:{needAuth:e.userInfo&&!e.userInfo.nickName,must:!0,type:"userInfo"},on:{go:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}},[n("fix-bottom-button",{attrs:{text:[{text:"确定申请",type:"confirm"}],bgColor:"#fff"}})],1)],1):e._e()},a=[]},5454:function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("d3b7"),n("3ca3"),n("ddb0"),n("d81d");var a=i(n("3835")),r=i(n("5530")),s=i(n("c7eb")),l=i(n("1da1")),u=n("26cb"),o={components:{},data:function(){return{channelInd:-1,channelList:[],isLoad:!1,options:{},form:{id:0,user_name:"",mobile:"",cate_id:"",text:""},rule:[{name:"user_name",checkType:"isNotNull",errorMsg:"请输入您的真实姓名",regType:2},{name:"mobile",checkType:"isMobile",errorMsg:"请输入常用手机号码"},{name:"cate_id",checkType:"isNotNull",errorMsg:"请选择您能接入的渠道"}],lockTap:!1}},computed:(0,u.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},subColor:function(e){return e.config.configInfo.subColor},userInfo:function(e){return e.user.userInfo},location:function(e){return e.user.location}}),onLoad:function(e){var t=this;return(0,l.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.$util.showLoading(),t.options=e,n.next=4,t.initIndex();case 4:t.isLoad=!0;case 5:case"end":return n.stop()}}),n)})))()},methods:(0,r.default)((0,r.default)((0,r.default)({},(0,u.mapActions)(["getUserInfo"])),(0,u.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var e=arguments,t=this;return(0,l.default)((0,s.default)().mark((function n(){var i,r,l,u,o,c;return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=e.length>0&&void 0!==e[0]&&e[0],i||!t.$jweixin.isWechat()){n.next=5;break}return n.next=4,t.$jweixin.initJssdk();case 4:t.$jweixin.wxReady((function(){t.$jweixin.hideOptionMenu()}));case 5:return n.next=7,Promise.all([t.$api.channel.channelCateSelect(),t.$api.channel.channelInfo()]);case 7:if(r=n.sent,l=(0,a.default)(r,2),u=l[0],o=l[1],t.$util.setNavigationBarColor({bg:t.primaryColor}),t.channelList=u,o.id){n.next=16;break}return t.$util.hideAll(),n.abrupt("return");case 16:for(c in t.form)t.form[c]=o[c];t.$util.hideAll();case 18:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},pickerChange:function(e,t){this.channelInd=e.target.value,this.form.cate_id=this.channelList[this.channelInd].id},validate:function(e){var t=new this.$util.Validate;this.rule.map((function(n){var i=n.name;t.add(e[i],n)}));var n=t.start();return n},submit:function(){var e=this;return(0,l.default)((0,s.default)().mark((function t(){var n,i;return(0,s.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.$util.deepCopy(e.form),i=e.validate(n),!i){t.next=5;break}return e.$util.showToast({title:i}),t.abrupt("return");case 5:if(!e.lockTap){t.next=7;break}return t.abrupt("return");case 7:return e.lockTap=!0,n.text=n.text.length>300?n.text.substring(0,300):n.text,e.$util.showLoading(),t.prev=10,t.next=13,e.$api.channel.applyChannel(n);case 13:e.$util.hideAll(),e.$util.showToast({title:"提交成功"}),setTimeout((function(){e.$util.back(),e.$util.goUrl({url:"/user/pages/apply-result?type=3",openType:"redirectTo"})}),1e3),t.next=21;break;case 18:t.prev=18,t.t0=t["catch"](10),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 21:case"end":return t.stop()}}),t,null,[[10,18]])})))()}})};t.default=o},"930a":function(e,t,n){"use strict";n.r(t);var i=n("25c8"),a=n("a70b");for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);var s=n("f0c5"),l=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"267e03a8",null,!1,i["a"],void 0);t["default"]=l.exports},a70b:function(e,t,n){"use strict";n.r(t);var i=n("5454"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a}}]); |