Authored by yyq

detail footer

1 <template> 1 <template>
2 <div class="article-footer-wrapper"> 2 <div class="article-footer-wrapper">
  3 + <slot name="before"></slot>
3 <div class="tool-bar"> 4 <div class="tool-bar">
4 <WidgetIconBtn class="item" type="fav" :pos-id="sceneId" :text="praiseCount" :articleId="articleId" :option="optionPraise"></WidgetIconBtn> 5 <WidgetIconBtn class="item" type="fav" :pos-id="sceneId" :text="praiseCount" :articleId="articleId" :option="optionPraise"></WidgetIconBtn>
5 <WidgetIconBtn class="item" type="star" :pos-id="sceneId" :text="favoriteCount" :articleId="articleId" :option="optionFav" ></WidgetIconBtn> 6 <WidgetIconBtn class="item" type="star" :pos-id="sceneId" :text="favoriteCount" :articleId="articleId" :option="optionFav" ></WidgetIconBtn>
6 <WidgetIconBtn class="item" type="msg" :text="commentCount" :option="optionComment" @click="onComment"></WidgetIconBtn> 7 <WidgetIconBtn class="item" type="msg" :text="commentCount" :option="optionComment" @click="onComment"></WidgetIconBtn>
7 </div> 8 </div>
8 - <div class="close ml20" @click="onClose">  
9 - <slot>收起</slot>  
10 - </div> 9 + <slot name="after">
  10 + <div class="close ml20" @click="onClose">收起</div>
  11 + </slot>
11 </div> 12 </div>
12 </template> 13 </template>
13 14
@@ -23,7 +23,11 @@ @@ -23,7 +23,11 @@
23 <ProductGroup :data="recomendProduct" model="2"></ProductGroup> 23 <ProductGroup :data="recomendProduct" model="2"></ProductGroup>
24 <LayoutTitle class="rec-article-title">{{listTitle}}</LayoutTitle> 24 <LayoutTitle class="rec-article-title">{{listTitle}}</LayoutTitle>
25 </div> 25 </div>
26 - <ArticleDetailFooter class="detail-fixed-footer" @on-comment-click="onComment">文中商品</ArticleDetailFooter> 26 + <ArticleDetailFooter class="detail-fixed-footer" @on-comment-click="onComment">
  27 + <template v-slot:after>
  28 + <div class="article-goods">文中商品</div>
  29 + </template>
  30 + </ArticleDetailFooter>
27 </div> 31 </div>
28 </template> 32 </template>
29 33
@@ -296,5 +300,15 @@ export default { @@ -296,5 +300,15 @@ export default {
296 position: fixed; 300 position: fixed;
297 bottom: 0; 301 bottom: 0;
298 z-index: 10; 302 z-index: 10;
  303 +
  304 + .article-goods {
  305 + width: 200px;
  306 + color: white;
  307 + font-size: 32px;
  308 + line-height: 100px;
  309 + font-weight: 300;
  310 + background-color: #d0021b;
  311 + text-align: center;
  312 + }
299 } 313 }
300 </style> 314 </style>
@@ -15,10 +15,31 @@ @@ -15,10 +15,31 @@
15 <ProductGroup :article-id="data.articleId" :pos-id="0" :index="0" :thumb="thumb" v-if="productListData.length" :share="share" :data="productListData" :lazy="lazy"></ProductGroup> 15 <ProductGroup :article-id="data.articleId" :pos-id="0" :index="0" :thumb="thumb" v-if="productListData.length" :share="share" :data="productListData" :lazy="lazy"></ProductGroup>
16 <ArticleItemTopics class="topics-wrap" :data="topicsData" :share="share"></ArticleItemTopics> 16 <ArticleItemTopics class="topics-wrap" :data="topicsData" :share="share"></ArticleItemTopics>
17 <p class="publish-time">{{publishTime}}</p> 17 <p class="publish-time">{{publishTime}}</p>
  18 + <ArticleDetailCommentList :dest-id="140838" :article-id="data.articleId" :comment-count="data.commentCount"></ArticleDetailCommentList>
  19 + <LayoutTitle class="rec-article-title">{{listTitle}}</LayoutTitle>
18 </div> 20 </div>
19 21
20 - <ArticleDetailCommentList :dest-id="140838" :article-id="data.articleId" :comment-count="data.commentCount"></ArticleDetailCommentList>  
21 - <LayoutTitle class="rec-article-title">{{listTitle}}</LayoutTitle> 22 + <ArticleDetailFooter class="detail-fixed-footer" @on-comment-click="onComment">
  23 + <template v-slot:before>
  24 + <div class="footer-comment">
  25 + <CommentPlaceholder
  26 + ref="commentInput"
  27 + :share="share"
  28 + class="comment-input hover-opacity"
  29 + :dest-id="data.articleId"
  30 + :add-type="0"
  31 + :article-id="data.articleId"
  32 + :pos-id="0"
  33 + :column-type="1001"
  34 + @on-comment="onComment">
  35 + 添加评论...
  36 + </CommentPlaceholder>
  37 + </div>
  38 + </template>
  39 + <template v-slot:after>
  40 + <div></div>
  41 + </template>
  42 + </ArticleDetailFooter>
22 </div> 43 </div>
23 </template> 44 </template>
24 45
@@ -29,6 +50,7 @@ import ArticleDetailCommentList from './comment-list'; @@ -29,6 +50,7 @@ import ArticleDetailCommentList from './comment-list';
29 import ArticleItemHeader from '../article/article-item-header'; 50 import ArticleItemHeader from '../article/article-item-header';
30 import ArticleItemSlide from '../article/article-item-slide'; 51 import ArticleItemSlide from '../article/article-item-slide';
31 import ArticleItemTopics from '../article/article-item-topics'; 52 import ArticleItemTopics from '../article/article-item-topics';
  53 +import ArticleDetailFooter from './article-footer';
32 import dayjs from 'utils/day'; 54 import dayjs from 'utils/day';
33 55
34 export default { 56 export default {
@@ -49,7 +71,6 @@ export default { @@ -49,7 +71,6 @@ export default {
49 return { 71 return {
50 showMoreOpt: false, 72 showMoreOpt: false,
51 slideIndex: 1, 73 slideIndex: 1,
52 - commentColumnType: 1001,  
53 commentList: [], 74 commentList: [],
54 commentPage: 1, 75 commentPage: 1,
55 commentFetching: false, 76 commentFetching: false,
@@ -110,6 +131,9 @@ export default { @@ -110,6 +131,9 @@ export default {
110 }, 131 },
111 onReply() { 132 onReply() {
112 133
  134 + },
  135 + onComment() {
  136 +
113 } 137 }
114 }, 138 },
115 components: { 139 components: {
@@ -117,7 +141,8 @@ export default { @@ -117,7 +141,8 @@ export default {
117 ArticleItemHeader, 141 ArticleItemHeader,
118 ArticleItemSlide, 142 ArticleItemSlide,
119 ArticleItemTopics, 143 ArticleItemTopics,
120 - ArticleDetailCommentList 144 + ArticleDetailCommentList,
  145 + ArticleDetailFooter
121 } 146 }
122 }; 147 };
123 </script> 148 </script>
@@ -166,4 +191,32 @@ export default { @@ -166,4 +191,32 @@ export default {
166 margin: 14px 0 4px; 191 margin: 14px 0 4px;
167 border-top: 1px solid #f0f0f0; 192 border-top: 1px solid #f0f0f0;
168 } 193 }
  194 +
  195 +.detail-fixed-footer {
  196 + width: 100%;
  197 + position: fixed;
  198 + bottom: 0;
  199 + z-index: 10;
  200 +
  201 + .footer-comment {
  202 + width: 312px;
  203 + margin-left: 30px;
  204 + display: flex;
  205 + justify-content: center;
  206 + align-items: center;
  207 +
  208 + .comment-input {
  209 + width: 100%;
  210 + height: 68px;
  211 + line-height: 68px;
  212 + font-size: 28px;
  213 + color: #b0b0b0;
  214 + background: #f0f0f0;
  215 + padding: 0 20px;
  216 + border-radius: 35px;
  217 + box-sizing: border-box;
  218 +
  219 + }
  220 + }
  221 +}
169 </style> 222 </style>