447 lines
19 KiB
Vue
447 lines
19 KiB
Vue
<template>
|
||
<view>
|
||
<view class="v-preview">
|
||
<image :src="templateSrc" alt="" class="img" mode="widthFix" />
|
||
<view class="btn-area">
|
||
<view class="red-btn-area">
|
||
<button class="red-btn">老兵直播</button>
|
||
<button class="red-btn">老兵故事</button>
|
||
<button class="red-btn">在线注册</button>
|
||
</view>
|
||
<view class="red-btn-plain-area">
|
||
<view class="red-btn-plain" @click="toIndex()">新四军</view>
|
||
<view class="red-btn-plain">抗美援朝</view>
|
||
<view class="red-btn-plain">抗美援越</view>
|
||
<view class="red-btn-plain">对越自卫反击战</view>
|
||
<view class="red-btn-plain">和平时期退役兵</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
<view style="margin-left: 50rpx;margin-right: 50rpx;">
|
||
<view class="example-body">
|
||
<view class=""
|
||
style="text-align: center;width:70%;font-size: 32rpx;color: #e33;font-weight: bold">
|
||
鱼水情
|
||
</view>
|
||
<view class=""
|
||
style="text-align: left;font-weight: bold;color: #e33;font-size: 20rpx;line-height: 36rpx;">
|
||
张建群
|
||
</view>
|
||
</view>
|
||
|
||
<view class="tab">
|
||
住在大城市里,“军民鱼水情”只是句日常的用语,并没有真正切实的体会。
|
||
</view>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/wz1.png?expire_at=1741142112&er_sign=639352a13dd5bb04b7fa46bb8e3f5f93" mode=""></image>
|
||
<view class="tab">
|
||
1952年的冬天,我团接到上级命令,前往朝鲜战场。这兴奋劲像个麻雀,跳跃不停。经过战前培训,我们坐着向北驰去的列车。一路上歌声不断,当列车到达山东济南时,站台上摆着热气腾腾的饭菜,我们狼吞虎咽地吃着可口的饭菜,这比在列车上吃饼干要好百倍了。经过一天多的劳累,在大年除夕的那天,我们到达了安东。快速转移到一个街坊后,多数人都安排好了住所,可我们班还剩六名战士没法安排,连长还在为难。
|
||
</view>
|
||
<view class="tab">
|
||
这时,一一间小屋走出了一对年轻夫妇,他们说:“志愿军同志,不要在外面过夜,零下三十度是冻不起的。我俩今晚到她娘家去,腾出这间屋,给志愿军战士住。”这是一对当天结婚的新婚夫妇,是第一夜,人生能有几个第一夜呢?一辈子,不就这一个吗?
|
||
|
||
</view>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/wz2.jpg?expire_at=1741142127&er_sign=05178b7851f3216a45b7badf85b1c7d3" mode=""></image>
|
||
<view class="tab">
|
||
我们住进小屋,六个人挤在一张床上睡觉,可怎么都睡不着。平时说的“军民鱼水情”,今天真的出现了吗?老乡说:“志愿军出国作战,到了安东,哪能汽车16团汽车修理工叫他们在野外露营?我俩到我娘那里住一张建群宿就行。”这几句朴实无华的话,真是“鱼水情”的真实体验。
|
||
|
||
</view>
|
||
<view class="tab">
|
||
通过这一事件,我真心体会到,人民军队爱人民,人民爱护子弟兵的“鱼水情”。
|
||
</view>
|
||
</view>
|
||
<view class="" style="font-size: 20rpx;color: #999;margin-left: 50rpx;margin-top: 20rpx;">
|
||
更新于 2024-12-26
|
||
</view>
|
||
|
||
<view class="example-body">
|
||
<button>
|
||
<svg t="1739442625419" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1476" width="16" height="16"><path d="M109.226667 798.72c-20.48 0-35.84 17.066667-35.84 37.546667 0 20.48 17.066667 35.84 37.546666 35.84 3.413333 0 157.013333 1.706667 252.586667 107.52 6.826667 8.533333 17.066667 11.946667 27.306667 11.946666 8.533333 0 17.066667-3.413333 23.893333-10.24 15.36-13.653333 17.066667-35.84 3.413333-51.2-119.466667-131.413333-302.08-131.413333-308.906666-131.413333zM914.773333 798.72c-6.826667 0-186.026667 0-307.2 131.413333-13.653333 15.36-13.653333 37.546667 1.706667 51.2 6.826667 6.826667 15.36 10.24 25.6 10.24s20.48-3.413333 27.306667-11.946666c98.986667-107.52 250.88-107.52 252.586666-107.52 20.48 0 35.84-15.36 37.546667-35.84 0-20.48-17.066667-37.546667-37.546667-37.546667z" fill="#d81e06" p-id="1477"></path><path d="M877.226667 600.746667c78.506667-133.12 97.28-307.2 44.373333-431.786667-5.12-13.653333-18.773333-22.186667-32.426667-22.186667h-11.946666c-71.68 0-138.24 13.653333-197.973334 40.96-42.666667-80.213333-90.453333-138.24-145.066666-177.493333-1.706667-1.706667-3.413333-3.413333-5.12-3.413333-10.24-6.826667-23.893333-6.826667-34.133334-3.413334-3.413333 1.706667-6.826667 3.413333-10.24 6.826667-54.613333 39.253333-102.4 98.986667-145.066666 177.493333-59.733333-25.6-124.586667-39.253333-194.56-39.253333h-10.24c-15.36-1.706667-27.306667 8.533333-34.133334 20.48-51.2 124.586667-34.133333 296.96 44.373334 431.786667 68.266667 116.053333 172.373333 187.733333 296.96 203.093333 3.413333 1.706667 6.826667 1.706667 10.24 1.706667h20.48v180.906666c0 20.48 17.066667 37.546667 37.546666 37.546667 20.48 0 37.546667-17.066667 37.546667-37.546667V805.546667h22.186667c3.413333 0 6.826667 0 10.24-1.706667 124.586667-15.36 228.693333-87.04 296.96-203.093333z" fill="#d81e06" p-id="1478"></path></svg>
|
||
送花
|
||
</button>
|
||
<button>
|
||
<uni-icons
|
||
type="gift"
|
||
size="16">
|
||
|
||
</uni-icons>
|
||
打赏
|
||
</button>
|
||
|
||
</view>
|
||
<view class=""
|
||
style="text-align: center;
|
||
color:3ee;
|
||
margin-top: 20rpx;
|
||
padding-bottom: 50rpx;
|
||
color: #555;
|
||
">
|
||
———<text style="color: #3ee;">{{ " " }}4 朵花{{ " " }}</text>———
|
||
</view>
|
||
<view class="">
|
||
投诉 | 阅读 3112
|
||
|
||
</view>
|
||
<view class="example-body" style="justify-content:center">
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
</view>
|
||
<view class="example-body" style="justify-content:center">
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
</view>
|
||
<view class="example-body" style="justify-content:center">
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
<image src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f" style="width: 64rpx;height: 64rpx;border-radius: 50%;"></image>
|
||
</view>
|
||
|
||
<view class="comment-eg">
|
||
<hb-comment ref="hbComment" @add="add" @del="del" @like="like" @focusOn="focusOn" :deleteTip="'确认删除?'"
|
||
:cmData="commentData" v-if="commentData"></hb-comment>
|
||
</view>
|
||
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
|
||
export default {
|
||
|
||
data() {
|
||
return {
|
||
avatar:"",
|
||
templateSrc:"https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/bg.jpg?expire_at=1741101988&er_sign=c9732cddaaead925cf110d9a11751231",
|
||
"commentData": null,
|
||
"reqFlag": false,
|
||
|
||
}
|
||
|
||
},
|
||
onLoad() {
|
||
|
||
},
|
||
onShow() {
|
||
|
||
this.getComment();
|
||
|
||
},
|
||
|
||
methods: {
|
||
|
||
|
||
// 登录校验
|
||
checkLogin() {
|
||
// TODO 此处填写登录校验逻辑
|
||
if (true) {
|
||
return true;
|
||
} else {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '请先登录',
|
||
confirmText: '前往登录',
|
||
success: function(res) {
|
||
if (res.confirm) {
|
||
uni.redirectTo({
|
||
url: '/pages/login/login'
|
||
});
|
||
}
|
||
}
|
||
});
|
||
return false;
|
||
}
|
||
},
|
||
// 输入框聚焦
|
||
focusOn() {
|
||
this.checkLogin();
|
||
},
|
||
// 获取评论
|
||
getComment() {
|
||
// TODO 接入真实接口
|
||
// this.$u.api.commentList(articleId).then(res => {
|
||
// this.commentData = {
|
||
// "readNumer": res.readNumer,
|
||
// "commentSize": res.commentList.length,
|
||
// "comment": this.getTree(res.commentList)
|
||
// };
|
||
// }).catch(res => {})
|
||
|
||
// 下边假装请求成功
|
||
let res = {
|
||
"readNumer": 193,
|
||
"commentList": [{
|
||
"id": 1,
|
||
"pl_user_id":1,
|
||
"owner": false, // 是否自己
|
||
"hasLike": false, // 从数据库判断(是否点赞)
|
||
"likeNum": 2,
|
||
"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0", // 用户表获取
|
||
"nickName": "超长昵称超长...", // 用户表获取
|
||
"content": "啦啦啦啦",
|
||
"parentId": null,
|
||
"createTime": "2021-07-02 16:32:07"
|
||
},
|
||
{
|
||
"id": 2,
|
||
"owner": false,
|
||
"hasLike": false,
|
||
"likeNum": 2,
|
||
"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797761970/0",
|
||
"nickName": "寂寞无敌",
|
||
"content": "我是评论的评论",
|
||
"parentId": 1,
|
||
"createTime": "2021-07-02 17:05:50"
|
||
},
|
||
{
|
||
"id": 4,
|
||
"owner": true,
|
||
"hasLike": true,
|
||
"likeNum": 1,
|
||
"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797763270/0",
|
||
"nickName": "name111",
|
||
"content": "评论啦啦啦啦啦啦啦啦啦啦",
|
||
"parentId": null,
|
||
"createTime": "2021-07-13 09:37:50"
|
||
},
|
||
{
|
||
"id": 5,
|
||
"owner": false,
|
||
"hasLike": false,
|
||
"likeNum": 0,
|
||
"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0",
|
||
"nickName": "超长昵称超长...",
|
||
"content": "超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论",
|
||
"parentId": null,
|
||
"createTime": "2021-07-13 16:04:35"
|
||
},
|
||
{
|
||
"id": 13,
|
||
"owner": false,
|
||
"hasLike": false,
|
||
"likeNum": 0,
|
||
"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0",
|
||
"nickName": "超长昵称超长...",
|
||
"content": "@寂寞无敌 你怕不是个大聪明",
|
||
"parentId": 1,
|
||
"createTime": "2021-07-14 11:01:23"
|
||
}
|
||
]
|
||
};
|
||
this.commentData = {
|
||
"readNumer": res.readNumer,
|
||
"commentSize": res.commentList.length,
|
||
"comment": this.getTree(res.commentList)
|
||
};
|
||
},
|
||
// 新增评论
|
||
add(req) {
|
||
if (!this.checkLogin()) {
|
||
return
|
||
}
|
||
if (this.reqFlag) {
|
||
uni.showToast({
|
||
title: '操作频繁',
|
||
duration: 1000
|
||
});
|
||
return
|
||
}
|
||
console.log(111);
|
||
this.reqFlag = true;
|
||
// TODO 接入真实接口
|
||
// let params = {
|
||
// "articleId": this.articleId,
|
||
// "pId": req.pId,
|
||
// "content": req.content
|
||
// }
|
||
// this.$u.api.commentAdd(params).then(res => {
|
||
// uni.showToast({
|
||
// title: '操作成功!',
|
||
// duration: 3000
|
||
// });
|
||
// this.$refs.hbComment.addComplete();
|
||
// this.getComment();
|
||
// this.reqFlag = false;
|
||
// }).catch(res => {
|
||
// this.reqFlag = false;
|
||
// })
|
||
// 下边假装请求成功
|
||
this.reqFlag = false;
|
||
this.$refs.hbComment.addComplete();
|
||
this.getComment();
|
||
},
|
||
// 点赞评论
|
||
like(commentId) {
|
||
if (!this.checkLogin()) {
|
||
return
|
||
}
|
||
if (this.reqFlag) {
|
||
uni.showToast({
|
||
title: '操作频繁',
|
||
duration: 1000
|
||
});
|
||
return
|
||
}
|
||
this.reqFlag = true;
|
||
// TODO 接入真实接口
|
||
// this.$u.api.commentLike(commentId).then(res => {
|
||
// this.$refs.hbComment.likeComplete(commentId);
|
||
// this.reqFlag = false;
|
||
// }).catch(res => {
|
||
// this.reqFlag = false;
|
||
// })
|
||
// 下边假装请求成功
|
||
this.reqFlag = false;
|
||
this.$refs.hbComment.likeComplete(commentId);
|
||
},
|
||
// 删除评论
|
||
del(commentId) {
|
||
if (!this.checkLogin()) {
|
||
return
|
||
}
|
||
if (this.reqFlag) {
|
||
uni.showToast({
|
||
title: '操作频繁',
|
||
duration: 1000
|
||
});
|
||
return
|
||
}
|
||
this.reqFlag = true;
|
||
// TODO 接入真实接口
|
||
// this.$u.api.commentDelete(commentId).then(res => {
|
||
// this.reqFlag = false;
|
||
// this.$refs.hbComment.deleteComplete(commentId);
|
||
// }).catch(res => {
|
||
// this.reqFlag = false;
|
||
// })
|
||
// 下边假装请求成功
|
||
this.reqFlag = false;
|
||
this.$refs.hbComment.deleteComplete(commentId);
|
||
},
|
||
// 列表按照父子转换成树
|
||
getTree(data) {
|
||
let result = [];
|
||
let map = {};
|
||
data.forEach(item => {
|
||
map[item.id] = item;
|
||
});
|
||
data.forEach(item => {
|
||
let parent = map[item.parentId];
|
||
if (parent) {
|
||
(parent.children || (parent.children = [])).push(item);
|
||
} else {
|
||
result.push(item);
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
|
||
|
||
.example-body {
|
||
/* #ifndef APP-PLUS-NVUE */
|
||
display: flex;
|
||
/* #endif */
|
||
flex-direction: row;
|
||
justify-content: flex-start;
|
||
/* align-items: flex-end; */
|
||
/* flex-wrap: wrap; */
|
||
padding: 10rpx;
|
||
}
|
||
.btn {
|
||
text-align: center;
|
||
color: #fff;
|
||
padding: 20rpx;
|
||
margin: 20rpx;
|
||
border-radius: 20rpx;
|
||
background-color: #2979ff;
|
||
}
|
||
.tab {
|
||
text-indent: 2rem;
|
||
}
|
||
.v-preview {
|
||
.img {
|
||
width: 100%;
|
||
}
|
||
.btn-area {
|
||
position: relative;
|
||
top: -50rpx;
|
||
}
|
||
.red-btn-area {
|
||
display: flex;
|
||
justify-content: center;
|
||
padding: 10rpx 0;
|
||
margin: 0 40rpx 20rpx 40rpx;
|
||
font-size: 20rpx;
|
||
.red-btn {
|
||
position: relative;
|
||
color: #fff;
|
||
font-weight: 700;
|
||
font-size: 24rpx;
|
||
height: 40rpx;
|
||
line-height: 40rpx;
|
||
margin: 0;
|
||
background-image: linear-gradient(to bottom, #c11c1f, #5c0201);
|
||
+ .red-btn {
|
||
margin-left: 20rpx;
|
||
}
|
||
}
|
||
}
|
||
.red-btn-plain-area {
|
||
display: flex;
|
||
justify-content: center;
|
||
padding: 10rpx 0;
|
||
margin: 0 40rpx;
|
||
font-size: 21rpx;
|
||
border-top: 2px solid;
|
||
border-bottom: 2px solid;
|
||
border-image: linear-gradient(
|
||
to right,
|
||
#fff,
|
||
#f44336bf,
|
||
#b13636,
|
||
#f44336bf,
|
||
#fff
|
||
)
|
||
1;
|
||
.red-btn-plain {
|
||
position: relative;
|
||
color: #b13636;
|
||
font-weight: 700;
|
||
padding-left: 15rpx;
|
||
+ .red-btn-plain {
|
||
margin-left: 10rpx;
|
||
&::before {
|
||
// border-left: 2px solid #f44336;
|
||
content: "";
|
||
position: absolute;
|
||
left: 0;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
width: 2px;
|
||
height: 20rpx;
|
||
background-color: #b13636;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</style> |