firendCircle.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. <template>
  2. <view class="content" id="content">
  3. <!-- #ifdef MP-WEIXIN -->
  4. <u-navbar title=" " :background="{ background: '#F6F7F8' }" :border-bottom="false">
  5. <view class="slot-wrap" slot="right"><u-icon name="camera-fill" size="34" @click="linkToRelease"></u-icon></view>
  6. </u-navbar>
  7. <!-- #endif -->
  8. <view class="content-imgbox">
  9. <image class="bgimg" :src="`${$url}/circleBanner.jpg`" mode="scaleToFill"></image>
  10. <image class="headimg" :src="userData.user.avatar" @tap="linkToBusinessCard(userData.user.operId)"></image>
  11. <text class="nickname">{{ userData.user.realname }}</text>
  12. <view class="water">
  13. <view class="water-c">
  14. <view class="water-1"> </view>
  15. <view class="water-2"> </view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="signature">
  20. <view class="">{{ userData.user.description }}</view>
  21. </view>
  22. <!-- 朋友圈列表 -->
  23. <view class="content-circle">
  24. <view class="content-circle-box" v-for="(item , index) in circleData" :key="index">
  25. <view class="headimg"><image class="img" :src="item.avatar" @tap="linkToBusinessCard(item.userId)"></image></view>
  26. <view class="content">
  27. <view class="content-name" @tap="linkToBusinessCard(item.id)">{{ item.nickName }}</view>
  28. <view class="content-desc">{{ item.context }}</view>
  29. <view class="content-img" v-if="item.urls">
  30. <!-- //只有一张图时候 -->
  31. <view v-if="item.urls.split(',').length == 1"><image class="img-1" :src="`${$url}/${item.urls.split(',')[0]}`" mode="widthFix" @tap="previewImg(0, item.urls.split(','))"></image></view>
  32. <!-- 有多张图的时候 -->
  33. <view v-else-if="item.urls.split(',').length > 1">
  34. <view class="content-img-more">
  35. <image
  36. class="img-more"
  37. v-for="(src, index) in item.urls.split(',')"
  38. :key="index"
  39. :class="index % 3 == 0 && 'img-3'"
  40. :src="`${$url}/${src}`"
  41. mode="aspectFill"
  42. @tap="previewImg(index, item.urls.split(','))"
  43. ></image>
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 相对时间 点赞按钮等 -->
  48. <view class="relavivetime" :id="`comment-${'null'}-${index}`">
  49. <view class="time">{{ item.operTime | format }}</view>
  50. <view class="icon-box">
  51. <!-- <view @tap="clickThumb(item)">
  52. <image class="img icon-box-item thumb" :src="isFabulous(item) ? require('@/static/like-fill.png') : require('@/static/like.png')" mode=""></image>
  53. </view>
  54. <view @tap="handleComment(index)">
  55. <image class="img icon-box-item" :src="require('@/static/comment.png')" mode=""></image>
  56. </view> -->
  57. <view>
  58. <text style='font-size:20px;' @tap="clickThumb(item)" :class="isFabulous(item) ? 'cuIcon-appreciatefill text-blue' : 'cuIcon-appreciate text-gray'"></text>
  59. <text style='font-size:20px;' @tap="handleComment(index)" class="cuIcon-messagefill text-gray margin-left-sm"></text>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 点赞人 评论 -->
  64. <view class="msg-box">
  65. <view class="thumbinfo" v-if="item.fabulousList.length">
  66. <!-- <image class="thumbinfo-icon" :src="require('@/static/like.png')"></image> -->
  67. <text class="cuIcon-appreciatefill text-blue"></text>
  68. <text class="thumbinfo-name" v-for="(userInfo, fabulousIndex) in item.fabulousList" :key="userInfo.id" @tap="linkToBusinessCard(userInfo.id)">
  69. {{ userInfo.nickName }}{{ fabulousIndex != item.fabulousList.length - 1 ? ',' : '' }}
  70. </text>
  71. </view>
  72. <view class="comment" v-if="item.commentList.length">
  73. <view
  74. class="comment-box"
  75. v-for="(comment, commenIndex) in item.commentList"
  76. :key="commenIndex"
  77. hover-class="comment-hover-class"
  78. :id="`comment-${item.circleMegId}-${commenIndex}`"
  79. >
  80. <text class="comment-box-name">{{ comment.nickName }}:{{ comment.comment }}</text>
  81. <text class="cuIcon-delete text-gray " @tap="deleteComment(index, commenIndex)" style="position: absolute;right: 50rpx;padding-top: 9rpx;" v-if="comment.userId == userData.user.operId"></text>
  82. <!-- <u-icon name="trash-fill" color="#9a9a9a" style="position: absolute;right: 50rpx;padding-top: 9rpx;" size="35" ></u-icon> -->
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. <!-- #ifdef H5 -->
  89. <view :style="{ height: showInput ? '100rpx' : 0 }"></view>
  90. <!-- #endif -->
  91. <!-- #ifdef APP-PLUS -->
  92. <view v-show="showInput" :style="{ height: viewOffsetBottom + 'px' }"></view>
  93. <!-- #endif -->
  94. </view>
  95. <u-divider style="margin-top: 50rpx;margin-bottom: 50rpx;" color="#c8c7c8" v-show="showNoMore">我是有底线的</u-divider>
  96. <!-- 底部聊天输入框 其实可以封装成组件的...-->
  97. <!-- #ifdef MP-WEIXIN -->
  98. <view class="input-box" v-if="showInput" id="input-box" :style="{ bottom: inputOffsetBottom > 0 ? inputOffsetBottom + 'px' : '0' }">
  99. <!-- #endif -->
  100. <!-- #ifndef MP-WEIXIN -->
  101. <view class="input-box" v-show="showInput" id="input-box" :style="{ bottom: inputOffsetBottom > 0 ? inputOffsetBottom + 'px' : '0' }">
  102. <!-- #endif -->
  103. <view class="input-box-flex">
  104. <view class="input-box-flex-grow">
  105. <input
  106. type="text"
  107. class="content"
  108. id="input"
  109. v-model="content"
  110. :adjust-position="false"
  111. :confirm-type="'send'"
  112. :confirm-hold="true"
  113. placeholder-style="color:#DDD;"
  114. :cursor-spacing="6"
  115. :placeholder="placeholder"
  116. :focus="showInput"
  117. @blur="blurInput"
  118. @confirm="sendMsg"
  119. />
  120. </view>
  121. <u-button class="btn" type="primary" size="mini" @click="sendMsg">发送</u-button>
  122. </view>
  123. </view>
  124. <u-action-sheet :list="list" v-model="show" border-radius="25" safe-area-inset-bottom @click="clickAction"></u-action-sheet>
  125. </view>
  126. </template>
  127. <script>
  128. import { mapGetters } from 'vuex';
  129. export default {
  130. name: 'firendCircle',
  131. data() {
  132. return {
  133. showNoMore: false,
  134. show: false, //u-action-sheet show
  135. list: [{ text: '更换相册封面', fontSize: '28' }],
  136. content: '',
  137. placeholder: '',
  138. showInput: false,
  139. focus: false,
  140. circleMegId: '', //某一条朋友圈id
  141. commentInfo: {},
  142. inputOffsetBottom: 0, //键盘的高度
  143. viewOffsetBottom: 0, //视窗距离页面的距离
  144. sel: '' ,//选中的节点
  145. pageNum: 1,
  146. postList:[],
  147. postIndex:0,
  148. $url:'',
  149. };
  150. },
  151. filters: {
  152. format: function (e) {
  153. // 获取js 时间戳
  154. let time = new Date().getTime();
  155. // 去掉 js 时间戳后三位
  156. time = parseInt((time - e) / 1000);
  157. // 存储转换值
  158. let s;
  159. if (time < 60 * 10) {
  160. // 十分钟内
  161. return '刚刚';
  162. } else if (time < 60 * 60 && time >= 60 * 10) {
  163. // 超过十分钟少于1小时
  164. s = Math.floor(time / 60);
  165. return s + '分钟前';
  166. } else if (time < 60 * 60 * 24 && time >= 60 * 60) {
  167. // 超过1小时少于24小时
  168. s = Math.floor(time / 60 / 60);
  169. return s + '小时前';
  170. } else if (time < 60 * 60 * 24 * 3 && time >= 60 * 60 * 24) {
  171. // 超过1天少于3天内
  172. s = Math.floor(time / 60 / 60 / 24);
  173. return s + '天前';
  174. } else {
  175. // 超过3天
  176. var date = new Date(e);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  177. var Y = date.getFullYear() + '-';
  178. var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
  179. var D = date.getDate()>10?date.getDate(): '0'+date.getDate() + ' ';
  180. var h = date.getHours() + ':';
  181. var m = date.getMinutes()>10?date.getMinutes():'0'+ date.getMinutes() + ':';
  182. var ss = date.getSeconds();
  183. return Y+M+D+h+m+ss;
  184. }
  185. }
  186. },
  187. watch: {
  188. inputOffsetBottom: {
  189. handler(val) {
  190. if (val != 0) {
  191. this.$nextTick(() => {
  192. //暂时不支持h5的滚动方式 因为h5不支持键盘的高度监听
  193. //微信小程序会把input的焦点和placeholder顶起,正在寻找解决方案
  194. // #ifndef MP-WEIXIN || H5
  195. this.bindScroll(this.sel, 100);
  196. // #endif
  197. });
  198. }
  199. }
  200. }
  201. },
  202. onReady() {
  203. //兼容h5在pages.json中设置 autoBackButton:false无效 其实只是想修改下默认返回按钮的样式,发现不生效...
  204. // #ifdef H5
  205. const icon = document.getElementsByClassName('uni-page-head-btn')[0];
  206. icon.style.display = 'none';
  207. // #endif
  208. //设置input输入框距离键盘的高度 --也就是键盘的高度
  209. //设置view距离键盘和输入框的高度
  210. //h5暂不支持键盘的高度监听
  211. uni.onKeyboardHeightChange(res => {
  212. this.inputOffsetBottom = res.height;
  213. this.viewOffsetBottom = res.height + uni.upx2px(100);
  214. if (res.height == 0) {
  215. // #ifndef MP-WEIXIN
  216. this.showInput = false;
  217. // #endif
  218. }
  219. });
  220. },
  221. onShow() {
  222. console.log(11111111)
  223. this.getData(false)
  224. },
  225. methods: {
  226. isFabulous(item){
  227. console.log(item)
  228. let fabulous = item.fabulousList.filter(l=>l.userId==this.userData.user.operId)[0];
  229. return fabulous?true:false
  230. },
  231. //自定义标题栏按钮
  232. onNavigationBarButtonTap({ index }) {
  233. if (index == 0) {
  234. //发布朋友圈
  235. this.$u.route('pageD/releaseFirendCircle/releaseFirendCircle');
  236. } else if (index == 1) {
  237. //返回按钮
  238. this.$u.route({ type: 'back' });
  239. }
  240. },
  241. //打开底部更换相册封面弹窗
  242. showSheet() {
  243. this.show = true;
  244. },
  245. //点赞
  246. clickThumb(item) {
  247. console.log(item)
  248. let fabulous = item.fabulousList.filter(l=>l.userId==this.userData.user.operId)[0];
  249. this.$socket.toFabulousRes(fabulous?fabulous.id:'',this.userData.user.operId, item.id, res => {
  250. if (res.response.success) {
  251. // jiazai
  252. if(res.response.data){
  253. item.fabulousList.push({
  254. id: res.response.data,
  255. nickName: this.userData.user.realname,
  256. userId: this.userData.user.operId
  257. })
  258. }else{
  259. let index = item.fabulousList.findIndex((m)=>m.userId==this.userData.user.operId);
  260. item.fabulousList.splice(index, 1)
  261. }
  262. }
  263. });
  264. },
  265. //跳转到名片
  266. linkToBusinessCard(userId) {
  267. console.log(userId)
  268. this.$u.route({
  269. url: 'pageC/businessCard/businessCard',
  270. // params: { userId },
  271. params:{ id: userId, source: 1}
  272. });
  273. },
  274. //点击评论 唤出输入框和键盘
  275. handleComment(postIndex) {
  276. this.postIndex = postIndex;
  277. this.content = '';
  278. this.showInput = true;
  279. this.placeholder = '评论:';
  280. },
  281. deleteComment(postIndex, commentIndex){
  282. let _this = this
  283. uni.showActionSheet({
  284. itemList: ['确认'],
  285. success: function (res) {
  286. if(res.tapIndex==0){
  287. _this.$socket.toCommentReqPacket(this.circleData[postIndex].commentList[commentIndex].id,this.userData.user.operId, this.circleData[postIndex].id, '', res => {
  288. if (res.response.success) {
  289. this.circleData[postIndex].commentList.splice(commentIndex, 1)
  290. }
  291. });
  292. }
  293. },
  294. fail: function (res) {
  295. }
  296. });
  297. },
  298. //发送消息
  299. sendMsg() {
  300. if (!this.content) {
  301. return;
  302. }
  303. const post = this.circleData[this.postIndex];
  304. this.$socket.toCommentReqPacket('',this.userData.user.operId, post.id, this.content, res => {
  305. if (res.response.success) {
  306. const commentId = res.response.data;
  307. if(res.response.data){
  308. post.commentList.push({
  309. id: commentId,
  310. nickName: this.userData.user.realname,
  311. userId: this.userData.user.operId,
  312. comment: this.content
  313. })
  314. this.closeInputModel();
  315. }
  316. }
  317. });
  318. },
  319. //滑块
  320. bindScroll(sel, duration = 0) {
  321. uni.createSelectorQuery()
  322. .select('#content')
  323. .boundingClientRect(data => {
  324. //最外层盒子节点
  325. uni.createSelectorQuery()
  326. .select(sel)
  327. .boundingClientRect(res => {
  328. if (!res) return;
  329. //选中的节点
  330. let windowHeight = 0;
  331. uni.getSystemInfo({
  332. success: system => {
  333. windowHeight = system.windowHeight;
  334. }
  335. });
  336. const inputKeyBoardHeight = uni.upx2px(100) + this.inputOffsetBottom; //input输入框和键盘的高度
  337. const contentHeight = windowHeight - inputKeyBoardHeight; //可视内容的高度(除去input输入框和键盘)
  338. let scrollTop = 0;
  339. scrollTop = res.top - data.top - contentHeight + res.height; //滚动到实际距离是元素距离顶部的距离减去最外层盒子的滚动距离再减去可视内容的高度然后再加上此元素的高度
  340. uni.pageScrollTo({ duration, scrollTop });
  341. })
  342. .exec();
  343. })
  344. .exec();
  345. },
  346. //查看大图
  347. previewImg(current, imgList) {
  348. for(let index in imgList){
  349. if(!imgList[index]){
  350. imgList.splice(index, 1)
  351. }else{
  352. imgList[index] = this.$url + imgList[index]
  353. }
  354. }
  355. uni.previewImage({
  356. current,
  357. urls: imgList,
  358. // #ifndef MP-WEIXIN
  359. indicator: 'number'
  360. // #endif
  361. });
  362. },
  363. //关闭键盘 关闭输入框
  364. closeInputModel() {
  365. this.postId = ''
  366. this.postIndex = ''
  367. this.showInput = false;
  368. this.content = '';
  369. // this.circleMegId = '';
  370. // this.commentInfo = {};
  371. uni.hideKeyboard();
  372. },
  373. msgInput(e){
  374. console.log("msgInput",e)
  375. this.content = e.comment
  376. },
  377. //失去焦点触发
  378. blurInput() {
  379. // this.closeInputModel();
  380. },
  381. keyboardheightchange(res) {
  382. },
  383. //模拟数据 可通过接口获取
  384. getData(freshFlag) {
  385. uni.showLoading({
  386. title: '正在加载',
  387. mask:true
  388. })
  389. var pageNumber = 1;
  390. // this.$socket.queryPostsReq(this.userData.user.operId, this.pageNum, res => {
  391. if(freshFlag){
  392. pageNumber = this.pageNum
  393. }
  394. this.$socket.queryPostsReq('', pageNumber, res => {
  395. uni.hideLoading()
  396. if (res.response.success) {
  397. if(freshFlag){
  398. const circleData3 = this.circleData;
  399. console.log('res.response.data',res.response.data)
  400. const circleData2 = JSON.parse(JSON.stringify(res.response.data));
  401. for(var i in circleData2){
  402. let id = circleData2[i].id;
  403. if (!circleData3.map(v => v.id).includes(id)) {
  404. circleData3.push(circleData2[i]);
  405. }
  406. }
  407. circleData3.sort((a,b)=>{return b.id-a.id});
  408. this.$u.vuex('circleData', circleData3);
  409. // console.log('this.circleData',this.circleData)
  410. //我是有底线的
  411. if (res.response.data.length==0){
  412. this.showNoMore = true
  413. }
  414. this.pageNum++;
  415. uni.stopPullDownRefresh();
  416. }
  417. else{
  418. this.$u.vuex('circleData', res.response.data);
  419. }
  420. }
  421. });
  422. },
  423. //点击相册封面弹窗选择项
  424. clickAction(index) {
  425. if (index == 0) {
  426. this.$u.route('pageD/chooseBgImg/chooseBgImg');
  427. }
  428. },
  429. //点击自定义组件相机按钮
  430. linkToRelease() {
  431. this.$u.route('pageD/releaseFirendCircle/releaseFirendCircle');
  432. }
  433. },
  434. //下拉刷新
  435. async onPullDownRefresh() {
  436. await this.getData(false);
  437. uni.stopPullDownRefresh();
  438. },
  439. async onReachBottom(){
  440. await this.getData(true);
  441. }
  442. };
  443. </script>
  444. <style lang="scss">
  445. /*组件背景颜色*/
  446. .water {
  447. position: absolute;
  448. left: 0;
  449. bottom: -10px;
  450. height: 30px;
  451. width: 100%;
  452. z-index: 1
  453. }
  454. .water-c {
  455. position: relative
  456. }
  457. .water-1 {
  458. background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjYwMHB4IiBoZWlnaHQ9IjYwcHgiIHZpZXdCb3g9IjAgMCA2MDAgNjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCAzLjQgKDE1NTc1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT53YXRlci0xPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IuaIkSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9Ii0iIHNrZXRjaDp0eXBlPSJNU0FydGJvYXJkR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMjEuMDAwMDAwLCAtMTMzLjAwMDAwMCkiIGZpbGwtb3BhY2l0eT0iMC4zIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9IndhdGVyLTEiIHNrZXRjaDp0eXBlPSJNU0xheWVyR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMS4wMDAwMDAsIDEzMy4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDcuNjk4NTczOTUgTDQuNjcwNzE5NjJlLTE1LDYwIEw2MDAsNjAgTDYwMCw3LjM1MjMwNDYxIEM2MDAsNy4zNTIzMDQ2MSA0MzIuNzIxMDUyLDI0LjEwNjUxMzggMjkwLjQ4NDA0LDcuMzU2NzQxODcgQzE0OC4yNDcwMjcsLTkuMzkzMDMwMDggMCw3LjY5ODU3Mzk1IDAsNy42OTg1NzM5NSBaIiBpZD0iUGF0aC0xIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==") repeat-x;
  459. background-size: 600rpx;
  460. -webkit-animation: wave-animation-1 3.5s infinite linear;
  461. animation: wave-animation-1 3.5s infinite linear
  462. }
  463. .water-2 {
  464. top: 5px;
  465. background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjYwMHB4IiBoZWlnaHQ9IjYwcHgiIHZpZXdCb3g9IjAgMCA2MDAgNjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCAzLjQgKDE1NTc1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT53YXRlci0yPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IuaIkSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9Ii0iIHNrZXRjaDp0eXBlPSJNU0FydGJvYXJkR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMjEuMDAwMDAwLCAtMjQ2LjAwMDAwMCkiIGZpbGw9IiNGRkZGRkYiPgogICAgICAgICAgICA8ZyBpZD0id2F0ZXItMiIgc2tldGNoOnR5cGU9Ik1TTGF5ZXJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIxLjAwMDAwMCwgMjQ2LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTAsNy42OTg1NzM5NSBMNC42NzA3MTk2MmUtMTUsNjAgTDYwMCw2MCBMNjAwLDcuMzUyMzA0NjEgQzYwMCw3LjM1MjMwNDYxIDQzMi43MjEwNTIsMjQuMTA2NTEzOCAyOTAuNDg0MDQsNy4zNTY3NDE4NyBDMTQ4LjI0NzAyNywtOS4zOTMwMzAwOCAwLDcuNjk4NTczOTUgMCw3LjY5ODU3Mzk1IFoiIGlkPSJQYXRoLTIiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMwMC4wMDAwMDAsIDMwLjAwMDAwMCkgc2NhbGUoLTEsIDEpIHRyYW5zbGF0ZSgtMzAwLjAwMDAwMCwgLTMwLjAwMDAwMCkgIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==") repeat-x;
  466. background-size: 600rpx;
  467. -webkit-animation: wave-animation-2 6s infinite linear;
  468. animation: wave-animation-2 6s infinite linear
  469. }
  470. .water-1,
  471. .water-2 {
  472. position: absolute;
  473. width: 100%;
  474. height: 60rpx
  475. }
  476. .back-white {
  477. background: #fff
  478. }
  479. @keyframes wave-animation-1 {
  480. 0% {
  481. background-position: 0 top
  482. }
  483. 100% {
  484. background-position: 600rpx top
  485. }
  486. }
  487. @keyframes wave-animation-2 {
  488. 0% {
  489. background-position: 0 top
  490. }
  491. 100% {
  492. background-position: 600rpx top
  493. }
  494. }
  495. page {
  496. background-color: #ffffff;
  497. }
  498. .comment-hover-class {
  499. background-color: #f3dada;
  500. }
  501. image {
  502. will-change: transform;
  503. }
  504. .content {
  505. &-imgbox {
  506. position: relative;
  507. .bgimg {
  508. width: 100%;
  509. height: 560rpx;
  510. }
  511. .headimg {
  512. width: 110rpx;
  513. height: 110rpx;
  514. border-radius: 6rpx;
  515. position: absolute;
  516. z-index: 99;
  517. right: 30rpx;
  518. bottom: -20rpx;
  519. }
  520. .nickname {
  521. color: #ffffff;
  522. position: absolute;
  523. right: 170rpx;
  524. bottom: 20rpx;
  525. z-index: 99;
  526. font-size: 30rpx;
  527. font-weight: bold;
  528. }
  529. }
  530. &-circle {
  531. &-box {
  532. padding: 18rpx 30rpx;
  533. border-bottom: 1rpx solid #f2eeee;
  534. display: flex;
  535. flex-direction: row;
  536. justify-content: flex-start;
  537. align-items: flex-start;
  538. .headimg {
  539. width: 80rpx;
  540. height: 80rpx;
  541. .img {
  542. width: 100%;
  543. height: 100%;
  544. border-radius: 10rpx;
  545. }
  546. }
  547. .content {
  548. flex: 1;
  549. padding-left: 18rpx;
  550. font-size: 30rpx;
  551. &-name {
  552. color: #36648b;
  553. }
  554. &-desc {
  555. color: $u-main-color;
  556. padding-top: 6rpx;
  557. line-height: 34rpx;
  558. }
  559. &-img {
  560. margin-top: 10rpx;
  561. .img-1 {
  562. will-change: transform;
  563. width: 280rpx;
  564. height: auto;
  565. max-height: 400rpx;
  566. }
  567. &-more {
  568. display: flex;
  569. flex-wrap: wrap;
  570. .img-more {
  571. display: block;
  572. width: 160rpx;
  573. height: 160rpx;
  574. margin: 4rpx;
  575. }
  576. .img-3 {
  577. margin: 4rpx 4rpx 4rpx 0;
  578. }
  579. }
  580. }
  581. .msg-box {
  582. width: 100%;
  583. background-color: #f5f5f5;
  584. margin-top: 15rpx;
  585. border-radius: 4rpx;
  586. .thumbinfo {
  587. // border-bottom: 1rpx solid gray;
  588. padding: 6rpx;
  589. display: flex;
  590. align-items: center;
  591. flex-wrap: wrap;
  592. &-icon {
  593. width: 28rpx;
  594. height: 28rpx;
  595. line-height: 28rpx;
  596. margin-right: 15rpx;
  597. text-align: center;
  598. vertical-align: middle;
  599. padding-left: 10rpx;
  600. }
  601. &-name {
  602. font-size: 28rpx;
  603. color: #36648b;
  604. }
  605. }
  606. .comment {
  607. padding: 6rpx 8rpx;
  608. color: $uni-text-color;
  609. font-size: 28rpx;
  610. &-box {
  611. padding: 4rpx 0;
  612. &-name {
  613. color: #36648b;
  614. .callback {
  615. color: $uni-text-color;
  616. }
  617. }
  618. &-content {
  619. word-break: break-all;
  620. }
  621. }
  622. }
  623. }
  624. }
  625. .relavivetime {
  626. display: flex;
  627. justify-content: space-between;
  628. align-items: center;
  629. font-size: 26rpx;
  630. .time {
  631. color: $uni-text-color-grey;
  632. }
  633. .icon-box {
  634. display: flex;
  635. align-items: center;
  636. &-item {
  637. background-color: #f5f5f5;
  638. padding: 4rpx 12rpx;
  639. border-radius: 6rpx;
  640. &.thumb {
  641. margin-right: 10rpx;
  642. }
  643. }
  644. .img {
  645. width: 34rpx;
  646. height: 34rpx;
  647. }
  648. }
  649. }
  650. }
  651. }
  652. .input-box {
  653. position: fixed;
  654. bottom: 0;
  655. left: 0;
  656. width: 100%;
  657. box-sizing: content-box;
  658. z-index: 999;
  659. background-color: #F6F7F8;
  660. /* #ifdef MP-WEIXIN */
  661. padding-bottom: 0rpx;
  662. /* #endif */
  663. /* #ifndef MP-WEIXIN */
  664. margin-bottom: 0rpx;
  665. margin-bottom: constant(safe-area-inset-bottom);
  666. margin-bottom: env(safe-area-inset-bottom);
  667. /* #endif */
  668. &-flex {
  669. display: flex;
  670. justify-content: flex-start;
  671. align-items: center;
  672. flex-wrap: nowrap;
  673. flex-direction: row;
  674. padding: 0 20rpx;
  675. height: 100rpx;
  676. &-grow {
  677. flex-grow: 1;
  678. .content {
  679. background-color: #fff;
  680. height: 60rpx;
  681. padding: 0 20rpx;
  682. border-radius: 12rpx;
  683. font-size: 28rpx;
  684. caret-color: $uni-color-success;
  685. }
  686. }
  687. .btn {
  688. margin-left: 20rpx;
  689. background-color: $u-type-success;
  690. border: none;
  691. }
  692. }
  693. }
  694. .signature {
  695. display: flex;
  696. justify-content: flex-end;
  697. font-size: 24rpx;
  698. color: gray;
  699. padding: 35rpx 30rpx 35rpx 100rpx;
  700. text-align: right;
  701. }
  702. .slot-wrap {
  703. display: flex;
  704. align-items: center;
  705. padding: 0 30rpx;
  706. }
  707. }
  708. </style>