1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/agent/recommend/create"],{"045c":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("d0e4");function r(e){return s(e)||a(e)||i(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function a(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function s(e){if(Array.isArray(e))return l(e)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var c={data:function(){return{form:{name:null,phone:null,sex:"male",remark:null,estate_id:2,estate_name:"江投.朝阳春天",saler_id:null,saler_name:null},customer_id:null,submitButtonDisabled:!0,rules:{name:[{required:!0,message:"姓名不得为空",trigger:["change","blur"]}],phone:[{required:!0,message:"手机号不得为空",trigger:["change","blur"]},{len:11,message:"手机号格式不正确",trigger:["change","blur"]}],estate_name:[{required:!0,message:"意向项目不能为空",trigger:["change"]}]},propertySelectShow:!1,propertySelectList:[],estateList:[],areaTypeObj:{},userInfo2:{},curEstateName:"",salerSelectShow:!1,salerSelectList:[],submitModalShow:!1,modalShow:!1,modalContent:""}},onLoad:function(e){var t=this,n=t.getOpenerEventChannel();n.on&&n.on("data",(function(e){e.info.name&&(t.form.name=e.info.name),e.info.phone&&(t.form.phone=e.info.phone),e.info.sex&&(t.form.sex=e.info.sex),e.info.demand&&(t.form.remark=e.info.demand),e.info.estate_id&&(t.form.estate_id=e.info.estate_id),e.info.estate_name&&(t.form.estate_name=e.info.estate_name)}))},created:function(){var t=this;this.userInfo2=e.getStorageSync("MD_userInfo2");var n=e.getStorageSync("MD_dict");this.areaTypeObj=(0,o.arrToObj)(n.area_type),e.api.estate.apiestatelist({page_size:100,report_open:1}).then((function(e){var n=e.list||[],o=[];t.estateList=r(n),n.forEach((function(e){o.push({value:e.estate_id,label:e.estate_name})})),t.propertySelectList=[].concat(o)}))},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{getEstateList:function(){var t=this;e.api.estate.apiestatelist({page_size:100,report_open:1,estate_name:this.curEstateName}).then((function(e){var n=e.list||[];t.estateList=r(n)}))},listItemHandle:function(e){this.form.estate_id=e.estate_id,this.form.estate_name=e.estate_name},propertySelectConfirm:function(e){var t=this;e.map((function(e,n){t.form.estate_id=e.value,t.form.estate_name=e.label}))},submitHandle:function(){var t=this,n=this;this.$refs.uForm.validate((function(o){o?e.api.estate.apireportadd({phone_type:1,name:n.form.name,phone:n.form.phone,sex:n.form.sex,remark:n.form.remark,estate_id:n.form.estate_id,estate_name:n.form.estate_name}).then((function(n){e.$msgConfirm("报备成功,是否前往报备列表?",(function(){e.navigateTo({url:"/pages/agent/recommend/list"})}),(function(){t.form={name:null,phone:null,sex:"male",remark:null,estate_id:null,estate_name:null}}))})):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,o=e.detail.encryptedData;wx.login({success:function(e){e.code?t.setUserPhoneNumber(o,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=c}).call(this,n("543d")["default"])},"56d2":function(e,t,n){"use strict";n.r(t);var o=n("045c"),r=n.n(o);for(var u in o)"default"!==u&&function(e){n.d(t,e,(function(){return o[e]}))}(u);t["default"]=r.a},"768e":function(e,t,n){"use strict";var o=n("9e53"),r=n.n(o);r.a},"9e53":function(e,t,n){},a143:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return o}));var o={uForm:function(){return n.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(n.bind(null,"ce96"))},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,"23cb"))},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,"6943"))},uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/vk-uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,"9183"))},uRadio:function(){return n.e("uni_modules/vk-uview-ui/components/u-radio/u-radio").then(n.bind(null,"0505"))},uGap:function(){return n.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(n.bind(null,"dc7f"))},uButton:function(){return n.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(n.bind(null,"ce9e"))},uSelect:function(){return n.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(n.bind(null,"2de4"))},uModal:function(){return n.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(n.bind(null,"f813"))},uToast:function(){return n.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(n.bind(null,"934c"))},uPopup:function(){return n.e("uni_modules/vk-uview-ui/components/u-popup/u-popup").then(n.bind(null,"c565"))},uTag:function(){return n.e("uni_modules/vk-uview-ui/components/u-tag/u-tag").then(n.bind(null,"8002"))}},r=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.propertySelectShow=!0},e.e1=function(t){e.propertySelectShow=!1},e.e2=function(t){e.propertySelectShow=!1})},u=[]},f4fd:function(e,t,n){"use strict";(function(e){n("3690");o(n("66fd"));var t=o(n("f8da"));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},f8da:function(e,t,n){"use strict";n.r(t);var o=n("a143"),r=n("56d2");for(var u in r)"default"!==u&&function(e){n.d(t,e,(function(){return r[e]}))}(u);n("768e");var i,a=n("f0c5"),s=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],i);t["default"]=s.exports}},[["f4fd","common/runtime","common/vendor"]]]);
|