Files
huangjingfen/pro_v3.5.1/public/statics/mp_view/pages/index/index.js
apple 78de918c37 Initial commit: queue workspace
Made-with: Cursor
2026-03-21 02:55:24 +08:00

1 line
18 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"107d":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement,t=(this._self._c,!this.popup_show||this.downstatus<1?null:(this.downSize/1024/1024).toFixed(2)),n=!this.popup_show||this.downstatus<1?null:(this.fileSize/1024/1024).toFixed(2);this.$mp.data=Object.assign({},{$root:{g0:t,g1:n}})},i=[]},1210:function(e,t,n){},"426e":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,i=n("48a0"),a={name:"appUpdate",props:{tabbar:{type:Boolean,default:!1},getVer:{type:Boolean,default:!1}},data:function(){return{popup_show:!1,platform:"",version:"1.0.0",need_update:!1,downing:!1,downstatus:0,update_info:{os:"",version:"",info:""},fileSize:0,downSize:0,viewObj:null}},created:function(){o=this,this.getVer||this.update()},computed:{lengthWidth:function(){var e=this.downSize/this.fileSize*100;return e=e?e.toFixed(2):0,{width:e+"%"}},getHeight:function(){var e=0;return this.tabbar&&(e=50),{bottom:e+"px",height:"auto"}}},methods:{update:function(){},getUpdateInfo:function(){var t=this;(0,i.getUpdateInfo)("ios"===this.platform?2:1).then((function(n){if(Array.isArray(n.data))return t.$emit("isNew");var i=e.getStorageSync("app_update_time")||"",a=(new Date).toLocaleDateString();if(i===a||t.getVer){if(i!==a&&t.getVer){if(!n.data.is_force)return}else if(i==a&&!t.getVer&&!n.data.is_force)return}else e.setStorageSync("app_update_time",(new Date).toLocaleDateString());var s=n.data;o.update_info=s,o.update_info.platform&&o.checkUpdate()})).catch((function(e){o.popup_show=!1}))},checkUpdate:function(){o.need_update=o.compareVersion(o.version,o.update_info.version),o.need_update?(o.popup_show=!0,o.tabbar&&(o.viewObj=new plus.nativeObj.View("viewObj",{bottom:"0px",left:"0px",height:"50px",width:"100%",backgroundColor:"rgba(0,0,0,.6)"}),o.viewObj.show())):this.$emit("isNew")},closeUpdate:function(){o.update_info.is_force?"android"==this.platform?plus.runtime.quit():plus.ios.import("UIApplication").sharedApplication().performSelector("exit"):(o.popup_show=!1,o.viewObj&&o.viewObj.hide())},nowUpdate:function(){if(o.downing)return!1;o.downing=!0,/\.apk$/.test(o.update_info.url)||/\.wgt$/.test(o.update_info.url)?o.download_wgt():plus.runtime.openURL(o.update_info.url,(function(){plus.nativeUI.toast("打开错误")}))},download_wgt:function(){plus.nativeUI.showWaiting("下载更新文件...");var e=plus.downloader.createDownload(o.update_info.url,{method:"get"},(function(e,t){}));e.addEventListener("statechanged",(function(e,t){if(null===t);else if(200==t)switch(o.downstatus=e.state,e.state){case 3:o.downSize=e.downloadedSize,e.totalSize&&(o.fileSize=e.totalSize);break;case 4:o.installWgt(e.filename);break}else plus.nativeUI.closeWaiting(),plus.nativeUI.toast("下载出错"),o.downing=!1,o.downstatus=0})),e.start()},installWgt:function(e){plus.nativeUI.showWaiting("安装更新文件..."),plus.runtime.install(e,{},(function(){plus.nativeUI.closeWaiting(),plus.nativeUI.alert("应用资源下载完成!",(function(){plus.runtime.restart()}))}),(function(e){plus.nativeUI.closeWaiting(),plus.nativeUI.alert("安装更新文件失败["+e.code+"]"+e.message)}))},compareVersion:function(e,t){if(!e||!t||""==e||""==t)return!1;for(var n=e.split(".",4),o=t.split(".",4),i=0;i<n.length&&i<o.length;i++){var a=n[i],s=parseInt(a),r=o[i],c=parseInt(r);if(c>s||r.length>a.length)return!0;if(c<s)return!1}return o.length>n.length&&0==t.indexOf(e)}}};t.default=a}).call(this,n("df3c")["default"])},"576f":function(e,t,n){"use strict";n.r(t);var o=n("7fb3"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"7fb3":function(e,t,n){"use strict";(function(e,o){var i=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("7ca3")),s=i(n("89cc")),r=n("360a"),c=n("48a0"),u=i(n("1844")),d=n("769c"),l=n("8f59"),f=n("0f73"),h=n("95b5"),p=n("5088"),g=n("4d38");i(n("ad50"));function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=getApp(),w={computed:b({pageStyle:function(){return{backgroundColor:this.bgColor,backgroundImage:this.bgPic?"url(".concat(this.bgPic,")"):"",minHeight:this.windowHeight+"px"}}},(0,l.mapGetters)(["isLogin","uid","cartNum"])),mixins:[s.default],components:{recommend:function(){Promise.all([n.e("common/vendor"),n.e("components/recommend/index")]).then(function(){return resolve(n("a60c"))}.bind(null,n)).catch(n.oe)},Loading:function(){n.e("components/Loading/index").then(function(){return resolve(n("e83c"))}.bind(null,n)).catch(n.oe)},pageFooter:function(){n.e("components/pageFooter/index").then(function(){return resolve(n("b795"))}.bind(null,n)).catch(n.oe)},couponWindow:function(){n.e("components/couponWindow/index").then(function(){return resolve(n("23d5"))}.bind(null,n)).catch(n.oe)},homeComb:function(){n.e("pages/index/components/homeComb").then(function(){return resolve(n("f50a"))}.bind(null,n)).catch(n.oe)},newVip:function(){n.e("pages/index/components/newVip").then(function(){return resolve(n("4082"))}.bind(null,n)).catch(n.oe)},userInfor:function(){n.e("pages/index/components/userInfor").then(function(){return resolve(n("c696"))}.bind(null,n)).catch(n.oe)},community:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/community")]).then(function(){return resolve(n("4100"))}.bind(null,n)).catch(n.oe)},headerSerch:function(){n.e("pages/index/components/headerSerch").then(function(){return resolve(n("5f25"))}.bind(null,n)).catch(n.oe)},swipers:function(){n.e("pages/index/components/swipers").then(function(){return resolve(n("bf89"))}.bind(null,n)).catch(n.oe)},coupon:function(){n.e("pages/index/components/coupon").then(function(){return resolve(n("fec6"))}.bind(null,n)).catch(n.oe)},articleList:function(){n.e("pages/index/components/articleList").then(function(){return resolve(n("f8a3"))}.bind(null,n)).catch(n.oe)},bargain:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/bargain")]).then(function(){return resolve(n("a1e7"))}.bind(null,n)).catch(n.oe)},blankPage:function(){n.e("pages/index/components/blankPage").then(function(){return resolve(n("38b6"))}.bind(null,n)).catch(n.oe)},combination:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/combination")]).then(function(){return resolve(n("f434"))}.bind(null,n)).catch(n.oe)},customerService:function(){n.e("pages/index/components/customerService").then(function(){return resolve(n("3143"))}.bind(null,n)).catch(n.oe)},goodList:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/goodList")]).then(function(){return resolve(n("e0ce"))}.bind(null,n)).catch(n.oe)},guide:function(){n.e("pages/index/components/guide").then(function(){return resolve(n("1af4"))}.bind(null,n)).catch(n.oe)},menus:function(){n.e("pages/index/components/menus").then(function(){return resolve(n("9ae3"))}.bind(null,n)).catch(n.oe)},pictureCube:function(){n.e("pages/index/components/pictureCube").then(function(){return resolve(n("7b99"))}.bind(null,n)).catch(n.oe)},news:function(){n.e("pages/index/components/news").then(function(){return resolve(n("4c7f"))}.bind(null,n)).catch(n.oe)},promotionList:function(){n.e("pages/index/components/promotionList").then(function(){return resolve(n("b90a"))}.bind(null,n)).catch(n.oe)},richText:function(){n.e("pages/index/components/richText").then(function(){return resolve(n("ef91"))}.bind(null,n)).catch(n.oe)},seckill:function(){n.e("pages/index/components/seckill").then(function(){return resolve(n("0dc3"))}.bind(null,n)).catch(n.oe)},swiperBg:function(){n.e("pages/index/components/swiperBg").then(function(){return resolve(n("7444"))}.bind(null,n)).catch(n.oe)},tabNav:function(){n.e("pages/index/components/tabNav").then(function(){return resolve(n("d220"))}.bind(null,n)).catch(n.oe)},titles:function(){n.e("pages/index/components/titles").then(function(){return resolve(n("118c"))}.bind(null,n)).catch(n.oe)},ranking:function(){n.e("pages/index/components/ranking").then(function(){return resolve(n("2269"))}.bind(null,n)).catch(n.oe)},presale:function(){n.e("pages/index/components/presale").then(function(){return resolve(n("84ea"))}.bind(null,n)).catch(n.oe)},pointsMall:function(){n.e("pages/index/components/pointsMall").then(function(){return resolve(n("3a7a1"))}.bind(null,n)).catch(n.oe)},videos:function(){n.e("pages/index/components/videos").then(function(){return resolve(n("666a"))}.bind(null,n)).catch(n.oe)},signIn:function(){n.e("pages/index/components/signIn").then(function(){return resolve(n("4623"))}.bind(null,n)).catch(n.oe)},hotspot:function(){n.e("pages/index/components/hotspot").then(function(){return resolve(n("d26c"))}.bind(null,n)).catch(n.oe)},follow:function(){n.e("pages/index/components/follow").then(function(){return resolve(n("7bd5"))}.bind(null,n)).catch(n.oe)},waterfallsFlow:function(){n.e("components/WaterfallsFlow/WaterfallsFlow").then(function(){return resolve(n("33ab"))}.bind(null,n)).catch(n.oe)},activityModal:function(){n.e("components/activityModal/index").then(function(){return resolve(n("b19b"))}.bind(null,n)).catch(n.oe)},emptyPage:function(){n.e("components/emptyPage").then(function(){return resolve(n("398a"))}.bind(null,n)).catch(n.oe)},addTip:function(){n.e("components/weixinTip/index").then(function(){return resolve(n("66df"))}.bind(null,n)).catch(n.oe)},liveBroadcast:function(){n.e("pages/index/components/liveBroadcast").then(function(){return resolve(n("6526"))}.bind(null,n)).catch(n.oe)}},data:function(){var e;return e={styleConfig:[],loading:!1,loadend:!1,loadTitle:"下拉加载更多",page:1,limit:this.$config.LIMIT,numConfig:0,code:"",isCouponShow:!1,shareInfo:{},sortList:"",sortAll:[],goodPage:1,goodList:[],sid:0,curSort:0,sortMpTop:0,loaded:!1},(0,a.default)(e,"loading",!1),(0,a.default)(e,"domOffsetTop",50),(0,a.default)(e,"isFixed",!0),(0,a.default)(e,"site_config",""),(0,a.default)(e,"errorNetwork",!1),(0,a.default)(e,"isHeaderSerch",!1),(0,a.default)(e,"showHomeComb",!1),(0,a.default)(e,"showCateNav",!1),(0,a.default)(e,"homeCombData",{}),(0,a.default)(e,"headerSerchCombData",{}),(0,a.default)(e,"cateNavData",{}),(0,a.default)(e,"bgColor",""),(0,a.default)(e,"bgPic",""),(0,a.default)(e,"bgTabVal",""),(0,a.default)(e,"pageShow",!0),(0,a.default)(e,"windowHeight",0),(0,a.default)(e,"imgHost",g.HTTP_REQUEST_URL),(0,a.default)(e,"isShowAuth",!1),(0,a.default)(e,"isScrolled",!1),(0,a.default)(e,"product_video_status",!1),(0,a.default)(e,"confirm_video_status",!1),(0,a.default)(e,"isFooter",!1),(0,a.default)(e,"pullReset",0),(0,a.default)(e,"configData",u.default.get("BASIC_CONFIG")),e},onLoad:function(t){var n=this,o=this;o.getOptions(t),this.$nextTick((function(){e.getSystemInfo({success:function(e){o.windowHeight=e.windowHeight}})}));t.state,t.scope;var i=this.$store.state.app.identity;1==i&&this.isLogin?e.redirectTo({url:"/pages/merchant/index/goods"}):2==i&&this.isLogin?e.redirectTo({url:"/pages/admin/work/index"}):this.diyData(),this.getTemlIds(),(0,c.getShare)().then((function(e){n.shareInfo=e.data}))},onShow:function(){this.cartNum>0?e.setTabBarBadge({index:3,text:this.cartNum>99?"99+":this.cartNum+""}):e.hideTabBarRedDot({index:3}),e.removeStorageSync("form_type_cart")},methods:b(b({},(0,l.mapMutations)(["SET_AUTOPLAY"])),{},{getOptions:function(e){if(e.scene){var t=this.$util.getUrlParams(decodeURIComponent(e.scene));t.spid&&(v.globalData.spid=t.spid)}e.spid&&(v.globalData.spid=e.spid)},reconnect:function(){var e=this;this.diyData(),(0,c.getShare)().then((function(t){e.shareInfo=t.data}))},goICP:function(){e.navigateTo({url:"/pages/annex/web_view/index?url=https://beian.miit.gov.cn/"})},bindHeighta:function(e){},bindHeight:function(t){e.hideLoading(),this.domOffsetTop=t.top},changeSort:function(e,t){this.curSort!=t&&(this.curSort=t,this.sid=e.id,this.goodList=[],this.goodPage=1,this.loaded=!1,this.getGoodsList())},bindSortId:function(e){this.styleConfig=[],this.loaded=!1,1==e.type?this.getProductList(e.classPage):(this.sortList=[],this.getMicroPage(e.microPage,!0))},getMicroPage:function(t,n){var o=this,i=this;i.styleConfig=[],i.goodList=[],e.showLoading({title:"加载中..."}),(0,r.getDiy)(t).then((function(t){e.hideLoading();t.data;var n=i.objToArr(t.data.value);n=n.filter((function(e){return"1"!==e.isHide})),n.forEach((function(e,t){["headerSerch","homeComb"].includes(e.name)&&n.splice(t,1)})),o.styleConfig=n})).catch((function(e){return i.$util.Tips({title:e})}))},getProductList:function(e){var t=this;this.curSort=0,this.loaded=!1,this.sortAll.length>0?(this.sortAll.forEach((function(n,o){n.id==e&&(t.$set(t,"sortList",n),t.sid=n.children.length?n.children[0].id:"")})),this.goodList=[],this.goodPage=1,this.$nextTick((function(){""!=t.sortList&&t.getGoodsList()}))):(0,f.getCategoryList)().then((function(n){t.sortAll=n.data,n.data.forEach((function(n,o){n.id==e&&(t.sortList=n,t.sid=n.children.length?n.children[0].id:"")})),t.goodList=[],t.goodPage=1,t.$nextTick((function(){""!=t.sortList&&t.getGoodsList()}))}))},getGoodsList:function(){var e=this;this.loading||this.loaded||(this.loading=!0,(0,f.getProductslist)({sid:this.sid,keyword:"",priceOrder:"",salesOrder:"",news:0,page:this.goodPage,limit:10,cid:this.sortList.id}).then((function(t){e.loading=!1,e.loaded=t.data.length<10,e.goodPage++,e.goodList=e.goodList.concat(t.data)})))},getTemlIds:function(){var e=o.getStorageSync(d.SUBSCRIBE_MESSAGE);e||(0,r.getTemlIds)().then((function(e){e.data&&o.setStorageSync(d.SUBSCRIBE_MESSAGE,JSON.stringify(e.data))}))},objToArr:function(e){var t=Object.keys(e).sort(),n=t.map((function(t){return e[t]}));return n},setDiyData:function(t){var n=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,e.setNavigationBarTitle({title:t.title});var o=[],i=this.objToArr(t.value);i.forEach((function(e,t,i){"homeComb"===e.name&&(n.showHomeComb=!0,n.homeCombData=e),"headerSerch"==e.name&&(n.isHeaderSerch=!0,n.headerSerchCombData=e),"tabNav"==e.name&&(n.showCateNav=!0,n.cateNavData=e),"1"!==e.isHide&&o.push(e)})),o.sort((function(e,t){return e.timestamp-t.timestamp})),this.styleConfig=o},getDiyData:function(){var t=this;(0,r.getDiy)(0).then((function(n){e.setStorageSync("diyData",JSON.stringify(n.data)),t.setDiyData(n.data)})).catch((function(e){}))},diyData:function(){var t=this,n=e.getStorageSync("diyData");n?(0,r.getDiyVersion)(0).then((function(o){var i=e.getStorageSync("diyVersion");o.data.version+"0"===i?t.setDiyData(JSON.parse(n)):(e.setStorageSync("diyVersion",o.data.version+"0"),t.getDiyData())})):this.getDiyData()},changeLogin:function(){this.getIsLogin()},getIsLogin:function(){(0,p.toLogin)()},changeBarg:function(t){this.isLogin?e.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,h.goShopDetail)(t,this.$store.state.app.uid).catch((function(n){e.navigateTo({url:"/pages/goods_details/index?id=".concat(t.id)})}))},newDataStatus:function(e){this.isFooter=!!e},checked:function(){}}),onReachBottom:function(){this.goodList.length&&this.getGoodsList()},onPullDownRefresh:function(){this.goodList=[],this.sortList=[],this.diyData(),this.pullReset=1,setTimeout((function(){e.stopPullDownRefresh()}),1e3)},onPageScroll:function(t){t.scrollTop>10?this.isScrolled=!0:this.isScrolled=!1,e.$emit("scroll"),e.$emit("onPageScroll",t.scrollTop)},onShareAppMessage:function(){var e=this.uid?this.uid:0;return this.shareInfo.img?{title:this.shareInfo.title,path:"/pages/index/index?spid="+e,imageUrl:this.shareInfo.img,desc:this.shareInfo.synopsis}:{title:this.shareInfo.title,path:"/pages/index/index?spid="+e}},onShareTimeline:function(){var e=this.uid?this.uid:0;return{title:this.shareInfo.title,path:"/pages/index/index?spid="+e,imageUrl:this.shareInfo.img,desc:this.shareInfo.synopsis}}};t.default=w}).call(this,n("df3c")["default"],n("3223")["default"])},"94a5":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("f076");o(n("3240"));var i=o(n("977d"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"977d":function(e,t,n){"use strict";n.r(t);var o=n("a4e9"),i=n("576f");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("b1dde");var s=n("828b"),r=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=r.exports},a4e9:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this,t=e.$createElement,n=(e._self._c,e.pageShow?e.__get_style([e.pageStyle]):null),o=e.pageShow&&!e.errorNetwork?e.sortList.children&&e.sortList.children.length:null,i=e.pageShow&&!e.errorNetwork?0==e.goodList.length&&e.loaded:null;e.$mp.data=Object.assign({},{$root:{s0:n,g0:o,g1:i}})},i=[]},ad50:function(e,t,n){"use strict";n.r(t);var o=n("107d"),i=n("d580");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("da01");var s=n("828b"),r=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"0632b69b",null,!1,o["a"],void 0);t["default"]=r.exports},b1dde:function(e,t,n){"use strict";var o=n("1210"),i=n.n(o);i.a},d580:function(e,t,n){"use strict";n.r(t);var o=n("426e"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},da01:function(e,t,n){"use strict";var o=n("fe6f"),i=n.n(o);i.a},fe6f:function(e,t,n){}},[["94a5","common/runtime","common/vendor"]]]);