Showing
12 changed files
with
120 additions
and
3 deletions
apps/pages/single/coupon/README.md
0 → 100644
apps/pages/single/coupon/index.js
0 → 100644
apps/pages/single/coupon/ufo/index.js
0 → 100644
apps/pages/single/coupon/ufo/list.vue
0 → 100644
1 | +<template> | ||
2 | + <LayoutApp> | ||
3 | + <div class="order-page"> | ||
4 | + <div class="title">出售中</div> | ||
5 | + <div class="product"> | ||
6 | + <p class="name">{{orderProduct}}</p> | ||
7 | + <p>{{orderDetail}}</p> | ||
8 | + </div> | ||
9 | + </div> | ||
10 | + </LayoutApp> | ||
11 | +</template> | ||
12 | + | ||
13 | +<script> | ||
14 | +import {createNamespacedHelpers} from 'vuex'; | ||
15 | + | ||
16 | +const {mapState, mapActions} = createNamespacedHelpers('ufo/order'); | ||
17 | + | ||
18 | +export default { | ||
19 | + name: 'UfoCouponListPage', | ||
20 | + computed: { | ||
21 | + ...mapState(['orderProduct', 'orderDetail']) | ||
22 | + }, | ||
23 | + asyncData({store, router}) { | ||
24 | + return store.dispatch('ufo/order/fetchProduct', {orderId: router.params.orderId}); | ||
25 | + }, | ||
26 | + created() { | ||
27 | + | ||
28 | + }, | ||
29 | + mounted() { | ||
30 | + this.fetchOrderDetail({orderId: this.$route.params.orderId}); | ||
31 | + }, | ||
32 | + methods: { | ||
33 | + ...mapActions(['fetchOrderDetail']) | ||
34 | + } | ||
35 | +}; | ||
36 | +</script> | ||
37 | + | ||
38 | +<style lang="scss" scoped> | ||
39 | +.title { | ||
40 | + text-align: center; | ||
41 | + font-size: 70px; | ||
42 | + line-height: 200px; | ||
43 | +} | ||
44 | +</style> |
apps/pages/single/coupon/yoho/index.js
0 → 100644
apps/pages/single/coupon/yoho/list.vue
0 → 100644
1 | +<template> | ||
2 | + <LayoutApp> | ||
3 | + <div class="order-page"> | ||
4 | + <div class="title">出售中</div> | ||
5 | + <div class="product"> | ||
6 | + <p class="name">{{orderProduct}}</p> | ||
7 | + <p>{{orderDetail}}</p> | ||
8 | + </div> | ||
9 | + </div> | ||
10 | + </LayoutApp> | ||
11 | +</template> | ||
12 | + | ||
13 | +<script> | ||
14 | +import {createNamespacedHelpers} from 'vuex'; | ||
15 | + | ||
16 | +const {mapState, mapActions} = createNamespacedHelpers('ufo/order'); | ||
17 | + | ||
18 | +export default { | ||
19 | + name: 'YohoCouponListPage', | ||
20 | + computed: { | ||
21 | + ...mapState(['orderProduct', 'orderDetail']) | ||
22 | + }, | ||
23 | + asyncData({store, router}) { | ||
24 | + return store.dispatch('ufo/order/fetchProduct', {orderId: router.params.orderId}); | ||
25 | + }, | ||
26 | + created() { | ||
27 | + | ||
28 | + }, | ||
29 | + mounted() { | ||
30 | + this.fetchOrderDetail({orderId: this.$route.params.orderId}); | ||
31 | + }, | ||
32 | + methods: { | ||
33 | + ...mapActions(['fetchOrderDetail']) | ||
34 | + } | ||
35 | +}; | ||
36 | +</script> | ||
37 | + | ||
38 | +<style lang="scss" scoped> | ||
39 | +.title { | ||
40 | + text-align: center; | ||
41 | + font-size: 70px; | ||
42 | + line-height: 200px; | ||
43 | +} | ||
44 | +</style> |
1 | import Vue from 'vue'; | 1 | import Vue from 'vue'; |
2 | import Components from './components'; | 2 | import Components from './components'; |
3 | import Ufo from './ufo'; | 3 | import Ufo from './ufo'; |
4 | +import Coupon from './coupon'; | ||
4 | 5 | ||
5 | Components.forEach(component => Vue.component(component.name, component)); | 6 | Components.forEach(component => Vue.component(component.name, component)); |
6 | 7 | ||
7 | 8 | ||
8 | -export default [...Ufo]; | 9 | +export default [...Ufo, ...Coupon]; |
@@ -40,7 +40,7 @@ exports.devServer = (app, cb) => { | @@ -40,7 +40,7 @@ exports.devServer = (app, cb) => { | ||
40 | }; | 40 | }; |
41 | 41 | ||
42 | clientConfig.entry.app = ['./build/client-hot.js', clientConfig.entry.app]; | 42 | clientConfig.entry.app = ['./build/client-hot.js', clientConfig.entry.app]; |
43 | - clientConfig.output.publicPath = 'http://m.yohoblk.com:6005/'; | 43 | + clientConfig.output.publicPath = 'http://localhost:6005/'; |
44 | clientConfig.output.filename = '[name].js'; | 44 | clientConfig.output.filename = '[name].js'; |
45 | clientConfig.plugins.push( | 45 | clientConfig.plugins.push( |
46 | new webpack.HotModuleReplacementPlugin(), | 46 | new webpack.HotModuleReplacementPlugin(), |
@@ -75,7 +75,7 @@ exports.createApp = async(app) => { | @@ -75,7 +75,7 @@ exports.createApp = async(app) => { | ||
75 | 75 | ||
76 | // listener | 76 | // listener |
77 | app.listen(config.port, function() { | 77 | app.listen(config.port, function() { |
78 | - logger.info(`worker is started at ${config.port}`); | 78 | + logger.info(`worker is started at http://localhost:${config.port}`); |
79 | }); | 79 | }); |
80 | } catch (err) { | 80 | } catch (err) { |
81 | logger.error(err); | 81 | logger.error(err); |
-
Please register or login to post a comment