api/m/js/app.05ee882b.js
2021-01-04 13:45:02 +08:00

2 lines
10 KiB
JavaScript

(function(t){function e(e){for(var a,o,s=e[0],c=e[1],u=e[2],l=0,d=[];l<s.length;l++)o=s[l],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&d.push(r[o][0]),r[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);p&&p(e);while(d.length)d.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var t,e=0;e<i.length;e++){for(var n=i[e],a=!0,o=1;o<n.length;o++){var s=n[o];0!==r[s]&&(a=!1)}a&&(i.splice(e--,1),t=c(c.s=n[0]))}return t}var a={},o={app:0},r={app:0},i=[];function s(t){return c.p+"js/"+({Category:"Category",GoodsDetail:"GoodsDetail",GoodsList:"GoodsList",Login:"Login"}[t]||t)+"."+{Category:"b617b409",GoodsDetail:"6b467eb8",GoodsList:"277cfefd",Login:"87344a7c"}[t]+".js"}function c(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.e=function(t){var e=[],n={GoodsDetail:1,GoodsList:1,Login:1};o[t]?e.push(o[t]):0!==o[t]&&n[t]&&e.push(o[t]=new Promise((function(e,n){for(var a="css/"+({Category:"Category",GoodsDetail:"GoodsDetail",GoodsList:"GoodsList",Login:"Login"}[t]||t)+"."+{Category:"31d6cfe0",GoodsDetail:"55089c51",GoodsList:"e57b82fc",Login:"86f4227f"}[t]+".css",r=c.p+a,i=document.getElementsByTagName("link"),s=0;s<i.length;s++){var u=i[s],l=u.getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(l===a||l===r))return e()}var d=document.getElementsByTagName("style");for(s=0;s<d.length;s++){u=d[s],l=u.getAttribute("data-href");if(l===a||l===r)return e()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=e,p.onerror=function(e){var a=e&&e.target&&e.target.src||r,i=new Error("Loading CSS chunk "+t+" failed.\n("+a+")");i.code="CSS_CHUNK_LOAD_FAILED",i.request=a,delete o[t],p.parentNode.removeChild(p),n(i)},p.href=r;var f=document.getElementsByTagName("head")[0];f.appendChild(p)})).then((function(){o[t]=0})));var a=r[t];if(0!==a)if(a)e.push(a[2]);else{var i=new Promise((function(e,n){a=r[t]=[e,n]}));e.push(a[2]=i);var u,l=document.createElement("script");l.charset="utf-8",l.timeout=120,c.nc&&l.setAttribute("nonce",c.nc),l.src=s(t);var d=new Error;u=function(e){l.onerror=l.onload=null,clearTimeout(p);var n=r[t];if(0!==n){if(n){var a=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;d.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",d.name="ChunkLoadError",d.type=a,d.request=o,n[1](d)}r[t]=void 0}};var p=setTimeout((function(){u({type:"timeout",target:l})}),12e4);l.onerror=l.onload=u,document.head.appendChild(l)}return Promise.all(e)},c.m=t,c.c=a,c.d=function(t,e,n){c.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},c.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.t=function(t,e){if(1&e&&(t=c(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)c.d(n,a,function(e){return t[e]}.bind(null,a));return n},c.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return c.d(e,"a",e),e},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.p="/shop/m/",c.oe=function(t){throw console.error(t),t};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],l=u.push.bind(u);u.push=e,u=u.slice();for(var d=0;d<u.length;d++)e(u[d]);var p=l;i.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("56d7")},"0eba":function(t,e,n){},"2aab":function(t,e,n){"use strict";n("0eba")},"495e":function(t,e,n){"use strict";n("96cf");var a=n("1da1"),o=n("d4ec"),r=n("bee2"),i=n("4328"),s=n.n(i),c="http://127.0.0.1:8080/api",u=function(t){return new Promise((function(e,n){t.then((function(t){"undefined"==typeof t["code"]||0==t.code?e(t):n(new Error(t.message))})).catch((function(t){n(t)}))}))},l=function(){function t(e){Object(o["a"])(this,t),this.baseUri=e}return Object(r["a"])(t,[{key:"$getUrl",value:function(t){return this.baseUri+t}},{key:"get",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,fetch(this.$getUrl(e));case 2:return n=t.sent,t.abrupt("return",u(n.json()));case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"post",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e,n){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,fetch(this.$getUrl(e),{body:s.a.stringify(n),method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"}});case 2:return a=t.sent,t.abrupt("return",u(a.json()));case 4:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()}]),t}(),d=new l(c);e["a"]={http:d,shop:new l("https://fj-server.os.wm-app.xyz/shop/api")}},"56d7":function(t,e,n){"use strict";n.r(e);n("cadf"),n("551c"),n("f751"),n("097d");var a=n("2b0e"),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},r=[],i=(n("7c55"),n("2877")),s={},c=Object(i["a"])(s,o,r,!1,null,null,null),u=c.exports,l=(n("0fae"),n("5c96")),d=n.n(l),p=n("8c4f"),f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-home"},[n("div",{staticClass:"swiper-wrapper"},[n("van-swipe",{staticClass:"my-swipe",attrs:{autoplay:3e3,"indicator-color":"white"}},t._l(t.swipes,(function(t,e){return n("van-swipe-item",{key:e},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.img,expression:"s.img"}]})])})),1)],1),n("div",{staticClass:"hot-cate"}),n("div",{staticClass:"hot-goods"},[t._m(0),n("GoodsList",{attrs:{goodsList:t.dataList}})],1)])},m=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"title",staticStyle:{margin:"10px 0"}},[n("img",{staticClass:"ll_fadeIn",staticStyle:{width:"calc(100% - 1rem)",height:"100%",opacity:"1"},attrs:{src:"//img12.360buyimg.com/img/s750x70_jfs/t1/148857/1/16777/13220/5fc9f9d0E734c0ee5/88c99cdbe410e58a.png"}})])}],g=n("495e"),h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"goods-list"},[t.goodsList.length>0?n("div",{staticClass:"goods-list-wrapper list-wrapper row"},[t._t("before_list"),t._l(t.goodsList,(function(e){return n("div",{key:e.id,staticClass:"list-item"},[n("router-link",{staticClass:"goods-item ",attrs:{to:"/goods-detail?id="+e.id}},[n("div",{staticClass:"p"},[n("a",{attrs:{href:"#",title:""}},[n("img",{staticClass:"p-pic",attrs:{src:e.picture}})])]),n("div",{staticClass:"desc"},[n("a",{staticClass:"p-title",attrs:{href:""},domProps:{textContent:t._s(e.title)}},[t._v("...")]),n("div",{staticClass:"p-info"},[n("div",{staticClass:"p-price"},[t._v("¥ "),n("strong",[t._v(t._s(e.sell_price))])]),n("div",{staticClass:"p-ext"},[n("span",{staticClass:"d-num"},[n("span",{staticClass:"font-num",domProps:{textContent:t._s(e.sell_count)}}),t._v("人购买\n ")])])])])])],1)})),t._t("end_list")],2):n("div",{staticClass:"list-is-empty"},[n("span",[t._v("没有商品哟~")])])])},v=[],b={name:"GoodsList",props:{goodsList:{type:Array,default:function(){return[]}}},data:function(){return{}}},y=b,_=(n("2aab"),Object(i["a"])(y,h,v,!1,null,null,null)),w=_.exports,C={name:"home",components:{GoodsList:w},data:function(){return{swipes:[{name:"24期免息",img:"//m.360buyimg.com/mobilecms/s700x280_jfs/t1/145540/4/18667/107221/5fd8c5a7Ed54a9545/14e408a6ee76c316.jpg!cr_1125x445_0_171!q70.jpg.dpg",url:"/goods-list?cate=显示器"},{name:"茶油",img:"//m.360buyimg.com/mobilecms/s700x280_jfs/t1/149172/3/18184/263815/5fd5c4d5E1740ade6/a05ecfaaa05026a4.jpg!cr_1125x445_0_171!q70.jpg.dpg",url:"/goods-list?cate=茶油"},{name:"电视",img:"//m.360buyimg.com/mobilecms/s700x280_jfs/t1/135279/35/18804/134512/5fcf55a6Ebec3ea76/ce2689ee950f3627.jpg!q70.jpg.dpg",url:"/goods-list?cate=电视"}],loading:!1,dataList:[],total:0,pageSize:15}},mounted:function(){document.title="首页",this.loadData(1)},methods:{onPageChange:function(t){this.loadData(t)},loadData:function(t){var e=this;this.loading=!0,g["a"].shop.get("/goods?list=y&page="+t).then((function(t){e.loading=!1,e.dataList=t.list,e.total=t.total,e.pageSize=t.size})).catch((function(){e.loading=!1}))}}},L=C,j=(n("de16"),Object(i["a"])(L,f,m,!1,null,null,null)),x=j.exports,G=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticStyle:{"padding-bottom":"50px"},attrs:{id:"app-content"}},[n("keep-alive",[n("router-view")],1)],1),n("van-tabbar",{model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[n("van-tabbar-item",{attrs:{name:"home",replace:"",to:"/",icon:"home-o"}},[t._v("首页")]),n("van-tabbar-item",{attrs:{name:"cate",replace:"",to:"/cate",icon:"apps-o"}},[t._v("分类")]),n("van-tabbar-item",{attrs:{name:"cart",replace:"",to:"/cart",icon:"chat-o"}},[t._v("购物车")]),n("van-tabbar-item",{attrs:{name:"my",replace:"",to:"/my",icon:"user-o"}},[t._v("我的")])],1)],1)},E=[],O={data:function(){return{active:"home"}}},k=O,D=Object(i["a"])(k,G,E,!1,null,null,null),P=D.exports,S=n("2f62");a["default"].use(S["a"]),a["default"].use(p["a"]);var T=new p["a"]({routes:[{path:"/",component:P,children:[{path:"/",name:"home",component:x},{path:"/cate",name:"Category",component:function(){return n.e("Category").then(n.bind(null,"4886"))}}]},{path:"/login",name:"Login",component:function(){return n.e("Login").then(n.bind(null,"a55b"))}},{path:"/goods-list",name:"GoodsList",component:function(){return n.e("GoodsList").then(n.bind(null,"d2d3"))}},{path:"/goods-detail",name:"GoodsDetail",component:function(){return n.e("GoodsDetail").then(n.bind(null,"c84b"))}}]});T.beforeEach((function(t,e,n){n()}));var $=T,A=n("b970"),z=(n("157a"),n("343b"));a["default"].config.productionTip=!1,a["default"].use(d.a),a["default"].use(A["a"]),a["default"].use(z["a"]),new a["default"]({router:$,render:function(t){return t(u)}}).$mount("#app")},"5c48":function(t,e,n){},"7c55":function(t,e,n){"use strict";n("5c48")},de16:function(t,e,n){"use strict";n("f3e7")},f3e7:function(t,e,n){}});
//# sourceMappingURL=app.05ee882b.js.map