admin-shop-add.aa912ee7.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["admin-shop-add"],{38553:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/***\r\n全局scss 变量和方法 存放处\r\n */\n/* 引入minxin */\n/* 颜色变量 */\n/*图片地址*/\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.app-content[data-v-5000a510]{min-height:calc(100vh - %?20?%);padding-top:%?20?%}.prompt-text[data-v-5000a510]{color:#999;padding-left:%?30?%;margin-bottom:%?30?%}.module-com[data-v-5000a510]{margin-bottom:%?20?%}.module-com .member-wrap .member-det[data-v-5000a510]{font-size:%?24?%;margin-left:%?20?%}.module-com .remark-wrap[data-v-5000a510]{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.module-com .remark-wrap .remark[data-v-5000a510]{height:%?240?%}.confirm-btn[data-v-5000a510]{width:calc(100% - %?60?%);margin:%?60?% %?30?% %?20?%}.confirm-btn .admin-button-com[data-v-5000a510]{width:100%}',""]),t.exports=e},5294:function(t,e,a){"use strict";a.r(e);var i=a("eb24"),n=a.n(i);for(var r in i)"default"!==r&&function(t){a.d(e,t,(function(){return i[t]}))}(r);e["default"]=n.a},"56f6":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("c5f6");var n=i(a("a79c")),r={name:"avatar-module",props:{width:{type:Number,default:100},src:{type:String,default:""},radius:{type:String,default:"50%"}},computed:{imgUrl:function(){return this.src||n.default}}};e.default=r},"5daf":function(t,e,a){"use strict";a.r(e);var i=a("56f6"),n=a.n(i);for(var r in i)"default"!==r&&function(t){a.d(e,t,(function(){return i[t]}))}(r);e["default"]=n.a},6573:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"avatar-img",class:{radius:t.radius},style:{width:t.width+"upx",height:t.width+"upx",borderRadius:t.radius}},[a("img",{style:{width:t.width+"upx",height:t.width+"upx",borderRadius:t.radius},attrs:{src:t.imgUrl,alt:"头像"}})])},n=[];a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n}))},8441:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-content"},[a("v-uni-form",{on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.formSubmit.apply(void 0,arguments)},reset:function(e){arguments[0]=e=t.$handleEvent(e),t.formReset.apply(void 0,arguments)}}},[a("div",{staticClass:"module-com input-line-wrap"},[a("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[a("div",{staticClass:"tui-title required"},[t._v("门店名称")]),a("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"shopName",placeholder:"请输入名称",maxlength:"50",type:"text"},model:{value:t.form.shopName,callback:function(e){t.$set(t.form,"shopName",e)},expression:"form.shopName"}})],1)],1),a("div",{staticClass:"module-com input-line-wrap"},[a("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[a("div",{staticClass:"tui-title required"},[t._v("营业时间")]),a("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"openTime",placeholder:"请输入营业时间 例如:8:00 - 22:00",maxlength:"50",type:"text"},model:{value:t.form.openTime,callback:function(e){t.$set(t.form,"openTime",e)},expression:"form.openTime"}})],1),a("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[a("div",{staticClass:"tui-title required"},[t._v("联系电话")]),a("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"telephone",placeholder:"请输入联系电话",maxlength:"50",type:"text"},model:{value:t.form.telephone,callback:function(e){t.$set(t.form,"telephone",e)},expression:"form.telephone"}})],1),a("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1,arrow:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openAddres.apply(void 0,arguments)}}},[a("div",{staticClass:"tui-title required"},[t._v("所在城市")]),t.form.province||t.form.city?a("div",{staticClass:"tui-input"},[t._v(t._s(t.form.province+"-"+t.form.city))]):a("div",{staticClass:"tui-placeholder"},[t._v("请选择")]),a("v-uni-input",{attrs:{name:"province",hidden:!0},model:{value:t.form.province,callback:function(e){t.$set(t.form,"province",e)},expression:"form.province"}})],1),a("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1,arrow:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.selRegionFn.apply(void 0,arguments)}}},[a("div",{staticClass:"tui-title required"},[t._v("地址")]),t.form.address?a("div",{staticClass:"tui-input"},[t._v(t._s(t.form.address))]):a("div",{staticClass:"tui-placeholder"},[t._v("请选择详细地址")]),a("v-uni-input",{attrs:{name:"address",hidden:!0},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1),a("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[a("div",{staticClass:"tui-title required"},[t._v("门牌号")]),a("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"floor",placeholder:"楼号门牌号,如23号403室 (选填)"},model:{value:t.form.floor,callback:function(e){t.$set(t.form,"floor",e)},expression:"form.floor"}})],1),a("tui-list-cell",{staticClass:"line-cell remark-wrap",attrs:{hover:!1}},[a("div",{staticClass:"tui-title"},[t._v("简介")]),a("div",{staticClass:"tui-input"},[a("v-uni-textarea",{staticClass:"tui-textarea remark",attrs:{"placeholder-class":"phcolor",placeholder:"请输入简介"},model:{value:t.form.introduction,callback:function(e){t.$set(t.form,"introduction",e)},expression:"form.introduction"}})],1)])],1),a("div",{staticClass:"confirm-btn"},[a("v-uni-button",{staticClass:"admin-button-com big blue",attrs:{formType:"submit"}},[t._v("提交")])],1)]),a("simple-address",{ref:"simpleAddress",attrs:{region:t.regionData,pickerValueDefault:t.cityPickerValueDefault},on:{onConfirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onCityConfirm.apply(void 0,arguments)}}}),a("app-area-sel",{attrs:{show:t.showRegion,city:t.form.receiveCity},on:{"update:show":function(e){arguments[0]=e=t.$handleEvent(e),t.showRegion=e},change:function(e){arguments[0]=e=t.$handleEvent(e),t.changeAreaFn.apply(void 0,arguments)}}})],1)},n=[];a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n}))},8797:function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.getIntroduce=e.getAuthUrl=e.accountDet=e.regionTree=e.sendSmsW=e.applyRegister=e.merchantDet=e.applyStatus=e.renewWxPay=e.getMealDet=void 0;var n=i(a("14bf")),r=function(t){return n.default.get("/set-meal/get-detail",t)};e.getMealDet=r;var o=function(t){return n.default.get("/renew/wx-pay",t)};e.renewWxPay=o;var s=function(t){return n.default.get("/apply/apply-status",t)};e.applyStatus=s;var l=function(t){return n.default.get("/merchant/detail",t)};e.merchantDet=l;var u=function(t){return n.default.get("/apply/register",t)};e.applyRegister=u;var d=function(t){return n.default.get("/inform-user/send-sms",t)};e.sendSmsW=d;var c=function(t){return n.default.get("/region/tree",t)};e.regionTree=c;var f=function(t){return n.default.get("/merchant/login-account",t)};e.accountDet=f;var p=function(t){return n.default.get("/wx-open/get-auth-url",t)};e.getAuthUrl=p;var m=function(t){return n.default.get("/merchant/introduce-shop",t)};e.getIntroduce=m},"8dd4":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.downMemberCode=e.downQrCode=e.delShop=e.addShop=e.updateShop=e.getList=void 0;var n=i(a("14bf")),r=function(t){return n.default.get("/shop/list",t)};e.getList=r;var o=function(t){return n.default.post("/shop/update",t)};e.updateShop=o;var s=function(t){return n.default.post("/shop/add",t)};e.addShop=s;var l=function(t){return n.default.get("/shop/delete",t)};e.delShop=l;var u=function(t){return n.default.get("/shop/download-gathering-code",t,{},{hideError:!0})};e.downQrCode=u;var d=function(t){return n.default.get("/shop/download-apply-member-code",t,{},{hideError:!0})};e.downMemberCode=d},d044:function(t,e,a){"use strict";a.r(e);var i=a("8441"),n=a("5294");for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);a("d6cc");var o=a("f0c5"),s=Object(o["a"])(n["default"],i["a"],i["b"],!1,null,"5000a510",null);e["default"]=s.exports},d6cc:function(t,e,a){"use strict";var i=a("fad9"),n=a.n(i);n.a},d84d:function(t,e,a){"use strict";a.r(e);var i=a("6573"),n=a("5daf");for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);var o=a("f0c5"),s=Object(o["a"])(n["default"],i["a"],i["b"],!1,null,"094ed83e",null);e["default"]=s.exports},eb24:function(t,e,a){"use strict";(function(t){var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("456d"),a("ac6a");var n=i(a("1861")),r=i(a("d84d")),o=i(a("618a")),s=i(a("62ec")),l=a("8dd4"),u=a("8797"),d=a("90f4"),c={name:"staff-add",components:{TuiListCell:n.default,AppAvatarModule:r.default,SimpleAddress:o.default,AppAreaSel:s.default},data:function(){return{form:{shopName:"",province:"",city:"",address:"",floor:"",openTime:"8:00 - 22:00",introduction:"",telephone:""},showRegion:!1,region:{lat:0,long:0},regionData:[],cityPickerValueDefault:[0,0]}},onLoad:function(){},onShow:function(){this.option.id?uni.setNavigationBarTitle({title:"修改门店"}):uni.setNavigationBarTitle({title:"添加门店"})},methods:{init:function(){this._getDet(),this._regionTree()},_regionTree:function(){var t=this;(0,u.regionTree)().then((function(e){t.regionData=e.data.tree}))},_getDet:function(){var t=this,e=uni.getStorageSync("modifyShopB");this.$util.isEmpty(e)||Object.keys(this.form).forEach((function(a,i){t.form[a]=e[a]}))},selRegionFn:function(){if(!this.form.city)return this.$msg("请先选择地址!"),!1;this.showRegion=!0},changeAreaFn:function(e){t.log("changeAreaFn",e),this.form.address=e.address,this.region.lat=e.location.lat,this.region.long=e.location.lng},openAddres:function(){this.$refs.simpleAddress.open()},onCityConfirm:function(t){this.form.province=t.provinceName,this.form.city=t.cityName},confirmFn:function(){var t=this,e=this.option.id?l.updateShop:l.addShop;this.option.id&&(this.form.id=this.option.id),e(this.form).then((function(e){var a=t.option.id?"修改成功!":"添加成功!";t.$msg(a),uni.removeStorageSync("modifyShopB"),setTimeout((function(){t.$util.pageTo("/admin/shop/list")}),1e3)}))},formSubmit:function(t){var e=[{name:"shopName",rule:["required"],msg:["请输入名称"]},{name:"openTime",rule:["required"],msg:["请输入营业时间"]},{name:"telephone",rule:["required"],msg:["请输入联系电话"]},{name:"province",rule:["required"],msg:["请选择地址"]},{name:"address",rule:["required"],msg:["请选择详细地址"]},{name:"floor",rule:["required"],msg:["请输入门牌号"]}],a=t.detail.value,i=d.validation(a,e);i?this.$msg(i):this.confirmFn()}}};e.default=c}).call(this,a("5a52")["default"])},fad9:function(t,e,a){var i=a("38553");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("0838b7db",i,!0,{sourceMap:!1,shadowMode:!1})}}]);