mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-07-27 04:20:43 +08:00
Compare commits
11 Commits
v1.0.2-beta
...
v1.1.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ba87b1972 | |||
| a0f3d1b220 | |||
| 6e80fa14c8 | |||
| 22a8e92dc2 | |||
| 6b1e0e5cc0 | |||
| 261617fc12 | |||
| 5000da9a64 | |||
| 9573b303e2 | |||
| f12262f4df | |||
| 1305b4a555 | |||
| b7e2025ebb |
@@ -2,4 +2,5 @@ node_modules/
|
|||||||
unpackage/
|
unpackage/
|
||||||
config/halo.config.js
|
config/halo.config.js
|
||||||
config/ad.config.js
|
config/ad.config.js
|
||||||
|
config/love.config.js
|
||||||
package-lock.json
|
package-lock.json
|
||||||
@@ -94,8 +94,13 @@
|
|||||||
|
|
||||||
## 🌈 在线体验
|
## 🌈 在线体验
|
||||||
|
|
||||||
- 敬请期待...
|
微信小程序搜索:小莫唐尼
|
||||||
|
<br/>
|
||||||
|

|
||||||
|
|
||||||
|
## 🌈 交流群
|
||||||
|
|
||||||
|
QQ群号:632969367
|
||||||
|
|
||||||
## 🔍 许可证
|
## 🔍 许可证
|
||||||
|
|
||||||
|
|||||||
@@ -65,14 +65,14 @@ export default {
|
|||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 1.2em;
|
font-size: 1.12em;
|
||||||
`,
|
`,
|
||||||
h5: `
|
h5: `
|
||||||
color: var(--main);
|
color: var(--main);
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 16px;
|
font-size: 1.1em;
|
||||||
`,
|
`,
|
||||||
h6: `
|
h6: `
|
||||||
color: #303133;
|
color: #303133;
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
strong: 'font-weight: 700;color: rgb(248, 57, 41);',
|
strong: 'font-weight: 700;color: rgb(248, 57, 41);',
|
||||||
video: 'width: 100%',
|
video: 'width: 100%',
|
||||||
},
|
},
|
||||||
containStyle: 'font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;padding:12px;font-size: 16px;color: #606266;word-spacing: 0.8px;letter-spacing: 0.8px;border-radius: 6px;background-color:#FFFFFF;',
|
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,
|
loadingGif: HaloConfig.loadingGifUrl,
|
||||||
emptyGif: HaloConfig.loadingEmptyUrl,
|
emptyGif: HaloConfig.loadingEmptyUrl,
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
// 微信分享配置
|
||||||
|
import haloConfig from '@/config/halo.config.js'
|
||||||
|
import { jsonToUrlParams2 } from '@/utils/url.params.js'
|
||||||
|
export const haloWxShareMixin = {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
haloWxShareData: {
|
||||||
|
...haloConfig.wxShareConfig
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//#ifdef MP-WEIXIN
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
return {
|
||||||
|
...this.haloWxShareData,
|
||||||
|
success: res => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//#endif
|
||||||
|
/* 分享到微信好友 */
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
const promise = new Promise(resolve => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve({
|
||||||
|
title: this.haloWxShareData.title,
|
||||||
|
path: this.haloWxShareData.path,
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
title: this.haloWxShareData.title,
|
||||||
|
path: '',
|
||||||
|
promise
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 分享到朋友圈-这里封装不够,在页面还要声明一次,否则是拿不到参数的,被分享者在朋友圈打开链接是空的
|
||||||
|
onShareTimeline: function() {
|
||||||
|
return {
|
||||||
|
title: this.haloWxShareData.title,
|
||||||
|
query: {},
|
||||||
|
imageUrl: this.haloWxShareData.imageUrl,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 设置分享信息(需要在页面调用)
|
||||||
|
fnSetWxShareConfig(config = {}) {
|
||||||
|
let currentRoutes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||||||
|
let currentRoute = currentRoutes[currentRoutes.length - 1].route; //获取当前页面路由(分销思路,分享者点开使用的小程序将获取到分享者的id)
|
||||||
|
let sharePath = currentRoutes
|
||||||
|
if (config.params) {
|
||||||
|
const URLParams = config.params ? jsonToUrlParams2(config.params) : {};
|
||||||
|
sharePath += URLParams
|
||||||
|
}
|
||||||
|
let _config = Object.assign({}, {
|
||||||
|
path: sharePath,
|
||||||
|
copyLink: haloConfig.apiUrl,
|
||||||
|
query: {}
|
||||||
|
}, config)
|
||||||
|
|
||||||
|
uni.$tm.vx.commit('setWxShare', _config);
|
||||||
|
this.haloWxShareData = _config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -36,3 +36,120 @@
|
|||||||
transform: rotateZ(360deg);
|
transform: rotateZ(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 自定义广告
|
||||||
|
|
||||||
|
.ad-card {
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 24rpx;
|
||||||
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
|
||||||
|
&.is-lr {
|
||||||
|
display: flex;
|
||||||
|
.ad-card_tip {
|
||||||
|
top: initial;
|
||||||
|
left: 288rpx;
|
||||||
|
bottom: 24rpx;
|
||||||
|
// right: 160rpx;
|
||||||
|
padding: 4rpx 20rpx;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 2rpx solid #607d8b;
|
||||||
|
color: #607d8b;
|
||||||
|
}
|
||||||
|
.ad-card_cover {
|
||||||
|
width: 240rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
animation: adLinkAni 1s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
.ad-card_info {
|
||||||
|
width: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
padding-left: 24rpx;
|
||||||
|
&-title {
|
||||||
|
margin-top: 0;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
&-link {
|
||||||
|
top: initial;
|
||||||
|
// right: 150rpx;
|
||||||
|
bottom: 0;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&_tip {
|
||||||
|
position: absolute;
|
||||||
|
left: 36rpx;
|
||||||
|
top: 36rpx;
|
||||||
|
display: inline-flex;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
padding: 4rpx 10rpx;
|
||||||
|
background-color: rgba(0, 0, 0, 0.3);
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
&_cover {
|
||||||
|
width: 100%;
|
||||||
|
height: 300rpx;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
}
|
||||||
|
&_info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
&-title {
|
||||||
|
width: calc(100% - 120rpx);
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 8rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
&-desc {
|
||||||
|
margin-top: 6rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #616161;
|
||||||
|
line-height: 1.8;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
&-link {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 6rpx;
|
||||||
|
display: inline-flex;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
padding: 4rpx 10rpx;
|
||||||
|
border: 2rpx solid #03a9f4;
|
||||||
|
color: #03a9f4;
|
||||||
|
font-size: 24rpx;
|
||||||
|
transform: scale(0.93);
|
||||||
|
// animation: adLinkAni 0.8s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes adLinkAni {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.02);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text class="is-top" v-if="article.topped">置顶</text>
|
<text class="is-top bg-gradient-blue-accent" v-if="article.topped">置顶</text>
|
||||||
<text class="title-text text-overflow">{{ article.title }}</text>
|
<text class="title-text text-overflow">{{ article.title }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="content text-overflow-2">{{ article.summary }}</view>
|
<view class="content text-overflow-2">{{ article.summary }}</view>
|
||||||
@@ -33,8 +33,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import tmTags from '@/tm-vuetify/components/tm-tags/tm-tags.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'article-card',
|
name: 'article-card',
|
||||||
|
components: { tmTags },
|
||||||
props: {
|
props: {
|
||||||
from: {
|
from: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -157,7 +159,7 @@ export default {
|
|||||||
}
|
}
|
||||||
&.tb_image_text {
|
&.tb_image_text {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0;
|
padding: 24rpx;
|
||||||
.left {
|
.left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
@@ -169,7 +171,8 @@ export default {
|
|||||||
}
|
}
|
||||||
.right {
|
.right {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding: 24rpx;
|
padding: 24rpx 0;
|
||||||
|
padding-bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
@@ -252,6 +255,7 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
.is-top {
|
.is-top {
|
||||||
@@ -263,8 +267,9 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
vertical-align: 4rpx;
|
vertical-align: 4rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-image: -webkit-linear-gradient(0deg, #3ca5f6 0, #a86af9 100%);
|
// background-image: -webkit-linear-gradient(0deg, #3ca5f6 0, #a86af9 100%);
|
||||||
border-radius: 4rpx 12rpx;
|
border-radius: 6rpx 12rpx;
|
||||||
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
&-text {
|
&-text {
|
||||||
color: #303133;
|
color: #303133;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
margin: 12rpx 24rpx;
|
margin: 12rpx 24rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
padding: 16rpx;
|
padding: 16rpx;
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
&.lr_image_text {
|
&.lr_image_text {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view style="overflow: hidden;position: fixed;width: 100%;height: 100%;pointer-events: none; top: 0;">
|
<view class="barrage-wrap" :class="[type]">
|
||||||
<view class="danmu-li" v-for="(item, index) in listData" :class="item.type" :style="item.style" :key="index">
|
<view class="danmu-li" v-for="(item, index) in listData" :class="[type, item.type]" :style="[item.style]" :key="index">
|
||||||
<view class="danmu-inner">
|
<view class="danmu-inner">
|
||||||
<view class="user-box">
|
<view class="user-box">
|
||||||
<view class="user-img">
|
<view class="user-img"><image class="avatar" :src="item.item.avatar"></image></view>
|
||||||
<view class="img-box">
|
<view class="user-text cl1">{{ item.item.author }}</view>
|
||||||
<image :src="item.avatar || 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=317894666,3379114684&fm=26&gp=0.jpg'"></image>
|
<view class="user-status cl1">{{ item.item.content }}</view>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="user-text cl1">{{ item.nickName }}</view>
|
|
||||||
<view class="user-status cl1">{{ item.text }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -18,11 +14,17 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
//rightToLeft leftToRight leftBottom
|
// rightToLeft leftToRight leftBottom
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'rightToLeft'
|
default: 'rightToLeft'
|
||||||
},
|
},
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
minTime: {
|
minTime: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 4
|
default: 4
|
||||||
@@ -43,34 +45,34 @@ export default {
|
|||||||
//轨道高度
|
//轨道高度
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 40
|
default: 40
|
||||||
},
|
|
||||||
noStacked: {
|
|
||||||
//不允许堆叠(暂不可用)
|
|
||||||
type: Array,
|
|
||||||
default() {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
closeTimer: null,
|
||||||
listData: []
|
listData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.hrackNum = Math.floor((this.maxTop - this.minTop) / this.hrackH);
|
//leftBottom 使用参数
|
||||||
|
if (this.type === 'leftBottom') {
|
||||||
|
this.hrackNum = Math.floor(this.maxTop / this.hrackH);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add(obj) {
|
add(obj) {
|
||||||
|
this.isShow = true;
|
||||||
|
this.showFlag = true;
|
||||||
let data = {
|
let data = {
|
||||||
item: obj.item,
|
...obj,
|
||||||
id: Date.parse(new Date()),
|
id: Date.parse(new Date()),
|
||||||
time: Math.ceil(Math.floor(Math.random() * (this.maxTime - this.minTime + 1) + this.minTime)),
|
time: Math.ceil(Math.floor(Math.random() * (this.maxTime - this.minTime + 1) + this.minTime)),
|
||||||
type: this.type
|
type: this.type
|
||||||
};
|
};
|
||||||
if (this.type === 'leftBottom') {
|
if (this.type === 'leftBottom') {
|
||||||
let objData = {
|
let objData = {
|
||||||
item: data.item,
|
item: data,
|
||||||
type: 'leftBottomEnter',
|
type: 'leftBottomEnter',
|
||||||
style: {
|
style: {
|
||||||
transition: `all 0.5s`,
|
transition: `all 0.5s`,
|
||||||
@@ -88,7 +90,7 @@ export default {
|
|||||||
} else if (this.listData[i].status === 'reset') {
|
} else if (this.listData[i].status === 'reset') {
|
||||||
//重置
|
//重置
|
||||||
this.listData[i].style.transition = 'none';
|
this.listData[i].style.transition = 'none';
|
||||||
this.listData[i].style.bottom = 0;
|
this.listData[i].style.bottom = '6px';
|
||||||
this.listData[i].status = 'reuse';
|
this.listData[i].status = 'reuse';
|
||||||
} else if (this.listData[i].status === 'recycle') {
|
} else if (this.listData[i].status === 'recycle') {
|
||||||
//回收
|
//回收
|
||||||
@@ -105,8 +107,16 @@ export default {
|
|||||||
if (listLen < hrackNum + 2) {
|
if (listLen < hrackNum + 2) {
|
||||||
this.listData.push(objData);
|
this.listData.push(objData);
|
||||||
}
|
}
|
||||||
} else if (this.type === 'rightToLeft' || this.type === 'leftToRight') {
|
} else if (this.type === 'rightToLeft') {
|
||||||
let objData = this.horStacked(data);
|
let objData = {
|
||||||
|
item: data,
|
||||||
|
type: 'rightToLeft',
|
||||||
|
style: {
|
||||||
|
animationDuration: `${data.time}s`,
|
||||||
|
top: `${Math.ceil(Math.random() * (this.maxTop - this.minTop + 1) + this.minTop)}px`
|
||||||
|
},
|
||||||
|
delTime: Date.parse(new Date()) + data.time * 1200
|
||||||
|
};
|
||||||
for (let i in this.listData) {
|
for (let i in this.listData) {
|
||||||
if (this.listData[i].delTime <= Date.parse(new Date())) {
|
if (this.listData[i].delTime <= Date.parse(new Date())) {
|
||||||
this.repaint(i, objData.type);
|
this.repaint(i, objData.type);
|
||||||
@@ -118,16 +128,50 @@ export default {
|
|||||||
this.listData.push(objData);
|
this.listData.push(objData);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
horStacked(data) {
|
async remove(options = {}) {
|
||||||
return {
|
if (this.type == 'rightToLeft') {
|
||||||
item: data.item,
|
if (this.listData.length != 0) {
|
||||||
type: this.type,
|
const last = this.listData[this.listData.length - 1];
|
||||||
style: {
|
setTimeout(() => {
|
||||||
animationDuration: `${data.time}s`,
|
this.listData = [];
|
||||||
top: `${Math.ceil(Math.random() * (this.maxTop - this.minTop + 1) + this.minTop)}px`
|
}, last.item.time * 1200 + 1000);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
options = Object.assign(
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
duration: 5000, // 延迟关闭的时间
|
||||||
|
speed: 1000 // 弹幕消失的速度
|
||||||
},
|
},
|
||||||
delTime: Date.parse(new Date()) + data.time * 1200
|
options
|
||||||
|
);
|
||||||
|
|
||||||
|
const _fnHandleRemove = item => {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
setTimeout(() => {
|
||||||
|
// item['type'] = 'leftBottomExitLeft';
|
||||||
|
item['type'] = 'is-hide';
|
||||||
|
resolve();
|
||||||
|
}, options.speed);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
const _fnHandleLoop = item => {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
setTimeout(async () => {
|
||||||
|
for (var i = 0; i < this.listData.length; i++) {
|
||||||
|
await _fnHandleRemove(this.listData[i]);
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
}, options.duration);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
await _fnHandleLoop();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.listData = [];
|
||||||
|
}, options.duration + 200);
|
||||||
},
|
},
|
||||||
repaint(index, type) {
|
repaint(index, type) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -137,8 +181,8 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
@keyframes leftBottomEnter {
|
@keyframes leftBottomEnter {
|
||||||
0% {
|
0% {
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
@@ -163,6 +207,20 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes leftBottomExitLeft {
|
||||||
|
0% {
|
||||||
|
transform: translateX(0%);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translateX(-50%);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateX(-100%);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@keyframes leftToRight {
|
@keyframes leftToRight {
|
||||||
0% {
|
0% {
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
@@ -182,13 +240,38 @@ export default {
|
|||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.barrage-wrap {
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
top: 0;
|
||||||
|
z-index: 99;
|
||||||
|
transition: all 1s ease-in-out;
|
||||||
|
&.leftBottom {
|
||||||
|
top: initial;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
bottom: 130rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef H5 */
|
||||||
|
bottom: 36rpx;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
}
|
||||||
.danmu-li {
|
.danmu-li {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
transform: translateX(100%);
|
transform: translateX(100%);
|
||||||
animation-timing-function: linear;
|
animation-timing-function: linear;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
opacity: 1;
|
||||||
|
&.is-hide {
|
||||||
|
opacity: 0;
|
||||||
|
// transform: translateX(-100%) !important;
|
||||||
|
}
|
||||||
|
&.leftBottom {
|
||||||
|
left: 24rpx;
|
||||||
|
}
|
||||||
&.leftBottomEnter {
|
&.leftBottomEnter {
|
||||||
animation-name: leftBottomEnter;
|
animation-name: leftBottomEnter;
|
||||||
}
|
}
|
||||||
@@ -196,53 +279,59 @@ export default {
|
|||||||
animation-name: leftBottomExit;
|
animation-name: leftBottomExit;
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
}
|
}
|
||||||
|
&.leftBottomExitLeft {
|
||||||
|
animation-name: leftBottomExitLeft;
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
}
|
||||||
&.rightToLeft {
|
&.rightToLeft {
|
||||||
animation-name: rightToLeft;
|
animation-name: rightToLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.leftToRight {
|
&.leftToRight {
|
||||||
animation-name: leftToRight;
|
animation-name: rightToLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
.danmu-inner {
|
.danmu-inner {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
font-size: 24rpx;
|
||||||
.user-box {
|
.user-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 3rpx 40rpx 3rpx 10rpx;
|
padding: 6rpx 40rpx 6rpx 10rpx;
|
||||||
background: rgba(0, 0, 0, 0.3);
|
background: rgba(0, 0, 0, 0.3);
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.user-img {
|
.user-img {
|
||||||
.img-box {
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
image {
|
.avatar {
|
||||||
width: 58rpx;
|
width: 42rpx;
|
||||||
height: 58rpx;
|
height: 42rpx;
|
||||||
background: rgba(55, 55, 55, 1);
|
background: rgba(55, 55, 55, 1);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-status {
|
.user-status {
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 28rpx;
|
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
|
max-width: 320rpx;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-text {
|
.user-text {
|
||||||
|
max-width: 100rpx;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
// white-space: nowrap;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
width: 80rpx;
|
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="cache-image">
|
<view class="cache-image-wrap">
|
||||||
<view v-if="loadStatus == 'loading'" class="img-loading" :style="[imgStyle, loadStyle]">
|
<view v-if="loadStatus == 'loading'" class="img-loading" :style="[imgStyle, loadStyle]">
|
||||||
<!-- <text class="img-load-icon iconfont icon-loading"></text>
|
<!-- <text class="img-load-icon iconfont icon-loading"></text>
|
||||||
<text class="img-load-text">{{ loadText }}</text> -->
|
<text class="img-load-text">{{ loadText }}</text> -->
|
||||||
@@ -145,7 +145,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.cache-image {
|
.cache-image-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="category-mini-card">
|
<view class="category-mini-card">
|
||||||
<!-- <image class="img" lazy-load :src="$utils.checkThumbnailUrl(category.thumbnail)" mode="aspectFill"></image> -->
|
|
||||||
<cache-image
|
<cache-image
|
||||||
class="img"
|
class="img"
|
||||||
height="120rpx"
|
height="120rpx"
|
||||||
@@ -35,12 +34,13 @@ export default {
|
|||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
// border: 2rpx solid #f7f7f7;
|
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
position: relative;
|
||||||
.img {
|
.img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
border: 6rpx 6rpx 0 0;
|
border: 6rpx 6rpx 0 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -55,9 +55,13 @@ export default {
|
|||||||
padding-right: 24rpx;
|
padding-right: 24rpx;
|
||||||
}
|
}
|
||||||
.name {
|
.name {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 16rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--main-text-color);
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -34,14 +34,13 @@
|
|||||||
:shadow="0"
|
:shadow="0"
|
||||||
label="Ծ‸Ծ博主已设置该文章禁止评论!"
|
label="Ծ‸Ծ博主已设置该文章禁止评论!"
|
||||||
:round="3"
|
:round="3"
|
||||||
close
|
|
||||||
></tm-alerts>
|
></tm-alerts>
|
||||||
<view class="empty pt-50" v-if="dataList.length == 0">
|
<view class="empty pt-50" v-if="dataList.length == 0">
|
||||||
<tm-empty v-if="disallowComment" icon="icon-shiliangzhinengduixiang-" label="暂无评论">
|
<tm-empty v-if="disallowComment" icon="icon-shiliangzhinengduixiang-" label="暂无评论">
|
||||||
<text class="text-red text-size-s">- 文章已开启禁止评论 -</text>
|
<text class="text-red text-size-s">- 文章已开启禁止评论 -</text>
|
||||||
</tm-empty>
|
</tm-empty>
|
||||||
<tm-empty v-else icon="icon-shiliangzhinengduixiang-" label="暂无评论">
|
<tm-empty v-else icon="icon-shiliangzhinengduixiang-" label="暂无评论">
|
||||||
<tm-button theme="bg-gradient-light-blue-accent" size="m" @click="fnToComment(null)">抢沙发</tm-button>
|
<tm-button theme="light-blue" :dense="true" :shadow="0" size="m" @click="fnToComment(null)">抢沙发</tm-button>
|
||||||
</tm-empty>
|
</tm-empty>
|
||||||
</view>
|
</view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
@@ -143,6 +142,7 @@ export default {
|
|||||||
this.result = res.data;
|
this.result = res.data;
|
||||||
this.dataList = res.data.content;
|
this.dataList = res.data.content;
|
||||||
this.loading = 'success';
|
this.loading = 'success';
|
||||||
|
this.$emit('on-loaded', this.dataList);
|
||||||
} else {
|
} else {
|
||||||
this.loading = 'error';
|
this.loading = 'error';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
#如何使用
|
|
||||||
###js
|
|
||||||
```javascript
|
|
||||||
import lffBarrage from '@/components/lff-barrage/lff-barrage.vue'
|
|
||||||
components:{lffBarrage},
|
|
||||||
methods:{
|
|
||||||
colrdo(){ //插入一条弹幕
|
|
||||||
this.$refs.lffBarrage.add({item:'你好呀小伙子'});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
###HTML
|
|
||||||
```html
|
|
||||||
<lff-barrage ref="lffBarrage"></lff-barrage>
|
|
||||||
```
|
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<view class="scroll-btn" :style="{ bottom: bottom }" @click.stop="fnScroll()">
|
||||||
|
<text v-if="_scrollTop >= 180" class="iconfont icon-long-arrow-up"></text>
|
||||||
|
<text v-else class="iconfont icon-long-arrow-down"></text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import throttle from '@/utils/throttle.js';
|
||||||
|
export default {
|
||||||
|
name: 'scroll-btn',
|
||||||
|
props: {
|
||||||
|
bottom: {
|
||||||
|
type: String,
|
||||||
|
default: '180rpx'
|
||||||
|
},
|
||||||
|
scrollTop: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return { timer: null, _scrollTop: 0 };
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
scrollTop(val) {
|
||||||
|
this._scrollTop = val;
|
||||||
|
this.$forceUpdate();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this._scrollTop = this.scrollTop;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fnScroll() {
|
||||||
|
throttle(() => {
|
||||||
|
this.$emit('on-status', false);
|
||||||
|
const isTop = this._scrollTop >= 180;
|
||||||
|
this._scrollTop = isTop ? 0 : 999999999999;
|
||||||
|
uni.pageScrollTo({
|
||||||
|
duration: 500,
|
||||||
|
scrollTop: this._scrollTop,
|
||||||
|
success: () => {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
this.$emit('on-status', true);
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$emit('update:scrollTop', this._scrollTop);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.scroll-btn {
|
||||||
|
position: fixed;
|
||||||
|
// bottom: 200rpx;
|
||||||
|
// right: -90rpx;
|
||||||
|
right: 52rpx;
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 4rpx solid #ffffff;
|
||||||
|
background-color: #bfe9ef;
|
||||||
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 99;
|
||||||
|
transition: right 0.5s ease-in-out;
|
||||||
|
|
||||||
|
&.is-show {
|
||||||
|
right: 52rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -15,6 +15,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 文章详情广告
|
// 文章详情广告
|
||||||
articleDetail: {
|
articleDetail: {
|
||||||
use: false, // 是否启用
|
// 微信广告/dclound申请的广告
|
||||||
|
use: true,
|
||||||
|
|
||||||
|
// 自定义广告
|
||||||
|
custom: {
|
||||||
|
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'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
defaultThumbnailUrl: '', // 默认封面图地址
|
defaultThumbnailUrl: '', // 默认封面图地址
|
||||||
|
defaultStaticThumbnailUrl: '', // 静态默认封面图(不可以是随机图地址)
|
||||||
defaultImageUrl: '', // 默认图片地址
|
defaultImageUrl: '', // 默认图片地址
|
||||||
defaultAvatarUrl: '', // 默认头像地址
|
defaultAvatarUrl: '', // 默认头像地址
|
||||||
|
|
||||||
@@ -121,8 +122,8 @@ export default {
|
|||||||
title: '', // 小程序分享标题[非必填]
|
title: '', // 小程序分享标题[非必填]
|
||||||
desc: '', // 小程序分享描述[非必填]
|
desc: '', // 小程序分享描述[非必填]
|
||||||
imageUrl: '', // 小程序分享时候图片地址[非必填]
|
imageUrl: '', // 小程序分享时候图片地址[非必填]
|
||||||
path: '/pages/start/start', // 分享路径[非必填] - 基本不需要修改
|
path: '/pages/index/index', // 分享路径[非必填] - 基本不需要修改
|
||||||
copyLink: '/pages/start/start', // 复制链接[非必填] - 基本不需要修改
|
copyLink: '/pages/index/index', // 复制链接[非必填] - 基本不需要修改
|
||||||
query: {}, // 分享参数[非必填] - 基本不需要填写
|
query: {}, // 分享参数[非必填] - 基本不需要填写
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,148 @@
|
|||||||
|
/**
|
||||||
|
* 恋爱日记配置
|
||||||
|
*/
|
||||||
|
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: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
/**
|
||||||
|
* 恋爱日记配置
|
||||||
|
*/
|
||||||
|
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: '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>马说:“我叫马,你呢?”</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: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
-7
@@ -1,9 +1,23 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"name": "uni-halo",
|
||||||
"vue-i18n": "^9.1.10"
|
"version": "1.0.0",
|
||||||
},
|
"description": "<p align=\"center\">\r <img alt=\"logo\" src=\"https://b.925i.cn/uni_halo/uni_halo_logo.png\" width=\"120\" height=\"120\" style=\"margin-bottom: 10px;\">\r </p>\r <h3 align=\"center\" style=\"margin: 30px 0 30px;font-weight: bold;font-size:40px;\">uni-halo</h3>\r <h3 align=\"center\">uni-halo 基于Halo一款现代化的开源博客/CMS系统API开发的可多端编译应用</h3>",
|
||||||
"dependencies": {
|
"repository": {
|
||||||
"uni-read-pages": "^1.0.5",
|
"type": "git",
|
||||||
"uni-simple-router": "^2.0.8-beta.4"
|
"url": "git+https://gitee.com/ialley-workshop-open/uni-halo.git"
|
||||||
}
|
},
|
||||||
|
"keywords": ["uni-halo", "小莫唐尼", "巷子工坊"],
|
||||||
|
"author": "巷子工坊丨小莫唐尼",
|
||||||
|
"license": "AGPL-3.0",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://gitee.com/ialley-workshop-open/uni-halo/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://uni-halo.925i.cn",
|
||||||
|
"devDependencies": {
|
||||||
|
"vue-i18n": "^9.1.10"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"uni-read-pages": "^1.0.5",
|
||||||
|
"uni-simple-router": "^2.0.8-beta.4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+29
-2
@@ -110,7 +110,28 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "love/love",
|
"path": "love/love",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "恋爱日记",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"app-plus": {
|
||||||
|
"pullToRefresh": {
|
||||||
|
"color": "#03a9f4",
|
||||||
|
"style": "circle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "love/list",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "恋爱清单",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "love/album",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "恋爱相册",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"pullToRefresh": {
|
"pullToRefresh": {
|
||||||
@@ -119,7 +140,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "love/journey",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我们的故事",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "archives/archives",
|
"path": "archives/archives",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
<view class="app-page pb-24">
|
<view class="app-page pb-24">
|
||||||
<!-- 博主信息 -->
|
<!-- 博主信息 -->
|
||||||
<view class="blogger-info" :style="[calcProfileStyle]">
|
<view class="blogger-info" :style="[calcProfileStyle]">
|
||||||
<image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill" @click="miniProfileCard.show = true"></image>
|
<image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
|
||||||
<view class="profile">
|
<view class="profile">
|
||||||
<view class="author mt-24 text-size-g text-weight-b">{{ bloggerInfo.nickname }}</view>
|
<view class="author mt-24 text-size-g text-weight-b">{{ bloggerInfo.nickname }}</view>
|
||||||
<view class="desc mt-24 text-size-m">{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}</view>
|
<view class="desc mt-24 text-size-m">
|
||||||
|
{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="calcWaveUrl" :src="calcWaveUrl" mode="scaleToFill" class="gif-wave"></image>
|
<image v-if="calcWaveUrl" :src="calcWaveUrl" mode="scaleToFill" class="gif-wave"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -17,19 +19,34 @@
|
|||||||
<view class="statistics flex pt-24 pb-24" :class="{ 'has-solid': statisticsShowMore }">
|
<view class="statistics flex pt-24 pb-24" :class="{ 'has-solid': statisticsShowMore }">
|
||||||
<view class="item flex-1 text-align-center">
|
<view class="item flex-1 text-align-center">
|
||||||
<view class="number text-size-xl text-bg-gradient-orange-accent">
|
<view class="number text-size-xl text-bg-gradient-orange-accent">
|
||||||
<tm-flop :startVal="0" :decimals="0" :endVal="statistics.postCount" :duration="3000"></tm-flop>
|
<tm-flop
|
||||||
|
:startVal="0"
|
||||||
|
:decimals="0"
|
||||||
|
:endVal="statistics.postCount"
|
||||||
|
:duration="3000"
|
||||||
|
></tm-flop>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">文章总数</view>
|
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">文章总数</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item flex-1 text-align-center">
|
<view class="item flex-1 text-align-center">
|
||||||
<view class="number text-size-xl text-bg-gradient-blue-accent">
|
<view class="number text-size-xl text-bg-gradient-blue-accent">
|
||||||
<tm-flop :startVal="0" :decimals="0" :endVal="statistics.categoryCount" :duration="3000"></tm-flop>
|
<tm-flop
|
||||||
|
:startVal="0"
|
||||||
|
:decimals="0"
|
||||||
|
:endVal="statistics.categoryCount"
|
||||||
|
:duration="3000"
|
||||||
|
></tm-flop>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">分类总数</view>
|
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">分类总数</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item flex-1 text-align-center">
|
<view class="item flex-1 text-align-center">
|
||||||
<view class="number text-size-xl text-bg-gradient-green-accent">
|
<view class="number text-size-xl text-bg-gradient-green-accent">
|
||||||
<tm-flop :startVal="0" :decimals="0" :endVal="statistics.tagCount" :duration="3000"></tm-flop>
|
<tm-flop
|
||||||
|
:startVal="0"
|
||||||
|
:decimals="0"
|
||||||
|
:endVal="statistics.tagCount"
|
||||||
|
:duration="3000"
|
||||||
|
></tm-flop>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-6 text-size-s text-grey-darken-1">标签总数</view>
|
<view class="mt-6 text-size-s text-grey-darken-1">标签总数</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -37,19 +54,34 @@
|
|||||||
<view class="statistics solid-top has-solid flex pt-24 pb-24">
|
<view class="statistics solid-top has-solid flex pt-24 pb-24">
|
||||||
<view class="item flex-1 text-align-center">
|
<view class="item flex-1 text-align-center">
|
||||||
<view class="number text-size-xl text-bg-gradient-orange-accent">
|
<view class="number text-size-xl text-bg-gradient-orange-accent">
|
||||||
<tm-flop :startVal="0" :decimals="0" :endVal="statistics.commentCount" :duration="3000"></tm-flop>
|
<tm-flop
|
||||||
|
:startVal="0"
|
||||||
|
:decimals="0"
|
||||||
|
:endVal="statistics.commentCount"
|
||||||
|
:duration="3000"
|
||||||
|
></tm-flop>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">评论数量</view>
|
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">评论数量</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item flex-1 text-align-center">
|
<view class="item flex-1 text-align-center">
|
||||||
<view class="number text-size-xl text-bg-gradient-blue-accent">
|
<view class="number text-size-xl text-bg-gradient-blue-accent">
|
||||||
<tm-flop :startVal="0" :decimals="0" :endVal="statistics.linkCount" :duration="3000"></tm-flop>
|
<tm-flop
|
||||||
|
:startVal="0"
|
||||||
|
:decimals="0"
|
||||||
|
:endVal="statistics.linkCount"
|
||||||
|
:duration="3000"
|
||||||
|
></tm-flop>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">点赞数量</view>
|
<view class="mt-6 text-align-center text-size-s text-grey-darken-1">点赞数量</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item flex-1 text-align-center">
|
<view class="item flex-1 text-align-center">
|
||||||
<view class="number text-size-xl text-bg-gradient-green-accent">
|
<view class="number text-size-xl text-bg-gradient-green-accent">
|
||||||
<tm-flop :startVal="0" :decimals="0" :endVal="statistics.visitCount" :duration="3000"></tm-flop>
|
<tm-flop
|
||||||
|
:startVal="0"
|
||||||
|
:decimals="0"
|
||||||
|
:endVal="statistics.visitCount"
|
||||||
|
:duration="3000"
|
||||||
|
></tm-flop>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-6 text-size-s text-grey-darken-1">访客数量</view>
|
<view class="mt-6 text-size-s text-grey-darken-1">访客数量</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -60,7 +92,12 @@
|
|||||||
|
|
||||||
<!-- 快捷导航 -->
|
<!-- 快捷导航 -->
|
||||||
<view v-if="useQuickNav" class="quick-nav flex flex-between round-3 ma-24 pa-24 pl-40 pr-40">
|
<view v-if="useQuickNav" class="quick-nav flex flex-between round-3 ma-24 pa-24 pl-40 pr-40">
|
||||||
<view class="quick-nav-item flex flex-col flex-center" v-for="(nav, index) in quickNavList" :key="index" @click="fnToNavPage(nav)">
|
<view
|
||||||
|
class="quick-nav-item flex flex-col flex-center"
|
||||||
|
v-for="(nav, index) in quickNavList"
|
||||||
|
:key="index"
|
||||||
|
@click="fnToNavPage(nav)"
|
||||||
|
>
|
||||||
<view class="icon round-24 halocoloricon" :class="[nav.icon]"></view>
|
<view class="icon round-24 halocoloricon" :class="[nav.icon]"></view>
|
||||||
<view class="name text-size-s mt-8">{{ nav.text }}</view>
|
<view class="name text-size-s mt-8">{{ nav.text }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -80,7 +117,9 @@
|
|||||||
@click="fnOnNav(nav)"
|
@click="fnOnNav(nav)"
|
||||||
>
|
>
|
||||||
<template slot="rightValue">
|
<template slot="rightValue">
|
||||||
<button class="right-value-btn" v-if="nav.openType" :open-type="nav.openType">{{ nav.rightText }}</button>
|
<button class="right-value-btn" v-if="nav.openType" :open-type="nav.openType">
|
||||||
|
{{ nav.rightText }}
|
||||||
|
</button>
|
||||||
<text v-else>{{ nav.rightText }}</text>
|
<text v-else>{{ nav.rightText }}</text>
|
||||||
</template>
|
</template>
|
||||||
</tm-listitem>
|
</tm-listitem>
|
||||||
@@ -88,7 +127,9 @@
|
|||||||
</tm-grouplist>
|
</tm-grouplist>
|
||||||
</view>
|
</view>
|
||||||
<!-- 版权 -->
|
<!-- 版权 -->
|
||||||
<view v-if="showCopyright" class="copyright mt-40 text-size-xs text-align-center"><view class="">「 2022 uni-halo 丨 开源项目@小莫唐尼 」</view></view>
|
<view v-if="showCopyright" class="copyright mt-40 text-size-xs text-align-center">
|
||||||
|
<view class="">「 2022 uni-halo 丨 开源项目@小莫唐尼 」</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 名片 -->
|
<!-- 名片 -->
|
||||||
<tm-poup v-model="miniProfileCard.show" width="94vw" height="auto" :round="3" position="center">
|
<tm-poup v-model="miniProfileCard.show" width="94vw" height="auto" :round="3" position="center">
|
||||||
@@ -97,17 +138,35 @@
|
|||||||
<view class="left flex flex-col flex-center">
|
<view class="left flex flex-col flex-center">
|
||||||
<image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
|
<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="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-10 round-a-1 pa-2 pl-12 pr-12 text-size-s bg-gradient-light-blue-accent">
|
||||||
<view class="mt-6 text-size-xs text-align-center text-grey-darken-2">一个爱凑热闹的、喜欢捣鼓前端的博主。</view>
|
前端摸鱼大师
|
||||||
|
</view>
|
||||||
|
<view class="mt-6 text-size-xs text-align-center text-grey-darken-2">
|
||||||
|
一个爱凑热闹的、喜欢捣鼓前端的博主。
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right flex flex-col pl-12">
|
<view class="right flex flex-col pl-12">
|
||||||
<view class="label text-size-s text-weight-b">爱好:摸鱼、打游戏、听音乐、逛B站</view>
|
<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="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="mt-12 text-size-m text-weight-b text-grey-darken-2">精选图片</view>
|
||||||
<view class="photos mt-6 flex ">
|
<view class="photos mt-6 flex ">
|
||||||
<image class="photos-img round-2" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
|
<image
|
||||||
<image class="photos-img round-2" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
|
class="photos-img round-2"
|
||||||
<image class="photos-img round-2" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
|
: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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -386,7 +445,8 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
uni.clearStorageSync();
|
uni.clearStorageSync();
|
||||||
this.navList.find(x => x.key == 'cache').rightText = uni.getStorageInfoSync().currentSize + 'KB';
|
this.navList.find(x => x.key == 'cache').rightText =
|
||||||
|
uni.getStorageInfoSync().currentSize + 'KB';
|
||||||
})
|
})
|
||||||
.catch(err => {});
|
.catch(err => {});
|
||||||
break;
|
break;
|
||||||
@@ -417,6 +477,18 @@ export default {
|
|||||||
|
|
||||||
// 快捷导航页面跳转
|
// 快捷导航页面跳转
|
||||||
fnToNavPage(item) {
|
fnToNavPage(item) {
|
||||||
|
// 判断是内置页面还是网页
|
||||||
|
if (this.$utils.checkIsUrl(item.path)) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
'/pagesC/website/website?data=' +
|
||||||
|
JSON.stringify({
|
||||||
|
title: item.text || this.$haloConfig.title,
|
||||||
|
url: item.path
|
||||||
|
})
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case 'tabbar':
|
case 'tabbar':
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="博主还没有文章分类~"></tm-empty>
|
<tm-empty icon="icon-shiliangzhinengduixiang-" label="博主还没有文章分类~"></tm-empty>
|
||||||
</view>
|
</view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<tm-sliderNav :list="categoryList" color="light-blue" rang-key="name" @change="fnOnCategoryChange"></tm-sliderNav>
|
<tm-sliderNav :list="categoryList" bg-color="white" color="light-blue" rang-key="name" @change="fnOnCategoryChange"></tm-sliderNav>
|
||||||
<scroll-view
|
<scroll-view
|
||||||
class="right-content pt-12 pb-12"
|
class="right-content pt-12 pb-12"
|
||||||
:scroll-y="true"
|
:scroll-y="true"
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
:refresher-enabled="true"
|
:refresher-enabled="true"
|
||||||
:refresher-triggered="triggered"
|
:refresher-triggered="triggered"
|
||||||
:refresher-threshold="60"
|
:refresher-threshold="60"
|
||||||
|
refresher-background="#fafafa"
|
||||||
@refresherrefresh="fnGetData(true)"
|
@refresherrefresh="fnGetData(true)"
|
||||||
@scrolltolower="fnGetData(false)"
|
@scrolltolower="fnGetData(false)"
|
||||||
@scroll="fnOnScroll"
|
@scroll="fnOnScroll"
|
||||||
@@ -235,6 +236,7 @@ export default {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app-page" :class="{ 'is-balck grey-darken-6': isBlackTheme }">
|
<view class="app-page">
|
||||||
<!-- 顶部切换 -->
|
<!-- 顶部切换 -->
|
||||||
<view class="e-fixed" v-if="category.list.length > 2">
|
<view class="e-fixed" v-if="category.list.length > 2">
|
||||||
<tm-tabs color="light-blue" v-model="category.activeIndex" :list="category.list" align="left" @change="fnOnCategoryChange"></tm-tabs>
|
<tm-tabs color="light-blue" v-model="category.activeIndex" :list="category.list" align="left" @change="fnOnCategoryChange"></tm-tabs>
|
||||||
@@ -9,14 +9,12 @@
|
|||||||
<!-- 加载区域 -->
|
<!-- 加载区域 -->
|
||||||
<view v-if="loading != 'success'" class="loading-wrap">
|
<view v-if="loading != 'success'" class="loading-wrap">
|
||||||
<tm-skeleton model="card"></tm-skeleton>
|
<tm-skeleton model="card"></tm-skeleton>
|
||||||
<tm-skeleton model="cardActions"></tm-skeleton>
|
<tm-skeleton model="card"></tm-skeleton>
|
||||||
<tm-skeleton model="list"></tm-skeleton>
|
<tm-skeleton model="card"></tm-skeleton>
|
||||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
<tm-skeleton model="card"></tm-skeleton>
|
||||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
|
||||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 内容区域 -->
|
<!-- 内容区域 -->
|
||||||
<view class="content" v-else :class="{ 'bg-white': dataList.length !== 0 }">
|
<view class="content" v-else>
|
||||||
<view v-if="dataList.length == 0" class="content-empty">
|
<view v-if="dataList.length == 0" class="content-empty">
|
||||||
<!-- 空布局 -->
|
<!-- 空布局 -->
|
||||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="博主还没有分享图片~"></tm-empty>
|
<tm-empty icon="icon-shiliangzhinengduixiang-" label="博主还没有分享图片~"></tm-empty>
|
||||||
@@ -25,7 +23,7 @@
|
|||||||
<tm-flowLayout v-if="globalAppSettings.gallery.useWaterfull" @click="fnOnClick" ref="wafll">
|
<tm-flowLayout v-if="globalAppSettings.gallery.useWaterfull" @click="fnOnClick" ref="wafll">
|
||||||
<template v-slot:left="{ hdata }">
|
<template v-slot:left="{ hdata }">
|
||||||
<tm-translate animation-name="fadeUp">
|
<tm-translate animation-name="fadeUp">
|
||||||
<view class="round-3 shadow-2 overflow white">
|
<view class="card round-3 overflow white">
|
||||||
<tm-images :previmage="false" :src="hdata.item.image" @click="fnPreview(hdata.item)"></tm-images>
|
<tm-images :previmage="false" :src="hdata.item.image" @click="fnPreview(hdata.item)"></tm-images>
|
||||||
<view class="pa-10 text-size-s">
|
<view class="pa-10 text-size-s">
|
||||||
<view class="text-overflow-2">
|
<view class="text-overflow-2">
|
||||||
@@ -50,7 +48,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:right="{ hdata }">
|
<template v-slot:right="{ hdata }">
|
||||||
<tm-translate animation-name="fadeUp">
|
<tm-translate animation-name="fadeUp">
|
||||||
<view class="round-3 shadow-2 overflow white">
|
<view class="card round-3 overflow white">
|
||||||
<tm-images :previmage="false" :src="hdata.item.image" @click="fnPreview(hdata.item)"></tm-images>
|
<tm-images :previmage="false" :src="hdata.item.image" @click="fnPreview(hdata.item)"></tm-images>
|
||||||
<view class="pa-10 text-size-s">
|
<view class="pa-10 text-size-s">
|
||||||
<view class="text-overflow-2">
|
<view class="text-overflow-2">
|
||||||
@@ -78,7 +76,7 @@
|
|||||||
<block v-for="(item, index) in dataList" :key="index">
|
<block v-for="(item, index) in dataList" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
||||||
<view class="round-3 shadow-2 overflow white mb-24">
|
<view class="round-3 shadow-2 overflow white mb-24">
|
||||||
<tm-images :previmage="false" :src="item.image" @click="fnPreview(item, index)"></tm-images>
|
<tm-images :previmage="false" :src="item.image" @click="fnPreview(item)"></tm-images>
|
||||||
<view class="pa-24 text-size-m">
|
<view class="pa-24 text-size-m">
|
||||||
<view class="text-overflow-2">
|
<view class="text-overflow-2">
|
||||||
<tm-tags :shadow="0" :dense="true" color="bg-gradient-amber-accent" size="s" model="fill">{{ item.team }}</tm-tags>
|
<tm-tags :shadow="0" :dense="true" color="bg-gradient-amber-accent" size="s" model="fill">{{ item.team }}</tm-tags>
|
||||||
@@ -281,13 +279,11 @@ export default {
|
|||||||
console.log('点击数据', data);
|
console.log('点击数据', data);
|
||||||
},
|
},
|
||||||
// 预览
|
// 预览
|
||||||
fnPreview(item, index) {
|
fnPreview(item) {
|
||||||
if (!index) {
|
const index = this.cache.dataList.findIndex(x => x.id == item.id);
|
||||||
index = this.dataList.findIndex(x => x.id == item.id);
|
|
||||||
}
|
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: index,
|
current: index,
|
||||||
urls: this.dataList.map(x => x.image),
|
urls: this.cache.dataList.map(x => x.image),
|
||||||
indicator: 'number',
|
indicator: 'number',
|
||||||
loop: true
|
loop: true
|
||||||
});
|
});
|
||||||
@@ -303,7 +299,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-bottom: 24rpx;
|
padding-bottom: 24rpx;
|
||||||
background-color: #fafafd;
|
background-color: #fafafa;
|
||||||
|
|
||||||
&.is-balck {
|
&.is-balck {
|
||||||
background-color: #212121;
|
background-color: #212121;
|
||||||
@@ -325,4 +321,7 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
|
.card {
|
||||||
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -13,16 +13,34 @@
|
|||||||
|
|
||||||
<!-- 如果只有一个分组:使用列表的形式 result.length == 1 -->
|
<!-- 如果只有一个分组:使用列表的形式 result.length == 1 -->
|
||||||
<view v-else-if="result.length == 1" class="flex flex-col pb-24">
|
<view v-else-if="result.length == 1" class="flex flex-col pb-24">
|
||||||
<block v-for="(item, index) in result[0].children" :key="index">
|
<block v-for="(link, index) in result[0].children" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
||||||
<view class="link-card one round-a-6 flex ma-24 mb-0 pa-24" @click="fnOnLinkEvent(item)">
|
<!-- 色彩版本 -->
|
||||||
<cache-image class="logo shadow-2" radius="12rpx" width="80rpx" height="80rpx" :url="item.logo" :fileMd5="item.logo" mode="aspectFill"></cache-image>
|
<view
|
||||||
|
v-if="!globalAppSettings.links.useSimple"
|
||||||
|
class="info flex pt-24 pb-24 pl-12 pr-12 border-b-1"
|
||||||
|
:class="{ 'border-b-1': index != team.children.length - 1 }"
|
||||||
|
@click="fnOnLinkEvent(link)"
|
||||||
|
>
|
||||||
|
<view class="link-logo"><cache-image class="link-logo_img" radius="12rpx" :url="link.logo" :fileMd5="link.logo" mode="aspectFill"></cache-image></view>
|
||||||
|
<view class="flex flex-col pl-30 info-detail">
|
||||||
|
<view class="link-card_name text-size-l text-weight-b text-red">{{ link.name }}</view>
|
||||||
|
<view class="poup-tag ml--10 mt-6">
|
||||||
|
<tm-tags color="bg-gradient-amber-accent" :shadow="0" size="s" model="fill">ID:{{ link.id }}</tm-tags>
|
||||||
|
<tm-tags color=" bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">{{ link.team || '暂未分组' }}</tm-tags>
|
||||||
|
</view>
|
||||||
|
<view class="link-card_desc text-overflow text-size-s mt-4">博客简介:{{ link.description || '这个博主很懒,没写简介~' }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 简洁版本 -->
|
||||||
|
<view v-else class="link-card flex ml-24 mr-24 pt-24 pb-24" @click="fnOnLinkEvent(link)">
|
||||||
|
<image class="logo shadow-6" :src="link.logo" mode="aspectFill"></image>
|
||||||
<view class="info pl-24">
|
<view class="info pl-24">
|
||||||
<view class="name text-size-g">{{ item.name }}</view>
|
<view class="name text-size-g">{{ link.name }}</view>
|
||||||
<view class="desc mt-12 text-size-s text-grey-darken-1">{{ item.description }}</view>
|
<view class="desc mt-12 text-size-s text-grey-darken-1">{{ link.description }}</view>
|
||||||
<view class="link mt-12 text-size-m text-grey-darken-1">
|
<view v-if="false" class="link mt-12 text-size-m text-grey-darken-1">
|
||||||
<text class="iconfont icon-link mr-6 text-size-s"></text>
|
<text class="iconfont icon-link mr-6 text-size-s"></text>
|
||||||
{{ item.url }}
|
{{ link.url }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -51,7 +69,7 @@
|
|||||||
<view class="link-card_name text-size-l text-weight-b text-red">{{ link.name }}</view>
|
<view class="link-card_name text-size-l text-weight-b text-red">{{ link.name }}</view>
|
||||||
<view class="poup-tag ml--10 mt-6">
|
<view class="poup-tag ml--10 mt-6">
|
||||||
<tm-tags color="bg-gradient-amber-accent" :shadow="0" size="s" model="fill">ID:{{ link.id }}</tm-tags>
|
<tm-tags color="bg-gradient-amber-accent" :shadow="0" size="s" model="fill">ID:{{ link.id }}</tm-tags>
|
||||||
<tm-tags color=" bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">{{ link.team }}</tm-tags>
|
<tm-tags color=" bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">{{ link.team || '暂未分组' }}</tm-tags>
|
||||||
</view>
|
</view>
|
||||||
<view class="link-card_desc text-overflow text-size-s mt-4">博客简介:{{ link.description || '这个博主很懒,没写简介~' }}</view>
|
<view class="link-card_desc text-overflow text-size-s mt-4">博客简介:{{ link.description || '这个博主很懒,没写简介~' }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -86,7 +104,7 @@
|
|||||||
<view class="poup-name text-size-lg text-weight-b">{{ detail.data.name }}</view>
|
<view class="poup-name text-size-lg text-weight-b">{{ detail.data.name }}</view>
|
||||||
<view class="poup-tag ml--10">
|
<view class="poup-tag ml--10">
|
||||||
<tm-tags color="bg-gradient-amber-accent" size="n" model="fill">ID:{{ detail.data.id }}</tm-tags>
|
<tm-tags color="bg-gradient-amber-accent" size="n" model="fill">ID:{{ detail.data.id }}</tm-tags>
|
||||||
<tm-tags color="bg-gradient-light-blue-lighten" size="n" model="fill">{{ detail.data.team }}</tm-tags>
|
<tm-tags color="bg-gradient-light-blue-lighten" size="n" model="fill">{{ detail.data.team || '暂未分组' }}</tm-tags>
|
||||||
</view>
|
</view>
|
||||||
<view class="poup-link text-size-m" @click="fnCopyLink(detail.data)">
|
<view class="poup-link text-size-m" @click="fnCopyLink(detail.data)">
|
||||||
<text class="text-orange">{{ detail.data.url }}</text>
|
<text class="text-orange">{{ detail.data.url }}</text>
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
<view class="detail">
|
<view class="detail">
|
||||||
<view class="author">
|
<view class="author">
|
||||||
<text class="author-name">博主:{{ author.nickname }}</text>
|
<text class="author-name">博主:{{ author.nickname }}</text>
|
||||||
<text class="author-time">时间:{{ { d: result.createTime, f: 'yyyy年MM月dd日 星期w' } | formatTime }}</text>
|
<text class="author-time">
|
||||||
|
时间:{{ { d: result.createTime, f: 'yyyy年MM月dd日 星期w' } | formatTime }}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cover" v-if="result.thumbnail"><image class="cover-img" mode="aspectFill" :src="calcUrl(result.thumbnail)"></image></view>
|
<view class="cover" v-if="result.thumbnail">
|
||||||
|
<image class="cover-img" mode="aspectFill" :src="calcUrl(result.thumbnail)"></image>
|
||||||
|
</view>
|
||||||
<view class="count" :class="{ 'no-thumbnail': !result.thumbnail }">
|
<view class="count" :class="{ 'no-thumbnail': !result.thumbnail }">
|
||||||
<view class="count-item">
|
<view class="count-item">
|
||||||
<text class="value">{{ result.visits }}</text>
|
<text class="value">{{ result.visits }}</text>
|
||||||
@@ -42,14 +46,27 @@
|
|||||||
<text class="text-weight-b">分类:</text>
|
<text class="text-weight-b">分类:</text>
|
||||||
<text v-if="result.categories.length == 0" class="category-tag is-empty">未选择分类</text>
|
<text v-if="result.categories.length == 0" class="category-tag is-empty">未选择分类</text>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<text class="category-tag" v-for="(item, index) in result.categories" :key="index" @click="fnToCate(item)">{{ item.name }}</text>
|
<text
|
||||||
|
class="category-tag"
|
||||||
|
v-for="(item, index) in result.categories"
|
||||||
|
:key="index"
|
||||||
|
@click="fnToCate(item)"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-18 category-type">
|
<view class="mt-18 category-type">
|
||||||
<text class="text-weight-b">标签:</text>
|
<text class="text-weight-b">标签:</text>
|
||||||
<text v-if="result.tags.length == 0" class="category-tag is-empty">未选择标签</text>
|
<text v-if="result.tags.length == 0" class="category-tag is-empty">未选择标签</text>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<text class="category-tag" :style="{ backgroundColor: item.color }" v-for="(item, index) in result.tags" :key="index" @click="fnToTag(item)">
|
<text
|
||||||
|
class="category-tag"
|
||||||
|
:style="{ backgroundColor: item.color }"
|
||||||
|
v-for="(item, index) in result.tags"
|
||||||
|
:key="index"
|
||||||
|
@click="fnToTag(item)"
|
||||||
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</text>
|
</text>
|
||||||
</block>
|
</block>
|
||||||
@@ -76,14 +93,14 @@
|
|||||||
:selectable="true"
|
:selectable="true"
|
||||||
:tag-style="markdownConfig.tagStyle"
|
:tag-style="markdownConfig.tagStyle"
|
||||||
:container-style="markdownConfig.containStyle"
|
:container-style="markdownConfig.containStyle"
|
||||||
:content="result.content"
|
:content="result.content || result.formatContent"
|
||||||
:markdown="true"
|
:markdown="true"
|
||||||
:showLineNumber="true"
|
:showLineNumber="true"
|
||||||
:showLanguageName="true"
|
:showLanguageName="true"
|
||||||
:copyByLongPress="true"
|
:copyByLongPress="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 广告区域 -->
|
<!-- 广告区域:微信/decloud申请 -->
|
||||||
<view v-if="haloAdConfig.articleDetail.use" class="ad-wrap mt-24 mb-24 ">
|
<view v-if="haloAdConfig.articleDetail.use" class="ad-wrap mt-24 mb-24 ">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<ad v-if="haloAdConfig.unitId" :unit-id="haloAdConfig.unitId"></ad>
|
<ad v-if="haloAdConfig.unitId" :unit-id="haloAdConfig.unitId"></ad>
|
||||||
@@ -93,25 +110,73 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 广告区域:自定义广告位 -->
|
||||||
|
<view class="ad-card" v-if="haloAdConfig.articleDetail.custom.use">
|
||||||
|
<text class="ad-card_tip">广告</text>
|
||||||
|
<image
|
||||||
|
class="ad-card_cover"
|
||||||
|
:src="haloAdConfig.articleDetail.custom.cover"
|
||||||
|
mode="scaleToFill"
|
||||||
|
></image>
|
||||||
|
<view class="ad-card_info">
|
||||||
|
<view class="ad-card_info-title">{{ haloAdConfig.articleDetail.custom.title }}</view>
|
||||||
|
<view class="ad-card_info-desc">{{ haloAdConfig.articleDetail.custom.content }}</view>
|
||||||
|
<view
|
||||||
|
v-if="haloAdConfig.articleDetail.custom.url"
|
||||||
|
class="ad-card_info-link"
|
||||||
|
@click="fnToWebview(haloAdConfig.articleDetail.custom)"
|
||||||
|
>
|
||||||
|
立即查看
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 版权声明 -->
|
<!-- 版权声明 -->
|
||||||
<view v-if="copyright.use" class="copyright-wrap bg-white mt-24 pa-24 round-4">
|
<view v-if="copyright.use" class="copyright-wrap bg-white mt-24 pa-24 round-4">
|
||||||
<view class="copyright-title text-weight-b">版权信息</view>
|
<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
|
||||||
<view v-if="copyright.author" class="copyright-text text-size-s ">版权归属:{{ copyright.author }}</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.description" class="copyright-text text-size-s mt-12">版权说明:{{ copyright.description }}</view>
|
>
|
||||||
<view v-if="copyright.violation" class="copyright-text text-size-s mt-12 text-red">侵权处理:{{ copyright.violation }}</view>
|
<view v-if="copyright.author" class="copyright-text text-size-s ">
|
||||||
|
版权归属:{{ copyright.author }}
|
||||||
|
</view>
|
||||||
|
<view v-if="copyright.description" class="copyright-text text-size-s mt-12">
|
||||||
|
版权说明:{{ copyright.description }}
|
||||||
|
</view>
|
||||||
|
<view v-if="copyright.violation" class="copyright-text text-size-s mt-12 text-red">
|
||||||
|
侵权处理:{{ copyright.violation }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 评论展示区域 -->
|
<!-- 评论展示区域 -->
|
||||||
<view class="comment-wrap bg-white mt-24 pa-24 round-4">
|
<view class="comment-wrap bg-white mt-24 pa-24 round-4">
|
||||||
<commentList :disallowComment="result.disallowComment" :postId="result.id" :post="result" @on-comment-detail="fnOnShowCommentDetail"></commentList>
|
<commentList
|
||||||
|
:disallowComment="result.disallowComment"
|
||||||
|
:postId="result.id"
|
||||||
|
:post="result"
|
||||||
|
@on-comment-detail="fnOnShowCommentDetail"
|
||||||
|
@on-loaded="fnOnCommentLoaded"
|
||||||
|
></commentList>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 弹幕效果 -->
|
||||||
|
<barrage ref="barrage" :maxTop="240" :type="globalAppSettings.barrage.type"></barrage>
|
||||||
<!-- 返回顶部 -->
|
<!-- 返回顶部 -->
|
||||||
<tm-flotbutton :offset="[16, 80]" icon="icon-angle-up" color="bg-gradient-light-blue-accent" @click="fnToTopPage()"></tm-flotbutton>
|
<tm-flotbutton
|
||||||
<tm-flotbutton :actions="btnOption.actions" actions-pos="left" :show-text="true" color="bg-gradient-orange-accent" @change="fnOnFlotButtonChange"></tm-flotbutton>
|
:offset="[16, 80]"
|
||||||
|
icon="icon-angle-up"
|
||||||
|
color="bg-gradient-light-blue-accent"
|
||||||
|
@click="fnToTopPage()"
|
||||||
|
></tm-flotbutton>
|
||||||
|
<tm-flotbutton
|
||||||
|
:actions="btnOption.actions"
|
||||||
|
actions-pos="left"
|
||||||
|
:show-text="true"
|
||||||
|
color="bg-gradient-orange-accent"
|
||||||
|
@change="fnOnFlotButtonChange"
|
||||||
|
></tm-flotbutton>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<!-- 评论详情 -->
|
<!-- 评论详情 -->
|
||||||
@@ -119,7 +184,13 @@
|
|||||||
<view class="pa-24">
|
<view class="pa-24">
|
||||||
<view class="poup-head pb-24">
|
<view class="poup-head pb-24">
|
||||||
<view class="poup-title text-align-center text-size-g text-weight-b mb-32">评论详情</view>
|
<view class="poup-title text-align-center text-size-g text-weight-b mb-32">评论详情</view>
|
||||||
<comment-item :useContentBg="false" :useActions="false" :isChild="false" :comment="commentDetail.comment" :postId="result.id"></comment-item>
|
<comment-item
|
||||||
|
:useContentBg="false"
|
||||||
|
:useActions="false"
|
||||||
|
:isChild="false"
|
||||||
|
:comment="commentDetail.comment"
|
||||||
|
:postId="result.id"
|
||||||
|
></comment-item>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view :scroll-y="true" class="poup-body">
|
<scroll-view :scroll-y="true" class="poup-body">
|
||||||
@@ -130,7 +201,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-else-if="commentDetail.loading == 'error'" class="error">
|
<view v-else-if="commentDetail.loading == 'error'" class="error">
|
||||||
<tm-empty icon="icon-wind-cry" label="加载失败">
|
<tm-empty icon="icon-wind-cry" label="加载失败">
|
||||||
<tm-button theme="bg-gradient-light-blue-accent" size="m" v-if="!disallowComment" @click="fnGetChildComments()">刷新试试</tm-button>
|
<tm-button
|
||||||
|
theme="bg-gradient-light-blue-accent"
|
||||||
|
size="m"
|
||||||
|
v-if="!disallowComment"
|
||||||
|
@click="fnGetChildComments()"
|
||||||
|
>
|
||||||
|
刷新试试
|
||||||
|
</tm-button>
|
||||||
</tm-empty>
|
</tm-empty>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -166,9 +244,15 @@
|
|||||||
<block v-if="poster.showCanvas">
|
<block v-if="poster.showCanvas">
|
||||||
<r-canvas ref="rCanvas"></r-canvas>
|
<r-canvas ref="rCanvas"></r-canvas>
|
||||||
<view class="poster-save ma-24 mt-0 pt-20 flex flex-center">
|
<view class="poster-save ma-24 mt-0 pt-20 flex flex-center">
|
||||||
<tm-button theme="bg-gradient-light-blue-accent" size="m" @click="fnSavePoster()">保存到相册</tm-button>
|
<tm-button theme="bg-gradient-light-blue-accent" size="m" @click="fnSavePoster()">
|
||||||
<tm-button v-if="false" theme="bg-gradient-orange-accent" size="m" @click="fnShareTo()">分享给好友</tm-button>
|
保存到相册
|
||||||
<tm-button theme="bg-gradient-blue-grey-accent" size="m" @click="fnOnPosterClose()">关 闭</tm-button>
|
</tm-button>
|
||||||
|
<tm-button v-if="false" theme="bg-gradient-orange-accent" size="m" @click="fnShareTo()">
|
||||||
|
分享给好友
|
||||||
|
</tm-button>
|
||||||
|
<tm-button theme="bg-gradient-blue-grey-accent" size="m" @click="fnOnPosterClose()">
|
||||||
|
关 闭
|
||||||
|
</tm-button>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@@ -190,6 +274,9 @@ import commentList from '@/components/comment-list/comment-list.vue';
|
|||||||
import commentItem from '@/components/comment-item/comment-item.vue';
|
import commentItem from '@/components/comment-item/comment-item.vue';
|
||||||
|
|
||||||
import rCanvas from '@/components/r-canvas/r-canvas.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';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
tmSkeleton,
|
tmSkeleton,
|
||||||
@@ -200,8 +287,10 @@ export default {
|
|||||||
mpHtml,
|
mpHtml,
|
||||||
commentList,
|
commentList,
|
||||||
commentItem,
|
commentItem,
|
||||||
rCanvas
|
rCanvas,
|
||||||
|
barrage
|
||||||
},
|
},
|
||||||
|
mixins: [haloWxShareMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: 'loading',
|
loading: 'loading',
|
||||||
@@ -283,7 +372,14 @@ export default {
|
|||||||
this.result = res.data;
|
this.result = res.data;
|
||||||
this.fnSetPageTitle('文章详情');
|
this.fnSetPageTitle('文章详情');
|
||||||
this.loading = 'success';
|
this.loading = 'success';
|
||||||
this.fnSetWxShareInfo();
|
this.fnSetWxShareConfig({
|
||||||
|
title: this.result.title,
|
||||||
|
desc: this.result.summary,
|
||||||
|
imageUrl: this.$utils.checkThumbnailUrl(this.result.thumbnail),
|
||||||
|
path: `/pagesA/article-detail/article-detail?articleId=${this.queryParams.articleId}`,
|
||||||
|
copyLink: this.$haloConfig.apiUrl,
|
||||||
|
query: {}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.loading = 'error';
|
this.loading = 'error';
|
||||||
@@ -293,19 +389,7 @@ export default {
|
|||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fnSetWxShareInfo() {
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
uni.$tm.vx.commit('setWxShare', {
|
|
||||||
title: this.result.title,
|
|
||||||
desc: this.result.summary,
|
|
||||||
// imageUrl: this.poster.res.tempFilePath,
|
|
||||||
imageUrl: this.$utils.checkThumbnailUrl(this.result.thumbnail),
|
|
||||||
path: `/pagesA/article-detail/article-detail?articleId=${this.queryParams.articleId}`,
|
|
||||||
copyLink: this.$haloConfig.apiUrl,
|
|
||||||
query: {}
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
// 浮动按钮点击
|
// 浮动按钮点击
|
||||||
fnOnFlotButtonChange(index) {
|
fnOnFlotButtonChange(index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
@@ -382,6 +466,8 @@ export default {
|
|||||||
fnCreatePoster(callback) {
|
fnCreatePoster(callback) {
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
const systemInfo = await uni.getSystemInfoSync();
|
const systemInfo = await uni.getSystemInfoSync();
|
||||||
|
const _bloggerAvatar = this.$utils.checkAvatarUrl(this.bloggerInfo.avatar, true);
|
||||||
|
const _articleCover = this.$utils.checkThumbnailUrl(this.result.thumbnail, true);
|
||||||
// 初始化
|
// 初始化
|
||||||
await this.$refs.rCanvas.init({
|
await this.$refs.rCanvas.init({
|
||||||
canvas_id: 'rCanvas',
|
canvas_id: 'rCanvas',
|
||||||
@@ -406,11 +492,10 @@ export default {
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
console.log(this.$utils.checkAvatarUrl(this.bloggerInfo.avatar, true));
|
|
||||||
// 博主信息
|
// 博主信息
|
||||||
await this.$refs.rCanvas
|
await this.$refs.rCanvas
|
||||||
.drawImage({
|
.drawImage({
|
||||||
url: this.$utils.checkAvatarUrl(this.bloggerInfo.avatar, true),
|
url: _bloggerAvatar,
|
||||||
x: 12,
|
x: 12,
|
||||||
y: 12,
|
y: 12,
|
||||||
w: 48,
|
w: 48,
|
||||||
@@ -457,7 +542,7 @@ export default {
|
|||||||
// 文章封面图
|
// 文章封面图
|
||||||
await this.$refs.rCanvas
|
await this.$refs.rCanvas
|
||||||
.drawImage({
|
.drawImage({
|
||||||
url: this.$utils.checkThumbnailUrl(this.result.thumbnail),
|
url: _articleCover,
|
||||||
x: 12,
|
x: 12,
|
||||||
y: 75,
|
y: 75,
|
||||||
w: 312,
|
w: 312,
|
||||||
@@ -629,6 +714,60 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pagesA/tag-detail/tag-detail?id=${tag.id}&slug=${tag.slug}&name=${tag.name}`
|
url: `/pagesA/tag-detail/tag-detail?id=${tag.id}&slug=${tag.slug}&name=${tag.name}`
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
async fnOnCommentLoaded(data) {
|
||||||
|
const _list = [];
|
||||||
|
const _handleData = list => {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
if (list.length == 0) {
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
list.forEach(item => {
|
||||||
|
_list.push(item);
|
||||||
|
if (item.children && item.children.length != 0) {
|
||||||
|
_handleData(item.children);
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
await _handleData(data);
|
||||||
|
if (this.globalAppSettings.barrage.use) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (_list.length != 0) {
|
||||||
|
_handleAddBarrage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const _handleRemove = () => {
|
||||||
|
this.$refs['barrage'].remove({
|
||||||
|
duration: 5000, // 延迟关闭的时间
|
||||||
|
speed: 600 // 弹幕消失的速度
|
||||||
|
});
|
||||||
|
};
|
||||||
|
let index = 0;
|
||||||
|
const _handleAddBarrage = () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs['barrage'].add(_list[index]);
|
||||||
|
index += 1;
|
||||||
|
if (index < _list.length - 1) {
|
||||||
|
_handleAddBarrage();
|
||||||
|
} else {
|
||||||
|
_handleRemove();
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
fnToWebview(data) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
'/pagesC/website/website?data=' +
|
||||||
|
JSON.stringify({
|
||||||
|
title: data.title,
|
||||||
|
url: data.url
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,377 @@
|
|||||||
|
<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 class="loadig-text ">相册正在努力加载中啦~</view>
|
||||||
|
</view>
|
||||||
|
<tm-empty v-else icon="icon-shiliangzhinengduixiang-" color="red" label="啊偶,加载失败了呢~">
|
||||||
|
<tm-button theme="red" :shadow="0" size="m" @click="fnRefresh()">刷新试试</tm-button>
|
||||||
|
</tm-empty>
|
||||||
|
</view>
|
||||||
|
<!-- 内容区域 -->
|
||||||
|
<view v-else class="app-page-content">
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</block>
|
||||||
|
</swiper>
|
||||||
|
<view class="tabbar">
|
||||||
|
<view class="pre" @click="fnChange(false)">
|
||||||
|
<text class="icon"><text class="iconfont icon-arrow-left"></text></text>
|
||||||
|
<text class="text">上一张</text>
|
||||||
|
</view>
|
||||||
|
<view class="refresh" @click="fnRefresh()">
|
||||||
|
<text class="refresh-text">点击</text>
|
||||||
|
<text class="refresh-heart iconfont icon-diagnose"></text>
|
||||||
|
<text class="refresh-text">刷新</text>
|
||||||
|
</view>
|
||||||
|
<view class="next" @click="fnChange(true)">
|
||||||
|
<text class="text">下一张</text>
|
||||||
|
<text class="icon"><text class="iconfont icon-arrow-right"></text></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</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';
|
||||||
|
import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
|
||||||
|
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
tmButton,
|
||||||
|
tmFlotbutton,
|
||||||
|
tmTranslate,
|
||||||
|
tmEmpty
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: 'loading',
|
||||||
|
loveConfig: LoveConfig,
|
||||||
|
queryParams: {
|
||||||
|
size: 99,
|
||||||
|
page: 0,
|
||||||
|
sort: 'takeTime',
|
||||||
|
team: LoveConfig.albumKeyName
|
||||||
|
},
|
||||||
|
result: {},
|
||||||
|
dataList: [],
|
||||||
|
cache: {
|
||||||
|
dataList: [],
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
swiperIndex: 0,
|
||||||
|
tabbar: {
|
||||||
|
list: []
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad() {
|
||||||
|
this.fnSetPageTitle('恋爱相册');
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fnGetData();
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.fnRefresh();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
fnRefresh() {
|
||||||
|
this.queryParams.page = 0;
|
||||||
|
this.fnGetData();
|
||||||
|
},
|
||||||
|
fnGetData() {
|
||||||
|
this.loading = 'loading';
|
||||||
|
this.$httpApi
|
||||||
|
.getPhotoListByPage(this.queryParams)
|
||||||
|
.then(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
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');
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
this.dataList = _list;
|
||||||
|
this.swiperIndex = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.loading = 'error';
|
||||||
|
uni.$tm.toast('加载失败,请下拉刷新重试!');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
this.loading = 'error';
|
||||||
|
uni.$tm.toast('加载失败,请下拉刷新重试!');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 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,
|
||||||
|
urls: this.dataList.map(x => x.image)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fnOnChange(e) {
|
||||||
|
this.swiperIndex = e.detail.current;
|
||||||
|
},
|
||||||
|
fnChange(isNext) {
|
||||||
|
throttle(() => {
|
||||||
|
if (isNext) {
|
||||||
|
if (this.swiperIndex == this.dataList.length - 1) {
|
||||||
|
this.swiperIndex = 0;
|
||||||
|
} else {
|
||||||
|
this.swiperIndex += 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.swiperIndex == 0) {
|
||||||
|
this.swiperIndex = this.dataList.length - 1;
|
||||||
|
} else {
|
||||||
|
this.swiperIndex -= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-page {
|
||||||
|
width: 100vw;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 24rpx 0;
|
||||||
|
padding-bottom: 144rpx;
|
||||||
|
background: linear-gradient(
|
||||||
|
-135deg,
|
||||||
|
rgba(247, 149, 51, 0.1),
|
||||||
|
rgba(243, 112, 85, 0.1) 15%,
|
||||||
|
rgba(239, 78, 123, 0.1) 30%,
|
||||||
|
rgba(161, 102, 171, 0.1) 44%,
|
||||||
|
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)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
.app-page-content {
|
||||||
|
}
|
||||||
|
.loading-wrap {
|
||||||
|
width: 100vw;
|
||||||
|
height: 60vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 36rpx;
|
||||||
|
|
||||||
|
::v-deep {
|
||||||
|
.tm-icons {
|
||||||
|
margin-right: -20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.e-loading-icon {
|
||||||
|
font-size: 120rpx;
|
||||||
|
// color: #f88ca2;
|
||||||
|
color: #56bbf9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loadig-text {
|
||||||
|
margin-top: 28rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
// color: #f88ca2;
|
||||||
|
color: #56bbf9;
|
||||||
|
}
|
||||||
|
.content-empty {
|
||||||
|
width: 100%;
|
||||||
|
height: 60vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-album {
|
||||||
|
width: 100vw;
|
||||||
|
height: calc(100vh - 24rpx - 144rpx);
|
||||||
|
}
|
||||||
|
.swiper-album-item {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 36rpx;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
padding-bottom: 110rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef H5 */
|
||||||
|
padding-bottom: 60rpx;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
.scroll-wrap {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 36rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
// height: 65vh;
|
||||||
|
height: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
// 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;
|
||||||
|
justify-content: center;
|
||||||
|
flex-grow: 1;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tabbar {
|
||||||
|
width: 90vw;
|
||||||
|
position: fixed;
|
||||||
|
left: 50%;
|
||||||
|
bottom: 40rpx;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
border-radius: 25rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
// background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app-page">
|
||||||
|
<view class="page-title">我们的故事</view>
|
||||||
|
<view class="html-typed" v-html="html">内容渲染</view>
|
||||||
|
|
||||||
|
<scroll-btn bottom="160rpx" :scrollTop.sync="scrollTop"></scroll-btn>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import LoveConfig from '@/config/love.config.js';
|
||||||
|
import ScrollBtn from '@/components/scroll-btn/scroll-btn.vue';
|
||||||
|
export default {
|
||||||
|
components: { ScrollBtn },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
scrollTop: 0,
|
||||||
|
html: '',
|
||||||
|
timer: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fnInit();
|
||||||
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
this.scrollTop = e.scrollTop;
|
||||||
|
},
|
||||||
|
onBackPress() {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fnInit() {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
const _html = LoveConfig.journey;
|
||||||
|
let _index = 0;
|
||||||
|
const _typing = () => {
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
if (_index >= _html.length) {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
} else {
|
||||||
|
this.html += _html.substring(_index, _index + 1);
|
||||||
|
_index += 1;
|
||||||
|
_typing();
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
};
|
||||||
|
_typing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.app-page {
|
||||||
|
width: 100vw;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 36rpx;
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
padding-top: 100rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
padding-top: 80rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef MP-WEIXIN */
|
||||||
|
padding-top: 120rpx;
|
||||||
|
/* #endif */
|
||||||
|
background: linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
rgba(247, 149, 51, 0.1),
|
||||||
|
rgba(243, 112, 85, 0.1) 15%,
|
||||||
|
rgba(239, 78, 123, 0.1) 30%,
|
||||||
|
rgba(161, 102, 171, 0.1) 44%,
|
||||||
|
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)
|
||||||
|
);
|
||||||
|
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;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,421 @@
|
|||||||
|
<template>
|
||||||
|
<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>
|
||||||
|
<view class="love-days">
|
||||||
|
<view class="tip-text">相恋</view>
|
||||||
|
<view class="number">
|
||||||
|
<text class="boy">-</text>
|
||||||
|
<text class="days">{{ calcLoveDays }}</text>
|
||||||
|
<text class="girl">-</text>
|
||||||
|
</view>
|
||||||
|
<view class="tip-text">天</view>
|
||||||
|
</view>
|
||||||
|
<image class="avatar" :src="loveConfig.girl.avatar" mode="scaleToFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="foot">
|
||||||
|
<view class="text" v-if="false">
|
||||||
|
我们已经相恋
|
||||||
|
<text class="number">- {{ calcLoveDays }} -</text>
|
||||||
|
天啦
|
||||||
|
</view>
|
||||||
|
看看我们的恋爱清单都完成了哪些吧
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="list.length == 0" class="list empty">
|
||||||
|
<view class="card">
|
||||||
|
<image class="empty-image" :src="loveConfig.loveImageUrl" mode="scaleToFill"></image>
|
||||||
|
<view class="empty-text">暂时还没有恋爱清单,快去制定你们的恋爱清单吧~</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="list">
|
||||||
|
<block v-for="(item, index) in list" :key="index">
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<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 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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<scroll-btn :scrollTop.sync="scrollTop" @on-status="fnOnScrollStatus"></scroll-btn>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import LoveConfig from '@/config/love.config.js';
|
||||||
|
import ScrollBtn from '@/components/scroll-btn/scroll-btn.vue';
|
||||||
|
export default {
|
||||||
|
components: { ScrollBtn },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isDoAni: true,
|
||||||
|
scrollTop: 0,
|
||||||
|
loveConfig: LoveConfig,
|
||||||
|
list: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
calcLoveDays() {
|
||||||
|
const formatStartDate = this.loveConfig.loveStartDate.replace(/-/g, '/');
|
||||||
|
const start = new Date(formatStartDate),
|
||||||
|
now = new Date();
|
||||||
|
const T = now.getTime() - start.getTime();
|
||||||
|
const i = 24 * 60 * 60 * 1000;
|
||||||
|
const d = T / i;
|
||||||
|
const D = Math.floor(d);
|
||||||
|
return D;
|
||||||
|
},
|
||||||
|
calcCardDelay() {
|
||||||
|
return index => {
|
||||||
|
return Math.random() * index + 1 + 's';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
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 => {
|
||||||
|
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;
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
fnOnScrollStatus(isEnd) {
|
||||||
|
this.isDoAni = isEnd;
|
||||||
|
},
|
||||||
|
fnOnTouchstart() {
|
||||||
|
this.isDoAni = false;
|
||||||
|
},
|
||||||
|
fnOnTouchend() {
|
||||||
|
this.isDoAni = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.app-page {
|
||||||
|
width: 100vw;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 36rpx;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
padding-top: 60rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef H5 */
|
||||||
|
padding-top: 180rpx;
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(247, 149, 51, 0.1),
|
||||||
|
rgba(243, 112, 85, 0.1) 15%,
|
||||||
|
rgba(239, 78, 123, 0.1) 30%,
|
||||||
|
rgba(161, 102, 171, 0.1) 44%,
|
||||||
|
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)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.love-card {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
padding-top: 66rpx;
|
||||||
|
padding-bottom: 52rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 4rpx solid rgba(96, 77, 68, 0.9);
|
||||||
|
border-color: #faf8eb;
|
||||||
|
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;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 6rpx solid rgba(255, 255, 255, 0.7);
|
||||||
|
|
||||||
|
&.boy {
|
||||||
|
border-color: #56bbf9;
|
||||||
|
}
|
||||||
|
&.girl {
|
||||||
|
border-color: #f88ca2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.love-days {
|
||||||
|
margin: 0 12rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
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;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.empty {
|
||||||
|
height: calc(100vh - 180rpx - 280rpx - 36rpx);
|
||||||
|
.card {
|
||||||
|
height: 100%;
|
||||||
|
padding: 100rpx;
|
||||||
|
margin-bottom: 0;
|
||||||
|
text-align: center;
|
||||||
|
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;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 24rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 4rpx solid rgba(96, 77, 68, 0.9);
|
||||||
|
border-color: #fff;
|
||||||
|
// background-color: #faf8eb;
|
||||||
|
background-color: #ffffff;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
.head {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.status {
|
||||||
|
width: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
.text {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #ffc6ba;
|
||||||
|
font-size: 24rpx;
|
||||||
|
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;
|
||||||
|
color: #555;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.actions {
|
||||||
|
width: 50rpx;
|
||||||
|
.icon {
|
||||||
|
display: inline-block;
|
||||||
|
width: 45rpx;
|
||||||
|
height: 45rpx;
|
||||||
|
background-color: rgba(96, 77, 68, 0.2);
|
||||||
|
border-radius: 50%;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 45rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
// background-color: #faf8eb;
|
||||||
|
background-color: rgba(96, 77, 68, 0.05);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 24rpx;
|
||||||
|
padding-bottom: 12rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes cardAni {
|
||||||
|
0% {
|
||||||
|
transform: translateY(0rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
transform: translateY(-10rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: translateY(0rpx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.desc {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 12rpx;
|
||||||
|
&-label {
|
||||||
|
color: #333;
|
||||||
|
width: 140rpx;
|
||||||
|
// font-weight: bold;
|
||||||
|
}
|
||||||
|
&-value {
|
||||||
|
width: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+340
-4
@@ -1,22 +1,358 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app-page bg-white flex flex-center"><text class="text-bg-gradient-red-accent-b">祝有情人👩❤👨终成眷属</text></view>
|
<view class="app-page bg-white">
|
||||||
|
<!-- 情侣信息 -->
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
<image class="like" :src="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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image class="wave-image" :src="loveConfig.waveImageUrl" mode="scaleToFill"></image>
|
||||||
|
</view>
|
||||||
|
<!-- 恋爱记时 -->
|
||||||
|
<view class="love-time-wrap">
|
||||||
|
<view class="title">{{ loveConfig.timeTitle }}</view>
|
||||||
|
<view class="content">
|
||||||
|
<text class="text">
|
||||||
|
第
|
||||||
|
<text class="number">{{ loveDayCount.d }}</text>
|
||||||
|
天
|
||||||
|
</text>
|
||||||
|
<text class="text">
|
||||||
|
<text class="number">{{ loveDayCount.h }}</text>
|
||||||
|
小时
|
||||||
|
</text>
|
||||||
|
<text class="text">
|
||||||
|
<text class="number">{{ loveDayCount.m }}</text>
|
||||||
|
分钟
|
||||||
|
</text>
|
||||||
|
<text class="text">
|
||||||
|
<text class="number">{{ loveDayCount.s }}</text>
|
||||||
|
秒
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 功能导航 -->
|
||||||
|
<view class="list-wrap">
|
||||||
|
<block v-for="(nav, index) in loveConfig.nav" :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="right">
|
||||||
|
<view class="name">{{ nav.title }}</view>
|
||||||
|
<view class="desc">{{ nav.desc }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import LoveConfig from '@/config/love.config.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
loveConfig: LoveConfig,
|
||||||
|
loveDayTimer: null,
|
||||||
|
loveDayCount: {
|
||||||
|
d: 0,
|
||||||
|
h: 0,
|
||||||
|
m: 0,
|
||||||
|
s: 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
loveWrapStyle() {
|
||||||
|
return {
|
||||||
|
backgroundImage: `url(${this.loveConfig.bgImageUrl})`
|
||||||
|
};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.fnSetPageTitle('恋爱日记');
|
this.fnSetPageTitle('恋爱日记');
|
||||||
|
this.fnInitLoveDayCount();
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
fnInitLoveDayCount() {
|
||||||
|
clearTimeout(this.loveDayTimer);
|
||||||
|
const _countDownFn = () => {
|
||||||
|
this.loveDayTimer = setTimeout(_countDownFn, 1000);
|
||||||
|
const formatStartDate = this.loveConfig.loveStartDate.replace(/-/g, '/');
|
||||||
|
const start = new Date(formatStartDate),
|
||||||
|
now = new Date();
|
||||||
|
const T = now.getTime() - start.getTime();
|
||||||
|
const i = 24 * 60 * 60 * 1000;
|
||||||
|
const d = T / i;
|
||||||
|
const D = Math.floor(d);
|
||||||
|
const h = (d - D) * 24;
|
||||||
|
const H = Math.floor(h);
|
||||||
|
const m = (h - H) * 60;
|
||||||
|
const M = Math.floor(m);
|
||||||
|
const s = (m - M) * 60;
|
||||||
|
const S = Math.floor(s);
|
||||||
|
this.loveDayCount = {
|
||||||
|
d: D,
|
||||||
|
h: H,
|
||||||
|
m: M,
|
||||||
|
s: S
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_countDownFn();
|
||||||
|
},
|
||||||
|
fnToPage(pageName) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pagesA/love/${pageName}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.app-page {
|
.app-page {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
|
background: linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
rgba(247, 149, 51, 0.1),
|
||||||
|
rgba(243, 112, 85, 0.1) 15%,
|
||||||
|
rgba(239, 78, 123, 0.1) 30%,
|
||||||
|
rgba(161, 102, 171, 0.1) 44%,
|
||||||
|
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)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lover-wrap {
|
||||||
|
position: relative;
|
||||||
|
width: 100vw;
|
||||||
|
height: 50vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 50% 50%;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
content: '';
|
||||||
|
background-color: rgba(255, 255, 255, 0.1);
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAKUlEQVQImU3IMREAIAgAwJfNkQCEsH8cijjpMf6vnXlQaIiJFx+omEBfmqIEZLe2jzcAAAAASUVORK5CYII=);
|
||||||
|
z-index: 0;
|
||||||
|
backdrop-filter: blur(4rpx);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: -60rpx;
|
||||||
|
width: 100vw;
|
||||||
|
height: 60rpx;
|
||||||
|
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
|
||||||
|
}
|
||||||
|
.lover-card {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 58%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 90vw;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
z-index: 2;
|
||||||
|
.avatar {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
// border: 8rpx solid transparent;
|
||||||
|
// 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;
|
||||||
|
color: #ffffff;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.like {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
animation: likeani 1s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.wave-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 120rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
mix-blend-mode: screen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.love-time-wrap {
|
||||||
|
margin-top: 80rpx;
|
||||||
|
width: 100vw;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 46rpx;
|
||||||
|
letter-spacing: 4rpx;
|
||||||
|
// background-image: linear-gradient(270deg, #ff4500, #ffa500, #ffd700, #90ee90, #00ffff, #1e90ff, #9370db, #ff69b4, #ff4500);
|
||||||
|
// -webkit-background-clip: text;
|
||||||
|
// color: #000;
|
||||||
|
color: #333;
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
// animation: loveTimeTitleAni 80s linear infinite;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.number {
|
||||||
|
margin: 0 8rpx;
|
||||||
|
font-size: 46rpx;
|
||||||
|
// color: #ff69b4;
|
||||||
|
color: #f83856;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrap {
|
||||||
|
margin-top: 75rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 36rpx;
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 28rpx 32rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
|
||||||
|
&: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;
|
||||||
|
flex-direction: column;
|
||||||
|
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;
|
||||||
|
color: #777777;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes likeani {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: scale(1.3);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes loveTimeTitleAni {
|
||||||
|
to {
|
||||||
|
background-position: -200rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes listItemAni1 {
|
||||||
|
0% {
|
||||||
|
transform: translateY(0rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
transform: translateY(-10rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: translateY(0rpx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -25,9 +25,10 @@
|
|||||||
<tm-input
|
<tm-input
|
||||||
name="status"
|
name="status"
|
||||||
required
|
required
|
||||||
title="首页布局"
|
title="首页文章布局"
|
||||||
placeholder="请选择首页布局"
|
placeholder="请选择首页文章布局"
|
||||||
disabled
|
disabled
|
||||||
|
align="right"
|
||||||
:value="homeLayout.selectLabel"
|
:value="homeLayout.selectLabel"
|
||||||
right-icon="icon-angle-right"
|
right-icon="icon-angle-right"
|
||||||
></tm-input>
|
></tm-input>
|
||||||
@@ -43,9 +44,10 @@
|
|||||||
<tm-input
|
<tm-input
|
||||||
name="status"
|
name="status"
|
||||||
required
|
required
|
||||||
title="卡片样式"
|
title="文章卡片样式"
|
||||||
placeholder="请选择文章卡片样式"
|
placeholder="请选择文章卡片样式"
|
||||||
disabled
|
disabled
|
||||||
|
align="right"
|
||||||
:value="articleCardStyle.selectLabel"
|
:value="articleCardStyle.selectLabel"
|
||||||
right-icon="icon-angle-right"
|
right-icon="icon-angle-right"
|
||||||
></tm-input>
|
></tm-input>
|
||||||
@@ -78,6 +80,29 @@
|
|||||||
<text class="text-size-m ">友链简洁模式</text>
|
<text class="text-size-m ">友链简洁模式</text>
|
||||||
<tm-switch v-model="appSettings.links.useSimple" color="light-blue" :text="['是', '否']"></tm-switch>
|
<tm-switch v-model="appSettings.links.useSimple" color="light-blue" :text="['是', '否']"></tm-switch>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="mx-32 mt-24 mb-0 border-b-1 pb-24 flex-between">
|
||||||
|
<text class="text-size-m">启用评论弹幕</text>
|
||||||
|
<tm-switch v-model="appSettings.barrage.use" color="light-blue" :text="['是', '否']"></tm-switch>
|
||||||
|
</view>
|
||||||
|
<tm-pickers
|
||||||
|
v-if="appSettings.barrage.use"
|
||||||
|
title="评论弹幕位置"
|
||||||
|
btn-color="light-blue"
|
||||||
|
:default-value.sync="barrage.selectDefault"
|
||||||
|
rang-key="name"
|
||||||
|
:list="barrage.list"
|
||||||
|
@confirm="fnOnBarrageConfirm"
|
||||||
|
>
|
||||||
|
<tm-input
|
||||||
|
name="status"
|
||||||
|
title="评论弹幕位置"
|
||||||
|
placeholder="请选择评论弹幕位置"
|
||||||
|
disabled
|
||||||
|
align="right"
|
||||||
|
:value="barrage.selectLabel"
|
||||||
|
right-icon="icon-angle-right"
|
||||||
|
></tm-input>
|
||||||
|
</tm-pickers>
|
||||||
<view class="mx-32 my-24 border-b-1 pb-24 flex-between">
|
<view class="mx-32 my-24 border-b-1 pb-24 flex-between">
|
||||||
<text class="text-size-m">是否圆形头像</text>
|
<text class="text-size-m">是否圆形头像</text>
|
||||||
<tm-switch v-model="appSettings.isAvatarRadius" color="light-blue" :text="['是', '否']"></tm-switch>
|
<tm-switch v-model="appSettings.isAvatarRadius" color="light-blue" :text="['是', '否']"></tm-switch>
|
||||||
@@ -173,7 +198,13 @@ export default {
|
|||||||
selectLabel: '左图右文',
|
selectLabel: '左图右文',
|
||||||
selectValue: 'lr_image_text'
|
selectValue: 'lr_image_text'
|
||||||
},
|
},
|
||||||
dotPositionList: [{ name: '右边', value: 'right', checked: true }, { name: '下边', value: 'bottom', checked: false }]
|
dotPositionList: [{ name: '右边', value: 'right', checked: true }, { name: '下边', value: 'bottom', checked: false }],
|
||||||
|
barrage: {
|
||||||
|
list: [{ name: '顶部', value: 'rightToLeft' }, { name: '左下', value: 'leftBottom' }],
|
||||||
|
selectDefault: ['顶部'],
|
||||||
|
selectLabel: '顶部',
|
||||||
|
selectValue: 'rightToLeft'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -219,6 +250,11 @@ export default {
|
|||||||
this.articleCardStyle.selectDefault = [_articleCardStyle.name];
|
this.articleCardStyle.selectDefault = [_articleCardStyle.name];
|
||||||
this.articleCardStyle.selectLabel = _articleCardStyle.name;
|
this.articleCardStyle.selectLabel = _articleCardStyle.name;
|
||||||
this.articleCardStyle.selectValue = _articleCardStyle.value;
|
this.articleCardStyle.selectValue = _articleCardStyle.value;
|
||||||
|
|
||||||
|
const _barrage = this.fnFindObjInList(this.barrage.list, 'value', this.appSettings.barrage.type);
|
||||||
|
this.barrage.selectDefault = [_barrage.name];
|
||||||
|
this.barrage.selectLabel = _barrage.name;
|
||||||
|
this.barrage.selectValue = _barrage.value;
|
||||||
},
|
},
|
||||||
// 在集合中找匹配的对象
|
// 在集合中找匹配的对象
|
||||||
fnFindObjInList(list, key, value) {
|
fnFindObjInList(list, key, value) {
|
||||||
@@ -249,10 +285,17 @@ export default {
|
|||||||
this.articleCardStyle.selectValue = _select.value;
|
this.articleCardStyle.selectValue = _select.value;
|
||||||
this.appSettings.layout.cardType = _select.value;
|
this.appSettings.layout.cardType = _select.value;
|
||||||
},
|
},
|
||||||
|
// 弹幕设置
|
||||||
|
fnOnBarrageConfirm(e) {
|
||||||
|
const _select = e[0].data;
|
||||||
|
this.barrage.selectDefault = [_select.name];
|
||||||
|
this.barrage.selectLabel = _select.name;
|
||||||
|
this.barrage.selectValue = _select.value;
|
||||||
|
this.appSettings.barrage.type = _select.value;
|
||||||
|
},
|
||||||
// 保存
|
// 保存
|
||||||
fnOnSave() {
|
fnOnSave() {
|
||||||
this.isSaved = true;
|
this.isSaved = true;
|
||||||
console.log('this.appSettings', this.appSettings);
|
|
||||||
this.$tm.vx.commit('setting/setSettings', this.appSettings);
|
this.$tm.vx.commit('setting/setSettings', this.appSettings);
|
||||||
uni.$tm.toast('保存成功,部分设置在重启后生效!');
|
uni.$tm.toast('保存成功,部分设置在重启后生效!');
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -4,4 +4,4 @@
|
|||||||
*
|
*
|
||||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||||
*/
|
*/
|
||||||
!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("./dayjs.min")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_zh_cn=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,_){switch(_){case"W":return e+"周";default:return e+"日"}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,_){var t=100*e+_;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d}));
|
!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("./dayjs.min")):"function"==typeof define&&define.amd?define(["./dayjs.min"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_zh_cn=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,_){switch(_){case"W":return e+"周";default:return e+"日"}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,_){var t=100*e+_;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d}));
|
||||||
+12
-5
@@ -35,6 +35,11 @@ export const _DefaultAppSettings = {
|
|||||||
timeout: 3, // 屏蔽广告时长,时间到后自动恢复展示(单位小时)
|
timeout: 3, // 屏蔽广告时长,时间到后自动恢复展示(单位小时)
|
||||||
disabled: false, // 是否屏蔽广告(看广告可以关闭应用内设置的广告)
|
disabled: false, // 是否屏蔽广告(看广告可以关闭应用内设置的广告)
|
||||||
},
|
},
|
||||||
|
// 评论弹幕(文章详情)
|
||||||
|
barrage: {
|
||||||
|
use: true, // 是否启用
|
||||||
|
type: 'leftBottom' // 弹幕位置(rightToLeft leftBottom)
|
||||||
|
},
|
||||||
gallery: {
|
gallery: {
|
||||||
// 是否使用瀑布流
|
// 是否使用瀑布流
|
||||||
useWaterfull: true
|
useWaterfull: true
|
||||||
@@ -56,17 +61,19 @@ export const _DefaultAppSettings = {
|
|||||||
contact: {
|
contact: {
|
||||||
// 链接是否使用复制的方式,否则直接在内部打开(小程序需要配置对应链接的业务域名)
|
// 链接是否使用复制的方式,否则直接在内部打开(小程序需要配置对应链接的业务域名)
|
||||||
isLinkCopy: true,
|
isLinkCopy: true,
|
||||||
}
|
},
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 应用设置存储key值
|
||||||
|
export const _AppSettingsKey = 'APP_GLOBAL_SETTINGS';
|
||||||
/**
|
/**
|
||||||
* 获取应用设置
|
* 获取应用设置
|
||||||
*/
|
*/
|
||||||
export const getAppSettings = () => {
|
export const getAppSettings = () => {
|
||||||
let _appSettings = uni.getStorageSync('APP_GLOBAL_SETTINGS')
|
let _appSettings = uni.getStorageSync(_AppSettingsKey)
|
||||||
if (_appSettings) return JSON.parse(_appSettings)
|
if (_appSettings) return JSON.parse(_appSettings)
|
||||||
|
|
||||||
uni.setStorageSync('APP_GLOBAL_SETTINGS', JSON.stringify(_DefaultAppSettings))
|
uni.setStorageSync(_AppSettingsKey, JSON.stringify(_DefaultAppSettings))
|
||||||
return _appSettings;
|
return _appSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,5 +81,5 @@ export const getAppSettings = () => {
|
|||||||
* 保存应用设置
|
* 保存应用设置
|
||||||
*/
|
*/
|
||||||
export const setAppSettings = (appSettings) => {
|
export const setAppSettings = (appSettings) => {
|
||||||
uni.setStorageSync('APP_GLOBAL_SETTINGS', JSON.stringify(appSettings))
|
uni.setStorageSync(_AppSettingsKey, JSON.stringify(appSettings))
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-7
@@ -32,7 +32,10 @@ const utils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 检查封面图
|
// 检查封面图
|
||||||
checkThumbnailUrl: function(thumbnail) {
|
checkThumbnailUrl: function(thumbnail, mustRealUrl = false) {
|
||||||
|
if (!thumbnail && mustRealUrl) {
|
||||||
|
return HaloConfig.defaultStaticThumbnailUrl
|
||||||
|
}
|
||||||
if (!HaloConfig.defaultThumbnailUrl) {
|
if (!HaloConfig.defaultThumbnailUrl) {
|
||||||
// logUtils.saveLog(logTypes.config, {
|
// logUtils.saveLog(logTypes.config, {
|
||||||
// path: 'checkThumbnailUrl',
|
// path: 'checkThumbnailUrl',
|
||||||
@@ -43,9 +46,9 @@ const utils = {
|
|||||||
let _url = HaloConfig.defaultThumbnailUrl
|
let _url = HaloConfig.defaultThumbnailUrl
|
||||||
if (_url) {
|
if (_url) {
|
||||||
if (_url.indexOf('?') == -1) {
|
if (_url.indexOf('?') == -1) {
|
||||||
_url += `&next-v=${new Date().getTime()}`
|
|
||||||
} else {
|
|
||||||
_url += `?next-v=${new Date().getTime()}`
|
_url += `?next-v=${new Date().getTime()}`
|
||||||
|
} else {
|
||||||
|
_url += `&next-v=${new Date().getTime()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!thumbnail) return _url;
|
if (!thumbnail) return _url;
|
||||||
@@ -58,9 +61,9 @@ const utils = {
|
|||||||
let _url = HaloConfig.defaultImageUrl
|
let _url = HaloConfig.defaultImageUrl
|
||||||
if (_url) {
|
if (_url) {
|
||||||
if (_url.indexOf('?') == -1) {
|
if (_url.indexOf('?') == -1) {
|
||||||
_url += `&next-v=${new Date().getTime()}`
|
|
||||||
} else {
|
|
||||||
_url += `?next-v=${new Date().getTime()}`
|
_url += `?next-v=${new Date().getTime()}`
|
||||||
|
} else {
|
||||||
|
_url += `&next-v=${new Date().getTime()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!image) return _url;
|
if (!image) return _url;
|
||||||
@@ -75,9 +78,9 @@ const utils = {
|
|||||||
let _url = HaloConfig.defaultAvatarUrl
|
let _url = HaloConfig.defaultAvatarUrl
|
||||||
if (_url) {
|
if (_url) {
|
||||||
if (_url.indexOf('?') == -1) {
|
if (_url.indexOf('?') == -1) {
|
||||||
_url += `&next-v=${new Date().getTime()}`
|
|
||||||
} else {
|
|
||||||
_url += `?next-v=${new Date().getTime()}`
|
_url += `?next-v=${new Date().getTime()}`
|
||||||
|
} else {
|
||||||
|
_url += `&next-v=${new Date().getTime()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _url;
|
return _url;
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/**
|
||||||
|
* 对象转换为url参数形式
|
||||||
|
* @param {Object} param 将要转换为URL参数的字符串对象
|
||||||
|
* @param {String} key URL 参数字符串的前缀
|
||||||
|
* @param {Boolean} encode 是否进行URL编码,默认为true
|
||||||
|
* @return {String} URL参数字符串
|
||||||
|
*/
|
||||||
|
export function jsonToUrlParams(param, key, encode) {
|
||||||
|
if (param == null) return '';
|
||||||
|
let paramStr = '';
|
||||||
|
let t = typeof(param);
|
||||||
|
if (t == 'string' || t == 'number' || t == 'boolean') {
|
||||||
|
paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param);
|
||||||
|
} else {
|
||||||
|
for (var i in param) {
|
||||||
|
var k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i);
|
||||||
|
paramStr += jsonToUrlParams(param[i], k, encode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return paramStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Array} actual
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
export function cleanArray(actual) {
|
||||||
|
const newArray = []
|
||||||
|
for (let i = 0; i < actual.length; i++) {
|
||||||
|
if (actual[i]) {
|
||||||
|
newArray.push(actual[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newArray
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* json对象转Url参数2
|
||||||
|
* @param {Object} json
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
export function jsonToUrlParams2(json) {
|
||||||
|
if (!json) return ''
|
||||||
|
return cleanArray(
|
||||||
|
Object.keys(json).map(key => {
|
||||||
|
if (json[key] === undefined) return ''
|
||||||
|
return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
|
||||||
|
})
|
||||||
|
).join('&')
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user