mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-12 13:19:31 +08:00
fix: 修复文章分享功能
This commit is contained in:
+45
-43
@@ -2,7 +2,7 @@
|
||||
<view class="app-page">
|
||||
<tm-menubars iconColor="white" color="white" :flat="true" :showback="false">
|
||||
<view slot="left">
|
||||
<image @click="fnOnLogoToPage" class="logo ml-24 round-24" :src="appInfo.logo" mode="scaleToFill"/>
|
||||
<image @click="fnOnLogoToPage" class="logo ml-24 round-24" :src="appInfo.logo" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="search-input round-12 pt-12 pb-12 flex pl-24" @click="fnToSearch">
|
||||
<text class="search-input_icon iconfont text-size-m icon-search text-grey"></text>
|
||||
@@ -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>
|
||||
@@ -81,17 +85,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tmMenubars from '@/tm-vuetify/components/tm-menubars/tm-menubars.vue';
|
||||
import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
|
||||
import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
|
||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||
import tmIcons from '@/tm-vuetify/components/tm-icons/tm-icons.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
import tmMenubars from '@/tm-vuetify/components/tm-menubars/tm-menubars.vue';
|
||||
import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
|
||||
import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
|
||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||
import tmIcons from '@/tm-vuetify/components/tm-icons/tm-icons.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
|
||||
import eSwiper from '@/components/e-swiper/e-swiper.vue';
|
||||
import qs from 'qs'
|
||||
import eSwiper from '@/components/e-swiper/e-swiper.vue';
|
||||
import qs from 'qs'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
tmMenubars,
|
||||
tmSkeleton,
|
||||
@@ -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,9 +197,11 @@ export default {
|
||||
},
|
||||
// 获取轮播图
|
||||
fnGetBanner() {
|
||||
|
||||
if (this.haloConfigs.basicConfig.auditModeEnabled) {
|
||||
return;
|
||||
}
|
||||
const _this = this;
|
||||
const _format = function (list) {
|
||||
const _format = function(list) {
|
||||
return list.map((item, index) => {
|
||||
return {
|
||||
mp4: '',
|
||||
@@ -225,8 +230,7 @@ export default {
|
||||
success: (res) => {
|
||||
this.bannerList = _format(res.data.items);
|
||||
},
|
||||
fail: (err) => {
|
||||
}
|
||||
fail: (err) => {}
|
||||
})
|
||||
|
||||
},
|
||||
@@ -343,11 +347,11 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-page {
|
||||
.app-page {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
@@ -365,38 +369,36 @@ export default {
|
||||
min-width: initial;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading-wrap {
|
||||
.loading-wrap {
|
||||
padding: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search-input {
|
||||
.search-input {
|
||||
background-color: #f5f5f5;
|
||||
align-items: center;
|
||||
/* #ifdef MP-WEIXIN */
|
||||
margin-right: 24rpx;
|
||||
|
||||
/* #endif */
|
||||
&_icon {
|
||||
&_icon {}
|
||||
|
||||
&_text {}
|
||||
}
|
||||
|
||||
&_text {
|
||||
}
|
||||
}
|
||||
|
||||
.show-more {
|
||||
.show-more {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
}
|
||||
|
||||
.banner {
|
||||
.banner {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.quick-nav {
|
||||
.quick-nav {
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -404,9 +406,9 @@ export default {
|
||||
.name {
|
||||
color: var(--main-text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.category {
|
||||
.category {
|
||||
width: 94vw;
|
||||
display: flex;
|
||||
height: 200rpx;
|
||||
@@ -425,9 +427,9 @@ export default {
|
||||
.cate-empty {
|
||||
height: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page-item {
|
||||
.page-item {
|
||||
&_title {
|
||||
position: relative;
|
||||
padding-left: 24rpx;
|
||||
@@ -447,9 +449,9 @@ export default {
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.h_row_col2 {
|
||||
.h_row_col2 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
@@ -458,5 +460,5 @@ export default {
|
||||
.ani-item {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -81,7 +81,7 @@
|
||||
:loading-img="markdownConfig.loadingGif" :scroll-table="true" :selectable="true"
|
||||
:tag-style="markdownConfig.tagStyle" :container-style="markdownConfig.containStyle"
|
||||
:content="result.content.raw" :markdown="true" :showLineNumber="true" :showLanguageName="true"
|
||||
:copyByLongPress="true"/>
|
||||
:copyByLongPress="true" />
|
||||
<tm-more v-if="showValidVisitMore" :disabled="true" :maxHeight="1" :isRemovBar="true"
|
||||
@click="showValidVisitMorePop()">
|
||||
<view class="text-size-n pa-24">
|
||||
@@ -215,26 +215,28 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MarkdownConfig from '@/common/markdown/markdown.config.js';
|
||||
import MarkdownConfig from '@/common/markdown/markdown.config.js';
|
||||
|
||||
import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
|
||||
import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
|
||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||
import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
import tmDialog from '@/tm-vuetify/components/tm-dialog/tm-dialog.vue';
|
||||
import tmMore from '@/tm-vuetify/components/tm-more/tm-more.vue';
|
||||
import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
|
||||
import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
|
||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||
import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
import tmDialog from '@/tm-vuetify/components/tm-dialog/tm-dialog.vue';
|
||||
import tmMore from '@/tm-vuetify/components/tm-more/tm-more.vue';
|
||||
|
||||
import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue';
|
||||
import commentList from '@/components/comment-list/comment-list.vue';
|
||||
import commentItem from '@/components/comment-item/comment-item.vue';
|
||||
import commentModal from '@/components/comment-modal/comment-modal.vue';
|
||||
import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue';
|
||||
import commentList from '@/components/comment-list/comment-list.vue';
|
||||
import commentItem from '@/components/comment-item/comment-item.vue';
|
||||
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 rCanvas from '@/components/r-canvas/r-canvas.vue';
|
||||
import barrage from '@/components/barrage/barrage.vue';
|
||||
import {
|
||||
getAppConfigs
|
||||
} from '@/config/index.js'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
tmSkeleton,
|
||||
tmPoup,
|
||||
@@ -329,7 +331,7 @@ export default {
|
||||
haloConfigs: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler: function (newVal) {
|
||||
handler: function(newVal) {
|
||||
if (!newVal) return;
|
||||
this.fnHandleSetFlotButtonItems(newVal);
|
||||
}
|
||||
@@ -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';
|
||||
@@ -840,7 +860,7 @@ export default {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: function (loginRes) {
|
||||
success: function(loginRes) {
|
||||
try {
|
||||
// todo 因为没有获取openid,所以先使用code代替
|
||||
uni.setStorageSync('openid', loginRes.code)
|
||||
@@ -939,11 +959,11 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-page {
|
||||
.app-page {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
@@ -951,9 +971,9 @@ export default {
|
||||
box-sizing: border-box;
|
||||
background-color: #fafafd;
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-image {
|
||||
.bg-image {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -962,15 +982,15 @@ export default {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-wrap {
|
||||
.loading-wrap {
|
||||
padding: 0 24rpx;
|
||||
height: inherit;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.head {
|
||||
.head {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@@ -997,8 +1017,7 @@ export default {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
&-name {
|
||||
}
|
||||
&-name {}
|
||||
|
||||
&-time {
|
||||
margin-left: 36rpx;
|
||||
@@ -1065,9 +1084,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.category {
|
||||
.category {
|
||||
margin: 0 24rpx;
|
||||
padding: 24rpx;
|
||||
background-color: #ffffff;
|
||||
@@ -1092,30 +1111,30 @@ export default {
|
||||
background-color: #607d8b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.category-tag + .category-tag {
|
||||
.category-tag+.category-tag {
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.content {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-wrap,
|
||||
.evan-markdown,
|
||||
.ad-wrap,
|
||||
.copyright-wrap,
|
||||
.comment-wrap {
|
||||
.markdown-wrap,
|
||||
.evan-markdown,
|
||||
.ad-wrap,
|
||||
.copyright-wrap,
|
||||
.comment-wrap {
|
||||
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-wrap {
|
||||
.markdown-wrap {
|
||||
overflow: hidden;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.copyright-title {
|
||||
.copyright-title {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding-left: 24rpx;
|
||||
@@ -1131,41 +1150,41 @@ export default {
|
||||
background-color: rgb(3, 174, 252);
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.poup-head {
|
||||
.poup-head {
|
||||
border-bottom: 2rpx solid #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
.poup-body {
|
||||
.poup-body {
|
||||
height: 50vh;
|
||||
}
|
||||
}
|
||||
|
||||
.poup-empty {
|
||||
.poup-empty {
|
||||
width: 100%;
|
||||
height: 40vh;
|
||||
}
|
||||
}
|
||||
|
||||
.poup-loading-wrap {
|
||||
.poup-loading-wrap {
|
||||
width: 100%;
|
||||
height: 40vh;
|
||||
|
||||
.e-loading-icon {
|
||||
font-size: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.poster-content {
|
||||
.poster-content {
|
||||
width: 100%;
|
||||
min-height: 60vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.copyright-text {
|
||||
.copyright-text {
|
||||
line-height: 1.7;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-loading {
|
||||
.poster-loading {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -1174,14 +1193,14 @@ export default {
|
||||
bottom: 0;
|
||||
// background-color: rgba(0, 0, 0, 0.1);
|
||||
z-index: 666;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-save {
|
||||
.poster-save {
|
||||
box-sizing: border-box;
|
||||
border-top: 2rpx dashed #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.original-url {
|
||||
.original-url {
|
||||
display: flex;
|
||||
|
||||
&_left {
|
||||
@@ -1209,5 +1228,5 @@ export default {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user