1 line
36 KiB
JavaScript
1 line
36 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods_manage-goods_manage"],{"0122":function(t,e,o){"use strict";o.r(e);var n=o("9bdf"),i=o("bbfa");for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);var r=o("762f");for(var a in r)"default"!==a&&function(t){o.d(e,t,(function(){return r[t]}))}(a);o("cab0");var s=o("f0c5"),l=o("6da0");i["default"].__module="renderBiz";var c=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,"86fc822c",null,!1,n["a"],i["default"]);"function"===typeof l["a"]&&Object(l["a"])(c),e["default"]=c.exports},"0aff":function(t,e,o){var n=o("24fb");e=n(!1),e.push([t.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-2bdeb282]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}\n/*根元素需要有固定的高度*/uni-page-body[data-v-2bdeb282]{height:100%;box-sizing:border-box}uni-page-body .header[data-v-2bdeb282]{padding:%?16?% %?30?%}uni-page-body .nav[data-v-2bdeb282]{padding:%?15?% 0}uni-page-body .section[data-v-2bdeb282]{overflow:hidden}uni-page-body .section .title[data-v-2bdeb282]{padding:%?20?%}uni-page-body .section .btn[data-v-2bdeb282]{margin-top:%?20?%;margin-left:%?20?%;width:%?180?%;height:%?64?%;font-size:%?26?%}uni-page-body .section .solid[data-v-2bdeb282]{color:#fff;background-color:#ff4141}uni-page-body .section .hollow[data-v-2bdeb282]{color:#666;border:1px solid #dbdbdb}",""]),t.exports=e},"0d8e":function(t,e,o){"use strict";var n=o("e651"),i=o.n(n);i.a},"0ea7":function(t,e,o){"use strict";var n=o("4ea4");o("99af"),o("a9e3"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("2909"));o("96cf");var a=n(o("1da1")),r=n(o("4803")),s=o("890d"),l=o("a9eb"),c={mixins:[r.default],data:function(){return{height:"100%",keyword:"",list:[{name:"销售中",type:1,lists:[]},{name:"仓库中",type:2,lists:[]},{name:"库存预警",type:3,lists:[]},{name:"回收站",type:4,lists:[]},{name:"待审核",type:5,lists:[]},{name:"未通过",type:6,lists:[]}],current:0,count:0,action:"",curData:{},btns:{},off_shelf:!1,on_shelf:!1,del:!1,recycle:!1,warehouse:!1,upOption:{empty:{icon:"/static/images/empty/shop.png",tip:"暂无商品!",fixed:!0,top:"200rpx"}}}},onShow:function(){var t=this;return(0,a.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.upCallback=(0,l.debounce)(t.upCallback,200,t),t.$nextTick((function(){t.$refs.mescrollRef[t.current].mescroll.resetUpScroll()})),uni.getSystemInfo({success:function(e){t.height=e.windowHeight-107+"px"}});case 3:case"end":return e.stop()}}),e)})))()},methods:{change:function(t){var e;e=t.detail?t.detail.current:t,this.current=Number(e),this.$refs.mescrollRef[this.current].mescroll.resetUpScroll()},upCallback:function(t){var e=this;return(0,a.default)(regeneratorRuntime.mark((function o(){var n,a,r;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:n=e.current,a=t.num,r=t.size,(0,s.apiGoodsLists)({name:e.keyword,type:e.list[n].type,page_no:a,page_size:r}).then((function(t){var o=t.lists,r=(t.page_size,t.btns),s=t.more,l=t.count;(1==a||e.keyword)&&(e.list[n].lists=[]),e.btns=r,e.count=l;var c=!!s;e.list[n].lists=[].concat((0,i.default)(e.list[n].lists),(0,i.default)(o)),e.$refs.mescrollRef[n].mescroll.endSuccess(o.length,c)})).catch((function(t){console.log(t),e.mescroll.endErr()}));case 4:case"end":return o.stop()}}),o)})))()},openFunc:function(t,e){this.curData=t,this.action=e,this[e]=!0},goodsSetting:function(){var t=this;return(0,a.default)(regeneratorRuntime.mark((function e(){var o,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t.curData.id,n="del"==t.action?"delete":t.action,e.next=3,(0,s.apiGoodsOperation)({action:n,id:o});case 3:t.$refs.mescrollRef[t.current].mescroll.resetUpScroll(),t.$refs.uToast.show({title:"操作成功",type:"success"});case 5:case"end":return e.stop()}}),e)})))()}}};e.default=c},"169b":function(t,e,o){var n=o("0aff");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=o("4f06").default;i("0856ec64",n,!0,{sourceMap:!1,shadowMode:!1})},"31a4":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={uSearch:o("6fc5").default,uTabs:o("30d1").default,mescrollUni:o("0122").default,goodsCard:o("3703").default,modal:o("4ca1").default,uToast:o("af9c").default},i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("v-uni-view",{},[o("v-uni-view",{staticClass:"header bg-white"},[o("u-search",{attrs:{placeholder:"输入商品名称","show-action":!1},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change(t.current)}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}})],1),o("v-uni-view",{staticClass:"nav bg-white"},[o("u-tabs",{attrs:{name:"name","show-bar":!1,list:t.list,"is-scroll":!0,current:t.current,"active-color":"#40AFFA"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change.apply(void 0,arguments)}}})],1),o("v-uni-view",{staticClass:"section",style:{height:t.height}},[o("v-uni-swiper",{staticStyle:{height:"100%",overflow:"hidden"},attrs:{duration:400,current:t.current},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change.apply(void 0,arguments)}}},t._l(t.list,(function(e,n){return o("v-uni-swiper-item",{key:n},[o("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:n==t.current,expression:"index == current"}]},[o("mescroll-uni",{ref:"mescrollRef",refInFor:!0,attrs:{bottom:"220rpx",height:"100%",up:t.upOption},on:{init:function(e){arguments[0]=e=t.$handleEvent(e),t.mescrollInit.apply(void 0,arguments)},up:function(e){arguments[0]=e=t.$handleEvent(e),t.upCallback.apply(void 0,arguments)},down:function(e){arguments[0]=e=t.$handleEvent(e),t.downCallback.apply(void 0,arguments)}}},[o("v-uni-view",{staticClass:"title muted sm"},[t._v("共"+t._s(t.count)+"件商品")]),t._l(e.lists,(function(e,n){return[o("goods-card",{key:n+"_0",attrs:{data:e}},[t.btns.recycle_btn?[o("v-uni-button",{staticClass:"btn hollow br60 flex row-center normal",on:{click:function(o){arguments[0]=o=t.$handleEvent(o),t.openFunc(e,"recycle")}}},[t._v("移至回收站")])]:t._e(),t.btns.edit_btn?[o("router-link",{attrs:{to:"/bundle/pages/spec_edit/spec_edit?id="+e.id}},[o("v-uni-button",{staticClass:"btn hollow br60 flex row-center normal"},[t._v("编辑")])],1)]:t._e(),t.btns.delete_btn?[o("v-uni-button",{staticClass:"btn hollow br60 flex row-center normal",on:{click:function(o){o.stopPropagation(),arguments[0]=o=t.$handleEvent(o),t.openFunc(e,"del")}}},[t._v("删除")])]:t._e(),0==t.current?[o("v-uni-button",{staticClass:"btn solid br60 flex row-center normal",on:{click:function(o){o.stopPropagation(),arguments[0]=o=t.$handleEvent(o),t.openFunc(e,"off_shelf")}}},[t._v("下架")])]:t._e(),1==t.current?[o("v-uni-button",{staticClass:"btn solid br60 flex row-center normal",staticStyle:{background:"#40AFFA"},on:{click:function(o){o.stopPropagation(),arguments[0]=o=t.$handleEvent(o),t.openFunc(e,"on_shelf")}}},[t._v("上架")])]:t._e(),t.btns.warehouse_btn?[o("v-uni-button",{staticClass:"btn solid br60 flex row-center normal",staticStyle:{background:"#40AFFA"},on:{click:function(o){o.stopPropagation(),arguments[0]=o=t.$handleEvent(o),t.openFunc(e,"warehouse")}}},[t._v("放入仓库")])]:t._e()],2)]}))],2)],1)],1)})),1)],1),o("modal",{attrs:{height:"200rpx"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.goodsSetting.apply(void 0,arguments)}},model:{value:t.off_shelf,callback:function(e){t.off_shelf=e},expression:"off_shelf"}},[o("v-uni-view",{staticClass:"black nr",staticStyle:{height:"200rpx"}},[t._v("确认下架:"),o("v-uni-text",{staticStyle:{color:"#FF4141"}},[t._v(t._s(t.curData.name))])],1)],1),o("modal",{attrs:{height:"200rpx"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.goodsSetting.apply(void 0,arguments)}},model:{value:t.on_shelf,callback:function(e){t.on_shelf=e},expression:"on_shelf"}},[o("v-uni-view",{staticClass:"black nr",staticStyle:{height:"200rpx"}},[t._v("确认上架:"),o("v-uni-text",{staticStyle:{color:"#FF4141"}},[t._v(t._s(t.curData.name))])],1)],1),o("modal",{attrs:{height:"200rpx"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.goodsSetting.apply(void 0,arguments)}},model:{value:t.del,callback:function(e){t.del=e},expression:"del"}},[o("v-uni-view",{staticClass:"black nr",staticStyle:{height:"200rpx"}},[t._v("确认删除:"),o("v-uni-text",{staticStyle:{color:"#FF4141"}},[t._v(t._s(t.curData.name))])],1)],1),o("modal",{attrs:{height:"200rpx"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.goodsSetting.apply(void 0,arguments)}},model:{value:t.recycle,callback:function(e){t.recycle=e},expression:"recycle"}},[o("v-uni-view",{staticClass:"black nr",staticStyle:{height:"200rpx"}},[t._v("确认移至回收站:"),o("v-uni-text",{staticStyle:{color:"#FF4141"}},[t._v(t._s(t.curData.name))])],1)],1),o("modal",{attrs:{height:"200rpx"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.goodsSetting.apply(void 0,arguments)}},model:{value:t.warehouse,callback:function(e){t.warehouse=e},expression:"warehouse"}},[o("v-uni-view",{staticClass:"black nr",staticStyle:{height:"200rpx"}},[t._v("确认放入仓库:"),o("v-uni-text",{staticStyle:{color:"#FF4141"}},[t._v(t._s(t.curData.name))])],1)],1),o("u-toast",{ref:"uToast"})],1)},a=[]},"365e":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={uImage:o("4902").default},i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("v-uni-view",{staticClass:"goods bg-white"},[o("v-uni-view",{staticClass:"goods-wrap flex",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toDetail(t.data.id)}}},[o("v-uni-view",{staticClass:"image"},[o("u-image",{attrs:{src:t.data.image,width:"160",height:"160"}})],1),o("v-uni-view",{staticClass:"m-l-16 line-1"},[o("v-uni-view",{staticClass:"goods-name line-1 m-t-10"},[t._v(t._s(t.data.name))]),o("v-uni-view",{staticClass:"goods-price primary m-t-10"},[t._v("¥"+t._s(t.data.min_price))]),o("v-uni-view",{staticClass:"muted flex row-between xs m-t-10"},[o("v-uni-view",[t._v("总库存: "+t._s(t.data.stock))]),o("v-uni-view",[t._v("总销量: "+t._s(t.data.sales_actual))])],1)],1)],1),o("v-uni-view",{staticClass:"goods-footer flex row-right"},[t._t("default")],2)],1)},a=[]},3703:function(t,e,o){"use strict";o.r(e);var n=o("365e"),i=o("4d21");for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("c1f3");var r,s=o("f0c5"),l=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"260e1ff2",null,!1,n["a"],r);e["default"]=l.exports},4803:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{mescroll:null}},onPullDownRefresh:function(){this.mescroll&&this.mescroll.onPullDownRefresh()},onPageScroll:function(t){this.mescroll&&this.mescroll.onPageScroll(t)},onReachBottom:function(){this.mescroll&&this.mescroll.onReachBottom()},methods:{mescrollInit:function(t){console.log(t),this.mescroll=t,this.mescrollInitByRef()},mescrollInitByRef:function(){if(!this.mescroll||!this.mescroll.resetUpScroll){var t=this.$refs.mescrollRef;t&&(this.mescroll=t.mescroll)}},downCallback:function(){var t=this;this.mescroll.optUp.use?this.mescroll.resetUpScroll():setTimeout((function(){t.mescroll.endSuccess()}),500)},upCallback:function(){var t=this;setTimeout((function(){t.mescroll.endErr()}),500)}},mounted:function(){this.mescrollInitByRef()}},i=n;e.default=i},"4d21":function(t,e,o){"use strict";o.r(e);var n=o("d085"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},5289:function(t,e,o){var n=o("24fb");e=n(!1),e.push([t.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-4d0f3fac]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.u-search[data-v-4d0f3fac]{display:flex;flex-direction:row;align-items:center;flex:1}.u-content[data-v-4d0f3fac]{display:flex;flex-direction:row;align-items:center;padding:0 %?18?%;flex:1}.u-clear-icon[data-v-4d0f3fac]{display:flex;flex-direction:row;align-items:center}.u-input[data-v-4d0f3fac]{flex:1;font-size:%?28?%;line-height:1;margin:0 %?10?%;color:#909399}.u-close-wrap[data-v-4d0f3fac]{width:%?40?%;height:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%}.u-placeholder-class[data-v-4d0f3fac]{color:#909399}.u-action[data-v-4d0f3fac]{font-size:%?28?%;color:#303133;width:0;overflow:hidden;transition:all .3s;white-space:nowrap;text-align:center}.u-action-active[data-v-4d0f3fac]{width:%?80?%;margin-left:%?10?%}",""]),t.exports=e},"59c1":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={uIcon:o("031d").default},i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("v-uni-view",{staticClass:"u-search",style:{margin:t.margin},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clickHandler.apply(void 0,arguments)}}},[o("v-uni-view",{staticClass:"u-content",style:{backgroundColor:t.bgColor,borderRadius:"round"==t.shape?"100rpx":"10rpx",border:t.borderStyle,height:t.height+"rpx"}},[o("v-uni-view",{staticClass:"u-icon-wrap"},[o("u-icon",{staticClass:"u-clear-icon",attrs:{size:30,name:t.searchIcon,color:t.searchIconColor?t.searchIconColor:t.color}})],1),o("v-uni-input",{staticClass:"u-input",style:[{textAlign:t.inputAlign,color:t.color,backgroundColor:t.bgColor},t.inputStyle],attrs:{"confirm-type":"search",value:t.value,disabled:t.disabled,focus:t.focus,maxlength:t.maxlength,"placeholder-class":"u-placeholder-class",placeholder:t.placeholder,"placeholder-style":"color: "+t.placeholderColor,type:"text"},on:{blur:function(e){arguments[0]=e=t.$handleEvent(e),t.blur.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.search.apply(void 0,arguments)},input:function(e){arguments[0]=e=t.$handleEvent(e),t.inputChange.apply(void 0,arguments)},focus:function(e){arguments[0]=e=t.$handleEvent(e),t.getFocus.apply(void 0,arguments)}}}),t.keyword&&t.clearabled&&t.focused?o("v-uni-view",{staticClass:"u-close-wrap",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clear.apply(void 0,arguments)}}},[o("u-icon",{staticClass:"u-clear-icon",attrs:{name:"close-circle-fill",size:"34",color:"#c0c4cc"}})],1):t._e()],1),o("v-uni-view",{staticClass:"u-action",class:[t.showActionBtn||t.show?"u-action-active":""],style:[t.actionStyle],on:{click:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e),t.custom.apply(void 0,arguments)}}},[t._v(t._s(t.actionText))])],1)},a=[]},"59f9":function(t,e,o){"use strict";var n=o("4ea4");o("c975"),o("a9e3"),o("d3b7"),o("ac1f"),o("25f0"),o("5319"),o("1276"),o("498a"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("a566")),a=n(o("f969")),r=n(o("eed4")),s=n(o("cae9")),l=n(o("5001")),c={mixins:[l.default],components:{MescrollEmpty:r.default,MescrollTop:s.default},data:function(){return{mescroll:{optDown:{},optUp:{}},viewId:"id_"+Math.random().toString(36).substr(2,16),downHight:0,downRate:0,downLoadType:0,upLoadType:0,isShowEmpty:!1,isShowToTop:!1,scrollTop:0,scrollAnim:!1,windowTop:0,windowBottom:0,windowHeight:0,statusBarHeight:0}},props:{down:Object,up:Object,top:[String,Number],topbar:[Boolean,String],bottom:[String,Number],safearea:Boolean,fixed:{type:Boolean,default:!0},height:[String,Number],bottombar:{type:Boolean,default:!1},bgColor:{type:String,default:"transparent"}},computed:{isFixed:function(){return!this.height&&this.fixed},scrollHeight:function(){return this.isFixed?"auto":this.height?this.toPx(this.height)+"px":"100%"},numTop:function(){return this.toPx(this.top)},fixedTop:function(){return this.isFixed?this.numTop+this.windowTop+"px":0},padTop:function(){return this.isFixed?0:this.numTop+"px"},numBottom:function(){return this.toPx(this.bottom)},fixedBottom:function(){return this.isFixed?this.numBottom+this.windowBottom+"px":0},padBottom:function(){return this.isFixed?0:this.numBottom+"px"},isDownReset:function(){return 3===this.downLoadType||4===this.downLoadType},transition:function(){return this.isDownReset?"transform 300ms":""},translateY:function(){return this.downHight>0?"translateY("+this.downHight+"px)":""},scrollable:function(){return 0===this.downLoadType||this.isDownReset},isDownLoading:function(){return 3===this.downLoadType},downRotate:function(){return"rotate("+360*this.downRate+"deg)"},downText:function(){if(!this.mescroll)return"";switch(this.downLoadType){case 1:return this.mescroll.optDown.textInOffset;case 2:return this.mescroll.optDown.textOutOffset;case 3:return this.mescroll.optDown.textLoading;case 4:return this.mescroll.isDownEndSuccess?this.mescroll.optDown.textSuccess:0==this.mescroll.isDownEndSuccess?this.mescroll.optDown.textErr:this.mescroll.optDown.textInOffset;default:return this.mescroll.optDown.textInOffset}}},methods:{toPx:function(t){if("string"===typeof t)if(-1!==t.indexOf("px"))if(-1!==t.indexOf("rpx"))t=t.replace("rpx","");else{if(-1===t.indexOf("upx"))return Number(t.replace("px",""));t=t.replace("upx","")}else if(-1!==t.indexOf("%")){var e=Number(t.replace("%",""))/100;return this.windowHeight*e}return t?uni.upx2px(Number(t)):0},scroll:function(t){var e=this;this.mescroll.scroll(t.detail,(function(){e.$emit("scroll",e.mescroll)}))},emptyClick:function(){this.$emit("emptyclick",this.mescroll)},toTopClick:function(){this.mescroll.scrollTo(0,this.mescroll.optUp.toTop.duration),this.$emit("topclick",this.mescroll)},setClientHeight:function(){var t=this;0!==this.mescroll.getClientHeight(!0)||this.isExec||(this.isExec=!0,this.$nextTick((function(){t.getClientInfo((function(e){t.isExec=!1,e?t.mescroll.setClientHeight(e.height):3!=t.clientNum&&(t.clientNum=null==t.clientNum?1:t.clientNum+1,setTimeout((function(){t.setClientHeight()}),100*t.clientNum))}))})))},getClientInfo:function(t){var e=uni.createSelectorQuery();e=e.in(this);var o=e.select("#"+this.viewId);o.boundingClientRect((function(e){t(e)})).exec()}},created:function(){var t=this,e={down:{inOffset:function(){t.downLoadType=1},outOffset:function(){t.downLoadType=2},onMoving:function(e,o,n){t.downHight=n,t.downRate=o},showLoading:function(e,o){t.downLoadType=3,t.downHight=o},beforeEndDownScroll:function(e){return t.downLoadType=4,e.optDown.beforeEndDelay},endDownScroll:function(){t.downLoadType=4,t.downHight=0,t.downResetTimer&&clearTimeout(t.downResetTimer),t.downResetTimer=setTimeout((function(){4===t.downLoadType&&(t.downLoadType=0)}),300)},callback:function(e){t.$emit("down",e)}},up:{showLoading:function(){t.upLoadType=1},showNoMore:function(){t.$nextTick((function(){t.upLoadType=2}))},hideUpScroll:function(e){t.upLoadType=e.optUp.hasNext?0:3},empty:{onShow:function(e){t.isShowEmpty=e}},toTop:{onShow:function(e){t.isShowToTop=e}},callback:function(e){t.$emit("up",e),t.setClientHeight()}}};i.default.extend(e,a.default);var o=JSON.parse(JSON.stringify({down:t.down,up:t.up}));i.default.extend(o,e),t.mescroll=new i.default(o),t.mescroll.viewId=t.viewId,t.$emit("init",t.mescroll);var n=uni.getSystemInfoSync();n.windowTop&&(t.windowTop=n.windowTop),n.windowBottom&&(t.windowBottom=n.windowBottom),n.windowHeight&&(t.windowHeight=n.windowHeight),n.statusBarHeight&&(t.statusBarHeight=n.statusBarHeight),t.mescroll.setBodyHeight(n.windowHeight),t.mescroll.resetScrollTo((function(e,o){if(t.scrollAnim=0!==o,"string"!==typeof e){var n=t.mescroll.getScrollTop();0===o||300===o?(t.scrollTop=n,t.$nextTick((function(){t.scrollTop=e}))):t.mescroll.getStep(n,e,(function(e){t.scrollTop=e}),o)}else t.getClientInfo((function(o){var n,i=o.top;-1==e.indexOf("#")&&-1==e.indexOf(".")?n="#"+e:(n=e,-1!=e.indexOf(">>>")&&(n=e.split(">>>")[1].trim())),uni.createSelectorQuery().select(n).boundingClientRect((function(e){if(e){var o=t.mescroll.getScrollTop(),a=e.top-i;a+=o,t.isFixed||(a-=t.numTop),t.scrollTop=o,t.$nextTick((function(){t.scrollTop=a}))}else console.error(n+" does not exist")})).exec()}))})),t.up&&t.up.toTop&&null!=t.up.toTop.safearea||(t.mescroll.optUp.toTop.safearea=t.safearea)},mounted:function(){this.setClientHeight()}};e.default=c},"608f":function(t,e,o){var n=o("24fb");e=n(!1),e.push([t.i,".mescroll-uni-warp[data-v-86fc822c]{height:100%}.mescroll-uni-content[data-v-86fc822c]{height:100%;position:relative}.mescroll-uni[data-v-86fc822c]{border-radius:%?20?% %?20?% 0 0;position:relative;width:100%;height:100%;min-height:%?200?%;overflow-y:auto;box-sizing:border-box /* 避免设置padding出现双滚动条的问题 */}\n\n/* 定位的方式固定高度 */.mescroll-uni-fixed[data-v-86fc822c]{z-index:1;position:fixed;top:0;left:0;right:0;bottom:0;width:auto; /* 使right生效 */height:auto /* 使bottom生效 */}\n\n/* 适配 iPhoneX */@supports (bottom:constant(safe-area-inset-bottom)) or (bottom:env(safe-area-inset-bottom)){.mescroll-safearea[data-v-86fc822c]{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}}\n\n/* 下拉刷新区域 */.mescroll-downwarp[data-v-86fc822c]{position:absolute;top:-100%;left:0;width:100%;height:100%;text-align:center}\n\n/* 下拉刷新--内容区,定位于区域底部 */.mescroll-downwarp .downwarp-content[data-v-86fc822c]{position:absolute;left:0;bottom:0;width:100%;min-height:%?60?%;padding:%?20?% 0;text-align:center}\n\n/* 下拉刷新--提示文本 */.mescroll-downwarp .downwarp-tip[data-v-86fc822c]{display:inline-block;font-size:%?28?%;vertical-align:middle;margin-left:%?16?%\n\t/* color: gray; 已在style设置color,此处删去*/}\n\n/* 下拉刷新--旋转进度条 */.mescroll-downwarp .downwarp-progress[data-v-86fc822c]{display:inline-block;width:%?32?%;height:%?32?%;border-radius:50%;border:%?2?% solid grey;border-bottom-color:transparent!important; /*已在style设置border-color,此处需加 !important*/vertical-align:middle}\n\n/* 旋转动画 */.mescroll-downwarp .mescroll-rotate[data-v-86fc822c]{-webkit-animation:mescrollDownRotate-data-v-86fc822c .6s linear infinite;animation:mescrollDownRotate-data-v-86fc822c .6s linear infinite}@-webkit-keyframes mescrollDownRotate-data-v-86fc822c{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes mescrollDownRotate-data-v-86fc822c{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}\n\n/* 上拉加载区域 */.mescroll-upwarp[data-v-86fc822c]{box-sizing:border-box;min-height:%?110?%;padding:%?30?% 0;text-align:center;clear:both}\n\n/*提示文本 */.mescroll-upwarp .upwarp-tip[data-v-86fc822c],\n.mescroll-upwarp .upwarp-nodata[data-v-86fc822c]{display:inline-block;font-size:%?28?%;vertical-align:middle\n\t/* color: gray; 已在style设置color,此处删去*/}.mescroll-upwarp .upwarp-tip[data-v-86fc822c]{margin-left:%?16?%}\n\n/*旋转进度条 */.mescroll-upwarp .upwarp-progress[data-v-86fc822c]{display:inline-block;width:%?32?%;height:%?32?%;border-radius:50%;border:%?2?% solid grey;border-bottom-color:transparent!important; /*已在style设置border-color,此处需加 !important*/vertical-align:middle}\n\n/* 旋转动画 */.mescroll-upwarp .mescroll-rotate[data-v-86fc822c]{-webkit-animation:mescrollUpRotate-data-v-86fc822c .6s linear infinite;animation:mescrollUpRotate-data-v-86fc822c .6s linear infinite}@-webkit-keyframes mescrollUpRotate-data-v-86fc822c{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes mescrollUpRotate-data-v-86fc822c{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}",""]),t.exports=e},"6da0":function(t,e,o){"use strict";var n=function(t){(t.options.wxs||(t.options.wxs={}))["wxsBiz"]=function(t){var e={};function o(t){e.optDown=t.optDown,e.scrollTop=t.scrollTop,e.bodyHeight=t.bodyHeight,e.isDownScrolling=t.isDownScrolling,e.isUpScrolling=t.isUpScrolling,e.isUpBoth=t.isUpBoth,e.isScrollBody=t.isScrollBody,e.startTop=t.scrollTop}function n(t,o,n){e.disabled()||t.callType&&("showLoading"===t.callType?e.showLoading(n):"endDownScroll"===t.callType?e.endDownScroll(n):"clearTransform"===t.callType&&e.clearTransform(n))}function i(t,o){e.downHight=0,e.startPoint=e.getPoint(t),e.startTop=e.getScrollTop(),e.startAngle=0,e.lastPoint=e.startPoint,e.maxTouchmoveY=e.getBodyHeight()-e.optDown.bottomOffset,e.inTouchend=!1,e.callMethod(o,{type:"setWxsProp"})}function a(t,o){var n=!0;if(e.disabled())return n;var i=e.getScrollTop(),a=e.getPoint(t),s=a.y-e.startPoint.y;if(s>0&&(e.isScrollBody&&i<=0||!e.isScrollBody&&(i<=0||i<=e.optDown.startTop&&i===e.startTop))&&!e.inTouchend&&!e.isDownScrolling&&!e.optDown.isLock&&(!e.isUpScrolling||e.isUpScrolling&&e.isUpBoth)){if(e.startAngle||(e.startAngle=e.getAngle(e.lastPoint,a)),e.startAngle<e.optDown.minAngle)return n;if(e.maxTouchmoveY>0&&a.y>=e.maxTouchmoveY)return e.inTouchend=!0,r(t,o),n;n=!1;var l=a.y-e.lastPoint.y;e.downHight<e.optDown.offset?(1!==e.movetype&&(e.movetype=1,e.callMethod(o,{type:"setLoadType",downLoadType:1}),e.isMoveDown=!0),e.downHight+=l*e.optDown.inOffsetRate):(2!==e.movetype&&(e.movetype=2,e.callMethod(o,{type:"setLoadType",downLoadType:2}),e.isMoveDown=!0),e.downHight+=l>0?l*e.optDown.outOffsetRate:l),e.downHight=Math.round(e.downHight);var c=e.downHight/e.optDown.offset;e.onMoving(o,c,e.downHight)}return e.lastPoint=a,n}function r(t,o){if(e.isMoveDown)e.downHight>=e.optDown.offset?(e.downHight=e.optDown.offset,e.callMethod(o,{type:"triggerDownScroll"})):(e.downHight=0,e.callMethod(o,{type:"endDownScroll"})),e.movetype=0,e.isMoveDown=!1;else if(!e.isScrollBody&&e.getScrollTop()===e.startTop){var n=e.getPoint(t).y-e.startPoint.y<0;if(n){var i=e.getAngle(e.getPoint(t),e.startPoint);i>80&&e.callMethod(o,{type:"triggerUpScroll"})}}e.callMethod(o,{type:"setWxsProp"})}return e.onMoving=function(t,e,o){t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"transform",transform:"translateY("+o+"px)",transition:""});var n=t.selectComponent(".mescroll-wxs-progress");n&&n.setStyle({transform:"rotate("+360*e+"deg)"})}))},e.showLoading=function(t){e.downHight=e.optDown.offset,t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"auto",transform:"translateY("+e.downHight+"px)",transition:"transform 300ms"})}))},e.endDownScroll=function(t){e.downHight=0,e.isDownScrolling=!1,t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"auto",transform:"translateY(0)",transition:"transform 300ms"})}))},e.clearTransform=function(t){t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"",transform:"",transition:""})}))},e.disabled=function(){return!e.optDown||!e.optDown.use||e.optDown.native},e.getPoint=function(t){return t?t.touches&&t.touches[0]?{x:t.touches[0].pageX,y:t.touches[0].pageY}:t.changedTouches&&t.changedTouches[0]?{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY}:{x:t.clientX,y:t.clientY}:{x:0,y:0}},e.getAngle=function(t,e){var o=Math.abs(t.x-e.x),n=Math.abs(t.y-e.y),i=Math.sqrt(o*o+n*n),a=0;return 0!==i&&(a=Math.asin(n/i)/Math.PI*180),a},e.getScrollTop=function(){return e.scrollTop||0},e.getBodyHeight=function(){return e.bodyHeight||0},e.callMethod=function(t,e){t&&t.callMethod("wxsCall",e)},t.exports={propObserver:o,callObserver:n,touchstartEvent:i,touchmoveEvent:a,touchendEvent:r},t.exports}({exports:{}})};e["a"]=n},"6fc5":function(t,e,o){"use strict";o.r(e);var n=o("59c1"),i=o("b60c");for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("0d8e");var r,s=o("f0c5"),l=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"4d0f3fac",null,!1,n["a"],r);e["default"]=l.exports},"762f":function(t,e,o){"use strict";o.r(e);var n=o("59f9"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"85d2":function(t,e,o){var n=o("608f");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=o("4f06").default;i("5bdb9652",n,!0,{sourceMap:!1,shadowMode:!1})},"890d":function(t,e,o){"use strict";var n=o("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.apiGoodsEdit=e.apiGoodsDetail=e.apiGoodsOperation=e.apiGoodsLists=void 0;var i=n(o("04cb")),a=function(t){return i.default.get("goods/lists",{params:t})};e.apiGoodsLists=a;var r=function(t){return i.default.post("goods/operation",t)};e.apiGoodsOperation=r;var s=function(t){return i.default.get("goods/detail",{params:t})};e.apiGoodsDetail=s;var l=function(t){return i.default.post("goods/edit",t)};e.apiGoodsEdit=l},"98bd":function(t,e,o){"use strict";o.r(e);var n=o("0ea7"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"9bdf":function(t,e,o){"use strict";var n;o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("v-uni-view",{staticClass:"mescroll-uni-warp"},[o("v-uni-scroll-view",{staticClass:"mescroll-uni",class:{"mescroll-uni-fixed":t.isFixed},style:{height:t.scrollHeight,"padding-top":t.padTop,"padding-bottom":t.padBottom,top:t.fixedTop,bottom:t.fixedBottom,backgroundColor:t.bgColor},attrs:{id:t.viewId,"scroll-top":t.scrollTop,"scroll-with-animation":t.scrollAnim,"scroll-y":t.scrollable,"enable-back-to-top":!0,throttle:!1},on:{scroll:function(e){arguments[0]=e=t.$handleEvent(e),t.scroll.apply(void 0,arguments)}}},[o("v-uni-view",{wxsProps:{"change:prop":"wxsProp"},staticClass:"mescroll-uni-content mescroll-render-touch",attrs:{"change:prop":t.wxsBiz.propObserver,prop:t.wxsProp},on:{touchstart:function(e){e=t.$handleWxsEvent(e),t.wxsBiz.touchstartEvent(e,t.$getComponentDescriptor())},touchmove:function(e){e=t.$handleWxsEvent(e),t.wxsBiz.touchmoveEvent(e,t.$getComponentDescriptor())},touchend:function(e){e=t.$handleWxsEvent(e),t.wxsBiz.touchendEvent(e,t.$getComponentDescriptor())},touchcancel:function(e){e=t.$handleWxsEvent(e),t.wxsBiz.touchendEvent(e,t.$getComponentDescriptor())}}},[t.topbar&&t.statusBarHeight?o("v-uni-view",{staticClass:"mescroll-topbar",style:{height:t.statusBarHeight+"px",background:t.topbar}}):t._e(),o("v-uni-view",{wxsProps:{"change:prop":"callProp"},staticClass:"mescroll-wxs-content",style:{transform:t.translateY,transition:t.transition},attrs:{"change:prop":t.wxsBiz.callObserver,prop:t.callProp}},[t.mescroll.optDown.use?o("v-uni-view",{staticClass:"mescroll-downwarp",style:{background:t.mescroll.optDown.bgColor,color:t.mescroll.optDown.textColor}},[o("v-uni-view",{staticClass:"downwarp-content"},[o("v-uni-view",{staticClass:"downwarp-progress mescroll-wxs-progress",class:{"mescroll-rotate":t.isDownLoading},style:{"border-color":t.mescroll.optDown.textColor,transform:t.downRotate}}),o("v-uni-view",{staticClass:"downwarp-tip"},[t._v(t._s(t.downText))])],1)],1):t._e(),t._t("default"),t.isShowEmpty?o("mescroll-empty",{attrs:{option:t.mescroll.optUp.empty},on:{emptyclick:function(e){arguments[0]=e=t.$handleEvent(e),t.emptyClick.apply(void 0,arguments)}}}):t._e(),t.mescroll.optUp.use&&!t.isDownLoading&&3!==t.upLoadType?o("v-uni-view",{staticClass:"mescroll-upwarp",style:{background:t.mescroll.optUp.bgColor,color:t.mescroll.optUp.textColor}},[o("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:1===t.upLoadType,expression:"upLoadType===1"}]},[o("v-uni-view",{staticClass:"upwarp-progress mescroll-rotate",style:{"border-color":t.mescroll.optUp.textColor}}),o("v-uni-view",{staticClass:"upwarp-tip"},[t._v(t._s(t.mescroll.optUp.textLoading))])],1),2===t.upLoadType?o("v-uni-view",{staticClass:"upwarp-nodata"},[t._v(t._s(t.mescroll.optUp.textNoMore))]):t._e()],1):t._e()],2),t.bottombar&&t.windowBottom>0?o("v-uni-view",{staticClass:"mescroll-bottombar",style:{height:t.windowBottom+"px"}}):t._e(),t.safearea?o("v-uni-view",{staticClass:"mescroll-safearea"}):t._e()],1)],1),o("mescroll-top",{attrs:{option:t.mescroll.optUp.toTop},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toTopClick.apply(void 0,arguments)}},model:{value:t.isShowToTop,callback:function(e){t.isShowToTop=e},expression:"isShowToTop"}}),o("v-uni-view",{wxsProps:{"change:prop":"wxsProp"},attrs:{"change:prop":t.renderBiz.propObserver,prop:t.wxsProp}})],1)},a=[]},b60c:function(t,e,o){"use strict";o.r(e);var n=o("fa48"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},bbfa:function(t,e,o){"use strict";o.r(e);var n=o("bd85"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},bd85:function(t,e,o){"use strict";var n=o("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("ad79")),a={mixins:[i.default]};e.default=a},be86:function(t,e,o){var n=o("24fb");e=n(!1),e.push([t.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-260e1ff2]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.goods[data-v-260e1ff2]{width:100%;padding:%?20?%;margin-bottom:%?20?%}.goods-wrap[data-v-260e1ff2]{width:100%}.goods-wrap .goods-name[data-v-260e1ff2]{color:#101010;font-size:%?28?%}.goods-wrap .goods-price[data-v-260e1ff2]{color:red;font-size:%?28?%}.goods-wrap > uni-view[data-v-260e1ff2]{width:100%}.goods-wrap .image[data-v-260e1ff2]{flex:0}",""]),t.exports=e},c1f3:function(t,e,o){"use strict";var n=o("f024"),i=o.n(n);i.a},cab0:function(t,e,o){"use strict";var n=o("85d2"),i=o.n(n);i.a},d085:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"GoodsCard",props:{data:{type:Object,default:function(){}}},methods:{toDetail:function(t){this.$Router.push({path:"/pages/goods_detail/goods_detail",query:{id:t}})}}};e.default=n},e651:function(t,e,o){var n=o("5289");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=o("4f06").default;i("0f6bc799",n,!0,{sourceMap:!1,shadowMode:!1})},e97c:function(t,e,o){"use strict";var n=o("169b"),i=o.n(n);i.a},eb76:function(t,e,o){"use strict";o.r(e);var n=o("31a4"),i=o("98bd");for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("e97c");var r,s=o("f0c5"),l=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"2bdeb282",null,!1,n["a"],r);e["default"]=l.exports},f024:function(t,e,o){var n=o("be86");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=o("4f06").default;i("48e355e2",n,!0,{sourceMap:!1,shadowMode:!1})},fa48:function(t,e,o){"use strict";o("a9e3"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-search",props:{shape:{type:String,default:"round"},bgColor:{type:String,default:"#f2f2f2"},placeholder:{type:String,default:"请输入关键字"},clearabled:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},showAction:{type:Boolean,default:!0},actionStyle:{type:Object,default:function(){return{}}},actionText:{type:String,default:"搜索"},inputAlign:{type:String,default:"left"},disabled:{type:Boolean,default:!1},animation:{type:Boolean,default:!1},borderColor:{type:String,default:"none"},value:{type:String,default:""},height:{type:[Number,String],default:64},inputStyle:{type:Object,default:function(){return{}}},maxlength:{type:[Number,String],default:"-1"},searchIconColor:{type:String,default:""},color:{type:String,default:"#606266"},placeholderColor:{type:String,default:"#909399"},margin:{type:String,default:"0"},searchIcon:{type:String,default:"search"}},data:function(){return{keyword:"",showClear:!1,show:!1,focused:this.focus}},watch:{keyword:function(t){this.$emit("input",t),this.$emit("change",t)},value:{immediate:!0,handler:function(t){this.keyword=t}}},computed:{showActionBtn:function(){return!(this.animation||!this.showAction)},borderStyle:function(){return this.borderColor?"1px solid ".concat(this.borderColor):"none"}},methods:{inputChange:function(t){this.keyword=t.detail.value},clear:function(){var t=this;this.keyword="",this.$nextTick((function(){t.$emit("clear")}))},search:function(t){this.$emit("search",t.detail.value);try{uni.hideKeyboard()}catch(t){}},custom:function(){this.$emit("custom",this.keyword);try{uni.hideKeyboard()}catch(t){}},getFocus:function(){this.focused=!0,this.animation&&this.showAction&&(this.show=!0),this.$emit("focus",this.keyword)},blur:function(){var t=this;setTimeout((function(){t.focused=!1}),100),this.show=!1,this.$emit("blur",this.keyword)},clickHandler:function(){this.disabled&&this.$emit("click")}}};e.default=n}}]); |