mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-07-27 04:20:43 +08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a81c506a14 | |||
| 70dc7cd0a7 | |||
| ee28753094 | |||
| 91923c0b42 | |||
| f6feecb324 | |||
| 6fdaeed792 | |||
| f838da43d8 | |||
| 21d723d260 | |||
| d701867b83 | |||
| 66f4ccffc0 | |||
| 9720743c80 | |||
| 6ba87b1972 |
@@ -14,6 +14,10 @@
|
|||||||
{
|
{
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
},
|
},
|
||||||
|
"mp-qq" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
"mp-weixin" :
|
"mp-weixin" :
|
||||||
{
|
{
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center"><b>uni-halo</b> 基于Halo一款现代化的开源博客/CMS系统API开发的多端系统,值得一试。</p>
|
<p align="center"><b>【uni-halo】</b> 基于 uniapp + Halo API 开发的多端项目,值得一试。</p>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -16,100 +16,107 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
如果您觉得这个项目对您有帮助,可以帮作者买杯饮料鼓励鼓励!
|
如果您觉得这个项目对您有帮助,可以帮作者买杯饮料鼓励鼓励,同时为了项目能够持续发展,可以根据您的喜好支持一下本项目哦,非常感谢您的支持,作者也会更有动力持续维护和更新新的功能哦~
|
||||||
|
|
||||||
|
|支付宝 |微信 |QQ |
|
||||||
|
|:--: |:--: |:--: |
|
||||||
|
|| | |
|
||||||
|
|
||||||
|
## 🧐 功能介绍
|
||||||
|
|
||||||
|
#### 🍻 基础功能
|
||||||
|
|
||||||
|
几乎实现PC端后台的全功能,让您在手机端也可以管理您的博客。
|
||||||
|
|
||||||
|
- 用户端:文章列表、文章分类、文章详情、图库、留言板、友链、个人日记等
|
||||||
|
- 管理端:资料修改、密码修改、日记管理、文章管理、分类管理、标签管理、附件管理、友链管理、评论管理、日志管理等
|
||||||
|
|
||||||
<table rules="none" align="center" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<center>
|
|
||||||
<img src="https://uni-halo.925i.cn/qrcode/zfb.png" width="100%" />
|
|
||||||
<br/>
|
<br/>
|
||||||
<font color="AAAAAA">支付宝打赏</font>
|
|
||||||
</center>
|
#### 💞 特色功能
|
||||||
</td>
|
|
||||||
<td>
|
- 恋爱日记:精心为您设计了秀恩爱的模块,秀出关于你们的故事、情侣甜蜜相册、恋爱记录清单,为您的恋爱保驾护航。
|
||||||
<center>
|
|
||||||
<img src="https://uni-halo.925i.cn/qrcode/wx.png" width="100%" />
|
|
||||||
<br/>
|
<br/>
|
||||||
<font color="AAAAAA">微信打赏</font>
|
|
||||||
</center>
|
## 😎 文档源码
|
||||||
</td>
|
|
||||||
<td>
|
- 作者博客:[https://b.925i.cn/](https://b.925i.cn/)
|
||||||
<center>
|
- 官方文档:[https://uni-halo.925i.cn/](https://uni-halo.925i.cn/)
|
||||||
<img src="https://uni-halo.925i.cn/qrcode/qq.png" width="100%" />
|
- Gitee :[https://gitee.com/ialley-workshop-open/uni-halo](https://gitee.com/ialley-workshop-open/uni-halo)
|
||||||
|
- Github :[https://github.com/ialley-workshop-open/uni-halo](https://github.com/ialley-workshop-open/uni-halo)
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<font color="AAAAAA">QQ打赏</font>
|
|
||||||
</center>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
## 😏 在线体验
|
||||||
|
|
||||||
## 🌸 快速开始
|
说明:微信扫码、或搜索【小莫唐尼】即可在线体验已上线小程序!!!
|
||||||
|
|
||||||
详细部署文档请查阅 [uni-halo-doc](https://uni-halo.925i.cn/)
|

|
||||||
|
|
||||||
- 1、拉取或下载项目<https://gitee.com/ialley-workshop-open/uni-halo>;
|
|
||||||
- 2、通过hbuilderx 导入项目;
|
|
||||||
- 3、命令行执行 npm i 安装依赖;
|
|
||||||
- 4、配置运行信息,找到项目根目录config目录,将`halo.config.template.js`修改为 `halo.config.js` 并设置相关信息;
|
|
||||||
- 5、点击hbuilderx 工具 右上角预览、或者点击工具栏 运行-内置浏览器运行;
|
|
||||||
- 6、项目发行:
|
|
||||||
- 发行小程序:点击工具栏 发行 -> 小程序-微信
|
|
||||||
- 发行APP: 点击工具栏 发行 -> 原生App-云打包
|
|
||||||
|
|
||||||
|
|
||||||
## ⭐️ 功能清单
|
|
||||||
|
|
||||||
### 用户部分
|
|
||||||
1. - [x] 文章分类
|
|
||||||
2. - [x] 文章详情&海报分享
|
|
||||||
3. - [x] 文章归档
|
|
||||||
4. - [x] 文章列表和搜索
|
|
||||||
5. - [x] 数据统计展示
|
|
||||||
6. - [x] 图库
|
|
||||||
7. - [x] 友链
|
|
||||||
8. - [x] 留言板
|
|
||||||
9. - [x] 个人日记
|
|
||||||
|
|
||||||
### 管理部分
|
|
||||||
1. - [x] 个人信息修改
|
|
||||||
2. - [x] 个人密码修改
|
|
||||||
3. - [x] 日记管理
|
|
||||||
4. - [x] 文章管理
|
|
||||||
5. - [x] 分类管理
|
|
||||||
6. - [x] 标签管理
|
|
||||||
7. - [x] 附件管理
|
|
||||||
8. - [x] 友链管理
|
|
||||||
9. - [x] 图库管理
|
|
||||||
10. - [x] 评论管理
|
|
||||||
11. - [x] 日志管理
|
|
||||||
12. - [ ] 菜单设置
|
|
||||||
13. - [ ] 系统设置
|
|
||||||
|
|
||||||
## 📃 TODO
|
|
||||||
1. - [ ] 暗黑模式
|
|
||||||
2. - [ ] 国际化
|
|
||||||
|
|
||||||
|
|
||||||
## 🌈 在线体验
|
|
||||||
|
|
||||||
微信小程序搜索:小莫唐尼
|
|
||||||
<br/>
|
<br/>
|
||||||

|
|
||||||
|
|
||||||
## 🌈 交流群
|
## 😘 界面预览
|
||||||
|
|
||||||
QQ群号:632969367
|
##### 📱 用户端
|
||||||
|
|
||||||
## 🔍 许可证
|
说明:以下仅为部分截图
|
||||||
|
|
||||||
|
|首页|分类|图库|友链|
|
||||||
|
|:--:|:--:|:--:|:--:|
|
||||||
|
|||||
|
||||||
|
|
||||||
|
|我的|归档|详情|留言板|
|
||||||
|
|:--:|:--:|:--:|:--:|
|
||||||
|
|||||
|
||||||
|
|
||||||
|
##### 💻 管理端
|
||||||
|
|
||||||
|
说明:以下仅为部分截图
|
||||||
|
|
||||||
|
|后台首页|文章管理|
|
||||||
|
|:--:|:--:|
|
||||||
|
|||
|
||||||
|
|
||||||
|
##### 📱 恋爱日记
|
||||||
|
|
||||||
|
说明:以下仅为部分截图
|
||||||
|
|
||||||
|
|主页 |恋爱相册 |恋爱清单 |
|
||||||
|
|:--: |:--: |-- |
|
||||||
|
| | | |
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 🙋 使用交流
|
||||||
|
|
||||||
|
- 提交 issues:[Github Issues](https://github.com/ialley-workshop-open/uni-halo/issues) 丨 [Gitee Issues](https://gitee.com/ialley-workshop-open/uni-halo/issues)
|
||||||
|
- 微信交流群:由于微信交流群时效性太短,所以有需要的话可以先加入QQ群,再邀请进微信群
|
||||||
|
- QQ 交流群:632969367
|
||||||
|
- 快速加群:[](https://qm.qq.com/cgi-bin/qm/qr?k=cuam7lhrB_vHuvjw2mzUO1sOKdF9KRyM&jump_from=webapi&authKey=d6bJhNaqupTTfoMDWDIeYUTAs44Ax7p64SsM/5NRtFhXE09YexDO15Izuyth6XAi)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 🎉 加入我们
|
||||||
|
|
||||||
|
uni-halo 还在持续更新中,本项目欢迎您的参与,共同维护,逐步完善,将项目做得更强。项目采用 AGPL-3.0 开源协议,本着一切免费的原则,原则上不会收取任何费用及版权,可以放心使用。
|
||||||
|
|
||||||
|
如果你想加入我们,可以多提供一些好的建议或者提交 pr,我们将会非常乐意接受您的建议和意见。
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## 🔍 开源许可
|
||||||
|
|
||||||
uni-halo 使用 AGPL-3.0 协议开源,请遵守开源协议。
|
uni-halo 使用 AGPL-3.0 协议开源,请遵守开源协议。
|
||||||
|
|
||||||
## 🏭 贡献
|
<br/>
|
||||||
|
|
||||||
贡献代码请查看 [代码贡献规范](https://uni-halo.925i.cn/standard/category.html)
|
## 🙋 致谢
|
||||||
|
uni-halo 得益于以下优秀的技术支撑,我只是站在巨人的肩膀上捡了几根头发丝,但是非常感谢这些优秀的项目,带给了我们其他开发者和用户非常友好的体验!
|
||||||
|
|
||||||
## 🙆♂ Halo
|
- [Halo:一款好用又强大的开源建站工具](https://halo.run/)
|
||||||
- 接口文档地址(内容端):<https://api.halo.run/content-api.html>
|
- [uni-app:是一个使用 Vue.js 开发所有前端应用的框架,开发者编写一套代码可编译到多个平台](https://uniapp.dcloud.net.cn/)
|
||||||
- 接口文档地址(管理端):<https://api.halo.run/admin-api.html>
|
- [tm-vuetify:是一个为 uni-app 平台定制的颜值也非常高的 UI 框架](https://www.jx2d.cn/)
|
||||||
|
- [mp-html:一个强大的小程序富文本组件](https://jin-yufeng.gitee.io/mp-html/#/)
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import HttpHandler from '@/common/http/request.js'
|
import HttpHandler from '@/common/http/request.js'
|
||||||
|
import { getCache } from '@/utils/storage.js'
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* 查询分类列表
|
* 查询分类列表
|
||||||
@@ -19,6 +20,8 @@ export default {
|
|||||||
* @param {Object} params 查询参数
|
* @param {Object} params 查询参数
|
||||||
*/
|
*/
|
||||||
getCategoryPostList: (slug, params) => {
|
getCategoryPostList: (slug, params) => {
|
||||||
|
// 从缓存中根据分类获取密码,如果获取到了说明本分类需要密码,避免多个分类需要密码在输入密码后刷新页面点错了分类
|
||||||
|
params.password = getCache('APP_CATEGORY_PWD_' + slug)
|
||||||
return HttpHandler.Get(`/api/content/categories/${slug}/posts`, params)
|
return HttpHandler.Get(`/api/content/categories/${slug}/posts`, params)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,54 @@ import {
|
|||||||
getAdminAccessToken
|
getAdminAccessToken
|
||||||
} from "@/utils/auth.js";
|
} from "@/utils/auth.js";
|
||||||
import {
|
import {
|
||||||
delCache
|
delCache,
|
||||||
|
setCache
|
||||||
} from "@/utils/storage";
|
} from "@/utils/storage";
|
||||||
|
|
||||||
|
const getCategoryNameByUrl = (url) => {
|
||||||
|
const reg = '(?<=/api/content/categories/).+(?=/posts)'
|
||||||
|
return url.match(reg)[0] || '无分类名'
|
||||||
|
}
|
||||||
|
const showCategoryInputPasswordModal = (response, category) => {
|
||||||
|
uni.showModal({
|
||||||
|
title: `[ ${category} ] 分类已加密`, // TODO 这里应该获取分类的名字,可以在弹窗之前请求后台拿到所有分类根据分类code拿到名称,但是不会在这之前发送请求
|
||||||
|
content: '',
|
||||||
|
editable: true,
|
||||||
|
placeholderText: '请输入分类密码后访问',
|
||||||
|
confirmText: '验证密码',
|
||||||
|
cancelText: '暂不访问',
|
||||||
|
showCancel: true,
|
||||||
|
cancelColor: '#999999',
|
||||||
|
confirmColor: '#03a9f4',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
// TODO 这里如果没有输入密码点击确认应该阻止窗口关闭,但是没找到方法
|
||||||
|
if (!res.content) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '提示:请输入密码',
|
||||||
|
icon: 'none',
|
||||||
|
success: () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
showCategoryInputPasswordModal(response, category);
|
||||||
|
}, 800)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 根据请求URL正则匹配分类code,然后把输入的密码根据分类code放入缓存,然后在category.getCategoryPostList中获取,解决多个分类加密输入密码后点错的问题
|
||||||
|
// 目前存在一个问题,比如前两个都需要密码,如果先输入第二个的密码之后,重新进来默认打开第一个还会弹窗,所以想在弹窗标题上增加分类名字
|
||||||
|
// 另外有以下两种方式科技解决
|
||||||
|
// TODO 1.其实这里获取到密码之后可以直接发送一个请求追加上password参数,因为后台会缓存权限,后续不输入密码也可以访问,可惜不会
|
||||||
|
// TODO 2.另外也可以拿到密码之后,直接选中该分类追加password参数,重新请求,可惜也不会
|
||||||
|
setCache('APP_CATEGORY_PWD_' + category, res.content)
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/tabbar/category/category'
|
||||||
|
});
|
||||||
|
} else if (res.cancel) {}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const setInterceptors = (http) => {
|
export const setInterceptors = (http) => {
|
||||||
http.interceptors.request.use(
|
http.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
@@ -57,6 +103,22 @@ export const setInterceptors = (http) => {
|
|||||||
message: 'API接口服务异常!'
|
message: 'API接口服务异常!'
|
||||||
})
|
})
|
||||||
} else if (response.data.status == 401) {
|
} else if (response.data.status == 401) {
|
||||||
|
uni.$tm.toast(response.data.message);
|
||||||
|
// 如果是请求分类之后报401说明密码错误,那么清除该密码,下次点击会报403弹窗再次输入密码
|
||||||
|
if (response.config.url.indexOf('/api/content/categories') >= 0) {
|
||||||
|
const category = getCategoryNameByUrl(response.config.url)
|
||||||
|
delCache('APP_CATEGORY_PWD_' + category);
|
||||||
|
uni.showToast({
|
||||||
|
title: '提示:密码不正确',
|
||||||
|
icon: 'none',
|
||||||
|
success: () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
showCategoryInputPasswordModal(response, category);
|
||||||
|
}, 800)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 其他情况维持原来的逻辑
|
||||||
delCache('APP_ADMIN_LOGIN_TOKEN');
|
delCache('APP_ADMIN_LOGIN_TOKEN');
|
||||||
uni.$eShowModal({
|
uni.$eShowModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -75,6 +137,13 @@ export const setInterceptors = (http) => {
|
|||||||
url: '/pages/tabbar/about/about'
|
url: '/pages/tabbar/about/about'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
} else if (response.data.status == 403) {
|
||||||
|
// 如果报403是请求分类文章接口(您没有该分类的访问权限)的话说明是私密分类,需要输入密码请求
|
||||||
|
if (response.config.url.indexOf('/api/content/categories') >= 0) {
|
||||||
|
const category = getCategoryNameByUrl(response.config.url);
|
||||||
|
showCategoryInputPasswordModal(response, category);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return Promise.reject(response.data);
|
return Promise.reject(response.data);
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-2
@@ -18,14 +18,30 @@ export default {
|
|||||||
return {
|
return {
|
||||||
author: HaloConfig.author,
|
author: HaloConfig.author,
|
||||||
_isWechat: true,
|
_isWechat: true,
|
||||||
haloAdConfig: HaloAdConfig
|
haloAdConfig: HaloAdConfig,
|
||||||
|
_aniWaitIndex: 0, // 动画索引
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 获取全局应用设置
|
// 获取全局应用设置
|
||||||
globalAppSettings() {
|
globalAppSettings() {
|
||||||
return uni.$tm.vx.getters().getSettings;
|
return uni.$tm.vx.getters().getSettings;
|
||||||
|
},
|
||||||
|
// 计算动画索引
|
||||||
|
calcAniWait() {
|
||||||
|
return (index) => {
|
||||||
|
if ((index + 1) % 10 == 0) {
|
||||||
|
this._aniWaitIndex = 1;
|
||||||
|
} else {
|
||||||
|
this._aniWaitIndex += 1;
|
||||||
}
|
}
|
||||||
|
console.log('this._aniWaitIndex', this._aniWaitIndex);
|
||||||
|
return this._aniWaitIndex * 50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.fnResetSetAniWaitIndex()
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
@@ -36,7 +52,9 @@ export default {
|
|||||||
this._isWechat = false;
|
this._isWechat = false;
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.fnResetSetAniWaitIndex()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 设置页面标题
|
* 设置页面标题
|
||||||
@@ -60,6 +78,10 @@ export default {
|
|||||||
console.log('err:', err);
|
console.log('err:', err);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 初始化动画索引值(需要在每个页面调用)
|
||||||
|
fnResetSetAniWaitIndex() {
|
||||||
|
this._aniWaitIndex = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -153,3 +153,22 @@
|
|||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 文本省略样式 开始 */
|
||||||
|
.text-sub-one {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 多行文本省略 */
|
||||||
|
@for $i from 2 through 30 {
|
||||||
|
.text-sub-more-#{$i} {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: $i;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 文本省略样式 结束 */
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="article-card " :class="cardType" @click="fnClickEvent('card')">
|
<view class="article-card " :class="cardType" @click="fnClickEvent('card')">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<cache-image
|
<cache-image class="thumbnail" radius="6rpx" :url="$utils.checkThumbnailUrl(article.thumbnail)" :fileMd5="$utils.checkThumbnailUrl(article.thumbnail)" mode="aspectFill"></cache-image>
|
||||||
class="thumbnail"
|
|
||||||
radius="12rpx"
|
|
||||||
:url="$utils.checkThumbnailUrl(article.thumbnail)"
|
|
||||||
:fileMd5="$utils.checkThumbnailUrl(article.thumbnail)"
|
|
||||||
mode="aspectFill"
|
|
||||||
></cache-image>
|
|
||||||
<!-- <image class="thumbnail" lazy-load :src="$utils.checkThumbnailUrl(article.thumbnail)" mode="aspectFill"></image> -->
|
<!-- <image class="thumbnail" lazy-load :src="$utils.checkThumbnailUrl(article.thumbnail)" mode="aspectFill"></image> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
@@ -73,30 +67,41 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0 24rpx;
|
margin: 0 24rpx;
|
||||||
padding: 32rpx;
|
padding: 24rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #ffff;
|
background-color: #ffff;
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
|
|
||||||
|
&.h_row_col1 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
&.home {
|
&.home {
|
||||||
&.h_row_col2 {
|
&.h_row_col2 {
|
||||||
margin: 12rpx;
|
margin: 12rpx;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
|
|
||||||
::v-deep uni-image {
|
::v-deep uni-image {
|
||||||
border-radius: 6rpx 6rpx 0 0 !important;
|
border-radius: 6rpx 6rpx 0 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.is-top {
|
.is-top {
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
@@ -105,22 +110,28 @@ export default {
|
|||||||
transform: scale(0.9);
|
transform: scale(0.9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|
||||||
.time-label {
|
.time-label {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tb_text_image {
|
&.tb_text_image {
|
||||||
padding: 12rpx;
|
padding: 12rpx;
|
||||||
|
|
||||||
.left .thumbnail {
|
.left .thumbnail {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
uni-image {
|
uni-image {
|
||||||
@@ -129,14 +140,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.only_text {
|
&.only_text {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|
||||||
.right .foot {
|
.right .foot {
|
||||||
.create-time {
|
.create-time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
@@ -144,92 +158,113 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.lr_image_text {
|
|
||||||
}
|
&.lr_image_text {}
|
||||||
|
|
||||||
&.lr_text_image {
|
&.lr_text_image {
|
||||||
.left {
|
.left {
|
||||||
order: 2;
|
order: 2;
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
order: 1;
|
order: 1;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tb_image_text {
|
&.tb_image_text {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
::v-deep uni-image {
|
::v-deep uni-image {
|
||||||
border-radius: 6rpx 6rpx 0 0 !important;
|
border-radius: 6rpx 6rpx 0 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tb_text_image {
|
&.tb_text_image {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
order: 2;
|
order: 2;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
order: 1;
|
order: 1;
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.only_text {
|
&.only_text {
|
||||||
padding: 36rpx;
|
padding: 36rpx;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
@@ -240,12 +275,14 @@ export default {
|
|||||||
.left {
|
.left {
|
||||||
width: 240rpx;
|
width: 240rpx;
|
||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
@@ -253,11 +290,13 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
|
|
||||||
.is-top {
|
.is-top {
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
padding: 0 12rpx;
|
padding: 0 12rpx;
|
||||||
@@ -271,10 +310,12 @@ export default {
|
|||||||
border-radius: 6rpx 12rpx;
|
border-radius: 6rpx 12rpx;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-text {
|
&-text {
|
||||||
color: #303133;
|
color: #303133;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@@ -283,6 +324,7 @@ export default {
|
|||||||
margin-top: 14rpx;
|
margin-top: 14rpx;
|
||||||
line-height: 42rpx;
|
line-height: 42rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@@ -293,10 +335,12 @@ export default {
|
|||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
|
||||||
.time-label {
|
.time-label {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
.number {
|
.number {
|
||||||
padding: 0 6rpx;
|
padding: 0 6rpx;
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="article-min-card" :class="[globalAppSettings.layout.cardType]" @click="fnClickEvent('card')">
|
<view class="article-min-card" :class="[globalAppSettings.layout.cardType]" @click="fnClickEvent('card')">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<cache-image
|
<cache-image class="thumbnail" radius="6rpx" :url="$utils.checkThumbnailUrl(article.thumbnail)" :fileMd5="$utils.checkThumbnailUrl(article.thumbnail)" mode="aspectFill"></cache-image>
|
||||||
class="thumbnail"
|
|
||||||
radius="12rpx"
|
|
||||||
:url="$utils.checkThumbnailUrl(article.thumbnail)"
|
|
||||||
:fileMd5="$utils.checkThumbnailUrl(article.thumbnail)"
|
|
||||||
mode="aspectFill"
|
|
||||||
></cache-image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="title text-overflow">{{ article.title }}</view>
|
<view class="title text-overflow">{{ article.title }}</view>
|
||||||
@@ -57,82 +51,101 @@ export default {
|
|||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
padding: 16rpx;
|
padding: 16rpx;
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
&.lr_image_text {
|
|
||||||
}
|
&.lr_image_text {}
|
||||||
|
|
||||||
&.lr_text_image {
|
&.lr_text_image {
|
||||||
.left {
|
.left {
|
||||||
order: 2;
|
order: 2;
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
order: 1;
|
order: 1;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tb_image_text {
|
&.tb_image_text {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tb_text_image {
|
&.tb_text_image {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
order: 2;
|
order: 2;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
order: 1;
|
order: 1;
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.only_text {
|
&.only_text {
|
||||||
.left {
|
.left {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
@@ -143,28 +156,33 @@ export default {
|
|||||||
.left {
|
.left {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 130rpx;
|
height: 130rpx;
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 24rpx;
|
padding-left: 20rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
margin-top: 14rpx;
|
margin-top: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@@ -172,20 +190,25 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
margin-top: 14rpx;
|
margin-top: 14rpx;
|
||||||
|
|
||||||
.create-time {
|
.create-time {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|
||||||
.time-label {
|
.time-label {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding-right: 4rpx;
|
padding-right: 4rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.visits {
|
.visits {
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
padding: 0 6rpx;
|
padding: 0 6rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|||||||
@@ -3,22 +3,14 @@
|
|||||||
<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> -->
|
||||||
<image :src="loadingImgSrc" :style="[imgStyle]" mode="aspectFit"></image>
|
<image :src="loadingImgSrc" :style="[loadingImgStyle]" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="loadStatus == 'error'" class="img-error" :style="[imgStyle, loadErrStyle]">
|
<view v-if="loadStatus == 'error'" class="img-error" :style="[imgStyle, loadErrStyle]">
|
||||||
<text class="img-err-icon iconfont icon-exclamation-circle"></text>
|
<!-- <text class="img-err-icon iconfont icon-exclamation-circle"></text>
|
||||||
<text class="img-load-text">{{ loadErrText }}</text>
|
<text class="img-load-text">{{ loadErrText }}</text> -->
|
||||||
|
<image class="img-error-img" :src="loadingErrorImageSrc" mode="scaleToFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image v-show="loadStatus == 'success'" :src="src" @load="fnOnLoad" @error="fnOnError" :lazy-load="lazyLoad" :style="[imgStyle]" :mode="mode" @click="$emit('on-click', url)"></image>
|
||||||
v-show="loadStatus == 'success'"
|
|
||||||
:src="src"
|
|
||||||
@load="fnOnLoad"
|
|
||||||
@error="fnOnError"
|
|
||||||
:lazy-load="lazyLoad"
|
|
||||||
:style="[imgStyle]"
|
|
||||||
:mode="mode"
|
|
||||||
@click="$emit('on-click', url)"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -91,6 +83,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
imgStyle: {},
|
imgStyle: {},
|
||||||
|
loadingImgStyle: {
|
||||||
|
width: '120rpx',
|
||||||
|
},
|
||||||
src: '', // 图片地址
|
src: '', // 图片地址
|
||||||
loadStatus: 'loading'
|
loadStatus: 'loading'
|
||||||
};
|
};
|
||||||
@@ -98,6 +93,9 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
loadingImgSrc() {
|
loadingImgSrc() {
|
||||||
return getApp().globalData.loadingGifUrl;
|
return getApp().globalData.loadingGifUrl;
|
||||||
|
},
|
||||||
|
loadingErrorImageSrc() {
|
||||||
|
return getApp().globalData.loadingErrUrl
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -108,7 +106,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log('cache-image', this.url);
|
|
||||||
this.imgStyle = {
|
this.imgStyle = {
|
||||||
width: this.width,
|
width: this.width,
|
||||||
height: this.height,
|
height: this.height,
|
||||||
@@ -137,7 +134,7 @@ export default {
|
|||||||
fnOnLoad() {
|
fnOnLoad() {
|
||||||
this.loadStatus = 'success';
|
this.loadStatus = 'success';
|
||||||
},
|
},
|
||||||
fnOnError() {
|
fnOnError(e) {
|
||||||
this.loadStatus = 'error';
|
this.loadStatus = 'error';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,6 +146,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-loading,
|
.img-loading,
|
||||||
.img-error {
|
.img-error {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -158,21 +156,31 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-load-icon {
|
.img-load-icon {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
animation: xhRote 0.8s infinite linear;
|
animation: xhRote 0.8s infinite linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-load-text {
|
.img-load-text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-top: 8rpx;
|
margin-top: 8rpx;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-error {
|
.img-error {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
&-img {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.img-err-icon {
|
.img-err-icon {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes xhRote {
|
@keyframes xhRote {
|
||||||
0% {
|
0% {
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ export default {
|
|||||||
apiAuthorization: '', // Api认证key [必填]: Halo中-系统-博客设置-切换到高级选项-API设置-Access key
|
apiAuthorization: '', // Api认证key [必填]: Halo中-系统-博客设置-切换到高级选项-API设置-Access key
|
||||||
|
|
||||||
title: '', // 博客标题 [建议必填]:在某些页面没有设置具体的页面名称时候,使用该值显示
|
title: '', // 博客标题 [建议必填]:在某些页面没有设置具体的页面名称时候,使用该值显示
|
||||||
miniCodeImageUrl: '', // 小程序的太阳码/二维码的图片地址 [建议必填]:主要用于文章详情页面的生成海报的功能
|
miniCodeImageUrl: '', // 小程序的太阳码/二维码的图片地址 [建议必填]
|
||||||
|
|
||||||
aboutProfileImageUrl: '', // 关于页面中的资料卡背景图 [建议必填]
|
aboutProfileImageUrl: '', // 关于页面中的资料卡背景图 [建议必填]
|
||||||
|
|
||||||
// 启动页面的配置(页面地址`/pagesA/start/start`)
|
// 启动页面的配置(页面地址`/pagesA/start/start`)
|
||||||
@@ -80,8 +81,8 @@ export default {
|
|||||||
list: [],
|
list: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
quickNav: { // 快捷导航配置
|
quickNav: { // 快捷导航配置(如不需要恋爱日记,请注释或删除94-101行的代码)
|
||||||
use: true,
|
use: true, // 是否在个人中心显示以下页面的入口
|
||||||
list: [{
|
list: [{
|
||||||
icon: 'halocoloricon-classify',
|
icon: 'halocoloricon-classify',
|
||||||
text: '文章归档',
|
text: '文章归档',
|
||||||
|
|||||||
+62
-7
@@ -110,6 +110,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
@@ -121,19 +124,32 @@
|
|||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"minified" : true
|
"minified" : true
|
||||||
},
|
},
|
||||||
"usingComponents" : true
|
"usingComponents" : true,
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true,
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"mp-baidu" : {
|
"mp-baidu" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true,
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"mp-toutiao" : {
|
"mp-toutiao" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true,
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"uniStatistics" : {
|
"uniStatistics" : {
|
||||||
"enable" : false
|
"enable" : true,
|
||||||
|
"version" : "2"
|
||||||
},
|
},
|
||||||
"vueVersion" : "2",
|
"vueVersion" : "2",
|
||||||
"h5" : {
|
"h5" : {
|
||||||
@@ -146,7 +162,7 @@
|
|||||||
"changeOrigin" : true,
|
"changeOrigin" : true,
|
||||||
"secure" : false,
|
"secure" : false,
|
||||||
"pathRewrite" : {
|
"pathRewrite" : {
|
||||||
"^/api" : ""
|
"^/api" : "/api"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,7 +172,46 @@
|
|||||||
"treeShaking" : {
|
"treeShaking" : {
|
||||||
"enable" : true
|
"enable" : true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"_spaceID" : "699a26a5-a6cd-4b54-b603-5155b312a5f5"
|
"_spaceID" : "699a26a5-a6cd-4b54-b603-5155b312a5f5",
|
||||||
|
"mp-qq" : {
|
||||||
|
"appid" : "1112285420",
|
||||||
|
"setting" : {
|
||||||
|
"minified" : true,
|
||||||
|
"postcss" : true,
|
||||||
|
"es6" : true
|
||||||
|
},
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mp-jd" : {
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mp-kuaishou" : {
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mp-lark" : {
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"quickapp-webview-huawei" : {
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"quickapp-webview-union" : {
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -549,7 +549,7 @@
|
|||||||
"backgroundColor": "#F8F8F8"
|
"backgroundColor": "#F8F8F8"
|
||||||
},
|
},
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"backgroundColor": "white",
|
"backgroundColor": "#fff",
|
||||||
"borderStyle": "white",
|
"borderStyle": "white",
|
||||||
"color": "#303133",
|
"color": "#303133",
|
||||||
"selectedColor": "#03a9f4",
|
"selectedColor": "#03a9f4",
|
||||||
|
|||||||
@@ -277,6 +277,10 @@ export default {
|
|||||||
},
|
},
|
||||||
fnGetNavList() {
|
fnGetNavList() {
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
let _isWx = false;
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
_isWx = true;
|
||||||
|
// #endif
|
||||||
this.navList = [
|
this.navList = [
|
||||||
{
|
{
|
||||||
key: 'disclaimers',
|
key: 'disclaimers',
|
||||||
@@ -310,7 +314,7 @@ export default {
|
|||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
type: 'page',
|
type: 'page',
|
||||||
openType: 'contact',
|
openType: 'contact',
|
||||||
show: true
|
show: _isWx
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'feedback',
|
key: 'feedback',
|
||||||
@@ -322,7 +326,7 @@ export default {
|
|||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
type: 'page',
|
type: 'page',
|
||||||
openType: 'feedback',
|
openType: 'feedback',
|
||||||
show: true
|
show: _isWx
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'about',
|
key: 'about',
|
||||||
|
|||||||
@@ -12,23 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<tm-sliderNav :list="categoryList" bg-color="white" 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" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true" :refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="60" refresher-background="#fafafa" @refresherrefresh="fnGetData(true)" @scrolltolower="fnGetData(false)" @scroll="fnOnScroll" @touchmove.stop @touchstart="fnOnTouchStart" @touchend="fnOnTouchEnd" @touchcancel="fnOnTouchEnd">
|
||||||
class="right-content pt-12 pb-12"
|
|
||||||
:scroll-y="true"
|
|
||||||
:scroll-top="scrollTop"
|
|
||||||
:scroll-with-animation="true"
|
|
||||||
:refresher-enabled="true"
|
|
||||||
:refresher-triggered="triggered"
|
|
||||||
:refresher-threshold="60"
|
|
||||||
refresher-background="#fafafa"
|
|
||||||
@refresherrefresh="fnGetData(true)"
|
|
||||||
@scrolltolower="fnGetData(false)"
|
|
||||||
@scroll="fnOnScroll"
|
|
||||||
@touchmove.stop
|
|
||||||
@touchstart="fnOnTouchStart"
|
|
||||||
@touchend="fnOnTouchEnd"
|
|
||||||
@touchcancel="fnOnTouchEnd"
|
|
||||||
>
|
|
||||||
<view v-if="dataList.length == 0" class="article-empty flex flex-center">
|
<view v-if="dataList.length == 0" class="article-empty flex flex-center">
|
||||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="该分类下暂无文章~"></tm-empty>
|
<tm-empty icon="icon-shiliangzhinengduixiang-" label="该分类下暂无文章~"></tm-empty>
|
||||||
</view>
|
</view>
|
||||||
@@ -36,7 +20,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(article, index) in dataList" :key="article.createTime">
|
<block v-for="(article, index) in dataList" :key="article.createTime">
|
||||||
<!-- 文章卡片 -->
|
<!-- 文章卡片 -->
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<article-min-card :article="article" @on-click="fnToArticleDetail"></article-min-card>
|
<article-min-card :article="article" @on-click="fnToArticleDetail"></article-min-card>
|
||||||
</tm-translate>
|
</tm-translate>
|
||||||
</block>
|
</block>
|
||||||
@@ -112,6 +96,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnOnCategoryChange(e) {
|
fnOnCategoryChange(e) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.queryParams.slug = this.categoryList[e].slug;
|
this.queryParams.slug = this.categoryList[e].slug;
|
||||||
this.fnToTopScroll();
|
this.fnToTopScroll();
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
@@ -120,10 +105,10 @@ export default {
|
|||||||
|
|
||||||
fnGetAllCategory() {
|
fnGetAllCategory() {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
this.$httpApi
|
this.$httpApi
|
||||||
.getCategoryList({ more: true })
|
.getCategoryList({ more: true })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -218,18 +203,22 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-empty {
|
.category-empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70vh;
|
height: 70vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-empty {
|
.article-empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70vh;
|
height: 70vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-content {
|
.right-content {
|
||||||
// width: calc(100vw - 144rpx);
|
// width: calc(100vw - 144rpx);
|
||||||
width: calc(100vw - 190rpx);
|
width: calc(100vw - 190rpx);
|
||||||
@@ -238,6 +227,7 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
</tm-flowLayout>
|
</tm-flowLayout>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<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="calcAniWait(index)">
|
||||||
<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)"></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">
|
||||||
@@ -197,6 +197,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnOnCategoryChange(index) {
|
fnOnCategoryChange(index) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
this.queryParams.team = null;
|
this.queryParams.team = null;
|
||||||
@@ -213,10 +214,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
// 设置状态为加载中
|
// 设置状态为加载中
|
||||||
if (!this.isLoadMore) {
|
if (!this.isLoadMore) {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
@@ -305,6 +306,7 @@ export default {
|
|||||||
background-color: #212121;
|
background-color: #212121;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
@@ -317,10 +319,12 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-17
@@ -22,13 +22,7 @@
|
|||||||
<view class="bg-white pb-24">
|
<view class="bg-white pb-24">
|
||||||
<!-- 轮播图+广告 -->
|
<!-- 轮播图+广告 -->
|
||||||
<view class="banner bg-white ml-24 mr-24 mt-12 round-3" v-if="bannerList.length != 0">
|
<view class="banner bg-white ml-24 mr-24 mt-12 round-3" v-if="bannerList.length != 0">
|
||||||
<e-swiper
|
<e-swiper :dotPosition="globalAppSettings.banner.dotPosition" :autoplay="true" :useDot="globalAppSettings.banner.useDot" :list="bannerList" @on-click="fnOnBannerClick"></e-swiper>
|
||||||
:dotPosition="globalAppSettings.banner.dotPosition"
|
|
||||||
:autoplay="true"
|
|
||||||
:useDot="globalAppSettings.banner.useDot"
|
|
||||||
:list="bannerList"
|
|
||||||
@on-click="fnOnBannerClick"
|
|
||||||
></e-swiper>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 快捷导航 -->
|
<!-- 快捷导航 -->
|
||||||
<!-- <view v-if="useQuickNav" class="quick-nav flex-between round-3 flex mt-12 ml-12 mr-12 pa-24">
|
<!-- <view v-if="useQuickNav" class="quick-nav flex-between round-3 flex mt-12 ml-12 mr-12 pa-24">
|
||||||
@@ -73,7 +67,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<view :class="globalAppSettings.layout.home">
|
<view :class="globalAppSettings.layout.home">
|
||||||
<block v-for="(article, index) in articleList" :key="article.createTime">
|
<block v-for="(article, index) in articleList" :key="article.createTime">
|
||||||
<tm-translate class="ani-item" animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate class="ani-item" animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<article-card from="home" :article="article" @on-click="fnToArticleDetail"></article-card>
|
<article-card from="home" :article="article" @on-click="fnToArticleDetail"></article-card>
|
||||||
<!-- 广告区域 -->
|
<!-- 广告区域 -->
|
||||||
<view v-if="haloAdConfig.home.use && (index + 1) % haloAdConfig.frequency == 0" class="ad-wrap ma-24">
|
<view v-if="haloAdConfig.home.use && (index + 1) % haloAdConfig.frequency == 0" class="ad-wrap ma-24">
|
||||||
@@ -140,7 +134,8 @@ export default {
|
|||||||
let blogger = this.$tm.vx.getters().getBlogger;
|
let blogger = this.$tm.vx.getters().getBlogger;
|
||||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||||
return blogger;
|
return blogger;
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.fnSetPageTitle();
|
this.fnSetPageTitle();
|
||||||
@@ -267,10 +262,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 文章列表
|
// 文章列表
|
||||||
fnGetArticleList() {
|
fnGetArticleList() {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
// 设置状态为加载中
|
// 设置状态为加载中
|
||||||
if (!this.isLoadMore) {
|
if (!this.isLoadMore) {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
@@ -380,50 +375,60 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
/* #ifdef MP-WEIXIN */
|
/* #ifdef MP-WEIXIN */
|
||||||
margin-right: 24rpx;
|
margin-right: 24rpx;
|
||||||
|
|
||||||
/* #endif */
|
/* #endif */
|
||||||
&_icon {
|
&_icon {}
|
||||||
}
|
|
||||||
&_text {
|
&_text {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-more {
|
.show-more {
|
||||||
width: 42rpx;
|
width: 42rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-nav {
|
.quick-nav {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
// box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
// box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
.name {
|
.name {
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
width: 94vw;
|
width: 94vw;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
margin: 0 24rpx;
|
margin: 0 24rpx;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: 24rpx;
|
padding-left: 24rpx;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cate-empty {
|
.cate-empty {
|
||||||
height: inherit;
|
height: inherit;
|
||||||
}
|
}
|
||||||
@@ -436,6 +441,7 @@ export default {
|
|||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -455,6 +461,7 @@ export default {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 12rpx;
|
padding: 0 12rpx;
|
||||||
|
|
||||||
.ani-item {
|
.ani-item {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,27 +9,32 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-else class="content" :class="{ 'bg-white': result.length !== 0 }">
|
<view v-else class="content" :class="{ 'bg-white': result.length !== 0 }">
|
||||||
<!-- 空数据 -->
|
<!-- 空数据 -->
|
||||||
<view v-if="result.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="啊偶,博主还没有朋友呢~"></tm-empty></view>
|
<view v-if="result.length == 0" class="content-empty flex flex-center">
|
||||||
|
<tm-empty icon="icon-shiliangzhinengduixiang-" label="啊偶,博主还没有朋友呢~"></tm-empty>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 如果只有一个分组:使用列表的形式 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="(link, 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="calcAniWait(index)">
|
||||||
<!-- 色彩版本 -->
|
<!-- 色彩版本 -->
|
||||||
<view
|
<view v-if="!globalAppSettings.links.useSimple" class="info flex pt-24 pb-24 pl-12 pr-12" :class="{ 'border-b-1': index != result[0].children.length - 1 }" @click="fnOnLinkEvent(link)">
|
||||||
v-if="!globalAppSettings.links.useSimple"
|
<view class="link-logo">
|
||||||
class="info flex pt-24 pb-24 pl-12 pr-12 border-b-1"
|
<cache-image class="link-logo_img" radius="12rpx" :url="link.logo" :fileMd5="link.logo" mode="aspectFill"></cache-image>
|
||||||
:class="{ 'border-b-1': index != team.children.length - 1 }"
|
</view>
|
||||||
@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="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="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">
|
||||||
<tm-tags color=" bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">{{ link.team || '暂未分组' }}</tm-tags>
|
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 class="link-card_desc text-overflow text-size-s mt-4">博客简介:{{ link.description || '这个博主很懒,没写简介~' }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 简洁版本 -->
|
<!-- 简洁版本 -->
|
||||||
@@ -51,27 +56,33 @@
|
|||||||
<!-- 如果大于一个分组:使用联系人的索引形式 result.length > 1 -->
|
<!-- 如果大于一个分组:使用联系人的索引形式 result.length > 1 -->
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(team, index) in result" :key="index">
|
<block v-for="(team, index) in result" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<view class="grey-lighten-4 text text-size-s text-weight-b px-32 py-12">{{ team.title }}</view>
|
<view class="grey-lighten-4 text text-size-s text-weight-b px-32 py-12">{{ team.title }}</view>
|
||||||
<block v-for="(link, linkIndex) in team.children" :key="link.id">
|
<block v-for="(link, linkIndex) in team.children" :key="link.id">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(linkIndex + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(linkIndex)">
|
||||||
<!-- 色彩版本 -->
|
<!-- 色彩版本 -->
|
||||||
<view
|
<view v-if="!globalAppSettings.links.useSimple" class="info flex pt-24 pb-24 pl-12 pr-12" :class="{
|
||||||
v-if="!globalAppSettings.links.useSimple"
|
'border-b-1':
|
||||||
class="info flex pt-24 pb-24 pl-12 pr-12"
|
linkIndex != team.children.length - 1 || index == result.length - 1
|
||||||
:class="{ 'border-b-1': linkIndex != team.children.length - 1 || index == result.length - 1 }"
|
}" @click="fnOnLinkEvent(link)">
|
||||||
@click="fnOnLinkEvent(link)"
|
|
||||||
>
|
|
||||||
<view class="link-logo">
|
<view class="link-logo">
|
||||||
<cache-image class="link-logo_img" radius="12rpx" :url="link.logo" :fileMd5="link.logo" mode="aspectFill"></cache-image>
|
<cache-image class="link-logo_img" radius="12rpx" :url="link.logo" :fileMd5="link.logo" mode="aspectFill"></cache-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex flex-col pl-30 info-detail">
|
<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="link-card_name text-size-l text-weight-b text-red">
|
||||||
<view class="poup-tag ml--10 mt-6">
|
{{ link.name }}
|
||||||
<tm-tags color="bg-gradient-amber-accent" :shadow="0" size="s" model="fill">ID:{{ link.id }}</tm-tags>
|
</view>
|
||||||
<tm-tags color=" bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">{{ link.team || '暂未分组' }}</tm-tags>
|
<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 class="link-card_desc text-overflow text-size-s mt-4">博客简介:{{ link.description || '这个博主很懒,没写简介~' }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 简洁版本 -->
|
<!-- 简洁版本 -->
|
||||||
@@ -79,7 +90,9 @@
|
|||||||
<image class="logo shadow-6" :src="link.logo" mode="aspectFill"></image>
|
<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">{{ link.name }}</view>
|
<view class="name text-size-g">{{ link.name }}</view>
|
||||||
<view class="desc mt-12 text-size-s text-grey-darken-1">{{ link.description }}</view>
|
<view class="desc mt-12 text-size-s text-grey-darken-1">
|
||||||
|
{{ link.description }}
|
||||||
|
</view>
|
||||||
<view v-if="false" 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>
|
||||||
{{ link.url }}
|
{{ link.url }}
|
||||||
@@ -99,12 +112,18 @@
|
|||||||
<tm-poup v-model="detail.show" :width="640" height="auto" position="center" :round="6">
|
<tm-poup v-model="detail.show" :width="640" height="auto" position="center" :round="6">
|
||||||
<view class="poup pa-36">
|
<view class="poup pa-36">
|
||||||
<view class="info flex">
|
<view class="info flex">
|
||||||
<view class="poup-logo bg-gradient-amber-accent pa-4 shadow-24"><image class="poup-logo_img" :src="detail.data.logo" mode="aspectFill"></image></view>
|
<view class="poup-logo bg-gradient-amber-accent pa-4 shadow-24">
|
||||||
|
<image class="poup-logo_img" :src="detail.data.logo" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
<view class="pl-24 info-detail">
|
<view class="pl-24 info-detail">
|
||||||
<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">
|
||||||
<tm-tags color="bg-gradient-light-blue-lighten" size="n" model="fill">{{ detail.data.team || '暂未分组' }}</tm-tags>
|
ID:{{ detail.data.id }}
|
||||||
|
</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>
|
||||||
@@ -113,10 +132,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="poup-desc mt-20">博客简介:{{ detail.data.description || '这个博主很懒,没写简介~' }}</view>
|
<view class="poup-desc mt-20">
|
||||||
|
博客简介:{{ detail.data.description || '这个博主很懒,没写简介~' }}
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 博客预览图 -->
|
<!-- 博客预览图 -->
|
||||||
<view class="mt-24"><tm-images :width="568" :round="2" :src="caclSiteThumbnail(detail.data.url)" mode="aspectFill"></tm-images></view>
|
<view class="mt-24">
|
||||||
|
<tm-images :width="568" :round="2" :src="caclSiteThumbnail(detail.data.url)" mode="aspectFill"></tm-images>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</tm-poup>
|
</tm-poup>
|
||||||
</view>
|
</view>
|
||||||
@@ -187,10 +210,10 @@ export default {
|
|||||||
fnGetData() {
|
fnGetData() {
|
||||||
this.linkTotal = 0;
|
this.linkTotal = 0;
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
this.$httpApi
|
this.$httpApi
|
||||||
.getLinkListByTeam()
|
.getLinkListByTeam()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -266,6 +289,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: #fafafd;
|
background-color: #fafafd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
@@ -282,16 +306,20 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-card {
|
.link-card {
|
||||||
border-bottom: 2rpx solid #f5f5f5;
|
border-bottom: 2rpx solid #f5f5f5;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
||||||
&.one {
|
&.one {
|
||||||
border: 0;
|
border: 0;
|
||||||
box-shadow: 0rpx 2rpx 24rpx 0rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 2rpx 24rpx 0rpx rgba(0, 0, 0, 0.03);
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
box-shadow: 0rpx 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
box-shadow: 0rpx 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
// width: 126rpx;
|
// width: 126rpx;
|
||||||
// height: 126rpx;
|
// height: 126rpx;
|
||||||
@@ -305,6 +333,7 @@ export default {
|
|||||||
.info {
|
.info {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -313,6 +342,7 @@ export default {
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc {
|
.desc {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -322,43 +352,52 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-card_name {
|
.link-card_name {
|
||||||
// color: #303133;
|
// color: #303133;
|
||||||
// color: #0080fe;
|
// color: #0080fe;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-card_desc {
|
.link-card_desc {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-logo {
|
.link-logo {
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
|
|
||||||
&_img {
|
&_img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-logo {
|
.poup-logo {
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
&_img {
|
&_img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-detail {
|
.info-detail {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-desc {
|
.poup-desc {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: #555 !important;
|
color: #555 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview-site {
|
.preview-site {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 300rpx;
|
height: 300rpx;
|
||||||
|
|||||||
@@ -18,16 +18,8 @@
|
|||||||
<block v-for="(item, index) in dataList" :key="index">
|
<block v-for="(item, index) in dataList" :key="index">
|
||||||
<view class="tm-timeline-item tm-timeline-item--leftDir">
|
<view class="tm-timeline-item tm-timeline-item--leftDir">
|
||||||
<view style="width: 160rpx;">
|
<view style="width: 160rpx;">
|
||||||
<view
|
<view :style="{ width: '24rpx', height: '24rpx' }" :class="[black_tmeme ? 'bk' : '']" class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4"></view>
|
||||||
:style="{ width: '24rpx', height: '24rpx' }"
|
<view :style="{ marginTop: '-24rpx' }" :class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']" class="grey-lighten-2"></view>
|
||||||
:class="[black_tmeme ? 'bk' : '']"
|
|
||||||
class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4"
|
|
||||||
></view>
|
|
||||||
<view
|
|
||||||
:style="{ marginTop: '-24rpx' }"
|
|
||||||
:class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']"
|
|
||||||
class="grey-lighten-2"
|
|
||||||
></view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="tm-timeline-item-content relative">
|
<view class="tm-timeline-item-content relative">
|
||||||
<view class="tm-timeline-item-left">
|
<view class="tm-timeline-item-left">
|
||||||
@@ -38,7 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<block v-if="item.posts.length != 0">
|
<block v-if="item.posts.length != 0">
|
||||||
<block v-for="(post, postIndex) in item.posts" :key="post.id">
|
<block v-for="(post, postIndex) in item.posts" :key="post.id">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(postIndex + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(postIndex)">
|
||||||
<view class="flex post shadow-3 pa-24 mb-24" :class="[globalAppSettings.layout.cardType]" @click="fnToArticleDetail(post)">
|
<view class="flex post shadow-3 pa-24 mb-24" :class="[globalAppSettings.layout.cardType]" @click="fnToArticleDetail(post)">
|
||||||
<image class="post-thumbnail" :src="$utils.checkThumbnailUrl(post.thumbnail)" mode="aspectFill"></image>
|
<image class="post-thumbnail" :src="$utils.checkThumbnailUrl(post.thumbnail)" mode="aspectFill"></image>
|
||||||
<view class="post-info pl-20">
|
<view class="post-info pl-20">
|
||||||
@@ -115,7 +107,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
fnOnTabChange(index) {
|
fnOnTabChange(index) {
|
||||||
// todo:
|
this.fnResetSetAniWaitIndex();
|
||||||
const _api = ['getMonthArchives', 'getYearArchives'];
|
const _api = ['getMonthArchives', 'getYearArchives'];
|
||||||
this.api = _api[index];
|
this.api = _api[index];
|
||||||
this.queryParams.page = 0;
|
this.queryParams.page = 0;
|
||||||
@@ -123,10 +115,10 @@ export default {
|
|||||||
},
|
},
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
this.$httpApi[this.api](this.queryParams)
|
this.$httpApi[this.api](this.queryParams)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.result = res.data;
|
this.result = res.data;
|
||||||
@@ -165,21 +157,26 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: #fafafd;
|
background-color: #fafafd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-empty {
|
.list-empty {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.statistics {
|
.statistics {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.e-timeline {
|
.e-timeline {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.tm-timeline-item>view:first-child {
|
.tm-timeline-item>view:first-child {
|
||||||
width: 110rpx !important;
|
width: 110rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tm-timeline-item-left {
|
.tm-timeline-item-left {
|
||||||
max-width: 580rpx !important;
|
max-width: 580rpx !important;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
@@ -189,6 +186,7 @@ export default {
|
|||||||
|
|
||||||
.tm-timeline {
|
.tm-timeline {
|
||||||
.tm-timeline-item {
|
.tm-timeline-item {
|
||||||
|
|
||||||
.tm-timeline-item-left,
|
.tm-timeline-item-left,
|
||||||
.tm-timeline-item-right {
|
.tm-timeline-item-right {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
@@ -201,30 +199,37 @@ export default {
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tm-timeline-jidian {
|
.tm-timeline-jidian {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tm-timeline-item--leftDir {
|
&.tm-timeline-item--leftDir {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row;
|
flex-flow: row;
|
||||||
|
|
||||||
&.endright {
|
&.endright {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tm-timeline-item-left,
|
.tm-timeline-item-left,
|
||||||
.tm-timeline-item-right {
|
.tm-timeline-item-right {
|
||||||
width: auto;
|
width: auto;
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tm-timeline-item-boder {
|
.tm-timeline-item-boder {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tm-timeline-jidian {
|
.tm-timeline-jidian {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tm-timeline-item-content {
|
.tm-timeline-item-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
@@ -239,48 +244,59 @@ export default {
|
|||||||
width: 560rpx;
|
width: 560rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
&.lr_image_text {
|
|
||||||
}
|
&.lr_image_text {}
|
||||||
|
|
||||||
&.lr_text_image {
|
&.lr_text_image {
|
||||||
.post-thumbnail {
|
.post-thumbnail {
|
||||||
order: 2;
|
order: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-info {
|
.post-info {
|
||||||
order: 1;
|
order: 1;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 24rpx;
|
padding-right: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tb_image_text {
|
&.tb_image_text {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.post-thumbnail {
|
.post-thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-info {
|
.post-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
||||||
&_title {
|
&_title {
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_time {
|
&_time {
|
||||||
.iconfont {
|
.iconfont {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tb_text_image {
|
&.tb_text_image {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.post-thumbnail {
|
.post-thumbnail {
|
||||||
order: 2;
|
order: 2;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-info {
|
.post-info {
|
||||||
order: 1;
|
order: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -290,47 +306,58 @@ export default {
|
|||||||
.iconfont {
|
.iconfont {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.only_text {
|
&.only_text {
|
||||||
.post-info {
|
.post-info {
|
||||||
padding: 6rpx;
|
padding: 6rpx;
|
||||||
|
|
||||||
&_time {
|
&_time {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-label {
|
.time-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-thumbnail {
|
.post-thumbnail {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-thumbnail {
|
.post-thumbnail {
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 170rpx;
|
height: 170rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-info {
|
.post-info {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
||||||
&_title {
|
&_title {
|
||||||
color: #303133;
|
color: #303133;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_summary {
|
&_summary {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_time {
|
&_time {
|
||||||
.time-label {
|
.time-label {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -46,12 +46,7 @@
|
|||||||
<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
|
<text class="category-tag" v-for="(item, index) in result.categories" :key="index" @click="fnToCate(item)">
|
||||||
class="category-tag"
|
|
||||||
v-for="(item, index) in result.categories"
|
|
||||||
:key="index"
|
|
||||||
@click="fnToCate(item)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</text>
|
</text>
|
||||||
</block>
|
</block>
|
||||||
@@ -60,20 +55,21 @@
|
|||||||
<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
|
<text class="category-tag" :style="{ backgroundColor: item.color }" v-for="(item, index) in result.tags" :key="index" @click="fnToTag(item)">
|
||||||
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>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="originalURL" class="mt-18 category-type original-url">
|
||||||
|
<view class="original-url_left text-weight-b">原文:</view>
|
||||||
|
<view class="original-url_right text-grey">
|
||||||
|
<text class="original-url_right__link" @click.stop="fnToOriginal(originalURL)">{{ originalURL }}</text>
|
||||||
|
<text class="original-url_right__btn" @click.stop="fnToOriginal(originalURL)">阅读原文<text class="iconfont icon-angle-right ml-5 text-size-s"></text> </text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 广告区域 -->
|
<!-- 广告区域 -->
|
||||||
<view v-if="haloAdConfig.articleDetail.use" class="ad-wrap ma-24 mb-0">
|
<view v-if="haloAdConfig.articleDetail.use && (haloAdConfig.unitId || haloAdConfig.adpid)" class="ad-wrap ma-24 mb-0">
|
||||||
<!-- #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>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
@@ -84,24 +80,19 @@
|
|||||||
<!-- 内容区域 -->
|
<!-- 内容区域 -->
|
||||||
<view class="content ml-24 mr-24">
|
<view class="content ml-24 mr-24">
|
||||||
<!-- markdown渲染 -->
|
<!-- markdown渲染 -->
|
||||||
<mp-html
|
<view class="markdown-wrap">
|
||||||
class="evan-markdown"
|
<tm-more :disabled="true" :maxHeight="1500" :isRemovBar="true" :open="showValidVisitMore" @click="fnOnShowValidVisitMore">
|
||||||
lazy-load
|
<mp-html class="evan-markdown" lazy-load :domain="markdownConfig.domain" :loading-img="markdownConfig.loadingGif" :scroll-table="true" :selectable="true" :tag-style="markdownConfig.tagStyle" :container-style="markdownConfig.containStyle" :content="result.content || result.formatContent" :markdown="true" :showLineNumber="true" :showLanguageName="true" :copyByLongPress="true" />
|
||||||
:domain="markdownConfig.domain"
|
<template v-slot:more="{ data }">
|
||||||
:loading-img="markdownConfig.loadingGif"
|
<view class="">
|
||||||
:scroll-table="true"
|
<text class="text-blue text-size-m text-weight-b">文章部分内容已加密点击解锁</text>
|
||||||
:selectable="true"
|
<text class="text-blue iconfont icon-lock-fill text-size-s ml-5"></text>
|
||||||
:tag-style="markdownConfig.tagStyle"
|
</view>
|
||||||
:container-style="markdownConfig.containStyle"
|
</template>
|
||||||
:content="result.content"
|
</tm-more>
|
||||||
:markdown="true"
|
</view>
|
||||||
:showLineNumber="true"
|
|
||||||
:showLanguageName="true"
|
|
||||||
:copyByLongPress="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 广告区域:微信/decloud申请 -->
|
<!-- 广告区域:微信/decloud申请 -->
|
||||||
<view v-if="haloAdConfig.articleDetail.use" class="ad-wrap mt-24 mb-24 ">
|
<view v-if="haloAdConfig.articleDetail.use && (haloAdConfig.unitId || haloAdConfig.adpid)" 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>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
@@ -111,21 +102,13 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 广告区域:自定义广告位 -->
|
<!-- 广告区域:自定义广告位 -->
|
||||||
<view class="ad-card" v-if="haloAdConfig.articleDetail.custom.use">
|
<view class="ad-card mt-24" v-if="haloAdConfig.articleDetail.custom.use">
|
||||||
<text class="ad-card_tip">广告</text>
|
<text class="ad-card_tip">广告</text>
|
||||||
<image
|
<image class="ad-card_cover" :src="haloAdConfig.articleDetail.custom.cover" mode="scaleToFill"></image>
|
||||||
class="ad-card_cover"
|
|
||||||
:src="haloAdConfig.articleDetail.custom.cover"
|
|
||||||
mode="scaleToFill"
|
|
||||||
></image>
|
|
||||||
<view class="ad-card_info">
|
<view class="ad-card_info">
|
||||||
<view class="ad-card_info-title">{{ haloAdConfig.articleDetail.custom.title }}</view>
|
<view class="ad-card_info-title">{{ haloAdConfig.articleDetail.custom.title }}</view>
|
||||||
<view class="ad-card_info-desc">{{ haloAdConfig.articleDetail.custom.content }}</view>
|
<view class="ad-card_info-desc">{{ haloAdConfig.articleDetail.custom.content }}</view>
|
||||||
<view
|
<view v-if="haloAdConfig.articleDetail.custom.url" class="ad-card_info-link" @click="fnToWebview(haloAdConfig.articleDetail.custom)">
|
||||||
v-if="haloAdConfig.articleDetail.custom.url"
|
|
||||||
class="ad-card_info-link"
|
|
||||||
@click="fnToWebview(haloAdConfig.articleDetail.custom)"
|
|
||||||
>
|
|
||||||
立即查看
|
立即查看
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -134,9 +117,7 @@
|
|||||||
<!-- 版权声明 -->
|
<!-- 版权声明 -->
|
||||||
<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
|
<view class="copyright-content mt-12 grey-lighten-5 text-grey-darken-2 round-4 pt-12 pb-12 pl-24 pr-24 ">
|
||||||
class="copyright-content mt-12 grey-lighten-5 text-grey-darken-2 round-4 pt-12 pb-12 pl-24 pr-24 "
|
|
||||||
>
|
|
||||||
<view v-if="copyright.author" class="copyright-text text-size-s ">
|
<view v-if="copyright.author" class="copyright-text text-size-s ">
|
||||||
版权归属:{{ copyright.author }}
|
版权归属:{{ copyright.author }}
|
||||||
</view>
|
</view>
|
||||||
@@ -151,32 +132,15 @@
|
|||||||
|
|
||||||
<!-- 评论展示区域 -->
|
<!-- 评论展示区域 -->
|
||||||
<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
|
<commentList :disallowComment="result.disallowComment" :postId="result.id" :post="result" @on-comment-detail="fnOnShowCommentDetail" @on-loaded="fnOnCommentLoaded"></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>
|
<barrage ref="barrage" :maxTop="240" :type="globalAppSettings.barrage.type"></barrage>
|
||||||
<!-- 返回顶部 -->
|
<!-- 返回顶部 -->
|
||||||
<tm-flotbutton
|
<tm-flotbutton :offset="[16, 80]" icon="icon-angle-up" color="bg-gradient-light-blue-accent" @click="fnToTopPage()"></tm-flotbutton>
|
||||||
:offset="[16, 80]"
|
<tm-flotbutton :actions="btnOption.actions" actions-pos="left" :show-text="true" color="bg-gradient-orange-accent" @change="fnOnFlotButtonChange"></tm-flotbutton>
|
||||||
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>
|
||||||
|
|
||||||
<!-- 评论详情 -->
|
<!-- 评论详情 -->
|
||||||
@@ -184,13 +148,7 @@
|
|||||||
<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
|
<comment-item :useContentBg="false" :useActions="false" :isChild="false" :comment="commentDetail.comment" :postId="result.id"></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">
|
||||||
@@ -201,12 +159,7 @@
|
|||||||
</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
|
<tm-button theme="bg-gradient-light-blue-accent" size="m" v-if="!disallowComment" @click="fnGetChildComments()">
|
||||||
theme="bg-gradient-light-blue-accent"
|
|
||||||
size="m"
|
|
||||||
v-if="!disallowComment"
|
|
||||||
@click="fnGetChildComments()"
|
|
||||||
>
|
|
||||||
刷新试试
|
刷新试试
|
||||||
</tm-button>
|
</tm-button>
|
||||||
</tm-empty>
|
</tm-empty>
|
||||||
@@ -218,16 +171,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<comment-item
|
<comment-item v-for="(comment, index) in commentDetail.list" :useContentBg="false" :useSolid="false" :useActions="false" :key="index" :isChild="false" :comment="comment" :postId="result.id"></comment-item>
|
||||||
v-for="(comment, index) in commentDetail.list"
|
|
||||||
:useContentBg="false"
|
|
||||||
:useSolid="false"
|
|
||||||
:useActions="false"
|
|
||||||
:key="index"
|
|
||||||
:isChild="false"
|
|
||||||
:comment="comment"
|
|
||||||
:postId="result.id"
|
|
||||||
></comment-item>
|
|
||||||
</block>
|
</block>
|
||||||
</block>
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -257,6 +201,10 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</tm-poup>
|
</tm-poup>
|
||||||
|
|
||||||
|
<!-- 密码访问解密弹窗 -->
|
||||||
|
<tm-dialog :disabled="true" :input-val.sync="validVisitModal.value" title="验证提示" confirmText="立即验证" :showCancel="validVisitModal.useCancel" model="confirm" v-model="validVisitModal.show" content="博主设置了需要密码才能查看该文章内容,请输入文章密码进行验证" theme="split" confirmColor="blue shadow-blue-0" @cancel="fnOnValidVisitCancel" @confirm="fnOnValidVisitConfirm"></tm-dialog>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -268,6 +216,8 @@ import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
|
|||||||
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
|
||||||
import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
|
import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
|
||||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||||
|
import tmDialog from '@/tm-vuetify/components/tm-dialog/tm-dialog.vue';
|
||||||
|
import tmMore from '@/tm-vuetify/components/tm-more/tm-more.vue';
|
||||||
|
|
||||||
import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue';
|
import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue';
|
||||||
import commentList from '@/components/comment-list/comment-list.vue';
|
import commentList from '@/components/comment-list/comment-list.vue';
|
||||||
@@ -284,6 +234,8 @@ export default {
|
|||||||
tmFlotbutton,
|
tmFlotbutton,
|
||||||
tmButton,
|
tmButton,
|
||||||
tmEmpty,
|
tmEmpty,
|
||||||
|
tmDialog,
|
||||||
|
tmMore,
|
||||||
mpHtml,
|
mpHtml,
|
||||||
commentList,
|
commentList,
|
||||||
commentItem,
|
commentItem,
|
||||||
@@ -296,8 +248,7 @@ export default {
|
|||||||
loading: 'loading',
|
loading: 'loading',
|
||||||
markdownConfig: MarkdownConfig,
|
markdownConfig: MarkdownConfig,
|
||||||
btnOption: {
|
btnOption: {
|
||||||
actions: [
|
actions: [{
|
||||||
{
|
|
||||||
icon: 'icon-like',
|
icon: 'icon-like',
|
||||||
color: 'bg-gradient-orange-accent'
|
color: 'bg-gradient-orange-accent'
|
||||||
},
|
},
|
||||||
@@ -328,7 +279,16 @@ export default {
|
|||||||
showCanvas: false,
|
showCanvas: false,
|
||||||
loading: true,
|
loading: true,
|
||||||
res: null
|
res: null
|
||||||
}
|
},
|
||||||
|
|
||||||
|
metas: [], // 自定义元数据
|
||||||
|
// 文章加密(弹窗输入密码解密)
|
||||||
|
validVisitModal: {
|
||||||
|
show: false,
|
||||||
|
useCancel: false,
|
||||||
|
value: undefined
|
||||||
|
},
|
||||||
|
showValidVisitMore: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -348,6 +308,48 @@ export default {
|
|||||||
let blogger = this.$tm.vx.getters().getBlogger;
|
let blogger = this.$tm.vx.getters().getBlogger;
|
||||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||||
return blogger;
|
return blogger;
|
||||||
|
},
|
||||||
|
// 原文链接:个人资质=可以打开公众号文章;非个人:任意链接地址(需在小程序后台配置)
|
||||||
|
originalURL() {
|
||||||
|
const target = this.metas.find(x => x.key == 'unihalo_originalURL');
|
||||||
|
if (!target) return '';
|
||||||
|
return target.value || '';
|
||||||
|
},
|
||||||
|
// 是否使用文章密码功能,如果值不为空,则优先于 useVisitMore:unihalo_useVisitPwd
|
||||||
|
useVisitPwd() {
|
||||||
|
const target = this.metas.find(x => x.key == 'unihalo_useVisitPwd');
|
||||||
|
if (!target) return false;
|
||||||
|
return target.value || false;
|
||||||
|
},
|
||||||
|
// 是否启用查看完整文章的功能的密码:unihalo_useVisitMorePwd
|
||||||
|
useVisitMorePwd() {
|
||||||
|
const target = this.metas.find(x => x.key == 'unihalo_useVisitMorePwd');
|
||||||
|
if (!target) return false;
|
||||||
|
return target.value || false;
|
||||||
|
},
|
||||||
|
// 当前是使用哪一种类型的密码验证 0=不使用任何 1=默认弹窗密码 2=查看部分内容
|
||||||
|
useVisitMode() {
|
||||||
|
if (this.useVisitPwd != false) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
if (this.useVisitMorePwd != false) {
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
useVisitPwd(val) {
|
||||||
|
if (val) {
|
||||||
|
this.validVisitModal.show = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
useVisitMode(val) {
|
||||||
|
if (val != 2) {
|
||||||
|
this.showValidVisitMore = true
|
||||||
|
} else {
|
||||||
|
this.showValidVisitMore = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@@ -362,14 +364,16 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
this.$httpApi
|
this.$httpApi
|
||||||
.getArticleDetail(this.queryParams.articleId)
|
.getArticleDetail(this.queryParams.articleId)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
this.result = res.data;
|
this.result = res.data;
|
||||||
|
this.metas = res.data.metas;
|
||||||
this.fnSetPageTitle('文章详情');
|
this.fnSetPageTitle('文章详情');
|
||||||
this.loading = 'success';
|
this.loading = 'success';
|
||||||
this.fnSetWxShareConfig({
|
this.fnSetWxShareConfig({
|
||||||
@@ -380,6 +384,9 @@ export default {
|
|||||||
copyLink: this.$haloConfig.apiUrl,
|
copyLink: this.$haloConfig.apiUrl,
|
||||||
query: {}
|
query: {}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.loading = 'error';
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.loading = 'error';
|
this.loading = 'error';
|
||||||
@@ -593,7 +600,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.drawDashedLine(this.$refs.rCanvas.ctx, 14, 356, 332, 0.5, [8, 5, 5, 5], '#999');
|
this.drawDashedLine(this.$refs.rCanvas.ctx, 14, 356, 332, 0.5, [8, 5, 5, 5], '#999');
|
||||||
|
|
||||||
// 小程序信息
|
// 小程序信息
|
||||||
await this.$refs.rCanvas
|
await this.$refs.rCanvas
|
||||||
.drawImage({
|
.drawImage({
|
||||||
@@ -657,6 +663,7 @@ export default {
|
|||||||
},
|
},
|
||||||
fnSavePoster() {
|
fnSavePoster() {
|
||||||
this.$refs.rCanvas.saveImage(this.poster.res.tempFilePath);
|
this.$refs.rCanvas.saveImage(this.poster.res.tempFilePath);
|
||||||
|
uni.$tm.toast('保存成功');
|
||||||
},
|
},
|
||||||
fnShareTo() {
|
fnShareTo() {
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
@@ -741,7 +748,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
const _handleRemove = () => {
|
const _handleRemove = () => {
|
||||||
this.$refs['barrage'].remove({
|
this.$refs['barrage'] && this.$refs['barrage'].remove({
|
||||||
duration: 5000, // 延迟关闭的时间
|
duration: 5000, // 延迟关闭的时间
|
||||||
speed: 600 // 弹幕消失的速度
|
speed: 600 // 弹幕消失的速度
|
||||||
});
|
});
|
||||||
@@ -749,7 +756,7 @@ export default {
|
|||||||
let index = 0;
|
let index = 0;
|
||||||
const _handleAddBarrage = () => {
|
const _handleAddBarrage = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs['barrage'].add(_list[index]);
|
this.$refs['barrage'] && this.$refs['barrage'].add(_list[index]);
|
||||||
index += 1;
|
index += 1;
|
||||||
if (index < _list.length - 1) {
|
if (index < _list.length - 1) {
|
||||||
_handleAddBarrage();
|
_handleAddBarrage();
|
||||||
@@ -761,13 +768,42 @@ export default {
|
|||||||
},
|
},
|
||||||
fnToWebview(data) {
|
fnToWebview(data) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url: '/pagesC/website/website?data=' +
|
||||||
'/pagesC/website/website?data=' +
|
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
title: data.title,
|
title: data.title,
|
||||||
url: data.url
|
url: data.url
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
fnToOriginal(originalURL) {
|
||||||
|
this.fnToWebview({ title: this.result.title, url: originalURL });
|
||||||
|
},
|
||||||
|
// 查看密码验证确认
|
||||||
|
fnOnValidVisitConfirm() {
|
||||||
|
if (this.useVisitMode == 1) {
|
||||||
|
if (this.validVisitModal.value === this.useVisitPwd) {
|
||||||
|
this.validVisitModal.show = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (this.useVisitMode == 2) {
|
||||||
|
if (this.validVisitModal.value === this.useVisitMorePwd) {
|
||||||
|
this.showValidVisitMore = true;
|
||||||
|
this.validVisitModal.show = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.$tm.toast("验证密码不正确!")
|
||||||
|
},
|
||||||
|
fnOnValidVisitCancel() {
|
||||||
|
this.validVisitModal.show = false;
|
||||||
|
this.validVisitModal.useCancel = true;
|
||||||
|
this.validVisitModal.value = undefined;
|
||||||
|
},
|
||||||
|
// 点击解锁弹出密码输入框
|
||||||
|
fnOnShowValidVisitMore() {
|
||||||
|
this.validVisitModal.useCancel = true;
|
||||||
|
this.validVisitModal.value = undefined;
|
||||||
|
this.validVisitModal.show = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -781,7 +817,20 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #fafafd;
|
background-color: #fafafd;
|
||||||
|
padding-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-image {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
height: inherit;
|
height: inherit;
|
||||||
@@ -797,24 +846,26 @@ export default {
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
// box-shadow: 0rpx 6rpx 30rpx rgba(182, 223, 255, 0.3);
|
// box-shadow: 0rpx 6rpx 30rpx rgba(182, 223, 255, 0.3);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
|
||||||
border-radius: 24rpx;
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail {
|
.detail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
|
||||||
.author {
|
.author {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
&-name {
|
&-name {}
|
||||||
}
|
|
||||||
&-time {
|
&-time {
|
||||||
margin-left: 36rpx;
|
margin-left: 36rpx;
|
||||||
}
|
}
|
||||||
@@ -824,22 +875,27 @@ export default {
|
|||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 280rpx;
|
height: 280rpx;
|
||||||
|
|
||||||
&-img {
|
&-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.count {
|
.count {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
&.no-thumbnail {
|
&.no-thumbnail {
|
||||||
border-top: 2rpx solid #f2f2f2;
|
border-top: 2rpx solid #f2f2f2;
|
||||||
padding-top: 12rpx;
|
padding-top: 12rpx;
|
||||||
|
|
||||||
.count-item {
|
.count-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -848,6 +904,7 @@ export default {
|
|||||||
width: 2rpx;
|
width: 2rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
&::after {
|
&::after {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -855,16 +912,19 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-item {
|
&-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding-left: 8rpx;
|
padding-left: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
@@ -872,6 +932,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
margin: 0 24rpx;
|
margin: 0 24rpx;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
@@ -881,37 +942,51 @@ export default {
|
|||||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
// border: 2rpx solid #f8f8f8;
|
// border: 2rpx solid #f8f8f8;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
&-type {
|
&-type {
|
||||||
line-height: 55rpx;
|
line-height: 55rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-tag {
|
&-tag {
|
||||||
background-color: #5bb8fa;
|
background-color: #5bb8fa;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 6rpx 12rpx;
|
padding: 6rpx 12rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|
||||||
&.is-empty {
|
&.is-empty {
|
||||||
background-color: #607d8b;
|
background-color: #607d8b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-tag+.category-tag {
|
.category-tag+.category-tag {
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdown-wrap,
|
||||||
.evan-markdown,
|
.evan-markdown,
|
||||||
.ad-wrap,
|
.ad-wrap,
|
||||||
.copyright-wrap,
|
.copyright-wrap,
|
||||||
.comment-wrap {
|
.comment-wrap {
|
||||||
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdown-wrap {
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.copyright-title {
|
.copyright-title {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 24rpx;
|
padding-left: 24rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -923,16 +998,20 @@ export default {
|
|||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-head {
|
.poup-head {
|
||||||
border-bottom: 2rpx solid #f5f5f5;
|
border-bottom: 2rpx solid #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-body {
|
.poup-body {
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-empty {
|
.poup-empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40vh;
|
height: 40vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-loading-wrap {
|
.poup-loading-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40vh;
|
height: 40vh;
|
||||||
@@ -941,14 +1020,17 @@ export default {
|
|||||||
font-size: 80rpx;
|
font-size: 80rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poster-content {
|
.poster-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 60vh;
|
min-height: 60vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.copyright-text {
|
.copyright-text {
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poster-loading {
|
.poster-loading {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -959,8 +1041,39 @@ export default {
|
|||||||
// background-color: rgba(0, 0, 0, 0.1);
|
// background-color: rgba(0, 0, 0, 0.1);
|
||||||
z-index: 666;
|
z-index: 666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poster-save {
|
.poster-save {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-top: 2rpx dashed #eee;
|
border-top: 2rpx dashed #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.original-url {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
&_left {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 84rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
&_right {
|
||||||
|
flex-grow: 1;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&__link {
|
||||||
|
width: 410rpx;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__btn {
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: block;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(article, index) in dataList" :key="article.id">
|
<block v-for="(article, index) in dataList" :key="article.id">
|
||||||
<!-- 文章卡片 -->
|
<!-- 文章卡片 -->
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<article-card :article="article" @on-click="fnToArticleDetail"></article-card>
|
<article-card :article="article" @on-click="fnToArticleDetail"></article-card>
|
||||||
<!-- 广告区域 -->
|
<!-- 广告区域 -->
|
||||||
<view v-if="haloAdConfig.articles.use && (index + 1) % haloAdConfig.frequency == 0" class="ad-wrap ma-24">
|
<view v-if="haloAdConfig.articles.use && (index + 1) % haloAdConfig.frequency == 0" class="ad-wrap ma-24">
|
||||||
@@ -111,6 +111,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnOnTabChange(index) {
|
fnOnTabChange(index) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
const _sorts = {
|
const _sorts = {
|
||||||
0: '',
|
0: '',
|
||||||
@@ -126,15 +127,16 @@ export default {
|
|||||||
this.fnGetData();
|
this.fnGetData();
|
||||||
},
|
},
|
||||||
fnOnSearch() {
|
fnOnSearch() {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.queryParams.page = 0;
|
this.queryParams.page = 0;
|
||||||
this.isLoadMore = false;
|
this.isLoadMore = false;
|
||||||
this.fnGetData();
|
this.fnGetData();
|
||||||
},
|
},
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
// 设置状态为加载中
|
// 设置状态为加载中
|
||||||
if (!this.isLoadMore) {
|
if (!this.isLoadMore) {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
@@ -193,6 +195,7 @@ export default {
|
|||||||
background-color: #212121;
|
background-color: #212121;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding-top: 24rpx;
|
padding-top: 24rpx;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(article, index) in dataList" :key="article.createTime">
|
<block v-for="(article, index) in dataList" :key="article.createTime">
|
||||||
<!-- 文章卡片 -->
|
<!-- 文章卡片 -->
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50"><article-card :article="article" @on-click="fnToArticleDetail"></article-card></tm-translate>
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)"><article-card :article="article" @on-click="fnToArticleDetail"></article-card></tm-translate>
|
||||||
</block>
|
</block>
|
||||||
<view class="load-text">{{ loadMoreText }}</view>
|
<view class="load-text">{{ loadMoreText }}</view>
|
||||||
</block>
|
</block>
|
||||||
@@ -75,10 +75,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
// 设置状态为加载中
|
// 设置状态为加载中
|
||||||
if (!this.isLoadMore) {
|
if (!this.isLoadMore) {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
@@ -131,10 +131,12 @@ export default {
|
|||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
background-color: #fafafd;
|
background-color: #fafafd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -3,19 +3,7 @@
|
|||||||
<view class="content pt-24 pb-24 round-4">
|
<view class="content pt-24 pb-24 round-4">
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
<tm-form @submit="fnOnSubmit">
|
<tm-form @submit="fnOnSubmit">
|
||||||
<tm-input
|
<tm-input :auto-focus="true" name="content" :vertical="true" required :height="220" input-type="textarea" bg-color="grey-lighten-5" :maxlength="200" :borderBottom="false" placeholder="请输入内容,不超过200字符..." v-model="form.content"></tm-input>
|
||||||
:auto-focus="true"
|
|
||||||
name="content"
|
|
||||||
:vertical="true"
|
|
||||||
required
|
|
||||||
:height="220"
|
|
||||||
input-type="textarea"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
:maxlength="200"
|
|
||||||
:borderBottom="false"
|
|
||||||
placeholder="请输入内容,不超过200字符..."
|
|
||||||
v-model="form.content"
|
|
||||||
></tm-input>
|
|
||||||
<tm-input name="author" align="right" required title="我的昵称" placeholder="请输入您的昵称..." v-model="form.author"></tm-input>
|
<tm-input name="author" align="right" required title="我的昵称" placeholder="请输入您的昵称..." v-model="form.author"></tm-input>
|
||||||
<tm-input name="email" align="right" title="邮箱地址" placeholder="请输入您的邮箱..." v-model="form.email"></tm-input>
|
<tm-input name="email" align="right" title="邮箱地址" placeholder="请输入您的邮箱..." v-model="form.email"></tm-input>
|
||||||
<tm-input name="authorUrl" align="right" title="我的网站" placeholder="请输入您的网址..." v-model="form.authorUrl"></tm-input>
|
<tm-input name="authorUrl" align="right" title="我的网站" placeholder="请输入您的网址..." v-model="form.authorUrl"></tm-input>
|
||||||
@@ -87,6 +75,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnOnSubmit(e) {
|
fnOnSubmit(e) {
|
||||||
|
console.log('提交评论');
|
||||||
if (e === false) {
|
if (e === false) {
|
||||||
return uni.$tm.toast('请检查所有的必填项是否填写完整!');
|
return uni.$tm.toast('请检查所有的必填项是否填写完整!');
|
||||||
}
|
}
|
||||||
@@ -151,6 +140,7 @@ export default {
|
|||||||
// box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
// box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-content {
|
.poup-content {
|
||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,18 @@
|
|||||||
<view class="profile flex flex-col flex-center pa-36">
|
<view class="profile flex flex-col flex-center pa-36">
|
||||||
<view class="avatar"><image class="avatar-img" :src="bloggerInfo.avatar" mode="aspectFill"></image></view>
|
<view class="avatar"><image class="avatar-img" :src="bloggerInfo.avatar" mode="aspectFill"></image></view>
|
||||||
<view class="nickname mt-24 text-weight-b text-size-g">{{ bloggerInfo.nickname }}</view>
|
<view class="nickname mt-24 text-weight-b text-size-g">{{ bloggerInfo.nickname }}</view>
|
||||||
<view class="desc mt-24 text-size-m text-grey-darken-3">{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}</view>
|
<view class="desc mt-24 text-size-m text-grey-darken-3">
|
||||||
|
{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}
|
||||||
|
</view>
|
||||||
<!-- 联系图标 -->
|
<!-- 联系图标 -->
|
||||||
<view class="mt-24 contact-icons">
|
<view class="mt-24 contact-icons">
|
||||||
<!-- 放全部:似乎显得有点拥挤 -->
|
<!-- 放全部:似乎显得有点拥挤 -->
|
||||||
<!-- <block v-for="(item, index) in result" :key="index"><text v-if="item.value" class="halocoloricon" :class="[item.icon, { 'ml-12': index != 0 }]"></text></block> -->
|
<!-- <block v-for="(item, index) in result" :key="index"><text v-if="item.value" class="halocoloricon" :class="[item.icon, { 'ml-12': index != 0 }]"></text></block> -->
|
||||||
<!-- 考虑放几个常用的就行 -->
|
<!-- 考虑放几个常用的就行 -->
|
||||||
<text class="halocoloricon halocoloricon-qq"></text>
|
<text class="halocoloricon halocoloricon-qq"></text>
|
||||||
|
<!-- #ifndef MP-QQ -->
|
||||||
<text class="ml-12 halocoloricon halocoloricon-wechat"></text>
|
<text class="ml-12 halocoloricon halocoloricon-wechat"></text>
|
||||||
|
<!-- #endif -->
|
||||||
<text class="ml-12 halocoloricon halocoloricon-GitHub"></text>
|
<text class="ml-12 halocoloricon halocoloricon-GitHub"></text>
|
||||||
<text class="ml-12 halocoloricon halocoloricon-gitee"></text>
|
<text class="ml-12 halocoloricon halocoloricon-gitee"></text>
|
||||||
<text class="ml-12 halocoloricon halocoloricon-ic_email_round"></text>
|
<text class="ml-12 halocoloricon halocoloricon-ic_email_round"></text>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(journal, index) in dataList" :key="index">
|
<block v-for="(journal, index) in dataList" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<!-- 日记卡片 -->
|
<!-- 日记卡片 -->
|
||||||
<journal-card :journal="journal" :useLike="true"></journal-card>
|
<journal-card :journal="journal" :useLike="true"></journal-card>
|
||||||
</tm-translate>
|
</tm-translate>
|
||||||
@@ -78,10 +78,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
// 设置状态为加载中
|
// 设置状态为加载中
|
||||||
if (!this.isLoadMore) {
|
if (!this.isLoadMore) {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
@@ -123,10 +123,11 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.loading-wrap {
|
|
||||||
}
|
.loading-wrap {}
|
||||||
.app-page-content {
|
|
||||||
}
|
.app-page-content {}
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-24
@@ -4,6 +4,7 @@
|
|||||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||||
|
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||||
</view>
|
</view>
|
||||||
<!-- 内容区域 -->
|
<!-- 内容区域 -->
|
||||||
<view v-else class="app-page-content pa-24" :class="{ 'bg-white': dataList.length !== 0 }">
|
<view v-else class="app-page-content pa-24" :class="{ 'bg-white': dataList.length !== 0 }">
|
||||||
@@ -13,18 +14,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<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="calcAniWait(index)">
|
||||||
<!-- 列表项 -->
|
<!-- 列表项 -->
|
||||||
<comment-item
|
<comment-item class="mb-12" :isChild="false" :comment="item" :postId="sheetId" :useSolid="false" @on-copy="fnCopyContent" @on-comment="fnToComment" @on-detail="fnOnShowCommentDetail"></comment-item>
|
||||||
class="mb-12"
|
|
||||||
:isChild="false"
|
|
||||||
:comment="item"
|
|
||||||
:postId="sheetId"
|
|
||||||
:useSolid="false"
|
|
||||||
@on-copy="fnCopyContent"
|
|
||||||
@on-comment="fnToComment"
|
|
||||||
@on-detail="fnOnShowCommentDetail"
|
|
||||||
></comment-item>
|
|
||||||
</tm-translate>
|
</tm-translate>
|
||||||
</block>
|
</block>
|
||||||
<tm-flotbutton :offset="[16, 80]" @click="fnToTopPage" size="m" color="light-blue" icon="icon-angle-up"></tm-flotbutton>
|
<tm-flotbutton :offset="[16, 80]" @click="fnToTopPage" size="m" color="light-blue" icon="icon-angle-up"></tm-flotbutton>
|
||||||
@@ -59,15 +51,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<comment-item
|
<comment-item v-for="(comment, index) in commentDetail.list" :useSolid="false" :useActions="false" :key="index" :isChild="false" :comment="comment" :postId="sheetId"></comment-item>
|
||||||
v-for="(comment, index) in commentDetail.list"
|
|
||||||
:useSolid="false"
|
|
||||||
:useActions="false"
|
|
||||||
:key="index"
|
|
||||||
:isChild="false"
|
|
||||||
:comment="comment"
|
|
||||||
:postId="sheetId"
|
|
||||||
></comment-item>
|
|
||||||
</block>
|
</block>
|
||||||
</block>
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -150,10 +134,10 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
// 设置状态为加载中
|
// 设置状态为加载中
|
||||||
if (!this.isLoadMore) {
|
if (!this.isLoadMore) {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
@@ -255,14 +239,17 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: #fafafd;
|
background-color: #fafafd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-page-content {
|
.app-page-content {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.05);
|
// box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(article, index) in dataList" :key="article.createTime">
|
<block v-for="(article, index) in dataList" :key="article.createTime">
|
||||||
<!-- 文章卡片 -->
|
<!-- 文章卡片 -->
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50"><article-card :article="article" @on-click="fnToArticleDetail"></article-card></tm-translate>
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)"><article-card :article="article" @on-click="fnToArticleDetail"></article-card></tm-translate>
|
||||||
</block>
|
</block>
|
||||||
<view class="load-text">{{ loadMoreText }}</view>
|
<view class="load-text">{{ loadMoreText }}</view>
|
||||||
</block>
|
</block>
|
||||||
@@ -75,10 +75,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnGetData() {
|
fnGetData() {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
mask: true,
|
// mask: true,
|
||||||
title: '加载中...'
|
// title: '加载中...'
|
||||||
});
|
// });
|
||||||
// 设置状态为加载中
|
// 设置状态为加载中
|
||||||
if (!this.isLoadMore) {
|
if (!this.isLoadMore) {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
@@ -131,10 +131,12 @@ export default {
|
|||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
background-color: #fafafd;
|
background-color: #fafafd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(article, index) in dataList" :key="index">
|
<block v-for="(article, index) in dataList" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<!-- 文章卡片 -->
|
<!-- 文章卡片 -->
|
||||||
<view class="article-card mt-24 bg-white pa-24 round-3">
|
<view class="article-card mt-24 bg-white pa-24 round-3">
|
||||||
<view class="thumbnail round-2" @click="fnToArticleDetail(article)">
|
<view class="thumbnail round-2" @click="fnToArticleDetail(article)">
|
||||||
@@ -229,10 +229,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 显示分类选择
|
// 显示分类选择
|
||||||
fnOnCategoryConfirm(e) {
|
fnOnCategoryConfirm(e) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.category.selected = [e[0].index];
|
this.category.selected = [e[0].index];
|
||||||
this.queryParams.categoryId = e[0].data.id;
|
this.queryParams.categoryId = e[0].data.id;
|
||||||
},
|
},
|
||||||
fnOnSearch() {
|
fnOnSearch() {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.queryParams.page = 0;
|
this.queryParams.page = 0;
|
||||||
this.isLoadMore = false;
|
this.isLoadMore = false;
|
||||||
this.fnToTopPage();
|
this.fnToTopPage();
|
||||||
@@ -357,8 +359,10 @@ export default {
|
|||||||
background-color: #212121;
|
background-color: #212121;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-page-content {
|
.app-page-content {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
}
|
}
|
||||||
@@ -367,20 +371,24 @@ export default {
|
|||||||
.article-card {
|
.article-card {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 280rpx;
|
height: 280rpx;
|
||||||
|
|
||||||
&-img {
|
&-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.03);
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
&-not {
|
&-not {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.03);
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -388,6 +396,7 @@ export default {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary {
|
.summary {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
@@ -396,6 +405,7 @@ export default {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-top: 2rpx solid rgba(0, 0, 0, 0.03);
|
border-top: 2rpx solid rgba(0, 0, 0, 0.03);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<!-- 内容区域 -->
|
<!-- 内容区域 -->
|
||||||
<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="calcAniWait(index)">
|
||||||
<view class="attachment-card mb-24 flex bg-white pa-24 round-3" @click="fnShowDetail(item)">
|
<view class="attachment-card mb-24 flex bg-white pa-24 round-3" @click="fnShowDetail(item)">
|
||||||
<view class="cover round-3 flex flex-center" :class="[fnGetIconClass(item.mediaType)]">
|
<view class="cover round-3 flex flex-center" :class="[fnGetIconClass(item.mediaType)]">
|
||||||
<text class="icon iconfont">{{ item.suffix }}</text>
|
<text class="icon iconfont">{{ item.suffix }}</text>
|
||||||
@@ -52,22 +52,9 @@
|
|||||||
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
||||||
<view class="preview-file pl-24 pr-24">
|
<view class="preview-file pl-24 pr-24">
|
||||||
<!-- 图片预览 -->
|
<!-- 图片预览 -->
|
||||||
<tm-images
|
<tm-images v-if="$utils.fnCheckIsFileType('image', detail.form)" :width="700" :height="350" :round="3" :src="$utils.checkThumbnailUrl(detail.form.path)" model="aspectFill"></tm-images>
|
||||||
v-if="$utils.fnCheckIsFileType('image', detail.form)"
|
|
||||||
:width="700"
|
|
||||||
:height="350"
|
|
||||||
:round="3"
|
|
||||||
:src="$utils.checkThumbnailUrl(detail.form.path)"
|
|
||||||
model="aspectFill"
|
|
||||||
></tm-images>
|
|
||||||
<!-- 视频 -->
|
<!-- 视频 -->
|
||||||
<video
|
<video v-else-if="$utils.fnCheckIsFileType('video', detail.form)" class="round-3" style="width: 100%;height: 350rpx;" :src="$utils.checkUrl(detail.form.path)" controls></video>
|
||||||
v-else-if="$utils.fnCheckIsFileType('video', detail.form)"
|
|
||||||
class="round-3"
|
|
||||||
style="width: 100%;height: 350rpx;"
|
|
||||||
:src="$utils.checkUrl(detail.form.path)"
|
|
||||||
controls
|
|
||||||
></video>
|
|
||||||
<view v-else class="flex flex-center border-a-1 round-3 text-align-center text-grey-darken-1" style="height: 280rpx;background-color: #f2f2f2;">
|
<view v-else class="flex flex-center border-a-1 round-3 text-align-center text-grey-darken-1" style="height: 280rpx;background-color: #f2f2f2;">
|
||||||
该文件暂不支持预览
|
该文件暂不支持预览
|
||||||
</view>
|
</view>
|
||||||
@@ -78,17 +65,7 @@
|
|||||||
<tm-input :disabled="true" color="grey" title="附件位置" v-model="detail.form.type"></tm-input>
|
<tm-input :disabled="true" color="grey" title="附件位置" v-model="detail.form.type"></tm-input>
|
||||||
<tm-input :disabled="true" color="grey" title="附件大小" v-model="detail.form.sizeText"></tm-input>
|
<tm-input :disabled="true" color="grey" title="附件大小" v-model="detail.form.sizeText"></tm-input>
|
||||||
<tm-input :disabled="true" color="grey" title="上传日期" v-model="detail.form.createTime"></tm-input>
|
<tm-input :disabled="true" color="grey" title="上传日期" v-model="detail.form.createTime"></tm-input>
|
||||||
<tm-input
|
<tm-input :disabled="true" :vertical="true" :borderBottom="false" input-type="textarea" title="文件地址" color="grey" bg-color="grey-lighten-5" :height="120" v-model="detail.form.path">
|
||||||
:disabled="true"
|
|
||||||
:vertical="true"
|
|
||||||
:borderBottom="false"
|
|
||||||
input-type="textarea"
|
|
||||||
title="文件地址"
|
|
||||||
color="grey"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
:height="120"
|
|
||||||
v-model="detail.form.path"
|
|
||||||
>
|
|
||||||
<template v-slot:default="{ title }">
|
<template v-slot:default="{ title }">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
<tm-button text theme="light-blue" size="xs" @click="$utils.copyText(detail.form.path, '复制成功!')">复制</tm-button>
|
<tm-button text theme="light-blue" size="xs" @click="$utils.copyText(detail.form.path, '复制成功!')">复制</tm-button>
|
||||||
@@ -153,8 +130,7 @@ export default {
|
|||||||
loading: 'loading',
|
loading: 'loading',
|
||||||
filterLoading: 'loading',
|
filterLoading: 'loading',
|
||||||
btnOption: {
|
btnOption: {
|
||||||
actions: [
|
actions: [{
|
||||||
{
|
|
||||||
icon: 'icon-like',
|
icon: 'icon-like',
|
||||||
color: 'bg-gradient-orange-accent'
|
color: 'bg-gradient-orange-accent'
|
||||||
},
|
},
|
||||||
@@ -168,28 +144,23 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
filterList: [
|
filterList: [{
|
||||||
{
|
|
||||||
title: '存储位置',
|
title: '存储位置',
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
title: '',
|
title: '',
|
||||||
name: 'attachmentType',
|
name: 'attachmentType',
|
||||||
model: 'radio',
|
model: 'radio',
|
||||||
children: []
|
children: []
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '文件类型',
|
title: '文件类型',
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
title: '',
|
title: '',
|
||||||
name: 'mediaType',
|
name: 'mediaType',
|
||||||
model: 'radio',
|
model: 'radio',
|
||||||
children: []
|
children: []
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@@ -307,11 +278,13 @@ export default {
|
|||||||
|
|
||||||
// 搜索区域确定
|
// 搜索区域确定
|
||||||
fnOnConfirm(e) {
|
fnOnConfirm(e) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.queryParams.attachmentType = e[0].children.map(x => x.id).join('') || undefined;
|
this.queryParams.attachmentType = e[0].children.map(x => x.id).join('') || undefined;
|
||||||
this.queryParams.mediaType = e[1].children.map(x => x.id).join('') || undefined;
|
this.queryParams.mediaType = e[1].children.map(x => x.id).join('') || undefined;
|
||||||
this.fnOnSearch();
|
this.fnOnSearch();
|
||||||
},
|
},
|
||||||
fnOnSearch() {
|
fnOnSearch() {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.queryParams.page = 0;
|
this.queryParams.page = 0;
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
this.fnGetData();
|
this.fnGetData();
|
||||||
@@ -524,12 +497,10 @@ export default {
|
|||||||
case 2:
|
case 2:
|
||||||
// 上传文件:
|
// 上传文件:
|
||||||
// todo:使用第三方控件
|
// todo:使用第三方控件
|
||||||
AfDocument.openMode(
|
AfDocument.openMode({
|
||||||
{
|
|
||||||
size: 1,
|
size: 1,
|
||||||
isDown: true,
|
isDown: true,
|
||||||
types: [
|
types: [{
|
||||||
{
|
|
||||||
name: '文档',
|
name: '文档',
|
||||||
value: ['doc', 'wps', 'docx', 'xls', 'xlsx', 'pdf']
|
value: ['doc', 'wps', 'docx', 'xls', 'xlsx', 'pdf']
|
||||||
},
|
},
|
||||||
@@ -689,9 +660,11 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-wrap {
|
.filter-wrap {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -705,29 +678,36 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
z-index: 6;
|
z-index: 6;
|
||||||
}
|
}
|
||||||
.page-content {
|
|
||||||
}
|
.page-content {}
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-card {
|
.attachment-card {
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
width: 170rpx;
|
width: 170rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
background-color: rgb(104, 136, 151);
|
background-color: rgb(104, 136, 151);
|
||||||
|
|
||||||
// box-shadow: 0 6rpx 10rpx rgba(51, 154, 204, 0.2);
|
// box-shadow: 0 6rpx 10rpx rgba(51, 154, 204, 0.2);
|
||||||
&.is-video {
|
&.is-video {
|
||||||
background-color: rgb(3, 174, 252);
|
background-color: rgb(3, 174, 252);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-image {
|
&.is-image {
|
||||||
background-color: #1cbcb4;
|
background-color: #1cbcb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnai {
|
.thumbnai {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -736,6 +716,7 @@ export default {
|
|||||||
border: 6rpx solid #fff;
|
border: 6rpx solid #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
@@ -750,13 +731,16 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 66vh;
|
height: 66vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-content {
|
.poup-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-wrap {
|
.btn-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-name {
|
.file-name {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="无数据"></tm-empty></view>
|
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="无数据"></tm-empty></view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(category, index) in dataList" :key="index">
|
<block v-for="(category, index) in dataList" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<view class="category-card flex round-3 bg-white pa-24 mb-24" @click="fnShowFormModal(category)">
|
<view class="category-card flex round-3 bg-white pa-24 mb-24" @click="fnShowFormModal(category)">
|
||||||
<text class="del-icon flex flex-center" @click.stop="fnDelete(category, index)">×</text>
|
<text class="del-icon flex flex-center" @click.stop="fnDelete(category, index)">×</text>
|
||||||
<view class="left">
|
<view class="left">
|
||||||
@@ -52,49 +52,13 @@
|
|||||||
<view class="poup-content">
|
<view class="poup-content">
|
||||||
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑分类' : '新增分类' }}</view>
|
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑分类' : '新增分类' }}</view>
|
||||||
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
||||||
<tm-input
|
<tm-input required :adjust-position="true" :round="3" :borderBottom="false" title="名称" bg-color="grey-lighten-5" v-model="form.name" placeholder="请输入分类名称"></tm-input>
|
||||||
required
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
:borderBottom="false"
|
|
||||||
title="名称"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.name"
|
|
||||||
placeholder="请输入分类名称"
|
|
||||||
></tm-input>
|
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:页面上所显示的名称</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:页面上所显示的名称</view>
|
||||||
<tm-input
|
<tm-input :borderBottom="false" :adjust-position="true" :round="3" title="别名" bg-color="grey-lighten-5" v-model="form.slug" placeholder="请输入分类别名"></tm-input>
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="别名"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.slug"
|
|
||||||
placeholder="请输入分类别名"
|
|
||||||
></tm-input>
|
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:一般为单个分类页面的标识,最好为英文</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:一般为单个分类页面的标识,最好为英文</view>
|
||||||
<tm-input
|
<tm-input :borderBottom="false" :adjust-position="true" :round="3" title="密码" bg-color="grey-lighten-5" v-model="form.password" placeholder="请输入分类密码"></tm-input>
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="密码"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.password"
|
|
||||||
placeholder="请输入分类密码"
|
|
||||||
></tm-input>
|
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:分类的访问密码</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:分类的访问密码</view>
|
||||||
<tm-input
|
<tm-input :borderBottom="false" :vertical="true" :adjust-position="true" inputType="textarea" :round="3" title="描述" :height="160" bg-color="grey-lighten-5" v-model="form.description" placeholder="请输入分类描述"></tm-input>
|
||||||
:borderBottom="false"
|
|
||||||
:vertical="true"
|
|
||||||
:adjust-position="true"
|
|
||||||
inputType="textarea"
|
|
||||||
:round="3"
|
|
||||||
title="描述"
|
|
||||||
:height="160"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.description"
|
|
||||||
placeholder="请输入分类描述"
|
|
||||||
></tm-input>
|
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:分类的描述信息</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:分类的描述信息</view>
|
||||||
<view class="ma-30 mt-12 pb-12">
|
<view class="ma-30 mt-12 pb-12">
|
||||||
<view class="mb-12">
|
<view class="mb-12">
|
||||||
@@ -342,11 +306,13 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
.loading-error {
|
.loading-error {
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
@@ -355,19 +321,23 @@ export default {
|
|||||||
.poup-content {
|
.poup-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-body {
|
.poup-body {
|
||||||
height: 71vh;
|
height: 71vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 260rpx;
|
height: 260rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-card {
|
.category-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
|
||||||
.del-icon {
|
.del-icon {
|
||||||
width: 46rpx;
|
width: 46rpx;
|
||||||
height: 46rpx;
|
height: 46rpx;
|
||||||
@@ -382,6 +352,7 @@ export default {
|
|||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 190rpx;
|
height: 190rpx;
|
||||||
@@ -392,10 +363,12 @@ export default {
|
|||||||
background-color: #607d8b;
|
background-color: #607d8b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.color {
|
.color {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
@@ -404,9 +377,11 @@ export default {
|
|||||||
|
|
||||||
.desc-box {
|
.desc-box {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
width: 86rpx;
|
width: 86rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="无数据"></tm-empty></view>
|
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="无数据"></tm-empty></view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(comment, index) in dataList" :key="index">
|
<block v-for="(comment, index) in dataList" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<view class="comment-card bg-white round-3 pt-24 pb-24">
|
<view class="comment-card bg-white round-3 pt-24 pb-24">
|
||||||
<view class="head flex flex-between pl-24 pr-24">
|
<view class="head flex flex-between pl-24 pr-24">
|
||||||
<view class="left flex flex-center">
|
<view class="left flex flex-center">
|
||||||
@@ -96,17 +96,7 @@
|
|||||||
<view class="mb-24">评论内容</view>
|
<view class="mb-24">评论内容</view>
|
||||||
<view class="pa-24 pt-12 pb-12 grey-lighten-5 text-grey round-3">{{ reply.data.content }}</view>
|
<view class="pa-24 pt-12 pb-12 grey-lighten-5 text-grey round-3">{{ reply.data.content }}</view>
|
||||||
</view>
|
</view>
|
||||||
<tm-input
|
<tm-input :vertical="true" :borderBottom="false" input-type="textarea" title="我的回复" bg-color="grey-lighten-5" v-model="reply.form.content" :height="150" :focus="true" :adjustPosition="true"></tm-input>
|
||||||
:vertical="true"
|
|
||||||
:borderBottom="false"
|
|
||||||
input-type="textarea"
|
|
||||||
title="我的回复"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="reply.form.content"
|
|
||||||
:height="150"
|
|
||||||
:focus="true"
|
|
||||||
:adjustPosition="true"
|
|
||||||
></tm-input>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="btn-wrap flex flex-center">
|
<view class="btn-wrap flex flex-center">
|
||||||
<!-- 审核状态 -->
|
<!-- 审核状态 -->
|
||||||
@@ -213,6 +203,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnOnTabChange(index) {
|
fnOnTabChange(index) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.fnResetReply();
|
this.fnResetReply();
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
this.queryType = ['Posts', 'Sheets', 'Journals'][index];
|
this.queryType = ['Posts', 'Sheets', 'Journals'][index];
|
||||||
@@ -438,12 +429,15 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|
||||||
.loading-error {
|
.loading-error {
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
@@ -461,13 +455,16 @@ export default {
|
|||||||
border: 4rpx solid #fff;
|
border: 4rpx solid #fff;
|
||||||
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.15);
|
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-content {
|
.comment-content {
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-content {
|
.poup-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-body {
|
.poup-body {
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@@ -17,16 +17,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(journal, index) in dataList" :key="journal.id">
|
<block v-for="(journal, index) in dataList" :key="journal.id">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<journal-card
|
<journal-card :isAdmin="true" :journal="journal" :useLike="false" :useEdit="true" :useDel="true" @on-del="fnOnJournalDel" @on-edit="fnOnJournalEdit"></journal-card>
|
||||||
:isAdmin="true"
|
|
||||||
:journal="journal"
|
|
||||||
:useLike="false"
|
|
||||||
:useEdit="true"
|
|
||||||
:useDel="true"
|
|
||||||
@on-del="fnOnJournalDel"
|
|
||||||
@on-edit="fnOnJournalEdit"
|
|
||||||
></journal-card>
|
|
||||||
</tm-translate>
|
</tm-translate>
|
||||||
</block>
|
</block>
|
||||||
<tm-flotbutton :offset="[16, 80]" @click="fnToTopPage" color="light-blue" size="m" icon="icon-angle-up"></tm-flotbutton>
|
<tm-flotbutton :offset="[16, 80]" @click="fnToTopPage" color="light-blue" size="m" icon="icon-angle-up"></tm-flotbutton>
|
||||||
@@ -163,12 +155,15 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|
||||||
.loading-error {
|
.loading-error {
|
||||||
height: 40vh;
|
height: 40vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-wrap {
|
.edit-wrap {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|||||||
+22
-53
@@ -23,10 +23,12 @@
|
|||||||
<view v-if="filterList.lenght == 0" class="empty"><tm-empty icon="icon-wind-cry" label="无数据"></tm-empty></view>
|
<view v-if="filterList.lenght == 0" class="empty"><tm-empty icon="icon-wind-cry" label="无数据"></tm-empty></view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(item, index) in filterList" :key="index">
|
<block v-for="(item, index) in filterList" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<view class="link-card round-3 bg-white flex flex-col mt-24 ml-24 mr-24 pa-24">
|
<view class="link-card round-3 bg-white flex flex-col mt-24 ml-24 mr-24 pa-24">
|
||||||
<view class="head flex">
|
<view class="head flex">
|
||||||
<view class="left round-2 flex flex-col flex-center"><image class="logo round-2 " :src="item.logo" mode="aspectFill"></image></view>
|
<view class="left round-2 flex flex-col flex-center">
|
||||||
|
<image class="logo round-2 " :src="item.logo" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
<view class="right pl-24 text-size-m">
|
<view class="right pl-24 text-size-m">
|
||||||
<view class="title flex flex-between ">
|
<view class="title flex flex-between ">
|
||||||
<view class="name flex text-overflow mr-6 text-weight-b">
|
<view class="name flex text-overflow mr-6 text-weight-b">
|
||||||
@@ -71,27 +73,9 @@
|
|||||||
<view class="poup-content">
|
<view class="poup-content">
|
||||||
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑友链' : '新增友链' }}</view>
|
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑友链' : '新增友链' }}</view>
|
||||||
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
||||||
<tm-input
|
<tm-input required :adjust-position="true" :round="3" :borderBottom="false" title="网站名称" bg-color="grey-lighten-5" v-model="form.name" placeholder="请输入网站名称"></tm-input>
|
||||||
required
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
:borderBottom="false"
|
|
||||||
title="网站名称"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.name"
|
|
||||||
placeholder="请输入网站名称"
|
|
||||||
></tm-input>
|
|
||||||
|
|
||||||
<tm-input
|
<tm-input required :borderBottom="false" :adjust-position="true" :round="3" title="网站地址" bg-color="grey-lighten-5" v-model="form.url" placeholder="请输入网站地址"></tm-input>
|
||||||
required
|
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="网站地址"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.url"
|
|
||||||
placeholder="请输入网站地址"
|
|
||||||
></tm-input>
|
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:需要加上 http://</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:需要加上 http://</view>
|
||||||
|
|
||||||
<tm-input :borderBottom="false" :round="3" bg-color="grey-lighten-5" title="网站分组" placeholder="请输入选择网站分组" :value="form.team">
|
<tm-input :borderBottom="false" :round="3" bg-color="grey-lighten-5" title="网站分组" placeholder="请输入选择网站分组" :value="form.team">
|
||||||
@@ -101,38 +85,10 @@
|
|||||||
</tm-pickers>
|
</tm-pickers>
|
||||||
</template>
|
</template>
|
||||||
</tm-input>
|
</tm-input>
|
||||||
<tm-input
|
<tm-input input-type="number" :borderBottom="false" :adjust-position="true" :round="3" title="排序编号" bg-color="grey-lighten-5" v-model.number="form.priority" placeholder="请输入排序"></tm-input>
|
||||||
input-type="number"
|
<tm-input :borderBottom="false" :vertical="true" :adjust-position="true" inputType="textarea" :round="3" title="网站描述" :height="120" bg-color="grey-lighten-5" v-model="form.description" placeholder="请输入描述"></tm-input>
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="排序编号"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model.number="form.priority"
|
|
||||||
placeholder="请输入排序"
|
|
||||||
></tm-input>
|
|
||||||
<tm-input
|
|
||||||
:borderBottom="false"
|
|
||||||
:vertical="true"
|
|
||||||
:adjust-position="true"
|
|
||||||
inputType="textarea"
|
|
||||||
:round="3"
|
|
||||||
title="网站描述"
|
|
||||||
:height="120"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.description"
|
|
||||||
placeholder="请输入描述"
|
|
||||||
></tm-input>
|
|
||||||
|
|
||||||
<tm-input
|
<tm-input :borderBottom="false" :adjust-position="true" :round="3" title="LOGO" bg-color="grey-lighten-5" v-model="form.logo" placeholder="请输入LOGO地址"></tm-input>
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="LOGO"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.logo"
|
|
||||||
placeholder="请输入LOGO地址"
|
|
||||||
></tm-input>
|
|
||||||
<view class="ma-30 mt-12 pb-12 bg-grey">
|
<view class="ma-30 mt-12 pb-12 bg-grey">
|
||||||
<image v-if="form.logo" class="thumbnail round-3" :src="form.logo" mode="aspectFill" @click="$utils.previewImage([form.logo])"></image>
|
<image v-if="form.logo" class="thumbnail round-3" :src="form.logo" mode="aspectFill" @click="$utils.previewImage([form.logo])"></image>
|
||||||
<view v-else class="thumbnail round-3 text-grey grey-lighten-5 flex flex-col flex-center ">
|
<view v-else class="thumbnail round-3 text-grey grey-lighten-5 flex flex-col flex-center ">
|
||||||
@@ -217,6 +173,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnOnTabChange(index) {
|
fnOnTabChange(index) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.fnToTopPage();
|
this.fnToTopPage();
|
||||||
let _filterData = [];
|
let _filterData = [];
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
@@ -381,24 +338,30 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|
||||||
.loading-error {
|
.loading-error {
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-card {
|
.link-card {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
|
||||||
.head {
|
.head {
|
||||||
.left {
|
.left {
|
||||||
width: 166rpx;
|
width: 166rpx;
|
||||||
height: 166rpx;
|
height: 166rpx;
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
@@ -409,15 +372,18 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
width: 84rpx;
|
width: 84rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot {
|
.foot {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// border-top: 2rpx solid rgba(0, 0, 0, 0.03);
|
// border-top: 2rpx solid rgba(0, 0, 0, 0.03);
|
||||||
@@ -427,11 +393,13 @@ export default {
|
|||||||
.poup-content {
|
.poup-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-body {
|
.poup-body {
|
||||||
height: 71vh;
|
height: 71vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 260rpx;
|
height: 260rpx;
|
||||||
@@ -440,6 +408,7 @@ export default {
|
|||||||
.update-btn {
|
.update-btn {
|
||||||
background-color: rgba(240, 250, 255, 1);
|
background-color: rgba(240, 250, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.del-btn {
|
.del-btn {
|
||||||
background-color: rgba(254, 241, 240, 1) !important;
|
background-color: rgba(254, 241, 240, 1) !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<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="calcAniWait(index)">
|
||||||
<view class="card mb-24 bg-white pa-24 round-3">
|
<view class="card mb-24 bg-white pa-24 round-3">
|
||||||
<view class="border-b-1 pb-20 text-size-l text-weight-b">
|
<view class="border-b-1 pb-20 text-size-l text-weight-b">
|
||||||
<tm-tags :dense="true" :shadow="0" color="bg-gradient-light-blue-accent" size="s" model="fill">ID:{{ item.id }}</tm-tags>
|
<tm-tags :dense="true" :shadow="0" color="bg-gradient-light-blue-accent" size="s" model="fill">ID:{{ item.id }}</tm-tags>
|
||||||
@@ -271,22 +271,27 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
.page-content {
|
|
||||||
}
|
.page-content {}
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc-item {
|
.desc-item {
|
||||||
.desc-label {
|
.desc-label {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
content: ':';
|
content: ':';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -294,6 +299,7 @@ export default {
|
|||||||
top: 0rpx;
|
top: 0rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc-value {
|
.desc-value {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|||||||
+19
-96
@@ -1,17 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app-page flex flex-col">
|
<view class="app-page flex flex-col">
|
||||||
<view class="e-fixed shadow-2 bg-white">
|
<view class="e-fixed shadow-2 bg-white">
|
||||||
<tm-search
|
<tm-search :clear="true" v-model="queryParams.keyword" :round="24" :shadow="0" confirmText="搜索" color="light-blue" insertColor="light-blue" align="center" @confirm="fnOnSearch()"></tm-search>
|
||||||
:clear="true"
|
|
||||||
v-model="queryParams.keyword"
|
|
||||||
:round="24"
|
|
||||||
:shadow="0"
|
|
||||||
confirmText="搜索"
|
|
||||||
color="light-blue"
|
|
||||||
insertColor="light-blue"
|
|
||||||
align="center"
|
|
||||||
@confirm="fnOnSearch()"
|
|
||||||
></tm-search>
|
|
||||||
<tm-tabs v-if="team.list.length != 0" color="light-blue" :shadow="0" v-model="team.activeIndex" :list="team.list" align="center" @change="fnOnTabChange"></tm-tabs>
|
<tm-tabs v-if="team.list.length != 0" color="light-blue" :shadow="0" v-model="team.activeIndex" :list="team.list" align="center" @change="fnOnTabChange"></tm-tabs>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -35,7 +25,7 @@
|
|||||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无任何图片"></tm-empty></view>
|
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无任何图片"></tm-empty></view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<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="calcAniWait(index)">
|
||||||
<view class="card mb-24 flex flex-col bg-white pa-24 round-3">
|
<view class="card mb-24 flex flex-col bg-white pa-24 round-3">
|
||||||
<view class="thumbnail round-2" @click="fnPreview(item, index)">
|
<view class="thumbnail round-2" @click="fnPreview(item, index)">
|
||||||
<image class="thumbnail-img round-2" :src="item.showThumbnail" mode="aspectFill"></image>
|
<image class="thumbnail-img round-2" :src="item.showThumbnail" mode="aspectFill"></image>
|
||||||
@@ -66,99 +56,23 @@
|
|||||||
<view class="poup-content">
|
<view class="poup-content">
|
||||||
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑图片' : '新增图片' }}</view>
|
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑图片' : '新增图片' }}</view>
|
||||||
<scroll-view :enable-flex="true" class="poup-body pa-24 pt-0 pb-0" :scroll-y="true" :scroll-top="poupBodyScrollTop" @touchmove.stop @scroll="fnOnPoupBodyScroll">
|
<scroll-view :enable-flex="true" class="poup-body pa-24 pt-0 pb-0" :scroll-y="true" :scroll-top="poupBodyScrollTop" @touchmove.stop @scroll="fnOnPoupBodyScroll">
|
||||||
<tm-input
|
<tm-input :adjust-position="true" :round="3" clear :borderBottom="false" title="图片名称" bg-color="grey-lighten-5" v-model="form.name" placeholder="请输入图片名称"></tm-input>
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
clear
|
|
||||||
:borderBottom="false"
|
|
||||||
title="图片名称"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.name"
|
|
||||||
placeholder="请输入图片名称"
|
|
||||||
></tm-input>
|
|
||||||
|
|
||||||
<tm-input
|
<tm-input name="team" :adjust-position="true" :round="3" bg-color="grey-lighten-5" :borderBottom="false" title="图片分组" placeholder="请选择输入或分组" v-model="form.team">
|
||||||
name="team"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
:borderBottom="false"
|
|
||||||
title="图片分组"
|
|
||||||
placeholder="请选择输入或分组"
|
|
||||||
v-model="form.team"
|
|
||||||
>
|
|
||||||
<tm-pickers slot="rightBtn" rang-key="name" :default-value.sync="team.selected" :list="team.selectList" @confirm="fnOnSelectTeamConfirm">
|
<tm-pickers slot="rightBtn" rang-key="name" :default-value.sync="team.selected" :list="team.selectList" @confirm="fnOnSelectTeamConfirm">
|
||||||
<tm-button size="m" :dense="true" :shadow="0" theme="bg-gradient-light-blue-accent">选择</tm-button>
|
<tm-button size="m" :dense="true" :shadow="0" theme="bg-gradient-light-blue-accent">选择</tm-button>
|
||||||
</tm-pickers>
|
</tm-pickers>
|
||||||
</tm-input>
|
</tm-input>
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:图片分组可选择,也可以输入新的分组名称</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:图片分组可选择,也可以输入新的分组名称</view>
|
||||||
<tm-pickersDate
|
<tm-pickersDate :full-number="true" :show-detail="{ year: true, month: true, day: true, hour: true, min: true, sec: true }" :default-value="takeTime" @confirm="fnOnTakeTimeConfirm">
|
||||||
:full-number="true"
|
<tm-input title="拍摄时间" :adjust-position="true" :round="3" bg-color="grey-lighten-5" :borderBottom="false" placeholder="请选择拍摄时间" disabled :value="takeTime"></tm-input>
|
||||||
:show-detail="{ year: true, month: true, day: true, hour: true, min: true, sec: true }"
|
|
||||||
:default-value="takeTime"
|
|
||||||
@confirm="fnOnTakeTimeConfirm"
|
|
||||||
>
|
|
||||||
<tm-input
|
|
||||||
title="拍摄时间"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
:borderBottom="false"
|
|
||||||
placeholder="请选择拍摄时间"
|
|
||||||
disabled
|
|
||||||
:value="takeTime"
|
|
||||||
></tm-input>
|
|
||||||
</tm-pickersDate>
|
</tm-pickersDate>
|
||||||
<tm-input
|
<tm-input :borderBottom="false" :adjust-position="true" :round="3" clear title="拍摄地点" bg-color="grey-lighten-5" v-model="form.location" placeholder="请输入拍摄地点"></tm-input>
|
||||||
:borderBottom="false"
|
<tm-input :borderBottom="false" :vertical="false" clear :adjust-position="true" inputType="textarea" :round="3" title="图片描述" :height="160" bg-color="grey-lighten-5" v-model="form.description" placeholder="请输入图片描述"></tm-input>
|
||||||
:adjust-position="true"
|
<tm-input name="url" clear :borderBottom="false" :adjust-position="true" :round="3" title="图片地址" bg-color="grey-lighten-5" v-model="form.url" placeholder="请输入或选择图片" @clear="fnOnUrlInputChange" @blur="fnOnUrlInputChange" @input="fnOnUrlInputChange">
|
||||||
:round="3"
|
|
||||||
clear
|
|
||||||
title="拍摄地点"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.location"
|
|
||||||
placeholder="请输入拍摄地点"
|
|
||||||
></tm-input>
|
|
||||||
<tm-input
|
|
||||||
:borderBottom="false"
|
|
||||||
:vertical="false"
|
|
||||||
clear
|
|
||||||
:adjust-position="true"
|
|
||||||
inputType="textarea"
|
|
||||||
:round="3"
|
|
||||||
title="图片描述"
|
|
||||||
:height="160"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.description"
|
|
||||||
placeholder="请输入图片描述"
|
|
||||||
></tm-input>
|
|
||||||
<tm-input
|
|
||||||
name="url"
|
|
||||||
clear
|
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="图片地址"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.url"
|
|
||||||
placeholder="请输入或选择图片"
|
|
||||||
@clear="fnOnUrlInputChange"
|
|
||||||
@blur="fnOnUrlInputChange"
|
|
||||||
@input="fnOnUrlInputChange"
|
|
||||||
>
|
|
||||||
<tm-button slot="rightBtn" size="m" :dense="true" :shadow="0" theme="bg-gradient-light-blue-accent" @click="fnShowAttachmentsSelect('url')">选择</tm-button>
|
<tm-button slot="rightBtn" size="m" :dense="true" :shadow="0" theme="bg-gradient-light-blue-accent" @click="fnShowAttachmentsSelect('url')">选择</tm-button>
|
||||||
</tm-input>
|
</tm-input>
|
||||||
<tm-input
|
<tm-input name="thumbnail" :borderBottom="false" :adjust-position="true" :round="3" clear title="缩略图片" bg-color="grey-lighten-5" v-model="form.thumbnail" placeholder="请输入或选择缩略图">
|
||||||
name="thumbnail"
|
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
clear
|
|
||||||
title="缩略图片"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.thumbnail"
|
|
||||||
placeholder="请输入或选择缩略图"
|
|
||||||
>
|
|
||||||
<tm-button slot="rightBtn" size="m" :dense="true" :shadow="0" theme="bg-gradient-light-blue-accent" @click="fnShowAttachmentsSelect('thumbnail')">
|
<tm-button slot="rightBtn" size="m" :dense="true" :shadow="0" theme="bg-gradient-light-blue-accent" @click="fnShowAttachmentsSelect('thumbnail')">
|
||||||
选择
|
选择
|
||||||
</tm-button>
|
</tm-button>
|
||||||
@@ -297,12 +211,14 @@ export default {
|
|||||||
.catch(err => {});
|
.catch(err => {});
|
||||||
},
|
},
|
||||||
fnOnSearch() {
|
fnOnSearch() {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.queryParams.page = 0;
|
this.queryParams.page = 0;
|
||||||
this.isLoadMore = false;
|
this.isLoadMore = false;
|
||||||
this.fnToTopPage();
|
this.fnToTopPage();
|
||||||
this.fnGetData();
|
this.fnGetData();
|
||||||
},
|
},
|
||||||
fnOnTabChange(index) {
|
fnOnTabChange(index) {
|
||||||
|
this.fnResetSetAniWaitIndex();
|
||||||
this.queryParams.team = index == 0 ? undefined : this.team.list[index];
|
this.queryParams.team = index == 0 ? undefined : this.team.list[index];
|
||||||
this.queryParams.page = 0;
|
this.queryParams.page = 0;
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
@@ -519,23 +435,29 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|
||||||
.loading-error {
|
.loading-error {
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-wrap {
|
.btn-wrap {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-top: 12rpx;
|
padding-top: 12rpx;
|
||||||
padding-bottom: 12rpx;
|
padding-bottom: 12rpx;
|
||||||
box-shadow: 0rpx -4rpx 24rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0rpx -4rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&-img {
|
&-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 300rpx;
|
height: 300rpx;
|
||||||
@@ -545,6 +467,7 @@ export default {
|
|||||||
.poup-content {
|
.poup-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-body {
|
.poup-body {
|
||||||
height: 69vh;
|
height: 69vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
+13
-29
@@ -14,7 +14,7 @@
|
|||||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="无数据"></tm-empty></view>
|
<view v-if="dataList.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="无数据"></tm-empty></view>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-for="(tag, index) in dataList" :key="index">
|
<block v-for="(tag, index) in dataList" :key="index">
|
||||||
<tm-translate animation-name="fadeUp" :wait="(index + 1) * 50">
|
<tm-translate animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<view class="tags-card flex round-3 bg-white pa-24 mb-24" @click="fnShowFormModal(tag)">
|
<view class="tags-card flex round-3 bg-white pa-24 mb-24" @click="fnShowFormModal(tag)">
|
||||||
<text class="del-icon flex flex-center" @click.stop="fnDelete(tag, index)">×</text>
|
<text class="del-icon flex flex-center" @click.stop="fnDelete(tag, index)">×</text>
|
||||||
<view class="left">
|
<view class="left">
|
||||||
@@ -46,36 +46,11 @@
|
|||||||
<view class="poup-content">
|
<view class="poup-content">
|
||||||
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑标签' : '新增标签' }}</view>
|
<view class="poup-head text-align-center text-weight-b text-size-g ma-24">{{ form.id != undefined ? '编辑标签' : '新增标签' }}</view>
|
||||||
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
<scroll-view class="poup-body pa-24 pt-0" :scroll-y="true" @touchmove.stop>
|
||||||
<tm-input
|
<tm-input required :adjust-position="true" :round="3" :borderBottom="false" title="名称" bg-color="grey-lighten-5" v-model="form.name" placeholder="请输入标签名称"></tm-input>
|
||||||
required
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
:borderBottom="false"
|
|
||||||
title="名称"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.name"
|
|
||||||
placeholder="请输入标签名称"
|
|
||||||
></tm-input>
|
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:页面上所显示的名称</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:页面上所显示的名称</view>
|
||||||
<tm-input
|
<tm-input :borderBottom="false" :adjust-position="true" :round="3" title="别名" bg-color="grey-lighten-5" v-model="form.slug" placeholder="请输入标签别名"></tm-input>
|
||||||
:borderBottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="别名"
|
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
v-model="form.slug"
|
|
||||||
placeholder="请输入标签别名"
|
|
||||||
></tm-input>
|
|
||||||
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:一般为单个标签页面的标识,最好为英文</view>
|
<view class="pl-32 mb-24 input-tips text-grey text-size-s">填写提示:一般为单个标签页面的标识,最好为英文</view>
|
||||||
<tm-input
|
<tm-input bg-color="grey-lighten-5" :border-bottom="false" :adjust-position="true" :round="3" title="颜色" placeholder="点击右侧选择标签颜色" v-model="form.color">
|
||||||
bg-color="grey-lighten-5"
|
|
||||||
:border-bottom="false"
|
|
||||||
:adjust-position="true"
|
|
||||||
:round="3"
|
|
||||||
title="颜色"
|
|
||||||
placeholder="点击右侧选择标签颜色"
|
|
||||||
v-model="form.color"
|
|
||||||
>
|
|
||||||
<template v-slot:rightBtn>
|
<template v-slot:rightBtn>
|
||||||
<tm-button class="ml-12" theme="bg-gradient-blue-accent" :round="3" :font-size="24" :height="66" block :width="120" @click="fnSelectColor">
|
<tm-button class="ml-12" theme="bg-gradient-blue-accent" :round="3" :font-size="24" :height="66" block :width="120" @click="fnSelectColor">
|
||||||
选择颜色
|
选择颜色
|
||||||
@@ -327,11 +302,13 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrap {
|
.loading-wrap {
|
||||||
.loading-error {
|
.loading-error {
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-empty {
|
.content-empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
@@ -340,18 +317,22 @@ export default {
|
|||||||
.poup-content {
|
.poup-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poup-body {
|
.poup-body {
|
||||||
height: 58vh;
|
height: 58vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 260rpx;
|
height: 260rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags-card {
|
.tags-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
|
||||||
|
|
||||||
.del-icon {
|
.del-icon {
|
||||||
width: 46rpx;
|
width: 46rpx;
|
||||||
height: 46rpx;
|
height: 46rpx;
|
||||||
@@ -366,6 +347,7 @@ export default {
|
|||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
@@ -377,8 +359,10 @@ export default {
|
|||||||
background-color: #607d8b;
|
background-color: #607d8b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.color {
|
.color {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|||||||
+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.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}));
|
!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("./dayjs.min.js")):"function"==typeof define&&define.amd?define(require("./dayjs.min.js"),_):(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}));
|
||||||
+1
-1
@@ -12,7 +12,7 @@ module.exports = {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: true,
|
secure: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
"^/api": ""
|
"^/api": "/api"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user