question.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <template>
  2. <view class="question-wrap">
  3. <template v-if="hasAuth">
  4. <view class="question-top" :class="{'noAuth':!(isUserResearcher||userInfo.status&&userAuth)}">
  5. <view @click="showPopup" v-if="isUserResearcher||userInfo.status&&userAuth"
  6. style="display:flex;align-items: center;margin-left:30rpx;">
  7. <image src="../../static/question/select.png" mode="widthFix" class="menu-icon"/>
  8. <text style="color:#E3B377;font-size:28rpx;">筛选</text>
  9. </view>
  10. <van-popup :show="isPopupShow" position="left" :close-on-click-overlay="true"
  11. @close="isPopupShow = false"
  12. custom-style="height: 100%;width:50%;"
  13. @touchmove.stop.prevent>
  14. <view class="pop-wrap">
  15. <view class="pop-option-list">
  16. <van-collapse :value="activeName" @change="changeSelecOption" accordion :border="false">
  17. <van-collapse-item :border="false" :title="item.research_group_name" :name="index" v-for="(item, index) in optionList"
  18. :key="index">
  19. <view class="option-btn-wrap">
  20. <view class="option-btn"
  21. v-for=" i in item.children" :key="i.research_group_id"
  22. @click="handleOptionClick(i)"
  23. :class="{'active':selectName===i.research_group_name,'full':i.research_group_name.length>4}"
  24. >
  25. {{ i.research_group_name }}
  26. </view>
  27. </view>
  28. </van-collapse-item>
  29. </van-collapse>
  30. </view>
  31. </view>
  32. </van-popup>
  33. </view>
  34. <view class="report-empty-box" v-if="questionList.length==0">
  35. <image :src="globalImgUrls.activityNoAuth" mode="widthFix" style="width:100%;"/>
  36. <view>暂无提问<text v-if="userInfo.is_inner!==1">,快试试提问功能吧</text></view>
  37. </view>
  38. <view class="question-list" :class="showAudioPop?showAudioBigPop?'list-bot3':'list-bot2':'list-bot1'">
  39. <view class="question-item" v-for="item in questionList" :key="item.community_question_id">
  40. <text class="item-time">提问时间:{{ item.create_time }}</text>
  41. <view class="question-info">
  42. <view style="flex:1;" class="question-title">
  43. <text class="item-label">{{item.variety_tag_name}}</text>
  44. <!-- <text class="item-title"> -->{{ item.question_content }}<!-- </text> -->
  45. </view>
  46. <view class="item-answer">
  47. <!-- 改为背景音频播放 -->
  48. <view class="answer" @click.stop="handlePlayAudioByBg(item)">
  49. <image class="music-img" :src="item.community_question_id==curVoiceId&&!curAudioPaused?playImgSrc:pauseImgSrc" mode="widthFix"/>
  50. <text>{{ moment(item.answer.audioTime).format('mm:ss') }}</text>
  51. </view>
  52. <!-- <view class="answer" @click.stop="handleAudio(item)">
  53. <template v-if="!item.loading">
  54. <image class="music-img" :src="item.answer.isplay?playImgSrc:pauseImgSrc" mode="widthFix"/>
  55. <template v-if="item.answer.isplay || item.answer.ispause">
  56. <text>{{
  57. item.answer.audioTime - currentAudioMsg.audioCurrentTime>0?
  58. moment(item.answer.audioTime - currentAudioMsg.audioCurrentTime).format('mm:ss')
  59. :'00:00'}}
  60. </text>
  61. </template>
  62. <template v-else>
  63. <text>{{ moment(item.answer.audioTime).format('mm:ss') }}</text>
  64. </template>
  65. </template>
  66. <template v-else>
  67. <image class="load-img" src="../../static/loading.png" mode="aspectFill" />
  68. <text>{{ moment(item.answer.audioTime).format('mm:ss') }}</text>
  69. </template>
  70. </view> -->
  71. </view>
  72. </view>
  73. <!-- 评论区域 -->
  74. <questionComment :item="item" @show_comment="showCommentHandle"/>
  75. </view>
  76. </view>
  77. <template v-if="isUserResearcher">
  78. <view class="btn-wrap" :class="showAudioPop?showAudioBigPop?'btn-bot3':'btn-bot2':'btn-bot1'">
  79. <view class="btn topage-button" @click="toPage('question')" v-if="userInfo.status&&userAuth">
  80. <image
  81. src="../../static/question/askquestion.png"
  82. mode="scaleToFill"
  83. style="width:34rpx;height:34rpx;"
  84. />
  85. <text>我要提问</text>
  86. </view>
  87. <view class="btn topage-button" @click="toPage('ask')" v-if="userInfo.status&&userAuth">
  88. <view>待回答<text v-if="isUserResearcher" style="margin-left:5rpx;">{{'('+distributeNum+')'}}</text></view>
  89. </view>
  90. </view>
  91. </template>
  92. <template v-else>
  93. <view class="topage-btn topage-button" :class="showAudioPop?showAudioBigPop?'btn-bot3':'btn-bot2':'btn-bot1'" @click="toPage('question')" v-if="userInfo.status&&userAuth">
  94. <image
  95. src="../../static/question/askquestion.png"
  96. mode="scaleToFill"
  97. style="width:34rpx;height:34rpx;"
  98. />
  99. <text>我要提问</text>
  100. </view>
  101. </template>
  102. <!-- <view class="topage-btn" @click="toPage" v-if="isUserResearcher||userInfo.status&&userAuth">
  103. <image
  104. v-if="!isUserResearcher"
  105. src="../../static/question/askquestion.png"
  106. mode="scaleToFill"
  107. style="width:34rpx;height:34rpx;"
  108. />
  109. {{ isUserResearcher ? '待回答' : '我要提问' }} <text v-if="isUserResearcher" style="margin-left:5rpx;">{{'('+distributeNum+')'}}</text>
  110. </view> -->
  111. </template>
  112. <!-- 没有权限 -->
  113. <template v-else>
  114. <view class="noAuth-wrap">
  115. <image class="img" :src="globalImgUrls.activityNoAuth" mode="widthFix"></image>
  116. <view class="auth-text">您暂无权限查看问答社区</view>
  117. <view class="auth-text" v-if="noAuthInfo.type==='contact'">若想查看可以联系对口销售</view>
  118. <view class="auth-text" v-else>若想查看可以申请开通</view>
  119. <view class="auth-text" v-if="noAuthInfo.type==='contact'">
  120. {{noAuthInfo.name||''}}:<text @click="handleCallPhone(noAuthInfo.mobile+'')">{{noAuthInfo.mobile||''}}</text>
  121. </view>
  122. <view class="apply" @click="handleGoApply" v-else>立即申请</view>
  123. </view>
  124. </template>
  125. <!-- 弹窗 -->
  126. <van-popup :show="pupData.show" round @close="pupData.show = false" closeable :close-on-click-overlay="false">
  127. <view class="global-pup">
  128. <view class="content">
  129. <rich-text style="flex:none;margin-bottom:20rpx;" :nodes="pupData.content"></rich-text>
  130. <view class="contact" v-if="pupData.type == 'contact'">
  131. {{pupData.saleName||''}}:<text @click="handleCallPhone(pupData.mobile)">{{pupData.mobile||''}}</text>
  132. </view>
  133. <view class="apply" v-else-if="pupData.type == 'apply'">
  134. <view @click="handleApply">立即申请</view>
  135. </view>
  136. </view>
  137. </view>
  138. </van-popup>
  139. <!-- 音频悬浮 -->
  140. <view v-if="showPage">
  141. <audioBox v-if="showAudioPop"/>
  142. </view>
  143. <!-- 评论弹窗 -->
  144. <van-action-sheet
  145. :show="isShowComment"
  146. title="问答评论"
  147. @close="closeCommentHandle"
  148. @clickOverlay="isShowComment=false"
  149. >
  150. <view class="comment-cont" @touchmove.stop>
  151. <view class="commment-top">
  152. <text class="title">{{comment_obj.title}} {{comment_obj.total}}</text>
  153. <view class="comment-top-right">
  154. <text :class="select_comment_type === 1 && 'act'" @click="changeCommentTypeHandle(1)">全部</text>
  155. <text :class="select_comment_type === 2 && 'act'" @click="changeCommentTypeHandle(2)">我的</text>
  156. </view>
  157. </view>
  158. <scroll-view class="comment-list-cont" v-if="comment_obj.total" scroll-y>
  159. <view class="comment-list-item" v-for="(item,index) in commentList" :key="item.community_question_comment_id">
  160. <view class="flex comment">
  161. <image class="avatar" :src="item.qa_avatar_url" mode="aspectFill" lazy-load="true"/>
  162. <view style="display:flex;align-items:center">{{item.content}}</view>
  163. <!-- <text style="color: #333;">{{item.user_name}}:</text>
  164. {{item.content}} -->
  165. </view>
  166. <view class="del" v-if="select_comment_type === 2" @click="delCommentHandle(item,index)">删除该评论</view>
  167. </view>
  168. </scroll-view>
  169. <view class="nodata" v-else>
  170. <image src="@/static/nodata.png"></image>
  171. <view>暂无评论</view>
  172. </view>
  173. <view class="write-wrap" :style="{bottom: writeBottom+'px'}">
  174. <textarea
  175. v-model="comment_cont"
  176. placeholder="发布一条友善的评论"
  177. auto-height
  178. :adjust-position="false"
  179. :show-confirm-bar="false"
  180. :cursor-spacing="20"
  181. class="write-ipt"
  182. @blur="setWritePosition(50)"
  183. @focus="checkNickHandle"
  184. />
  185. <view class="confirm-btn" @click="publishMessageHandle">发布</view>
  186. </view>
  187. </view>
  188. </van-action-sheet>
  189. </view>
  190. </template>
  191. <script>
  192. import mixin from "../../mixin/questionMixin";
  193. import {apiGetTagTree} from '@/api/common'
  194. import {
  195. apiOptionGroupList,
  196. apiBarTotal,
  197. apiHotComment,
  198. apiMyComment,
  199. apiCheckNick,
  200. apiCanelNickTip,
  201. apiDelComment,
  202. apiPublishComment,
  203. apiCountAudioClick
  204. } from '@/api/question'
  205. import questionComment from '@/components/questionComment/questionComment.vue'
  206. import audioBox from '@/components/audioBox/audioBox.vue'
  207. import { debounce } from '@/utils/common.js';
  208. export default {
  209. mixins: [mixin],
  210. components:{
  211. audioBox,
  212. questionComment
  213. },
  214. data() {
  215. return {
  216. questionList: [],
  217. isPopupShow: false,//弹出层是否展示
  218. optionList: [],
  219. activeNames: [],//collapse
  220. activeName:'',
  221. selectName:'',
  222. pauseImgSrc:'../../static/question/recordplay.png',
  223. playImgSrc:'../../static/question/recordpause.png',
  224. distributeNum:0,
  225. /* userInfo:{
  226. is_inner:1,//0:外部客户;1内部员工
  227. status:'试用',
  228. is_suspend:0,
  229. is_researcher:0,
  230. //seal_name:'梁娜',
  231. //seal_mobile:123456,
  232. },//mock用户信息 */
  233. showPage:false,
  234. waitNum:0,
  235. isShowComment: false,
  236. comment_cont: '',
  237. writeBottom: 50,
  238. select_comment_type:1,//默认全部
  239. select_question_item: {},
  240. comment_obj: {
  241. title: '全部评论',
  242. total: 0
  243. },
  244. comment_total: 0,
  245. commentList: []
  246. }
  247. },
  248. watch:{
  249. selectName(){
  250. this.getQuestionList(3)
  251. }
  252. },
  253. computed:{
  254. showAudioPop(){//是否显示音频弹窗
  255. return this.$store.state.audio.show
  256. },
  257. showAudioBigPop(){
  258. return this.$store.state.audio.showBig
  259. },
  260. curVoiceId(){//当前正在播放的音频id
  261. return this.$store.state.audio.questionId
  262. },
  263. curAudioPaused(){//当前音频是否暂停状态
  264. return this.$store.state.audio.paused
  265. },
  266. },
  267. onLoad() {
  268. /* this.getVistor()
  269. this.getOptionList()
  270. this.getQuestionList(3) */
  271. },
  272. onShow() {
  273. this.getdistributeNum()
  274. this.getOptionList()
  275. this.getQuestionList(3)
  276. this.showPage=true
  277. },
  278. onHide(){
  279. this.showPage=false
  280. },
  281. onReachBottom() {
  282. if(this.finished) return
  283. this.page++
  284. this.getQuestionList(3)
  285. },
  286. onPullDownRefresh() {
  287. this.resetAudio()
  288. this.refreshPage()
  289. setTimeout(() => {
  290. uni.stopPullDownRefresh()
  291. }, 1500);
  292. },
  293. //转发分享
  294. onShareAppMessage(){
  295. return{
  296. title:'问答社区',
  297. path:'/pages/question/question'
  298. }
  299. },
  300. methods: {
  301. //获取研究员问答列表数量统计
  302. getdistributeNum() {
  303. if(this.userInfo.is_inner!==1) return
  304. //如果是研究员,则请求问答列表数量统计
  305. apiBarTotal().then(res=>{
  306. if(res.code===200){
  307. this.distributeNum = res.data.distribute
  308. }
  309. })
  310. },
  311. //获取筛选列表
  312. async getOptionList(){
  313. /* const res = await apiOptionGroupList()
  314. if(res.code===200){
  315. this.optionList = res.data
  316. } */
  317. const res = await apiGetTagTree()
  318. if(res.code===200){
  319. const result = res.data
  320. this.optionList = result.map((item)=>{
  321. let obj = {}
  322. obj.research_group_name = item.classify_name
  323. obj.children = item.tags.map((i)=>{
  324. return {research_group_id:i.tag_id,research_group_name:i.tag_name}
  325. })
  326. return obj
  327. })
  328. }
  329. },
  330. //点击筛选
  331. showPopup() {
  332. this.isPopupShow = true
  333. },
  334. //点击一级分类
  335. changeSelecOption(e) {
  336. this.activeName = e.detail
  337. },
  338. //点击二级分类
  339. handleOptionClick(item){
  340. //重复点击代表取消
  341. if(this.selectId===item.research_group_id){
  342. this.selectId=-1
  343. this.selectName=''
  344. }else{
  345. this.selectId = item.research_group_id
  346. this.selectName = item.research_group_name
  347. }
  348. this.page = 1
  349. this.isPopupShow = false
  350. },
  351. //点击'我要提问' or '待回答'
  352. toPage(type) {
  353. if(type==='question'){
  354. uni.navigateTo({ url: '/pages-question/hasQuestion' })
  355. }else{
  356. uni.navigateTo({ url: '/pages-question/answerList' })
  357. }
  358. },
  359. refreshPage() {
  360. this.page = 1
  361. this.selectId = -1
  362. this.questionList = []
  363. this.finished = false
  364. this.getQuestionList(3)
  365. },
  366. //跳转详情
  367. handleGoDetail(item){
  368. uni.navigateTo({ url: `/pages-question/answerDetail?id=${item.community_question_id}` })
  369. },
  370. /* 打开评论弹窗 */
  371. showCommentHandle(item) {
  372. this.select_question_item = item;
  373. this.getComment();
  374. this.isShowComment = true;
  375. },
  376. /* 关闭评论弹窗 */
  377. closeCommentHandle() {
  378. this.isShowComment = false;
  379. this.select_question_item = {};
  380. this.comment_cont = '';
  381. this.select_comment_type = 1;//默认全部
  382. },
  383. /* 切换评论类型*/
  384. changeCommentTypeHandle(type) {
  385. if(type === this.select_comment_type) return
  386. this.commentList = [];
  387. this.select_comment_type = type;
  388. this.getComment();
  389. },
  390. /* 获取评论 */
  391. async getComment() {
  392. const params = {
  393. community_question_id: this.select_question_item.community_question_id,
  394. curr_page: 1,
  395. page_size: 10000
  396. }
  397. const { code,data } = this.select_comment_type===1 ? await apiHotComment(params) : await apiMyComment(params);
  398. if(code !== 200) return
  399. this.commentList = data.list || [];
  400. this.comment_obj = {
  401. title: this.select_comment_type === 1 ? '全部评论' : '我的评论',
  402. total: data.paging.totals
  403. }
  404. },
  405. /* 删除留言*/
  406. delCommentHandle({community_question_comment_id},index) {
  407. wx.showModal({
  408. title: "",
  409. content: "评论删除后不可恢复,确认删除吗?",
  410. confirmColor: "#EE3636",
  411. cancelColor: '#333',
  412. success: async(res) => {
  413. if( res.cancel) return
  414. const { code } = await apiDelComment({ community_question_comment_id });
  415. if( code !== 200 ) return
  416. this.commentList.splice(index,1)
  417. this.comment_obj.total--
  418. wx.showToast({title: '删除成功'});
  419. this.refreshPage()
  420. }
  421. })
  422. },
  423. setWritePosition(val=50) {
  424. console.log(val)
  425. this.writeBottom = val < 50 ? 50 : val;
  426. },
  427. /* 校验昵称状态*/
  428. /**
  429. * 此方法不在调用(但是还是留着吧 万一哪天又要用呢)
  430. * 改版不用再校验是否设置过昵称,老板说要和报告不一样并且要好玩,所以改成随机生成的头像昵称(当然是后端去生成)
  431. */
  432. async checkNickHandle(e) {
  433. this.setWritePosition(e.detail.height);
  434. // const { data,code } = await apiCheckNick();
  435. // if(code !== 200) return
  436. // !data && wx.showModal({
  437. // title: '',
  438. // content: '检测到您还未设置头像和昵称,您的留言将发布为匿名,是否立即去设置?',
  439. // confirmText: '去设置',
  440. // confirmColor: '#E3B377',
  441. // cancelText : '暂时不用',
  442. // cancelColor: '#666',
  443. // success: (res)=> {
  444. // res.confirm && wx.navigateTo({ url:'/pages-user/mysetting' });
  445. // res.cancel && this.setCancelNickHandle();
  446. // }
  447. // })
  448. },
  449. /* 不在提醒弹窗 */
  450. async setCancelNickHandle() {
  451. await apiCanelNickTip()
  452. },
  453. /* 发布留言*/
  454. publishMessageHandle: debounce( async function() {
  455. if(!this.comment_cont) return wx.showToast({title: '请输入留言内容',icon: 'none'});
  456. const { code } = await apiPublishComment({
  457. content: this.comment_cont,
  458. community_question_id: this.select_question_item.community_question_id
  459. })
  460. if(code !== 200) return
  461. wx.showToast({title: '发布成功'});
  462. this.comment_cont = '';
  463. // this.select_comment_type === 2 && this.getComment();
  464. this.getComment()
  465. this.refreshPage()//刷新列表
  466. }),
  467. }
  468. }
  469. </script>
  470. <style lang="scss">
  471. .question-wrap {
  472. .van-popup--bottom{
  473. padding-bottom: 0 !important;
  474. }
  475. /deep/ .van-cell__title,
  476. .van-cell__value {
  477. flex: none !important;
  478. }
  479. .van-collapse-item{
  480. &.van-hairline--top{
  481. &::after{
  482. border: none !important;
  483. }
  484. }
  485. .van-cell{
  486. padding-left:0 !important;
  487. }
  488. }
  489. .van-collapse-item__content{
  490. padding:0;
  491. }
  492. }
  493. page {
  494. padding-bottom: env(safe-area-inset-bottom);
  495. }
  496. </style>
  497. <style lang="scss" scoped>
  498. .question-wrap {
  499. padding: 0 30rpx 80rpx 30rpx;
  500. background-color: #FFFFFF;
  501. .question-top {
  502. display: flex;
  503. flex: auto;
  504. align-items: center;
  505. height: 100rpx;
  506. background-color: white;
  507. position: sticky;
  508. top: 0;
  509. left: 0;
  510. margin:0 -30rpx;
  511. z-index: 99;
  512. &.noAuth{
  513. height:20rpx;
  514. }
  515. /* border-top: 1rpx solid rgba(0, 0, 0, 0.1); */
  516. .text{
  517. width:240rpx;
  518. height:70rpx;
  519. line-height: 70rpx;
  520. background-color: #F5F5F5;
  521. border-radius: 4rpx;
  522. color:#666666;
  523. text-align: center;
  524. &.active{
  525. color:#E3B377;
  526. background-color: #FDF8F2;
  527. }
  528. }
  529. .auth-box {
  530. flex: 1;
  531. }
  532. .menu-icon {
  533. width: 34rpx;
  534. height:34rpx;
  535. }
  536. .pop-wrap{
  537. height: 100%;
  538. padding: 50rpx 34rpx;
  539. .pop-option-list {
  540. .option-btn-wrap {
  541. display: flex;
  542. justify-content: space-between;
  543. flex-wrap: wrap;
  544. margin-bottom: 20rpx;
  545. .option-btn {
  546. min-width: 145rpx;
  547. height:76rpx;
  548. line-height: 76rpx;
  549. text-align: center;
  550. color: black;
  551. background-color: #F6F6F6;
  552. border-radius: 4rpx;
  553. margin-top: 10rpx;
  554. &.active{
  555. background-color: #FAEEDE;
  556. }
  557. &.full{
  558. width:100%;
  559. }
  560. }
  561. }
  562. }
  563. .pop-btn{
  564. height:80rpx;
  565. margin:0 -34rpx;
  566. text-align: center;
  567. line-height: 80rpx;
  568. color:#FFFFFF;
  569. background-color: #E6B77D;
  570. }
  571. }
  572. }
  573. .question-list {
  574. padding-bottom: 34rpx;
  575. &.last{
  576. padding-bottom: 260rpx;
  577. }
  578. }
  579. .list-bot1{
  580. padding-bottom: 200rpx;
  581. }
  582. .list-bot2{
  583. padding-bottom: 340rpx;
  584. }
  585. .list-bot3{
  586. padding-bottom: 440rpx;
  587. }
  588. .topage-btn {
  589. position: fixed;
  590. left:50%;
  591. margin-left: -257rpx;
  592. bottom: 215rpx;
  593. width:514rpx;
  594. }
  595. .topage-button{
  596. height: 80rpx;
  597. text-align: center;
  598. line-height: 80rpx;
  599. border-radius: 40rpx;
  600. background-color: #333333;
  601. box-shadow: 0px 4px 20px 1px rgba(160, 126, 84, 0.25);
  602. color: #E3B377;
  603. display: flex;
  604. justify-content: center;
  605. align-items: center;
  606. image{
  607. margin-right: 10rpx;
  608. margin-top: -2rpx;
  609. }
  610. }
  611. .btn-wrap{
  612. position: fixed;
  613. width:100%;
  614. margin-left: -30rpx;
  615. display: flex;
  616. justify-content: center;
  617. bottom: calc(120rpx + constant(safe-area-inset-bottom));
  618. bottom: calc(120rpx + env(safe-area-inset-bottom));
  619. .btn{
  620. width:300rpx;
  621. height:80rpx;
  622. &:first-child{
  623. margin-right: 30rpx;
  624. }
  625. }
  626. }
  627. .btn-bot1{
  628. bottom: calc(120rpx + constant(safe-area-inset-bottom));
  629. bottom: calc(120rpx + env(safe-area-inset-bottom));
  630. }
  631. .btn-bot2{
  632. bottom: calc(260rpx + constant(safe-area-inset-bottom));
  633. bottom: calc(260rpx + env(safe-area-inset-bottom));
  634. }
  635. .btn-bot3{
  636. bottom: calc(355rpx + constant(safe-area-inset-bottom));
  637. bottom: calc(355rpx + env(safe-area-inset-bottom));
  638. }
  639. .global-pup{
  640. .content{
  641. padding:90rpx 34rpx;
  642. flex-direction: column;
  643. .contact{
  644. text{
  645. margin-left: 15rpx;
  646. color:#E6B77D;
  647. }
  648. }
  649. .apply{
  650. margin-top: 40rpx;
  651. width:390rpx;
  652. height:80rpx;
  653. background-color: #E6B77D;
  654. color: #FFFFFF;
  655. text-align: center;
  656. line-height: 80rpx;
  657. border-radius: 40rpx;
  658. }
  659. }
  660. }
  661. }
  662. .comment-cont {
  663. height: calc(100vh - 250rpx);
  664. border-top: 4rpx solid #F4F4F4;
  665. position: relative;
  666. padding: 24rpx 0;
  667. overflow: hidden;
  668. .commment-top {
  669. display: flex;
  670. justify-content: space-between;
  671. align-items: center;
  672. padding: 0 24rpx;
  673. .title {
  674. font-weight: bold;
  675. font-size: 30rpx;
  676. color: #000;
  677. }
  678. .comment-top-right {
  679. display: flex;
  680. align-items: center;
  681. background-color: #F6F6F6;
  682. border: 1px solid #F6F6F6;
  683. color: #666;
  684. border-radius: 48rpx;
  685. text {
  686. padding: 0 12rpx;
  687. height: 48rpx;
  688. line-height: 48rpx;
  689. &.act {
  690. background-color: #FFFFFF;
  691. color: #000;
  692. border-radius: 48rpx;
  693. }
  694. }
  695. }
  696. }
  697. .comment-list-cont {
  698. height: calc(100vh - 550rpx);
  699. overflow-y: auto;
  700. position: relative;
  701. padding: 30rpx 0;
  702. .comment-list-item {
  703. margin-bottom: 30rpx;
  704. padding: 0 24rpx;
  705. .comment {
  706. color: #666;
  707. .avatar{
  708. width: 56rpx;
  709. height: 56rpx;
  710. border-radius: 50%;
  711. flex-shrink: 0;
  712. margin-right: 20rpx;
  713. }
  714. view{
  715. flex: 1;
  716. }
  717. }
  718. .del {
  719. color: #D80000;
  720. margin-top: 10rpx;
  721. margin-left: 76rpx;
  722. width: 200rpx;
  723. }
  724. }
  725. }
  726. .write-wrap {
  727. padding: 0 24rpx;
  728. border-top: 4rpx solid #F4F4F4;
  729. position: absolute;
  730. // bottom: 50px;
  731. left: 0;
  732. right: 0;
  733. display: flex;
  734. align-items: center;
  735. z-index: 99;
  736. background-color: #fff;
  737. padding-bottom: calc(5px + constant(safe-area-inset-bottom));
  738. padding-bottom: calc(5px + env(safe-area-inset-bottom));
  739. ::-webkit-scrollbar {
  740. display: none;
  741. }
  742. .write-ipt {
  743. padding: 30rpx 0;
  744. flex: 1;
  745. }
  746. .confirm-btn {
  747. width: 100rpx;
  748. margin-left: 20rpx;
  749. text-align: center;
  750. padding: 20rpx 0;
  751. color: #E3B377;
  752. }
  753. }
  754. }
  755. .nodata {
  756. text-align: center;
  757. color: #999;
  758. }
  759. </style>