mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-10 11:59:28 +08:00
refactor: 将页面配置通过插件动态化配置(plugin-uni-halo)
This commit is contained in:
@@ -4,7 +4,6 @@ package-lock.json
|
||||
.idea
|
||||
|
||||
config/halo.config.js
|
||||
config/ad.config.js
|
||||
config/love.config.js
|
||||
config/token.config.js
|
||||
config/plugins.config.js
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script>
|
||||
import HaloTokenConfig from '@/config/token.config.js';
|
||||
import HaloConfig from '@/config/halo.config.js';
|
||||
import HaloAdConfig from '@/config/ad.config.js';
|
||||
|
||||
// app升级检测(搭配:https://ext.dcloud.net.cn/plugin?id=4470 升级中心)
|
||||
import CheckAppUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
|
||||
@@ -10,9 +8,7 @@
|
||||
} from '@/utils/update.js';
|
||||
export default {
|
||||
globalData: {
|
||||
baseApiUrl: HaloTokenConfig.BASE_API,
|
||||
...HaloConfig,
|
||||
haloAdConfig: HaloAdConfig
|
||||
baseApiUrl: HaloTokenConfig.BASE_API
|
||||
},
|
||||
onLaunch: function() {
|
||||
console.log('App Launch');
|
||||
@@ -23,20 +19,14 @@
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
CheckWxUpdate();
|
||||
uni.$tm.vx.commit('setWxShare', HaloConfig.wxShareConfig);
|
||||
// #endif
|
||||
|
||||
// 监听中间按钮(暂时没有使用)
|
||||
uni.onTabBarMidButtonTap(() => {
|
||||
console.log('点击中间按钮');
|
||||
});
|
||||
|
||||
// 初始化博主信息
|
||||
uni.$tm.vx.actions('blogger/fnGetBlogger');
|
||||
|
||||
// 临时:检查是否有用户,没有的话添加一个默认的用户
|
||||
uni.$tm.vx.actions('user/checkAndSetDefaultUser');
|
||||
|
||||
uni.$tm.vx.actions('config/fetchConfigs').then((res) => {
|
||||
console.log('正常:', res)
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.$tm.vx.commit('setWxShare', res.shareConfig);
|
||||
// #endif
|
||||
})
|
||||
// 启动检查app的配置是否已经就绪,若未就绪则设置默认的
|
||||
uni.$tm.vx.actions('setting/checkAndSetDefaultAppSettings');
|
||||
},
|
||||
|
||||
+3
-3
@@ -10,13 +10,13 @@
|
||||
* 修改时间:
|
||||
*/
|
||||
|
||||
import HttpHandler from '@/common/http/request.js'
|
||||
|
||||
// 2.0接口
|
||||
import v2 from './v2/all.api.js'
|
||||
import v2Config from './v2/all.config.js'
|
||||
|
||||
const ApiManager = {
|
||||
v2
|
||||
v2,
|
||||
v2Config,
|
||||
};
|
||||
|
||||
const install = (Vue) => {
|
||||
|
||||
+8
-7
@@ -3,10 +3,10 @@
|
||||
*/
|
||||
import HaloTokenConfig from '@/config/token.config.js'
|
||||
import HttpHandler from '@/common/http/request.js'
|
||||
|
||||
import {
|
||||
getCache
|
||||
} from '@/utils/storage.js'
|
||||
import HaloPluginsConfig from '@/config/plugins.config.js'
|
||||
getAppConfigs
|
||||
} from '@/config/index.js'
|
||||
|
||||
export default {
|
||||
/**
|
||||
@@ -154,7 +154,7 @@ export default {
|
||||
checkPostVerifyCode: (verifyCode, postId) => {
|
||||
return HttpHandler.Get(`/apis/tools.muyin.site/v1alpha1/verificationCode/check?code=${verifyCode}`, null, {
|
||||
header: {
|
||||
'Authorization': HaloPluginsConfig.toolsPlugin.Authorization,
|
||||
'Authorization': getAppConfigs().pluginConfig.toolsPlugin?.Authorization,
|
||||
'Wechat-Session-Id': uni.getStorageSync('openid'),
|
||||
'Post-Id': postId
|
||||
}
|
||||
@@ -165,9 +165,10 @@ export default {
|
||||
* 校验文章访问密码
|
||||
*/
|
||||
checkPostPasswordAccess: (password, postId) => {
|
||||
return HttpHandler.Get(`/apis/tools.muyin.site/v1alpha1/visitPassword/checkPost?password=${password}`, null, {
|
||||
return HttpHandler.Get(`/apis/tools.muyin.site/v1alpha1/visitPassword/checkPost?password=${password}`,
|
||||
null, {
|
||||
header: {
|
||||
'Authorization': HaloPluginsConfig.toolsPlugin.Authorization,
|
||||
'Authorization': getAppConfigs().pluginConfig.toolsPlugin?.Authorization,
|
||||
'Wechat-Session-Id': uni.getStorageSync('openid'),
|
||||
'Post-Id': postId
|
||||
}
|
||||
@@ -180,7 +181,7 @@ export default {
|
||||
getPostVerifyCode: () => {
|
||||
return HttpHandler.Get(`/apis/tools.muyin.site/v1alpha1/verificationCode/create`, null, {
|
||||
header: {
|
||||
'Authorization': HaloPluginsConfig.toolsPlugin.Authorization
|
||||
'Authorization': getAppConfigs().pluginConfig.toolsPlugin?.Authorization,
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import HttpHandler from '@/common/http/request.js'
|
||||
|
||||
export default {
|
||||
/**
|
||||
* 获取应用基本配置
|
||||
*/
|
||||
getAppConfigs: () => {
|
||||
return HttpHandler.Get(`/apis/api.uni.uhalo.pro/v1alpha1/plugins/plugin-uni-halo/getConfigs`, {})
|
||||
},
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
* 修改时间:
|
||||
*/
|
||||
|
||||
import HaloConfig from '@/config/halo.config.js'
|
||||
import HaloTokenConfig from '@/config/token.config.js'
|
||||
import {
|
||||
setInterceptors
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
* markdown配置
|
||||
*/
|
||||
|
||||
import HaloConfig from '@/config/halo.config.js'
|
||||
import {
|
||||
getAppConfigs
|
||||
} from '@/config/index.js'
|
||||
import HaloTokenConfig from '@/config/token.config.js'
|
||||
export default {
|
||||
domain: HaloTokenConfig.BASE_API,
|
||||
@@ -93,6 +95,6 @@ export default {
|
||||
},
|
||||
containStyle: 'font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;padding:12px;font-size: 14px;color: #606266;word-spacing: 0.8px;letter-spacing: 0.8px;border-radius: 6px;background-color:#FFFFFF;',
|
||||
|
||||
loadingGif: HaloConfig.loadingGifUrl,
|
||||
emptyGif: HaloConfig.loadingEmptyUrl,
|
||||
loadingGif: getAppConfigs().imagesConfig.loadingGifUrl,
|
||||
emptyGif: getAppConfigs().imagesConfig.loadingEmptyUrl,
|
||||
}
|
||||
+23
-19
@@ -9,24 +9,23 @@
|
||||
* 修改人员:
|
||||
* 修改时间:
|
||||
*/
|
||||
import HaloConfig from '@/config/halo.config.js';
|
||||
import HaloAdConfig from '@/config/ad.config.js';
|
||||
import HaloPluginsConfig from '@/config/plugins.config.js';
|
||||
|
||||
export default {
|
||||
install(Vue) {
|
||||
Vue.mixin({
|
||||
data() {
|
||||
return {
|
||||
author: HaloConfig.author,
|
||||
_isWechat: true,
|
||||
haloConfig: HaloConfig,
|
||||
haloAdConfig: HaloAdConfig,
|
||||
haloPluginsConfig: HaloPluginsConfig,
|
||||
_aniWaitIndex: 0, // 动画索引
|
||||
_aniWaitIndex: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
haloConfig() {
|
||||
return this.$tm.vx.getters().getConfigs;
|
||||
},
|
||||
haloPluginsConfig() {
|
||||
return this.$tm.vx.getters().getConfigs?.pluginConfig;
|
||||
},
|
||||
// 获取全局应用设置
|
||||
globalAppSettings() {
|
||||
return uni.$tm.vx.getters().getSettings;
|
||||
@@ -34,23 +33,33 @@ export default {
|
||||
// 计算动画索引
|
||||
calcAniWait() {
|
||||
return (index) => {
|
||||
if ((index + 1) % 10 == 0) {
|
||||
if ((index + 1) % 10 === 0) {
|
||||
this._aniWaitIndex = 1;
|
||||
} else {
|
||||
this._aniWaitIndex += 1;
|
||||
}
|
||||
console.log('this._aniWaitIndex', this._aniWaitIndex);
|
||||
return this._aniWaitIndex * 50
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
haloConfig: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal) {
|
||||
if (!newVal) return;
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.$tm.vx.commit('setWxShare', newVal.shareConfig);
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnResetSetAniWaitIndex()
|
||||
},
|
||||
created() {
|
||||
// #ifdef MP-WEIXIN
|
||||
this._isWechat = true;
|
||||
uni.$tm.vx.commit('setWxShare', HaloConfig.wxShareConfig);
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
this._isWechat = false;
|
||||
@@ -60,19 +69,14 @@ export default {
|
||||
this.fnResetSetAniWaitIndex()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 设置页面标题
|
||||
* @param {Object} title 标题
|
||||
*/
|
||||
// 设置页面标题
|
||||
fnSetPageTitle(title) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: title || HaloConfig.title
|
||||
title: title || (this.haloConfig && this.haloConfig.startConfig.title) || "uni-halo",
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面返回顶部
|
||||
*/
|
||||
// 页面返回顶部
|
||||
fnToTopPage(duration = 500) {
|
||||
duration = isNaN(duration) ? 500 : duration
|
||||
uni.pageScrollTo({
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
// 微信分享配置
|
||||
import haloConfig from '@/config/halo.config.js'
|
||||
import HaloTokenConfig from '@/config/token.config.js'
|
||||
import { jsonToUrlParams2 } from '@/utils/url.params.js'
|
||||
import {
|
||||
jsonToUrlParams2
|
||||
} from '@/utils/url.params.js'
|
||||
export const haloWxShareMixin = {
|
||||
data() {
|
||||
return {
|
||||
haloWxShareData: {
|
||||
...haloConfig.wxShareConfig
|
||||
},
|
||||
computed: {
|
||||
haloWxShareData() {
|
||||
const configs = this.$tm.vx.getters().getConfigs;
|
||||
return configs.shareConfig || {}
|
||||
}
|
||||
},
|
||||
|
||||
//#ifdef MP-WEIXIN
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<text class="img-load-text">{{ loadErrText }}</text> -->
|
||||
<image class="img-error-img" :src="loadingErrorImageSrc" mode="scaleToFill"></image>
|
||||
</view>
|
||||
<image v-show="loadStatus == 'success'" :src="src" @load="fnOnLoad" @error="fnOnError" :lazy-load="lazyLoad" :style="[imgStyle]" :mode="mode" @click="$emit('on-click', url)"></image>
|
||||
<image v-show="loadStatus == 'success'" :src="src" @load="fnOnLoad" @error="fnOnError" :lazy-load="lazyLoad"
|
||||
:style="[imgStyle]" :mode="mode" @click="$emit('on-click', url)"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -91,11 +92,14 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
imagesConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.imagesConfig
|
||||
},
|
||||
loadingImgSrc() {
|
||||
return getApp().globalData.loadingGifUrl;
|
||||
return this.imagesConfig.loadingGifUrl;
|
||||
},
|
||||
loadingErrorImageSrc() {
|
||||
return getApp().globalData.loadingErrUrl
|
||||
return this.imagesConfig.loadingErrUrl
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="category-mini-card">
|
||||
<cache-image class="img" height="180rpx" :url="$utils.checkThumbnailUrl(category.spec.cover,true)"
|
||||
<cache-image class="img" height="180rpx" :url="$utils.checkThumbnailUrl(category.spec.cover,false)"
|
||||
:fileMd5="$utils.checkThumbnailUrl(category.spec.cover)" mode="aspectFill"></cache-image>
|
||||
<view class="content">
|
||||
<view class="name">{{ category.spec.displayName }}</view>
|
||||
|
||||
@@ -72,9 +72,11 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 获取博主信息
|
||||
imageConfigs() {
|
||||
return this.$tm.vx.getters().getConfigs.imagesConfig;
|
||||
},
|
||||
bloggerInfo() {
|
||||
let blogger = this.$tm.vx.getters().getBlogger;
|
||||
let blogger = this.$tm.vx.getters().getConfigs.authorConfig.blogger;
|
||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||
return blogger;
|
||||
}
|
||||
@@ -82,10 +84,10 @@
|
||||
methods: {
|
||||
fnOnImageError(data) {
|
||||
if (data && data.owner) {
|
||||
if (this.$haloConfig.defaultAvatarUrl.indexOf('?') == -1) {
|
||||
data.owner.avatar = `${this.$haloConfig.defaultAvatarUrl}?next-v=${new Date().getTime()}`
|
||||
if (this.imageConfigs.defaultAvatarUrl.indexOf('?') == -1) {
|
||||
data.owner.avatar = `${this.imageConfigs.defaultAvatarUrl}?next-v=${new Date().getTime()}`
|
||||
} else {
|
||||
data.owner.avatar = `${this.$haloConfig.defaultAvatarUrl}&next-v=${new Date().getTime()}`
|
||||
data.owner.avatar = `${this.imageConfigs.defaultAvatarUrl}&next-v=${new Date().getTime()}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,59 +2,34 @@
|
||||
<view class="journal-card mb-24 round-3 bg-white ">
|
||||
<view class="head pa-24 pb-0 flex flex-between">
|
||||
<view class="left flex">
|
||||
<cache-image
|
||||
class="avatar rounded"
|
||||
radius="50%"
|
||||
width="70rpx"
|
||||
height="70rpx"
|
||||
:url="bloggerInfo.avatar"
|
||||
:fileMd5="bloggerInfo.avatar"
|
||||
mode="scaleToFill"
|
||||
></cache-image>
|
||||
<cache-image class="avatar rounded" radius="50%" width="70rpx" height="70rpx" :url="bloggerInfo.avatar"
|
||||
:fileMd5="bloggerInfo.avatar" mode="scaleToFill"></cache-image>
|
||||
<view class="info pl-16 flex flex-col">
|
||||
<view class="nickname text-weight-b text-grey-darken-4">{{ bloggerInfo.nickname }}</view>
|
||||
<view class="mt-3 time text-size-m ">{{ $tm.dayjs(journal.createTime).format('YYYY-MM-DD HH:mm:ss') }}</view>
|
||||
<view class="mt-3 time text-size-m ">
|
||||
{{ $tm.dayjs(journal.createTime).format('YYYY-MM-DD HH:mm:ss') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<tm-button v-if="useLike" :shadow="0" theme="light-blue" size="s" @click="fnLike(journal)">点赞({{ journal.likes }})</tm-button>
|
||||
<tm-button v-if="useEdit" :shadow="0" theme="light-blue" size="s" @click="$emit('on-edit', journal)">编辑</tm-button>
|
||||
<tm-button v-if="useLike" :shadow="0" theme="light-blue" size="s"
|
||||
@click="fnLike(journal)">点赞({{ journal.likes }})</tm-button>
|
||||
<tm-button v-if="useEdit" :shadow="0" theme="light-blue" size="s"
|
||||
@click="$emit('on-edit', journal)">编辑</tm-button>
|
||||
<tm-button v-if="useDel" :shadow="0" theme="red" size="s" @click="fnDel(journal)">删除</tm-button>
|
||||
</view>
|
||||
</view>
|
||||
<tm-more v-if="journal.content.length > 50" :maxHeight="100" label="查看全部内容" open-label="隐藏部分内容">
|
||||
<mp-html
|
||||
class="evan-markdown"
|
||||
lazy-load
|
||||
:domain="markdownConfig.domain"
|
||||
:loading-img="markdownConfig.loadingGif"
|
||||
:scroll-table="true"
|
||||
:selectable="true"
|
||||
:tag-style="markdownConfig.tagStyle"
|
||||
:container-style="markdownConfig.containStyle"
|
||||
:content="journal.content"
|
||||
:markdown="true"
|
||||
:showLineNumber="true"
|
||||
:showLanguageName="true"
|
||||
:copyByLongPress="true"
|
||||
/>
|
||||
<mp-html class="evan-markdown" lazy-load :domain="markdownConfig.domain"
|
||||
:loading-img="markdownConfig.loadingGif" :scroll-table="true" :selectable="true"
|
||||
:tag-style="markdownConfig.tagStyle" :container-style="markdownConfig.containStyle"
|
||||
:content="journal.content" :markdown="true" :showLineNumber="true" :showLanguageName="true"
|
||||
:copyByLongPress="true" />
|
||||
</tm-more>
|
||||
<mp-html
|
||||
v-else
|
||||
class="evan-markdown"
|
||||
lazy-load
|
||||
:domain="markdownConfig.domain"
|
||||
:loading-img="markdownConfig.loadingGif"
|
||||
:scroll-table="true"
|
||||
:selectable="true"
|
||||
:tag-style="markdownConfig.tagStyle"
|
||||
:container-style="markdownConfig.containStyle"
|
||||
:content="journal.content"
|
||||
:markdown="true"
|
||||
:showLineNumber="true"
|
||||
:showLanguageName="true"
|
||||
:copyByLongPress="true"
|
||||
/>
|
||||
<mp-html v-else class="evan-markdown" lazy-load :domain="markdownConfig.domain"
|
||||
:loading-img="markdownConfig.loadingGif" :scroll-table="true" :selectable="true"
|
||||
:tag-style="markdownConfig.tagStyle" :container-style="markdownConfig.containStyle"
|
||||
:content="journal.content" :markdown="true" :showLineNumber="true" :showLanguageName="true"
|
||||
:copyByLongPress="true" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -65,7 +40,11 @@ import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
|
||||
import tmMore from '@/tm-vuetify/components/tm-more/tm-more.vue';
|
||||
export default {
|
||||
name: 'journal-card',
|
||||
components: { mpHtml, tmButton, tmMore },
|
||||
components: {
|
||||
mpHtml,
|
||||
tmButton,
|
||||
tmMore
|
||||
},
|
||||
props: {
|
||||
isAdmin: {
|
||||
type: Boolean,
|
||||
@@ -94,12 +73,11 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 获取博主信息
|
||||
bloggerInfo() {
|
||||
let blogger = this.$tm.vx.getters().getBlogger;
|
||||
let blogger = this.$tm.vx.getters().getConfigs.authorConfig.blogger;
|
||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||
return blogger;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
fnLike(journal) {
|
||||
@@ -158,17 +136,21 @@ export default {
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||
overflow: hidden;
|
||||
|
||||
.avatar {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
border: 6rpx solid #fff;
|
||||
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.info {
|
||||
justify-content: center;
|
||||
|
||||
.nickname {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* 广告配置
|
||||
*/
|
||||
export default {
|
||||
// 文章详情广告
|
||||
articleDetail: {
|
||||
use: true,
|
||||
cover: 'https://b.925i.cn/uni_halo/uni_halo_ad_cover.png',
|
||||
title: 'uni-halo 正式开源啦,欢迎来使用和体验!',
|
||||
content: '基于 uni-app + halo1.x API 实现一款现代化的开源博客 / CMS 系统API开发的多端应用。功能包括:前台博客系统 和 后台管理系统,同时满足浏览和管理两端合一的需求,真正实现一个应用实现博客浏览和后台管理。',
|
||||
url: 'https://uni-halo.925i.cn'
|
||||
},
|
||||
rewardedVideoAd: '微信小程序激励广告id' // 奖励视频广告
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/**
|
||||
* 功能:基础配置
|
||||
* 作者:小莫唐尼
|
||||
* 邮箱:studio@925i.cn
|
||||
* 时间:2022年08月23日 15:19:14
|
||||
* 版本:v0.1.0
|
||||
* 修改记录:
|
||||
* 修改内容:
|
||||
* 修改人员:
|
||||
* 修改时间:
|
||||
*/
|
||||
export default {
|
||||
showCopyright: true, // 显示开源版权信息
|
||||
showAbout: true, // 显示关于项目入口
|
||||
uni_halo_logo: 'https://b.925i.cn/uni_halo/uni_halo_logo.png', // uni-halo的logo
|
||||
|
||||
title: '', // 博客标题 [建议必填]:在某些页面没有设置具体的页面名称时候,使用该值显示
|
||||
miniCodeImageUrl: '', // 小程序的太阳码/二维码的图片地址 [建议必填]
|
||||
|
||||
aboutProfileImageUrl: '', // 关于页面中的资料卡背景图 [建议必填]
|
||||
|
||||
// 启动页面的配置(页面地址`/pagesA/start/start`)
|
||||
start: {
|
||||
use: true, // 是否使用首次启动页:用户第一次使用你的应用会显示否则不显示
|
||||
title: 'uni-halo2.0', // 标题
|
||||
bg: '', // 留空则使用默认 开屏首页背景,可以是颜色值或者图片图片地址
|
||||
logo: 'https://b.925i.cn/uni_halo/uni_halo_logo.png', // 开屏首页图片
|
||||
desc1: '准备好了吗,即刻就出发', // 描述信息1
|
||||
desc2: '新触动 新感受 新体验', // 描述信息2
|
||||
btnText: '立即体验'
|
||||
},
|
||||
|
||||
// 博主信息
|
||||
author: {
|
||||
use: true, // 是否启用这里配置的信息,不启用则获取PC端博客设置的信息
|
||||
nickname: '', // 昵称
|
||||
avatar: '', // 头像
|
||||
email: '', // 邮箱
|
||||
description: '', // 介绍
|
||||
},
|
||||
|
||||
// 版权信息(用于文章详情)
|
||||
copyright: {
|
||||
use: true, // 是否使用版权描述
|
||||
author: '', // 版权归属说明
|
||||
description: '', // 版权描述
|
||||
violation: '', // 侵权处理说明
|
||||
},
|
||||
|
||||
// 社交信息(将会在`/pagesA/contact/contact`页面中展示)
|
||||
// 具体的某个参数值留空则不展示
|
||||
social: {
|
||||
qq: "", // qq号
|
||||
wechat: "", // 微信号
|
||||
weibo: "", // 微博地址
|
||||
email: "", // 邮箱地址
|
||||
blog: "", // 博客地址
|
||||
juejin: "", // 掘金地址
|
||||
bilibili: "", // b站地址
|
||||
gitee: "", // gitee地址
|
||||
github: "", // github地址
|
||||
csdn: "" // CSDN地址
|
||||
},
|
||||
|
||||
defaultThumbnailUrl: '', // 默认封面图地址
|
||||
defaultStaticThumbnailUrl: '', // 静态默认封面图(不可以是随机图地址)
|
||||
defaultImageUrl: '', // 默认图片地址
|
||||
defaultAvatarUrl: '', // 默认头像地址
|
||||
|
||||
loadingGifUrl: '', // 图片加载中的地址
|
||||
loadingErrUrl: '', // 图片加载失败的地址
|
||||
loadingEmptyUrl: '', // 加载图片为空地址
|
||||
|
||||
waveImageUrl: '', // 关于页面波浪图片
|
||||
|
||||
// 微信分享信息
|
||||
wxShareConfig: {
|
||||
title: '', // 小程序分享标题[非必填]
|
||||
desc: '', // 小程序分享描述[非必填]
|
||||
imageUrl: '', // 小程序分享时候图片地址[非必填]
|
||||
path: '/pages/index/index', // 分享路径[非必填] - 基本不需要修改
|
||||
copyLink: '/pages/index/index', // 复制链接[非必填] - 基本不需要修改
|
||||
query: {}, // 分享参数[非必填] - 基本不需要填写
|
||||
},
|
||||
|
||||
colors: [
|
||||
'#39B449',
|
||||
'#E44C41',
|
||||
'#8698A2',
|
||||
'#0080FE',
|
||||
'#1CBCB4',
|
||||
'#6638B5',
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// 应用设置存储key值
|
||||
export const _AppConfigKey = 'APP_GLOBAL_CONFIGS';
|
||||
|
||||
// 默认的应用设置
|
||||
export const DefaultAppConfigs = {
|
||||
loveConfig: {},
|
||||
imagesConfig: {},
|
||||
authorConfig: {},
|
||||
startConfig: {},
|
||||
pluginConfig: {},
|
||||
adConfig: {},
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应用设置
|
||||
*/
|
||||
export const getAppConfigs = () => {
|
||||
let configs = uni.getStorageSync(_AppConfigKey)
|
||||
if (configs) return JSON.parse(configs)
|
||||
|
||||
uni.setStorageSync(_AppConfigKey, JSON.stringify(DefaultAppConfigs))
|
||||
return configs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存应用设置
|
||||
*/
|
||||
export const setAppConfigs = (configs) => {
|
||||
uni.setStorageSync(_AppConfigKey, JSON.stringify(configs))
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
/**
|
||||
* 恋爱日记配置
|
||||
*/
|
||||
export default {
|
||||
waveImageUrl: 'https://b.925i.cn/uni_halo/uni_halo_about_wave.gif', // 波浪图片地址
|
||||
bgImageUrl: 'https://b.925i.cn/uni_halo_love/love_bg1.png', // 背景图片
|
||||
loveImageUrl: 'https://b.925i.cn/uni_halo_love/like.png', // 爱心图片
|
||||
|
||||
boy: {
|
||||
name: '未知男主',
|
||||
avatar: 'https://b.925i.cn/uni_halo_love/love_boy.png',
|
||||
birthday: '2022-09-25', // 生日
|
||||
},
|
||||
|
||||
girl: {
|
||||
name: '未知女主',
|
||||
avatar: 'https://b.925i.cn/uni_halo_love/love_girl.png',
|
||||
birthday: '2022-04-19', // 生日
|
||||
},
|
||||
timeTitle: '这是我们一起走过的',
|
||||
loveStartDate: '2022-04-10 13:14:20', // 恋爱开始时间
|
||||
|
||||
nav: [{
|
||||
key: 'journey',
|
||||
use: true,
|
||||
iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
title: '关于我们',
|
||||
desc: '我们一起度过的那些经历'
|
||||
},
|
||||
// {
|
||||
// key: 'album',
|
||||
// use: true,
|
||||
// iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
// title: '恋爱相册',
|
||||
// desc: '定格了我们的那些小美好'
|
||||
// },
|
||||
{
|
||||
key: 'list',
|
||||
use: true,
|
||||
iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
title: '恋爱清单',
|
||||
desc: '你我之间的约定我们都在努力实现'
|
||||
},
|
||||
],
|
||||
|
||||
// 关于我们:支持富文本内容
|
||||
journey: `
|
||||
准备晚安啦,睡觉前讲个故事吧~<p>槐树庄的村口有一棵大槐树,树下的村口第一家就是猫奶奶的家。</p><p>猫奶奶是一位孤寡老人,因为她经常收留和救治周围的流浪猫,所以村民就都管她叫“猫奶奶”。</p><p>一个月圆之夜,猫奶奶走到院门口,忽然发现门口石级上放着一个红毯子,里面包着一个啼(tí)哭的女婴。</p><p>猫奶奶找不到女婴的父母,只好收留了她,并给她起了个名字叫樱红。</p><p>猫奶奶辛苦地抚育着樱红成长,转眼之间,樱红已经九岁,上小学三年级了。</p><p>从樱红懂事起,猫奶奶就爱给她讲一个睡前故事,那是当地一个古老的传说。</p><p>在浓郁的树影深处有一个百花园,百花园里生长着奇花异草,还住了一个会唱歌的花仙子。花仙子的歌声美丽动人,能治百病。但是那里有一条奇怪的规矩,寻找花仙子的人在进入百花园后,见到花仙子之前,都不能发出一点声音,不然花仙子就不会出来见他。</p><p>受这个故事的影响,樱红特别喜欢唱歌。</p><p>这天晚上,樱红放学回家,家家户户炊烟袅(niǎo)袅,而自家烟囱却连一丝一缕(lǚ)的炊烟都没有。</p><p>樱红一惊,冲进院门一看,果然出事了!只见猫奶奶呻吟着倒在灶台前,双目紧闭,两只小脚也在不停地抽搐(chù)。</p><p>樱红慌了,好在有邻居的帮助,猫奶奶被送到了医院。经过抢救,猫奶奶总算醒过来,但是却半身不遂(suí),说话也不利落了。</p><p>猫奶奶不能下地行走做家务,小小的樱红,一夜之间就挑起了家庭的重担。</p><p>樱红一面求助于村委会,四处寻医问药,让猫奶奶获得进一步的治疗;一面在课余学做家务,悉心照顾猫奶奶,端水喂饭,不辞辛苦。</p><p>自从猫奶奶病倒以后,樱红每天早晨推开院门就会看见门前放着一朵小花,有时还会有一两尾鲜活的鲑(guī)鱼。</p><p>这样过了三个月,好奇的樱红在一个夜晚悄悄躲在院门的后面,想看看到底是谁。</p><p>到了午夜十二点,只见一只花猫衔着一棵风铃草来到院门前,把风铃草放下,转身就走。(浪漫童话小故事)樱红认出这只小花猫曾经被猫奶奶救助过,于是,她悄悄地尾随小花猫往前走。</p><p>不一会儿,她就发现自己进入了一个从未见过的世界:蔚蓝的天空飘着七色的云,阳光千丝万缕地落下来,鲜花盛开,彩蝶飞舞,百鸟齐鸣。</p><p>这到底是什么地方?她忽然想起了那个传说,这该不会就是花仙子住的百花园吧?</p><p>樱红几乎惊叫起来,但她立即想起了那条在见到花仙子之前,不能发出一点声音的规矩。于是她捂紧了嘴巴。</p><p>这时,她发现百花园里除了自己还有一个面色苍白的男孩子,闭着眼睛,右手攥着一根竹竿摸索着前行,应该是眼睛看不见了。</p><p>只见男孩子慢慢地偏离了路径,马上就要掉进路边的水沟里了。</p><p>樱红下意识地大声呼喊:“站住,小心脚底下!”一张口,樱红才想起来,自己已经坏了规矩!</p><p>此时,“轰隆”一声巨响后,眼前的一切都消失了,樱红仍然站在自家院门前的大槐树下。</p><p>真遗憾啊!樱红深深叹了口气,可为了救人,她并不觉得后悔。</p><p>第二天早上,樱红被一种美妙的歌声唤醒。</p><p>唱歌的人就是美丽的花仙子,她乘坐着奇花异草编成的花篮,飘进了她家的院子里。</p><p>奇迹发生了,只见猫奶奶起身下床,像健康人一样走出房门。</p><p>猫奶奶看到了花仙子,不敢相信地揉着眼睛说:“你就是传说中的花仙子吗?是你治好了我的病?”</p><p>花仙子说:“是的!是这个小女孩的善良打动了我,连我那不能出声的规矩都要为她破例了。”</p><p>樱红高兴地看着猫奶奶。从此,她和猫奶奶继续幸福地生活着。</p>
|
||||
`,
|
||||
// 恋爱相册
|
||||
albumKeyName: '恋爱相册', // 对应后台的图库分组名称
|
||||
// 恋爱清单
|
||||
loveList: {
|
||||
useApi: false, // 是否启用api接口
|
||||
api: '', // api 接口(如果使用api接口的方式,则下方的data可以留空,但是api接口必须按照对应的数据格式返回)
|
||||
data: [{
|
||||
index: 0, // 序号
|
||||
finish: true, // 是否已完成
|
||||
title: '偷偷记录对方熟睡的模样', // 事件名称
|
||||
desc: '偷偷观察对方熟睡的模样,记录下来', // 事件描述
|
||||
detail: {
|
||||
start: '2022年05月20日', // 计划开始时间
|
||||
desc: '偷偷观察对方熟睡的模样,记录下来', // 事件详细描述
|
||||
end: '每天', // 完成时间,
|
||||
moment: '', // 完成瞬间的记录
|
||||
other: '', // 其他说明
|
||||
}
|
||||
}, {
|
||||
index: 1,
|
||||
finish: false,
|
||||
title: '陪对方过生日',
|
||||
desc: '陪对方一起过生日',
|
||||
detail: {
|
||||
start: '2023年05月20日',
|
||||
desc: '陪对方一起过生日,他和我的生日',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '他 生日5月20日 我生日9月25日',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
finish: false,
|
||||
title: '一起去旅行',
|
||||
desc: '一起来一场说走就走的旅行,希望去的是大理',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '一起来一场说走就走的旅行,希望去的是大理',
|
||||
other: '',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
finish: false,
|
||||
title: '一起穿情侣装逛街',
|
||||
desc: '一起穿情侣装逛街',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 4,
|
||||
finish: false,
|
||||
title: '一起看日出',
|
||||
desc: '一起看日出',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 5,
|
||||
finish: false,
|
||||
title: '一起看日落',
|
||||
desc: '一起看日落',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '', // 其他说明
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 6,
|
||||
finish: false,
|
||||
title: '一起买菜、做饭、刷碗',
|
||||
desc: '一起买菜、做饭、刷碗',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '',
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
/**
|
||||
* 恋爱日记配置
|
||||
*/
|
||||
export default {
|
||||
waveImageUrl: 'https://b.925i.cn/uni_halo/uni_halo_about_wave.gif', // 波浪图片地址
|
||||
bgImageUrl: 'https://b.925i.cn/uni_halo_love/love_bg1.png', // 背景图片
|
||||
loveImageUrl: 'https://b.925i.cn/uni_halo_love/like.png', // 爱心图片
|
||||
|
||||
boy: {
|
||||
name: '未知男主',
|
||||
avatar: 'https://b.925i.cn/uni_halo_love/love_boy.png',
|
||||
birthday: '2022-09-25', // 生日
|
||||
},
|
||||
|
||||
girl: {
|
||||
name: '未知女主',
|
||||
avatar: 'https://b.925i.cn/uni_halo_love/love_girl.png',
|
||||
birthday: '2022-07-25', // 生日
|
||||
},
|
||||
|
||||
timeTitle: '这是我们一起走过的', // 恋爱时间标题
|
||||
loveStartDate: '2022-05-20 13:14:20', // 恋爱开始时间
|
||||
|
||||
// 恋爱日记首页导航(除了 key 以外都可以修改)
|
||||
nav: [{
|
||||
key: 'journey',
|
||||
use: true,
|
||||
iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
title: '关于我们',
|
||||
desc: '我们一起度过的那些经历'
|
||||
},
|
||||
{
|
||||
key: 'list',
|
||||
use: true,
|
||||
iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
title: '恋爱清单',
|
||||
desc: '你我之间的约定我们都在努力实现'
|
||||
},
|
||||
],
|
||||
|
||||
// 关于我们:支持富文本内容
|
||||
journey: `
|
||||
<p>有一只马,它的邻居是一只驴。</p><p>有一天,马和驴都被主人牵到外面晒太阳,马和驴聊起了天。</p><p>马说:“我叫马,你呢?”</p><p>驴说:“我叫驴。(哄小宝贝睡觉的甜甜睡前故事)”</p><p>马说:“为什么我俩的名字不一样呢?”</p><p>驴说:“因为我和你不一样。”</p><p>马说:“我们俩什么地方不一样呢?”</p><p>驴说:“我身材小巧,而你却比较粗壮,不如我耐看。”马看了看比自已矮小很多的驴,认为驴说的话有点道理。</p><p>马说:“我们俩除了身材不一样,还有什么不同呢?”</p><p>驴说:“我们俩的声音不一样,我的声音多动听呀!”说着驴伸长脖子叫了两声。“不信,你也叫两声试试。”马也伸长脖子嘶鸣了两声,的确和驴的声音有点不同,马不好意思地低下了头。</p><p>过了一会儿,马又说:“我们俩除了身材和声音不一样外,还有什么不同呢?”</p><p>驴说:“我的步伐多么优雅呀。”说着,驴迈开蹄子走了两步,“而你呢,却昂首阔步,一点儿也不优雅,(如何哄女朋友睡觉的睡前故事爱情浪漫)不信你走两步试试。”</p><p>马听驴这么一说,就高昂着头走了两步,旋即,马飞奔了起来,转了一圈回来后,驴得意地说:“怎么样,我没说错罢,你就是急性子,和优雅不沾边。”马听了驴的话,有点感到惭愧。</p><p>最后,马又鼓起勇气说:“我们俩还有什么不同呢?”</p><p>驴说:“我的家庭意识比你强,主人抽我一鞭子,我就跟着主人回家,而你呢?恐怕不会吧……”</p><p>马还没有来得及回答,马和驴的主人同时来到了马和驴的身边。只见驴的主人抽了驴一鞭子后,驴乖乖地跟着主人回家了。马把这一切都看在了眼里,它为自已和驴的诸多不同而感到惭愧,只见马的主人也抽了马一鞭子,马犹豫了一下,终于象驴一样乖乖地跟着主人回了家。</p><p>一个伯乐站在远处看到了这一幕后,叹口气离开了。</p>
|
||||
`,
|
||||
|
||||
// 恋爱清单
|
||||
loveList: {
|
||||
useApi: false, // 是否启用api接口
|
||||
api: '', // api 接口(如果使用api接口的方式,则下方的data可以留空,但是api接口必须按照对应的数据格式返回)
|
||||
data: [{
|
||||
index: 0, // 序号
|
||||
finish: true, // 是否已完成
|
||||
title: '偷偷记录对方熟睡的模样', // 事件名称
|
||||
desc: '偷偷观察对方熟睡的模样,记录下来', // 事件描述
|
||||
detail: {
|
||||
start: '2022年05月20日', // 计划开始时间
|
||||
desc: '偷偷观察对方熟睡的模样,记录下来', // 事件详细描述
|
||||
end: '每天', // 完成时间,
|
||||
moment: '', // 完成瞬间的记录
|
||||
other: '', // 其他说明
|
||||
}
|
||||
}, {
|
||||
index: 1,
|
||||
finish: false,
|
||||
title: '陪对方过生日',
|
||||
desc: '陪对方一起过生日',
|
||||
detail: {
|
||||
start: '2023年05月20日',
|
||||
desc: '陪对方一起过生日,他和我的生日',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '他 生日5月20日 我生日9月25日',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
finish: false,
|
||||
title: '一起去旅行',
|
||||
desc: '一起来一场说走就走的旅行,希望去的是大理',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '一起来一场说走就走的旅行,希望去的是大理',
|
||||
other: '',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
finish: false,
|
||||
title: '一起穿情侣装逛街',
|
||||
desc: '一起穿情侣装逛街',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 4,
|
||||
finish: false,
|
||||
title: '一起看日出',
|
||||
desc: '一起看日出',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '',
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 5,
|
||||
finish: false,
|
||||
title: '一起看日落',
|
||||
desc: '一起看日落',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '', // 其他说明
|
||||
}
|
||||
},
|
||||
{
|
||||
index: 6,
|
||||
finish: false,
|
||||
title: '一起买菜、做饭、刷碗',
|
||||
desc: '一起买菜、做饭、刷碗',
|
||||
detail: {
|
||||
start: '',
|
||||
desc: '',
|
||||
end: '',
|
||||
moment: '',
|
||||
other: '',
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/** 插件相关配置 */
|
||||
const PluginsConfig = Object.freeze({
|
||||
// 友链提交配置
|
||||
autoSubmitLink: {
|
||||
// 可以考虑配置一个插件id,检测是否开启了友链提交插件
|
||||
pluginId:"",
|
||||
// 是否开启(可能不启用插件)
|
||||
enabled: false,
|
||||
// 我的友链信息
|
||||
blogDetail: {
|
||||
// 博客名称
|
||||
name: "uni-halo 博客",
|
||||
// 博客地址
|
||||
url: "https://uni-halo.925i.cn/",
|
||||
// 博客logo
|
||||
logo: "https://uni-halo.925i.cn/logo.png",
|
||||
// 博客简介
|
||||
description: "一个基于Halo2.0 API 的博客小程序开源项目。",
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
export default PluginsConfig;
|
||||
@@ -1,30 +0,0 @@
|
||||
/** 插件相关配置 */
|
||||
const PluginsConfig = Object.freeze({
|
||||
// 友链提交配置
|
||||
autoSubmitLink: {
|
||||
// 可以考虑配置一个插件id,检测是否开启了友链提交插件(暂未使用)
|
||||
pluginId: "",
|
||||
// 是否开启(可能后台没有安装或未不启用插件)
|
||||
enabled: true,
|
||||
// 我的友链信息
|
||||
blogDetail: {
|
||||
// 博客名称
|
||||
name: "",
|
||||
// 博客地址
|
||||
url: "",
|
||||
// 博客logo
|
||||
logo: "",
|
||||
// 博客简介
|
||||
description: "",
|
||||
}
|
||||
},
|
||||
// tools工具箱插件配置
|
||||
toolsPlugin: {
|
||||
pluginId:"tools",
|
||||
enabled: true,
|
||||
Authorization: "Tools工具箱插件设置的认证token"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
export default PluginsConfig;
|
||||
@@ -62,18 +62,9 @@ Vue.prototype.$http = http;
|
||||
import ApiManager from '@/api/index.js'
|
||||
Vue.use(ApiManager);
|
||||
|
||||
import HaloConfig from '@/config/halo.config.js'
|
||||
import HaloTokenConfig from '@/config/token.config.js'
|
||||
Vue.prototype.$haloConfig = HaloConfig
|
||||
Vue.prototype.$baseApiUrl = HaloTokenConfig.BASE_API
|
||||
|
||||
import HaloAdConfig from '@/config/ad.config.js'
|
||||
Vue.prototype.$haloAdConfig = HaloAdConfig
|
||||
|
||||
import HaloPluginsConfig from '@/config/plugins.config.js'
|
||||
Vue.prototype.$haloPluginsConfig = HaloPluginsConfig
|
||||
|
||||
|
||||
// 由于微信小程序的运行机制问题,需声明如下一行,H5和APP非必填
|
||||
Vue.prototype._i18n = i18n;
|
||||
|
||||
@@ -83,7 +74,6 @@ const app = new Vue({
|
||||
i18n,
|
||||
...App,
|
||||
});
|
||||
// app.$mount();
|
||||
|
||||
// #ifdef H5
|
||||
RouterMount(app, router, '#app')
|
||||
|
||||
+17
-6
@@ -4,13 +4,28 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
configs() {
|
||||
return this.$tm.vx.getters().getConfigs;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.$tm.vx.actions('config/fetchConfigs').then((res) => {
|
||||
console.log('正常:', res)
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.$tm.vx.commit('setWxShare', res.shareConfig);
|
||||
// #endif
|
||||
this.fnCheckShowStarted();
|
||||
}).catch((err) => {
|
||||
console.log('异常:', err)
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
});
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 检查是否需要跳转到启动页
|
||||
fnCheckShowStarted() {
|
||||
if (!getApp().globalData.start.use) {
|
||||
if (!this.configs.startConfig.enable) {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
});
|
||||
@@ -20,10 +35,6 @@
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
});
|
||||
|
||||
// uni.navigateTo({
|
||||
// url:'/pagesA/test-page/test-page'
|
||||
// })
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pagesA/start/start'
|
||||
|
||||
@@ -77,52 +77,16 @@
|
||||
</tm-grouplist>
|
||||
</view>
|
||||
<!-- 版权 -->
|
||||
<view v-if="showCopyright" class="copyright mt-40 text-size-xs text-align-center">
|
||||
<view class="">「 2022 uni-halo 丨 开源项目@小莫唐尼 」</view>
|
||||
<view v-if="copyrightConfig.enabled" class="copyright mt-40 text-size-xs text-align-center">
|
||||
<view class="">{{ copyrightConfig.content }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 名片 -->
|
||||
<tm-poup v-model="miniProfileCard.show" width="94vw" height="auto" :round="3" position="center">
|
||||
<view class="profile-card round-3 flex pa-24 pt-36 pb-36">
|
||||
<view class="profile-card_label bg-gradient-light-blue-accent text-size-xs pt-1 pb-1">名片</view>
|
||||
<view class="left flex flex-col flex-center">
|
||||
<image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
|
||||
<view class="name mt-10 text-size-m text-weight-b">{{ bloggerInfo.nickname }}</view>
|
||||
<view class="mt-10 round-a-1 pa-2 pl-12 pr-12 text-size-s bg-gradient-light-blue-accent">
|
||||
前端摸鱼大师
|
||||
</view>
|
||||
<view class="mt-6 text-size-xs text-align-center text-grey-darken-2">
|
||||
一个爱凑热闹的、喜欢捣鼓前端的博主。
|
||||
</view>
|
||||
</view>
|
||||
<view class="right flex flex-col pl-12">
|
||||
<view class="label text-size-s text-weight-b">爱好:摸鱼、打游戏、听音乐、逛B站</view>
|
||||
<view class="motto mt-12 text-size-s text-grey-darken-1">
|
||||
如果不是在空闲着的时候就能挣到钱,那就不算摸鱼!
|
||||
</view>
|
||||
<view class="mt-12 text-size-m text-weight-b text-grey-darken-2">精选图片</view>
|
||||
<view class="photos mt-6 flex ">
|
||||
<image class="photos-img round-2" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)"
|
||||
mode="aspectFill"></image>
|
||||
<image class="photos-img round-2" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)"
|
||||
mode="aspectFill"></image>
|
||||
<image class="photos-img round-2" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</tm-poup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
checkHasAdminLogin
|
||||
} from '@/utils/auth.js';
|
||||
import {checkHasAdminLogin} from '@/utils/auth.js';
|
||||
import CheckAppUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
|
||||
import {
|
||||
CheckWxUpdate
|
||||
} from '@/utils/update.js';
|
||||
import {CheckWxUpdate} from '@/utils/update.js';
|
||||
|
||||
import tmGrouplist from '@/tm-vuetify/components/tm-grouplist/tm-grouplist.vue';
|
||||
import tmListitem from '@/tm-vuetify/components/tm-listitem/tm-listitem.vue';
|
||||
@@ -165,11 +129,17 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
haloConfigs() {
|
||||
return this.$tm.vx.getters().getConfigs
|
||||
},
|
||||
calcDefaultImageConfig() {
|
||||
return this.haloConfigs.imagesConfig
|
||||
},
|
||||
bloggerInfo() {
|
||||
return this.$tm.vx.getters().getBlogger;
|
||||
return this.haloConfigs.authorConfig.blogger;
|
||||
},
|
||||
calcProfileStyle() {
|
||||
let _imgUrlOr = getApp().globalData.aboutProfileImageUrl;
|
||||
const _imgUrlOr = this.calcDefaultImageConfig.aboutProfileImageUrl;
|
||||
if (this.$utils.checkIsUrl(_imgUrlOr)) {
|
||||
return {
|
||||
backgroundImage: `url(${_imgUrlOr})`
|
||||
@@ -181,10 +151,10 @@
|
||||
}
|
||||
},
|
||||
calcWaveUrl() {
|
||||
return getApp().globalData.waveImageUrl;
|
||||
return this.calcDefaultImageConfig.waveImageUrl;
|
||||
},
|
||||
showCopyright() {
|
||||
return getApp().globalData.showCopyright;
|
||||
copyrightConfig() {
|
||||
return this.haloConfigs.basicConfig.copyrightConfig;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -194,18 +164,23 @@
|
||||
this.statisticsShowMore = val.about.showAllCount;
|
||||
this.fnGetNavList();
|
||||
}
|
||||
},
|
||||
haloConfigs: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
this.fnGetNavList();
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.statisticsShowMore = this.globalAppSettings.about.showAllCount;
|
||||
this.fnGetNavList();
|
||||
this.fnGetData();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.fnGetData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
fnGetNavList() {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
let _isWx = false;
|
||||
@@ -231,7 +206,7 @@
|
||||
path: '/pagesA/love/love',
|
||||
isAdmin: false,
|
||||
type: 'page',
|
||||
show: true
|
||||
show: this.haloConfigs.loveConfig.loveEnabled
|
||||
}, {
|
||||
key: 'disclaimers',
|
||||
title: '友情链接',
|
||||
@@ -252,7 +227,7 @@
|
||||
path: '/pagesA/disclaimers/disclaimers',
|
||||
isAdmin: false,
|
||||
type: 'page',
|
||||
show: true
|
||||
show: this.haloConfigs.basicConfig.disclaimers.enabled
|
||||
},
|
||||
{
|
||||
key: 'contact-blogger',
|
||||
@@ -298,7 +273,7 @@
|
||||
path: '/pagesA/about/about',
|
||||
isAdmin: false,
|
||||
type: 'page',
|
||||
show: getApp().globalData.showAbout
|
||||
show: this.haloConfigs.basicConfig.showAboutSystem
|
||||
},
|
||||
// {
|
||||
// key: 'cache',
|
||||
@@ -393,7 +368,8 @@
|
||||
url: '/pagesB/login/login'
|
||||
});
|
||||
})
|
||||
.catch(err => {});
|
||||
.catch(err => {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -414,7 +390,8 @@
|
||||
this.navList.find(x => x.key == 'cache').rightText =
|
||||
uni.getStorageInfoSync().currentSize + 'KB';
|
||||
})
|
||||
.catch(err => {});
|
||||
.catch(err => {
|
||||
});
|
||||
break;
|
||||
case 'update':
|
||||
// #ifdef APP-PLUS
|
||||
|
||||
@@ -7,12 +7,11 @@
|
||||
</view>
|
||||
<!-- 内容区域 -->
|
||||
<view v-else class="app-page-content">
|
||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center">
|
||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center" style="height: 70vh;">
|
||||
<!-- 空布局 -->
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无数据"></tm-empty>
|
||||
</view>
|
||||
<block v-else>
|
||||
|
||||
<tm-translate v-for="(item, index) in dataList" :key="index"
|
||||
style="box-sizing: border-box;width: 50%;padding: 0 8rpx;" animation-name="fadeUp"
|
||||
:wait="calcAniWait(index)">
|
||||
@@ -40,6 +39,7 @@
|
||||
|
||||
import MarkdownConfig from '@/common/markdown/markdown.config.js';
|
||||
import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tmSkeleton,
|
||||
@@ -63,12 +63,6 @@
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
bloggerInfo() {
|
||||
return this.$tm.vx.getters().getBlogger;
|
||||
},
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.fnGetData();
|
||||
},
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
.content-empty {
|
||||
width: 100%;
|
||||
height: 60vh;
|
||||
height: 70vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view slot="right" class="mr-24 text-size-m text-grey">uni-halo</view>
|
||||
<!-- #endif -->
|
||||
</tm-menubars>
|
||||
<view v-if="loading != 'success' && articleList.length===0" class="loading-wrap">
|
||||
<view v-if="loading !== 'success' && articleList.length===0" class="loading-wrap">
|
||||
<tm-skeleton model="card"></tm-skeleton>
|
||||
<tm-skeleton model="cardActions"></tm-skeleton>
|
||||
<tm-skeleton model="list"></tm-skeleton>
|
||||
@@ -38,7 +38,8 @@
|
||||
</view>
|
||||
<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>
|
||||
还没有任何文章分类~
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="content" v-for="(category, index) in categoryList" :key="category.metadata.name"
|
||||
@click="fnToCategoryBy(category)">
|
||||
@@ -58,8 +59,10 @@
|
||||
<text class="iconfont icon-angle-right text-size-s "></text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="articleList.length == 0" class="article-empty"><tm-empty icon="icon-shiliangzhinengduixiang-"
|
||||
label="博主还没有发表任何文章~"></tm-empty></view>
|
||||
<view v-if="articleList.length == 0" class="article-empty">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-"
|
||||
label="博主还没有发表任何文章~"></tm-empty>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view :class="globalAppSettings.layout.home">
|
||||
<tm-translate v-for="(article, index) in articleList" :key="index" class="ani-item"
|
||||
@@ -118,11 +121,11 @@
|
||||
|
||||
computed: {
|
||||
bloggerInfo() {
|
||||
let blogger = this.$tm.vx.getters().getBlogger;
|
||||
let blogger = this.$tm.vx.getters().getConfigs.authorConfig.blogger;
|
||||
console.log('blogger----------------', blogger)
|
||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||
return blogger;
|
||||
},
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
this.fnSetPageTitle();
|
||||
@@ -212,7 +215,8 @@
|
||||
success: (res) => {
|
||||
this.bannerList = _format(res.data.items);
|
||||
},
|
||||
fail: (err) => {}
|
||||
fail: (err) => {
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
@@ -364,9 +368,11 @@
|
||||
margin-right: 24rpx;
|
||||
|
||||
/* #endif */
|
||||
&_icon {}
|
||||
&_icon {
|
||||
}
|
||||
|
||||
&_text {}
|
||||
&_text {
|
||||
}
|
||||
}
|
||||
|
||||
.show-more {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<!-- 内容区域 -->
|
||||
<view v-else class="app-page-content">
|
||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center">
|
||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center" style="min-height: 70vh;">
|
||||
<!-- 空布局 -->
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无数据"></tm-empty>
|
||||
</view>
|
||||
@@ -42,7 +42,8 @@
|
||||
<view class="image-item" v-for="(image,mediumIndex) in moment.spec.content.medium"
|
||||
:key="mediumIndex">
|
||||
<image mode="aspectFill" style="width: 100%;height: 100%;border-radius: 6rpx;"
|
||||
:src="image.url" @click="handlePreview(mediumIndex,moment.spec.content.medium)" />
|
||||
:src="image.url"
|
||||
@click="handlePreview(mediumIndex,moment.spec.content.medium)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -63,6 +64,7 @@
|
||||
|
||||
import MarkdownConfig from '@/common/markdown/markdown.config.js';
|
||||
import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tmSkeleton,
|
||||
@@ -88,8 +90,10 @@
|
||||
|
||||
computed: {
|
||||
bloggerInfo() {
|
||||
return this.$tm.vx.getters().getBlogger;
|
||||
},
|
||||
let blogger = this.$tm.vx.getters().getConfigs.authorConfig.blogger;
|
||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||
return blogger;
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
||||
+14
-9
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<view class="app-page bg-white flex flex-col">
|
||||
<view v-if="uni_halo_logo" class="logo mt-40 pt-40"><image class="logo-img round-3" :src="uni_halo_logo" mode="aspectFill"></image></view>
|
||||
<view class="mt-12 text-weight-b text-size-lg" :class="{ 'mt-40 pt-40': !uni_halo_logo }">uni-halo</view>
|
||||
<view class="logo mt-40 pt-40">
|
||||
<image class="logo-img round-3" src="https://uni-halo.925i.cn/logo.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="mt-12 text-weight-b text-size-lg">uni-halo</view>
|
||||
<view class="mt-12 text-size-s text-grey-darken-3"></view>
|
||||
<view class="list-group mt-48" style="width: 100%;">
|
||||
<tm-grouplist :shadow="0" :margin="0" :borderBottom="true">
|
||||
@@ -17,10 +19,12 @@
|
||||
<tm-listitem title="文档地址" :font-size="28" @click="$utils.copyText('https://uni-halo.925i.cn', '项目码云仓库已复制')">
|
||||
<text class="text-size-s text-overflow" slot="rightValue">https://uni-halo.925i.cn</text>
|
||||
</tm-listitem>
|
||||
<tm-listitem title="码云仓库" :font-size="28" @click="$utils.copyText('https://gitee.com/ialley-workshop-open/uni-halo', '码云仓库地址已复制')">
|
||||
<tm-listitem title="码云仓库" :font-size="28"
|
||||
@click="$utils.copyText('https://gitee.com/ialley-workshop-open/uni-halo', '码云仓库地址已复制')">
|
||||
<text class="text-size-s text-overflow" slot="rightValue">https://gitee.com/ialley-workshop-open/uni-halo</text>
|
||||
</tm-listitem>
|
||||
<tm-listitem title="Github" :font-size="28" @click="$utils.copyText('https://github.com/ialley-workshop-open/uni-halo', 'Github地址已复制')">
|
||||
<tm-listitem title="Github" :font-size="28"
|
||||
@click="$utils.copyText('https://github.com/ialley-workshop-open/uni-halo', 'Github地址已复制')">
|
||||
<text class="text-size-s text-overflow" slot="rightValue">https://github.com/ialley-workshop-open/uni-halo</text>
|
||||
</tm-listitem>
|
||||
</tm-grouplist>
|
||||
@@ -35,16 +39,12 @@
|
||||
<script>
|
||||
import tmGrouplist from '@/tm-vuetify/components/tm-grouplist/tm-grouplist.vue';
|
||||
import tmListitem from '@/tm-vuetify/components/tm-listitem/tm-listitem.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tmGrouplist,
|
||||
tmListitem
|
||||
},
|
||||
computed: {
|
||||
uni_halo_logo() {
|
||||
return getApp().globalData.uni_halo_logo;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnSetPageTitle('关于项目');
|
||||
},
|
||||
@@ -58,14 +58,17 @@ export default {
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
|
||||
.logo-img {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
.info {
|
||||
margin-left: 90rpx;
|
||||
margin-right: 90rpx;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
width: 100vw;
|
||||
position: fixed;
|
||||
@@ -79,10 +82,12 @@ export default {
|
||||
min-width: 140rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
width: calc(100vw - 300rpx);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.list-group {
|
||||
::v-deep {
|
||||
.left {
|
||||
|
||||
@@ -54,6 +54,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
adConfigs() {
|
||||
return this.$tm.vx.getters().getConfigs.adConfig;
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.hideShareMenu();
|
||||
@@ -71,7 +76,7 @@ export default {
|
||||
adLoad() {
|
||||
if (wx.createRewardedVideoAd) {
|
||||
videoAd = wx.createRewardedVideoAd({
|
||||
adUnitId: this.$haloAdConfig.rewardedVideoAd //你的广告key
|
||||
adUnitId: this.adConfigs.rewardedVideoAdId //你的广告key
|
||||
})
|
||||
videoAd.onError(err => {
|
||||
})
|
||||
@@ -86,7 +91,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openVideoAd: function () {
|
||||
if (videoAd && this.$haloAdConfig.rewardedVideoAd != '') {
|
||||
if (videoAd && this.adConfigs.rewardedVideoAdId != '') {
|
||||
videoAd.show().catch(err => {
|
||||
// 失败重试
|
||||
console.log("广告拉取失败")
|
||||
@@ -138,7 +143,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<view class="app-page">
|
||||
<view class="e-fixed"><tm-tabs color="light-blue" v-model="tab.activeIndex" :list="tab.list" align="center" @change="fnOnTabChange"></tm-tabs></view>
|
||||
<view class="e-fixed">
|
||||
<tm-tabs color="light-blue" v-model="tab.activeIndex" :list="tab.list" align="center" @change="fnOnTabChange"></tm-tabs>
|
||||
</view>
|
||||
<!-- 占位区域 -->
|
||||
<view style="width: 100vw;height: 90rpx;"></view>
|
||||
|
||||
@@ -13,13 +15,18 @@
|
||||
|
||||
<!-- 加载完成区域 -->
|
||||
<block v-else>
|
||||
<view v-if="dataList.length == 0" class="list-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无归档的文章"></tm-empty></view>
|
||||
<view v-if="dataList.length == 0" class="list-empty flex flex-center">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无归档的文章"></tm-empty>
|
||||
</view>
|
||||
<view v-else class="e-timeline tm-timeline mt-24">
|
||||
<block v-for="(item, index) in dataList" :key="index">
|
||||
<view class="tm-timeline-item tm-timeline-item--leftDir">
|
||||
<view style="width: 160rpx;">
|
||||
<view :style="{ width: '24rpx', height: '24rpx' }" :class="[black_tmeme ? 'bk' : '']" class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4"></view>
|
||||
<view :style="{ marginTop: '-24rpx' }" :class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']" class="grey-lighten-2"></view>
|
||||
<view :style="{ width: '24rpx', height: '24rpx' }" :class="[black_tmeme ? 'bk' : '']"
|
||||
class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4"></view>
|
||||
<view :style="{ marginTop: '-24rpx' }"
|
||||
:class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']"
|
||||
class="grey-lighten-2"></view>
|
||||
</view>
|
||||
<view class="tm-timeline-item-content relative">
|
||||
<view class="tm-timeline-item-left">
|
||||
@@ -31,11 +38,15 @@
|
||||
<block v-if="item.posts.length != 0">
|
||||
<block v-for="(post, postIndex) in item.posts" :key="post.id">
|
||||
<tm-translate animation-name="fadeUp" :wait="calcAniWait(postIndex)">
|
||||
<view class="flex post shadow-3 pa-24 mb-24" :class="[globalAppSettings.layout.cardType]" @click="fnToArticleDetail(post)">
|
||||
<image class="post-thumbnail" :src="$utils.checkThumbnailUrl(post.thumbnail)" mode="aspectFill"></image>
|
||||
<view class="flex post shadow-3 pa-24 mb-24" :class="[globalAppSettings.layout.cardType]"
|
||||
@click="fnToArticleDetail(post)">
|
||||
<image class="post-thumbnail" :src="$utils.checkThumbnailUrl(post.thumbnail)"
|
||||
mode="aspectFill"></image>
|
||||
<view class="post-info pl-20">
|
||||
<view class="post-info_title text-overflow">{{ post.title }}</view>
|
||||
<view class="post-info_summary text-overflow-2 mt-12 text-size-s text-grey-darken-1">{{ post.summary }}</view>
|
||||
<view class="post-info_summary text-overflow-2 mt-12 text-size-s text-grey-darken-1">
|
||||
{{ post.summary }}
|
||||
</view>
|
||||
<view class="post-info_time mt-12 text-size-s text-grey-darken-1">
|
||||
<text class="iconfont icon-clock text-size-s mr-6"></text>
|
||||
<text class="time-label">发布时间:</text>
|
||||
@@ -245,7 +256,8 @@
|
||||
border-radius: 12rpx;
|
||||
background-color: #fff;
|
||||
|
||||
&.lr_image_text {}
|
||||
&.lr_image_text {
|
||||
}
|
||||
|
||||
&.lr_text_image {
|
||||
.post-thumbnail {
|
||||
|
||||
@@ -65,12 +65,10 @@
|
||||
<view v-if="originalURL" class="mt-18 category-type original-url">
|
||||
<view class="original-url_left text-weight-b">原文:</view>
|
||||
<view class="original-url_right text-grey">
|
||||
<text class="original-url_right__link"
|
||||
@click.stop="fnToOriginal(originalURL)">{{ originalURL }}
|
||||
<text class="original-url_right__link" @click.stop="fnToOriginal(originalURL)">{{ originalURL }}
|
||||
</text>
|
||||
<text class="original-url_right__btn" @click.stop="fnToOriginal(originalURL)">阅读原文
|
||||
<text
|
||||
class="iconfont icon-angle-right ml-5 text-size-s"></text>
|
||||
<text class="iconfont icon-angle-right ml-5 text-size-s"></text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -82,8 +80,8 @@
|
||||
<mp-html class="evan-markdown" lazy-load :domain="markdownConfig.domain"
|
||||
: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"/>
|
||||
:content="result.content.raw" :markdown="true" :showLineNumber="true" :showLanguageName="true"
|
||||
:copyByLongPress="true"/>
|
||||
<tm-more v-if="showValidVisitMore" :disabled="true" :maxHeight="1" :isRemovBar="true"
|
||||
@click="showValidVisitMorePop()">
|
||||
<view class="text-size-n pa-24">
|
||||
@@ -97,44 +95,32 @@
|
||||
</template>
|
||||
</tm-more>
|
||||
</view>
|
||||
<!-- 广告区域:自定义广告位 -->
|
||||
<view class="ad-card mt-24" v-if="haloAdConfig.articleDetail.use">
|
||||
<text class="ad-card_tip">广告</text>
|
||||
<image class="ad-card_cover" :src="haloAdConfig.articleDetail.cover" mode="scaleToFill">
|
||||
</image>
|
||||
<view class="ad-card_info">
|
||||
<view class="ad-card_info-title">{{ haloAdConfig.articleDetail.title }}</view>
|
||||
<view class="ad-card_info-desc">{{ haloAdConfig.articleDetail.content }}</view>
|
||||
<view v-if="haloAdConfig.articleDetail.url" class="ad-card_info-link"
|
||||
@click="fnToWebview(haloAdConfig.articleDetail)">
|
||||
立即查看
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 版权声明 -->
|
||||
<view v-if="copyright.use" class="copyright-wrap bg-white mt-24 pa-24 round-4">
|
||||
<view v-if="postDetailConfig && postDetailConfig.copyrightEnabled" class="copyright-wrap bg-white mt-24 pa-24 round-4">
|
||||
<view class="copyright-title text-weight-b">版权声明</view>
|
||||
<view
|
||||
class="copyright-content mt-12 grey-lighten-5 text-grey-darken-2 round-4 pt-12 pb-12 pl-24 pr-24 ">
|
||||
<view v-if="copyright.author" class="copyright-text text-size-s ">
|
||||
版权归属:{{ copyright.author }}
|
||||
<view v-if="postDetailConfig.copyrightAuthor" class="copyright-text text-size-s ">
|
||||
版权归属:{{ postDetailConfig.copyrightAuthor }}
|
||||
</view>
|
||||
<view v-if="copyright.description" class="copyright-text text-size-s mt-12">
|
||||
版权说明:{{ copyright.description }}
|
||||
<view v-if="postDetailConfig.copyrightDesc" class="copyright-text text-size-s mt-12">
|
||||
版权说明:{{ postDetailConfig.copyrightDesc }}
|
||||
</view>
|
||||
<view v-if="copyright.violation" class="copyright-text text-size-s mt-12 text-red">
|
||||
侵权处理:{{ copyright.violation }}
|
||||
<view v-if="postDetailConfig.copyrightViolation" class="copyright-text text-size-s mt-12 text-red">
|
||||
侵权处理:{{ postDetailConfig.copyrightViolation }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 评论展示区域 -->
|
||||
<block v-if="postDetailConfig && postDetailConfig.showComment">
|
||||
<view v-if="result" class="comment-wrap bg-white mt-24 pa-24 round-4">
|
||||
<commentList :disallowComment="!result.spec.allowComment" :postName="result.metadata.name"
|
||||
:post="result" @on-comment-detail="fnOnShowCommentDetail" @on-loaded="fnOnCommentLoaded">
|
||||
</commentList>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 弹幕效果 -->
|
||||
@@ -238,9 +224,7 @@ import commentItem from '@/components/comment-item/comment-item.vue';
|
||||
import rCanvas from '@/components/r-canvas/r-canvas.vue';
|
||||
import barrage from '@/components/barrage/barrage.vue';
|
||||
|
||||
import {
|
||||
haloWxShareMixin
|
||||
} from '@/common/mixins/wxshare.mixin.js';
|
||||
import {haloWxShareMixin} from '@/common/mixins/wxshare.mixin.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -311,8 +295,11 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
copyright() {
|
||||
return getApp().globalData.copyright;
|
||||
haloConfigs() {
|
||||
return this.$tm.vx.getters().getConfigs;
|
||||
},
|
||||
postDetailConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.postDetailConfig;
|
||||
},
|
||||
calcUrl() {
|
||||
return url => {
|
||||
@@ -324,10 +311,11 @@ export default {
|
||||
},
|
||||
// 获取博主信息
|
||||
bloggerInfo() {
|
||||
let blogger = this.$tm.vx.getters().getBlogger;
|
||||
let blogger = this.$tm.vx.getters().getConfigs.authorConfig.blogger;
|
||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||
return blogger;
|
||||
},
|
||||
|
||||
// 原文链接:个人资质=可以打开公众号文章;非个人:任意链接地址(需在小程序后台配置)
|
||||
originalURL() {
|
||||
if ('unihalo_originalURL' in this.result?.metadata?.annotations) {
|
||||
@@ -357,14 +345,15 @@ export default {
|
||||
this.result = res;
|
||||
|
||||
const openid = uni.getStorageSync('openid');
|
||||
if (openid == '' || openid == null) {
|
||||
if (openid === '' || openid === null) {
|
||||
this.fnGetOpenid();
|
||||
}
|
||||
const visitFlag = uni.getStorageSync('visit_' + this.result?.metadata?.name);
|
||||
|
||||
if (!visitFlag) {
|
||||
const annotationsMap = res?.metadata?.annotations;
|
||||
if (('restrictReadEnable' in annotationsMap) && annotationsMap.restrictReadEnable === 'true') {
|
||||
if (('restrictReadEnable' in annotationsMap) && annotationsMap.restrictReadEnable ===
|
||||
'true') {
|
||||
this.visitType = 1;
|
||||
this.showValidVisitMorePop();
|
||||
} else if ('unihalo_useVisitMorePwd' in annotationsMap) {
|
||||
@@ -375,7 +364,8 @@ export default {
|
||||
this.visitType = 3;
|
||||
this.visitPwd = annotationsMap.unihalo_useVisitPwd;
|
||||
this.showValidVisitPop();
|
||||
} else if (('restrictReadEnable' in annotationsMap) && annotationsMap.restrictReadEnable === 'password') {
|
||||
} else if (('restrictReadEnable' in annotationsMap) && annotationsMap
|
||||
.restrictReadEnable === 'password') {
|
||||
this.visitType = 4;
|
||||
this.showValidVisitPop();
|
||||
} else {
|
||||
@@ -425,6 +415,9 @@ export default {
|
||||
},
|
||||
|
||||
fnToComment() {
|
||||
if (!this.haloConfig.basicConfig.postDetailConfig.showComment) {
|
||||
return;
|
||||
}
|
||||
if (!this.result.spec.allowComment) {
|
||||
return uni.$tm.toast('文章已开启禁止评论!');
|
||||
}
|
||||
@@ -615,7 +608,7 @@ export default {
|
||||
// 小程序信息
|
||||
await this.$refs.rCanvas
|
||||
.drawImage({
|
||||
url: this.$haloConfig.miniCodeImageUrl,
|
||||
url: this.haloConfig.imagesConfig.miniCodeImageUrl,
|
||||
x: 20,
|
||||
y: 360,
|
||||
w: 80,
|
||||
@@ -681,23 +674,6 @@ export default {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.$tm.toast('点击右上角分享给好友!');
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneSession',
|
||||
type: 0,
|
||||
href: this.$baseApiUrl,
|
||||
title: this.result.spec.title,
|
||||
summary: this.result.content.raw,
|
||||
imageUrl: this.poster.res.tempFilePath,
|
||||
success: function (res) {
|
||||
console.log('success:' + JSON.stringify(res));
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log('fail:' + JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
fnOnShowCommentDetail(data) {
|
||||
const {
|
||||
@@ -723,7 +699,7 @@ export default {
|
||||
this.commentDetail.list = res.items;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('getPostChildrenCommentList err', error);
|
||||
console.log('getPostChildrenCommentList err', err);
|
||||
this.commentDetail.loading = 'error';
|
||||
});
|
||||
},
|
||||
@@ -742,12 +718,12 @@ export default {
|
||||
const _list = [];
|
||||
const _handleData = list => {
|
||||
return new Promise(resolve => {
|
||||
if (list.length == 0) {
|
||||
if (list.length === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
list.forEach(item => {
|
||||
_list.push(item);
|
||||
if (item.replies && item.replies.length != 0) {
|
||||
if (item.replies && item.replies.length !== 0) {
|
||||
_handleData(item.replies.items);
|
||||
}
|
||||
resolve();
|
||||
@@ -833,6 +809,7 @@ export default {
|
||||
},
|
||||
// 获取openid
|
||||
fnGetOpenid() {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: function (loginRes) {
|
||||
@@ -844,6 +821,7 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
// 隐藏内容
|
||||
fnHideContent() {
|
||||
@@ -872,7 +850,8 @@ export default {
|
||||
case 0:
|
||||
return;
|
||||
case 1:
|
||||
this.$httpApi.v2.checkPostVerifyCode(this.validVisitModal.value, this.result?.metadata?.name).then(res => {
|
||||
this.$httpApi.v2.checkPostVerifyCode(this.validVisitModal.value, this.result?.metadata?.name).then(
|
||||
res => {
|
||||
if (res.code === 200) {
|
||||
uni.setStorageSync('visit_' + this.result?.metadata?.name, true)
|
||||
this.closeAllPop();
|
||||
@@ -901,7 +880,8 @@ export default {
|
||||
}
|
||||
return;
|
||||
case 4:
|
||||
this.$httpApi.v2.checkPostPasswordAccess(this.validVisitModal.value, this.result?.metadata?.name).then(res => {
|
||||
this.$httpApi.v2.checkPostPasswordAccess(this.validVisitModal.value, this.result?.metadata?.name)
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.setStorageSync('visit_' + this.result?.metadata?.name, true)
|
||||
this.closeAllPop();
|
||||
|
||||
@@ -7,13 +7,17 @@
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="empty" v-if="dataList.length == 0"><tm-empty icon="icon-shiliangzhinengduixiang-"
|
||||
label="该分类下暂无文章"></tm-empty></view>
|
||||
<view class="empty" v-if="dataList.length == 0">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-"
|
||||
label="该分类下暂无文章"></tm-empty>
|
||||
</view>
|
||||
<block v-else>
|
||||
<block v-for="(article, index) in dataList" :key="article.createTime">
|
||||
<!-- 文章卡片 -->
|
||||
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)"><article-card :article="article"
|
||||
@on-click="fnToArticleDetail"></article-card></tm-translate>
|
||||
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||
<article-card :article="article"
|
||||
@on-click="fnToArticleDetail"></article-card>
|
||||
</tm-translate>
|
||||
</block>
|
||||
<view class="load-text">{{ loadMoreText }}</view>
|
||||
</block>
|
||||
@@ -29,6 +33,7 @@
|
||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
import ArticleCard from '@/components/article-card/article-card.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tmSkeleton,
|
||||
|
||||
@@ -14,8 +14,11 @@
|
||||
v-model="form.email"></tm-input>
|
||||
<tm-input name="authorUrl" align="right" required title="我的网站" placeholder="请输入您的网址..."
|
||||
v-model="form.authorUrl"></tm-input>
|
||||
<view class="pa-24 pl-30 pr-30"><tm-button navtie-type="form" theme="bg-gradient-blue-accent"
|
||||
block>提交</tm-button></view>
|
||||
<view class="pa-24 pl-30 pr-30">
|
||||
<tm-button navtie-type="form" theme="bg-gradient-blue-accent"
|
||||
block>提交
|
||||
</tm-button>
|
||||
</view>
|
||||
</tm-form>
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,7 +78,8 @@
|
||||
this.form.email = visitor.email;
|
||||
this.form.authorUrl = visitor.authorUrl;
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fnOnSubmit(e) {
|
||||
|
||||
+35
-22
@@ -2,7 +2,9 @@
|
||||
<view class="app-page flex flex-col felx-center bg-white">
|
||||
<!-- 信息 -->
|
||||
<view class="profile flex flex-col flex-center pa-36">
|
||||
<view class="avatar"><image class="avatar-img" :src="bloggerInfo.avatar" mode="aspectFill"></image></view>
|
||||
<view class="avatar">
|
||||
<image class="avatar-img" :src="bloggerInfo.avatar" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="nickname mt-24 text-weight-b text-size-g">{{ bloggerInfo.nickname }}</view>
|
||||
<view class="desc mt-24 text-size-m text-grey-darken-3">
|
||||
{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}
|
||||
@@ -20,13 +22,11 @@
|
||||
<text class="ml-12 halocoloricon halocoloricon-gitee"></text>
|
||||
<text class="ml-12 halocoloricon halocoloricon-ic_email_round"></text>
|
||||
</view>
|
||||
<view v-if="false" class="mt-24 ">
|
||||
<tm-button theme="bg-gradient-light-blue-accent" size="m" openType="contact">在线客服联系</tm-button>
|
||||
<tm-button theme="bg-gradient-orange-accent" size="m" @click="fnOnToWeb">访问PC端博客</tm-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 社交联系方式列表 -->
|
||||
<view class="contact ma-50 mt-0 pt-12">
|
||||
<block v-if="calcIsNotEmpty">
|
||||
|
||||
<block v-for="(item, index) in result" :key="index">
|
||||
<view v-if="item.value" class="item mt-24 flex" @click="fnOnClick(item)">
|
||||
<view class="left">
|
||||
@@ -36,6 +36,10 @@
|
||||
<view class="right flex-1">{{ item.value }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<view v-else class="mt-12 pt-12">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无联系方式"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -43,11 +47,13 @@
|
||||
<script>
|
||||
import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
|
||||
import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tmSkeleton,
|
||||
tmButton
|
||||
tmButton,
|
||||
tmEmpty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -122,11 +128,19 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 获取博主信息
|
||||
authorConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.authorConfig;
|
||||
},
|
||||
bloggerInfo() {
|
||||
let blogger = this.$tm.vx.getters().getBlogger;
|
||||
let blogger = this.authorConfig.blogger;
|
||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||
return blogger;
|
||||
},
|
||||
socialConfig() {
|
||||
return this.authorConfig.social
|
||||
},
|
||||
calcIsNotEmpty() {
|
||||
return this.result.some((item) => item.value !== "");
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -137,25 +151,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
fnGetData() {
|
||||
for (let key in this.$haloConfig.social) {
|
||||
this.result.find(x => x.key == key).value = this.$haloConfig.social[key];
|
||||
for (let key in this.socialConfig) {
|
||||
this.result.find(x => x.key === key).value = this.socialConfig[key];
|
||||
}
|
||||
},
|
||||
fnOnToWeb() {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pagesC/website/website?data=' +
|
||||
JSON.stringify({
|
||||
title: this.$haloConfig.title,
|
||||
url: this.$haloConfig.social.blog
|
||||
})
|
||||
});
|
||||
},
|
||||
fnOnClick(item) {
|
||||
if (this.globalAppSettings.contact.isLinkCopy && this.$utils.checkIsUrl(item.value)) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pagesC/website/website?data=' +
|
||||
url: '/pagesC/website/website?data=' +
|
||||
JSON.stringify({
|
||||
title: item.name,
|
||||
url: item.value
|
||||
@@ -176,6 +179,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
padding-top: 160rpx;
|
||||
}
|
||||
|
||||
.profile {
|
||||
.avatar {
|
||||
width: 170rpx;
|
||||
@@ -186,20 +190,24 @@ export default {
|
||||
border: 6rpx solid #fff;
|
||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.07);
|
||||
overflow: hidden;
|
||||
|
||||
&-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.nickname {
|
||||
font-size: 38rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.contact-icons {
|
||||
.halocoloricon {
|
||||
font-size: 42rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.contact {
|
||||
box-sizing: border-box;
|
||||
border-top: 2rpx solid #f2f2f2;
|
||||
@@ -212,6 +220,7 @@ export default {
|
||||
// padding-bottom: 12rpx;
|
||||
// border-bottom: 2rpx solid #eee;
|
||||
padding: 16rpx;
|
||||
|
||||
.left {
|
||||
position: relative;
|
||||
width: 140rpx;
|
||||
@@ -220,6 +229,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
// background-color: rgba(0, 0, 0, 0.03);
|
||||
border-radius: 12rpx 0 0 12rpx;
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
content: ':';
|
||||
@@ -230,15 +240,18 @@ export default {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
margin-left: 10rpx;
|
||||
color: #555;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 0;
|
||||
display: flex;
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<view class="app-page bg-white round-3 pa-46">
|
||||
<!-- 通过配置 -->
|
||||
<view style="min-height: 100%;" v-html="disclaimersContent"></view>
|
||||
|
||||
<!-- 静态写法 -->
|
||||
<block v-if="false">
|
||||
<view class="text-weight-b text-size-lg text-align-center">《 本博客免责声明 》</view>
|
||||
<view v-if="false" class="text-size-s text-align-center mt-12 text-grey-darken-1">—— 博主:{{ bloggerInfo.nickname }} ——</view>
|
||||
<view class="mt-32">1、本博客属于个人非赢利性质的网站,所有转载的文章都以遵循原作者的版权声明注明了文章来源。</view>
|
||||
@@ -7,27 +12,31 @@
|
||||
<view class="mt-24">3、如果原文明确注明“禁止转载”,本博客将不会转载。</view>
|
||||
<view class="mt-24">
|
||||
4、如果本博客转载的文章不符合作者的版权声明或者作者不想让本博客转载您的文章,请邮件告知
|
||||
<text class="text-bg-gradient-light-blue-accent ml-12 mr-12 " @click="$utils.copyText(bloggerInfo.email, '邮箱复制成功!')">
|
||||
<text class="text-bg-gradient-light-blue-accent ml-12 mr-12 ">
|
||||
<text class="iconfont icon-mail-fill text-size-m mr-6"></text>
|
||||
{{ bloggerInfo.email }}
|
||||
studio@925i.cn
|
||||
</text>
|
||||
,博主将会在第一时间删除相关信息!
|
||||
</view>
|
||||
<view class="mt-24">5、本博客转载文章仅为留作备份和知识点分享的目的。</view>
|
||||
<view class="mt-24">6、本博客将尽力确保所提供信息的准确性及可靠性,但不保证信息的正确性和完整性,且不对因信息的不正确或遗漏导致的任何损失或损害承担相关责任。</view>
|
||||
<view class="mt-24">
|
||||
6、本博客将尽力确保所提供信息的准确性及可靠性,但不保证信息的正确性和完整性,且不对因信息的不正确或遗漏导致的任何损失或损害承担相关责任。
|
||||
</view>
|
||||
<view class="mt-24">
|
||||
7、本博客所发布、转载的文章,其版权均归原作者所有。如其他自媒体、网站或个人从本博客下载使用,请在转载有关文章时务必尊重该文章的著作权,保留本博客注明的“原文来源”或者自行去原文处复制版权声明,并自负版权等法律责任。
|
||||
</view>
|
||||
<view class="mt-24">8、本博客的所有原创文章皆可以任意转载,但转载时务必请注明出处。</view>
|
||||
<view class="mt-24">9、尊重原创,知识共享!</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
bloggerInfo() {
|
||||
return this.$tm.vx.getters().getBlogger;
|
||||
disclaimersContent() {
|
||||
const configs = this.$tm.vx.getters().getAppConfigs;
|
||||
return configs.basicConfig.disclaimers.content
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
</view>
|
||||
<view class="flex flex-col pl-30 info-detail">
|
||||
<view class="link-card_name text-size-l text-weight-b text-red">
|
||||
<tm-tags style="margin-right: 12rpx;margin-left: -2rpx;" color="bg-gradient-light-blue-lighten"
|
||||
:shadow="0" size="s" model="fill">
|
||||
<tm-tags style="margin-right: 12rpx;margin-left: -2rpx;"
|
||||
color="bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">
|
||||
{{ link.spec.groupName || '暂未分组' }}
|
||||
</tm-tags>
|
||||
{{ link.spec.displayName }}
|
||||
@@ -120,7 +120,8 @@
|
||||
|
||||
<!-- 返回顶部 -->
|
||||
<tm-flotbutton color="light-blue" @click="fnToTopPage" size="m" icon="icon-angle-up"></tm-flotbutton>
|
||||
<tm-flotbutton v-if="haloPluginsConfig.autoSubmitLink.enabled" :offset="[16,80]" label="申请" actions-pos="left" :show-text="true" color="bg-gradient-orange-accent"
|
||||
<tm-flotbutton v-if="haloPluginConfigs.submitLink.enabled" :offset="[16,80]" label="申请"
|
||||
actions-pos="left" :show-text="true" color="bg-gradient-orange-accent"
|
||||
@click="toSubmitLinkPage"></tm-flotbutton>
|
||||
<!-- 详情弹窗 -->
|
||||
<tm-poup v-model="detail.show" :width="640" height="auto" position="center" :round="6">
|
||||
@@ -152,7 +153,7 @@
|
||||
|
||||
<!-- 博客预览图 -->
|
||||
<view class="mt-24">
|
||||
<tm-images :width="568" :round="2" :src="caclSiteThumbnail(detail.data.url)"
|
||||
<tm-images :width="568" :round="2" :src="calcSiteThumbnail(detail.data.url)"
|
||||
mode="aspectFill"></tm-images>
|
||||
</view>
|
||||
</view>
|
||||
@@ -172,7 +173,6 @@ import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
import tmImages from '@/tm-vuetify/components/tm-images/tm-images.vue';
|
||||
import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
|
||||
|
||||
|
||||
import {GetRandomNumberByRange} from '@/utils/random.js';
|
||||
|
||||
export default {
|
||||
@@ -200,14 +200,25 @@ export default {
|
||||
isLoadMore: false,
|
||||
loadMoreText: '',
|
||||
dataList: [],
|
||||
cacheDataList: []
|
||||
cacheDataList: [],
|
||||
colors: [
|
||||
'#39B449',
|
||||
'#E44C41',
|
||||
'#8698A2',
|
||||
'#0080FE',
|
||||
'#1CBCB4',
|
||||
'#6638B5'
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
caclSiteThumbnail(val) {
|
||||
haloPluginConfigs(){
|
||||
return this.$tm.vx.getters().getConfigs.pluginConfig;
|
||||
},
|
||||
calcSiteThumbnail(val) {
|
||||
return val => {
|
||||
if (!val) return '';
|
||||
if (val.charAt(val.length - 1) != '/') {
|
||||
if (val.charAt(val.length - 1) !== '/') {
|
||||
val = val + '/';
|
||||
}
|
||||
return 'https://image.thum.io/get/width/1000/crop/800/' + val;
|
||||
@@ -239,8 +250,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
fnRandomColor() {
|
||||
const _r = GetRandomNumberByRange(0, this.$haloConfig.colors.length - 1);
|
||||
return this.$haloConfig.colors[_r];
|
||||
const _r = GetRandomNumberByRange(0, this.colors.length - 1);
|
||||
return this.colors[_r];
|
||||
},
|
||||
fnGetData() {
|
||||
if (!this.isLoadMore) {
|
||||
@@ -259,9 +270,6 @@ export default {
|
||||
return item;
|
||||
})
|
||||
this.dataList = this.dataList.concat(list);
|
||||
|
||||
// this.cacheDataList = this.cacheDataList.concat(list);
|
||||
// this.dataList = this.handleGroup(this.cacheDataList).reverse();
|
||||
setTimeout(() => {
|
||||
this.loading = 'success';
|
||||
this.loadMoreText = res.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';
|
||||
|
||||
@@ -125,9 +125,11 @@
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.loading-wrap {}
|
||||
.loading-wrap {
|
||||
}
|
||||
|
||||
.app-page-content {}
|
||||
.app-page-content {
|
||||
}
|
||||
|
||||
.content-empty {
|
||||
height: 60vh;
|
||||
|
||||
+73
-66
@@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<view class="app-page">
|
||||
<view v-if="loading != 'success'" class="loading-wrap">
|
||||
<view v-if="loading == 'loading'" class="loading">
|
||||
<view class="loading-icon flex flex-center"><text class="e-loading-icon iconfont icon-loading"></text></view>
|
||||
<view v-if="loading !== 'success'" class="loading-wrap">
|
||||
<view v-if="loading === 'loading'" class="loading">
|
||||
<view class="loading-icon flex flex-center">
|
||||
<text class="e-loading-icon iconfont icon-loading"></text>
|
||||
</view>
|
||||
<view class="loadig-text ">相册正在努力加载中啦~</view>
|
||||
</view>
|
||||
<tm-empty v-else icon="icon-shiliangzhinengduixiang-" color="red" label="啊偶,加载失败了呢~">
|
||||
@@ -11,37 +13,23 @@
|
||||
</view>
|
||||
<!-- 内容区域 -->
|
||||
<view v-else class="app-page-content">
|
||||
<view v-if="dataList.length == 0" color="light-blue" class="content-empty flex flex-center">
|
||||
<view v-if="dataList.length === 0" color="light-blue" class="content-empty flex flex-center">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="相册暂时还没有数据~">
|
||||
<tm-button :shadow="0" size="m" theme="light-blue" @click="fnRefresh()">刷新试试</tm-button>
|
||||
</tm-empty>
|
||||
</view>
|
||||
<block v-else>
|
||||
<swiper
|
||||
class="swiper-album"
|
||||
:current="swiperIndex"
|
||||
:acceleration="true"
|
||||
:circular="true"
|
||||
:vertical="false"
|
||||
:indicator-dots="false"
|
||||
:autoplay="false"
|
||||
@change="fnOnChange"
|
||||
>
|
||||
<swiper class="swiper-album" :current="swiperIndex" :acceleration="true" :circular="true"
|
||||
:vertical="false" :indicator-dots="false" :autoplay="false" @change="fnOnChange">
|
||||
<block v-for="(item, index) in dataList" :key="index">
|
||||
<swiper-item class="swiper-album-item">
|
||||
<view class="scroll-wrap">
|
||||
<view class="card">
|
||||
<cache-image
|
||||
class="card-image"
|
||||
width="100%"
|
||||
height="46vh"
|
||||
radius="12rpx"
|
||||
:url="item.image"
|
||||
:fileMd5="item.image"
|
||||
mode="aspectFill"
|
||||
@on-click="fnOnPreview(item)"
|
||||
></cache-image>
|
||||
<view v-if="item.description" class="card-desc">{{ item.description }}</view>
|
||||
<cache-image class="card-image" width="100%" height="46vh" radius="12rpx"
|
||||
:url="item.image" :fileMd5="item.image" mode="aspectFill"
|
||||
@on-click="fnOnPreview(item)"></cache-image>
|
||||
<view v-if="item.spec.description" class="card-desc">{{ item.spec.description }}
|
||||
</view>
|
||||
<view v-else class="card-desc is-empty flex flex-col">
|
||||
<view class="text-grey-darken-1">该照片没有记录任何信息</view>
|
||||
<view class="text-size-m mt-24 text-grey-darken-1">记录一下拍照的瞬间,会更精彩哟</view>
|
||||
@@ -53,7 +41,9 @@
|
||||
</swiper>
|
||||
<view class="tabbar">
|
||||
<view class="pre" @click="fnChange(false)">
|
||||
<text class="icon"><text class="iconfont icon-arrow-left"></text></text>
|
||||
<text class="icon">
|
||||
<text class="iconfont icon-arrow-left"></text>
|
||||
</text>
|
||||
<text class="text">上一张</text>
|
||||
</view>
|
||||
<view class="refresh" @click="fnRefresh()">
|
||||
@@ -63,7 +53,9 @@
|
||||
</view>
|
||||
<view class="next" @click="fnChange(true)">
|
||||
<text class="text">下一张</text>
|
||||
<text class="icon"><text class="iconfont icon-arrow-right"></text></text>
|
||||
<text class="icon">
|
||||
<text class="iconfont icon-arrow-right"></text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -72,7 +64,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LoveConfig from '@/config/love.config.js';
|
||||
import throttle from '@/utils/throttle.js';
|
||||
import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
|
||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||
@@ -89,32 +80,37 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: 'loading',
|
||||
loveConfig: LoveConfig,
|
||||
queryParams: {
|
||||
size: 99,
|
||||
page: 0,
|
||||
sort: 'takeTime',
|
||||
team: LoveConfig.albumKeyName
|
||||
size: 100,
|
||||
page: 1,
|
||||
group: ""
|
||||
},
|
||||
result: {},
|
||||
dataList: [],
|
||||
cache: {
|
||||
dataList: [],
|
||||
total: 0
|
||||
},
|
||||
swiperIndex: 0,
|
||||
tabbar: {
|
||||
list: []
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
loveConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.loveConfig;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
loveConfig: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
this.fnGetData()
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnSetPageTitle('恋爱相册');
|
||||
},
|
||||
created() {
|
||||
this.fnGetData();
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.fnRefresh();
|
||||
},
|
||||
@@ -126,24 +122,20 @@ export default {
|
||||
},
|
||||
fnGetData() {
|
||||
this.loading = 'loading';
|
||||
this.$httpApi
|
||||
.getPhotoListByPage(this.queryParams)
|
||||
this.queryParams.group = this.loveConfig.lovePhoto.groupName
|
||||
console.log('this.loveConfig------------',this.loveConfig)
|
||||
this.$httpApi.v2
|
||||
.getPhotoListByGroupName(this.queryParams)
|
||||
.then(res => {
|
||||
if (res.status == 200) {
|
||||
console.log("相册 res", res)
|
||||
this.loading = 'success';
|
||||
if (res.data.content.length != 0) {
|
||||
const _list = res.data.content.map((item, index) => {
|
||||
item['image'] = this.$utils.checkImageUrl(item.thumbnail);
|
||||
item['takeTime'] = this.$tm.dayjs(item['takeTime']).format('DD/MM/YYYY');
|
||||
this.dataList = res.items.map((item, index) => {
|
||||
item['image'] = this.$utils.checkImageUrl(item.spec.cover);
|
||||
item['takeTime'] = this.$tm.dayjs(item.metadata.creationTimestamp).format(
|
||||
'DD/MM/YYYY');
|
||||
return item;
|
||||
});
|
||||
this.dataList = _list;
|
||||
this.swiperIndex = 0;
|
||||
}
|
||||
} else {
|
||||
this.loading = 'error';
|
||||
uni.$tm.toast('加载失败,请下拉刷新重试!');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
@@ -156,14 +148,7 @@ export default {
|
||||
}, 200);
|
||||
});
|
||||
},
|
||||
// 缓存数据
|
||||
fnCacheDataList(dataList) {
|
||||
if (this.queryParams.page == 0) {
|
||||
this.cache.dataList = dataList;
|
||||
} else {
|
||||
this.cache.dataList = [...this.cache.dataList, ...dataList];
|
||||
}
|
||||
},
|
||||
|
||||
fnOnPreview(item) {
|
||||
uni.previewImage({
|
||||
current: item.image,
|
||||
@@ -203,8 +188,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
padding: 24rpx 0;
|
||||
padding-bottom: 144rpx;
|
||||
background: linear-gradient(
|
||||
-135deg,
|
||||
background: linear-gradient(-135deg,
|
||||
rgba(247, 149, 51, 0.1),
|
||||
rgba(243, 112, 85, 0.1) 15%,
|
||||
rgba(239, 78, 123, 0.1) 30%,
|
||||
@@ -212,11 +196,12 @@ export default {
|
||||
rgba(80, 115, 184, 0.1) 58%,
|
||||
rgba(16, 152, 173, 0.1) 72%,
|
||||
rgba(7, 179, 155, 0.1) 86%,
|
||||
rgba(109, 186, 130, 0.1)
|
||||
);
|
||||
rgba(109, 186, 130, 0.1));
|
||||
}
|
||||
|
||||
.app-page-content {
|
||||
}
|
||||
|
||||
.loading-wrap {
|
||||
width: 100vw;
|
||||
height: 60vh;
|
||||
@@ -233,6 +218,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.e-loading-icon {
|
||||
font-size: 120rpx;
|
||||
// color: #f88ca2;
|
||||
@@ -245,6 +231,7 @@ export default {
|
||||
// color: #f88ca2;
|
||||
color: #56bbf9;
|
||||
}
|
||||
|
||||
.content-empty {
|
||||
width: 100%;
|
||||
height: 60vh;
|
||||
@@ -254,6 +241,7 @@ export default {
|
||||
width: 100vw;
|
||||
height: calc(100vh - 24rpx - 144rpx);
|
||||
}
|
||||
|
||||
.swiper-album-item {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
@@ -268,6 +256,7 @@ export default {
|
||||
padding-bottom: 60rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.scroll-wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -277,6 +266,7 @@ export default {
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -290,21 +280,25 @@ export default {
|
||||
// box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
::v-deep {
|
||||
.cache-image {
|
||||
height: initial !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 100%;
|
||||
height: initial !important;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
&-desc {
|
||||
margin-top: 24rpx;
|
||||
line-height: 1.6;
|
||||
font-size: 30rpx;
|
||||
color: rgba(26, 26, 26, 0.9);
|
||||
|
||||
&.is-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -314,6 +308,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabbar {
|
||||
width: 90vw;
|
||||
position: fixed;
|
||||
@@ -330,46 +325,58 @@ export default {
|
||||
background-color: #ffffff;
|
||||
color: #333;
|
||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.refresh {
|
||||
animation: refreshAni 6s ease-in-out infinite;
|
||||
color: #56bbf9;
|
||||
|
||||
&-heart {
|
||||
font-size: 42rpx;
|
||||
color: inherit;
|
||||
margin: 0 6rpx;
|
||||
}
|
||||
|
||||
&-text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pre {
|
||||
color: #56bbf9;
|
||||
transition: transform 0.1s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.text {
|
||||
padding-left: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.next {
|
||||
color: #f88ca2;
|
||||
transition: transform 0.1s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
.text {
|
||||
padding-right: 12rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes refreshAni {
|
||||
0% {
|
||||
color: #f88ca2;
|
||||
}
|
||||
|
||||
50% {
|
||||
color: #56bbf9;
|
||||
}
|
||||
|
||||
100% {
|
||||
color: #f88ca2;
|
||||
}
|
||||
|
||||
+22
-8
@@ -8,10 +8,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LoveConfig from '@/config/love.config.js';
|
||||
import ScrollBtn from '@/components/scroll-btn/scroll-btn.vue';
|
||||
|
||||
export default {
|
||||
components: { ScrollBtn },
|
||||
components: {
|
||||
ScrollBtn
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
scrollTop: 0,
|
||||
@@ -19,8 +21,20 @@ export default {
|
||||
timer: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
computed: {
|
||||
loveConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.loveConfig;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
loveConfig: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
if (!newVal) return;
|
||||
this.fnInit();
|
||||
}
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
@@ -31,7 +45,7 @@ export default {
|
||||
methods: {
|
||||
fnInit() {
|
||||
clearTimeout(this.timer);
|
||||
const _html = LoveConfig.journey;
|
||||
const _html = this.loveConfig.ourStory.content;
|
||||
let _index = 0;
|
||||
const _typing = () => {
|
||||
this.timer = setTimeout(() => {
|
||||
@@ -65,8 +79,7 @@ export default {
|
||||
/* #ifdef MP-WEIXIN */
|
||||
padding-top: 120rpx;
|
||||
/* #endif */
|
||||
background: linear-gradient(
|
||||
-45deg,
|
||||
background: linear-gradient(-45deg,
|
||||
rgba(247, 149, 51, 0.1),
|
||||
rgba(243, 112, 85, 0.1) 15%,
|
||||
rgba(239, 78, 123, 0.1) 30%,
|
||||
@@ -74,16 +87,17 @@ export default {
|
||||
rgba(80, 115, 184, 0.1) 58%,
|
||||
rgba(16, 152, 173, 0.1) 72%,
|
||||
rgba(7, 179, 155, 0.1) 86%,
|
||||
rgba(109, 186, 130, 0.1)
|
||||
);
|
||||
rgba(109, 186, 130, 0.1));
|
||||
color: rgba(26, 26, 26, 1);
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 42rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-shadow: 0rpx 4rpx 24rpx #bfe9ef;
|
||||
}
|
||||
|
||||
.html-typed {
|
||||
margin-top: 52rpx;
|
||||
line-height: 1.8;
|
||||
|
||||
+68
-59
@@ -2,7 +2,7 @@
|
||||
<view class="app-page" @touchstart="fnOnTouchstart" @touchend="fnOnTouchend" @touchcancel="fnOnTouchend">
|
||||
<view class="love-card" :class="{ ani: isDoAni }">
|
||||
<view class="head">
|
||||
<image class="avatar" :src="loveConfig.boy.avatar" mode="scaleToFill"></image>
|
||||
<image class="avatar" :src="$utils.checkAvatarUrl(loveConfig.loveInfo.boyAvatar)" mode="scaleToFill"></image>
|
||||
<view class="love-days">
|
||||
<view class="tip-text">相恋</view>
|
||||
<view class="number">
|
||||
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view class="tip-text">天</view>
|
||||
</view>
|
||||
<image class="avatar" :src="loveConfig.girl.avatar" mode="scaleToFill"></image>
|
||||
<image class="avatar" :src="$utils.checkAvatarUrl(loveConfig.loveInfo.girlAvatar)" mode="scaleToFill"></image>
|
||||
</view>
|
||||
<view class="foot">
|
||||
<view class="text" v-if="false">
|
||||
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
<view v-if="list.length == 0" class="list empty">
|
||||
<view class="card">
|
||||
<image class="empty-image" :src="loveConfig.loveImageUrl" mode="scaleToFill"></image>
|
||||
<image class="empty-image" :src="$utils.checkImageUrl(loveConfig.pageImages.heartImageUrl)" mode="scaleToFill"></image>
|
||||
<view class="empty-text">暂时还没有恋爱清单,快去制定你们的恋爱清单吧~</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -34,37 +34,25 @@
|
||||
<view class="card" :class="{ ani: isDoAni }" :style="{ '--delay': calcCardDelay(index) }">
|
||||
<view class="head">
|
||||
<view class="status">
|
||||
<view v-if="!item.finish" class="text">进行中</view>
|
||||
<view v-else class="text finish">已完成</view>
|
||||
<view v-if="item.status==='wait'" class="text">未开始</view>
|
||||
<view v-else-if="item.status==='doing'" class="text">进行中</view>
|
||||
<view v-else-if="item.status==='complete'" class="text finish">已完成</view>
|
||||
</view>
|
||||
<view class="title">
|
||||
<view class="title-name">{{ item.title }}</view>
|
||||
<view class="title-desc">{{ item.desc }}</view>
|
||||
</view>
|
||||
<view class="actions" @click="fnOnItemOpen(item)">
|
||||
<text class="icon">{{ item.open ? '-' : '+' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.open" class="body">
|
||||
<view class="desc">
|
||||
<view class="desc-label">开始时间:</view>
|
||||
<view class="desc-value">{{ item.detail.start || '暂无计划' }}</view>
|
||||
<view v-if="item.open && item.content" class="body">
|
||||
<view v-if="item.content" class="desc">
|
||||
<view class="desc-label">事件内容:</view>
|
||||
<view class="desc-value">{{ item.content || "-" }}</view>
|
||||
</view>
|
||||
<view class="desc" v-if="item.detail.desc">
|
||||
<view class="desc-label">事件描述:</view>
|
||||
<view class="desc-value">{{ item.detail.desc }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view v-if="item.status==='complete' && item.completeDate" class="desc">
|
||||
<view class="desc-label">完成时间:</view>
|
||||
<view class="desc-value">{{ item.detail.end || '未开始或正在进行中...' }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="desc-label">完成打卡:</view>
|
||||
<view class="desc-value">{{ item.detail.moment || '未开始或正在进行中...' }}</view>
|
||||
</view>
|
||||
<view class="desc" v-if="item.detail.other">
|
||||
<view class="desc-label">爱心备注:</view>
|
||||
<view class="desc-value">{{ item.detail.other }}</view>
|
||||
<view class="desc-value">{{ item.completeDate || '-' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,21 +63,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LoveConfig from '@/config/love.config.js';
|
||||
import ScrollBtn from '@/components/scroll-btn/scroll-btn.vue';
|
||||
|
||||
export default {
|
||||
components: { ScrollBtn },
|
||||
components: {
|
||||
ScrollBtn
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDoAni: true,
|
||||
scrollTop: 0,
|
||||
loveConfig: LoveConfig,
|
||||
list: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
loveConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.loveConfig;
|
||||
},
|
||||
calcLoveDays() {
|
||||
const formatStartDate = this.loveConfig.loveStartDate.replace(/-/g, '/');
|
||||
const formatStartDate = this.loveConfig.loveDate.replace(/-/g, '/');
|
||||
const start = new Date(formatStartDate),
|
||||
now = new Date();
|
||||
const T = now.getTime() - start.getTime();
|
||||
@@ -104,42 +96,25 @@ export default {
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
watch: {
|
||||
loveConfig: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal) {
|
||||
if (!newVal) return;
|
||||
this.fnGetList();
|
||||
}
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
methods: {
|
||||
fnGetList() {
|
||||
if (LoveConfig.loveList.useApi && LoveConfig.loveList.api) {
|
||||
uni.request({
|
||||
url: LoveConfig.loveList.api,
|
||||
header: {
|
||||
ContentType: 'application/json'
|
||||
},
|
||||
method: 'GET',
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
if (res.statusCode == 200 && res.data.status == 200) {
|
||||
this.list = res.data.data.map(item => {
|
||||
this.list = this.loveConfig.loveDaily.list.map(item => {
|
||||
item['open'] = false;
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
uni.$tm.toast('数据请求失败,请检查接口!');
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
uni.$tm.toast('数据请求失败,请检查接口!');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.list = LoveConfig.loveList.data.map(item => {
|
||||
item['open'] = false;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
},
|
||||
fnOnItemOpen(item) {
|
||||
item.open = !item.open;
|
||||
@@ -171,8 +146,7 @@ export default {
|
||||
padding-top: 180rpx;
|
||||
/* #endif */
|
||||
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
background: linear-gradient(135deg,
|
||||
rgba(247, 149, 51, 0.1),
|
||||
rgba(243, 112, 85, 0.1) 15%,
|
||||
rgba(239, 78, 123, 0.1) 30%,
|
||||
@@ -180,8 +154,7 @@ export default {
|
||||
rgba(80, 115, 184, 0.1) 58%,
|
||||
rgba(16, 152, 173, 0.1) 72%,
|
||||
rgba(7, 179, 155, 0.1) 86%,
|
||||
rgba(109, 186, 130, 0.1)
|
||||
);
|
||||
rgba(109, 186, 130, 0.1));
|
||||
}
|
||||
|
||||
.love-card {
|
||||
@@ -199,12 +172,14 @@ export default {
|
||||
background-color: rgba(255, 199, 184, 0.9);
|
||||
margin-bottom: 52rpx;
|
||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
&.ani {
|
||||
animation: loveCardAni 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
|
||||
.avatar {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
@@ -215,10 +190,12 @@ export default {
|
||||
&.boy {
|
||||
border-color: #56bbf9;
|
||||
}
|
||||
|
||||
&.girl {
|
||||
border-color: #f88ca2;
|
||||
}
|
||||
}
|
||||
|
||||
.love-days {
|
||||
margin: 0 12rpx;
|
||||
display: flex;
|
||||
@@ -226,55 +203,68 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 26rpx;
|
||||
|
||||
.tip-text {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.number {
|
||||
font-size: 46rpx;
|
||||
padding: 12rpx 0;
|
||||
|
||||
> .boy {
|
||||
color: #56bbf9;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
> .girl {
|
||||
color: #f88ca2;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.days {
|
||||
animation: daysAni 6s ease-in-out infinite;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.foot {
|
||||
display: none;
|
||||
margin-top: 36rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes daysAni {
|
||||
0% {
|
||||
color: #f88ca2;
|
||||
}
|
||||
|
||||
50% {
|
||||
color: #56bbf9;
|
||||
}
|
||||
|
||||
100% {
|
||||
color: #f88ca2;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loveCardAni {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -282,8 +272,10 @@ export default {
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.empty {
|
||||
height: calc(100vh - 180rpx - 280rpx - 36rpx);
|
||||
|
||||
.card {
|
||||
height: 100%;
|
||||
padding: 100rpx;
|
||||
@@ -292,15 +284,18 @@ export default {
|
||||
justify-content: center;
|
||||
color: rgba(96, 77, 68, 0.9);
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
&-text {
|
||||
margin-top: 36rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -316,17 +311,21 @@ export default {
|
||||
margin-bottom: 36rpx;
|
||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||
animation-delay: var(--delay);
|
||||
|
||||
&.ani {
|
||||
animation: cardAni 3s ease-in-out infinite;
|
||||
// animation: cardAni 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.head {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.status {
|
||||
width: 100rpx;
|
||||
display: flex;
|
||||
|
||||
.text {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
@@ -336,22 +335,26 @@ export default {
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
color: #55423b;
|
||||
|
||||
&.finish {
|
||||
background-color: #bfe9ef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 0;
|
||||
flex-grow: 1;
|
||||
box-sizing: border-box;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 24rpx;
|
||||
|
||||
&-name {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
&-desc {
|
||||
margin-top: 8rpx;
|
||||
font-size: 26rpx;
|
||||
@@ -361,8 +364,10 @@ export default {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
width: 50rpx;
|
||||
|
||||
.icon {
|
||||
display: inline-block;
|
||||
width: 45rpx;
|
||||
@@ -390,6 +395,7 @@ export default {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cardAni {
|
||||
0% {
|
||||
transform: translateY(0rpx);
|
||||
@@ -403,14 +409,17 @@ export default {
|
||||
transform: translateY(0rpx);
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
display: flex;
|
||||
margin-bottom: 12rpx;
|
||||
|
||||
&-label {
|
||||
color: #333;
|
||||
width: 140rpx;
|
||||
// font-weight: bold;
|
||||
}
|
||||
|
||||
&-value {
|
||||
width: 0;
|
||||
flex-grow: 1;
|
||||
|
||||
+75
-15
@@ -4,20 +4,20 @@
|
||||
<view class="lover-wrap" :style="[loveWrapStyle]">
|
||||
<view class="lover-card">
|
||||
<view class="boy">
|
||||
<image class="avatar" :src="loveConfig.boy.avatar" mode="aspectFit"></image>
|
||||
<view class="name">{{ loveConfig.boy.name }}</view>
|
||||
<image class="avatar" :src="$utils.checkAvatarUrl(loveConfig.loveInfo.boyAvatar)" mode="aspectFit"></image>
|
||||
<view class="name">{{ loveConfig.loveInfo.boyNickname }}</view>
|
||||
</view>
|
||||
<image class="like" :src="loveConfig.loveImageUrl" mode="scaleToFill"></image>
|
||||
<image class="like" :src="$utils.checkImageUrl(loveConfig.loveImageUrl)" mode="scaleToFill"></image>
|
||||
<view class="girl">
|
||||
<image class="avatar" :src="loveConfig.girl.avatar" mode="aspectFit"></image>
|
||||
<view class="name">{{ loveConfig.girl.name }}</view>
|
||||
<image class="avatar" :src="$utils.checkAvatarUrl(loveConfig.loveInfo.girlAvatar)" mode="aspectFit"></image>
|
||||
<view class="name">{{ loveConfig.loveInfo.girlNickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="wave-image" :src="loveConfig.waveImageUrl" mode="scaleToFill"></image>
|
||||
<image class="wave-image" :src="$utils.checkImageUrl(loveConfig.pageImages.waveImageUrl)" mode="scaleToFill"></image>
|
||||
</view>
|
||||
<!-- 恋爱记时 -->
|
||||
<view class="love-time-wrap">
|
||||
<view class="title">{{ loveConfig.timeTitle }}</view>
|
||||
<view class="title">{{ loveConfig.loveDateTitle }}</view>
|
||||
<view class="content">
|
||||
<text class="text">
|
||||
第
|
||||
@@ -40,9 +40,11 @@
|
||||
</view>
|
||||
<!-- 功能导航 -->
|
||||
<view class="list-wrap">
|
||||
<block v-for="(nav, index) in loveConfig.nav" :key="index">
|
||||
<block v-for="(nav, index) in navList" :key="index">
|
||||
<view v-if="nav.use" class="list-item" @click="fnToPage(nav.key)">
|
||||
<view class="left"><image class="icon" :src="nav.iconImageUrl" mode="aspectFit"></image></view>
|
||||
<view class="left">
|
||||
<image class="icon" :src="nav.iconImageUrl" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="name">{{ nav.title }}</view>
|
||||
<view class="desc">{{ nav.desc }}</view>
|
||||
@@ -54,37 +56,75 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LoveConfig from '@/config/love.config.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loveConfig: LoveConfig,
|
||||
loveDayTimer: null,
|
||||
loveDayCount: {
|
||||
d: 0,
|
||||
h: 0,
|
||||
m: 0,
|
||||
s: 0
|
||||
}
|
||||
},
|
||||
navList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
loveConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.loveConfig;
|
||||
},
|
||||
loveWrapStyle() {
|
||||
return {
|
||||
backgroundImage: `url(${this.loveConfig.bgImageUrl})`
|
||||
backgroundImage: `url(${this.$utils.checkImageUrl(this.loveConfig.pageImages.bgImageUrl)})`
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
loveConfig: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
if (!newVal) return;
|
||||
this.initList(newVal)
|
||||
this.fnInitLoveDayCount();
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnSetPageTitle('恋爱日记');
|
||||
this.fnInitLoveDayCount();
|
||||
},
|
||||
methods: {
|
||||
initList(configs) {
|
||||
this.navList = [
|
||||
{
|
||||
key: 'journey',
|
||||
use: configs.ourStory.enabled,
|
||||
iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
title: '关于我们',
|
||||
desc: '我们一起度过的那些经历'
|
||||
},
|
||||
{
|
||||
key: 'album',
|
||||
use: configs.lovePhoto.enabled,
|
||||
iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
title: '恋爱相册',
|
||||
desc: '定格了我们的那些小美好'
|
||||
},
|
||||
{
|
||||
key: 'list',
|
||||
use: configs.loveDaily.enabled,
|
||||
iconImageUrl: 'https://b.925i.cn/uni_halo_love/diandian.png',
|
||||
title: '恋爱清单',
|
||||
desc: '你我之间的约定我们都在努力实现'
|
||||
},
|
||||
]
|
||||
},
|
||||
fnInitLoveDayCount() {
|
||||
clearTimeout(this.loveDayTimer);
|
||||
const _countDownFn = () => {
|
||||
this.loveDayTimer = setTimeout(_countDownFn, 1000);
|
||||
const formatStartDate = this.loveConfig.loveStartDate.replace(/-/g, '/');
|
||||
const formatStartDate = this.loveConfig.loveDate.replace(/-/g, '/');
|
||||
const start = new Date(formatStartDate),
|
||||
now = new Date();
|
||||
const T = now.getTime() - start.getTime();
|
||||
@@ -156,6 +196,7 @@ export default {
|
||||
backdrop-filter: blur(4rpx);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -165,6 +206,7 @@ export default {
|
||||
height: 60rpx;
|
||||
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
|
||||
}
|
||||
|
||||
.lover-card {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@@ -176,6 +218,7 @@ export default {
|
||||
justify-content: space-around;
|
||||
border-radius: 12rpx;
|
||||
z-index: 2;
|
||||
|
||||
.avatar {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
@@ -185,6 +228,7 @@ export default {
|
||||
// border: 8rpx solid rgba(255, 255, 255, 0.7) !important;
|
||||
border: 8rpx solid rgba(255, 255, 255, 1) !important;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
@@ -192,14 +236,18 @@ export default {
|
||||
text-align: center;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
.boy {
|
||||
color: #3ab8e4;
|
||||
|
||||
.avatar {
|
||||
border-color: rgba(58, 184, 228, 0.7);
|
||||
}
|
||||
}
|
||||
|
||||
.girl {
|
||||
color: #f57ab3;
|
||||
|
||||
.avatar {
|
||||
border-color: rgba(245, 122, 179, 0.7);
|
||||
}
|
||||
@@ -211,6 +259,7 @@ export default {
|
||||
animation: likeani 1s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
|
||||
.wave-image {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
@@ -240,6 +289,7 @@ export default {
|
||||
font-weight: bold;
|
||||
// animation: loveTimeTitleAni 80s linear infinite;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: 24rpx;
|
||||
display: flex;
|
||||
@@ -249,6 +299,7 @@ export default {
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.number {
|
||||
margin: 0 8rpx;
|
||||
font-size: 46rpx;
|
||||
@@ -283,22 +334,27 @@ export default {
|
||||
&:nth-child(1) {
|
||||
animation: listItemAni1 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
animation: listItemAni1 3s ease-in-out infinite;
|
||||
animation-delay: 1.5s;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
animation: listItemAni1 3s ease-in-out infinite;
|
||||
animation-delay: 2s;
|
||||
}
|
||||
|
||||
.left {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
|
||||
.icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
@@ -306,11 +362,13 @@ export default {
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
padding-left: 40rpx;
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 8px;
|
||||
font-size: 26rpx;
|
||||
@@ -337,11 +395,13 @@ export default {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loveTimeTitleAni {
|
||||
to {
|
||||
background-position: -200rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes listItemAni1 {
|
||||
0% {
|
||||
transform: translateY(0rpx);
|
||||
|
||||
+53
-10
@@ -41,17 +41,17 @@
|
||||
</view>
|
||||
|
||||
<view class="user-info__container flex flex-col flex-center">
|
||||
<image class="user-info__avatar" :src="startInfo.logo" mode="aspectFill"></image>
|
||||
<view class="user-info__nick-name">「 {{ startInfo.title }} 」</view>
|
||||
<image class="user-info__avatar" :src="startConfig.logo" mode="aspectFill"></image>
|
||||
<view class="user-info__nick-name">「 {{ startConfig.title }} 」</view>
|
||||
</view>
|
||||
|
||||
<view class="text-align-center text-white" style="padding: 60vh 0 0 0;">
|
||||
<view class="" style="font-size: 44rpx;" v-if="startInfo.desc1">{{ startInfo.desc1 }}</view>
|
||||
<view class="mt-30 text-size-m" v-if="startInfo.desc2">{{ startInfo.desc2 }}</view>
|
||||
<view class="" style="font-size: 44rpx;" v-if="startConfig.desc1">{{ startConfig.desc1 }}</view>
|
||||
<view class="mt-30 text-size-m" v-if="startConfig.desc2">{{ startConfig.desc2 }}</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="padding: 120rpx 200rpx;z-index: 999;position: relative;">
|
||||
<view class="start-btn" @click="fnStart()">{{ startInfo.btnText || '开始体验' }}</view>
|
||||
<view class="start-btn" @click="fnStart()">{{ startConfig.btnText || '开始体验' }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 波浪效果 -->
|
||||
@@ -61,15 +61,19 @@
|
||||
|
||||
<script>
|
||||
import wave from '@/components/wave/wave.vue';
|
||||
|
||||
export default {
|
||||
components: { wave },
|
||||
components: {
|
||||
wave
|
||||
},
|
||||
computed: {
|
||||
startInfo() {
|
||||
return getApp().globalData.start;
|
||||
startConfig() {
|
||||
return this.$tm.vx.getters().getConfigs.startConfig;
|
||||
},
|
||||
pageStyle() {
|
||||
if (this.startInfo.bg) {
|
||||
const _bg = this.$utils.checkIsUrl(this.startInfo.bg) ? `url(${this.startInfo.bg})` : this.startInfo.bg;
|
||||
if (this.startConfig.bg) {
|
||||
const _bg = this.$utils.checkIsUrl(this.startConfig.bg) ? `url(${this.startConfig.bg})` : this
|
||||
.startConfig.bg;
|
||||
return {
|
||||
background: _bg + '!important'
|
||||
};
|
||||
@@ -95,6 +99,7 @@ export default {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.start-btn {
|
||||
box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
@@ -133,6 +138,7 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* 用户信息 end */
|
||||
|
||||
/* 流星*/
|
||||
@@ -163,67 +169,81 @@ export default {
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(2n) {
|
||||
opacity: 0;
|
||||
-webkit-animation: star-blink 1.2s linear infinite alternate;
|
||||
animation: star-blink 1.2s linear infinite alternate;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(1) {
|
||||
left: 40px;
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(2) {
|
||||
left: 200px;
|
||||
bottom: 40px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(3) {
|
||||
left: 60px;
|
||||
bottom: 120px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(4) {
|
||||
left: 140px;
|
||||
bottom: 250px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(5) {
|
||||
left: 400px;
|
||||
bottom: 300px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(6) {
|
||||
left: 170px;
|
||||
bottom: 80px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(7) {
|
||||
left: 200px;
|
||||
bottom: 360px;
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(8) {
|
||||
left: 250px;
|
||||
bottom: 320px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(9) {
|
||||
left: 300px;
|
||||
bottom: 340px;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(10) {
|
||||
left: 130px;
|
||||
bottom: 320px;
|
||||
-webkit-animation-delay: 0.5s;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(11) {
|
||||
left: 230px;
|
||||
bottom: 330px;
|
||||
-webkit-animation-delay: 7s;
|
||||
animation-delay: 7s;
|
||||
}
|
||||
|
||||
.small-stars .star:nth-child(12) {
|
||||
left: 300px;
|
||||
bottom: 360px;
|
||||
-webkit-animation-delay: 0.3s;
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes star-blink {
|
||||
50% {
|
||||
width: 3px;
|
||||
@@ -231,6 +251,7 @@ export default {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes star-blink {
|
||||
50% {
|
||||
width: 3px;
|
||||
@@ -238,6 +259,7 @@ export default {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.medium-stars .star {
|
||||
position: absolute;
|
||||
width: 3px;
|
||||
@@ -246,76 +268,89 @@ export default {
|
||||
-webkit-animation: star-blink 1.2s ease-in infinite alternate;
|
||||
animation: star-blink 1.2s ease-in infinite alternate;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(1) {
|
||||
left: 300px;
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(2) {
|
||||
left: 400px;
|
||||
bottom: 40px;
|
||||
-webkit-animation-delay: 0.4s;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(3) {
|
||||
left: 330px;
|
||||
bottom: 300px;
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(4) {
|
||||
left: 460px;
|
||||
bottom: 300px;
|
||||
-webkit-animation-delay: 0.9s;
|
||||
animation-delay: 0.9s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(5) {
|
||||
left: 300px;
|
||||
bottom: 150px;
|
||||
-webkit-animation-delay: 1.2s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(6) {
|
||||
left: 440px;
|
||||
bottom: 120px;
|
||||
-webkit-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(7) {
|
||||
left: 200px;
|
||||
bottom: 140px;
|
||||
-webkit-animation-delay: 0.8s;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(8) {
|
||||
left: 30px;
|
||||
bottom: 480px;
|
||||
-webkit-animation-delay: 0.3s;
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(9) {
|
||||
left: 460px;
|
||||
bottom: 400px;
|
||||
-webkit-animation-delay: 1.2s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(10) {
|
||||
left: 150px;
|
||||
bottom: 10px;
|
||||
-webkit-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(11) {
|
||||
left: 420px;
|
||||
bottom: 450px;
|
||||
-webkit-animation-delay: 1.2s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
|
||||
.medium-stars .star:nth-child(12) {
|
||||
left: 340px;
|
||||
bottom: 180px;
|
||||
-webkit-animation-delay: 1.1s;
|
||||
animation-delay: 1.1s;
|
||||
}
|
||||
|
||||
@keyframes star-blink {
|
||||
50% {
|
||||
width: 4px;
|
||||
@@ -323,6 +358,7 @@ export default {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.star-fall {
|
||||
position: relative;
|
||||
border-radius: 2px;
|
||||
@@ -332,6 +368,7 @@ export default {
|
||||
-webkit-transform: rotate(-20deg);
|
||||
transform: rotate(-20deg);
|
||||
}
|
||||
|
||||
.star-fall:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -348,6 +385,7 @@ export default {
|
||||
left: 80px;
|
||||
bottom: -100px;
|
||||
}
|
||||
|
||||
.star-fall:nth-child(1):after {
|
||||
-webkit-animation-delay: 2.4s;
|
||||
animation-delay: 2.4s;
|
||||
@@ -357,6 +395,7 @@ export default {
|
||||
left: 200px;
|
||||
bottom: -200px;
|
||||
}
|
||||
|
||||
.star-fall:nth-child(2):after {
|
||||
-webkit-animation-delay: 2s;
|
||||
animation-delay: 2s;
|
||||
@@ -366,6 +405,7 @@ export default {
|
||||
left: 430px;
|
||||
bottom: -50px;
|
||||
}
|
||||
|
||||
.star-fall:nth-child(3):after {
|
||||
-webkit-animation-delay: 3.6s;
|
||||
animation-delay: 3.6s;
|
||||
@@ -375,6 +415,7 @@ export default {
|
||||
left: 400px;
|
||||
bottom: 100px;
|
||||
}
|
||||
|
||||
.star-fall:nth-child(4):after {
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s;
|
||||
@@ -384,6 +425,7 @@ export default {
|
||||
20% {
|
||||
left: -100%;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: -100%;
|
||||
}
|
||||
@@ -393,6 +435,7 @@ export default {
|
||||
20% {
|
||||
left: -100%;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: -100%;
|
||||
}
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
<view class="poup pa-36" scroll-y="auto">
|
||||
<view class="info flex">
|
||||
<view class="poup-logo pa-4 shadow-24">
|
||||
<image :src="blogDetail.logo" class="poup-logo_img" mode="aspectFill"></image>
|
||||
<image :src="blogDetail.blogLogo" class="poup-logo_img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="pl-24 info-detail">
|
||||
<view class="poup-name text-size-lg text-weight-b">{{ blogDetail.name }}</view>
|
||||
<view class="poup-name text-size-lg text-weight-b">{{ blogDetail.blogName }}</view>
|
||||
<view class="poup-tag ml--10 text-size-n mt-10 text-grey">
|
||||
{{ blogDetail.description }}
|
||||
{{ blogDetail.blogDesc }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -69,12 +69,12 @@
|
||||
|
||||
<!-- 博客预览图 -->
|
||||
<view class="mt-24">
|
||||
<tm-images :round="2" :src="caclSiteThumbnail(blogDetail.url)" :width="568"
|
||||
<tm-images :round="2" :src="calcSiteThumbnail(blogDetail.blogUrl)" :width="568"
|
||||
mode="aspectFill"></tm-images>
|
||||
</view>
|
||||
</view>
|
||||
<view class="poup-link flex flex-center mb-24">
|
||||
<tm-button theme="light-blue" size="n" @click="fnCopyLink(blogDetail.url)">复制友链交换信息</tm-button>
|
||||
<tm-button theme="light-blue" size="n" @click="fnCopyLink(blogDetail.blogUrl)">复制友链交换信息</tm-button>
|
||||
<tm-button text theme="white" @click="blogDetailPoupShow = false">关闭</tm-button>
|
||||
</view>
|
||||
</tm-poup>
|
||||
@@ -117,7 +117,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
blogDetailPoupShow: false,
|
||||
blogDetail: this.$haloPluginsConfig.autoSubmitLink.blogDetail,
|
||||
form: {
|
||||
url: '', // 网址
|
||||
name: '', // 名称
|
||||
@@ -129,10 +128,16 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
caclSiteThumbnail(val) {
|
||||
haloPluginConfigs(){
|
||||
return this.$tm.vx.getters().getConfigs.pluginConfig;
|
||||
},
|
||||
blogDetail() {
|
||||
return this.haloPluginConfigs.submitLink;
|
||||
},
|
||||
calcSiteThumbnail(val) {
|
||||
return val => {
|
||||
if (!val) return '';
|
||||
if (val.charAt(val.length - 1) != '/') {
|
||||
if (val.charAt(val.length - 1) !== '/') {
|
||||
val = val + '/';
|
||||
}
|
||||
return 'https://image.thum.io/get/width/1000/crop/800/' + val;
|
||||
@@ -140,17 +145,17 @@ export default {
|
||||
},
|
||||
calcBlogContent() {
|
||||
return `
|
||||
博客名称:${this.blogDetail.name}
|
||||
博客地址:${this.blogDetail.url}
|
||||
博客logo:${this.blogDetail.logo}
|
||||
博客简介:${this.blogDetail.description}
|
||||
博客名称:${this.blogDetail.blogName}
|
||||
博客地址:${this.blogDetail.blogUrl}
|
||||
博客logo:${this.blogDetail.blogLogo}
|
||||
博客简介:${this.blogDetail.blogDesc}
|
||||
`
|
||||
},
|
||||
calcBlogCoupon() {
|
||||
return {
|
||||
img: this.blogDetail.logo,
|
||||
title: this.blogDetail.name,
|
||||
time: this.blogDetail.description,
|
||||
img: this.blogDetail.blogLogo,
|
||||
title: this.blogDetail.blogName,
|
||||
time: this.blogDetail.blogDesc,
|
||||
btnText: '友链详情'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,16 @@
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="empty" v-if="dataList.length == 0"><tm-empty icon="icon-shiliangzhinengduixiang-"
|
||||
label="该标签下暂无文章"></tm-empty></view>
|
||||
<view class="empty" v-if="dataList.length == 0">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-"
|
||||
label="该标签下暂无文章"></tm-empty>
|
||||
</view>
|
||||
<block v-else>
|
||||
<block v-for="(article, index) in dataList" :key="article.metadata.name">
|
||||
<!-- 文章卡片 -->
|
||||
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||
<article-card :article="article" @on-click="fnToArticleDetail"></article-card></tm-translate>
|
||||
<article-card :article="article" @on-click="fnToArticleDetail"></article-card>
|
||||
</tm-translate>
|
||||
</block>
|
||||
<view class="load-text">{{ loadMoreText }}</view>
|
||||
</block>
|
||||
@@ -29,6 +32,7 @@
|
||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
import ArticleCard from '@/components/article-card/article-card.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tmSkeleton,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<view class="app-page"><web-view :src="webUrl"></web-view></view>
|
||||
<view class="app-page">
|
||||
<web-view :src="webUrl"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -9,11 +9,6 @@ const router = createRouter({
|
||||
routes: [...ROUTES]
|
||||
});
|
||||
|
||||
import {
|
||||
checkHasWxLogin,
|
||||
checkHasAdminLogin
|
||||
} from '@/utils/auth.js'
|
||||
|
||||
//全局路由前置守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
next();
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/**
|
||||
* 功能:登录用户
|
||||
* 作者:小莫唐尼
|
||||
* 邮箱:studio@925i.cn
|
||||
* 时间:2022年07月21日 18:41:44
|
||||
* 版本:v0.1.0
|
||||
* 修改记录:
|
||||
* 修改内容:
|
||||
* 修改人员:
|
||||
* 修改时间:
|
||||
*/
|
||||
|
||||
import HaloConfig from '@/config/halo.config.js';
|
||||
import {
|
||||
getWxLoginInfo
|
||||
} from '@/utils/auth.js'
|
||||
import {
|
||||
setCache,
|
||||
getCache
|
||||
} from '@/utils/storage.js'
|
||||
export default {
|
||||
state: {
|
||||
// 微信登录的信息
|
||||
wxLoginInfo: getWxLoginInfo(),
|
||||
},
|
||||
getters: {
|
||||
getWxLoginInfo(state) {
|
||||
return state.wxLoginInfo
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setWxLoginInfo(state, data) {
|
||||
state.wxLoginInfo = data
|
||||
uni.setStorageSync('APP_WX_LOGIN_INFO', JSON.stringify(data))
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
checkAndSetDefaultUser(context) {
|
||||
if (!context.state.wxLoginInfo) {
|
||||
context.commit('setWxLoginInfo', {
|
||||
avatarUrl: HaloConfig.defaultAvatarUrl,
|
||||
nickName: '匿名访客',
|
||||
email: '',
|
||||
url: ''
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* 功能:博客作者信息
|
||||
* 作者:小莫唐尼
|
||||
* 邮箱:studio@925i.cn
|
||||
* 时间:2022年07月21日 18:41:44
|
||||
* 版本:v0.1.0
|
||||
* 修改记录:
|
||||
* 修改内容:
|
||||
* 修改人员:
|
||||
* 修改时间:
|
||||
*/
|
||||
import HaloConfig from '@/config/halo.config.js';
|
||||
export default {
|
||||
state: {
|
||||
blogger: {},
|
||||
},
|
||||
getters: {
|
||||
getBlogger(state) {
|
||||
return state.blogger
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setBlogger(state, data) {
|
||||
state.blogger = data;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
fnGetBlogger(context) {
|
||||
context.commit("setBlogger", HaloConfig.author);
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 功能:应用配置
|
||||
* 作者:小莫唐尼
|
||||
* 邮箱:studio@925i.cn
|
||||
* 时间:2024年06月22日 12:00:44
|
||||
* 版本:v0.1.0
|
||||
*/
|
||||
import {DefaultAppConfigs, getAppConfigs, setAppConfigs} from '@/config/index.js'
|
||||
import v2Config from '@/api/v2/all.config.js'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
configs: getAppConfigs(),
|
||||
},
|
||||
getters: {
|
||||
getConfigs(state) {
|
||||
if (state.configs) return state.configs;
|
||||
return getAppConfigs()
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setConfigs(state, data) {
|
||||
state.configs = data;
|
||||
setAppConfigs(data)
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
fetchConfigs({commit, dispatch}) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const res = await v2Config.getAppConfigs()
|
||||
if (res) {
|
||||
commit('setConfigs', res)
|
||||
resolve(res)
|
||||
} else {
|
||||
dispatch("setDefaultAppSettings");
|
||||
reject()
|
||||
}
|
||||
} catch (e) {
|
||||
dispatch("setDefaultAppSettings");
|
||||
reject()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 设置默认的数据
|
||||
setDefaultAppSettings({commit}) {
|
||||
commit('setConfigs', JSON.parse(JSON.stringify(DefaultAppConfigs)))
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -1,51 +0,0 @@
|
||||
/**
|
||||
* 功能:登录用户
|
||||
* 作者:小莫唐尼
|
||||
* 邮箱:studio@925i.cn
|
||||
* 时间:2022年07月21日 18:41:44
|
||||
* 版本:v0.1.0
|
||||
* 修改记录:
|
||||
* 修改内容:
|
||||
* 修改人员:
|
||||
* 修改时间:
|
||||
*/
|
||||
import HaloConfig from '@/config/halo.config.js';
|
||||
import {
|
||||
getWxLoginInfo
|
||||
} from '@/utils/auth.js'
|
||||
import {
|
||||
setCache,
|
||||
getCache
|
||||
} from '@/utils/storage.js'
|
||||
export default {
|
||||
state: {
|
||||
// 微信登录的信息
|
||||
wxLoginInfo: getWxLoginInfo(),
|
||||
},
|
||||
getters: {
|
||||
|
||||
getWxLoginInfo(state) {
|
||||
return state.wxLoginInfo
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setWxLoginInfo(state, data) {
|
||||
state.wxLoginInfo = data
|
||||
uni.setStorageSync('APP_WX_LOGIN_INFO', JSON.stringify(data))
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
|
||||
checkAndSetDefaultUser(context) {
|
||||
if (!context.state.wxLoginInfo) {
|
||||
context.commit('setWxLoginInfo', {
|
||||
avatarUrl: HaloConfig.defaultAvatarUrl,
|
||||
nickName: '匿名访客',
|
||||
email: '',
|
||||
url: ''
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
+1
-1
@@ -7,7 +7,7 @@ export const Platform = {
|
||||
* 检查当前环境是什么环境
|
||||
*/
|
||||
export const checkPlatform = (name) => {
|
||||
return uni.getSystemInfoSync().platform == name;
|
||||
return uni.getSystemInfoSync().platform === name;
|
||||
}
|
||||
|
||||
// 默认的应用设置
|
||||
|
||||
+13
-16
@@ -10,12 +10,9 @@
|
||||
* 修改时间:
|
||||
*/
|
||||
|
||||
import HaloConfig from '@/config/halo.config.js';
|
||||
import HaloTokenConfig from '@/config/token.config.js'
|
||||
import {
|
||||
logTypes,
|
||||
logUtils
|
||||
} from '@/utils/halo.logs.js'
|
||||
import {getAppConfigs} from '@/config/index.js'
|
||||
|
||||
const utils = {
|
||||
/**
|
||||
* 检查是否为http/https链接
|
||||
@@ -35,11 +32,11 @@ const utils = {
|
||||
// 检查封面图
|
||||
checkThumbnailUrl: function (thumbnail, mustRealUrl = false) {
|
||||
if (!thumbnail && mustRealUrl) {
|
||||
return HaloConfig.defaultStaticThumbnailUrl
|
||||
return this.checkUrl(getAppConfigs().imagesConfig.defaultStaticThumbnailUrl);
|
||||
}
|
||||
let _url = HaloConfig.defaultThumbnailUrl
|
||||
let _url = this.checkUrl(getAppConfigs().imagesConfig.defaultThumbnailUrl);
|
||||
if (_url) {
|
||||
if (_url.indexOf('?') == -1) {
|
||||
if (_url.indexOf('?') === -1) {
|
||||
_url += `?next-v=${new Date().getTime()}`
|
||||
} else {
|
||||
_url += `&next-v=${new Date().getTime()}`
|
||||
@@ -52,9 +49,10 @@ const utils = {
|
||||
|
||||
// 检查图片
|
||||
checkImageUrl: function (image) {
|
||||
let _url = HaloConfig.defaultImageUrl
|
||||
let _url
|
||||
this.checkUrl(getAppConfigs().imagesConfig.defaultImageUrl);
|
||||
if (_url) {
|
||||
if (_url.indexOf('?') == -1) {
|
||||
if (_url.indexOf('?') === -1) {
|
||||
_url += `?next-v=${new Date().getTime()}`
|
||||
} else {
|
||||
_url += `&next-v=${new Date().getTime()}`
|
||||
@@ -66,12 +64,11 @@ const utils = {
|
||||
},
|
||||
|
||||
// 检查头像
|
||||
checkAvatarUrl: function(avatar, isAdmin = false) {
|
||||
if (isAdmin) return HaloConfig.author.avatar;
|
||||
checkAvatarUrl: function (avatar) {
|
||||
if (!avatar) {
|
||||
let _url = HaloConfig.defaultAvatarUrl
|
||||
let _url = this.checkUrl(getAppConfigs().imagesConfig.defaultAvatarUrl);
|
||||
if (_url) {
|
||||
if (_url.indexOf('?') == -1) {
|
||||
if (_url.indexOf('?') === -1) {
|
||||
_url += `?next-v=${new Date().getTime()}`
|
||||
} else {
|
||||
_url += `&next-v=${new Date().getTime()}`
|
||||
@@ -87,8 +84,8 @@ const utils = {
|
||||
fnCheckIsFileType(type, attachment) {
|
||||
if (!attachment) return false;
|
||||
if (!attachment.mediaType) return false;
|
||||
if (type == 'video') return attachment.mediaType.indexOf('video/') != -1;
|
||||
else if (type == 'image') return attachment.mediaType.indexOf('image/') != -1;
|
||||
if (type === 'video') return attachment.mediaType.indexOf('video/') !== -1;
|
||||
else if (type === 'image') return attachment.mediaType.indexOf('image/') !== -1;
|
||||
else return false;
|
||||
},
|
||||
groupData: function (arr, fun) {
|
||||
|
||||
Reference in New Issue
Block a user