11 lines
4.5 KiB
JavaScript
11 lines
4.5 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/component/modal/region"],{"14ec":function(t,e,i){"use strict";i.r(e);var n=i("ca15"),c=i("86e5");for(var o in c)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return c[t]}))}(o);i("2216");var s=i("828b"),r=Object(s["a"])(c["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=r.exports},2216:function(t,e,i){"use strict";var n=i("4abd"),c=i.n(n);c.a},3519:function(t,e,i){"use strict";(function(t){var n=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=n(i("7ca3")),o=i("8f59");function s(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var r={name:"modalRegion",data:function(){return{provinceList:[],cityList:[],areaList:[],selectProvince:"",selectCity:"",selectArea:""}},computed:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach((function(e){(0,c.default)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},(0,o.mapState)({themeColor:function(t){return t.app.themeColor}})),methods:{open:function(t){this.provinceList=[],this.cityList=[],this.areaList=[],this.selectProvince=t.province||"",this.selectCity=t.city||"",this.selectArea=t.area||"",this.getProvinceList(),this.$refs.popupModal.open()},getProvinceList:function(){var e=this;this.$util.request("main.address.province").then((function(i){if(1==i.code){for(var n in e.provinceList=i.data.data,e.provinceList)if(e.provinceList[n].name==e.selectProvince){e.getCityList(e.provinceList[n].id);break}}else t.showToast({title:i.msg,icon:"none"})})).catch((function(t){console.error("获取省份数据 ",t)}))},getCityList:function(e){var i=this;this.$util.request("main.address.city",{crea_id:e}).then((function(e){if(1==e.code){for(var n in i.cityList=e.data.data,i.cityList)if(i.cityList[n].name==i.selectCity){i.getAreaList(i.cityList[n].id);break}}else t.showToast({title:e.msg,icon:"none"})})).catch((function(t){console.error("获取城市数据 ",t)}))},getAreaList:function(e){var i=this;this.$util.request("main.address.area",{crea_id:e}).then((function(e){1==e.code?i.areaList=e.data.data:t.showToast({title:e.msg,icon:"none"})})).catch((function(t){console.error("获取区县数据 ",t)}))},onClose:function(){this.$refs.popupModal.close()},onReset:function(){this.cityList=[],this.areaList=[],this.selectProvince="",this.selectCity="",this.selectArea="",this.$emit("callback",{province:"",city:"",area:""}),this.onClose()},changeProvince:function(t,e){this.selectProvince=e,this.getCityList(t)},changeCity:function(t,e){this.selectCity=e,this.getAreaList(t)},changeArea:function(t){this.selectArea=t},onConfirm:function(){this.selectProvince&&this.selectCity?this.$emit("callback",{province:this.selectProvince,city:this.selectCity,area:this.selectArea}):this.$emit("callback",{}),this.onClose()},onChange:function(t){this.$emit("onChange",t.show)}}};e.default=r}).call(this,i("df3c")["default"])},"4abd":function(t,e,i){},"86e5":function(t,e,i){"use strict";i.r(e);var n=i("3519"),c=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=c.a},ca15:function(t,e,i){"use strict";i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={uniPopup:function(){return i.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(i.bind(null,"f295"))}},c=function(){var t=this,e=t.$createElement,i=(t._self._c,t.provinceList.length&&!t.selectProvince),n=t.cityList.length&&!t.selectCity,c=t.areaList.length,o=!t.provinceList.length&&!t.cityList.length&&!t.areaList.length;t._isMounted||(t.e0=function(e){t.selectProvince="",t.selectCity="",t.selectArea=""},t.e1=function(e){t.selectCity="",t.selectArea=""}),t.$mp.data=Object.assign({},{$root:{g0:i,g1:n,g2:c,g3:o}})},o=[]}}]);
|
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
|
'pages/component/modal/region-create-component',
|
|
{
|
|
'pages/component/modal/region-create-component':(function(module, exports, __webpack_require__){
|
|
__webpack_require__('df3c')['createComponent'](__webpack_require__("14ec"))
|
|
})
|
|
},
|
|
[['pages/component/modal/region-create-component']]
|
|
]);
|