index.vue 22 KB

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