mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2025-05-19 18:10:15 +09:00
fix: 修复文章分享功能
This commit is contained in:
parent
26ce84b950
commit
115aea2580
@ -28,17 +28,20 @@
|
||||
@on-click="fnOnBannerClick"></e-swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!haloConfigs.basicConfig.auditModeEnabled" class="flex flex-between mt-16 mb-24 pl-24 pr-24">
|
||||
<!-- 精品分类 -->
|
||||
<block v-if="haloConfigs.pageConfig.homeConfig.useCategory">
|
||||
<view class="flex flex-between mt-16 mb-24 pl-24 pr-24">
|
||||
<view class="page-item_title text-weight-b ">精品分类</view>
|
||||
<view class="show-more flex flex-center bg-white round-3" @click="fnToCategoryPage">
|
||||
<text class="iconfont icon-angle-right text-size-s text-grey-darken-1"></text>
|
||||
</view>
|
||||
<view v-if="false" class="flex flex-center text-size-s text-grey-darken-1" @click="fnToCategoryPage">
|
||||
<view v-if="false" class="flex flex-center text-size-s text-grey-darken-1"
|
||||
@click="fnToCategoryPage">
|
||||
<text class=" text-size-m">查看更多</text>
|
||||
<text class="iconfont icon-angle-right text-size-s "></text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view v-if="!haloConfigs.basicConfig.auditModeEnabled" class="category" scroll-x="true">
|
||||
<scroll-view class="category" scroll-x="true">
|
||||
<view v-if="categoryList.length == 0" class="cate-empty round-3 mr-5 flex flex-center text-grey">
|
||||
还没有任何分类~
|
||||
</view>
|
||||
@ -49,9 +52,10 @@
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
<!-- 最新文章 -->
|
||||
<view class="flex flex-between mt-24 mb-24 pl-24 pr-24">
|
||||
<view v-if="!haloConfigs.basicConfig.auditModeEnabled" class="flex flex-between mt-24 mb-24 pl-24 pr-24">
|
||||
<view class="page-item_title text-weight-b">最新列表</view>
|
||||
<view class="show-more flex flex-center bg-white round-3" @click="fnToArticlesPage">
|
||||
<text class="iconfont icon-angle-right text-size-s text-grey-darken-1"></text>
|
||||
@ -146,7 +150,6 @@ export default {
|
||||
this.queryParams.page = 1;
|
||||
this.fnQuery();
|
||||
},
|
||||
|
||||
onReachBottom(e) {
|
||||
if (this.result.hasNext) {
|
||||
this.queryParams.page += 1;
|
||||
@ -167,7 +170,7 @@ export default {
|
||||
},
|
||||
|
||||
fnGetCategoryList() {
|
||||
if (this.haloConfigs.basicConfig.auditModeEnabled) {
|
||||
if (this.haloConfigs.pageConfig.homeConfig.useCategory) {
|
||||
return;
|
||||
}
|
||||
this.$httpApi.v2
|
||||
@ -194,7 +197,9 @@ export default {
|
||||
},
|
||||
// 获取轮播图
|
||||
fnGetBanner() {
|
||||
|
||||
if (this.haloConfigs.basicConfig.auditModeEnabled) {
|
||||
return;
|
||||
}
|
||||
const _this = this;
|
||||
const _format = function(list) {
|
||||
return list.map((item, index) => {
|
||||
@ -225,8 +230,7 @@ export default {
|
||||
success: (res) => {
|
||||
this.bannerList = _format(res.data.items);
|
||||
},
|
||||
fail: (err) => {
|
||||
}
|
||||
fail: (err) => {}
|
||||
})
|
||||
|
||||
},
|
||||
@ -378,11 +382,9 @@ export default {
|
||||
margin-right: 24rpx;
|
||||
|
||||
/* #endif */
|
||||
&_icon {
|
||||
}
|
||||
&_icon {}
|
||||
|
||||
&_text {
|
||||
}
|
||||
&_text {}
|
||||
}
|
||||
|
||||
.show-more {
|
||||
|
@ -232,7 +232,9 @@ import commentModal from '@/components/comment-modal/comment-modal.vue';
|
||||
|
||||
import rCanvas from '@/components/r-canvas/r-canvas.vue';
|
||||
import barrage from '@/components/barrage/barrage.vue';
|
||||
import {getAppConfigs} from '@/config/index.js'
|
||||
import {
|
||||
getAppConfigs
|
||||
} from '@/config/index.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -344,6 +346,24 @@ export default {
|
||||
onPullDownRefresh() {
|
||||
this.fnGetData();
|
||||
},
|
||||
onShareAppMessage() {
|
||||
const cover = this.result.spec.cover ? this.calcUrl(this.result.spec.cover) : ""
|
||||
return {
|
||||
path: '/pagesA/article-detail/article-detail?name=' + this.result.metadata.name,
|
||||
title: this.result.spec.title,
|
||||
imageUrl: cover
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
const cover = this.result.spec.cover ? this.calcUrl(this.result.spec.cover) : ""
|
||||
return {
|
||||
title: this.result.spec.title,
|
||||
query: {
|
||||
name: this.result.metadata.name
|
||||
},
|
||||
imageUrl: cover
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fnGetData() {
|
||||
this.loading = 'loading';
|
||||
@ -997,8 +1017,7 @@ export default {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
&-name {
|
||||
}
|
||||
&-name {}
|
||||
|
||||
&-time {
|
||||
margin-left: 36rpx;
|
||||
|
Loading…
Reference in New Issue
Block a user