chunk-10219dd3.d3817da5.js 4.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-10219dd3"],{"14d9":function(t,e,r){"use strict";var n=r("23e7"),o=r("7b0b"),i=r("07fa"),a=r("3a34"),s=r("3511"),u=r("d039"),c=u((function(){return 4294967297!==[].push.call({length:4294967296},1)})),h=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},d=c||!h();n({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=o(this),r=i(e),n=arguments.length;s(r+n);for(var u=0;u<n;u++)e[r]=arguments[u],r++;return a(e,r),r}})},3511:function(t,e,r){"use strict";var n=TypeError,o=9007199254740991;t.exports=function(t){if(t>o)throw n("Maximum allowed index exceeded");return t}},"3a34":function(t,e,r){"use strict";var n=r("83ab"),o=r("e8b5"),i=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"42d5":function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r("1836"),o=r("2687");function i(t){return Object(n["a"])({url:o["a"].customer+"regions",method:"get",params:t})}},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),a=i("filter");n({target:"Array",proto:!0,forced:!a},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"89c7":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t._self._c;return e("div",[e("van-nav-bar",{staticClass:"shadow",attrs:{title:"我的房屋","left-text":"返回","left-arrow":""},on:{"click-left":function(e){return t.$router.back(-1)}}}),e("van-form",{staticClass:"w-11/12 mx-auto mt-4",on:{submit:t.onSubmit}},[e("div",{staticClass:"bg-white shadow"},[e("van-field",{attrs:{label:"小区地址",placeholder:"填写小区地址",rules:[{required:!0}]},model:{value:t.houseForm.address,callback:function(e){t.$set(t.houseForm,"address",e)},expression:"houseForm.address"}}),e("van-field",{attrs:{name:"手机",label:"手机",type:"tel",placeholder:"填写联系人手机",rules:[{required:!0}]},model:{value:t.houseForm.link_phone,callback:function(e){t.$set(t.houseForm,"link_phone",e)},expression:"houseForm.link_phone"}}),e("van-field",{attrs:{name:"姓名",label:"姓名",placeholder:"填写联系人姓名",rules:[{required:!0}]},model:{value:t.houseForm.link_name,callback:function(e){t.$set(t.houseForm,"link_name",e)},expression:"houseForm.link_name"}})],1),e("div",{staticClass:"mt-8"},[e("van-button",{attrs:{loading:t.submitLoading,block:"",type:"info","loading-text":"加载中...","native-type":"submit"}},[t._v(t._s(t.btnText))])],1)])],1)},o=[],i=(r("4de4"),r("a15b"),r("d81d"),r("14d9"),r("d3b7"),r("42d5")),a={data:function(){return{areaValue:"",defaultArea:"",areaLoading:!1,showArea:!1,houseForm:{id:0},areaList:{},submitLoading:!1,btnText:""}},created:function(){this.loadRegionList();var t=this.$route.params&&this.$route.params.id;t?(this.houseForm=this.$store.getters.house,this.btnText="编辑房屋"):this.btnText="绑定房屋"},methods:{onSubmit:function(){var t=this;this.submitLoading=!0,this.houseForm.id>0?this.$store.dispatch("user/updateHouse",this.houseForm).then((function(){t.$toast.success({message:"修改成功",duration:1e3,onClose:function(){t.$router.push({path:"/"})}})})).catch((function(){t.submitLoading=!1})):this.$store.dispatch("user/addHouse",this.houseForm).then((function(){t.$toast.success({message:"绑定成功",duration:1e3,onClose:function(){t.$router.push({path:"/"})}})})).catch((function(){t.submitLoading=!1}))},handleShowArea:function(){this.showArea=!0},confirmArea:function(t){this.areaValue=t.filter((function(t){return!!t})).map((function(t){return t.name})).join("/"),this.showArea=!1,this.houseForm.province=t[0].code,this.houseForm.city=t[1].code,this.houseForm.region=t[2].code,console.log(this.houseForm)},loadRegionList:function(){var t=this;this.areaLoading=!0,Object(i["a"])({level:1}).then((function(e){t.areaLoading=!1,t.areaList=e.data}))}}},s=a,u=r("2877"),c=Object(u["a"])(s,n,o,!1,null,null,null);e["default"]=c.exports},a15b:function(t,e,r){"use strict";var n=r("23e7"),o=r("e330"),i=r("44ad"),a=r("fc6a"),s=r("a640"),u=o([].join),c=i!==Object,h=c||!s("join",",");n({target:"Array",proto:!0,forced:h},{join:function(t){return u(a(this),void 0===t?",":t)}})},d81d:function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").map,i=r("1dde"),a=i("map");n({target:"Array",proto:!0,forced:!a},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})}}]);