| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-index"],{"04be":function(t,e,i){"use strict";i.r(e);var a=i("36d5"),n=i("0b70");for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("8b8f");var s=i("828b"),r=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"1be899ec",null,!1,a["a"],void 0);e["default"]=r.exports},"0b70":function(t,e,i){"use strict";i.r(e);var a=i("c828"),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},2480: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/* crmeb颜色变量 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.empty-box[data-v-1be899ec]{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-top:%?200?%}.empty-box uni-image[data-v-1be899ec]{width:%?414?%;height:%?240?%}.empty-box .txt[data-v-1be899ec]{font-size:%?26?%;color:#999}',""]),t.exports=e},2906:function(t,e,i){"use strict";var a=i("c360"),n=i.n(a);n.a},"2b89":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.pageShow?i("v-uni-view",{staticClass:"page",class:2==t.bgTabVal?"fullsize noRepeat":1==t.bgTabVal?"repeat ysize":"noRepeat ysize",style:[t.pageStyle]},[t.errorNetwork?t._e():i("v-uni-view",{style:t.colorStyle},[t.showHomeComb?i("homeComb",{attrs:{dataConfig:t.homeCombData,belongIndex:t.belongIndex,isScrolled:t.isScrolled},on:{bindSortId:function(e){arguments[0]=e=t.$handleEvent(e),t.bindSortId.apply(void 0,arguments)},storeTap:function(e){arguments[0]=e=t.$handleEvent(e),t.storeTap.apply(void 0,arguments)}}}):t._e(),t.isHeaderSerch?i("headerSerch",{attrs:{dataConfig:t.headerSerchCombData,belongIndex:t.belongIndex},on:{storeTap:function(e){arguments[0]=e=t.$handleEvent(e),t.storeTap.apply(void 0,arguments)}}}):t._e(),t.showCateNav?i("tabNav",{attrs:{dataConfig:t.cateNavData,isFixed:t.isFixed&&!t.cateNavData.stickyConfig.tabVal},on:{bindHeight:function(e){arguments[0]=e=t.$handleEvent(e),t.bindHeighta.apply(void 0,arguments)},bindSortId:function(e){arguments[0]=e=t.$handleEvent(e),t.bindSortId.apply(void 0,arguments)}}}):t._e(),i("v-uni-view",{staticClass:"index"},[t._l(t.styleConfig,(function(e,a){return["userInfor"==e.name?i("userInfor",{key:a+"_0",attrs:{dataConfig:e},on:{changeLogin:function(e){arguments[0]=e=t.$handleEvent(e),t.changeLogin.apply(void 0,arguments)}}}):t._e(),"newVip"==e.name?i("newVip",{key:a+"_1",attrs:{dataConfig:e}}):t._e(),"articleList"==e.name?i("articleList",{key:a+"_2",attrs:{dataConfig:e}}):t._e(),"bargain"==e.name?i("bargain",{key:a+"_3",attrs:{dataConfig:e},on:{changeBarg:function(e){arguments[0]=e=t.$handleEvent(e),t.changeBarg.apply(void 0,arguments)}}}):t._e(),"blankPage"==e.name?i("blankPage",{key:a+"_4",attrs:{dataConfig:e}}):t._e(),"combination"==e.name?i("combination",{key:a+"_5",attrs:{dataConfig:e}}):t._e(),"coupon"==e.name?i("coupon",{key:a+"_6",attrs:{dataConfig:e},on:{changeLogin:function(e){arguments[0]=e=t.$handleEvent(e),t.changeLogin.apply(void 0,arguments)}}}):t._e(),"customerService"==e.name?i("customerService",{key:a+"_7",attrs:{dataConfig:e}}):t._e(),"goodList"==e.name?i("goodList",{key:a+"_8",ref:"goodLists",refInFor:!0,attrs:{dataConfig:e}}):t._e(),"guide"==e.name?i("guide",{key:a+"_9",attrs:{dataConfig:e}}):t._e(),"menus"==e.name?i("menus",{key:a+"_10",attrs:{dataConfig:e}}):t._e(),"news"==e.name?i("news",{key:a+"_11",attrs:{dataConfig:e}}):t._e(),"pictureCube"==e.name?i("pictureCube",{key:a+"_12",attrs:{dataConfig:e}}):t._e(),"promotionList"==e.name?i("promotionList",{key:a+"_13",ref:"promotionLists",refInFor:!0,attrs:{dataConfig:e,productVideoStatus:t.product_video_status,positionTop:t.positionTop}}):t._e(),"seckill"==e.name?i("seckill",{key:a+"_14",attrs:{dataConfig:e}}):t._e(),"swiperBg"==e.name?i("swiperBg",{key:a+"_15",attrs:{dataConfig:e}}):t._e(),"swipers"==e.name?i("swipers",{key:a+"_16",attrs:{dataConfig:e}}):t._e(),"titles"==e.name?i("titles",{key:a+"_17",attrs:{dataConfig:e}}):t._e(),"ranking"==e.name?i("ranking",{key:a+"_18",attrs:{dataConfig:e}}):t._e(),"presale"==e.name?i("presale",{key:a+"_19",attrs:{dataConfig:e}}):t._e(),"pointsMall"==e.name?i("pointsMall",{key:a+"_20",attrs:{dataConfig:e}}):t._e(),"richText"==e.name?i("richText",{key:a+"_21",attrs:{dataConfig:e}}):t._e(),"videos"==e.name?i("videos",{key:a+"_22",attrs:{dataConfig:e}}):t._e(),"signIn"==e.name?i("signIn",{key:a+"_23",attrs:{dataConfig:e}}):t._e(),"hotspot"==e.name?i("hotspot",{key:a+"_24",attrs:{dataConfig:e}}):t._e(),"follow"==e.name?i("follow",{key:a+"_25",attrs:{dataConfig:e}}):t._e()]})),t.styleConfig.length?t._e():i("v-uni-view",{staticClass:"sort-product px-20"},[t.sortList.children&&t.sortList.children.length?i("v-uni-view",{staticClass:"rd-24rpx bg--w111-fff p-24 mb-24"},[i("v-uni-scroll-view",{staticClass:"white-nowrap vertical-middle w-full",attrs:{"scroll-x":"true","show-scrollbar":"false"}},t._l(t.sortList.children,(function(e,a){return i("v-uni-view",{key:a,staticClass:"inline-block mr-24"},[i("v-uni-view",{staticClass:"flex-col flex-center",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.changeSort(e,a)}}},[i("v-uni-view",{staticClass:"picture w-90 h-90 rd-50-p111-",class:{select:t.curSort==a}},[i("v-uni-image",{staticClass:"w-full h-full rd-50-p111-",attrs:{src:e.pic}})],1),i("v-uni-text",{staticClass:"fs-24 pt-14",class:{"font-num":t.curSort==a}},[t._v(t._s(e.cate_name))])],1)],1)})),1)],1):t._e(),i("waterfallsFlow",{ref:"waterfallsFlow",attrs:{wfList:t.goodList,goDetail:"goDetail"},on:{itemTap:function(e){arguments[0]=e=t.$handleEvent(e),t.goDetail.apply(void 0,arguments)}}}),i("Loading",{attrs:{loaded:t.loaded,loading:t.loading}}),0==t.goodList.length&&t.loaded?i("v-uni-view",[i("emptyPage",{attrs:{title:"暂无商品,去看点别的吧~"}})],1):t._e()],1),i("couponWindow",{attrs:{window:t.isCouponShow,couponImage:t.couponObj.image,couponList:t.couponObj.list},on:{onColse:function(e){arguments[0]=e=t.$handleEvent(e),t.couponClose.apply(void 0,arguments)}}}),i("v-uni-view",{},[t._v(t._s(t.site_config))]),t.configData&&t.configData.record_No?i("v-uni-view",{staticClass:"site-config",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goICP(t.configData.icp_url)}}},[t._v(t._s(t.configData.record_No))]):t._e(),t.configData&&t.configData.network_security?i("v-uni-view",{staticClass:"site-config",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goICP(t.configData.network_security_url)}}},[i("v-uni-image",{staticClass:"ban",attrs:{src:"/static/images/beian.png",alt:"",srcset:""}}),t._v(t._s(t.configData.network_security))],1):t._e(),t.isFooter?i("v-uni-view",{staticClass:"pb-safe",style:[t.pdHeights]}):t._e(),i("pageFooter",{attrs:{configData:t.footerConfigData},on:{newDataStatus:function(e){arguments[0]=e=t.$handleEvent(e),t.newDataStatus.apply(void 0,arguments)}}})],2)],1)],1):i("v-uni-view",[i("v-uni-view",{staticClass:"error-network"},[i("v-uni-image",{attrs:{src:t.imgHost+"/statics/images/error-network.gif"}}),i("v-uni-view",{staticClass:"title"},[t._v(t._s(t.$t("网络连接断开")))]),i("v-uni-view",{staticClass:"con"},[i("v-uni-view",{staticClass:"label"},[t._v(t._s(t.$t("请检查情况"))+":")]),i("v-uni-view",{staticClass:"item"},[t._v("· "+t._s(t.$t("在设置中是否已开启网络权限")))]),i("v-uni-view",{staticClass:"item"},[t._v("· "+t._s(t.$t("当前是否处于弱网环境")))]),i("v-uni-view",{staticClass:"item"},[t._v("· "+t._s(t.$t("版本是否过低,升级试试吧")))])],1),i("v-uni-view",{staticClass:"btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.reconnect.apply(void 0,arguments)}}},[t._v(t._s(t.$t("重新连接")))])],1)],1)},n=[]},"36d5":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.$createElement,e=this._self._c||t;return e("v-uni-view",{staticClass:"empty-box"},[e("v-uni-image",{attrs:{src:this.imgHost+"/statics/images/empty-box.png"}}),e("v-uni-view",{staticClass:"txt"},[this._v(this._s(this.title||this.$t("暂无记录")))])],1)},n=[]},"7bf1":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/* crmeb颜色变量 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.page[data-v-05ac4438]{overflow-y:scroll;overflow-x:hidden}.myApplet[data-v-05ac4438]{position:relative}.myApplet[data-v-05ac4438]::after{position:absolute;right:55px;top:-5px;content:"";width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #fff}.pictrue_log_class[data-v-05ac4438]{background-color:var(--view-theme)}.ysize[data-v-05ac4438]{background-size:100%}.fullsize[data-v-05ac4438]{background-size:100% 100%}.repeat[data-v-05ac4438]{background-repeat:repeat}.noRepeat[data-v-05ac4438]{background-repeat:no-repeat}.error-network[data-v-05ac4438]{position:fixed;left:0;top:0;display:flex;flex-direction:column;align-items:center;width:100%;height:100%;padding-top:%?40?%;background:#fff}.error-network uni-image[data-v-05ac4438]{width:%?414?%;height:%?336?%}.error-network .title[data-v-05ac4438]{position:relative;top:%?-40?%;font-size:%?32?%;color:#666}.error-network .con[data-v-05ac4438]{font-size:%?24?%;color:#999}.error-network .con .label[data-v-05ac4438]{margin-bottom:%?20?%}.error-network .con .item[data-v-05ac4438]{margin-bottom:%?20?%}.error-network .btn[data-v-05ac4438]{display:flex;align-items:center;justify-content:center;width:%?508?%;height:%?86?%;margin-top:%?100?%;border:1px solid #d74432;color:#e93323;font-size:%?30?%;border-radius:%?120?%}.sort-scroll[data-v-05ac4438]{background-color:#fff}.sort-product[data-v-05ac4438]{margin-top:%?20?%}.site-config[data-v-05ac4438]{margin:%?40?% 0;font-size:%?24?%;text-align:center;color:#666;display:flex;align-items:center;justify-content:center}.site-config .ban[data-v-05ac4438]{width:%?22?%;height:%?24?%;margin-right:%?10?%}.site-config.fixed[data-v-05ac4438]{position:fixed;bottom:69px;left:0;width:100%}.select[data-v-05ac4438]{border:1px solid var(--view-theme)}',""]),t.exports=e},"807d":function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("8f71"),i("bf0f"),i("2797"),i("4626"),i("dd2b"),i("c223"),i("23f4"),i("7d2f"),i("5c47"),i("9c4e"),i("ab80"),i("2c10"),i("af8f"),i("4100"),i("dc8a"),i("fd3c"),i("aa9c"),i("d4b5");var n=a(i("39d8")),o=a(i("9b1b")),s=a(i("0cf0")),r=a(i("052e")),c=i("d369"),d=i("2e42"),u=a(i("9105d")),l=a(i("0c40")),f=a(i("4c1b")),g=a(i("516a")),h=a(i("f528")),p=a(i("8513")),v=a(i("1c91")),m=a(i("3928")),b=a(i("470e")),w=a(i("cb28")),_=a(i("7d14")),y=a(i("06998")),C=a(i("4661")),S=a(i("4a81")),x=a(i("bf8a")),k=a(i("dff0")),D=a(i("39a4")),L=a(i("5de0")),T=a(i("38f3")),$=a(i("59ac")),I=a(i("ff31")),H=a(i("b930")),P=a(i("5ad6")),E=a(i("cf28")),A=a(i("0985")),N=a(i("2315")),O=a(i("0b28")),M=a(i("287c")),F=a(i("841d")),B=a(i("a833")),R=a(i("ea79")),j=a(i("04be")),U=i("8f59"),V=i("1a5b"),z=i("c302"),G=i("7cf0"),J=i("d7f8"),W=i("9ad6"),Q=a(i("61759")),Y=a(i("70ab")),X=a(i("c13a")),q=getApp(),K={computed:(0,o.default)({pageStyle:function(){return{backgroundColor:this.bgColor,backgroundImage:this.bgPic?"url(".concat(this.bgPic,")"):"",minHeight:this.windowHeight+"px"}},pdHeights:function(){var t="".concat(2*this.pdHeight+100,"rpx");return{height:this.isFooter?t:"100rpx"}}},(0,U.mapGetters)(["isLogin","uid","cartNum"])),mixins:[s.default],components:{Loading:Y.default,pageFooter:Q.default,couponWindow:r.default,homeComb:l.default,newVip:f.default,userInfor:u.default,headerSerch:g.default,swipers:h.default,coupon:p.default,articleList:v.default,bargain:m.default,blankPage:b.default,combination:w.default,customerService:_.default,goodList:y.default,guide:C.default,liveBroadcast:S.default,menus:x.default,pictureCube:D.default,news:k.default,promotionList:L.default,seckill:T.default,swiperBg:$.default,tabNav:I.default,titles:H.default,ranking:P.default,presale:E.default,pointsMall:A.default,richText:N.default,videos:O.default,signIn:M.default,hotspot:F.default,follow:B.default,waterfallsFlow:R.default,emptyPage:j.default},data:function(){var t;return t={styleConfig:[],loading:!1,loadend:!1,loadTitle:"下拉加载更多",page:1,limit:this.$config.LIMIT,numConfig:0,code:"",isCouponShow:!1,couponObj:{},couponObjs:{show:!1},shareInfo:{},sortList:"",sortAll:[],goodPage:1,goodList:[],sid:0,curSort:0,sortMpTop:0,loaded:!1},(0,n.default)(t,"loading",!1),(0,n.default)(t,"domOffsetTop",50),(0,n.default)(t,"isFixed",!1),(0,n.default)(t,"site_config",""),(0,n.default)(t,"errorNetwork",!1),(0,n.default)(t,"isHeaderSerch",!1),(0,n.default)(t,"showHomeComb",!1),(0,n.default)(t,"showCateNav",!1),(0,n.default)(t,"homeCombData",{}),(0,n.default)(t,"headerSerchCombData",{}),(0,n.default)(t,"cateNavData",{}),(0,n.default)(t,"footerConfigData",{}),(0,n.default)(t,"bgColor",""),(0,n.default)(t,"bgPic",""),(0,n.default)(t,"bgTabVal",""),(0,n.default)(t,"pageShow",!0),(0,n.default)(t,"windowHeight",0),(0,n.default)(t,"imgHost",W.HTTP_REQUEST_URL),(0,n.default)(t,"isShowAuth",!1),(0,n.default)(t,"isScrolled",!1),(0,n.default)(t,"product_video_status",!1),(0,n.default)(t,"confirm_video_status",!1),(0,n.default)(t,"positionTop",0),(0,n.default)(t,"isFooter",!1),(0,n.default)(t,"pdHeight",0),(0,n.default)(t,"entryData",{store_id:"",latitude:"",longitude:"",select_store_id:""}),(0,n.default)(t,"goodsIndex",[]),(0,n.default)(t,"promotionIndex",[]),(0,n.default)(t,"belongIndex",0),(0,n.default)(t,"isBelongStore",!1),(0,n.default)(t,"getHeight",this.$util.getWXStatusHeight()),(0,n.default)(t,"myApplet",!0),(0,n.default)(t,"configData",X.default.get("BASIC_CONFIG")),t},onLoad:function(t){var e=this,i=this;uni.hideTabBar(),i.getOptions(t),this.$nextTick((function(){uni.getSystemInfo({success:function(t){i.windowHeight=t.windowHeight}})}));t.state,t.scope;this.diyData(),this.setOpenShare(),(0,d.getShare)().then((function(t){e.shareInfo=t.data})),this.getCopyRight(),this.$eventHub.$on("confirm_video_status",(function(){if(!e.confirm_video_status){e.confirm_video_status=!0;var t;t=window.self==window.top,t&&uni.showModal({content:"当前使用移动网络,是否继续播放视频?",success:function(t){t.confirm&&(e.SET_AUTOPLAY(!0),e.$eventHub.$emit("product_video_observe"))}})}}))},onUnload:function(){uni.$off("activeFn")},watch:{isLogin:{deep:!0,handler:function(t,e){var i=(new Date).toLocaleDateString();if(t){try{var a=uni.getStorageSync("oldDate")||""}catch(n){}a!=i&&this.getCoupon()}}}},onShow:function(){uni.removeStorageSync("form_type_cart"),this.isLogin&&(this.getCoupon(),this.getCartNum())},onPullDownRefresh:function(){this.diyData(),uni.stopPullDownRefresh()},methods:(0,o.default)((0,o.default)({},(0,U.mapMutations)(["SET_AUTOPLAY","SET_NEARBY"])),{},{checkMyApplet:function(){var t=this;wx.checkIsAddedToMyMiniProgram({success:function(e){e.added?t.myApplet=!1:t.myApplet=!0},fail:function(){t.myApplet=!0}})},getCartNum:function(){var t=this;(0,V.getCartCounts)().then((function(e){t.$store.commit("indexData/setCartNum",e.data.count+"");var i=e.data.count;i>0?uni.setTabBarBadge({index:3,text:i>99?"99+":i+""}):uni.hideTabBarRedDot({index:3})})).catch((function(e){return t.$util.Tips({title:e.msg})}))},storeTap:function(t){this.entryData.select_store_id=t,this.entryData.store_id="",uni.removeStorageSync("rulesStoreId")},getCopyRight:function(){var t=this;(0,c.getCrmebCopyRight)().then((function(t){var e=t.data;uni.setStorageSync("wechatStatus",e.wechat_status),e.copyrightContext||e.copyrightImage||(e.copyrightImage="/static/images/support.png"),uni.setStorageSync("copyNameInfo",e.copyrightContext),uni.setStorageSync("copyImageInfo",e.copyrightImage)})).catch((function(e){return t.$util.Tips({title:e.msg})}))},getOptions:function(t){t.spid&&(q.globalData.spid=t.spid)},reconnect:function(){var t=this;this.diyData(),(0,d.getShare)().then((function(e){t.shareInfo=e.data}))},goICP:function(t){window.open(t)},bindHeighta:function(t){},bindHeight:function(t){uni.hideLoading(),this.domOffsetTop=t.top},goGoodsDetail:function(t){(0,G.goShopDetail)(t,this.uid).then((function(e){uni.navigateTo({url:"/pages/goods_details/index?id=".concat(t.id)})}))},changeSort:function(t,e){this.curSort!=e&&(this.curSort=e,this.sid=t.id,this.goodList=[],this.goodPage=1,this.loaded=!1,this.getGoodsList())},bindSortId:function(t){this.styleConfig=[],1==t.type?this.getProductList(t.classPage):(this.sortList=[],this.getMicroPage(t.microPage,!0))},getMicroPage:function(t,e){var i=this,a=this;a.styleConfig=[],uni.showLoading({title:"加载中..."}),(0,c.getDiy)(t).then((function(t){uni.hideLoading();t.data;var e=a.objToArr(t.data.value);e=e.filter((function(t){return!t.isHide})),e.forEach((function(t,i){["headerSerch","homeComb"].includes(t.name)&&e.splice(i,1)})),i.styleConfig=e})).catch((function(t){return a.$util.Tips({title:t})}))},getProductList:function(t){var e=this;this.curSort=0,this.loaded=!1,this.sortAll.length>0?(this.sortAll.forEach((function(i,a){i.id==t&&(e.$set(e,"sortList",i),e.sid=i.children.length?i.children[0].id:"")})),this.goodList=[],this.goodPage=1,this.$nextTick((function(){""!=e.sortList&&e.getGoodsList()}))):(0,z.getCategoryList)().then((function(i){e.sortAll=i.data,i.data.forEach((function(i,a){i.id==t&&(e.sortList=i,e.sid=i.children.length?i.children[0].id:"")})),e.goodList=[],e.goodPage=1,e.$nextTick((function(){""!=e.sortList&&e.getGoodsList()}))}))},getGoodsList:function(){var t=this;this.loading||this.loaded||(this.loading=!0,(0,z.getProductslist)({sid:this.sid,keyword:"",priceOrder:"",salesOrder:"",news:0,page:this.goodPage,limit:10,cid:this.sortList.id}).then((function(e){t.loading=!1,t.loaded=e.data.length<10,t.goodPage++,t.goodList=t.goodList.concat(e.data)})))},getNewCoupon:function(){var t=this,e=uni.getStorageSync("oldUser")||0;e||(0,c.getCouponNewUser)().then((function(e){var i=e.data;i.show?i.list.length&&(t.isCouponShow=!0,t.couponObj=i,uni.setStorageSync("oldUser",1)):uni.setStorageSync("oldUser",1)}))},getCoupon:function(){var t=this,e=uni.getStorageSync("tagDate")||"",i=(new Date).toLocaleDateString();e===i?this.getNewCoupon():(0,c.getCouponV2)().then((function(e){var i=e.data;i.list.length?(t.isCouponShow=!0,t.couponObj=i,uni.setStorageSync("tagDate",(new Date).toLocaleDateString())):t.getNewCoupon()}))},couponClose:function(){this.isCouponShow=!1,uni.getStorageSync("oldUser")||this.getNewCoupon()},onLoadFun:function(){this.isShowAuth=!1},getQueryString:function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),i=new RegExp("(^|/)"+t+"/([^/]*)(/|$)","i"),a=window.location.search.substr(1).match(e),n=window.location.pathname.substr(1).match(i);return null!=a?unescape(a[2]):null!=n?unescape(n[2]):null},objToArr:function(t){var e=Object.keys(t).sort(),i=e.map((function(e){return t[e]}));return i},setDiyData:function(t){var e=this;this.errorNetwork=!1,t.is_bg_color&&(this.bgColor=t.color_picker),t.is_bg_pic&&(this.bgPic=t.bg_pic,this.bgTabVal=t.bg_tab_val),this.pageShow=t.is_show,uni.setNavigationBarTitle({title:t.title});var i=[],a=[],n=[],o=this.objToArr(t.value);o.forEach((function(t,o,s){"pageFoot"==t.name&&(e.footerConfigData=t),"homeComb"!==t.name||t.isHide||(e.showHomeComb=!0,e.homeCombData=t,t.searchConfig.tabVal&&(e.positionTop=uni.getSystemInfoSync().statusBarHeight+43)),"headerSerch"!=t.name||t.isHide||(e.isHeaderSerch=!0,e.headerSerchCombData=t),"tabNav"!=t.name||t.isHide||(e.showCateNav=!0,e.cateNavData=t),"goodList"!=t.name||t.isHide||a.push(o),"promotionList"!=t.name||t.isHide||n.push(o),t.isHide||i.push(t)})),i.sort((function(t,e){return t.timestamp-e.timestamp})),this.styleConfig=i,this.goodsIndex=a,this.promotionIndex=n},getDiyData:function(){var t=this;(0,c.getDiy)(0).then((function(e){uni.setStorageSync("diyData",JSON.stringify(e.data)),t.setDiyData(e.data)})).catch((function(t){}))},diyData:function(){var t=this,e=uni.getStorageSync("diyData");e?(0,c.getDiyVersion)(0).then((function(i){var a=uni.getStorageSync("diyVersion");i.data.version+"0"===a?t.setDiyData(JSON.parse(e)):(uni.setStorageSync("diyVersion",i.data.version+"0"),t.getDiyData())})):this.getDiyData()},changeLogin:function(){this.getIsLogin()},getIsLogin:function(){(0,J.toLogin)()},changeBarg:function(t){this.isLogin?uni.navigateTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(t.id,"&spid=").concat(this.$store.state.app.uid)}):this.getIsLogin()},goDetail:function(t){(0,G.goShopDetail)(t,this.$store.state.app.uid).then((function(e){uni.navigateTo({url:"/pages/goods_details/index?id=".concat(t.id)})}))},newDataStatus:function(t,e){this.isFooter=!!t,this.pdHeight=e},setOpenShare:function(){var t=this,e=this.uid?this.uid:0;t.$wechat.isWeixin()&&(0,d.getShare)().then((function(i){var a=i.data,n={desc:a.synopsis,title:a.title,link:location.href+"?spid="+e,imgUrl:a.img};t.$wechat.wechatEvevt(["updateAppMessageShareData","updateTimelineShareData","onMenuShareAppMessage","onMenuShareTimeline"],n)}))}}),onReachBottom:function(){this.goodList.length&&this.getGoodsList()},onPageScroll:function(t){var e=this;t.scrollTop>20&&(this.myApplet=!1),this.isHeaderSerch?(t.scrollTop>this.domOffsetTop&&(this.isFixed=!0),t.scrollTop<this.domOffsetTop&&this.$nextTick((function(){e.isFixed=!1}))):this.isFixed=!1,t.scrollTop>10?this.isScrolled=!0:this.isScrolled=!1,uni.$emit("scroll"),uni.$emit("onPageScroll",t.scrollTop)}};e.default=K},"8b8f":function(t,e,i){"use strict";var a=i("cfde"),n=i.n(a);n.a},c360:function(t,e,i){var a=i("7bf1");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("967d").default;n("3a750f56",a,!0,{sourceMap:!1,shadowMode:!1})},c828:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i("9ad6"),n={props:{title:{type:String,default:""}},data:function(){return{imgHost:a.HTTP_REQUEST_URL}}};e.default=n},cfde:function(t,e,i){var a=i("2480");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("967d").default;n("73720c0e",a,!0,{sourceMap:!1,shadowMode:!1})},d348:function(t,e,i){"use strict";i.r(e);var a=i("807d"),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},e877:function(t,e,i){"use strict";i.r(e);var a=i("2b89"),n=i("d348");for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("2906");var s=i("828b"),r=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"05ac4438",null,!1,a["a"],void 0);e["default"]=r.exports}}]);
|