{"version":3,"sources":["webpack:///./src/App.vue?58ec","webpack:///./src/App.vue","webpack:///src/App.vue","webpack:///./src/router/index.js","webpack:///./src/store/state.js","webpack:///./src/store/mutations.js","webpack:///./src/store/mutation-types.js","webpack:///./src/store/actions.js","webpack:///./src/store/index.js","webpack:///./src/main.js"],"names":["selectortype_template_index_0_src_App","render","_h","this","$createElement","_c","_self","attrs","id","staticRenderFns","src_App","__webpack_require__","normalizeComponent","name","ssrContext","Vue","use","Router","router","routes","path","component","Promise","all","e","then","bind","meta","requiresAuth","children","redirect","beforeEach","to","from","next","isAuthenticated","localStorage","getItem","matched","some","record","fullPath","sessionStorage","setItem","query","state","userInfo","cartCount","userId","mutations","_RECEIVE_USER_INFO$RE","defineProperty_default","console","log","actions","recordUser","_ref","commit","recordCartCount","_ref2","initCartCount","_ref3","recordUserId","_ref4","Vuex","store","Store","getters","VueAreaLinkage","ElementUI","VueLazyLoad","loading","axios","defaults","withCredentials","baseURL","headers","common","Content-Type","config","productionTip","el","components","App","template"],"mappings":"6IAGeA,GADEC,OAFjB,WAA0B,IAAaC,EAAbC,KAAaC,eAA0BC,EAAvCF,KAAuCG,MAAAD,IAAAH,EAAwB,OAAAG,EAAA,OAAiBE,OAAOC,GAAA,SAAYH,EAAA,oBAE5GI,oBCCjB,IAuBeC,EAvBUC,EAAQ,OAcjCC,ECTAC,KAAA,ODWEb,GATF,EAVA,SAAAc,GACEH,EAAQ,SAaV,KAEA,MAUgC,oBELhCI,UAAIC,IAAIC,KAER,IAAMC,EAAQ,IAAID,KAChBE,SAEIC,KAAM,IACNP,KAAM,QACNQ,UAzBa,kBAAMC,QAAAC,KAAAZ,EAAAa,EAAA,GAAAb,EAAAa,EAAA,KAAAC,KAAAd,EAAAe,KAAA,iBA4BnBN,KAAM,WACNP,KAAM,UACNQ,UA3Bc,kBAAMC,QAAAC,KAAAZ,EAAAa,EAAA,GAAAb,EAAAa,EAAA,KAAAC,KAAAd,EAAAe,KAAA,iBA8BpBN,KAAM,SACN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aAAaO,QAAQ,WAAWG,IAUhCY,gBAdc,SAAAC,EAcWZ,IACxBU,EADkCE,EAAlBF,QDpBgB,qBCqBNV,GAC3BK,QAAQC,IAAI,aAAaN,IAIzBa,cApBc,SAAAC,EAoBSd,IACtBU,EADgCI,EAAlBJ,QDxBe,kBCyBNV,IAIxBe,aAzBc,SAAAC,EAyBQf,IACrBS,EAD4BM,EAAfN,QD3BgB,kBC4BNT,GACvBZ,aAAaO,QAAQ,SAASK,0BC7BhCjC,UAAIC,IAAIgD,KAEO,IAAAC,EAAA,IAAID,IAAKE,OACtBrB,QACAI,YACAK,UACAa,mICGFpD,UAAIC,IAAIoD,KACRrD,UAAIC,IAAIqD,KACRtD,UAAIC,IAAIsD,KACPC,QAAQ,sEASPC,IAAMC,SAASC,iBAAkB,EACjCF,IAAMC,SAASE,QAAU,4BACzBH,IAAMC,SAASG,QAAQC,QACrBC,eAAgB,oBAMpB/D,UAAIgE,OAAOC,eAAgB,EAG3B,IAAIjE,WACFkE,GAAI,OACJ/D,SACD+C,QACCiB,YAAcC,OACdC,SAAU","file":"static/js/app.5972d7e8065b77d56ecc.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-3a8f034a\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-3a8f034a\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-3a8f034a\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/App.vue\n// module id = null\n// module chunks = ","\n \n \n
\n\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/App.vue","import Vue from 'vue'\nimport Router from 'vue-router'\n\nconst msite \t\t\t\t\t= () => import('../page/msite/msite') //首页\nconst login \t\t\t\t\t= () => import('../page/login/login') //登录页\nconst regSuc \t\t\t\t\t= () => import('../page/regSuc/regSuc') //注册成功页\nconst details \t\t\t\t= () => import('../page/details/details') //详情页\nconst payment \t\t\t\t= () => import('../page/payment/payment') //支付\nconst register \t\t\t\t= () => import('../page/register/register') //注册页\nconst shopping \t\t\t\t= () => import('../page/shopping/shopping') //购物车\nconst personal \t\t\t\t= () => import('../page/personal/personal') //个人中心\nconst orderSuc \t\t\t\t= () => import('../page/orderSuc/orderSuc') //订单成功页\nconst commodity \t\t\t= () => import('../page/commodity/commodity') //商品页\nconst addresses \t\t\t= () => import('../page/addresses/addresses') //地址页\nconst personalOrders \t= () => import('../page/personal/orders/orders') //个人中心 订单\nconst personalAccount = () => import('../page/personal/account/account') //个人中心 用户资料\nconst personalAddress = () => import('../page/personal/address/address') //个人中心 地址\n\n\n\n\nVue.use(Router)\n\nconst router =new Router({\n routes: [\n {\n path: '/',\n name: 'msite',\n component: msite\n },\n {\n path: '/details',\n name: 'details',\n component: details\n },\n {\n path: '/login',\n name: 'login',\n component: login\n },\n {\n path: '/register',\n name: 'register',\n component: register\n },\n {\n path: '/shopping',\n name: 'shopping',\n meta: { requiresAuth: true },\n component: shopping\n },\n {\n path: '/payment',\n name: 'payment',\n meta: { requiresAuth: true },\n component: payment\n },\n {\n path: '/personal',\n name: 'personal',\n component: personal,\n meta: { requiresAuth: true },\n children:[\n {\n path:'/personal/orders',\n component: personalOrders,\n meta: { requiresAuth: true },\n },\n {\n path:'/personal/account',\n component: personalAccount,\n meta: { requiresAuth: true },\n },\n {\n path:'/personal/address',\n component: personalAddress,\n meta: { requiresAuth: true },\n },\n {\n path: '',\n redirect: '/personal/orders'\n }\n ]\n },\n\t\t{\n\t\t\tpath: '/commodity',\n\t\t\tname: 'commodity',\n\t\t\tcomponent: commodity\n\t\t},\n\t\t{\n\t\t\tpath: '/addresses',\n\t\t\tname: 'addresses',\n meta: { requiresAuth: true },\n\t\t\tcomponent: addresses\n\t\t},\n\t\t{\n\t\t\tpath: '/regSuc',\n\t\t\tname: 'regSuc',\n\t\t\tcomponent: regSuc\n\t\t},\n\t\t{\n\t\t\tpath: '/orderSuc',\n\t\t\tname: 'orderSuc',\n meta: { requiresAuth: true },\n\t\t\tcomponent: orderSuc\n\t\t},\n ]\n})\n\n// // 添加全局前置守卫 \nrouter.beforeEach((to, from, next) => { \n // console.log(to,from, '跳转路由')\n\n const isAuthenticated = localStorage.getItem('userId')?true:false; \n const requiresAuth = to.matched.some(record => record.meta.requiresAuth); \n\n // console.log(isAuthenticated,requiresAuth, '跳转')\n\n if(to.fullPath=='/login'&&!isAuthenticated){\n sessionStorage.setItem('redirect', from.fullPath); \n }\n \n if (requiresAuth && !isAuthenticated) { \n // 保存到要访问的页面地址 \n sessionStorage.setItem('redirect', to.fullPath); \n next({ \n path: '/login', \n query: { redirect: to.fullPath } \n }); \n } else { \n next(); // 确保一定要调用 next() 方法 \n } \n}); \n\nexport default router;\n\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/router/index.js","/*\n状态对象\n */\nexport default {\n userInfo: ''||localStorage.getItem('userInfo'), //用户信息\n cartCount: 0, //购物车数量\n userId: 0||localStorage.getItem('userId'),//用户id\n}\n\n\n// WEBPACK FOOTER //\n// ./src/store/state.js","/*\n直接更新state的多个方法的对象\n */\nimport Vue from 'vue'\nimport {\n RECEIVE_USER_INFO, \t//改变用户名\n\tRECEIVE_CART_COUNT, //改变购物车数量\n\tINIT_CART_COUNT, //改变购物车数量 点击加入购物车时调用\n\tRECEIVE_USER_ID, //用户id\n\n} from './mutation-types'\n\nexport default {\n \n\t//改变用户名信息\n [RECEIVE_USER_INFO] (state, userInfo) {\n \tstate.userInfo = userInfo\n\tconsole.log('mutations==='+userInfo)\n },\n\t\n\t//改变购物车数量 页面刷新时调用\n\t[RECEIVE_CART_COUNT] (state, cartCount) {\n\t\tstate.cartCount += cartCount\n\t\tconsole.log('cartCount==='+cartCount)\n\t},\n\t\n\t//改变购物车数量 点击加入购物车时调用\n\t[INIT_CART_COUNT] (state, cartCount) {\n\t\tstate.cartCount = cartCount\n\t},\n\t\n\t//用户id\n\t[RECEIVE_USER_ID] (state, userId) {\n\t\tstate.userId = userId\n\t\tconsole.log('userIdmm======'+userId)\n\t},\n}\n\n\n// WEBPACK FOOTER //\n// ./src/store/mutations.js","/*\n包含n个mutation的type名称常量\n */\n\nexport const RECEIVE_USER_INFO = 'receive_user_info' // 接收用户信息\n\nexport const RECEIVE_CART_COUNT = 'receive_cart_count' // 接收购物车数量\n\nexport const INIT_CART_COUNT = 'init_cart_count' // 接收购物车数量\n\nexport const RECEIVE_USER_ID = 'receive_user_id' // 接收用户id\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/mutation-types.js","/*\n通过mutation间接更新state的多个方法的对象\n */\nimport {\n RECEIVE_USER_INFO, \t//改变用户名\n RECEIVE_CART_COUNT, //改变购物车数量\n INIT_CART_COUNT, //改变购物车数量 点击加入购物车时调用\n\tRECEIVE_USER_ID, //用户id\n\t\n\n} from './mutation-types'\n\nexport default {\n //同步记录用户信息\n recordUser({commit},userInfo){\n commit(RECEIVE_USER_INFO,userInfo)\n\tlocalStorage.setItem('userInfo',userInfo)\n\t// console.log('actions==='+userInfo)\n },\n\t\n// \trecordUseres({commit},userInfo){\n// \t\tcommit(RECEIVE_USER_INFO,userInfo)\n// \tconsole.log('actions==='+userInfo)\n// \t},\n\t\n\t//改变购物车数量\n\trecordCartCount({commit},cartCount){\n\t\tcommit(RECEIVE_CART_COUNT,cartCount)\n\tconsole.log('actions==='+cartCount)\n\t},\n\t\n\t//改变购物车数量 点击加入购物车时调用\n\tinitCartCount({commit},cartCount){\n\t\tcommit(INIT_CART_COUNT,cartCount)\n\t},\n\t\n\t//用户id\n\trecordUserId({commit},userId){\n\t\tcommit(RECEIVE_USER_ID,userId)\n\t\tlocalStorage.setItem('userId',userId)\n\t\t// console.log('userIdaa======'+userId)\n\t},\n\t\n\t\n}\n\n\n// WEBPACK FOOTER //\n// ./src/store/actions.js","/*\nvuex最核心的管理对象store\n */\nimport Vue from 'vue'\nimport Vuex from 'vuex'\nimport state from './state'\nimport mutations from './mutations'\nimport actions from './actions'\nimport getters from './getters'\n\nVue.use(Vuex)\n\nexport default new Vuex.Store({\n state,\n mutations,\n actions,\n getters\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport App from './App'\nimport router from './router'\nimport store from './store'\nimport ElementUI from 'element-ui';\nimport VueLazyLoad from 'vue-lazyload' //图片懒加载\nimport axios from 'axios'\n\nimport 'vue-area-linkage/dist/index.css'; // v2 or higher\nimport VueAreaLinkage from 'vue-area-linkage';\n \n\nimport 'element-ui/lib/theme-chalk/index.css';\nimport 'bootstrap/dist/css/bootstrap.min.css'\nimport 'bootstrap/dist/js/bootstrap.min.js'\n\n// import myImage from './assets/my-image.png'; \nVue.use(VueAreaLinkage);\nVue.use(ElementUI);\nVue.use(VueLazyLoad,{\n\tloading:'https://img.zcool.cn/community/01ce665bbcc942a8012099c8ef13f1.gif'\n})\n// Vue.use(VueLazyLoad,{\n// \tloading:'/assets/img/01ce665bbcc942a8012099c8ef13f1.gif'\n// })\n\n\nif (process.env.NODE_ENV === 'production') {\n // 生产环境逻辑\n axios.defaults.withCredentials = true; // 设置全局默认配置 \n axios.defaults.baseURL = 'http://www.eend.fun:5000/';//路径\n axios.defaults.headers.common = { \n 'Content-Type': 'application/json', // 所有请求都会发送这个头 \n // 'Authorization': 'Bearer your_token_here' // 这里通常不设置默认的token,因为每个请求可能不一样 \n }; \n}\n\n\nVue.config.productionTip = false\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n router,\n\tstore, //使用上store\n components: { App },\n template: ''\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js"],"sourceRoot":""}