Authored by yyq

more action

<template>
<div v-transfer-dom :data-transfer="transfer">
<div v-transfer-dom :data-transfer="transfer" :class="actionCls">
<transition name="action-sheet-mask">
<div class="yoho-popup-mask" @click="maskClick" v-if="mask && isVisible"></div>
</transition>
<transition name="action-sheet-move">
<div class="yoho-popup" :class="actionCls" v-show="isVisible" :style="{'z-index': zIndex}">
<div class="yoho-popup-container">
<div class="yoho-popup-content">
<div class="detail">
<slot></slot>
</div>
</div>
<div class="yoho-popup" v-show="isVisible" :style="{'z-index': zIndex}">
<div class="yoho-popup-container" :style="{'max-height': maxHeight + 'px', 'height': contentHeight}">
<slot></slot>
</div>
</div>
</transition>
... ... @@ -46,9 +42,11 @@ export default {
data() {
return {
isVisible: false,
maxHeight: 0
};
},
mounted() {
this.maxHeight = document.body.offsetHeight;
this.$watch('visible', (newVal) => {
if (newVal) {
this.show();
... ... @@ -62,6 +60,9 @@ export default {
computed: {
actionCls() {
return [{ 'yoho-action-sheet': this.full }];
},
contentHeight() {
return this.full ? `${this.maxHeight - 20}px` : 'auto';
}
},
methods: {
... ... @@ -120,7 +121,8 @@ export default {
.yoho-popup-mask {
display: block;
background: #ccc;
background: #000;
opacity: 0.6;
position: absolute;
z-index: 99;
top: 0;
... ... @@ -130,35 +132,38 @@ export default {
}
.yoho-popup {
width: 100%;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
.yoho-popup-container {
border-radius: 8PX 8PX 0 0;
z-index: 2;
background-color: #fff;
position: relative;
}
&:after {
content: "";
width: 100%;
height: 200px;
position: absolute;
top: 20PX;
left: 0;
right: 0;
bottom: 0;
background-color: #fff;
overflow: hidden;
bottom: -200px;
z-index: -1;
background: #fff;
}
}
.yoho-action-sheet {
.yoho-popup-content {
height: 100%;
.yoho-popup-mask {
background: #ccc;
opacity: 1;
}
}
.detail {
position: relative;
width: 100%;
height: 100%;
.yoho-popup-container {
border-radius: 8PX 8PX 0 0;
overflow: hidden;
}
}
</style>
... ...
... ... @@ -38,18 +38,7 @@ export default {
},
methods: {
onMore() {
this.$createActionSheet({
data: [{
content: '投诉'
}],
onSelect: () => {
this.$createToast({
txt: '投诉成功',
type: 'correct',
time: 1000
}).show();
}
}).show();
this.$emit('on-show-more');
},
toUserPage() {
if (this.share) {
... ...
<template>
<div class="article-item">
<ArticleItemHeader :type="type" :thumb="thumb" :share="share" :data="headerData" :lazy="lazy" @on-follow="onFollow"></ArticleItemHeader>
<ArticleItemHeader :type="type" :thumb="thumb" :share="share" :data="headerData" :lazy="lazy" @on-follow="onFollow" @on-show-more="onShowMore"></ArticleItemHeader>
<ArticleItemSlide :type="type" :thumb="thumb" :share="share" :data="slideData" :slide-index="data.blockIndex" :lazy="lazy"></ArticleItemSlide>
<ProductGroup :thumb="thumb" v-if="productListData.length" :share="share" :data="productListData" :lazy="lazy"></ProductGroup>
<ArticleItemIntro :thumb="thumb" :type="type" :share="share" :data="introData" @on-expand="onExpand" @on-expanding="onExpanding" @on-show-guang="onShowGuang" @on-show-comment="onShowComment"></ArticleItemIntro>
... ... @@ -126,6 +126,9 @@ export default {
onShowComment() {
this.$emit('on-show-comment', {articleId: this.data.articleId, index: this.index});
},
onShowMore() {
this.$emit('on-show-more', this.data);
}
},
components: {ArticleItemHeader, ArticleItemSlide, ArticleItemIntro, ArticleItemComment}
};
... ...
... ... @@ -12,7 +12,7 @@
<WidgetFollow :share="share" class="widget-follow" :author-uid="currentAuthor.authorUid" :follow="currentAuthor.hasAttention === 'Y'" @on-follow="follow => onFollow(currentAuthor, follow)"></WidgetFollow>
</template>
</LayoutHeader>
<LayoutRecycleList :size="10" :thumbs="thumbs" ref="scroll" @scroll="onScroll" :offset="2000" :on-fetch="onFetch">
<LayoutRecycleList :size="10" :thumbs="thumbs" :remove="deleteArticle" ref="scroll" @scroll="onScroll" :offset="2000" :on-fetch="onFetch">
<template class="article-item" #item="{ data: {data, index} }">
<ArticleItem
:id="`item${index}`"
... ... @@ -24,7 +24,8 @@
@on-follow="follow => onFollow(data, follow)"
@on-resize="onResize"
@on-show-guang="onShowGuang"
@on-show-comment="onShowComment"></ArticleItem>
@on-show-comment="onShowComment"
@on-show-more="onShowMore"></ArticleItem>
<div :id="`ph${index}`"></div>
</template>
</LayoutRecycleList>
... ... @@ -38,6 +39,7 @@
@on-comment="onActionComment"
@on-page-ready="onPageReady"></Comment>
</YohoActionSheet>
<MoreActionSheet transfer ref="moreAction" @on-follow="onFollow" @on-delete="onDelete"></MoreActionSheet>
</div>
</template>
... ... @@ -45,7 +47,8 @@
import {throttle} from 'lodash';
import ArticleItem from './article-item';
import ArticleActionSheet from '../detail/article-action-sheet';
import {createNamespacedHelpers} from 'vuex';
import MoreActionSheet from '../detail/more-action-sheet';
import {mapState, createNamespacedHelpers} from 'vuex';
const {mapMutations} = createNamespacedHelpers('article');
export default {
... ... @@ -75,6 +78,7 @@ export default {
showCommentAction: false,
showCommentActioning: false,
showArticleDetailAction: false,
showMoreAction: true,
inx: 0,
scrollTop: 0,
showHeader: false,
... ... @@ -86,7 +90,8 @@ export default {
hasAttention: 'N',
isShare: false,
authorType: 1
}
},
deleteArticle: {}
};
},
activated() {
... ... @@ -94,6 +99,9 @@ export default {
this.$refs.scroll.$el.scrollTop = this.scrollTop;
}
},
computed: {
...mapState(['yoho'])
},
methods: {
...mapMutations(['ASYNC_ARTICLE_COMMENT', 'CHANGE_AUTHOR_FOLLOW']),
toUserPage() {
... ... @@ -120,6 +128,18 @@ export default {
this.$refs.comment.init();
});
},
async onShowMore(article) {
if (this.yoho && this.yoho.context.isLogin && !this._uid) {
let user = await this.$sdk.getUser();
this._uid = user.uid;
}
this.$refs.moreAction.show(article, this._uid);
},
onDelete(articleId) {
this.deleteArticle = {articleId};
},
onPageReady({success}) {
if (success && this.showCommentAction) {
this.$refs.commentAction.show();
... ... @@ -182,7 +202,8 @@ export default {
},
components: {
ArticleItem,
ArticleActionSheet
ArticleActionSheet,
MoreActionSheet
}
};
</script>
... ...
<template>
<YohoActionSheet class="more-action-sheet" ref="actionSheet">
<div class="action-wrap">
<div class="action-list">
<div class="action-item" v-for="(i, index) in list" :key="index" v-show="!i.hide" @click="onClick(i.fnName)">
<p class="icon">
<span class="iconfont" :class="i.icon"></span>
</p>
<p class="name">{{i.name}}</p>
</div>
</div>
<div class="cancel" @click="hide">取消</div>
</div>
</YohoActionSheet>
</template>
<script>
import {createNamespacedHelpers} from 'vuex';
const articleStore = createNamespacedHelpers('article');
const userStore = createNamespacedHelpers('user');
export default {
name: 'MoreActionSheetPage',
data() {
return {
list: [
{
icon: 'icon-fav-cancel',
name: '取消关注',
fnName: 'actionCancelFav'
},
{
icon: 'icon-warn',
name: '举报',
fnName: 'actionrReport'
},
{
icon: 'icon-delete',
name: '删除',
fnName: 'actionDelete'
}
]
};
},
methods: {
...articleStore.mapActions(['reportArticle', 'deleteArticle']),
...userStore.mapActions(['followUser']),
show(params, uid) {
params = params || {};
this.list[0].hide = params.hasAttention !== 'Y';
this.list[2].hide = params.authorUid !== uid || params.authorUid !== 1;
this.list = [...this.list];
this._params = params;
this.$refs.actionSheet.show();
},
hide() {
this.$refs.actionSheet.hide();
},
actionrReport() {
this.$createToast({
txt: '举报成功',
type: 'correct',
time: 1000
}).show();
this.reportArticle(this._params.articleId);
},
actionCancelFav() {
let {authorUid, authorType} = this._params;
return this.$emit('on-follow', this._params);
this.followUser({
followUid: authorUid,
status: false,
authorType
}).then(res => {
if (res.code === 200) {
this.$emit('on-follow', this._params);
}
});
},
actionDelete() {
this.$createDialog({
type: 'confirm',
title: '确认删除该文章?',
confirmBtn: {
text: '确定',
active: true,
disabled: false,
href: 'javascript:;'
},
cancelBtn: {
text: '取消',
active: false,
disabled: false,
href: 'javascript:;'
},
onConfirm: () => {
this.deleteArticle(this._params.articleId).then(res => {
if (res.code === 200) {
this.$emit('on-delete', this._params.articleId);
} else {
this.$createToast({
type: 'warn',
time: 1000,
txt: '删除失败了'
}).show();
}
});
}
}).show()
},
onClick(name) {
this[name] && this[name]();
this.hide();
}
}
};
</script>
<style scoped lang="scss">
/deep/ .yoho-popup {
&:after,
> .yoho-popup-container {
background-color: rgba(255, 255, 255, 0.9);
}
}
.action-wrap {
color: #444;
.action-list {
width: 100%;
padding: 20px 40px;
border-bottom: 1PX solid #d7d7d7;
display: flex;
justify-content: space-around;
}
.action-item {
width: 128px;
padding: 12px 0;
.icon {
width: 88px;
height: 88px;
line-height: 92px;
border-radius: 50%;
margin: 0 auto 16px;
background-color: #fff;
text-align: center;
overflow: hidden;
}
.iconfont {
font-size: 48px;
color: #b0b0b0;
}
.name {
font-size: 24px;
text-align: center;
transform: scale(0.9, 0.9);
opacity: 0.65;
}
}
.cancel {
line-height: 88px;
font-size: 32px;
letter-spacing: 0.05px;
text-align: center;
}
}
</style>
... ...
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1551098188585'); /* IE9 */
src: url('iconfont.eot?t=1551098188585#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAuoAAsAAAAAFSwAAAtYAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFQAqZRJRBATYCJANYCy4ABCAFhG0HgVkbsBEjA8HGAQhIj5D9ZYKpw61RqP8i6djdMUFu9hjToJ5+pM/aJSU+qPMv7nQHRS1bz8aLQfGKkBT1niijQngcQuNQCIdQFAqZjKXQyci/nKrtZNMAouPZMLRjosk1XrKi8b7XZ/IyXIQKYAEsCtx25ChliZCT/6Ft9YeBVWaGEgQVXLFi08i3h9mEW4FuNW7PXDPs3hZhNQpGb1QRFxF6VRbAQBL0GgfW/7+fq2KSZg9PrJdvk7d/t3Fx/wxxi6Ihk4giniwkqTRoZELhEFIjpApELGfMUvEjLlT1l7saApmFuXrfv35UY44xiAbXO1mNC/Fch7ckptBw5HrTCQaS8WAeqniMPl/ftgQMPzF7Xp87wxoUXwZ8dQslZ0jLgkSgD5cKTI4DC+wD4ECvjekvgCZ0PxKzpuZM7gHogK9vZ/4Cvvz0q56v7F+Nf3Xmq3Nf3ZqZo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D2hsqd1B6uysZCRrKy5Pb0zfgsjb16t5PVNGVk5eQVGJUmXKVahUpVpNbV19Q2NTs8FDgk3/Lh5KP4LlAXnXcu8q89jbdGF9jIPSSoJpsOlCRTQDR7KUqeI7vfqFDRNfyHOH23egIxbog/HcS8WNPX7LQ3pJ5sEJE+QeS3eEGgqjqSoAAAA=') format('woff2'),
url('iconfont.woff?t=1551098188585') format('woff'),
url('iconfont.ttf?t=1551098188585') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1551098188585#iconfont') format('svg'); /* iOS 4.1- */
src: url('iconfont.eot?t=1551944025614'); /* IE9 */
src: url('iconfont.eot?t=1551944025614#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAA1EAAsAAAAAGBAAAAz2AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFYgqeWJhVATYCJANkCzQABCAFhG0HgXYbDxQjEXaUsxJC9pcJNpTh99AqFRGjWAxRw6iN1slyG504oxNPi/aapuE99x6Lhw9Pv48JIsyls5YMlBSB8dneAZ52aaZSw6+Dkhlu3917oN5WJ3NmUqAg7bKhgPzqIdvxMr6OyPpK9wxQ2SFnCcAw9yvkAADW/qZ9xzYqwnSdPPuXn55CoNxj9IXcLICAAPD/fy21QKDwh1XizVDgzbyFG56dEHS6BSZJKFRVZQBYTSsU2LrEVaEwPRXKVDhfCBidXU14Yw3wyhDAIxlZkDLegZGghMbQhWO65OWkgVKqDl2TKDhuq2RGvQ5pARPHmEg4C2C6v/PyGeQSJTAwFcaENdp5ZYLrO/X3x1BVptbEbYBJizOB1myggCyABtlVam1BhZTFN7yygzUjgBjm91Tw7vi7xy+m3q95v/X97vfHZJFc7ob329/vuxhDZtKwEpFK/QeegU0cFBoTC4e4xMMlPh4J8AkIiSKaGMQkFrFBLIyjAwDJARJwyDUbiM9vKYMB7+PAhtOAOHAnQMFdAA13A0y4B2DBvQAH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cZAMToQzhOp6pC+AB9WlTgOboqFd2cA647H9vT8lB1ctYiqg451S4jtYj3LOKgyDXvnD9gHTU+C11btcvsG30kVLoNl1OiHf86+Ef+pQfxT3F+V6Q6p3IxR+FggLb6/V0fBzauelhl1CfU/Wtn33GcutvkyqsrzEtIe0imAaHSvuB7vT0WzzbLFVdb+xvhihsLA5ukQuGQJlCHZhEmPnmEhUNx4ZGZ8rP7xKYXKKJdIBNjhRBisF0YRHFcKGJwNVCHPhUm8fgqLGIIKjzqCXuBPulk5I7DG6FgVLA9wcoYtNXIQ3DsN5qrE5Ss8rP/kZLtg3Vasvu+MCAtYpJ0MydmDZqih0+xOnQuwkHxgpKnnfk4z7Mum3SS0WdD5kEo2C2uwPasaGUM+vE85Lb/G83VCaq55KDiP1Ky7w5Wk0Uj8MsIWpfclJPTzZywNDXYZ1P04FOa6Ex/BEf5cBeUPNlnsI+zWd5K6xrT6l3+unBxJl7G+NwSNkSJFlMsscURVzzxJZBQoiRaYow51tjjjDve+BNMOJHaR8K16uGuqXKouSZrdi5fInT2sKO2ztVpF4SDO+y4uahqQyKlQai1CVVivXe0pLK4SWvpYsIKleXSJ9PZ6pTTlF6E+h49hpKFWcIBW3SqurO0MGhxG6UIEl2j0CFjlgEA') format('woff2'),
url('iconfont.woff?t=1551944025614') format('woff'),
url('iconfont.ttf?t=1551944025614') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1551944025614#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
... ... @@ -99,3 +99,15 @@
content: "\e7b4";
}
.icon-warn:before {
content: "\e7b6";
}
.icon-fav-cancel:before {
content: "\e7b8";
}
.icon-delete:before {
content: "\e7ba";
}
... ...
... ... @@ -83,6 +83,15 @@ Created by iconfont
<glyph glyph-name="zan-bold" unicode="&#59316;" d="M881.732267 578.082133c69.290667 0 108.1344-52.974933 108.066133-136.942933l-0.2048-2.798933-44.6464-372.736c-0.341333-73.864533-58.504533-134.3488-130.730667-134.3488H136.533333a34.133333 34.133333 0 0 0-34.133333 34.133333V496.8448a34.133333 34.133333 0 0 0 34.133333 34.133333h182.818134c35.771733 107.1104 62.805333 184.866133 75.776 215.722667 29.354667 70.314667 59.938133 101.102933 116.804266 113.4592C517.256533 861.320533 522.922667 861.866667 528.5888 861.866667c42.666667 0 95.095467-28.808533 127.7952-72.567467 36.4544-48.810667 50.7904-114.2784 31.3344-195.106133l-3.8912-16.110934h197.973333z m0-68.266666H640.546133a34.133333 34.133333 0 0 0-33.1776 42.052266l9.0112 37.751467 4.983467 20.48c14.609067 60.8256 4.778667 105.540267-19.6608 138.376533-20.343467 27.2384-52.974933 45.124267-73.1136 45.124267a13.038933 13.038933 0 0 1-2.2528-0.136533c-32.290133-7.031467-46.6944-21.572267-68.266667-73.181867-12.834133-30.72-42.871467-117.486933-81.851733-234.427733a34.133333 34.133333 0 0 0-36.317867-23.210667L170.666667 462.779733v-463.189333h643.549866c33.9968 0 62.2592 29.4912 62.6688 70.314667l44.714667 374.442666c-0.2048 47.172267-13.858133 65.536-39.867733 65.536zM296.413867 504.354133h68.266666v-538.965333h-68.266666z" horiz-adv-x="1024" />
<glyph glyph-name="warn" unicode="&#59318;" d="M549.290667 743.552a42.666667 42.666667 0 0 1-74.581334 0l-354.133333-637.482667A42.666667 42.666667 0 0 1 157.866667 42.66666699999996h708.266666a42.666667 42.666667 0 0 1 37.333334 63.402666l-354.133334 637.44z m74.581333 41.386667l354.176-637.44A128 128 0 0 0 866.133333-42.66666699999996H157.866667a128 128 0 0 0-111.914667 190.165334l354.133333 637.44a128 128 0 0 0 223.786667 0zM512 597.333333a42.666667 42.666667 0 0 0 42.666667-42.666666v-256a42.666667 42.666667 0 1 0-85.333334 0V554.666667a42.666667 42.666667 0 0 0 42.666667 42.666666zM512 170.66666699999996m-42.666667 0a42.666667 42.666667 0 1 1 85.333334 0 42.666667 42.666667 0 1 1-85.333334 0Z" horiz-adv-x="1024" />
<glyph glyph-name="fav-cancel" unicode="&#59320;" d="M706.688 810.666667c138.410667 0 249.770667-116.906667 249.770667-260.096 0-61.781333-20.906667-120.362667-59.306667-167.978667l-89.301333-103.936a42.666667 42.666667 0 1 0-64.725334 55.594667l88.448 102.912c25.386667 31.488 39.552 71.253333 39.552 113.408C871.125333 647.552 797.013333 725.333333 706.688 725.333333c-54.314667 0-112.085333-60.586667-167.893333-191.488-14.762667-34.56-63.744-34.56-78.506667 0C404.48 664.704 346.794667 725.333333 292.48 725.333333 202.112 725.333333 128 647.552 128 550.570667c0-42.197333 14.165333-81.92 38.656-112.384l365.226667-425.045334a42.666667 42.666667 0 1 0-64.682667-55.594666L101.034667 383.57333300000005A265.557333 265.557333 0 0 0 42.666667 550.570667C42.666667 693.76 154.026667 810.666667 292.48 810.666667c79.872 0 147.968-55.850667 207.061333-162.304C558.677333 754.773333 626.773333 810.666667 706.688 810.666667zM640 170.66666699999996h213.333333a42.666667 42.666667 0 0 0 0-85.333334h-213.333333a42.666667 42.666667 0 0 0 0 85.333334z" horiz-adv-x="1024" />
<glyph glyph-name="delete" unicode="&#59322;" d="M128 640h768a42.666667 42.666667 0 0 0 0-85.333333H128a42.666667 42.666667 0 1 0 0 85.333333zM725.333333 624.2133329999999h-85.333333c0 57.514667-56.149333 106.666667-128 106.666667s-128-49.152-128-106.666667H298.666667c0 107.392 96.682667 192 213.333333 192s213.333333-84.608 213.333333-192zM256 554.666667v-512h512V554.666667H256z m0 85.333333h512a85.333333 85.333333 0 0 0 85.333333-85.333333v-512a85.333333 85.333333 0 0 0-85.333333-85.333334H256a85.333333 85.333333 0 0 0-85.333333 85.333334V554.666667a85.333333 85.333333 0 0 0 85.333333 85.333333zM341.333333 426.666667m42.666667 0l0 0q42.666667 0 42.666667-42.666667l0-170.666667q0-42.666667-42.666667-42.666666l0 0q-42.666667 0-42.666667 42.666666l0 170.666667q0 42.666667 42.666667 42.666667ZM469.333333 426.666667m42.666667 0l0 0q42.666667 0 42.666667-42.666667l0-170.666667q0-42.666667-42.666667-42.666666l0 0q-42.666667 0-42.666667 42.666666l0 170.666667q0 42.666667 42.666667 42.666667ZM597.333333 426.666667m42.666667 0l0 0q42.666667 0 42.666667-42.666667l0-170.666667q0-42.666667-42.666667-42.666666l0 0q-42.666667 0-42.666667 42.666666l0 170.666667q0 42.666667 42.666667 42.666667Z" horiz-adv-x="1024" />
</font>
... ...
... ... @@ -225,5 +225,15 @@ export default {
commit(Types.FETCH_GUANG_SUCCESS, result);
},
async reportArticle(actions, {articleId}) {
const result = await this.$api.post('/api/grass/reportIllegalArticle', {articleId});
return result;
},
async deleteArticle(actions, {articleId}) {
const result = await this.$api.post('/api/grass/deleteGrassArticle', {articleId});
return result;
}
};
... ...
... ... @@ -230,4 +230,18 @@ module.exports = {
authorType: {type: Number},
}
},
'/api/grass/reportIllegalArticle': {
api: 'app.grass.reportIllegalArticle',
auth: true,
params: {
articleId: {type: Number}
}
},
'/api/grass/deleteGrassArticle': {
api: 'app.grass.deleteGrassArticle',
auth: true,
params: {
articleId: {type: Number}
}
}
};
... ...