公司小程序
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.

2 lines
7.4 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/CooperationApply/CooperationApply"],{230:function(e,n,o){"use strict";(function(e){o(3);t(o(2));var n=t(o(231));function t(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=o,e(n.default)}).call(this,o(0)["createPage"])},231:function(e,n,o){"use strict";o.r(n);var t=o(61),r=o(31);for(var a in r)"default"!==a&&function(e){o.d(n,e,(function(){return r[e]}))}(a);o(232);var i,u=o(1),s=Object(u["a"])(r["default"],t["b"],t["c"],!1,null,"683ba9e6",null,!1,t["a"],i);s.options.__file="pages/CooperationApply/CooperationApply.vue",n["default"]=s.exports},232:function(e,n,o){"use strict";var t=o(33),r=o.n(t);r.a},31:function(e,n,o){"use strict";o.r(n);var t=o(32),r=o.n(t);for(var a in t)"default"!==a&&function(e){o.d(n,e,(function(){return t[e]}))}(a);n["default"]=r.a},32:function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=a(o(5)),r=o(4);function a(e){return e&&e.__esModule?e:{default:e}}function i(e,n,o,t,r,a,i){try{var u=e[a](i),s=u.value}catch(c){return void o(c)}u.done?n(s):Promise.resolve(s).then(t,r)}function u(e){return function(){var n=this,o=arguments;return new Promise((function(t,r){var a=e.apply(n,o);function u(e){i(a,t,r,u,s,"next",e)}function s(e){i(a,t,r,u,s,"throw",e)}u(void 0)}))}}var s=function(){o.e("components/UploadSuccess/UploadSuccess").then(function(){return resolve(o(280))}.bind(null,o)).catch(o.oe)},c=getApp().globalData.Player,l=getApp().globalData.Define,p={note:"",partnerinfo:{},partnerstatus:0,toppic:{}},d={components:{UploadSuccess:s},onLoad:function(){e.showLoading({});getApp().globalData.agreementData;this.$utils.getAgreementData();var n=this;(0,r.post)("pages/getbecpartner",{}).then((function(o){var t,r,a;e.hideLoading();var i=l.onNetMessage(o);if(i){n.pageData=i,console.log("合作申请页面信息:",i);var u=i.partnerinfo,s=n.person;s.name=null!==(t=u.name)&&void 0!==t?t:"",s.phone=null!==(r=u.phone)&&void 0!==r?r:"",s.referrer=null!==(a=u.recommender)&&void 0!==a?a:"";var c=u.province,p=u.city,d=u.area;c&&""!=c&&(n.defaultRegion=[c,p,d],s.address=c+" "+p+" "+d),i.partnerstatus>0&&(n.isAgree=!0,console.log("强制改变当前选中状态"))}}))},data:function(){var n=this;return{pageData:p,isAgree:!1,isShowUpload:!1,person:{name:"",phone:c.phone,address:"",referrer:""},rules:{"person.name":{type:"string",required:!0,message:"请输入您的姓名",validator:function(e){n.person.name=e.detail.value}},"person.phone":{type:"string",required:!0,message:"请输入您的联系电话",validator:function(o){var t=e.$u.test.mobile(o.detail.value);return t?n.person.phone=o.detail.value:e.$u.toast("请输入正确的电话号码!"),t}},"person.address":{type:"string",required:!1,message:"请选择您的地址"},"person.referrer":{type:"string",required:!1,message:"请输入推荐人电话号码",validator:function(o){var t=e.$u.test.mobile(o.detail.value);return t?n.person.referrer=o.detail.value:e.$u.toast("请输入正确的电话号码!"),t}}},defaultRegion:["四川省","成都市","武侯区"],region:[]}},methods:{onTouchBack:function(){e.navigateBack({})},onClickToSelectCity:function(){e.hideKeyboard()},handleGetRegion:function(e){this.region=e,this.person.address=this.regionName(),this.$refs.form1.validateField("person.address")},regionName:function(){return this.region.map((function(e){return e.name})).join(" ")},onChechBoxChange:function(e){console.log(e),this.isAgree=!this.isAgree},onClickAreement:function(){var n=getApp().globalData.agreementData;getApp().globalData.showingSkipData=n,e.navigateTo({url:"/pages/SkipView/SkipView"})},showToast:function(n){e.$u.toast(n)},onTouchConfirm:function(){var n=this;return u(t.default.mark((function o(){var a,i,u,s,c,l,p,d,f,m,g;return t.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(n.isAgree){o.next=3;break}return n.showToast("请阅读并同意协议条款"),o.abrupt("return");case 3:if(a=n.person.name,""!=a){o.next=7;break}return n.showToast("请输入您的名字"),o.abrupt("return");case 7:if(i=n.person.phone,""!=i){o.next=11;break}return n.showToast("请输入您的电话号码"),o.abrupt("return");case 11:return u={name:a,phone:i,status:0,provincecode:0,citycode:0,areacode:0,province:"",city:"",area:"",recommender:n.person.referrer},n.region.length>0&&(p=null!==(s=n.region[0].name)&&void 0!==s?s:"",d=null!==(c=n.region[1].name)&&void 0!==c?c:"",f=null!==(l=n.region[2].name)&&void 0!==l?l:"",u["province"]=p,u["city"]=d,u["area"]=f),console.log(u),e.showLoading(),o.next=17,(0,r.post)("pages/becpartner",u);case 17:if(m=o.sent,e.hideLoading(),g=getApp().globalData.Define.onNetMessage(m),g){o.next=22;break}return o.abrupt("return");case 22:console.log("申请结果:",g),getApp().globalData.mainPageData.partnerstatus=1,n.isShowUpload=!0;case 25:case"end":return o.stop()}}),o)})))()},getTitleText:function(){var e=this.pageData.partnerstatus,n="";return n=0==e?"尚未申请":1==e?"请等待审核":2==e?"您已是官方合作人员":"您的申请已被拒绝,请重新申请",n="个人信息 ("+n+")",n},onTouchToGetPhone:function(e){var n=this;return u(t.default.mark((function o(){var r;return t.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.$utils.wechatGetPlayerPhoneNumberBack(e);case 2:if(r=o.sent,r){o.next=5;break}return o.abrupt("return");case 5:n.person.phone=r;case 6:case"end":return o.stop()}}),o)})))()}}};n.default=d}).call(this,o(0)["default"])},33:function(e,n,o){},61:function(e,n,o){"use strict";var t;o.d(n,"b",(function(){return r})),o.d(n,"c",(function(){return a})),o.d(n,"a",(function(){return t}));try{t={uNavbar:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-navbar/u-navbar")]).then(o.bind(null,504))},uForm:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-form/u-form")]).then(o.bind(null,506))},uFormItem:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-form-item/u-form-item")]).then(o.bind(null,507))},uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,511))},pickRegions:function(){return Promise.all([o.e("common/vendor"),o.e("components/pick-regions/pick-regions")]).then(o.bind(null,277))},uParse:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-parse/u-parse")]).then(o.bind(null,514))},uPopup:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(o.bind(null,515))},UploadSuccess:function(){return o.e("components/UploadSuccess/UploadSuccess").then(o.bind(null,280))}}}catch(i){if(-1===i.message.indexOf("Cannot find module")||-1===i.message.indexOf(".vue"))throw i;console.error(i.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var e=this,n=e.$createElement,o=(e._self._c,e.getTitleText()),t=e.isAgree.toString();e._isMounted||(e.e0=e.rules["person.name"].validator,e.e1=e.rules["person.referrer"].validator),e.$mp.data=Object.assign({},{$root:{m0:o,g0:t}})},a=[];r._withStripped=!0}},[[230,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/CooperationApply/CooperationApply.js.map