index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  1. <template>
  2. <view class="page-container" v-if="detail">
  3. <!-- 自定义导航栏 -->
  4. <!-- <up-navbar height="60px" class="nav-bar" @rightClick="rightClick">
  5. <template #left>
  6. <uni-icons @click="goBack" type="left" size="26"></uni-icons>
  7. <view class="user-box" @click="toUserPage">
  8. <up-avatar
  9. class="user-avatar"
  10. :src="detail.usePicture || ''"
  11. shape="circle"
  12. ></up-avatar>
  13. <text class="username">{{ detail.userName }}</text>
  14. </view>
  15. </template>
  16. <template #center> </template>
  17. <template #right>
  18. <FollowBtn
  19. :followed="detail.followMark"
  20. :followedId="detail.userId"
  21. @update:followed="(val) => (detail.followMark = val)"
  22. />
  23. <view @click="handleActions" class="actions" v-if="isOwner">
  24. <uni-icons size="24" type="more-filled"></uni-icons>
  25. </view>
  26. </template>
  27. </up-navbar> -->
  28. <!-- 内容区域 -->
  29. <view class="content-box">
  30. <view class="content-container">
  31. <!-- 主体内容 -->
  32. <view class="post-content">
  33. <view class="post-image">
  34. <view class="image-list-box">
  35. <image :src="detail.coverImage" mode="" class="coverImage"></image>
  36. <!-- <up-swiper
  37. indicatorMode="dot"
  38. bgColor="#fff"
  39. imgMode="widthFix"
  40. :autoplay="false"
  41. @click="clickSwiper"
  42. height="540"
  43. :list="[detail.coverImage]"
  44. ></up-swiper> -->
  45. </view>
  46. <!-- <view v-else class="image-box">
  47. <image :src="detail.imageUrlList[0]" mode="widthFix" />
  48. </view> -->
  49. </view>
  50. <view class="post-box">
  51. <view class="post-title">
  52. <text>{{ detail.title }}</text>
  53. </view>
  54. <view class="post-text">
  55. <text>{{ detail.content }}</text>
  56. </view>
  57. <view class="post-info">
  58. <text class="post-time">{{ detail.publishTime }}</text>
  59. <!-- <text class="post-views">共{{ detail.commentCount }}条评论</text> -->
  60. </view>
  61. </view>
  62. </view>
  63. <view class="fixed-view"></view>
  64. <!-- 评论区 -->
  65. <view class="comment-section" ref="commentSection">
  66. <view class="comment-title">
  67. <text>全部评论 ({{ detail.commentCount }})</text>
  68. </view>
  69. <!-- 评论列表 -->
  70. <Comment :commentType="commentType" ref="commentRef" @clickComment="clickComment"
  71. @moveMessageTop="clickMessageIcon" @inputDone="inputDone" />
  72. </view>
  73. </view>
  74. </view>
  75. <!-- 这里是底部input聚焦弹窗键盘时,真实输入框 -->
  76. <view :class="['keybord-input-box', keybordHeight > 0 ? 'keybord-fixed' : '']">
  77. <up-overlay :show="keybordOverlay" @click="keybordHeight = 0">
  78. <view class="overlay-input-box" :style="
  79. keybordHeight > 0 ? '--tabbar-bottom:' + keybordHeight + 'px' : ''
  80. ">
  81. <view class="comment-input-container">
  82. <input :focus="keybordFocus" border="none" :adjustPosition="false" class="comment-input"
  83. type="text" confirm-type="send" :auto-blur="true" :confirm-hold="confirmHold"
  84. v-model="commentText" :placeholder="commentInputPl" @focus="commentInputFocus"
  85. @blur="commentInputBlur" @confirm="handleInputConfirm" />
  86. </view>
  87. <view class="right-box" @click="handleInputConfirm">
  88. <button type="default">发送</button>
  89. </view>
  90. </view>
  91. </up-overlay>
  92. </view>
  93. <!-- 底部互动栏 -->
  94. <up-tabbar class="u-bottom-tabbar">
  95. <view class="toAPP">
  96. <wx-open-launch-app id="launch-btn" appid="wx5f33a4ace799b661"
  97. :extinfo="'/pages/goods_details/index?articleId=' + articleId" @error="goShuiBei">
  98. <component :is="'script'" v-bind="{type:'text/wxtag-template'}">
  99. <button class="storeAPP" style="background-color: #e9c279;
  100. color: #fff;
  101. border-radius: 50rpx;
  102. line-height:100rpx;
  103. padding: 20rpx 20rpx;
  104. z-index: 999;box-sizing: border-box;">
  105. 打开水贝商城
  106. </button>
  107. </component>
  108. </wx-open-launch-app>
  109. </view>
  110. <view class="bottom-bar">
  111. <view @click.stop="clickFooterInput" class="comment-input-container">
  112. <input border="none" :adjustPosition="false" class="comment-input" type="text" :readonly="true"
  113. :disabled="true" confirm-type="发送" :auto-blur="true" placeholder="说点什么..." />
  114. </view>
  115. <view class="right-box">
  116. <view class="item" @click="handleLike">
  117. <uni-icons type="heart" size="24"></uni-icons>
  118. <text>{{ detail.likeCount }}</text>
  119. </view>
  120. <view class="item" @click="handleCollection">
  121. <uni-icons type="star" size="24"></uni-icons>
  122. <text>{{ detail.collectCount }}</text>
  123. </view>
  124. <view class="item" @click="clickMessageIcon">
  125. <uni-icons type="chat" size="24"></uni-icons>
  126. <text>{{ detail.commentCount }}</text>
  127. </view>
  128. </view>
  129. </view>
  130. </up-tabbar>
  131. <!-- 右上角操作popup -->
  132. <up-popup :show="showActionPopup" @close="showActionPopup = false">
  133. <view class="popup-box">
  134. <view class="close-box" @click="showActionPopup = false">
  135. <uni-icons type="closeempty" size="28"></uni-icons>
  136. </view>
  137. <view class="header">
  138. <view class="title">更多操作</view>
  139. </view>
  140. <view class="actions-menu">
  141. <view @click="handleDelete" class="item-action">
  142. <view class="icon-box">
  143. <uni-icons type="trash" size="28"></uni-icons>
  144. </view>
  145. <view class="icon-name">删除</view>
  146. </view>
  147. </view>
  148. </view>
  149. </up-popup>
  150. </view>
  151. </template>
  152. <script setup>
  153. import {
  154. ref,
  155. watch,
  156. getCurrentInstance,
  157. nextTick,
  158. computed
  159. } from "vue";
  160. import {
  161. onLoad,
  162. onReady,
  163. onHide,
  164. onShow
  165. } from "@dcloudio/uni-app";
  166. import {
  167. useToast
  168. } from "@/hooks/useToast";
  169. import {
  170. getArticleDetailId,
  171. getGoodDetailId,
  172. getWechatConfig
  173. } from "@/api/index.js"
  174. import {
  175. browser,
  176. openApp
  177. } from "@/utils/ifApp.js"
  178. import Comment from "@/components/comment/index";
  179. import FollowBtn from "@/components/followBtn/index";
  180. import wx from 'weixin-js-sdk'
  181. const {
  182. Toast
  183. } = useToast();
  184. const goShuiBei = () => {
  185. let url = `shuibei://`
  186. let errUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=uni.app.UNI9DE338F"
  187. window.location.href = url;
  188. setTimeout(() => {
  189. window.location.href = errUrl;
  190. }, 3000);
  191. // window.location.href = ;
  192. // setTimeout(() => {
  193. // window.location.href = "https://a.app.qq.com/o/simple.jsp?pkgname=uni.app.UNI9DE338F";
  194. // }, 3000);
  195. // if (browser.versions.android) {
  196. // }else{
  197. // uni.navigateTo({
  198. // url:"/pages/index/index"
  199. // })
  200. // }
  201. }
  202. const initwxlaunch = () => {
  203. getWechatConfig(encodeURIComponent(location.href.split('#')[0])).then(res => {
  204. wx.config({
  205. debug: res.data
  206. .debug, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  207. appId: res.data.appId, // 必填,公众号的唯一标识
  208. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  209. nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  210. signature: res.data.signature, // 必填,签名,// 必填,签名
  211. jsapi_ticket: res.data.jsapi_ticket, // 必填,签名,// 必填,签名
  212. jsApiList: ['wx-open-subscribe',
  213. 'wx-open-launch-app'
  214. ], // 必填,需要使用的JS接口列表,这个地方必须至少写一个,即使你一个都不想用'updateTimelineShareData',
  215. openTagList: ['wx-open-subscribe', 'wx-open-launch-app']
  216. // 可选,需要使用的开放标签列表
  217. });
  218. wx.checkJsApi({
  219. jsApiList: ['wx-open-launch-app'], // 校验跳转APP的标签是否可用
  220. success: function(res) {
  221. console.log('可用')
  222. },
  223. fail: (err) => {
  224. console.log(err, '不可用')
  225. }
  226. })
  227. })
  228. }
  229. initwxlaunch()
  230. const instance = getCurrentInstance();
  231. const articleId = ref("");
  232. const detail = ref(null);
  233. const isOwner = computed(() => {
  234. });
  235. onLoad((options) => {
  236. if (!options.articleId) {
  237. Toast({
  238. title: "该文章不存在",
  239. icon: "none"
  240. });
  241. // uni.navigateTo({ url: "/pages/index/index" });
  242. return;
  243. }
  244. articleId.value = options.articleId || "";
  245. fetchArticleDetail();
  246. });
  247. onReady(() => {
  248. uni.onKeyboardHeightChange && uni.onKeyboardHeightChange(listenerKeybord);
  249. });
  250. onShow(() => {
  251. // 监听关注状态变更事件
  252. uni.$on("followStateChanged", handleFollowStateChanged);
  253. });
  254. onHide(() => {
  255. uni.offKeyboardHeightChange && uni.offKeyboardHeightChange(listenerKeybord);
  256. // 移除关注状态变更监听
  257. uni.$off("followStateChanged", handleFollowStateChanged);
  258. });
  259. // const preivewMap = computed(() => {
  260. // if (detail?.imageUrlList.length > 0) {
  261. // return detail.imageUrlList.map(v => v.)
  262. // }
  263. // return []
  264. // })
  265. const onListenLaunchError = () => {
  266. let errUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=uni.app.UNI9DE338F"
  267. }
  268. function clickSwiper(index) {
  269. console.log("index", index);
  270. uni.previewImage({
  271. current: index,
  272. urls: detail.value?.imageUrlList || [],
  273. });
  274. }
  275. // 监听键盘高度变化
  276. function listenerKeybord(res) {
  277. if (res.height === 0) {
  278. keybordHeight.value = 0;
  279. } else {
  280. uni.getSystemInfo({
  281. success(systemRes) {
  282. const screenHeight = systemRes.screenHeight;
  283. const windowHeight = systemRes.windowHeight;
  284. const disHeight = screenHeight - windowHeight;
  285. keybordHeight.value = res.height - disHeight;
  286. },
  287. });
  288. }
  289. }
  290. async function fetchArticleDetail() {
  291. try {
  292. uni.showLoading({
  293. title: "加载中",
  294. mask: true
  295. });
  296. const {
  297. data
  298. } = await getGoodDetailId(articleId.value);
  299. detail.value = data;
  300. // detail.value.followMark = true
  301. uni.hideLoading();
  302. } catch (error) {
  303. console.error("fetchArticleDetail", error);
  304. uni.hideLoading();
  305. }
  306. }
  307. const commentText = ref("");
  308. function rightClick() {}
  309. const goBack = () => {
  310. const pages = getCurrentPages();
  311. if (pages.length > 1) {
  312. uni.navigateBack();
  313. } else {
  314. uni.switchTab({
  315. url: "/pages/index/index"
  316. });
  317. }
  318. };
  319. const showActionPopup = ref(false);
  320. function handleActions() {
  321. showActionPopup.value = true;
  322. }
  323. function handleDelete() {
  324. showActionPopup.value = false;
  325. uni.showModal({
  326. title: "提示",
  327. content: "确认删除?",
  328. success: async function(res) {
  329. if (res.confirm) {
  330. try {
  331. } catch (error) {
  332. console.error("deleteArticle", error);
  333. }
  334. }
  335. },
  336. });
  337. }
  338. // 跳转用户详情页
  339. function toUserPage() {
  340. uni.navigateTo({
  341. url: `/pages/user/personal?id=${detail.value.userId}`
  342. });
  343. }
  344. // 点击某条评论时触发此事件
  345. const commentType = ref("add"); // 类型 - 新增评论/回复评论
  346. const commentInputPl = ref("说点什么...");
  347. function clickComment(comment) {
  348. const username = comment.userName;
  349. commentType.value = "reply";
  350. commentInputPl.value = `回复 @${username}`;
  351. keybordFocus.value = true;
  352. }
  353. // 确认发布评论 - 点击键盘的发送和输入框右侧的发送按钮
  354. const confirmHold = ref(true);
  355. const commentRef = ref();
  356. function handleInputConfirm(event) {
  357. // 如果发送的内容为空格 阻止键盘收起并提示
  358. if (commentText.value?.trim() === "") {
  359. confirmHold.value = true;
  360. return Toast({
  361. title: "有内容才能发送哦"
  362. });
  363. }
  364. confirmHold.value = false;
  365. commentRef.value.handleAddComment(commentText.value);
  366. }
  367. // 评论发布完成后触发
  368. function inputDone() {
  369. commentText.value = "";
  370. }
  371. /**
  372. * 点击右下角聊天icon需要将评论区域滚动到顶部
  373. * 这里计算滚动的距离
  374. */
  375. const commentSection = ref();
  376. const commentOffsetTop = ref(0);
  377. watch(
  378. () => detail.value,
  379. async (val, oldVal) => {
  380. if (val && !oldVal) {
  381. await nextTick();
  382. const query = uni.createSelectorQuery().in(instance.proxy);
  383. query
  384. .select(".comment-section")
  385. .boundingClientRect((data) => {
  386. if (data.top) {
  387. commentOffsetTop.value =
  388. data.top - 60;
  389. }
  390. })
  391. .exec();
  392. }
  393. }
  394. );
  395. // 点击底部右下角消息事件
  396. function clickMessageIcon() {
  397. uni.pageScrollTo({
  398. scrollTop: commentOffsetTop.value,
  399. // selector: ".fixed-view",
  400. success() {
  401. console.log("success");
  402. },
  403. fail(e) {
  404. console.error(`scrollTo error ${e}`);
  405. },
  406. });
  407. }
  408. // 点击收藏
  409. const collectionLoading = ref(false);
  410. async function handleCollection() {
  411. try {
  412. if (collectionLoading.value) return;
  413. collectionLoading.value = true;
  414. await setUserState({
  415. type: 1,
  416. bookId: detail.value.id
  417. });
  418. detail.value.collectMark = !detail.value.collectMark;
  419. if (detail.value.collectMark) {
  420. detail.value.collectCount += 1;
  421. } else {
  422. detail.value.collectCount -= 1;
  423. }
  424. collectionLoading.value = false;
  425. } catch (error) {
  426. console.error("collection error", error);
  427. collectionLoading.value = false;
  428. }
  429. }
  430. // 点击喜欢
  431. const likeLoading = ref(false);
  432. const likeAnimation = ref(false);
  433. async function handleLike() {
  434. try {
  435. if (likeLoading.value) return;
  436. likeLoading.value = true;
  437. await setUserState({
  438. type: 0,
  439. bookId: detail.value.id
  440. });
  441. detail.value.likeMark = !detail.value.likeMark;
  442. if (detail.value.likeMark) {
  443. likeAnimation.value = true;
  444. detail.value.likeCount += 1;
  445. } else {
  446. likeAnimation.value = false;
  447. detail.value.likeCount -= 1;
  448. }
  449. likeLoading.value = false;
  450. } catch (error) {
  451. likeLoading.value = false;
  452. Toast({
  453. title: "点赞失败"
  454. });
  455. console.error("handleLike", error);
  456. }
  457. }
  458. // ------- 底部input和弹窗评论input相关事件 --------
  459. // 键盘高度
  460. const keybordHeight = ref(0);
  461. // 键盘弹同出时的遮罩状态
  462. const keybordOverlay = ref(true);
  463. // 真实input的聚焦状态
  464. const keybordFocus = ref(false);
  465. // input聚焦事件
  466. function commentInputFocus(event) {
  467. // const height = event.detail.keybordHeight || 1000
  468. // console.log('height',height)
  469. // if (height) {
  470. // keybordHeight.value = height;
  471. // console.log('keybordHeight',keybordHeight.value)
  472. // }
  473. }
  474. // input失焦事件
  475. function commentInputBlur() {
  476. keybordHeight.value = 0;
  477. keybordFocus.value = false;
  478. }
  479. // 点击底部input触发事件
  480. function clickFooterInput() {
  481. console.log("点击了底部Input");
  482. commentInputPl.value = "说点什么...";
  483. commentType.value = "add";
  484. keybordFocus.value = true;
  485. }
  486. // 处理关注状态变更
  487. function handleFollowStateChanged(data) {
  488. if (Number(data.userId) === Number(detail.value?.userId)) {
  489. detail.value.followMark = data.followMark;
  490. }
  491. }
  492. </script>
  493. <style lang="scss" scoped>
  494. @import '@/uni_modules/uview-plus/theme.scss';
  495. .page-container {
  496. display: flex;
  497. flex-direction: column;
  498. height: auto !important;
  499. background-color: #f8f8f8;
  500. .nav-bar {
  501. position: absolute;
  502. .u-navbar--fixed {
  503. // padding-top: 20rpx;
  504. }
  505. .user-box {
  506. display: flex;
  507. align-items: center;
  508. .user-avatar {}
  509. .username {
  510. margin-left: 20rpx;
  511. }
  512. }
  513. }
  514. .content-box {
  515. flex: 1;
  516. overflow: auto;
  517. background-color: #fff;
  518. .content-container {
  519. // height: 100vh;
  520. // padding: 0 30rpx;
  521. // margin-top: 80rpx;
  522. .post-content {
  523. background-color: #fff;
  524. // border-radius: 20rpx;
  525. padding: 0 0 30rpx 0;
  526. // margin-top: 20rpx;
  527. .post-box {
  528. // padding: 0 20rpx;
  529. }
  530. .post-title {
  531. // margin-bottom: 20rpx;
  532. text {
  533. font-size: 18px;
  534. font-weight: bold;
  535. color: #333;
  536. line-height: 1.4;
  537. }
  538. }
  539. .post-image {
  540. // margin: 0rpx 0 20rpx;
  541. // border-radius: 16rpx;
  542. overflow: hidden;
  543. min-height: 65vh;
  544. display: flex;
  545. flex-direction: column;
  546. justify-content: center;
  547. align-items: center;
  548. // background-color: #f5f0ff;
  549. .image-box {
  550. width: 100%;
  551. }
  552. ::v-deep .image-list-box {
  553. width: 100%;
  554. .coverImage {
  555. width: 100%;
  556. min-height: 65vh;
  557. }
  558. .u-swiper__wrapper__item__wrapper {
  559. height: 100%;
  560. display: flex;
  561. flex-direction: column;
  562. justify-content: center;
  563. .u-swiper__wrapper__item__wrapper__image {
  564. width: 100%;
  565. flex: 0 1 auto;
  566. border-radius: 0 !important;
  567. color: #e3e3e3;
  568. // height: 100% !important;
  569. // margin-top: 50%;
  570. // transform: translateY(-50%);
  571. }
  572. }
  573. }
  574. }
  575. .post-text {
  576. margin: 20rpx 0;
  577. line-height: 1.6;
  578. display: block;
  579. margin-bottom: 0.625rem;
  580. display: -webkit-box;
  581. -webkit-box-orient: vertical;
  582. -webkit-line-clamp: 2;
  583. overflow: hidden;
  584. text-overflow: ellipsis;
  585. line-height: 1.5;
  586. max-height: 3em;
  587. text {
  588. font-size: 14px;
  589. color: #333;
  590. line-height: 1.6;
  591. display: block;
  592. margin-bottom: 20rpx;
  593. }
  594. }
  595. .post-info {
  596. display: flex;
  597. justify-content: space-between;
  598. margin-top: 20rpx;
  599. .post-time,
  600. .post-views {
  601. font-size: 12px;
  602. color: #999;
  603. }
  604. }
  605. }
  606. .comment-section {
  607. // margin-top: 20rpx;
  608. background-color: #fff;
  609. border-radius: 20rpx;
  610. padding: 30rpx;
  611. // margin-bottom: 10rpx;
  612. .comment-title {
  613. margin-bottom: 30rpx;
  614. text {
  615. font-size: 16px;
  616. font-weight: bold;
  617. color: #333;
  618. }
  619. }
  620. .comment-list {
  621. .comment-item {
  622. padding: 20rpx 0;
  623. border-bottom: 1px solid #f5f5f5;
  624. .comment-user {
  625. display: flex;
  626. align-items: center;
  627. margin-bottom: 16rpx;
  628. .comment-avatar {
  629. width: 60rpx;
  630. height: 60rpx;
  631. border-radius: 30rpx;
  632. margin-right: 16rpx;
  633. }
  634. .comment-user-info {
  635. display: flex;
  636. flex-direction: column;
  637. .comment-username {
  638. font-size: 14px;
  639. color: #333;
  640. font-weight: 500;
  641. }
  642. .comment-time {
  643. font-size: 12px;
  644. color: #999;
  645. margin-top: 4rpx;
  646. }
  647. }
  648. }
  649. .comment-content {
  650. margin: 10rpx 0;
  651. text {
  652. font-size: 14px;
  653. color: #333;
  654. line-height: 1.5;
  655. }
  656. .at-user {
  657. color: #ff2442;
  658. font-weight: 500;
  659. }
  660. }
  661. .comment-actions {
  662. display: flex;
  663. margin-top: 16rpx;
  664. .like-btn,
  665. .reply-btn {
  666. display: flex;
  667. align-items: center;
  668. margin-right: 30rpx;
  669. text {
  670. font-size: 12px;
  671. color: #999;
  672. margin-left: 8rpx;
  673. }
  674. }
  675. }
  676. .nested-replies {
  677. margin-left: 76rpx;
  678. margin-top: 20rpx;
  679. background-color: #f8f8f8;
  680. border-radius: 16rpx;
  681. padding: 20rpx;
  682. .nested-reply-item {
  683. margin-bottom: 20rpx;
  684. &:last-child {
  685. margin-bottom: 0;
  686. }
  687. }
  688. }
  689. }
  690. }
  691. }
  692. }
  693. }
  694. .bottom-bar {
  695. width: 100%;
  696. background-color: #fff;
  697. padding: 20rpx 25rpx 20rpx;
  698. box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  699. display: flex;
  700. align-items: center;
  701. justify-content: space-around;
  702. .interaction-btns {
  703. display: flex;
  704. justify-content: space-around;
  705. padding-bottom: 20rpx;
  706. .like-btn,
  707. .comment-btn,
  708. .share-btn {
  709. display: flex;
  710. flex-direction: column;
  711. align-items: center;
  712. text {
  713. font-size: 12px;
  714. color: #999;
  715. margin-top: 8rpx;
  716. }
  717. }
  718. }
  719. .right-box {
  720. display: flex;
  721. flex: 1;
  722. align-items: center;
  723. justify-content: space-between;
  724. .item {
  725. display: flex;
  726. align-items: center;
  727. justify-content: center;
  728. margin-right: 40rpx;
  729. text-align: center;
  730. &:last-child {
  731. margin-right: 0;
  732. }
  733. text {
  734. margin-left: 6rpx;
  735. white-space: nowrap;
  736. }
  737. }
  738. }
  739. }
  740. .keybord-input-box {
  741. position: fixed;
  742. z-index: -1;
  743. &.keybord-fixed {
  744. z-index: 99999;
  745. .overlay-input-box {
  746. // position: absolute;
  747. bottom: var(--tabbar-bottom, 350px) !important;
  748. // bottom: 500px;
  749. }
  750. }
  751. .overlay-input-box {
  752. position: fixed;
  753. left: 0;
  754. right: 0;
  755. bottom: 0;
  756. width: 100%;
  757. padding: 20rpx 20rpx;
  758. background-color: #fff;
  759. align-items: center;
  760. display: flex;
  761. transition: bottom 0.15s;
  762. z-index: 99;
  763. }
  764. .comment-input-container {
  765. margin: 0 20rpx 0 0;
  766. flex: 1;
  767. input {
  768. min-height: 0;
  769. height: 32rpx;
  770. }
  771. }
  772. .right-box {
  773. button {
  774. border-radius: 30rpx;
  775. padding: 10rpx 20rpx;
  776. background-color: #ff2442;
  777. color: #fff;
  778. font-size: 25rpx;
  779. }
  780. }
  781. }
  782. .comment-input-container {
  783. // width: 40%;
  784. display: flex;
  785. align-items: center;
  786. background-color: #f5f5f5;
  787. border-radius: 40rpx;
  788. padding: 16rpx 30rpx;
  789. margin: 0 30rpx 0 0;
  790. .comment-input {
  791. flex: 1;
  792. font-size: 14px;
  793. pointer-events: none;
  794. }
  795. }
  796. }
  797. .popup-box {
  798. position: relative;
  799. background-color: #f5f5f5;
  800. .close-box {
  801. position: absolute;
  802. right: 10rpx;
  803. top: 10rpx;
  804. }
  805. .header {
  806. text-align: center;
  807. padding: 15rpx 0;
  808. }
  809. .actions-menu {
  810. padding: 15rpx 30rpx;
  811. display: flex;
  812. justify-content: flex-start;
  813. align-items: center;
  814. .item-action {
  815. display: flex;
  816. flex-direction: column;
  817. justify-self: center;
  818. align-items: center;
  819. .icon-box {
  820. width: 100rpx;
  821. height: 100rpx;
  822. border-radius: 50rpx;
  823. background-color: #fff;
  824. display: flex;
  825. justify-content: center;
  826. align-items: center;
  827. margin-bottom: 10rpx;
  828. }
  829. .icon-name {
  830. font-size: 24rpx;
  831. color: #484848;
  832. }
  833. }
  834. }
  835. }
  836. ::v-deep .u-bottom-tabbar {
  837. flex: 0;
  838. .toAPP {
  839. min-width: 30%;
  840. position: absolute;
  841. top: -100rpx;
  842. .storeAPP {
  843. background-color: #e9c279;
  844. color: #fff;
  845. border-radius: 50rpx;
  846. line-height: 50rpx;
  847. padding: 20rpx 20rpx;
  848. z-index: 999;
  849. .logoimg {
  850. display: inline-block;
  851. width: 50rpx;
  852. height: 50rpx;
  853. border-radius: 5rpx;
  854. vertical-align: middle;
  855. }
  856. }
  857. }
  858. .u-tabbar--fixed {
  859. z-index: 99 !important;
  860. }
  861. .u-tabbar__content__item-wrapper {
  862. height: 60px;
  863. }
  864. }
  865. ::v-deep .u-modal__button-group__wrapper--confirm .u-modal__button-group__wrapper__text {
  866. color: $note-red !important;
  867. }
  868. .post-box {
  869. padding: 40rpx;
  870. }
  871. </style>