join2.js 6.6 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/agent/activity/join2"],{"5e54":function(e,t,n){"use strict";n.r(t);var i=n("99ef"),r=n("e729");for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("6484");var u=n("f0c5"),a=Object(u["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);t["default"]=a.exports},6484:function(e,t,n){"use strict";var i=n("9cea"),r=n.n(i);r.a},"84f4":function(e,t,n){"use strict";(function(e,t){var i=n("4ea4");n("2ab2");i(n("66fd"));var r=i(n("5e54"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"99ef":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var i={uForm:function(){return n.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(n.bind(null,"e893"))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,"a81d"))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(n.bind(null,"830c"))},uGap:function(){return n.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(n.bind(null,"9db7"))},uButton:function(){return n.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(n.bind(null,"51b1b"))},uSelect:function(){return n.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(n.bind(null,"17bf"))}},r=function(){var e=this.$createElement;this._self._c},o=[]},"9cea":function(e,t,n){},a06b:function(e,t,n){"use strict";(function(e,i){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n("448a")),u=r(n("9523"));n("66f6");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var s={data:function(){var t=e.getStorageSync("MD_userInfo2");return{curId:"",curObj:{},isareaShow:!1,areaList:[],form:{info1:null,info2:t.nickname,info3:t.phone,info4:null,info5:null},eIds:[],eArr:[],phoneBefore3:"",phoneAfter4:"",customer_id:null,submitButtonDisabled:!0,rules:{info1:[{required:!0,message:"公司/门店不得为空",trigger:["change","blur"]}],info2:[{required:!0,message:"名字不得为空",trigger:["change","blur"]}],info3:[{required:!0,message:"电话不得为空",trigger:["change","blur"]}],info5:[{required:!0,message:"办公区域不得为空",trigger:["change","blur"]}]},propertySelectShow:!1,propertySelectList:[],estateList:[],areaTypeObj:{},userInfo2:{},curEstateName:"",salerSelectShow:!1,salerSelectList:[],submitModalShow:!1,modalShow:!1,modalContent:""}},onLoad:function(t){var n=this,i=t.id;this.curId=i||"",e.api.cust.apiactivityinfo({id:this.curId}).then((function(e){n.curObj=e.activity||{}}));var r=e.getStorageSync("MD_dict")||{},o=r.area_type||[],u=[];o.forEach((function(e){"独家合作"!==e.dict_label&&"安义县"!==e.dict_label&&"宜春"!==e.dict_label&&u.push(e)})),this.areaList=[].concat(u)},onShareAppMessage:function(e){var t={title:"".concat(this.curObj.estate_name).concat(this.curObj.remark),path:"/pages/agent/activity/join2?id=".concat(this.curId),success:function(e){},complete:function(e){console.log(e)}};return t},onShareTimeline:function(e){var t={title:"".concat(this.curObj.estate_name).concat(this.curObj.remark),path:"/pages/agent/activity/join2?id=".concat(this.curId),success:function(e){},complete:function(e){console.log(e)}};return t},created:function(){},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{codePreview:function(){var t=this.curObj.image;t&&e.previewImage({current:t,urls:[t]})},areaOpen:function(){this.isareaShow=!0},areaClose:function(e){this.isareaShow=!1,e&&(this.form.info5=e[0].label)},phoneHandle:function(){var e=this.form.phone;e=e.replace(/ /g,""),this.form.phone=e,this.form=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.form)},getEstateList:function(){var t=this;e.api.estate.apiestatelist({page_size:100,report_open:1,is_pub:1,estate_name:this.curEstateName}).then((function(e){var n=e.list||[];t.estateList=(0,o.default)(n)}))},listItemHandle:function(e){var t=(0,o.default)(this.eIds),n=(0,o.default)(this.eArr),i=t.indexOf(e.estate_id);i>-1?(t.splice(i,1),n.splice(i,1)):(t.push(e.estate_id),n.push(e)),this.eIds=(0,o.default)(t),this.eArr=(0,o.default)(n)},clearListHandle:function(){this.propertySelectShow=!1,this.eIds=[],this.eArr=[],this.form.estate_name=""},saveListHandle:function(){var t="",n=this.eArr.map((function(e){return"2"==e.phone_type&&(t=e.estate_name),e.estate_name}));this.form.estate_name=n.join(","),1===this.eArr.length&&"2"==this.eArr[0].phone_type?this.form.phone_type="2":this.form.phone_type="1",t&&this.eArr.length>1?e.$msg("".concat(t,"是前三后四报备项目,请单独报备")):this.propertySelectShow=!1},submitHandle:function(){var t=this;this.$refs.uForm.validate((function(n){if(n){var i={activity_id:t.curId,info1:t.form.info1,info2:t.form.info2,info3:t.form.info3,info5:t.form.info5};e.api.cust.apiactivityenroll(i).then((function(t){e.$msgConfirm("报名成功",(function(){e.redirectTo({url:"/pages/index/index"})}),(function(){e.redirectTo({url:"/pages/index/index"})}))}))}else console.log("验证失败")}))},getPhoneNumber:function(e){var t=this;if("getPhoneNumber:fail user deny"==e.detail.errMsg)return t.$refs.uToast.show({title:"您可以在个人设置中再次绑定",type:"warning"}),void setTimeout((function(){t.reLunchUser()}),1500);console.log(e.detail.errMsg),console.log(e.detail.iv),console.log(e.detail.encryptedData);var n=e.detail.iv,r=e.detail.encryptedData;i.login({success:function(e){e.code?t.setUserPhoneNumber(r,n,e.code):(this.$refs.uToast.show({title:e.errMsg,type:"warning"}),console.log("登录失败!"+e.errMsg))}})},hideKeyboard:function(){e.hideKeyboard()},getFormatDate:function(e){if(void 0==e||""==e)return"";var t=e;return parseInt(e)<10&&(t="0"+e),t}}};t.default=s}).call(this,n("543d")["default"],n("bc2e")["default"])},e729:function(e,t,n){"use strict";n.r(t);var i=n("a06b"),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a}},[["84f4","common/runtime","common/vendor"]]]);