Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
csssp-xcx-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
劳广强
csssp-xcx-h5
Commits
a530a2b0
提交
a530a2b0
authored
12月 27, 2022
作者:
劳广强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 文章详情页 接入接口
上级
9c3e144d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
20 行删除
+26
-20
index.scss
pages/article-detail/index.scss
+4
-0
index.vue
pages/article-detail/index.vue
+22
-20
没有找到文件。
pages/article-detail/index.scss
浏览文件 @
a530a2b0
...
...
@@ -154,3 +154,7 @@
width
:
46rpx
;
height
:
46rpx
;
}
/
deep
/
img
{
display
:
block
;
}
pages/article-detail/index.vue
浏览文件 @
a530a2b0
<
template
>
<view>
<view
class=
"article_head"
>
<view
class=
"title"
>
{{
$u
.
getProperty
(
articleDetail
,
'
detail.
title'
)
}}
</view>
<view
class=
"title"
>
{{
$u
.
getProperty
(
articleDetail
,
'title'
)
}}
</view>
<view
class=
"head_buttom"
>
<view
class=
"left"
>
<view
class=
"browse"
>
<image
class=
"browse_icon"
mode=
"aspectFill"
src=
"/static/icon/ic_wz_kanguo@2x.png"
/>
<view
class=
"browse_number"
>
{{
$u
.
getProperty
(
articleDetail
,
'
detail.
views_num'
)
}}
</view>
<view
class=
"browse_number"
>
{{
$u
.
getProperty
(
articleDetail
,
'views_num'
)
}}
</view>
</view>
<view
class=
"browse"
>
<image
class=
"browse_icon"
mode=
"aspectFill"
src=
"/static/icon/ic_wz_dianzan1@2x.png"
/>
...
...
@@ -17,8 +17,8 @@
</view>
</view>
<!--
<image
class=
"img"
mode=
"aspectFill"
src=
"
{{
articleDetail
.
detail
.
img
}}
" /> -->
<view
class=
"img_source"
>
{{
$u
.
getProperty
(
articleDetail
,
'
detail.
soure'
)
}}
</view>
<!--
<image
class=
"img"
mode=
"aspectFill"
src=
"
{{
articleDetail
.
img
}}
" /> -->
<view
class=
"img_source"
>
{{
$u
.
getProperty
(
articleDetail
,
'soure'
)
}}
</view>
<view
class=
"article_detail"
>
<u-parse
:content=
"content"
/>
...
...
@@ -38,12 +38,12 @@
<image
class=
"btn_icon"
mode=
"aspectFill"
src=
"/static/icon/ic_fenxiang@2x.png"
/>
</button>
</view>
<
van-action-sheet
v-show=
"showTip"
cancel-text=
"取消"
bind:close=
"close"
bind:cancel=
"cancelShare"
>
<view
class=
"share_box"
>
<button
open-type=
"share"
class=
"share_pyq_btn"
>
分享给好友
</button
>
<view
bindtap=
"sharePYQ"
class=
"share_pyq"
>
分享到朋友圈
</view
>
</view
>
<
/van-action-sheet
>
<
!--
<van-action-sheet
v-show=
"showTip"
cancel-text=
"取消"
bind:close=
"close"
bind:cancel=
"cancelShare"
>
--
>
<!--
<view
class=
"share_box"
>
--
>
<!--
<button
open-type=
"share"
class=
"share_pyq_btn"
>
分享给好友
</button>
--
>
<!--
<view
bindtap=
"sharePYQ"
class=
"share_pyq"
>
分享到朋友圈
</view>
--
>
<!--
</view>
--
>
<
!--
</van-action-sheet>
--
>
</view>
<view
class=
"share_bg"
bindtap=
"closetipPyq"
v-if=
"tipPyq"
>
...
...
@@ -60,9 +60,11 @@ import { articleDetail } from '@/pages/article-detail/mock';
export
default
{
data
()
{
return
{
query
:
{},
articleDetail
:
{},
title
:
''
,
likes_num
:
''
,
created
:
''
,
id
:
null
,
follow
:
false
,
content
:
''
,
...
...
@@ -74,22 +76,22 @@ export default {
},
onLoad
(
query
)
{
console
.
log
(
query
);
this
.
articleDetail
=
articleDetail
;
this
.
query
=
query
;
this
.
fetchArticleDetail
();
},
methods
:
{
async
fetchArticleDetail
()
{
const
token
=
uni
.
getStorageSync
(
'token'
);
this
.
ifshare
=
true
;
this
.
articleDetail
=
articleDetail
;
this
.
created
=
articleDetail
.
detail
.
created
.
substring
(
0
,
10
);
this
.
title
=
articleDetail
.
detail
.
title
;
this
.
follow
=
articleDetail
.
follow_status
;
this
.
fabulous
=
articleDetail
.
like_status
;
this
.
likes_num
=
articleDetail
.
detail
.
likes_num
;
this
.
content
=
articleDetail
.
detail
.
content
;
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/article/detail'
,
{
params
:
{
id
:
this
.
query
.
id
}
});
this
.
articleDetail
=
detail
;
this
.
created
=
detail
.
created
.
substring
(
0
,
10
);
this
.
title
=
detail
.
title
;
this
.
follow
=
detail
.
follow_status
;
this
.
fabulous
=
detail
.
like_status
;
this
.
likes_num
=
detail
.
likes_num
;
this
.
content
=
detail
.
content
;
},
},
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论