Authored by 王水玲

Merge remote-tracking branch 'origin/master' into feature/fashion-detail

@@ -4,6 +4,9 @@ @@ -4,6 +4,9 @@
4 :name="`route-view-${yoho.direction}`"> 4 :name="`route-view-${yoho.direction}`">
5 <router-view></router-view> 5 <router-view></router-view>
6 </transition> 6 </transition>
  7 + <div class="fps" v-if="showFps">
  8 + {{fps}}
  9 + </div>
7 </div> 10 </div>
8 </template> 11 </template>
9 12
@@ -12,16 +15,45 @@ import {mapState} from 'vuex'; @@ -12,16 +15,45 @@ import {mapState} from 'vuex';
12 15
13 export default { 16 export default {
14 name: 'App', 17 name: 'App',
  18 + data() {
  19 + return {
  20 + showFps: false,
  21 + fpsTick: 0,
  22 + fps: 0
  23 + };
  24 + },
15 computed: { 25 computed: {
16 ...mapState(['yoho']) 26 ...mapState(['yoho'])
17 }, 27 },
18 mounted() { 28 mounted() {
  29 + if (process.env.NODE_ENV === 'development') {
  30 + this.showFps = true;
  31 + this.frameCallback();
  32 + }
19 if (this.yoho.context.needLogin) { 33 if (this.yoho.context.needLogin) {
20 this.$yoho.ready(() => { 34 this.$yoho.ready(() => {
21 this.$sdk.goLogin(); 35 this.$sdk.goLogin();
22 }); 36 });
23 } 37 }
24 }, 38 },
  39 + methods: {
  40 + frameCallback() {
  41 + window.requestAnimationFrame(() => {
  42 + const now = Date.now();
  43 +
  44 + if (!this.time) {
  45 + this.time = now;
  46 + }
  47 + if (now - this.time >= 1000) {
  48 + this.time = now;
  49 + this.fps = this.fpsTick;
  50 + this.fpsTick = 0;
  51 + }
  52 + this.fpsTick++;
  53 + this.frameCallback();
  54 + });
  55 + }
  56 + },
25 watch: { 57 watch: {
26 'yoho.context.needLogin': function(newVal) { 58 'yoho.context.needLogin': function(newVal) {
27 if (newVal) { 59 if (newVal) {
@@ -72,4 +104,15 @@ export default { @@ -72,4 +104,15 @@ export default {
72 transform: translate3d(100%, 0, 0); 104 transform: translate3d(100%, 0, 0);
73 z-index: 2; 105 z-index: 2;
74 } 106 }
  107 +
  108 +.fps {
  109 + position: absolute;
  110 + z-index: 99;
  111 + left: 0;
  112 + top: 0;
  113 + width: 20PX;
  114 + height: 20PX;
  115 + background-color: white;
  116 + color: black;
  117 +}
75 </style> 118 </style>
@@ -91,14 +91,14 @@ export default { @@ -91,14 +91,14 @@ export default {
91 .product-name { 91 .product-name {
92 font-size: 24px; 92 font-size: 24px;
93 color: #9b9b9b; 93 color: #9b9b9b;
94 - letter-spacing: -0.25px; 94 + letter-spacing: -0.25PX;
95 height: 104px; 95 height: 104px;
96 } 96 }
97 97
98 .price { 98 .price {
99 font-size: 32px; 99 font-size: 32px;
100 color: #d0021b; 100 color: #d0021b;
101 - letter-spacing: -0.34px; 101 + letter-spacing: -0.34PX;
102 } 102 }
103 } 103 }
104 104
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 type: String, 45 type: String,
46 default: 'fav' 46 default: 'fav'
47 }, 47 },
48 - text: String, 48 + text: [String, Number],
49 option: { 49 option: {
50 type: Object, 50 type: Object,
51 default() { 51 default() {
@@ -88,12 +88,16 @@ @@ -88,12 +88,16 @@
88 textStyle() { 88 textStyle() {
89 let style = `font-size: ${pxToRem(this.option.textFontSize || defaultOption.textFontSize)};`; 89 let style = `font-size: ${pxToRem(this.option.textFontSize || defaultOption.textFontSize)};`;
90 90
91 - if (['top', 'bottom'].indexOf(this.option.textAlign) >= 0) {  
92 - style += ` vertical-align: ${this.option.textAlign};`; 91 + let textAlign = this.option.textAlign || defaultOption.textAlign;
  92 +
  93 + if (['top', 'bottom'].indexOf(textAlign) >= 0) {
  94 + style += ` vertical-align: ${textAlign};`;
93 } 95 }
94 96
95 - if (Number(this.option.textZoom) !== NaN) {  
96 - style += `transform: scale(${this.option.textZoom}, ${this.option.textZoom});` 97 + let textZoom = this.option.textZoom || defaultOption.textAlign;
  98 +
  99 + if (Number(textZoom) !== NaN) {
  100 + style += `transform: scale(${textZoom}, ${textZoom});`
97 } 101 }
98 102
99 return style; 103 return style;
1 <template> 1 <template>
2 - <Layout> 2 + <Layout class="article-page">
3 <LayoutHeader slot='header' title="推荐" :share="shareData"> 3 <LayoutHeader slot='header' title="推荐" :share="shareData">
4 <i class="iconfont icon-share-blod" slot="opts"></i> 4 <i class="iconfont icon-share-blod" slot="opts"></i>
5 </LayoutHeader> 5 </LayoutHeader>
@@ -71,4 +71,7 @@ export default { @@ -71,4 +71,7 @@ export default {
71 </script> 71 </script>
72 72
73 <style lang="scss" scoped> 73 <style lang="scss" scoped>
  74 +.article-page {
  75 + background-color: #f0f0f0;
  76 +}
74 </style> 77 </style>
@@ -5,11 +5,11 @@ @@ -5,11 +5,11 @@
5 <span class="comment-content">{{comment.content}}</span> 5 <span class="comment-content">{{comment.content}}</span>
6 </p> 6 </p>
7 <div class="total-comment"> 7 <div class="total-comment">
8 - <div class="total">查看{{count}}条评论</div>  
9 - <div class="last-time">1天前</div> 8 + <div class="total hover-opacity">查看{{count}}条评论</div>
  9 + <div class="last-time">{{date}}</div>
10 </div> 10 </div>
11 <div class="comment"> 11 <div class="comment">
12 - <CubeInput placeholder='添加回复:赞美是一种美德'></CubeInput> 12 + <div class="comment-input hover-opacity">添加回复:赞美是一种美德</div>
13 </div> 13 </div>
14 </div> 14 </div>
15 </template> 15 </template>
@@ -28,6 +28,10 @@ export default { @@ -28,6 +28,10 @@ export default {
28 count: { 28 count: {
29 type: Number, 29 type: Number,
30 default: 0 30 default: 0
  31 + },
  32 + date: {
  33 + type: String,
  34 + default: 0
31 } 35 }
32 }, 36 },
33 components: {CubeInput: Input} 37 components: {CubeInput: Input}
@@ -36,17 +40,47 @@ export default { @@ -36,17 +40,47 @@ export default {
36 40
37 <style lang="scss" scoped> 41 <style lang="scss" scoped>
38 .article-item-comment { 42 .article-item-comment {
39 - padding: 30px; 43 + padding: 36px 30px;
40 44
41 .comment-item { 45 .comment-item {
42 font-size: 24px; 46 font-size: 24px;
43 color: #4a4a4a; 47 color: #4a4a4a;
44 - letter-spacing: 0.06px;  
45 - line-height: 40px; 48 + letter-spacing: 0.06PX;
  49 + line-height: 36px;
46 } 50 }
47 51
48 .user-name { 52 .user-name {
49 font-weight: bold; 53 font-weight: bold;
50 } 54 }
  55 +
  56 + .total-comment {
  57 + padding-top: 30px;
  58 + display: flex;
  59 + font-size: 24px;
  60 + color: #b0b0b0;
  61 + letter-spacing: 0.06px;
  62 +
  63 + .total {
  64 + width: 50%;
  65 + }
  66 +
  67 + .last-time {
  68 + width: 50%;
  69 + text-align: right;
  70 + }
  71 + }
  72 +
  73 + .comment {
  74 + padding-top: 30px;
  75 +
  76 + .comment-input {
  77 + padding: 0 20px;
  78 + background: #f0f0f0;
  79 + height: 60px;
  80 + line-height: 60px;
  81 + color: #b0b0b0;
  82 + font-size: 24px;
  83 + }
  84 + }
51 } 85 }
52 </style> 86 </style>
@@ -5,17 +5,14 @@ @@ -5,17 +5,14 @@
5 <span class="name">Oscar</span> 5 <span class="name">Oscar</span>
6 </div> 6 </div>
7 <div class="opts"> 7 <div class="opts">
8 - <Button class="btn-follow">关注</Button> 8 + <div class="btn-follow hover-opacity">关注</div>
9 </div> 9 </div>
10 </div> 10 </div>
11 </template> 11 </template>
12 12
13 <script> 13 <script>
14 -import {Button} from 'cube-ui';  
15 -  
16 export default { 14 export default {
17 name: 'ArticleItemHeader', 15 name: 'ArticleItemHeader',
18 - components: {Button}  
19 }; 16 };
20 </script> 17 </script>
21 18
@@ -58,6 +55,11 @@ export default { @@ -58,6 +55,11 @@ export default {
58 padding: 0; 55 padding: 0;
59 font-size: 26px; 56 font-size: 26px;
60 border-radius: 0; 57 border-radius: 0;
  58 + background-color: #222;
  59 + color: #fff;
  60 + display: flex;
  61 + align-items: center;
  62 + justify-content: center;
61 } 63 }
62 } 64 }
63 </style> 65 </style>
1 <template> 1 <template>
2 <div class="article-item-intro"> 2 <div class="article-item-intro">
3 - <div class="intro">  
4 - Nike 旗下大热鞋款 Air Max 95 一直以来在街头造型当中的能见度都算高,凭藉其舒适脚感与百搭外型 Air Max 95 也轻松成为许多鞋迷的心头好。近日,<span class="expand">…展开</span> 3 + <div class="intro hover-opacity" :class="{'intro-expand': isExpand}" @click="onExpand">
  4 + {{intro}}<span class="expand" v-if="!isExpand">…展开</span>
  5 + <span class="expand collapse" v-else>收起</span>
5 </div> 6 </div>
6 <div class="widgets"> 7 <div class="widgets">
7 <div class="topic"> 8 <div class="topic">
8 - <WidgetTopic></WidgetTopic> 9 + <WidgetTopic topic="种草"></WidgetTopic>
9 </div> 10 </div>
10 <div class="opts"> 11 <div class="opts">
11 - <WidgetLike></WidgetLike>  
12 - <WidgetFav></WidgetFav>  
13 - <WidgetShare></WidgetShare> 12 + <WidgetLike num="91"></WidgetLike>
  13 + <WidgetFav num="99"></WidgetFav>
  14 + <WidgetShare num="1"></WidgetShare>
14 </div> 15 </div>
15 </div> 16 </div>
16 </div> 17 </div>
@@ -18,7 +19,35 @@ @@ -18,7 +19,35 @@
18 19
19 <script> 20 <script>
20 export default { 21 export default {
21 - name: 'ArticleItemIntro' 22 + name: 'ArticleItemIntro',
  23 + props: {
  24 + data: {
  25 + type: Object,
  26 + default() {
  27 + return {};
  28 + }
  29 + }
  30 + },
  31 + data() {
  32 + return {
  33 + isExpand: false
  34 + };
  35 + },
  36 + computed: {
  37 + intro() {
  38 + if (this.isExpand) {
  39 + return this.data.intro;
  40 + }
  41 + if (this.data.intro.length > 66) {
  42 + return this.data.intro.substring(0, 66);
  43 + }
  44 + }
  45 + },
  46 + methods: {
  47 + onExpand() {
  48 + this.isExpand = !this.isExpand;
  49 + }
  50 + }
22 }; 51 };
23 </script> 52 </script>
24 53
@@ -30,20 +59,56 @@ export default { @@ -30,20 +59,56 @@ export default {
30 .intro { 59 .intro {
31 font-size: 28px; 60 font-size: 28px;
32 color: #4a4a4a; 61 color: #4a4a4a;
33 - letter-spacing: 0.06px; 62 + letter-spacing: 0.06PX;
  63 + overflow: hidden;
  64 + display: -webkit-box;
  65 + text-overflow: ellipsis;
  66 + -webkit-line-clamp: 3;
  67 + -webkit-box-orient: vertical;
  68 + position: relative;
  69 + line-height: 40px;
  70 +
  71 + &.intro-expand {
  72 + padding-bottom: 40px;
  73 + overflow: initial;
  74 + display: block;
  75 + }
  76 + }
  77 +
  78 + .expand {
  79 + font-size: 28px;
  80 + color: #000;
  81 + letter-spacing: 0.06PX;
  82 + line-height: 20px;
  83 + font-weight: bold;
  84 +
  85 + &.collapse {
  86 + position: absolute;
  87 + right: 14px;
  88 + bottom: 0;
  89 + height: 28px;
  90 + }
34 } 91 }
35 } 92 }
36 93
37 .widgets { 94 .widgets {
38 width: 100%; 95 width: 100%;
39 display: flex; 96 display: flex;
  97 + margin-top: 40px;
40 98
41 .topic { 99 .topic {
42 text-align: left; 100 text-align: left;
  101 + width: 200px;
43 } 102 }
44 103
45 .opts { 104 .opts {
46 text-align: right; 105 text-align: right;
  106 + flex: 1;
  107 +
  108 + & /deep/ .icon-btn {
  109 + margin-left: 48px;
  110 + text-align: right;
  111 + }
47 } 112 }
48 } 113 }
49 </style> 114 </style>
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <ArticleItemSlide :data="slideData"></ArticleItemSlide> 4 <ArticleItemSlide :data="slideData"></ArticleItemSlide>
5 <ProductGroup :data="productListData"></ProductGroup> 5 <ProductGroup :data="productListData"></ProductGroup>
6 <ArticleItemIntro :data="introData"></ArticleItemIntro> 6 <ArticleItemIntro :data="introData"></ArticleItemIntro>
7 - <ArticleItemComment :comments="commentData"></ArticleItemComment> 7 + <ArticleItemComment :comments="commentData" :count="12" :date="'1天前'"></ArticleItemComment>
8 </div> 8 </div>
9 </template> 9 </template>
10 10
@@ -32,12 +32,14 @@ export default { @@ -32,12 +32,14 @@ export default {
32 32
33 }, 33 },
34 introData() { 34 introData() {
35 - 35 + return {
  36 + intro: '旗下大热鞋款旗下大热鞋款旗下大热鞋款一直以来在街头造型当中的能见度都算高,凭藉其舒适脚感与百搭外型旗下大热鞋款也轻松成为许多鞋迷的心头好。近日,旗下大热鞋款旗下大热鞋款 Air Max 95 一直以来在街头造型当中的能见度都算高,凭藉其舒适脚感与百搭外型 Air Max 95 也轻松成为许多鞋迷的心头好。近日'
  37 + };
36 }, 38 },
37 commentData() { 39 commentData() {
38 return [{ 40 return [{
39 name: 'NIKE后援团', 41 name: 'NIKE后援团',
40 - content: '好期待,一定要抢一双👟!' 42 + content: '好期待,一定要抢一双👟!',
41 }, { 43 }, {
42 name: 'NIKE后援团', 44 name: 'NIKE后援团',
43 content: '表情表情!!!这双仔细看好好看!!哈哈哈哈哈哈😄✌️' 45 content: '表情表情!!!这双仔细看好好看!!哈哈哈哈哈哈😄✌️'
@@ -69,6 +71,7 @@ export default { @@ -69,6 +71,7 @@ export default {
69 <style lang="scss" scoped> 71 <style lang="scss" scoped>
70 .article-item { 72 .article-item {
71 width: 100%; 73 width: 100%;
72 - 74 + margin-bottom: 20px;
  75 + background-color: #fff;
73 } 76 }
74 </style> 77 </style>
  1 +<template>
  2 + <YohoActionSheet ref="actionSheet" :full="true">
  3 + <div class="content">
  4 + <!--<template v-if="list.length === 0">-->
  5 + <!--<Loading class="loading" :size="50"></Loading>-->
  6 + <!--</template>-->
  7 +
  8 + <CommentScrollView ref="commentList"></CommentScrollView>
  9 + </div>
  10 + </YohoActionSheet>
  11 +</template>
  12 +
  13 +
  14 +<script>
  15 +import {Loading} from 'cube-ui';
  16 +import CommentScrollView from './comment-scroll-view';
  17 +
  18 +export default {
  19 + name: 'CommentActionSheetPage',
  20 + components: {
  21 + Loading,
  22 + CommentScrollView
  23 + },
  24 + data() {
  25 + return {
  26 + };
  27 + },
  28 + methods: {
  29 + click() {
  30 + this.$refs.actionSheet.show();
  31 + this.$refs.commentList.click();
  32 + }
  33 + }
  34 +};
  35 +</script>
  36 +
  37 +<style>
  38 + .content {
  39 + width: 100%;
  40 + height: 80vh;
  41 + background-color: white;
  42 + }
  43 +
  44 + .loading {
  45 + position: absolute;
  46 + left: 50%;
  47 + top: 50%;
  48 + transform: translate(-50%, -50%);
  49 + }
  50 +
  51 +</style>
  1 +<template>
  2 + <div class="comment-scroll-view">
  3 + <div class="header">{{ count }}评论
  4 + </div>
  5 + <Scroll class="scroll-wrapper" ref="scroll" :options="scrollOptions">
  6 + <div v-for="i in list" class="item">huangtao {{i}}</div>
  7 + </Scroll>
  8 + <div class="footer">
  9 + <div class="input">评论</div>
  10 + </div>
  11 + </div>
  12 +</template>
  13 +
  14 +<script>
  15 +
  16 +import {Scroll} from 'cube-ui';
  17 +
  18 +export default {
  19 + name: 'CommentScrollView',
  20 + components: {
  21 + Scroll
  22 + },
  23 + data() {
  24 + return {
  25 + list: [],
  26 + scrollOptions: {
  27 + bounce: false
  28 + }
  29 + };
  30 + },
  31 + computed: {
  32 + count() {
  33 + return this.list.length > 0 ? this.list.length + '条' : '';
  34 + }
  35 + },
  36 + methods: {
  37 + click() {
  38 + this.$nextTick(() => {
  39 + this.initData();
  40 + this.forceUpdate();
  41 + }, 1000);
  42 + },
  43 + forceUpdate() {
  44 + this.$refs.scroll.forceUpdate();
  45 + },
  46 + initData() {
  47 + console.log('click')
  48 + for (let i = 0; i < 100; i++) {
  49 + this.list.push(i);
  50 + }
  51 + }
  52 + }
  53 +};
  54 +
  55 +</script>
  56 +
  57 +<style lang="scss" scoped>
  58 +
  59 +.comment-scroll-view {
  60 + display: flex;
  61 + flex-direction: column;
  62 + width: 100%;
  63 + height: 100%;
  64 +}
  65 +
  66 +.header {
  67 + width: 100%;
  68 + height: 88px;
  69 + border-bottom: 2px solid #e0e0e0;
  70 + text-align: center;
  71 + line-height: 88px;
  72 + font-size: 32px;
  73 +}
  74 +
  75 +.scroll-wrapper {
  76 + flex: 1;
  77 +}
  78 +
  79 +.item {
  80 + background-color: white;
  81 +}
  82 +
  83 +.footer {
  84 + width: 100%;
  85 + height: 100px;
  86 + border-top: 2px solid #e0e0e0;
  87 + display: flex;
  88 + justify-content: center;
  89 + align-items: center;
  90 +}
  91 +
  92 +.input {
  93 + width: 690px;
  94 + height: 72px;
  95 + background-color: #f0f0f0;
  96 + border: 1px solid #e0e0e0;
  97 + border-radius: 8px;
  98 + font-size: 24px;
  99 + color: #b0b0b0;
  100 + padding: 18px 0 18px 22px;
  101 +}
  102 +</style>
@@ -10,8 +10,8 @@ @@ -10,8 +10,8 @@
10 <Products></Products> 10 <Products></Products>
11 </div> 11 </div>
12 <div class="share"> 12 <div class="share">
13 - <WidgetIconBtn type="msg"></WidgetIconBtn>  
14 - <WidgetIconBtn type="zan"></WidgetIconBtn> 13 + <WidgetIconBtn class="item" type="msg" text="100" :option="option" @click="onCommentClick"></WidgetIconBtn>
  14 + <WidgetIconBtn class="item" type="fav" text="100" :option="option" @click="onFavClick"></WidgetIconBtn>
15 </div> 15 </div>
16 </div> 16 </div>
17 </div> 17 </div>
@@ -29,13 +29,23 @@ export default { @@ -29,13 +29,23 @@ export default {
29 data() { 29 data() {
30 return { 30 return {
31 text: '很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双,很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双', 31 text: '很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双,很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双',
32 - isLimitHeight: true 32 + isLimitHeight: true,
  33 + option: {
  34 + emitName: 'click',
  35 + color: 'white'
  36 + }
33 }; 37 };
34 }, 38 },
35 methods: { 39 methods: {
36 onClick() { 40 onClick() {
37 console.log('展开'); 41 console.log('展开');
38 this.isLimitHeight = false; 42 this.isLimitHeight = false;
  43 + },
  44 + onCommentClick() {
  45 + this.$emit('on-comment-click', {});
  46 + },
  47 + onFavClick() {
  48 + this.$emit('on-favorite-click', {});
39 } 49 }
40 }, 50 },
41 }; 51 };
@@ -53,11 +63,13 @@ export default { @@ -53,11 +63,13 @@ export default {
53 min-height: 134px; 63 min-height: 134px;
54 font-size: 26px; 64 font-size: 26px;
55 color: white; 65 color: white;
56 - letter-spacing: 0.01px; 66 + letter-spacing: 0.01PX;
57 padding: 30px 28px 0 28px; 67 padding: 30px 28px 0 28px;
58 } 68 }
59 69
60 .product-wrapper { 70 .product-wrapper {
  71 + display: flex;
  72 + justify-content: space-between;
61 height: 166px; 73 height: 166px;
62 padding: 0 28px; 74 padding: 0 28px;
63 } 75 }
@@ -72,4 +84,13 @@ export default { @@ -72,4 +84,13 @@ export default {
72 .link { 84 .link {
73 color: #4a90e2; 85 color: #4a90e2;
74 } 86 }
  87 +
  88 +.share {
  89 + height: 100px;
  90 + margin-top: 86px;
  91 +}
  92 +
  93 +.item {
  94 + margin-left: 50px;
  95 +}
75 </style> 96 </style>
1 <template> 1 <template>
2 <div class="order-wrapper"> 2 <div class="order-wrapper">
3 - <!-- <Test class="test"></Test> -->  
4 <Slide :data="list" 3 <Slide :data="list"
5 :loop="false" 4 :loop="false"
6 :autoPlay="false" 5 :autoPlay="false"
@@ -24,7 +23,7 @@ @@ -24,7 +23,7 @@
24 23
25 <AvatarHeader class="avatar-wrapper"></AvatarHeader> 24 <AvatarHeader class="avatar-wrapper"></AvatarHeader>
26 25
27 - <DescFooter class="footer-wrapper"></DescFooter> 26 + <DescFooter class="footer-wrapper" @on-comment-click="onCommentClick"></DescFooter>
28 </div> 27 </div>
29 </template> 28 </template>
30 29
@@ -34,15 +33,13 @@ import {Slide} from 'cube-ui'; @@ -34,15 +33,13 @@ import {Slide} from 'cube-ui';
34 import AvatarHeader from './avatar-header'; 33 import AvatarHeader from './avatar-header';
35 import DescFooter from './desc-footer'; 34 import DescFooter from './desc-footer';
36 35
37 -// const img = require('statics/image/showorder/test.png')  
38 -  
39 export default { 36 export default {
40 name: 'ShowOrderItem', 37 name: 'ShowOrderItem',
41 components: { 38 components: {
42 AvatarHeader, 39 AvatarHeader,
43 DescFooter, 40 DescFooter,
44 Slide, 41 Slide,
45 - SlideItem: Slide.Item 42 + SlideItem: Slide.Item,
46 }, 43 },
47 data() { 44 data() {
48 return { 45 return {
@@ -70,6 +67,9 @@ export default { @@ -70,6 +67,9 @@ export default {
70 }, 67 },
71 slideChangeHandler(currentPageIndex) { 68 slideChangeHandler(currentPageIndex) {
72 this.currentPageIndex = currentPageIndex; 69 this.currentPageIndex = currentPageIndex;
  70 + },
  71 + onCommentClick() {
  72 + this.$emit('on-comment-click', {});
73 } 73 }
74 } 74 }
75 }; 75 };
1 1
2 2
3 export default [{ 3 export default [{
4 - path: '/order/:id',  
5 - name: 'order', 4 + path: '/mapp/showorder/:id',
  5 + name: 'showorder',
6 6
7 component: () => import(/* webpackChunkName: "order" */ './order') 7 component: () => import(/* webpackChunkName: "order" */ './order')
8 }]; 8 }];
@@ -13,9 +13,11 @@ @@ -13,9 +13,11 @@
13 :options="scrollOpts" 13 :options="scrollOpts"
14 > 14 >
15 <SlideItem v-for="i in list"> 15 <SlideItem v-for="i in list">
16 - <OrderSlideItem></OrderSlideItem> 16 + <OrderSlideItem @on-comment-click="onComment"></OrderSlideItem>
17 </SlideItem> 17 </SlideItem>
18 </Slide> 18 </Slide>
  19 +
  20 + <CommentActionSheet ref="actionsheet"></CommentActionSheet>
19 </Layout> 21 </Layout>
20 </template> 22 </template>
21 23
@@ -23,6 +25,7 @@ @@ -23,6 +25,7 @@
23 25
24 import {Slide} from 'cube-ui'; 26 import {Slide} from 'cube-ui';
25 import OrderSlideItem from './components/order-slide-item'; 27 import OrderSlideItem from './components/order-slide-item';
  28 +import CommentActionSheet from './components/comment-action-sheet';
26 29
27 export default { 30 export default {
28 name: 'ShowOrderPage', 31 name: 'ShowOrderPage',
@@ -30,6 +33,7 @@ export default { @@ -30,6 +33,7 @@ export default {
30 Slide, 33 Slide,
31 SlideItem: Slide.Item, 34 SlideItem: Slide.Item,
32 OrderSlideItem, 35 OrderSlideItem,
  36 + CommentActionSheet
33 }, 37 },
34 data() { 38 data() {
35 return { 39 return {
@@ -71,6 +75,10 @@ export default { @@ -71,6 +75,10 @@ export default {
71 }, 75 },
72 clickHandler(e) { 76 clickHandler(e) {
73 console.log(e); 77 console.log(e);
  78 + },
  79 + onComment() {
  80 + console.log('ok');
  81 + this.$refs.actionsheet.click();
74 } 82 }
75 } 83 }
76 }; 84 };
@@ -679,3 +679,9 @@ img[lazy=loaded] { @@ -679,3 +679,9 @@ img[lazy=loaded] {
679 display: flex; 679 display: flex;
680 align-items: center; 680 align-items: center;
681 } 681 }
  682 +
  683 +.hover-opacity {
  684 + &:active {
  685 + opacity: 0.8;
  686 + }
  687 +}