You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
11 KiB
1 lines
11 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["technician-pages-shop-list"],{"1dca":function(t,e,i){var a=i("fef9");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("967d").default;n("7cf4c96a",a,!0,{sourceMap:!1,shadowMode:!1})},8061:function(t,e,i){"use strict";i.r(e);var a=i("a12e"),n=i("85cb");for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("fc47");var s=i("828b"),r=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"26d96946",null,!1,a["a"],void 0);e["default"]=r.exports},"85cb":function(t,e,i){"use strict";i.r(e);var a=i("a611"),n=i.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);e["default"]=n.a},a12e:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.isLoad?i("v-uni-view",{staticClass:"shop"},[i("fixed",{attrs:{zIndex:998}},[i("v-uni-view",{staticClass:"shop-top rel"},[i("v-uni-view",{staticClass:"abs shop-top-bgcolor",style:{backgroundColor:t.primaryColor}}),i("v-uni-view",{staticClass:"pl-md pr-md fill-base shop-search box-shadow pt-lg"},[i("search",{staticClass:"flex-1",attrs:{type:"input",confirmSearch:!1,padding:0,keyword:t.param.name,radius:30,placeholder:"输入产品名称查询"},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.toSearch.apply(void 0,arguments)}}}),i("v-uni-view",{staticClass:"shop-nav flex-y-center flex-between mt-lg"},[i("v-uni-scroll-view",{staticClass:"flex-1 flex scroll-box",attrs:{"scroll-x":"true","scroll-left":t.scrollLeft,"scroll-with-animation":!0}},t._l(t.navList,(function(e,a){return i("v-uni-view",{key:a,staticClass:"scroll-item",style:{color:t.param.carte==e.id?t.primaryColor:"#000"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.toTabItemChange(a,e.id)}}},[t._v(t._s(e.name))])})),1),i("v-uni-view",{staticClass:"flex-between shop-top-more",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.navMore.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"ml-sm c-paragraph f-caption"},[t._v("更多")]),i("v-uni-view",{staticClass:"icongengduo1 iconfont c-paragraph"})],1)],1)],1)],1)],1),i("v-uni-view",{staticClass:"shop-list pl-sm pr-sm flex"},[t._l(t.list.data,(function(e,a){return[i("v-uni-view",{key:a+"_0",staticClass:"shop-item ml-sm mr-sm fill-base radius-16",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.$util.goUrl({url:"/technician/pages/shop/detail?id="+e.id})}}},[i("v-uni-view",{staticClass:"shop-item-image"},[i("v-uni-image",{attrs:{src:e.cover,mode:"aspectFill"}})],1),i("v-uni-view",{staticClass:"pt-md pl-md pr-md"},[i("v-uni-view",{staticClass:"shop-item-title f-desc ellipsis"},[t._v(t._s(e.name))]),i("v-uni-view",{staticClass:"pt-sm c-warning"},[i("v-uni-text",{staticClass:"f-caption"},[t._v("¥")]),i("v-uni-text",{staticClass:"f-title text-bold"},[t._v(t._s(e.price))])],1)],1)],1)]}))],2),i("uni-popup",{ref:"nav_more",attrs:{type:"top",custom:!0,maskClick:!1,top:"124rpx"}},[i("v-uni-view",{staticClass:"fill-base more-box pl-lg pr-lg pt-lg"},[i("v-uni-view",{staticClass:"more-box-title f-mini-title c-black text-bold"},[t._v("类别")]),i("v-uni-scroll-view",{staticClass:"more-list flex flex-warp",attrs:{"scroll-y":!0}},[t._l(t.navList,(function(e,a){return[i("v-uni-view",{key:a+"_0",staticClass:"more-item mb-md rel ellipsis",class:a%3>0?"ml-md":"",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.toItemChange(a,e.id)}}},[i("v-uni-view",{staticClass:"more-item-bg abs",style:{backgroundColor:t.current.id==e.id?t.primaryColor:"#F5F5F5"}}),i("v-uni-text",{staticClass:"text-center pl-sm pr-sm",style:{color:t.current.id==e.id?t.primaryColor:"#000"}},[t._v(t._s(e.name))])],1)]}))],2),i("v-uni-view",{staticClass:"more-footer flex-center"},[i("v-uni-view",{staticClass:"more-btn flex-center radius-16 c-black more-btn-reset f-paragraph mr-lg",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.setNav(1)}}},[t._v("重置")]),i("v-uni-view",{staticClass:"more-btn flex-center radius-16 c-base f-paragraph",style:{backgroundColor:t.primaryColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.setNav(2)}}},[t._v("确定")])],1)],1)],1),t.loading?i("load-more",{attrs:{noMore:t.list.current_page>=t.list.last_page&&t.list.data.length>0,loading:t.loading}}):t._e(),!t.loading&&t.list.data.length<=0&&1==t.list.current_page?i("abnor"):t._e(),i("v-uni-view",{staticClass:"space-footer"})],1):t._e()},n=[]},a611:function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("5c47"),i("c223"),i("3efd"),i("bf0f"),i("2797");var n=a(i("2634")),o=a(i("2fdc")),s=i("8f59"),r=null,l={data:function(){return{loading:!0,isLoad:!1,activeIndex:0,param:{page:1,limit:10,name:"",carte:0},list:{data:[]},navList:[],current:{index:0,id:0},scrollLeft:0,contentScrollW:0}},computed:(0,s.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo}}),onLoad:function(){var t=this;return(0,o.default)((0,n.default)().mark((function e(){return(0,n.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$util.setNavigationBarColor({bg:t.primaryColor}),e.next=3,t.carteListCall();case 3:t.initIndex();case 4:case"end":return e.stop()}}),e)})))()},methods:{initIndex:function(){var t=arguments,e=this;return(0,o.default)((0,n.default)().mark((function i(){var a;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=t.length>0&&void 0!==t[0]&&t[0],a||!e.$jweixin.isWechat()){i.next=5;break}return i.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:e.getList();case 6:case"end":return i.stop()}}),i)})))()},getScrollW:function(){var t=this,e=uni.createSelectorQuery().in(this);e.select(".scroll-box").boundingClientRect((function(e){t.contentScrollW=e.width})).exec(),e.selectAll(".scroll-item").boundingClientRect((function(e){for(var i=e.length,a=0;a<i;a++)t.navList[a].left=e[a].left,t.navList[a].width=e[a].width})).exec()},toSearch:function(t){var e=this;clearTimeout(r),r=setTimeout((function(){e.param.name=t,e.initRefresh()}),1e3)},toTabItemChange:function(t,e){this.scrollLeft=this.navList[t].left-this.contentScrollW/2+this.navList[t].width/2-20,this.param.carte=e,this.toItemChange(t,e),this.initRefresh()},toItemChange:function(t,e){this.current={index:t,id:e}},navMore:function(){this.$refs.nav_more.open()},setNav:function(t){1==t?(this.param.name="",this.toTabItemChange(0,0)):this.toTabItemChange(this.current.index,this.current.id),this.$refs.nav_more.close()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},getList:function(){var t=this;return(0,o.default)((0,n.default)().mark((function e(){var i,a,o;return(0,n.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$util.showLoading(),i=t.list,a=t.param,t.activeIndex,e.next=4,t.$api.technician.goodsList(a);case 4:o=e.sent,1==t.param.page||(o.data=i.data.concat(o.data)),t.list=o,t.loading=!1,t.isLoad=!0,t.$util.hideAll();case 9:case"end":return e.stop()}}),e)})))()},carteListCall:function(t){var e=this;return(0,o.default)((0,n.default)().mark((function i(){var a;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,e.$api.technician.carteList();case 2:e.navList=i.sent,e.navList.unshift({id:0,name:"全部"}),t&&(a=!1,e.navList.forEach((function(t){t.id==e.param.carte&&(a=!0)})),a||e.toTabItemChange(0,0)),setTimeout((function(){e.getScrollW()}),1e3);case 6:case"end":return i.stop()}}),i)})))()}},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),this.carteListCall(!0),uni.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())}};e.default=l},fc47:function(t,e,i){"use strict";var a=i("1dca"),n=i.n(a);n.a},fef9:function(t,e,i){var a=i("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/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.shop .shop-top[data-v-26d96946]{padding-top:%?10?%}.shop .shop-top .shop-top-bgcolor[data-v-26d96946]{height:%?60?%;top:0;left:0;width:100%;z-index:-1}.shop .shop-top .scroll-box[data-v-26d96946]{width:100%;overflow-x:auto;white-space:nowrap}.shop .shop-top .scroll-box .scroll-item[data-v-26d96946]{padding-right:%?40?%;position:relative;display:inline-block;vertical-align:top}.shop .shop-top .shop-top-more[data-v-26d96946]{width:%?112?%;box-shadow:0 0 5px #eee;height:%?94?%}.shop .shop-search[data-v-26d96946]{border-top-left-radius:%?40?%;border-top-right-radius:%?40?%;overflow:hidden;margin-bottom:%?-2?%}.shop .shop-search .shop-top-time[data-v-26d96946]{width:%?70?%;height:%?70?%}.shop .shop-search .shop-top-time .shop-top-bg[data-v-26d96946]{width:%?70?%;height:%?70?%;border-radius:%?70?%;opacity:.1}.shop .shop-nav[data-v-26d96946]{height:%?94?%;overflow:hidden}.shop .shop-list[data-v-26d96946]{flex-flow:wrap}.shop .shop-list .shop-item[data-v-26d96946]{width:calc(50% - %?20?%);height:%?483?%;overflow:hidden;margin-top:%?25?%}.shop .shop-list .shop-item .shop-item-image[data-v-26d96946]{height:%?350?%;width:100%}.shop .shop-list .shop-item .shop-item-image uni-image[data-v-26d96946]{width:100%;height:100%}.shop .more-box .more-list[data-v-26d96946]{padding-top:%?40?%;max-height:%?290?%}.shop .more-box .more-item[data-v-26d96946]{width:calc((100% - %?40?%) / 3);height:%?78?%;background-color:#f5f5f5;border-radius:%?8?%;display:inline-block;vertical-align:top;text-align:center;line-height:%?78?%;overflow:hidden}.shop .more-box .more-item .more-item-bg[data-v-26d96946]{width:100%;height:100%;opacity:.1}.shop .more-box .more-item uni-text[data-v-26d96946]{width:100%}.shop .more-box .more-footer[data-v-26d96946]{padding-top:%?140?%;padding-bottom:%?40?%}.shop .more-box .more-footer .more-btn[data-v-26d96946]{width:%?260?%;height:%?72?%}.shop .more-box .more-footer .more-btn-reset[data-v-26d96946]{background-color:#f2f2f2}',""]),t.exports=e}}]); |