question.vue 23 KB

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