1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(function(e){function t(t){for(var n,a,c=t[0],o=t[1],s=t[2],p=0,l=[];p<c.length;p++)a=c[p],Object.prototype.hasOwnProperty.call(u,a)&&u[a]&&l.push(u[a][0]),u[a]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);f&&f(t);while(l.length)l.shift()();return i.push.apply(i,s||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==u[c]&&(n=!1)}n&&(i.splice(t--,1),e=o(o.s=r[0]))}return e}var n={},a={app:0},u={app:0},i=[];function c(e){return o.p+"js/"+({"Account-vue":"Account-vue","Car-vue":"Car-vue","Home-vue":"Home-vue","Info-vue":"Info-vue","List-vue":"List-vue","Me-vue":"Me-vue","Order-vue":"Order-vue","OrderStatus-vue":"OrderStatus-vue","Search-vue":"Search-vue","Type-vue":"Type-vue"}[e]||e)+"."+{"Account-vue":"0846fd1d","Car-vue":"c9b8f57b","Home-vue":"7e6c2fb1","Info-vue":"13be0424","List-vue":"1a025945","Me-vue":"7d1a2e40","Order-vue":"5fa44ed4","OrderStatus-vue":"7bc198d6","Search-vue":"11b5df8d","Type-vue":"7d500bd5"}[e]+".js"}function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],r={"Account-vue":1,"Car-vue":1,"Home-vue":1,"Info-vue":1,"List-vue":1,"Me-vue":1,"Order-vue":1,"OrderStatus-vue":1,"Search-vue":1,"Type-vue":1};a[e]?t.push(a[e]):0!==a[e]&&r[e]&&t.push(a[e]=new Promise((function(t,r){for(var n="css/"+({"Account-vue":"Account-vue","Car-vue":"Car-vue","Home-vue":"Home-vue","Info-vue":"Info-vue","List-vue":"List-vue","Me-vue":"Me-vue","Order-vue":"Order-vue","OrderStatus-vue":"OrderStatus-vue","Search-vue":"Search-vue","Type-vue":"Type-vue"}[e]||e)+"."+{"Account-vue":"06085405","Car-vue":"86d634b1","Home-vue":"edbcd07e","Info-vue":"92a63871","List-vue":"06c17485","Me-vue":"e4363122","Order-vue":"cc885470","OrderStatus-vue":"aae709eb","Search-vue":"97d51272","Type-vue":"d067c8f9"}[e]+".css",u=o.p+n,i=document.getElementsByTagName("link"),c=0;c<i.length;c++){var s=i[c],p=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(p===n||p===u))return t()}var l=document.getElementsByTagName("style");for(c=0;c<l.length;c++){s=l[c],p=s.getAttribute("data-href");if(p===n||p===u)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.onerror=function(t){var n=t&&t.target&&t.target.src||u,i=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");i.code="CSS_CHUNK_LOAD_FAILED",i.request=n,delete a[e],f.parentNode.removeChild(f),r(i)},f.href=u;var h=document.getElementsByTagName("head")[0];h.appendChild(f)})).then((function(){a[e]=0})));var n=u[e];if(0!==n)if(n)t.push(n[2]);else{var i=new Promise((function(t,r){n=u[e]=[t,r]}));t.push(n[2]=i);var s,p=document.createElement("script");p.charset="utf-8",p.timeout=120,o.nc&&p.setAttribute("nonce",o.nc),p.src=c(e);var l=new Error;s=function(t){p.onerror=p.onload=null,clearTimeout(f);var r=u[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",l.name="ChunkLoadError",l.type=n,l.request=a,r[1](l)}u[e]=void 0}};var f=setTimeout((function(){s({type:"timeout",target:p})}),12e4);p.onerror=p.onload=s,document.head.appendChild(p)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],p=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var f=p;i.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("56d7")},1:function(e,t){},"1a5d":function(e,t,r){var n={"./Account.vue":["77be","Account-vue"],"./Car.vue":["08d3","Car-vue"],"./Home.vue":["bb51","Home-vue"],"./Info.vue":["2469","Info-vue"],"./List.vue":["1a33","List-vue"],"./Me.vue":["0a99","Me-vue"],"./Order.vue":["cf2a","Order-vue"],"./OrderStatus.vue":["341e","OrderStatus-vue"],"./Search.vue":["2d3b","Search-vue"],"./Type.vue":["74e0","Type-vue"]};function a(e){if(!r.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],a=t[0];return r.e(t[1]).then((function(){return r(a)}))}a.keys=function(){return Object.keys(n)},a.id="1a5d",e.exports=a},2:function(e,t){},3:function(e,t){},4:function(e,t){},"56d7":function(e,t,r){"use strict";r.r(t);r("9743"),r("b8aa"),r("5493"),r("fa55");var n=r("0261"),a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"app"}},[r("router-view"),e.showTabbar?r("TabbarComponents"):e._e()],1)},u=[],i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("van-tabbar",{attrs:{route:""},model:{value:e.active,callback:function(t){e.active=t},expression:"active"}},[r("van-tabbar-item",{attrs:{to:"/",icon:"wap-home-o"}},[e._v("首页")]),r("van-tabbar-item",{attrs:{to:"/type",icon:"apps-o"}},[e._v("分类")]),r("van-tabbar-item",{attrs:{to:"/car",icon:"shopping-cart-o"}},[e._v("购物车")]),r("van-tabbar-item",{attrs:{to:"/me",icon:"friends-o"}},[e._v("我的")])],1)},c=[],o={data:function(){return{active:0}},methods:{}},s=o,p=r("5511"),l=Object(p["a"])(s,i,c,!1,null,"02f5e4e4",null),f=l.exports,h={provide:function(){return{close:this.CloseTabbar,open:this.OpenTabbar}},data:function(){return{showTabbar:!0}},methods:{CloseTabbar:function(){this.showTabbar=!1},OpenTabbar:function(){this.showTabbar=!0}},components:{TabbarComponents:f}},v=h,d=(r("7faf"),Object(p["a"])(v,a,u,!1,null,null,null)),b=d.exports,m=(r("0d15"),r("c41e"),r("c478"));n["a"].use(m["a"]);var g=[{path:"/",name:"home",component:O("Home"),meta:{title:"首页",isUserLogin:!1}},{path:"/list/:id",name:"list",component:O("List"),meta:{title:"首页",isUserLogin:!1}},{path:"/search",name:"search",component:O("Search"),meta:{title:"搜索",isUserLogin:!1}},{path:"/me",name:"me",component:O("Me"),meta:{title:"我的",isUserLogin:!0}},{path:"/car",name:"car",component:O("Car"),meta:{title:"购物车",isUserLogin:!0}},{path:"/type",name:"type",component:O("Type"),meta:{title:"分类",isUserLogin:!1}},{path:"/info/:id",name:"info",component:O("Info"),meta:{title:"详情",isUserLogin:!1}},{path:"/order",name:"order",component:O("Order"),meta:{title:"订单",isUserLogin:!0}},{path:"/OrderStatus",name:"OrderStatus",component:O("OrderStatus"),meta:{title:"订单状态",isUserLogin:!0}},{path:"/account",name:"account",component:O("Account"),meta:{title:"登录 | 注册",isUserLogin:!1},beforeEnter:function(e,t,r){null==localStorage.getItem("token")?r():(alert("您已登录过了,请勿重复登录"),y.push({name:t.name}))}}],y=new m["a"]({routes:g});function O(e){return function(){return r("1a5d")("./".concat(e,".vue"))}}y.beforeEach((function(e,t,r){document.title=e.meta.title,e.meta.isUserLogin&&null==localStorage.getItem("token")?y.push({name:"account",query:{from:e.path}}):r()}));var j=y,w=(r("eaa7"),r("6e06")),k=(r("3057"),r("7201")),x=r("9d37"),L=(r("63ff"),r("e5af")),U=r("c204"),C=r("1dbf"),S=r("fd77"),R=r("caef"),I=r("2427"),T=r.n(I),A={ajaxUrl:{baseUrl:{dev:"http://144.48.7.203:9090",prod:"http://144.48.7.203:9090"},UrlList:{buyOrder:"/order/buyOrder",allOrder:"/order/allOrder",submitCar:"/car/submitCar",deteteCar:"/car/deleteCar",updateCarNumber:"/car/updateCarNum",getCarList:"/car/getCarList",checkCar:"/car/checkCar",addCar:"/car/addCar",addLike:"/user/like",search:"/home/search",type:"/type/list",list:"/home/activity",index:"/home/index",info:"/home/info",add:"/user/add",login:"/user/login"}},rsa_public_key:"-----BEGIN PUBLIC KEY-----\n MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9eo8WIbWS5Yql06imlhrW0ZXh\n faivPavdULvYLIxIKyUaOwMPFrPuHqqBNGnYOpiPHAKL+zxk2j4u+6jhB6VK1SOD\n ccSLxIRxd0HmSDS+hBzYRf4vKc8BLlhMrYhnLmcxCc+PJIIa4DfCZnu8FfQlu/5L\n ljjpYN9kHOpHAT+xpQIDAQAB\n -----END PUBLIC KEY-----"},_=function(){function e(){Object(k["a"])(this,e)}return Object(U["a"])(e,null,[{key:"BaseApi",value:function(){return A.ajaxUrl.baseUrl.prod}}]),e}(),P=r("35df"),E=r("2381"),M=r.n(E),N=function(){function e(){Object(k["a"])(this,e),this.public_key=A.rsa_public_key}return Object(U["a"])(e,[{key:"PublicKeyEncryption",value:function(e){return new M.a(this.public_key).encrypt(JSON.stringify(e),"base64")}},{key:"PublicKeyDecryption",value:function(e){return JSON.parse(new M.a(this.public_key).decryptPublic(e,"utf8"))}}]),e}(),H=new N,B=function(){function e(){Object(k["a"])(this,e),T.a.defaults.baseURL=_.BaseApi(),this.RequestInterceptors(),this.ResponseInterceptors()}return Object(U["a"])(e,[{key:"get",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(){var t,r=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,T.a.get(t.url,{headers:{data:t.data,token:"2345323454435y"}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"post",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(){var t,r=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,T.a.post(t.url,{},{headers:{data:H.PublicKeyEncryption(t.data),token:localStorage.getItem("token")}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"RequestInterceptors",value:function(){T.a.interceptors.request.use((function(e){return P["a"].loading({message:"加载中...",forbidClick:!0}),e}),(function(e){return Promise.reject(e)}))}},{key:"ResponseInterceptors",value:function(){T.a.interceptors.response.use((function(e){switch(e.data.status){case 200:return P["a"].clear(),H.PublicKeyDecryption(e.data.result);case 404:P["a"].fail(e.data.message);break;case 500:P["a"].fail({message:e.data.message,onClose:function(){localStorage.removeItem("token"),location.href="#/account"}});break;default:break}}),(function(e){return P["a"].fail("wwwww"),Promise.reject(e)}))}}]),e}(),D=new B,K=function e(){Object(k["a"])(this,e),this.api=D,this.config=A},q=function(e){function t(){return Object(k["a"])(this,t),Object(C["a"])(this,Object(S["a"])(t).apply(this,arguments))}return Object(R["a"])(t,e),Object(U["a"])(t,[{key:"getHomeData",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.index,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getInfoData",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.info,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getListData",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.list,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),t}(K),Y=function(e){function t(){return Object(k["a"])(this,t),Object(C["a"])(this,Object(S["a"])(t).apply(this,arguments))}return Object(R["a"])(t,e),Object(U["a"])(t,[{key:"UserAdd",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.add,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"UserLogin",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.login,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"addLike",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.addLike,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),t}(K),Q=function(e){function t(){return Object(k["a"])(this,t),Object(C["a"])(this,Object(S["a"])(t).apply(this,arguments))}return Object(R["a"])(t,e),Object(U["a"])(t,[{key:"getTypeList",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.type,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),t}(K),G=(r("6004"),r("4cfc"),function(e){function t(){return Object(k["a"])(this,t),Object(C["a"])(this,Object(S["a"])(t).apply(this,arguments))}return Object(R["a"])(t,e),Object(U["a"])(t,[{key:"getSearchList",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.search,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),t}(K)),J=function(e){function t(){return Object(k["a"])(this,t),Object(C["a"])(this,Object(S["a"])(t).apply(this,arguments))}return Object(R["a"])(t,e),Object(U["a"])(t,[{key:"addCar",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.addCar,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"checkCar",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.checkCar,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getCarList",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.getCarList,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"updateCarNumber",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.updateCarNumber,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"deteteCar",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.deteteCar,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"submitCar",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.submitCar,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),t}(K),F=function(e){function t(){return Object(k["a"])(this,t),Object(C["a"])(this,Object(S["a"])(t).apply(this,arguments))}return Object(R["a"])(t,e),Object(U["a"])(t,[{key:"allOrder",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.allOrder,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"buyOrder",value:function(){var e=Object(L["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.api.post({url:this.config.ajaxUrl.UrlList.buyOrder,data:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),t}(K),$=function e(){Object(k["a"])(this,e),Object(x["a"])(this,"homeService",new q),Object(x["a"])(this,"userService",new Y),Object(x["a"])(this,"typeService",new Q),Object(x["a"])(this,"searchService",new G),Object(x["a"])(this,"carService",new J),Object(x["a"])(this,"orderService",new F)};n["a"].use(w["a"]),n["a"].prototype.$http=new $,n["a"].config.productionTip=!1,new n["a"]({router:j,render:function(e){return e(b)}}).$mount("#app")},"7faf":function(e,t,r){"use strict";var n=r("d6e9"),a=r.n(n);a.a},d6e9:function(e,t,r){}}); |