1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"51a2":function(n,t,e){"use strict";e.r(t);var i=e("6792"),o=e.n(i);for(var a in i)["default"].indexOf(a)<0&&function(n){e.d(t,n,(function(){return i[n]}))}(a);t["default"]=o.a},"51fa":function(n,t,e){"use strict";e.r(t);var i=e("a862"),o=e("51a2");for(var a in o)["default"].indexOf(a)<0&&function(n){e.d(t,n,(function(){return o[n]}))}(a);e("b8e4");var c,u=e("f0c5"),s=Object(u["a"])(o["default"],i["b"],i["c"],!1,null,"d3f24a6c",null,!1,i["a"],c);t["default"]=s.exports},6792:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e("970c"),o=(e("b83c"),{data:function(){return{recomlist:[],current:1,list1:[{name:"推荐"}],banner:["https://cdn.uviewui.com/uview/swiper/swiper1.png","https://cdn.uviewui.com/uview/swiper/swiper2.png","https://cdn.uviewui.com/uview/swiper/swiper3.png"],show:!0,timer:"",language:"zh-CN",subsidylist:[],packlist:[],shippList:[],keyword:"",page:1,index:0,parent_id:"",last_page:"",configimage:"",url:"",unReadCount:0,type:"error"}},computed:{i18n:function(){return this.$t("index")},list:function(){var n=[];return n=[this.i18n.border,this.i18n.shop],n}},onReachBottom:function(){this.page<this.last_page?0!=this.current&&(this.page++,this.goods(this.parent_id)):this.$u.toast(this.i18n.Nofurtherdata)},onLoad:function(n){n.current&&(this.current=n.current),this.getlista()},onShow:function(){this.config(),this.category(),this.subsid(),this.pack(),this.shipp(),this.recommend(),""!=n.getStorageSync("language")&&(this.language=n.getStorageSync("language")),this.HXlogin()},methods:{getlista:function(){n.$u.http.get("/api/express-company",{}).then((function(t){n.setStorageSync("radiolist1",t)})).catch((function(){}))},HXlogin:function(){var t=this;if(n.getStorageSync("user_no")&&n.getStorageSync("pwd")){var e=n.getStorageSync("user_no"),o=n.getStorageSync("pwd");i.conn.open({user:e,pwd:o,appKey:i.conn.appkey}).then((function(){console.log("res"),t.getlist()})).catch((function(n){console.log("失败",n)}))}},getlist:function(){var n=this;this.unReadCount=0,i.conn.getServerConversations({pageSize:50,cursor:""}).then((function(t){console.log(t),t.data.conversations.forEach((function(t){n.unReadCount+=t.unReadCount})),console.log(n.unReadCount)}))},callphone:function(){n.$u.http.get("/api/config",{params:{module:"basic"}}).then((function(t){console.log(t),n.makePhoneCall({phoneNumber:t.service_mobile})})).catch((function(){}))},advert:function(){console.log(this.url),n.navigateTo({url:this.url})},config:function(){var t=this;n.$u.http.get("api/config",{params:{module:"advertising"}}).then((function(n){console.log(n),t.configimage=n.image,t.url=n.url})).catch((function(){}))},shipp:function(){var t=this;n.$u.http.post("api/goods/shipping").then((function(n){t.shippList=n.data.splice(0,2)})).catch((function(){}))},pack:function(){var t=this;n.$u.http.post("/api/goods/pack").then((function(n){t.packlist=n.data.splice(0,2)})).catch((function(){}))},subsid:function(){var t=this;n.$u.http.post("/api/goods/subsidy").then((function(n){console.log(n),t.subsidylist=n.data.splice(0,4)})).catch((function(){}))},changetab:function(n){this.page=1,this.last_page=0,this.index=n.index,this.parent_id=n.id,0==this.index?this.recommend():(this.recomlist=[],this.goods(this.parent_id))},search:function(){0==this.index?this.recommend():(this.recomlist=[],this.goods(this.parent_id))},recommend:function(){var t=this;n.$u.http.post("/api/goods/recommend",{keyword:this.keyword}).then((function(n){t.recomlist=n})).catch((function(){}))},category:function(){var t=this;n.$u.http.get("/api/goods/category",{params:{parent_id:0}}).then((function(n){var e=n;t.list1=[{name:""}],"en-US"==t.language&&(e.forEach((function(n){n.name=n.name_en})),t.list1[0].name="recommend"),"es-ES"==t.language&&(e.forEach((function(n){n.name=n.name_es})),t.list1[0].name="recomendación"),"it-IT"==t.language&&(e.forEach((function(n){n.name=n.name_ita})),t.list1[0].name="raccomandata"),"zh-CN"==t.language&&(e.forEach((function(n){n.name=n.name_cn})),t.list1[0].name="推荐"),t.list1=t.list1.concat(e)})).catch((function(){}))},goods:function(t){var e=this;n.$u.http.get("/api/goods",{params:{parent_id:t,limit:10,page:this.page,keyword:this.keyword}}).then((function(n){e.recomlist=e.recomlist.concat(n.data),e.last_page=n.last_page})).catch((function(){}))},subsidy:function(t){n.navigateTo({url:"/pageA/subsidy?show="+t})},counter:function(){n.navigateTo({url:"/pageA/counter"})},tochat:function(){n.navigateTo({url:"/pageA/chat/news"})},shoptype:function(){n.navigateTo({url:"/pageA/shoptype"})},sectionChange:function(t){this.current=t,console.log(t),0==this.current&&(n.switchTab({url:"/pages/express/express?current=0"}),this.current=1)},todetail:function(t){n.navigateTo({url:"/pageA/productdetails?id="+t})}}});t.default=o}).call(this,e("543d")["default"])},"7b7f":function(n,t,e){"use strict";(function(n,t){var i=e("4ea4");e("f93b");i(e("66fd"));var o=i(e("51fa"));n.__webpack_require_UNI_MP_PLUGIN__=e,t(o.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])},"83ca":function(n,t,e){},a862:function(n,t,e){"use strict";e.d(t,"b",(function(){return o})),e.d(t,"c",(function(){return a})),e.d(t,"a",(function(){return i}));var i={uNavbar:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-navbar/u-navbar")]).then(e.bind(null,"b6bd"))},uBadge:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-badge/u-badge")]).then(e.bind(null,"eb50"))},uSubsection:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-subsection/u-subsection")]).then(e.bind(null,"0010"))},uIcon:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-icon/u-icon")]).then(e.bind(null,"01eb"))},uTabs:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-tabs/u-tabs")]).then(e.bind(null,"5506"))},uSwiper:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-swiper/u-swiper")]).then(e.bind(null,"63cf"))},uPopup:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-popup/u-popup")]).then(e.bind(null,"2f21"))},kjTabbar:function(){return Promise.all([e.e("common/vendor"),e.e("components/kj-tabbar/kj-tabbar")]).then(e.bind(null,"c7a7"))}},o=function(){var n=this,t=n.$createElement,e=(n._self._c,n.__map(n.recomlist,(function(t,e){var i=n.__get_orig(t),o=t.label_arr?t.label_arr.slice(0,3):null;return{$orig:i,l0:o}}))),i=n.recomlist.length;n._isMounted||(n.e0=function(t){t.stopPropagation(),n.show=!1}),n.$mp.data=Object.assign({},{$root:{l1:e,g0:i}})},a=[]},b8e4:function(n,t,e){"use strict";var i=e("83ca"),o=e.n(i);o.a}},[["7b7f","common/runtime","common/vendor"]]]);
|