pages-shopping-index.cd94c1f3.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-shopping-index"],{2006:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return i}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"top-content"},[i("v-uni-view",{staticClass:"status_bar",style:{height:t.statusBarHeight}}),i("v-uni-view",{staticClass:"top-title"},[t._v("健康商城")]),i("v-uni-view",{staticClass:"search-cont"},[i("v-uni-view",{staticClass:"inner"},[i("v-uni-image",{staticClass:"icon-search",attrs:{src:n("fcab"),mode:""}}),i("v-uni-input",{attrs:{type:"text",disabled:!0,"confirm-type":"搜索",placeholder:"输入药品名称","placeholder-style":"font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toSearch.apply(void 0,arguments)}}})],1)],1)],1),i("v-uni-view",{staticClass:"medic-box",style:{height:t.divHeight}},[i("v-uni-view",{staticClass:"cate-list"},t._l(t.cates,(function(e,n){return i("v-uni-view",{key:n,class:t.cateSelect==e.cateId?"item active":"item",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.choseCate(e)}}},[t._v(t._s(e.cateName))])})),1),i("v-uni-view",{staticClass:"medic"},[i("v-uni-view",{staticClass:"banner-box"},[i("v-uni-swiper",{staticClass:"swiper",attrs:{"indicator-dots":!0,circular:!0,autoplay:!0,interval:3e3,duration:1e3,"indicator-color":"rgba(255, 255, 255, 0.6)","indicator-active-color":"#ffffff"}},t._l(t.advs,(function(e,n){return i("v-uni-swiper-item",{key:n,staticClass:"swiper-item",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.handleAdvClick(e)}}},[i("v-uni-image",{attrs:{src:e.imageUrl,mode:""}})],1)})),1)],1),i("v-uni-view",{staticClass:"medic-list"},[i("v-uni-view",{staticClass:"inner-list"},t._l(t.subCates,(function(e,n){return i("v-uni-view",{staticClass:"definite",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.showProductList(e)}}},[i("v-uni-view",{staticClass:"img-box"},[i("v-uni-image",{attrs:{src:e.pic,mode:"aspectFit"}})],1),i("v-uni-view",{staticClass:"name ellipsis"},[t._v(t._s(e.cateName))])],1)})),1)],1)],1)],1)],1)},c=[]},3182:function(t,e,n){"use strict";var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.getProductCate=o,e.getProductCateByPid=r,e.getProducts=d,e.getProductDetails=s,e.getCarts=u,e.addCart=l,e.delCart=f,e.cartNum=p,e.getCartCount=g,e.getGoodsProduct=v,e.getGoodsProducts=h,e.getTuiProducts=m,e.getStoreProductAttrValueList=b;var a=i(n("9bb2")),c=(new a.default).http;function o(t){return c("/app/product/getProductCate",t,"GET")}function r(t){return c("/app/product/getProductCateByPid",t,"GET")}function d(t){return c("/app/product/getProducts",t,"GET")}function s(t){return c("/app/product/getProductDetails",t,"GET")}function u(t){return c("/app/product/getCarts",t,"GET")}function l(t){return c("/app/product/addCart",t,"POST","application/json;charset=UTF-8")}function f(t){return c("/app/product/delCart",t,"POST","application/json;charset=UTF-8")}function p(t){return c("/app/product/cartNum",t,"POST","application/json;charset=UTF-8")}function g(t){return c("/app/product/getCartCount",t,"GET")}function v(){return c("/app/product/getGoodsProduct",null,"GET")}function h(t){return c("/app/product/getGoodsProducts",t,"GET")}function m(t){return c("/app/product/getTuiProducts",t,"GET")}function b(t){return c("/app/product/getStoreProductAttrValueList",t,"GET")}},"4fb5":function(t,e,n){"use strict";n.r(e);var i=n("2006"),a=n("6c34");for(var c in a)"default"!==c&&function(t){n.d(e,t,(function(){return a[t]}))}(c);n("502e");var o,r=n("f0c5"),d=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"5c13a974",null,!1,i["a"],o);e["default"]=d.exports},"502e":function(t,e,n){"use strict";var i=n("75a7"),a=n.n(i);a.a},"6c34":function(t,e,n){"use strict";n.r(e);var i=n("7f46"),a=n.n(i);for(var c in i)"default"!==c&&function(t){n.d(e,t,(function(){return i[t]}))}(c);e["default"]=a.a},"75a7":function(t,e,n){var i=n("a286");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("523206ec",i,!0,{sourceMap:!1,shadowMode:!1})},"7f46":function(t,e,n){"use strict";(function(t){n("4de4"),n("ac1f"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("3182"),a=n("8d7c"),c={data:function(){return{divHeight:"0px",allCates:[],cates:[],subCates:[],statusBarHeight:uni.getStorageSync("menuInfo").statusBarHeight,cateSelect:0,advs:[]}},onLoad:function(){uni.showShareMenu({withShareTicket:!0,menus:["shareAppMessage","shareTimeline"]}),this.getProductCate()},onShow:function(){var e=this;setTimeout((function(){var n=uni.createSelectorQuery().select(".top-content");n.boundingClientRect((function(n){t.log(n.height),e.divHeight="calc(100% - "+n.height+"px)"})).exec()}),500),this.getAdv()},methods:{divHeight:function(){return"height:calc(100% - ${this.top}px);"},toSearch:function(){uni.navigateTo({url:"../home/productSearch"})},handleAdvClick:function(e){t.log(e),1==e.showType?(uni.setStorageSync("url",e.advUrl),uni.navigateTo({url:"../home/h5"})):2==e.showType?uni.navigateTo({url:e.advUrl}):3==e.showType&&(uni.setStorageSync("content",e.content),uni.navigateTo({url:"../home/content"}))},getAdv:function(){var t=this,e={advType:2};(0,a.getAdv)(e).then((function(e){200==e.code&&(t.advs=e.data)}),(function(t){}))},getProductCate:function(){var t=this,e={};(0,i.getProductCate)(e).then((function(e){200==e.code?(t.allCates=e.data,t.cates=t.allCates.filter((function(t){return 0==t.pid})),null!=t.cates&&t.cates.length>0&&(t.cateSelect=t.cates[0].cateId,t.getSubCate())):uni.showToast({icon:"none",title:"请求失败"})}),(function(t){}))},choseCate:function(t){this.cateSelect=t.cateId,this.getSubCate()},getSubCate:function(){var e=this;this.subCates=this.allCates.filter((function(t){return t.pid==e.cateSelect})),t.log(this.subCates)},showProductList:function(t){uni.navigateTo({url:"./productList?cateId="+t.cateId+"&pid="+t.pid})},goSearch:function(t){null!=t.detail.value&&""!=t.detail.value&&this.utils.addHisSearch(t.detail.value),uni.navigateTo({url:"../home/productList?searchValue="+t.detail.value})}}};e.default=c}).call(this,n("5a52")["default"])},"8d7c":function(t,e,n){"use strict";var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.getAdv=o;var a=i(n("9bb2")),c=(new a.default).http;function o(t){return c("/app/adv/getAdv",t,"GET")}},a286:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */uni-page-body[data-v-5c13a974]{height:100%;background-color:#fff}.content[data-v-5c13a974]{height:100%;display:flex;flex-direction:column}.content .top-content[data-v-5c13a974]{width:100%;z-index:10}.content .top-content .top-title[data-v-5c13a974]{height:%?88?%;line-height:%?88?%;font-size:%?42?%;font-family:Source Han Sans CN;font-weight:700;color:#222;padding-left:%?41?%;background-color:#fff}.content .top-content .search-cont[data-v-5c13a974]{padding:%?16?% %?30?%;background-color:#fff}.content .top-content .search-cont .inner[data-v-5c13a974]{box-sizing:border-box;width:100%;height:%?72?%;background:#f7f7f7;border-radius:%?36?%;display:flex;align-items:center;padding:0 %?30?%}.content .top-content .search-cont .inner .icon-search[data-v-5c13a974]{width:%?28?%;height:%?28?%;margin-right:%?20?%}.content .top-content .search-cont .inner uni-input[data-v-5c13a974]{height:%?60?%;line-height:%?60?%;flex:1}.content .medic-box[data-v-5c13a974]{display:flex}.content .medic-box .cate-list[data-v-5c13a974]{box-sizing:border-box;width:%?200?%;background:#f2f5f9;display:flex;flex-direction:column;padding:%?20?% 0;overflow-y:scroll}.content .medic-box .cate-list .item[data-v-5c13a974]{height:%?100?%;line-height:%?100?%;padding-left:%?30?%;font-size:%?28?%;font-family:PingFang SC;font-weight:500;color:#333;position:relative}.content .medic-box .cate-list .item.active[data-v-5c13a974]{color:#2bc7b9}.content .medic-box .cate-list .item.active[data-v-5c13a974]::after{content:"";width:%?8?%;height:%?50?%;background:#2bc7b9;position:absolute;top:%?25?%;left:0}.content .medic-box .medic[data-v-5c13a974]{box-sizing:border-box;width:calc(100% - %?200?%);height:100%;padding:0 %?30?%}.content .medic-box .medic .banner-box[data-v-5c13a974]{margin-top:%?30?%;width:100%;height:%?160?%;border-radius:%?10?%;overflow:hidden}.content .medic-box .medic .banner-box .swiper[data-v-5c13a974],\r\n.content .medic-box .medic .banner-box .swiper-item[data-v-5c13a974],\r\n.content .medic-box .medic .banner-box .swiper-item uni-image[data-v-5c13a974]{width:100%;height:100%}.content .medic-box .medic .medic-list[data-v-5c13a974]{box-sizing:border-box;padding:%?30?% 0;overflow-y:auto;height:calc(100% - %?220?%);position:relative}.content .medic-box .medic .medic-list .inner-list[data-v-5c13a974]{display:flex;flex-wrap:wrap}.content .medic-box .medic .medic-list .inner-list .definite[data-v-5c13a974]{width:calc(33% - %?20?%);margin-right:%?30?%;margin-bottom:%?30?%}.content .medic-box .medic .medic-list .inner-list .definite .img-box[data-v-5c13a974]{width:100%;height:%?144?%;background:#f5f5f5;border-radius:%?8?%;overflow:hidden;display:flex;align-items:center}.content .medic-box .medic .medic-list .inner-list .definite .img-box uni-image[data-v-5c13a974]{max-width:100%}.content .medic-box .medic .medic-list .inner-list .definite .name[data-v-5c13a974]{width:100%;margin-top:%?20?%;font-size:%?24?%;font-family:PingFang SC;font-weight:500;color:#666;text-align:center}.content .medic-box .medic .medic-list .inner-list .definite[data-v-5c13a974]:nth-child(3n){margin-right:0}body.?%PAGE?%[data-v-5c13a974]{background-color:#fff}',""]),t.exports=e},fcab:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAABANJREFUSEu1ll2IG1UUx/9nkl1aa0VaUfxqEQT1oRRl3czOZhJj2UxExdrqVl9Eav3uQ0EUrRUqtKgvtShFKoiixY+qrR+0TXbbhuwkm5k19UF9sFR8SN1dFSpkH7o1m9wjdzITJ1mzSXfXgUBm7v+c35wz99xzCG2upGmvBfNGIoQB3AxgJUAM8DkAp4lgUlV8MRDVfmznS65TK9ExM3+HAmU3wFonjgCYEMoOI9o7Mpd+FvDbQuGS7umZtwB6rEOQX8YA3u2uTG+LxWIX/su+AZhOF64oBytHAPQ2iX8DcJSZC0TKZGnFpUPL/5y6RulCP5juAyB/3XUbRp6D4p6Epv3VDK0Da5FVTgII+URnQPxKvl/9fCeRaBVxKjN2PSliLwMbfBp7eUDENE2b9tvVgSnTeg/A5voi4UB5SfDJe3t6zneSWmamVNZ6gUCv+fbGfkNXn5oFTGXsO6HwCW+BQXsSeui5TkDNmpRpvQhAQuXFTBRNhEOmp3MiTJlWHoDqKMAnpibPGoODg9X5AGWkQ1n7EID1rr1p6GqkDkyO5G8jolPugwoHxC0JTftlPjDPRn5TKEL6cDaSYKy9K6L+IP9TMpvfTUzbawnAZ0ZEfWghMM82aVofE/Cwm9lXDb1vpwNMmZYsVL2WcDyQiKhfLgZwy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