mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-12 21:29:31 +08:00
新增:文章详情原文链接、访问密码功能
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 文本省略样式 结束 */
|
||||||
|
|||||||
@@ -3,28 +3,20 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import imageCache from '@/utils/imageCache.js';
|
import imageCache from '@/utils/imageCache.js';
|
||||||
export default {
|
export default {
|
||||||
name: 'cache-image',
|
name: 'cache-image',
|
||||||
props: {
|
props: {
|
||||||
url: {
|
url: {
|
||||||
@@ -37,7 +29,7 @@ export default {
|
|||||||
},
|
},
|
||||||
loadStyle: {
|
loadStyle: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default () {
|
||||||
return {
|
return {
|
||||||
backgroundColor: '#ffffff',
|
backgroundColor: '#ffffff',
|
||||||
color: '#333'
|
color: '#333'
|
||||||
@@ -46,7 +38,7 @@ export default {
|
|||||||
},
|
},
|
||||||
loadErrStyle: {
|
loadErrStyle: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default () {
|
||||||
return {
|
return {
|
||||||
color: 'rgba(244, 67, 54,1)'
|
color: 'rgba(244, 67, 54,1)'
|
||||||
// backgroundColor: 'rgba(244, 67, 54,0.2)'
|
// backgroundColor: 'rgba(244, 67, 54,0.2)'
|
||||||
@@ -71,7 +63,7 @@ export default {
|
|||||||
},
|
},
|
||||||
styles: {
|
styles: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default () {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -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: {
|
||||||
@@ -137,43 +135,54 @@ export default {
|
|||||||
fnOnLoad() {
|
fnOnLoad() {
|
||||||
this.loadStatus = 'success';
|
this.loadStatus = 'success';
|
||||||
},
|
},
|
||||||
fnOnError() {
|
fnOnError(e) {
|
||||||
this.loadStatus = 'error';
|
this.loadStatus = 'error';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.cache-image-wrap {
|
.cache-image-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.img-loading,
|
|
||||||
.img-error {
|
.img-loading,
|
||||||
|
.img-error {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
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-err-icon {
|
&-img {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-err-icon {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
@keyframes xhRote {
|
|
||||||
|
@keyframes xhRote {
|
||||||
0% {
|
0% {
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
}
|
}
|
||||||
@@ -181,5 +190,5 @@ export default {
|
|||||||
100% {
|
100% {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
+138
-138
@@ -1,31 +1,31 @@
|
|||||||
{
|
{
|
||||||
"name": "uni-halo",
|
"name" : "uni-halo",
|
||||||
"appid": "__UNI__5748B6E",
|
"appid" : "__UNI__5748B6E",
|
||||||
"description": "uni-halo博客:基于halo开源博客系统API开发的多端博客。",
|
"description" : "uni-halo博客:基于halo开源博客系统API开发的多端博客。",
|
||||||
"versionName": "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode": 100,
|
"versionCode" : 100,
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler": "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion": 3,
|
"compilerVersion" : 3,
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting": true,
|
"waiting" : true,
|
||||||
"autoclose": true,
|
"autoclose" : true,
|
||||||
"delay": 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules": {
|
"modules" : {
|
||||||
"OAuth": {},
|
"OAuth" : {},
|
||||||
"Share": {}
|
"Share" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute": {
|
"distribute" : {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
"android": {
|
"android" : {
|
||||||
"permissions": [
|
"permissions" : [
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
@@ -46,172 +46,172 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios": {
|
"ios" : {
|
||||||
"dSYMs": false,
|
"dSYMs" : false,
|
||||||
"capabilities": {
|
"capabilities" : {
|
||||||
"entitlements": {
|
"entitlements" : {
|
||||||
"com.apple.developer.associated-domains": ["applinks:static-699a26a5-a6cd-4b54-b603-5155b312a5f5.bspapp.com"]
|
"com.apple.developer.associated-domains" : [ "applinks:static-699a26a5-a6cd-4b54-b603-5155b312a5f5.bspapp.com" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs": {
|
"sdkConfigs" : {
|
||||||
"ad": {
|
"ad" : {
|
||||||
"gdt": {},
|
"gdt" : {},
|
||||||
"csj": {},
|
"csj" : {},
|
||||||
"360": {},
|
"360" : {},
|
||||||
"ks": {},
|
"ks" : {},
|
||||||
"sigmob": {},
|
"sigmob" : {},
|
||||||
"hw": {},
|
"hw" : {},
|
||||||
"bd": {}
|
"bd" : {}
|
||||||
},
|
},
|
||||||
"oauth": {
|
"oauth" : {
|
||||||
"weixin": {
|
"weixin" : {
|
||||||
"appid": "wxd971954762ec4744",
|
"appid" : "wxd971954762ec4744",
|
||||||
"UniversalLinks": "https://static-699a26a5-a6cd-4b54-b603-5155b312a5f5.bspapp.com/uni-universallinks/__UNI__5748B6E/"
|
"UniversalLinks" : "https://static-699a26a5-a6cd-4b54-b603-5155b312a5f5.bspapp.com/uni-universallinks/__UNI__5748B6E/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"share": {
|
"share" : {
|
||||||
"weixin": {
|
"weixin" : {
|
||||||
"appid": "wxd971954762ec4744",
|
"appid" : "wxd971954762ec4744",
|
||||||
"UniversalLinks": "https://static-699a26a5-a6cd-4b54-b603-5155b312a5f5.bspapp.com/uni-universallinks/__UNI__5748B6E/"
|
"UniversalLinks" : "https://static-699a26a5-a6cd-4b54-b603-5155b312a5f5.bspapp.com/uni-universallinks/__UNI__5748B6E/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"icons": {
|
"icons" : {
|
||||||
"android": {
|
"android" : {
|
||||||
"hdpi": "unpackage/res/icons/72x72.png",
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios" : {
|
||||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
"ipad": {
|
"ipad" : {
|
||||||
"app": "unpackage/res/icons/76x76.png",
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
"app@2x": "unpackage/res/icons/152x152.png",
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
"notification": "unpackage/res/icons/20x20.png",
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
"settings": "unpackage/res/icons/29x29.png",
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"spotlight": "unpackage/res/icons/40x40.png",
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
},
|
},
|
||||||
"iphone": {
|
"iphone" : {
|
||||||
"app@2x": "unpackage/res/icons/120x120.png",
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
"app@3x": "unpackage/res/icons/180x180.png",
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
"quickapp": {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin": {
|
"mp-weixin" : {
|
||||||
"appid": "wx1bb161867082c72f",
|
"appid" : "wx1bb161867082c72f",
|
||||||
"setting": {
|
"setting" : {
|
||||||
"urlCheck": false,
|
"urlCheck" : false,
|
||||||
"minified": true
|
"minified" : true
|
||||||
},
|
},
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-alipay": {
|
"mp-alipay" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-baidu": {
|
"mp-baidu" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-toutiao": {
|
"mp-toutiao" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true,
|
"enable" : true,
|
||||||
"version": "2"
|
"version" : "2"
|
||||||
},
|
},
|
||||||
"vueVersion": "2",
|
"vueVersion" : "2",
|
||||||
"h5": {
|
"h5" : {
|
||||||
"title": "uni-halo",
|
"title" : "uni-halo",
|
||||||
"devServer": {
|
"devServer" : {
|
||||||
"disableHostCheck": true,
|
"disableHostCheck" : true,
|
||||||
"proxy": {
|
"proxy" : {
|
||||||
"/api": {
|
"/api" : {
|
||||||
"target": "https://b.925i.cn",
|
"target" : "https://b.925i.cn",
|
||||||
"changeOrigin": true,
|
"changeOrigin" : true,
|
||||||
"secure": false,
|
"secure" : false,
|
||||||
"pathRewrite": {
|
"pathRewrite" : {
|
||||||
"^/api": "/api"
|
"^/api" : "/api"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optimization": {
|
"optimization" : {
|
||||||
"preload": true,
|
"preload" : true,
|
||||||
"treeShaking": {
|
"treeShaking" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"_spaceID": "699a26a5-a6cd-4b54-b603-5155b312a5f5",
|
"_spaceID" : "699a26a5-a6cd-4b54-b603-5155b312a5f5",
|
||||||
"mp-qq": {
|
"mp-qq" : {
|
||||||
"appid": "1112285420",
|
"appid" : "1112285420",
|
||||||
"setting": {
|
"setting" : {
|
||||||
"minified": true,
|
"minified" : true,
|
||||||
"postcss": true,
|
"postcss" : true,
|
||||||
"es6": true
|
"es6" : true
|
||||||
},
|
},
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-jd": {
|
"mp-jd" : {
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-kuaishou": {
|
"mp-kuaishou" : {
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-lark": {
|
"mp-lark" : {
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"quickapp-webview-huawei": {
|
"quickapp-webview-huawei" : {
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"quickapp-webview-union": {
|
"quickapp-webview-union" : {
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -550,7 +550,7 @@
|
|||||||
},
|
},
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"backgroundColor": "#fff",
|
"backgroundColor": "#fff",
|
||||||
"borderStyle": "#fff",
|
"borderStyle": "white",
|
||||||
"color": "#303133",
|
"color": "#303133",
|
||||||
"selectedColor": "#03a9f4",
|
"selectedColor": "#03a9f4",
|
||||||
"list": [{
|
"list": [{
|
||||||
|
|||||||
@@ -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,23 +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
|
<view v-if="haloAdConfig.articleDetail.use && (haloAdConfig.unitId || haloAdConfig.adpid)" class="ad-wrap ma-24 mb-0">
|
||||||
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 -->
|
||||||
@@ -87,27 +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 || result.formatContent"
|
</tm-more>
|
||||||
:markdown="true"
|
</view>
|
||||||
:showLineNumber="true"
|
|
||||||
:showLanguageName="true"
|
|
||||||
:copyByLongPress="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 广告区域:微信/decloud申请 -->
|
<!-- 广告区域:微信/decloud申请 -->
|
||||||
<view
|
<view v-if="haloAdConfig.articleDetail.use && (haloAdConfig.unitId || haloAdConfig.adpid)" class="ad-wrap mt-24 mb-24 ">
|
||||||
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 -->
|
||||||
@@ -117,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>
|
||||||
@@ -140,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>
|
||||||
@@ -157,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>
|
||||||
|
|
||||||
<!-- 评论详情 -->
|
<!-- 评论详情 -->
|
||||||
@@ -190,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">
|
||||||
@@ -207,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>
|
||||||
@@ -224,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>
|
||||||
@@ -263,33 +201,41 @@
|
|||||||
</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>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MarkdownConfig from '@/common/markdown/markdown.config.js';
|
import MarkdownConfig from '@/common/markdown/markdown.config.js';
|
||||||
|
|
||||||
import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
|
import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
|
||||||
import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
|
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';
|
||||||
import commentItem from '@/components/comment-item/comment-item.vue';
|
import commentItem from '@/components/comment-item/comment-item.vue';
|
||||||
|
|
||||||
import rCanvas from '@/components/r-canvas/r-canvas.vue';
|
import rCanvas from '@/components/r-canvas/r-canvas.vue';
|
||||||
import barrage from '@/components/barrage/barrage.vue';
|
import barrage from '@/components/barrage/barrage.vue';
|
||||||
|
|
||||||
import { haloWxShareMixin } from '@/common/mixins/wxshare.mixin.js';
|
import { haloWxShareMixin } from '@/common/mixins/wxshare.mixin.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
tmSkeleton,
|
tmSkeleton,
|
||||||
tmPoup,
|
tmPoup,
|
||||||
tmFlotbutton,
|
tmFlotbutton,
|
||||||
tmButton,
|
tmButton,
|
||||||
tmEmpty,
|
tmEmpty,
|
||||||
|
tmDialog,
|
||||||
|
tmMore,
|
||||||
mpHtml,
|
mpHtml,
|
||||||
commentList,
|
commentList,
|
||||||
commentItem,
|
commentItem,
|
||||||
@@ -302,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'
|
||||||
},
|
},
|
||||||
@@ -334,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: {
|
||||||
@@ -354,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) {
|
||||||
@@ -375,7 +371,9 @@ export default {
|
|||||||
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({
|
||||||
@@ -386,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';
|
||||||
@@ -599,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({
|
||||||
@@ -748,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 // 弹幕消失的速度
|
||||||
});
|
});
|
||||||
@@ -756,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();
|
||||||
@@ -768,34 +768,76 @@ 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-page {
|
.app-page {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #fafafd;
|
background-color: #fafafd;
|
||||||
}
|
padding-bottom: 24rpx;
|
||||||
.loading-wrap {
|
}
|
||||||
|
|
||||||
|
.bg-image {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-wrap {
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
height: inherit;
|
height: inherit;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head {
|
.head {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -804,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;
|
||||||
}
|
}
|
||||||
@@ -831,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;
|
||||||
@@ -855,6 +904,7 @@ export default {
|
|||||||
width: 2rpx;
|
width: 2rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
&::after {
|
&::after {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -862,24 +912,28 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.category {
|
|
||||||
|
.category {
|
||||||
margin: 0 24rpx;
|
margin: 0 24rpx;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
@@ -888,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;
|
||||||
}
|
}
|
||||||
.evan-markdown,
|
|
||||||
.ad-wrap,
|
.markdown-wrap,
|
||||||
.copyright-wrap,
|
.evan-markdown,
|
||||||
.comment-wrap {
|
.ad-wrap,
|
||||||
|
.copyright-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);
|
||||||
}
|
}
|
||||||
.copyright-title {
|
|
||||||
|
.markdown-wrap {
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
@@ -929,34 +997,41 @@ export default {
|
|||||||
background-color: rgb(3, 174, 252);
|
background-color: rgb(3, 174, 252);
|
||||||
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;
|
||||||
|
|
||||||
.e-loading-icon {
|
.e-loading-icon {
|
||||||
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;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -965,9 +1040,40 @@ export default {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
// 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>
|
||||||
Reference in New Issue
Block a user