1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-addGoods-secound"],{"076b":function(t,e,n){"use strict";var a=n("2271"),o=n.n(a);o.a},"0f3e":function(t,e,n){"use strict";n.r(e);var a=n("4e08"),o=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=o.a},"12ea":function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.attrList=function(t,e){return o.default.get("server/".concat(t,"/attr/lst"),e,{login:!0})},e.categoryBrandlist=function(t){return o.default.get("server/".concat(t,"/category/brandlist"),{},{login:!0})},e.categoryList=function(t){return o.default.get("server/".concat(t,"/category/list"),{},{login:!0})},e.categorySelect=function(t){return o.default.get("server/".concat(t,"/category/select"),{},{login:!0})},e.getDeliveryType=function(t){return o.default.get("server/".concat(t,"/product/config"),{},{login:!0})},e.merClassifyAdd=function(t,e){return o.default.post("server/".concat(t,"/category/create"),e,{login:!0})},e.merClassifyDetail=function(t,e){return o.default.get("server/".concat(t,"/category/detail/").concat(e),{},{login:!0})},e.merClassifyLst=function(t){return o.default.get("server/".concat(t,"/category/select"),{},{login:!0})},e.merClassifyUpdate=function(t,e,n){return o.default.post("server/".concat(t,"/category/update/").concat(e),n,{login:!0})},e.productCreate=function(t,e){return o.default.post("server/".concat(t,"/product/create"),e,{login:!0})},e.productDeleteApi=function(t,e){return o.default.post("server/".concat(t,"/product/delete/").concat(e),{},{login:!0})},e.productDestory=function(t,e,n){return o.default.post("server/".concat(t,"/product/destory/").concat(e),n,{login:!0})},e.productDetail=function(t,e){return o.default.get("server/".concat(t,"/product/detail/").concat(e),{},{login:!0})},e.productLstApi=function(t,e){return o.default.get("server/".concat(t,"/product/lst"),e,{login:!0})},e.productOffApi=function(t,e,n){return o.default.post("server/".concat(t,"/product/status/").concat(e),n,{login:!0})},e.productRecommendApi=function(t,e,n){return o.default.post("server/".concat(t,"/product/good/").concat(e),n,{login:!0})},e.productRestore=function(t,e){return o.default.post("server/".concat(t,"/product/restore/").concat(e),{},{login:!0})},e.productTitle=function(t,e){return o.default.get("server/".concat(t,"/product/title"),e,{login:!0})},e.productUpdate=function(t,e,n){return o.default.post("server/".concat(t,"/product/update/").concat(e),n,{login:!0})},e.specificationAdd=function(t,e){return o.default.post("server/".concat(t,"/attr/create"),e,{login:!0})},e.specificationDel=function(t,e){return o.default.post("server/".concat(t,"/attr/delete"),e,{login:!0})},e.specificationDetail=function(t,e){return o.default.get("server/".concat(t,"/attr/detail/").concat(e),{},{login:!0})},e.specificationLst=function(t,e){return o.default.get("server/".concat(t,"/attr/lst"),e,{login:!0})},e.specificationUpdate=function(t,e,n){return o.default.post("server/".concat(t,"/attr/update/").concat(e),n,{login:!0})},e.storeClassifyDel=function(t,e){return o.default.post("server/".concat(t,"/category/delete/").concat(e),{},{login:!0})},e.storeClassifyLst=function(t){return o.default.get("server/".concat(t,"/category/lst"),{},{login:!0})},e.templateCreate=function(t,e){return o.default.post("server/".concat(t,"/template/create"),e,{login:!0})},e.templateDelete=function(t,e){return o.default.post("server/".concat(t,"/template/delete"),e,{login:!0})},e.templateDetail=function(t,e){return o.default.get("server/".concat(t,"/template/detail/").concat(e),{},{login:!0})},e.templateList=function(t,e){return o.default.get("server/".concat(t,"/template/lst"),e,{login:!0})},e.templateUpdate=function(t,e,n){return o.default.post("server/".concat(t,"/template/update/").concat(e),n,{login:!0})},n("c223");var o=a(n("fea3"))},"1c9f":function(t,e){t.exports="data:image/png;base64,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"},2271:function(t,e,n){var a=n("37d3");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("967d").default;o("ae13735a",a,!0,{sourceMap:!1,shadowMode:!1})},"37d3":function(t,e,n){var a=n("c86c");e=a(!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-1f3c501f]{padding-top:%?20?%;padding-bottom:%?156?%}.tip[data-v-1f3c501f]{padding:%?16?% 0 0 %?40?%;font-size:%?22?%;color:#e93323;display:flex;align-items:center;margin-bottom:%?40?%}.tip .iconfont[data-v-1f3c501f]{display:inline-block;margin-right:%?10?%}.popup_group[data-v-1f3c501f]{background:#fff;margin:%?31?% auto;width:%?710?%;font-size:%?30?%;border-radius:%?10?%}.popup_group .popup_group_item[data-v-1f3c501f]{padding:%?32?% %?30?%;display:flex;align-items:center;justify-content:space-between}.popup_group .popup_group_item .popup_group_item_value[data-v-1f3c501f]{display:flex;align-items:center}.popup_group .popup_group_item .popup_group_item_value .popup_group_item_message[data-v-1f3c501f]{margin-right:%?15?%;color:#bbb;max-width:%?400?%}.popup_group .popup_group_item .popup_group_item_value .popup_group_item_message_value[data-v-1f3c501f]{display:inline-block;max-width:%?400?%;color:#000}.popup_group .popup_group_item .popup_group_item_value .iconfont[data-v-1f3c501f]{color:#bbb}.popup_group .popup_group_item .popup_group_item_value uni-input[data-v-1f3c501f]{text-align:right}.popup_group > uni-view[data-v-1f3c501f]:not(:last-child){border-bottom:1px solid #eee}.handle[data-v-1f3c501f]{width:100%;height:%?126?%;background:#fff;display:flex;align-items:center;justify-content:center;position:fixed;left:0;bottom:0;z-index:10}.handle_button[data-v-1f3c501f]{width:%?690?%;height:%?86?%;background:#e93323;border-radius:43px;display:flex;align-items:center;justify-content:center;font-size:%?32?%;color:#fff}.input_content[data-v-1f3c501f]{background:#fff;padding:%?20?% %?30?% %?40?% %?30?%;width:%?710?%;margin:auto;box-sizing:border-box;border-radius:%?10?%}.input_content_textarea[data-v-1f3c501f]{border-bottom:1px solid #eee;padding-bottom:%?19?%}.input_content_textarea uni-textarea[data-v-1f3c501f]{height:%?114?%}.input_content_textarea > uni-view[data-v-1f3c501f]{text-align:right;color:#666;font-size:%?24?%}.input_content_photo[data-v-1f3c501f]{margin-top:%?30?%;display:flex;flex-wrap:wrap}.input_content_photo_adPh[data-v-1f3c501f]{position:relative;width:%?210?%;height:%?210?%;border:1px solid #ddd;display:flex;flex-direction:column;justify-content:center;border-radius:%?8?%;margin-right:%?10?%;margin-bottom:%?10?%;box-sizing:border-box}.input_content_photo_adPh[data-v-1f3c501f]:nth-child(3n){margin-right:0}.input_content_photo_adPh > uni-view[data-v-1f3c501f]: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-1f3c501f]{width:%?45?%;display:block}.input_content_photo_adPh > uni-view[data-v-1f3c501f]:nth-child(2){text-align:center;color:#bbb;font-size:%?24?%}.input_content_photo_adPh .photos[data-v-1f3c501f]{width:%?206?%}.input_content_photo_adPh_jiao[data-v-1f3c501f]{position:absolute;top:%?-2?%;right:%?-1?%;width:%?40?%;height:%?40?%;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;border-radius:0 %?8?% 0 %?8?%}.input_content_photo_adPh_jiao uni-image[data-v-1f3c501f]{width:%?16?%;height:%?16?%}.input_content_describe[data-v-1f3c501f]{border-top:1px solid #eee;padding-top:%?30?%;padding-bottom:%?47?%;border-bottom:1px solid #eee}.input_content_describe_title[data-v-1f3c501f]{display:flex;align-items:center;justify-content:space-between}.input_content_describe_title_msg[data-v-1f3c501f]{color:#333;font-size:%?30?%}.input_content_describe_title_num[data-v-1f3c501f]{color:#666;font-size:%?24?%}.input_content_describe_textarea[data-v-1f3c501f]{border-radius:10px;margin-top:%?20?%;height:%?180?%;background:#f5f5f5;padding:%?20?%}.input_content_describe_textarea uni-textarea[data-v-1f3c501f]{font-size:%?28?%;height:%?150?%}.input_content_keyword[data-v-1f3c501f]{padding-top:%?32?%;display:flex;align-items:center;justify-content:space-between;font-size:%?30?%}.input_content_keyword_value[data-v-1f3c501f]{flex:1;margin-left:%?30?%}.input_content_keyword_value uni-input[data-v-1f3c501f]{width:100%;text-align:right}.photo_count[data-v-1f3c501f]{margin-top:%?28?%}.photo_count .photo_size[data-v-1f3c501f]{font-size:%?24?%;color:#999}.radio[data-v-1f3c501f]{padding:%?30?%}.radio_label[data-v-1f3c501f]{padding-left:%?10?%;color:#333;font-size:%?30?%;display:flex;align-items:center}.radio_label .select_check[data-v-1f3c501f]{display:flex;align-items:center;justify-content:center;width:%?40?%;height:%?40?%;border:1px solid #ccc;border-radius:50%;margin-right:%?20?%}.radio_label .select_check .iconfont[data-v-1f3c501f]{font-size:%?24?%}.radio_label .select[data-v-1f3c501f]{background:#e93323;border:none}.radio_label .select .iconfont[data-v-1f3c501f]{color:#fff}.radio .select_group[data-v-1f3c501f]{display:flex}.radio .flex_start[data-v-1f3c501f]{padding:0 %?10?%;margin-top:%?40?%;justify-content:flex-start}.radio_select[data-v-1f3c501f]{display:flex;margin-right:%?110?%}.dobuButton[data-v-1f3c501f]{padding:0 %?30?%}.margin_right[data-v-1f3c501f]{background:#fd6523;margin-right:%?30?%}.content_list[data-v-1f3c501f]{width:%?710?%;margin:auto;padding:0 %?20?%;box-sizing:border-box;background:#fff;margin-top:%?31?%;border-radius:%?10?%}.content_list .content_list_item[data-v-1f3c501f]{padding:%?32?% %?10?%;display:flex;justify-content:space-between;border-bottom:1px solid #eee}.content_list .content_list_item .content_list_item_han[data-v-1f3c501f]{color:#bbb;display:flex;align-items:center}.content_list .content_list_video[data-v-1f3c501f]{min-height:%?154?%;padding:%?23?% %?10?%;display:flex;justify-content:space-between}.content_list .content_list_video .content_list_video_title[data-v-1f3c501f]{padding-top:%?10?%}.content_list .content_list_video .video_list[data-v-1f3c501f]{flex:1;display:flex;justify-content:flex-end;flex-wrap:wrap}.photo[data-v-1f3c501f]{border:1px solid #ddd;opacity:1;border-radius:%?8?%;font-size:%?28?%;display:flex;flex-direction:column;justify-content:center;text-align:center;width:%?150?%;height:%?150?%;box-sizing:border-box;color:#bbb;margin-left:%?16?%;position:relative;margin-bottom:%?12?%}.photo uni-image[data-v-1f3c501f]{width:%?62?%;margin-bottom:%?10?%}.jiao uni-image[data-v-1f3c501f]{position:absolute;top:%?-14?%;right:%?-14?%;width:%?40?%;height:%?40?%;border-radius:50%;padding:%?8?%;background:#e93323;z-index:999}.jiao uni-video[data-v-1f3c501f]{width:%?150?%;height:%?150?%}.container_input[data-v-1f3c501f]{background:#fff;padding:0 %?20?%;width:%?710?%;margin:auto;margin-top:%?31?%;border-radius:%?10?%}.container_input_item[data-v-1f3c501f]{display:flex;height:%?106?%;align-items:center}.container_input_item .select_and_input[data-v-1f3c501f]{display:flex;align-items:center;justify-content:space-between}.container_input_item .select_and_input .greyColor[data-v-1f3c501f]{color:#bbb}.container_input_item .radio[data-v-1f3c501f]{padding:%?30?% 0}.container_input_item_label[data-v-1f3c501f]{padding-left:%?10?%;color:#333;font-size:%?30?%;display:flex;align-items:center}.container_input_item_label .select_check[data-v-1f3c501f]{display:flex;align-items:center;justify-content:center;width:%?40?%;height:%?40?%;border:1px solid #ccc;border-radius:50%;margin-right:%?20?%}.container_input_item_label .select_check .iconfont[data-v-1f3c501f]{font-size:%?24?%}.container_input_item_label .select[data-v-1f3c501f]{background:#e93323;border:none}.container_input_item_label .select .iconfont[data-v-1f3c501f]{color:#fff}.container_input_item_value[data-v-1f3c501f]{padding-right:%?10?%;flex:1;display:flex;align-items:center;justify-content:flex-end}.container_input_item_value > span[data-v-1f3c501f]:nth-child(1){display:inline-block;margin-right:%?15?%}.container_input_item_value .text[data-v-1f3c501f]{color:#000;display:inline-block;max-width:%?400?%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.container_input_item_value uni-input[data-v-1f3c501f]{text-align:right}.container_input_item_value .select_group[data-v-1f3c501f]{display:flex}.container_input_item_value_select[data-v-1f3c501f]{display:flex;margin-right:%?110?%}.container_input_item .flex_start[data-v-1f3c501f]{padding:0 %?10?%;margin-top:%?40?%;justify-content:flex-start}.container_input > uni-view[data-v-1f3c501f]:not(:last-child){border-bottom:1px solid #eee}.inputPlaceHolder[data-v-1f3c501f]{color:#bbb}.paddingTop_none[data-v-1f3c501f]{padding-top:0!important}.marginTop_none[data-v-1f3c501f]{margin-top:0}',""]),t.exports=e},"4e08":function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(n("39d8")),i=a(n("9b1b"));n("64aa"),n("bf0f"),n("2797"),n("dc8a"),n("8f71"),n("d4b5");var c=n("aa10"),r=a(n("eaf5")),d=n("c25d"),s=n("12ea"),u={components:{},props:{merId:{type:[String,Number],default:""},product_id:{type:[String,Number],default:""},resetKey:{type:Boolean,default:!1}},data:function(){return{disModel:!1,upload_max:10,uploadUrl:"".concat(c.HTTP_REQUEST_URL,"/api/upload/video"),addGoodsSecoundData:{is_good:0,is_gift_bag:0,sort:"",once_count:"",video_link:""}}},created:function(){this.initData()},watch:{addGoodsSecoundData:{handler:function(t){var e=this;setTimeout((function(){(0,d.setStorage)(e.product_id?"editGoodsDetils":"addGoodsSecoundData",t)}))},deep:!0},resetKey:{handler:function(t){this.initData()}}},methods:{initData:function(){var t=this,e={};if((0,d.getStorage)("goodsDis")&&(this.disModel=!0),this.product_id)return e=(0,d.getStorage)("editGoodsDetils"),Object.keys(this.addGoodsSecoundData).forEach((function(n){t.addGoodsSecoundData[n]=e[n]})),e.content&&((0,d.setStorage)("goodsDis",{store_name:e.content.title,imageList:e.content.image}),this.disModel=!0),void(0,d.setStorage)("canChangeSecound",!0);(0,d.getStorage)("addGoodsSecoundData")&&Object.keys(this.addGoodsSecoundData).forEach((function(e){((0,d.getStorage)("addGoodsSecoundData")[e]||0==(0,d.getStorage)("addGoodsSecoundData")[e])&&(t.addGoodsSecoundData[e]=(0,d.getStorage)("addGoodsSecoundData")[e])}))},lastStep:function(){this.$emit("lastStep")},submitCreatedGoods:function(){var t=this;(0,d.Loading)();var e=["addGoodsFormData","singleSpecification","attrValue","modifyPriceData","addGoodsSecoundData","goodsDis","editGoodsDetils","canChange","canChangeSecound"],n=0==(0,d.getStorage)("addGoodsFormData").spec_type?[(0,d.getStorage)("singleSpecification")]:(0,d.getStorage)("attrValue"),a=(0,i.default)((0,i.default)((0,i.default)({},this.addGoodsSecoundData),(0,d.getStorage)("addGoodsFormData")),{},{content:{title:(0,d.getStorage)("goodsDis")?(0,d.getStorage)("goodsDis").store_name:"",image:(0,d.getStorage)("goodsDis")?(0,d.getStorage)("goodsDis").imageList:[]},video_link:this.addGoodsSecoundData.video_link});a.attrValue=n.filter((function(t){return""!=t})),(0,d.getStorage)("addGoodsFormData").spec_type,this.product_id?(0,s.productUpdate)(this.merId,this.product_id,a).then((function(n){e.forEach((function(t){(0,d.getStorage)(t)&&(0,d.removeStorage)(t)})),(0,d.hideLoading)(),(0,d.Modal)("提交成功","点击确定,返回商品管理",{showCancel:!1}).then((function(){uni.redirectTo({url:"/pages/product/goodsOnSale/index?mer_id="+t.merId})}))})).catch((function(t){(0,d.Toast)(t)})):(0,s.productCreate)(this.merId,a).then((function(n){e.forEach((function(t){(0,d.getStorage)(t)&&(0,d.removeStorage)(t)})),(0,d.hideLoading)(),(0,d.Modal)("提交成功","点击确定,返回商品管理",{showCancel:!1}).then((function(){uni.redirectTo({url:"/pages/product/goodsOnSale/index?mer_id="+t.merId})}))})).catch((function(t){(0,d.Toast)(t)}))},isGood:function(t){this.addGoodsSecoundData.is_good=t.detail.value?1:0},isGiftBag:function(t){this.addGoodsSecoundData.is_gift_bag=t.detail.value?1:0},switchChange:function(t,e){this.addGoodsSecoundData[e.model]=t?1:0},inputGoodsDetils:function(){(0,d.navigateTo)(1,"/pages/product/addGoods/addGoodDetils",{mer_id:this.merId})},uploadVideo:function(){var t=this;uni.chooseVideo({sourceType:["camera","album"],success:function(e){Math.ceil(e.size/1024)<1024*t.upload_max?uni.uploadFile({url:t.uploadUrl,filePath:e.tempFilePath,name:"file",formData:{user:"test"},header:(0,o.default)({},c.TOKENNAME,"Bearer "+r.default.state.app.token),success:function(e){var n=JSON.parse(e.data);t.addGoodsSecoundData.video_link=n.data.src},complete:function(t){}}):uni.showModal({title:"提示",content:"视频超出限制".concat(t.upload_max,"MB,已过滤")})},fail:function(t){uni.showModal({content:JSON.stringify(t)})}})},deleteImage:function(t){this.addGoodsSecoundData.video_link=""}}};e.default=u},"91af":function(t,e,n){"use strict";n.r(e);var a=n("e5bd"),o=n("0f3e");for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("076b");var c=n("828b"),r=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,"1f3c501f",null,!1,a["a"],void 0);e["default"]=r.exports},a4fb:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAUdJREFUWEe91+1VAkEMheF3KsBS7EDoADvRSrQT7UDogFK0gniCu55ldz6S7A785AD3YWYnySQReQA+gNeU0oU7vETkEXgDnpOInIAn4Bs49EYM4V+A/vGzAlSjiF1vxCz8B9gnXfF7ILLhKV2ugN6IUrjm/gN6IWrhC8DWiFZ4FrAVwhJeBKxFWMOrgCjCE94EeBHecBPAioiEmwEtRDTcBSghhjo21va/8upoajeFyNIIM2Vbv6aNxR3uXoFC2da3Q+FrAeOy6++EW3l0C6Z7roBwK3cBck/7sC3hecIMqB21NfOECWA551FEE2AJL5wO04NZBXjCo4giIBIeQWQBa8K9iAVgi3APIjeUhhtLrpe0Tsd8LN803LIS04tJl/AWYryadQ2vIiaX03BLtcwRBcT1cqrDxCfw4plkPKHzzw4P5jtw/AWJuVgew27bMwAAAABJRU5ErkJggg=="},c25d:function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionSheet=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#000000";return new Promise((function(n,a){uni.showActionSheet({itemList:t,itemColor:e,success:function(t){n(t.tapIndex)},fail:function(t){a(t.errMsg)}})}))},e.Authorize=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scope.userInfo";return new Promise((function(e,n){uni.authorize({scope:t,success:function(t){e(t)},fail:function(t){n(t)}})}))},e.GetUserInfo=function(){return new Promise((function(t,e){uni.getUserInfo({success:function(e){t(e)},fail:function(t){e(t)}})}))},e.Loading=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"正在加载...",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};uni.showLoading((0,i.default)({title:t,mask:!0},e))},e.Modal=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"提示",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"这是一个模态弹窗!";return new Promise((function(n,a){uni.showModal({title:t,content:e,success:function(t){t.confirm&&n(),t.cancel&&a()}})}))},e.ScrollTo=function(t){uni.pageScrollTo({scrollTop:t,duration:300})},e.Toast=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:800,o=(0,i.default)({title:t,duration:a,position:"center",mask:!0,icon:e||"none"},n);uni.showToast(o)},e.chooseImage=function(t){return new Promise((function(e,n){uni.chooseImage({count:t,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(t){e(t)},fail:function(t){n(t)}})}))},e.clearStorage=function(){try{uni.clearStorageSync()}catch(t){throw new Error("处理失败")}},e.convertObj=c,e.formatDate=r,e.getQuarterStartDate=function(){var t=new Date(u,function(){var t=0;s<3&&(t=0);2<s&&s<6&&(t=3);5<s&&s<9&&(t=6);s>8&&(t=9);return t}(),1);return r(t,"yyyy-MM-dd")},e.getStorage=function(t){var e=uni.getStorageSync(t);try{"number"!=typeof JSON.parse(e)&&(e=JSON.parse(e))}catch(n){}return e},e.hideLoading=function(){try{uni.hideLoading()}catch(t){throw new Error("处理失败")}},e.navigateBack=function(t){uni.navigateBack({delta:t})},e.navigateTo=function(t,e,n){var a=e,o="navigateTo";switch(a=n?a+"?"+c(n):a,t){case 1:o="navigateTo";break;case 2:o="redirectTo";break;case 3:o="reLaunch";break;case 4:o="switchTab";break;default:o="navigateTo";break}uni[o]({url:a,animationType:"slide-in-right",animationDuration:200})},e.pathToBase64=function(t){return new Promise((function(e,n){if("object"===("undefined"===typeof window?"undefined":(0,o.default)(window))&&"document"in window){if("function"===typeof FileReader){var a=new XMLHttpRequest;return a.open("GET",t,!0),a.responseType="blob",a.onload=function(){if(200===this.status){var t=new FileReader;t.onload=function(t){e(t.target.result)},t.onerror=n,t.readAsDataURL(this.response)}},a.onerror=n,void a.send()}var i=document.createElement("canvas"),c=i.getContext("2d"),r=new Image;return r.onload=function(){i.width=r.width,i.height=r.height,c.drawImage(r,0,0),e(i.toDataURL()),i.height=i.width=0},r.onerror=n,void(r.src=t)}"object"!==("undefined"===typeof plus?"undefined":(0,o.default)(plus))?"object"===("undefined"===typeof wx?"undefined":(0,o.default)(wx))&&wx.canIUse("getFileSystemManager")?wx.getFileSystemManager().readFile({filePath:t,encoding:"base64",success:function(t){e("data:image/png;base64,"+t.data)},fail:function(t){n(t)}}):n(new Error("not support")):plus.io.resolveLocalFileSystemURL(getLocalFilePath(t),(function(t){t.file((function(t){var a=new plus.io.FileReader;a.onload=function(t){e(t.target.result)},a.onerror=function(t){n(t)},a.readAsDataURL(t)}),(function(t){n(t)}))}),(function(t){n(t)}))}))},e.removeStorage=function(t){t&&uni.removeStorageSync(t)},e.serialize=function(t){if(null!=t&&""!=t)try{return JSON.parse(JSON.stringify(t))}catch(e){return t instanceof Array?[]:{}}return t},e.setStorage=function(t,e){if("string"==typeof e)return uni.setStorageSync(t,e),e;uni.setStorageSync(t,JSON.stringify(e))},e.showMonthFirstDay=function(){var t=(new Date).setDate(1);return r(new Date(t).getTime(),"yyyy-MM-dd")},e.showWeekFirstDay=function(){var t=new Date,e=t.getDay()||7;return t.setDate(t.getDate()-e+1),r(t,"yyyy-MM-dd")},e.throttle=function(t,e){var n,a;e=e||200;return function(){for(var o=this,i=arguments.length,c=new Array(i),r=0;r<i;r++)c[r]=arguments[r];n=c,a||(a=setTimeout((function(){a=null,t.apply(o,n)}),e))}},e.unique=function(t){t=t||[];for(var e={},n=0;n<t.length;n++){var a=JSON.stringify(t[n]);"undefined"==typeof a&&(e[a]=1)}for(var n in t.length=0,e)t[t.length]=n;return t};var o=a(n("fcf3")),i=a(n("9b1b"));function c(t){var e,n=[];return Object.keys(t).forEach((function(e){n.push("".concat(e,"=").concat(t[e]))})),e=n.join("&"),e}function r(t,e){return t?(e=e||"yyyy-MM-dd hh:mm:ss",new Date(t).format(e)):""}n("d4b5"),n("7a76"),n("c9b5"),n("bf0f"),n("2797"),n("dc8a"),n("aa9c"),n("c223"),n("5c47"),n("0506"),n("a1c1"),n("23f4"),n("7d2f"),n("9c4e"),n("ab80"),Date.prototype.format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,String(this.getFullYear()).substr(4-RegExp.$1.length))),e)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr(String(e[n]).length)));return t};var d=new Date,s=d.getMonth(),u=d.getYear();u+=u<2e3?1900:0},e5bd:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:" writeBg "},[a("v-uni-view",{staticClass:"container_input marginTop_none"},[a("v-uni-view",{staticClass:"container_input_item"},[a("v-uni-view",{staticClass:"container_input_item_label"},[a("span",[t._v("是否推荐")])]),a("v-uni-view",{staticClass:"container_input_item_value"},[a("v-uni-switch",{staticStyle:{transform:"scale(0.8)"},attrs:{checked:1==t.addGoodsSecoundData.is_good,color:"#E93323"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.isGood.apply(void 0,arguments)}}})],1)],1),a("v-uni-view",{staticClass:"container_input_item"},[a("v-uni-view",{staticClass:"container_input_item_label"},[a("span",[t._v("是否开启礼包")])]),a("v-uni-view",{staticClass:"container_input_item_value"},[a("v-uni-switch",{staticStyle:{transform:"scale(0.8)"},attrs:{checked:1==t.addGoodsSecoundData.is_gift_bag,color:"#E93323"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.isGiftBag.apply(void 0,arguments)}}})],1)],1)],1),a("v-uni-view",{staticClass:"tip"},[a("span",{staticClass:"iconfont"},[t._v("")]),a("span",[t._v("开启后此商品只能在分销礼包中展示并销售")])]),a("v-uni-view",{staticClass:"container_input marginTop_none"},[a("v-uni-view",{staticClass:"container_input_item"},[a("v-uni-view",{staticClass:"container_input_item_label"},[a("span",[t._v("限购数量")])]),a("v-uni-view",{staticClass:"container_input_item_value"},[a("v-uni-input",{attrs:{type:"number",value:"",placeholder:"请输入限购数量","placeholder-class":"inputPlaceHolder"},model:{value:t.addGoodsSecoundData.once_count,callback:function(e){t.$set(t.addGoodsSecoundData,"once_count",e)},expression:"addGoodsSecoundData.once_count"}})],1)],1),a("v-uni-view",{staticClass:"container_input_item"},[a("v-uni-view",{staticClass:"container_input_item_label"},[a("span",[t._v("商品排序")])]),a("v-uni-view",{staticClass:"container_input_item_value"},[a("v-uni-input",{attrs:{type:"number",value:"",placeholder:"请输入商品排序","placeholder-class":"inputPlaceHolder"},model:{value:t.addGoodsSecoundData.sort,callback:function(e){t.$set(t.addGoodsSecoundData,"sort",e)},expression:"addGoodsSecoundData.sort"}})],1)],1)],1),a("v-uni-view",{staticClass:"content_list"},[a("v-uni-view",{staticClass:"content_list_item",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.inputGoodsDetils.apply(void 0,arguments)}}},[a("v-uni-view",[t._v("商品详情")]),a("v-uni-view",{staticClass:"content_list_item_han"},[t.disModel?a("span",{staticStyle:{color:"#000000"}},[t._v("去修改")]):a("span",[t._v("设置详情")]),a("span",{staticClass:"iconfont"},[t._v("")])])],1),a("v-uni-view",{staticClass:"content_list_video"},[a("v-uni-view",{staticClass:"content_list_video_title"},[t._v("商品视频")]),a("v-uni-view",{staticClass:"video_list"},[t.addGoodsSecoundData.video_link?a("v-uni-view",{staticClass:"video_list_item photo"},[a("v-uni-view",{staticClass:"jiao",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.deleteImage()}}},[a("v-uni-video",{attrs:{src:t.addGoodsSecoundData.video_link}}),a("v-uni-image",{attrs:{src:n("a4fb"),mode:"widthFix"}})],1)],1):a("v-uni-view",{staticClass:"photo",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.uploadVideo.apply(void 0,arguments)}}},[a("v-uni-view",[a("v-uni-image",{attrs:{src:n("1c9f"),mode:"widthFix"}})],1),a("v-uni-view",[t._v("添加视频")])],1)],1)],1)],1),a("v-uni-view",{staticClass:"handle dobuButton"},[a("v-uni-view",{staticClass:"handle_button margin_right",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.lastStep.apply(void 0,arguments)}}},[t._v("上一步")]),a("v-uni-view",{staticClass:"handle_button",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submitCreatedGoods.apply(void 0,arguments)}}},[t._v("提交")])],1)],1)},o=[]}}]); |