duplikat dari
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-10 11:59:28 +08:00
fix: 修复插件状态检测功能
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="app-page">
|
||||
<view class="app-page" :class="[uniHaloPluginPageClass]">
|
||||
<PluginUnavailable v-if="!uniHaloPluginAvailable" :pluginId="uniHaloPluginId"
|
||||
:error-text="uniHaloPluginAvailableError" />
|
||||
<template v-else>
|
||||
@@ -80,9 +80,11 @@
|
||||
import MarkdownConfig from '@/common/markdown/markdown.config.js';
|
||||
import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue';
|
||||
|
||||
import pluginAvailable from "@/common/mixins/pluginAvailable.js"
|
||||
import pluginAvailableMixin from "@/common/mixins/pluginAvailable.js"
|
||||
import PluginUnavailable from '@/components/plugin-unavailable/plugin-unavailable.vue'
|
||||
|
||||
export default {
|
||||
mixins: [pluginAvailable],
|
||||
mixins: [pluginAvailableMixin],
|
||||
components: {
|
||||
tmSkeleton,
|
||||
tmSearch,
|
||||
@@ -91,7 +93,8 @@
|
||||
tmFlotbutton,
|
||||
tmEmpty,
|
||||
tmTags,
|
||||
mpHtml
|
||||
mpHtml,
|
||||
PluginUnavailable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -126,7 +129,7 @@
|
||||
this.fnSetPageTitle('内容搜索');
|
||||
// 检查插件
|
||||
this.setPluginId(this.NeedPluginIds.PluginSearchWidget)
|
||||
this.setPluginError("阿偶,检测到当前插件没有安装或者启用,无法使用瞬间功能哦,请联系管理员")
|
||||
this.setPluginError("阿偶,检测到当前插件没有安装或者启用,无法使用搜索功能哦,请联系管理员")
|
||||
if (!await this.checkPluginAvailable()) return
|
||||
if (!this.queryParams.keyword) {
|
||||
this.loading = 'success'
|
||||
@@ -136,9 +139,12 @@
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
if (!this.uniHaloPluginAvailable) return;
|
||||
this.fnResetSetAniWaitIndex();
|
||||
this.fnGetData();
|
||||
if (!this.uniHaloPluginAvailable) {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
return
|
||||
}
|
||||
this.fnOnSearch()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="app-page card-shadow">
|
||||
<view class="app-page card-shadow" :class="[uniHaloPluginPageClass]">
|
||||
<PluginUnavailable v-if="!uniHaloPluginAvailable" :pluginId="uniHaloPluginId"
|
||||
:error-text="uniHaloPluginAvailableError" />
|
||||
<template v-else>
|
||||
@@ -121,10 +121,11 @@
|
||||
import tmImages from '@/tm-vuetify/components/tm-images/tm-images.vue';
|
||||
import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
|
||||
|
||||
import pluginAvailable from "@/common/mixins/pluginAvailable.js"
|
||||
import pluginAvailableMixin from "@/common/mixins/pluginAvailable.js"
|
||||
import PluginUnavailable from '@/components/plugin-unavailable/plugin-unavailable.vue'
|
||||
|
||||
export default {
|
||||
mixins: [pluginAvailable],
|
||||
mixins: [pluginAvailableMixin],
|
||||
components: {
|
||||
tmSkeleton,
|
||||
tmTranslate,
|
||||
@@ -132,7 +133,8 @@
|
||||
tmTags,
|
||||
tmEmpty,
|
||||
tmImages,
|
||||
tmPoup
|
||||
tmPoup,
|
||||
PluginUnavailable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -189,7 +191,11 @@
|
||||
this.fnGetLinkGroupData();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
if (!this.uniHaloPluginAvailable) return;
|
||||
if (!this.uniHaloPluginAvailable) {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
return
|
||||
}
|
||||
this.isLoadMore = false;
|
||||
this.queryParams.page = 1;
|
||||
this.dataList = []
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<view class="app-page">
|
||||
<view class="app-page" :class="[uniHaloPluginPageClass]">
|
||||
<PluginUnavailable v-if="!uniHaloPluginAvailable" :pluginId="uniHaloPluginId"
|
||||
:error-text="uniHaloPluginAvailableError" />
|
||||
<template v-else>
|
||||
<!-- 顶部切换 -->
|
||||
<view class="e-fixed">
|
||||
<view class="e-fixed filter-box">
|
||||
<tm-search v-model="queryParams.keyword" :round="24" :shadow="0" color="light-blue"
|
||||
insert-color="light-blue" :clear="true" @input="fnOnSearch" @confirm="fnOnSearch"></tm-search>
|
||||
<tm-dropDownMenu :shadow="1" color="light-blue" active-color="light-blue"
|
||||
<tm-dropDownMenu :shadow="0" color="light-blue" active-color="light-blue"
|
||||
:default-selected="filterOption.selected" :list="filterOption.list"
|
||||
@confirm="fnOnFilterConfirm"></tm-dropDownMenu>
|
||||
</view>
|
||||
@@ -58,13 +58,14 @@
|
||||
import {
|
||||
voteCacheUtil
|
||||
} from '@/utils/vote.js'
|
||||
import pluginAvailable from "@/common/mixins/pluginAvailable.js"
|
||||
import pluginAvailableMixin from "@/common/mixins/pluginAvailable.js"
|
||||
import PluginUnavailable from '@/components/plugin-unavailable/plugin-unavailable.vue'
|
||||
|
||||
export default {
|
||||
options: {
|
||||
options: {
|
||||
styleIsolation: 'shared'
|
||||
},
|
||||
mixins: [pluginAvailable],
|
||||
mixins: [pluginAvailableMixin],
|
||||
components: {
|
||||
tmSkeleton,
|
||||
tmSearch,
|
||||
@@ -74,7 +75,8 @@
|
||||
tmEmpty,
|
||||
tmTags,
|
||||
tmDropDownMenu,
|
||||
VoteCard
|
||||
VoteCard,
|
||||
PluginUnavailable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -199,7 +201,11 @@
|
||||
this.fnGetData();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
if (!this.uniHaloPluginAvailable) return;
|
||||
if (!this.uniHaloPluginAvailable) {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
return
|
||||
}
|
||||
this.fnResetSetAniWaitIndex();
|
||||
this.isLoadMore = false;
|
||||
this.queryParams.page = 0;
|
||||
@@ -385,6 +391,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.filter-box {
|
||||
box-shadow: 0rpx 0rpx 12rpx rgba(0, 0, 0, 0.035);
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 24rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user