| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/shop/add"],{"41df":function(e,n,t){"use strict";(function(e){t("6cdc");o(t("b5e3"));var n=o(t("d044"));function o(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("934e")["createPage"])},4340:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t("7736"),i=t("8dd4");function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){c(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var s=function(){t.e("components/plugin/list-cell").then(function(){return resolve(t("1861"))}.bind(null,t)).catch(t.oe)},u=function(){Promise.all([t.e("common/vendor"),t.e("components/module/app-avatar")]).then(function(){return resolve(t("d84d"))}.bind(null,t)).catch(t.oe)},l=function(){Promise.all([t.e("common/vendor"),t.e("components/app-uploader")]).then(function(){return resolve(t("f4e1"))}.bind(null,t)).catch(t.oe)},f=function(){Promise.all([t.e("common/vendor"),t.e("components/plugin/simple-address")]).then(function(){return resolve(t("618a"))}.bind(null,t)).catch(t.oe)},d=function(){t.e("components/app-area-sel").then(function(){return resolve(t("62ec"))}.bind(null,t)).catch(t.oe)},m=t("90f4"),p={name:"staff-add",components:{TuiListCell:s,AppAvatarModule:u,SimpleAddress:f,AppAreaSel:d,AppUploader:l},data:function(){return{form:{shopName:"",province:"",city:"",address:"",floor:"",openTime:"8:00 - 22:00",introduction:"",mobile:"",img:[]},showRegion:!1,region:{lat:0,long:0},regionData:[],cityPickerValueDefault:[0,0],img:[]}},onLoad:function(){},onShow:function(){this.option.id?e.setNavigationBarTitle({title:"修改门店"}):e.setNavigationBarTitle({title:"添加门店"})},methods:a(a({},(0,o.mapActions)(["setUserShopAll"])),{},{init:function(){this._getDet()},_getDet:function(){var n=this,t=e.getStorageSync("modifyShopB");this.$util.isEmpty(t)||(Object.keys(this.form).forEach((function(e,o){n.form[e]=t[e]})),this.region.lat=t.lat,this.region.long=t.long)},selRegionFn:function(){if(!this.form.city)return this.$msg("请先选择城市!"),!1;this.showRegion=!0},_resultData:function(e){console.log(e),this.form.img=e},changeAreaFn:function(e){console.log("changeAreaFn",e),this.form.address=e.title,this.region.lat=e.location.lat,this.region.long=e.location.lng},openAddres:function(){this.$refs.simpleAddress.open()},onCityConfirm:function(e){this.form.province=e.provinceName,this.form.city=e.cityName,this.form.address="",this.region.lat=0,this.region.long=0},confirmFn:function(){var n=this,t=this.option.id?i.updateShop:i.addShop;this.option.id&&(this.form.id=this.option.id),this.form=a(a({},this.form),this.region),t(this.form).then((function(t){n.setUserShopAll();var o=n.option.id?"修改成功!":"添加成功!";n.$msg(o),e.removeStorageSync("modifyShopB"),setTimeout((function(){n.$util.pageTo(1)}),1e3)}))},formSubmit:function(e){var n=[{name:"shopName",rule:["required"],msg:["请输入名称"]},{name:"openTime",rule:["required"],msg:["请输入营业时间"]},{name:"mobile",rule:["required"],msg:["请输入手机号"]},{name:"province",rule:["required"],msg:["请选择地址"]},{name:"address",rule:["required"],msg:["请填写详细地址"]}],t=e.detail.value,o=m.validation(t,n);o?this.$msg(o):this.confirmFn()}})};n.default=p}).call(this,t("934e")["default"])},5294:function(e,n,t){"use strict";t.r(n);var o=t("4340"),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=i.a},6516:function(e,n,t){},"67a4":function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return r})),t.d(n,"a",(function(){return o}));var i=function(){var e=this,n=e.$createElement;e._self._c},r=[]},"6ad7":function(e,n,t){"use strict";var o=t("6516"),i=t.n(o);i.a},d044:function(e,n,t){"use strict";t.r(n);var o=t("67a4"),i=t("5294");for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);t("6ad7");var a,c=t("8261"),s=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"f14f973c",null,!1,o["a"],a);n["default"]=s.exports}},[["41df","common/runtime","common/vendor"]]]);
|