diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/3ce.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/3ce.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..765a82a8be17e71ca6ac0bc9c43769dd114159a0 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/3ce.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/3ce.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/3ce.webp" new file mode 100644 index 0000000000000000000000000000000000000000..af71a02a2304768fc6bd9231f1b139f97806c75b Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/3ce.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/adidas.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/adidas.webp" new file mode 100644 index 0000000000000000000000000000000000000000..fc76b00fc068509c53b664031630a797426daa5c Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/adidas.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/akf.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/akf.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..108b227571bfd0ddcf78fc3ad37b83b4b8229701 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/akf.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/akf.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/akf.webp" new file mode 100644 index 0000000000000000000000000000000000000000..5db283a985fa25df72cd61c69d4d9bdb1318d9e4 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/akf.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/beijing.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/beijing.webp" new file mode 100644 index 0000000000000000000000000000000000000000..f4e85eeff04f30a8a131d816e601348593cbeb41 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/beijing.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/bottom.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/bottom.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..f621e92f6953ebe20df89be25ba59fb7f5f98b91 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/bottom.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/caidan.svg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/caidan.svg" new file mode 100644 index 0000000000000000000000000000000000000000..3a6d9c203a36a74137db6b8b7b2a5878f7bc6295 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/caidan.svg" @@ -0,0 +1,16 @@ + + + + icon/Hamburger + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/center.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/center.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..bdecb6a4714244d03e80b950680ddc60d632e0f3 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/center.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/gouwuche.png" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/gouwuche.png" new file mode 100644 index 0000000000000000000000000000000000000000..03b74b36bd6036bc749b76c43273f3ae6e6dd70e Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/gouwuche.png" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/header.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/header.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..54d2e6e9ba02ad8dff99aed8dd46c74186e69de9 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/header.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/jiantou.png" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/jiantou.png" new file mode 100644 index 0000000000000000000000000000000000000000..02daafc69d4431889d6f2c5f0a840a6f31bc5a25 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/jiantou.png" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/kefu.png" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/kefu.png" new file mode 100644 index 0000000000000000000000000000000000000000..287067b3367844ac099da07b436ef349ec3a9b77 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/kefu.png" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/kouhong.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/kouhong.webp" new file mode 100644 index 0000000000000000000000000000000000000000..eee674028853f23421e0dc4b8eba7ff4e83ba070 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/kouhong.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/lining.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/lining.webp" new file mode 100644 index 0000000000000000000000000000000000000000..e16654e08146354dcf9c27ac964c5da9bd993ec5 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/lining.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/ln.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/ln.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..3eb9ccf63838c73f17caed413e3d58430a22b408 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/ln.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/logo.png" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/logo.png" new file mode 100644 index 0000000000000000000000000000000000000000..f3d2503fc2a44b5053b0837ebea6e87a2d339a43 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/logo.png" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/shenghuoguan.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/shenghuoguan.webp" new file mode 100644 index 0000000000000000000000000000000000000000..8b5c5cea5e7bfb7197da35e6fd7b89b6c559af54 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/shenghuoguan.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/ugg.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/ugg.webp" new file mode 100644 index 0000000000000000000000000000000000000000..ff2f726f9d2ed4c875219a5a5b2d76cfdaa89f8c Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/ugg.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/weipinhui.png" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/weipinhui.png" new file mode 100644 index 0000000000000000000000000000000000000000..85b8b783d037ed0f9132e2ad8bac7ff514bea144 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/weipinhui.png" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/wnn.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/wnn.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..e49cca31a0d32f868788822a6b009e2e2b747928 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/wnn.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/yfl.jpg" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/yfl.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..8de0ed2a536aa3038846766884e1086f42bcae6a Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/yfl.jpg" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/zhengpin.webp" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/zhengpin.webp" new file mode 100644 index 0000000000000000000000000000000000000000..86abf234fd089b7ebfc2c2d7c09b0061c450cc7c Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/assets/zhengpin.webp" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/data.txt" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/data.txt" new file mode 100644 index 0000000000000000000000000000000000000000..f68adf9c8dd338eea0d29489b21ef45c86340736 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/data.txt" @@ -0,0 +1,14 @@ +{ + code:200, + data:{ + products:[ + {id:1,name:'韩国三熹玉3CE彩妆香水专场',img:'../assets/header.jpg',num:80,price:1000}, + {id:2,name:'阿迪达斯三叶草运动户外专场',img:'../assets/center.jpg',num:90,price:2000}, + {id:3,name:'UGG专场',img:'../assets/bottom.jpg',num:80,price:3000}, + {id:4,name:'伊芙丽eifini女装专场',img:'../assets/yfl.jpg',num:67,price:3000} + ] + }, + msg:'请求成功' + +} + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/favicon.ico" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/favicon.ico" new file mode 100644 index 0000000000000000000000000000000000000000..df36fcfb72584e00488330b560ebcf34a41c64c2 Binary files /dev/null and "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/favicon.ico" differ diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/index.html" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/index.html" new file mode 100644 index 0000000000000000000000000000000000000000..3e5a13962197105f2078d2a224cc57dfa09b4893 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/public/index.html" @@ -0,0 +1,17 @@ + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + +
+ + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/App.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..72248fd61be78392d39e4189212a95a6d3cf0c56 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/App.vue" @@ -0,0 +1,44 @@ + + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/components/CartItem.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/components/CartItem.vue" new file mode 100644 index 0000000000000000000000000000000000000000..d8ef9742ff81f7be68c7a733dae40fbb69af4768 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/components/CartItem.vue" @@ -0,0 +1,86 @@ + + + + + \ No newline at end of file diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/components/HeaderBase.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/components/HeaderBase.vue" new file mode 100644 index 0000000000000000000000000000000000000000..9a6b716bffe8f4d945b17701847d5448ece932af --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/components/HeaderBase.vue" @@ -0,0 +1,99 @@ + + + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/data/product.js" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/data/product.js" new file mode 100644 index 0000000000000000000000000000000000000000..33bcfc92bb743fd6b93c7f1bb6ed4d832094ad14 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/data/product.js" @@ -0,0 +1,47 @@ + +// export let products=[ +// {id:1,name:'韩国三熹玉3CE彩妆香水专场',img:'../assets/header.jpg',num:80,price:1000}, +// {id:2,name:'阿迪达斯三叶草运动户外专场',img:'../assets/center.jpg',num:90,price:2000}, +// {id:3,name:'UGG专场',img:'../assets/bottom.jpg',num:80,price:3000}, +// {id:4,name:'伊芙丽eifini女装专场',img:'../assets/yfl.jpg',num:67,price:3000} +// ]; + +// export let cart=[]; + +export default { + name:'product', + products:[ + {id:1,name:'韩国三熹玉3CE彩妆香水专场',img:'../assets/header.jpg',num:80,price:1000}, + {id:2,name:'阿迪达斯三叶草运动户外专场',img:'../assets/center.jpg',num:90,price:2000}, + {id:3,name:'UGG专场',img:'../assets/bottom.jpg',num:80,price:3000}, + {id:4,name:'伊芙丽eifini女装专场',img:'../assets/yfl.jpg',num:67,price:3000} + ], + cart:[], + + addToCart:function(id){ + + let inCart = false; + this.cart.forEach(el=>{ + if(id==el.id){ + inCart=true; + el.num++; + } + }) + if(inCart==false){ + this.products.forEach(el=>{ + if(el.id==id){ + let product =el; + product.num=1; + this.cart.push(product); + } + }) + } + console.log(this.cart) + }, + getCart(){ + return this.cart; + }, +} + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/adidas.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/adidas.vue" new file mode 100644 index 0000000000000000000000000000000000000000..8fe067a09f1a02ff14144dccbca474f69b9094c0 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/adidas.vue" @@ -0,0 +1,202 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/akf.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/akf.vue" new file mode 100644 index 0000000000000000000000000000000000000000..23138e7d592667493502d1cc23279cd92c997d66 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/akf.vue" @@ -0,0 +1,202 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/lining.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/lining.vue" new file mode 100644 index 0000000000000000000000000000000000000000..48dfd1e7da19af708b5095258ff98ea2b67479d5 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/lining.vue" @@ -0,0 +1,202 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/threece.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/threece.vue" new file mode 100644 index 0000000000000000000000000000000000000000..2300dc74b2e7a4f07cab100bba56dae3eec489e9 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/threece.vue" @@ -0,0 +1,239 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/ugg.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/ugg.vue" new file mode 100644 index 0000000000000000000000000000000000000000..ff48e788b35ad11d251b32a03d2fc7aa499af339 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/detail/ugg.vue" @@ -0,0 +1,202 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/main.js" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/main.js" new file mode 100644 index 0000000000000000000000000000000000000000..0515e5930fd0152dc95239733149dbc597514772 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/main.js" @@ -0,0 +1,48 @@ +import Vue from 'vue' +import App from './App.vue' +import axios from 'axios' + + +//引入VueRouter +import VueRouter from 'vue-router' +//应用插件 +Vue.use(VueRouter) + + + +//引入路由器 +import router from './router/index'; + +import plugin1 from './plugins/plugin1' + +Vue.use(plugin1) + + + + +// axios.defaults.baseURL='http://123.207.32.32:8000'; +Vue.prototype.$axios=axios; + + + + + +//关闭生产环境提交 +Vue.config.productionTip = false +//render 渲染 temldate. +new Vue({ + el:'#app', + // template:'', + // components:{ + // App, + // } + //脚手架引入的vue是残缺的,为了性能 + render: (createElement) => { + // console.log(typeof createElement); + return createElement(App) + }, + beforeCreate:function(){ + Vue.prototype.$bus=this; + }, + router, +}) diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/mixin/MixIn.js" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/mixin/MixIn.js" new file mode 100644 index 0000000000000000000000000000000000000000..cc160b5338bfef3e91c5232f8a7eb6f60e7f361e --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/mixin/MixIn.js" @@ -0,0 +1,40 @@ +export let methods={ + created:function(){ + console.log('mixin created') + this.initData(); + }, + methods:{ + initData:function(){ + //let url ='https://question.llblog.cc/'; + let url ='https://question.llblog.cc/api.php';//做了跨域处理的 + //methos get post delete patch + this.$axios.get(url).then(res=>{ + this.products=res.data.data; + console.log(this.products) + }); + } + }, + mounted:function(){ + this.$bus.$on('confirmOder',(id,num)=>{ + console.log('adv 收到change'); + this.products.forEach(el=>{ + if(el.id==id){ + el.num = el.num-num; + } + }) + }) + }, +} + + +export const data={ + data:function(){ + return { + title:'实训项目', + price:100, + num:10 + } + } + +} + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/AdvList.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/AdvList.vue" new file mode 100644 index 0000000000000000000000000000000000000000..62298260285a48f66eb15adda30f308f3d2c82f3 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/AdvList.vue" @@ -0,0 +1,108 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/BodyBase.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/BodyBase.vue" new file mode 100644 index 0000000000000000000000000000000000000000..99f6845da7653a47d9a7042b206c595b8210eff0 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/BodyBase.vue" @@ -0,0 +1,71 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/CartList.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/CartList.vue" new file mode 100644 index 0000000000000000000000000000000000000000..dc56a809c8e25c2524a27b252e85f806b27193d4 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/CartList.vue" @@ -0,0 +1,67 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/Detail.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/Detail.vue" new file mode 100644 index 0000000000000000000000000000000000000000..57bd97c437790c3fc2ce187c9e0a0d0751c6752c --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/Detail.vue" @@ -0,0 +1,226 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/Recod.vue" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/Recod.vue" new file mode 100644 index 0000000000000000000000000000000000000000..70a2fa3fecf22c2a82812cc01ec268a3ec012065 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/pages/Recod.vue" @@ -0,0 +1,84 @@ + + + + diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/plugins/plugin1.js" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/plugins/plugin1.js" new file mode 100644 index 0000000000000000000000000000000000000000..a62e97a02d5d658149055a8fc742b53ee37542a1 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/plugins/plugin1.js" @@ -0,0 +1,26 @@ +import VueScroller from 'vue-scroller' + + +const plugin1 = { + install: function (Vue) { + console.log('plugin1 start') + console.log(Vue); + //增强属性 + Vue.prototype.$class = 'class7'; + //全局的混入 + Vue.mixin({ + data: function () { + return { + month: 15, + hope: '挣大钱', + pageSize: 20 + } + } + }) + //全局的指令..... + + Vue.use(VueScroller) + } + +} +export default plugin1 \ No newline at end of file diff --git "a/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/router/index.js" "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/router/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..fd5d1a845e979e8c58805fae2a9cc9ce39713d04 --- /dev/null +++ "b/\351\251\254\351\235\222\351\235\222/2022.5.5 vue/src/router/index.js" @@ -0,0 +1,50 @@ +// 配置路由规则 +import VueRouter from 'vue-router' +//默认商品列表 +import BodyBase from '../pages/BodyBase' +//默认商品广告列表 +import AdvList from '../pages/AdvList' +import Detail from '../pages/Detail' +import CartList from '../pages/CartList' +import Recod from '../pages/Recod' + +//创建并暴露一个路由器 +export default new VueRouter({ + routes: [ + { + path: '/', + component: BodyBase, + }, + { + path: '/base', + component: Recod, + }, + { + name:'listName', + path: '/adv', + component: AdvList, + meta:{ + keepalive:true + } + }, + { + name:'detail', + //path:'/detail', + path: '/detail/:id/:name', + component: Detail, + //props:{id:'id1',name:'name1'}, 对象写法 + props:true + }, + { + name:'cartList', + //path:'/detail', + path: '/cartList', + component: CartList, + //props:{id:'id1',name:'name1'}, 对象写法 + props:true + }, + + ] +}) + +// export default router \ No newline at end of file