1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-storeClassification-addStoreClass"],{"12ea":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.attrList=function(t,e){return a.default.get("server/".concat(t,"/attr/lst"),e,{login:!0})},e.categoryBrandlist=function(t){return a.default.get("server/".concat(t,"/category/brandlist"),{},{login:!0})},e.categoryList=function(t){return a.default.get("server/".concat(t,"/category/list"),{},{login:!0})},e.categorySelect=function(t){return a.default.get("server/".concat(t,"/category/select"),{},{login:!0})},e.getDeliveryType=function(t){return a.default.get("server/".concat(t,"/product/config"),{},{login:!0})},e.merClassifyAdd=function(t,e){return a.default.post("server/".concat(t,"/category/create"),e,{login:!0})},e.merClassifyDetail=function(t,e){return a.default.get("server/".concat(t,"/category/detail/").concat(e),{},{login:!0})},e.merClassifyLst=function(t){return a.default.get("server/".concat(t,"/category/select"),{},{login:!0})},e.merClassifyUpdate=function(t,e,n){return a.default.post("server/".concat(t,"/category/update/").concat(e),n,{login:!0})},e.productCreate=function(t,e){return a.default.post("server/".concat(t,"/product/create"),e,{login:!0})},e.productDeleteApi=function(t,e){return a.default.post("server/".concat(t,"/product/delete/").concat(e),{},{login:!0})},e.productDestory=function(t,e,n){return a.default.post("server/".concat(t,"/product/destory/").concat(e),n,{login:!0})},e.productDetail=function(t,e){return a.default.get("server/".concat(t,"/product/detail/").concat(e),{},{login:!0})},e.productLstApi=function(t,e){return a.default.get("server/".concat(t,"/product/lst"),e,{login:!0})},e.productOffApi=function(t,e,n){return a.default.post("server/".concat(t,"/product/status/").concat(e),n,{login:!0})},e.productRecommendApi=function(t,e,n){return a.default.post("server/".concat(t,"/product/good/").concat(e),n,{login:!0})},e.productRestore=function(t,e){return a.default.post("server/".concat(t,"/product/restore/").concat(e),{},{login:!0})},e.productTitle=function(t,e){return a.default.get("server/".concat(t,"/product/title"),e,{login:!0})},e.productUpdate=function(t,e,n){return a.default.post("server/".concat(t,"/product/update/").concat(e),n,{login:!0})},e.specificationAdd=function(t,e){return a.default.post("server/".concat(t,"/attr/create"),e,{login:!0})},e.specificationDel=function(t,e){return a.default.post("server/".concat(t,"/attr/delete"),e,{login:!0})},e.specificationDetail=function(t,e){return a.default.get("server/".concat(t,"/attr/detail/").concat(e),{},{login:!0})},e.specificationLst=function(t,e){return a.default.get("server/".concat(t,"/attr/lst"),e,{login:!0})},e.specificationUpdate=function(t,e,n){return a.default.post("server/".concat(t,"/attr/update/").concat(e),n,{login:!0})},e.storeClassifyDel=function(t,e){return a.default.post("server/".concat(t,"/category/delete/").concat(e),{},{login:!0})},e.storeClassifyLst=function(t){return a.default.get("server/".concat(t,"/category/lst"),{},{login:!0})},e.templateCreate=function(t,e){return a.default.post("server/".concat(t,"/template/create"),e,{login:!0})},e.templateDelete=function(t,e){return a.default.post("server/".concat(t,"/template/delete"),e,{login:!0})},e.templateDetail=function(t,e){return a.default.get("server/".concat(t,"/template/detail/").concat(e),{},{login:!0})},e.templateList=function(t,e){return a.default.get("server/".concat(t,"/template/lst"),e,{login:!0})},e.templateUpdate=function(t,e,n){return a.default.post("server/".concat(t,"/template/update/").concat(e),n,{login:!0})},n("c223");var a=i(n("fea3"))},"1c9f":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABKCAYAAAA7fkOZAAAAAXNSR0IArs4c6QAABo5JREFUeF7tXO1xHDcMJSuIXUGUCixVYHEbiFxBlAqiVBClgkgVxKogcgMLuYLIFUSpIHIFzLwd8IbHw2o/Dvw4+fhHM7r9IB+xD8AjSGsyNyL6zRhzYYw5zfyqtY9/NMY8GGN+d849r33I1H126oJ9fieivxjkfR5T6l4A7nKBnQ1oIroyxvxRCiWl99w55y6VnrX1mCxAE9EbY8w/xhj8HZr3/osxJtunuRYca+375N4fnHNPa583dl8uoFNrBv9da3de43nCl5fFqnMBDWs+YUv+2nXdxrI1wNF+Rt/3T9ba76Pnq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1GzWATveHHKkjR+gl8OHRGWYCOt2yoM6HK6gju98oTh0ssDxHO56GeuGl4GhenxR2ZtkHWQVoIkpT8GqRhxBxoODm1aTgqUOsRh9CVqgeQ1eTSQX6yL6UJFFNupSGxYdc26erUAerZqkDKm7VgjVn60NNoKVtwIipV9XHLXWOLG5BcwkqIkq7si2lVQN6xKqznvoSZYIAF5lgXPabzZqrcnQYtLAa/QCzXmqhS64noq2DAErsPKtq0WzVJ957bA8LJwng31ksm50fQN5s5+PV99N9a6inJro60Ax2qlHj36gWRXquwtnMyahSTXcJFNFamgCawU5j62AkKLJZfTQaWzFOZ5Aq8rPEzJJ1NwM0g33qvUfBd0wj+AlxNupARs+/SAcXnS+CCdyqtWa6ONf6WqZoowlnKAAEzkbVp7QxJ1AKUvhncHt0WMkbay24F6AihRY3osLxcZWq+slfLwHelEXHHUUVEdc0p9Y9x4B2rmErRq01qKh4axZophJYJwC/FIrIZ4HFxeygnZscFUizOlGzyHFuB6MkA3Rw7r2/mAKdwQW9ICavusIe5QuHuUWZV2p25qv0JqC5BtM0dcwdxCFcdwS60Cwdga4FdImCv0Jja+o1RLRV2InzOrb2lZTe+NgUOkqdEWqwbwF0WrVTZZlJaYzVHzOy8+xsOI4tJW6WLaGkFU1bq6O0ZwfYaHFqbyzLDidahnPvJI0Yr8Wphvdd133esw+v+va+799DT0kVw1j7jo/MlDTiVw1QgcFttO/0ENgx2bJAn17PKyRZVjrWOAg7V4JO/HrQyDASBhhR3I6g9eKJ6LwFYdB8vffHYzSFybHWBo0cNYWjgtb/WEdagOSDbpkAAAAASUVORK5CYII="},"215c":function(t,e,n){"use strict";var i=n("86a6"),a=n.n(i);a.a},"2e1d":function(t,e,n){"use strict";n.r(e);var i=n("a320"),a=n("ce84");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("215c");var r=n("828b"),c=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"61625405",null,!1,i["a"],void 0);e["default"]=c.exports},"5dc7":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.container[data-v-61625405]{padding-top:%?20?%;padding-bottom:%?126?%}.input_content[data-v-61625405]{background:#fff;padding:%?20?% %?40?% %?40?% %?30?%;width:%?710?%;margin:auto;box-sizing:border-box;border-radius:%?10?%}.input_content_textarea[data-v-61625405]{border-bottom:1px solid #eee;padding-bottom:%?19?%}.input_content_textarea uni-textarea[data-v-61625405]{height:%?114?%}.input_content_textarea > uni-view[data-v-61625405]{text-align:right;color:#666;font-size:%?24?%}.input_content_photo[data-v-61625405]{margin-top:%?41?%;display:flex;flex-wrap:wrap}.input_content_photo .photos[data-v-61625405]{width:%?156?%;height:%?156?%}.input_content_photo_adPh[data-v-61625405]{position:relative;width:%?156?%;height:%?156?%;border:1px solid #ddd;display:flex;flex-direction:column;justify-content:center;border-radius:%?8?%;margin-right:%?30?%;margin-bottom:%?30?%}.input_content_photo_adPh > uni-image[data-v-61625405]{height:100%;margin:auto}.input_content_photo_adPh > uni-view[data-v-61625405]:nth-child(1){height:%?37?%;margin-bottom:%?16?%;display:flex;justify-content:center}.input_content_photo_adPh > uni-view:nth-child(1) uni-image[data-v-61625405]{width:%?45?%;display:block}.input_content_photo_adPh > uni-view[data-v-61625405]:nth-child(2){text-align:center;color:#bbb;font-size:%?24?%}.input_content_photo_adPh_jiao[data-v-61625405]{position:absolute;top:%?-14?%;right:%?-14?%;width:%?40?%;height:%?40?%;background:#e93323;display:flex;align-items:center;justify-content:center;border-radius:50%}.input_content_photo_adPh_jiao uni-image[data-v-61625405]{width:%?16?%;height:%?16?%}.list_content[data-v-61625405]{margin-top:%?31?%;padding:0 %?20?%}.handle[data-v-61625405]{position:fixed;left:0;bottom:0;height:%?126?%;width:100%;background:#fff;display:flex;align-items:center;justify-content:center}.handle_button[data-v-61625405]{display:flex;align-items:center;justify-content:center;font-size:%?32?%;color:#fff;width:%?690?%;height:%?86?%;background:#e93323;border-radius:%?43?%}.placeholderStyle[data-v-61625405]{color:#bbb;font-size:%?30?%}.list_item[data-v-61625405]{background:#fff;padding:%?0?% %?30?%;min-height:%?106?%;border-radius:10px;display:flex;align-items:center;justify-content:space-between;margin-bottom:%?20?%;position:relative}.list_item .iconfont[data-v-61625405]{font-size:14px;color:#bbb;position:absolute;right:0;top:50%;margin-top:%?-12?%}.list_item_title[data-v-61625405]{color:#333;font-size:%?30?%;width:%?200?%}.list_item .input_class[data-v-61625405], .list_item .uni-input-input[data-v-61625405]{flex:1;display:flex;align-items:center;justify-content:flex-end;text-align:right}.list_item .input_class_con[data-v-61625405], .list_item .uni-input-input_con[data-v-61625405]{font-size:%?30?%;text-align:right;flex:1}.list_item[data-v-61625405] .uni-input-input{padding-right:%?40?%;width:%?240?%;text-align:right}.uni-list-cell[data-v-61625405]{position:relative}.uni-input-placeholder[data-v-61625405]{color:#bbb}',""]),t.exports=e},"86a6":function(t,e,n){var i=n("5dc7");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("91ab1a4a",i,!0,{sourceMap:!1,shadowMode:!1})},a320:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"container"},[i("v-uni-view",{staticClass:"input_content"},[i("v-uni-view",{staticClass:"input_content_textarea"},[i("v-uni-textarea",{attrs:{placeholder:"请输入分类","placeholder-class":"placeholderStyle",maxlength:"12"},model:{value:t.formData.cate_name,callback:function(e){t.$set(t.formData,"cate_name",e)},expression:"formData.cate_name"}}),i("v-uni-view",[t.formData.cate_name?i("v-uni-text",[t._v(t._s(t.formData.cate_name.length))]):i("v-uni-text",[t._v("0")]),t._v("/12")],1)],1),i("v-uni-view",{staticClass:"input_content_photo"},[t.formData.pic?i("v-uni-view",{staticClass:"input_content_photo_adPh"},[i("v-uni-image",{staticClass:"photos",attrs:{src:t.formData.pic}}),i("v-uni-view",{staticClass:"input_content_photo_adPh_jiao",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.deleteImage.apply(void 0,arguments)}}},[i("v-uni-image",{attrs:{src:n("a4fb"),mode:""}})],1)],1):i("v-uni-view",{staticClass:"input_content_photo_adPh",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleChooseImage.apply(void 0,arguments)}}},[i("v-uni-view",[i("v-uni-image",{attrs:{src:n("1c9f"),mode:"widthFix"}})],1),i("v-uni-view",[t._v("添加图片")])],1)],1)],1),i("v-uni-view",{staticClass:"list_content"},[i("v-uni-view",{staticClass:"list_item"},[i("v-uni-text",{staticClass:"list_item_title"},[t._v("上级分类")]),i("v-uni-picker",{attrs:{range:t.classifyArr,"range-key":"cate_name"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.bindPickerChange.apply(void 0,arguments)}}},[i("v-uni-input",{attrs:{placeholder:"请选择上级分类",type:"text",disabled:!0,readonly:!0},model:{value:t.parentClassify,callback:function(e){t.parentClassify=e},expression:"parentClassify"}}),i("v-uni-view",{staticClass:"iconfont icon-jiantou"})],1)],1),i("v-uni-view",{staticClass:"list_item"},[i("v-uni-view",{staticClass:"list_item_title"},[t._v("是否显示")]),i("v-uni-view",{staticClass:"input_class"},[i("v-uni-view",{staticClass:"input_class_con"},[i("v-uni-switch",{staticStyle:{transform:"scale(0.8)"},attrs:{checked:t.is_show,color:"#E93323"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.is_show=!t.is_show}}})],1)],1)],1)],1),i("v-uni-view",{staticClass:"handle"},[i("v-uni-view",{staticClass:"handle_button",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[t._v("确定")])],1)],1)},a=[]},a4fb:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAUdJREFUWEe91+1VAkEMheF3KsBS7EDoADvRSrQT7UDogFK0gniCu55ldz6S7A785AD3YWYnySQReQA+gNeU0oU7vETkEXgDnpOInIAn4Bs49EYM4V+A/vGzAlSjiF1vxCz8B9gnXfF7ILLhKV2ugN6IUrjm/gN6IWrhC8DWiFZ4FrAVwhJeBKxFWMOrgCjCE94EeBHecBPAioiEmwEtRDTcBSghhjo21va/8upoajeFyNIIM2Vbv6aNxR3uXoFC2da3Q+FrAeOy6++EW3l0C6Z7roBwK3cBck/7sC3hecIMqB21NfOECWA551FEE2AJL5wO04NZBXjCo4giIBIeQWQBa8K9iAVgi3APIjeUhhtLrpe0Tsd8LN803LIS04tJl/AWYryadQ2vIiaX03BLtcwRBcT1cqrDxCfw4plkPKHzzw4P5jtw/AWJuVgew27bMwAAAABJRU5ErkJggg=="},c950:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("3efd");var i=n("12ea"),a={components:{},data:function(){return{parentClassify:"",formData:{cate_name:"",pic:"",pid:"",is_show:1,sort:0},is_show:!0,index:0,mer_id:"",pid:"",classifyArr:[]}},onLoad:function(t){this.mer_id=t.mer_id,this.pid=t.pid,this.getCateList(),this.pid&&this.mer_id&&this.getCateDetail()},onShow:function(){},onReady:function(){},methods:{bindPickerChange:function(t){var e=t.target.value;this.formData.pid=this.classifyArr[e]["store_category_id"],this.parentClassify=this.classifyArr[e]["cate_name"]},getCateList:function(){var t=this;(0,i.storeClassifyLst)(this.mer_id).then((function(e){t.classifyArr=e.data,t.classifyArr.unshift({cate_name:"顶级分类",store_category_id:0,children:[]}),t.pid||(t.pid=0,t.parentClassify=t.getStorCateName(0,t.classifyArr))})).catch((function(e){t.$util.Tips({title:e})}))},getCateDetail:function(){var t=this;uni.showLoading({title:"加载中"}),(0,i.merClassifyDetail)(t.mer_id,t.pid).then((function(e){uni.hideLoading();var n=e.data;t.formData=n,t.is_show=1==n.is_show,t.parentClassify=t.getStorCateName(n.pid,t.classifyArr)})).catch((function(e){t.$util.Tips({title:e})}))},getStorCateName:function(t,e){for(var n=0;n<e.length;n++)if(e[n].store_category_id===t)return e[n]["cate_name"]},handleChooseImage:function(){var t=this;t.$util.uploadImageOne("upload/image",(function(e){t.$set(t.formData,"pic",e.data.path)}))},deleteImage:function(t){this.formData.pic=""},submit:function(){var t=this;t.formData.is_show=t.is_show?1:0,t.formData.pid=t.formData.pid?t.formData.pid:0;var e=t.formData;if(!e.cate_name)return t.$util.Tips({title:"请输入分类名称"});t.pid?(0,i.merClassifyUpdate)(t.mer_id,t.pid,t.formData).then((function(e){200==e.status&&(t.$util.Tips({title:e.message}),setTimeout((function(){uni.redirectTo({url:"/pages/product/storeClassification/index?mer_id="+t.mer_id})}),1e3))})).catch((function(e){t.$util.Tips({title:e})})):(0,i.merClassifyAdd)(t.mer_id,t.formData).then((function(e){200==e.status&&(t.$util.Tips({title:e.message}),setTimeout((function(){uni.redirectTo({url:"/pages/product/storeClassification/index?mer_id="+t.mer_id})}),1e3))})).catch((function(e){t.$util.Tips({title:e})}))}}};e.default=a},ce84:function(t,e,n){"use strict";n.r(e);var i=n("c950"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a}}]); |