main.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. <template>
  2. <view style="width: 100%;">
  3. <t-rt-popup ref="rtBubble"></t-rt-popup>
  4. <uni-popup ref="popup" type="center">
  5. <view>
  6. <tui-button type="warning" style="width: 200rpx;height: 200rpx;float: left;margin: 10rpx;" @tap="establish">
  7. <view>
  8. <image style="width: 100rpx;height:100rpx;vertical-align: text-top;" src="../../static/img/main/join.png">
  9. <view style="width: 100%;font-size: 24rpx;line-height: 1;">创建家族</view>
  10. </view>
  11. </tui-button>
  12. <tui-button style="width: 200rpx;height: 200rpx;float: right;margin: 10rpx;" @tap="join">
  13. <view>
  14. <image style="width: 100rpx;height:100rpx;vertical-align: text-top;" src="../../static/img/main/add.png">
  15. <view style="width: 100%;font-size: 24rpx;line-height: 1;">加入家族</view>
  16. </view>
  17. </tui-button>
  18. </view>
  19. <view style="position: absolute;top: 230rpx;width: 100%;">
  20. <tui-button plain @click="close">随便看看</tui-button>
  21. <tui-button style="margin-top: 10rpx;" plain type="white" @click="close">取消</tui-button>
  22. </view>
  23. </uni-popup>
  24. <tui-modal :show="editname" @cancel="hide1" :custom="true" fadeIn >
  25. <view class="tui-modal-custom">
  26. <input placeholder="请输入内容" class="tui-modal-input"/>
  27. <tui-button height="72rpx" :size="28" shape="circle" @click="handleClick1">保存</tui-button>
  28. </view>
  29. </tui-modal>
  30. <tui-modal :show="editbirthday" @cancel="hide2" :custom="true" fadeIn >
  31. <view class="tui-modal-custom">
  32. <input placeholder="日期" class="tui-modal-input"/>
  33. <tui-button height="72rpx" :size="28" shape="circle" @click="handleClick2">保存</tui-button>
  34. </view>
  35. </tui-modal>
  36. <tui-modal :show="edithobby" @cancel="hide3" :custom="true" fadeIn >
  37. <view class="tui-modal-custom">
  38. <input placeholder="爱好" class="tui-modal-input"/>
  39. <tui-button height="72rpx" :size="28" shape="circle" @click="handleClick3">保存</tui-button>
  40. </view>
  41. </tui-modal>
  42. <view class="hello">
  43. <view id="moments">
  44. <view class="home-pic">
  45. <view class="home-pic-base">
  46. <view class="top-pic" @tap="personal">
  47. <image class="header" src="../../static/index/test/header06.jpg"></image>
  48. </view>
  49. <view class="top-name">{{userName}}</view>
  50. <view class="top-id">ID号:3867676552</view>
  51. <view class="top-button">
  52. <view style="float: left;">
  53. <tui-button type="warning" shadow width="170rpx" height="85rpx" :size="36" @tap="friends">+ 好友</tui-button>
  54. </view>
  55. <view style="float: right;">
  56. <tui-button type="danger" shadow width="170rpx" height="85rpx" :size="36" @click="open">+ 家族</tui-button>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view style="margin-top: 30px;">
  62. <tui-tabs :tabs="navbar" backgroundColor="#fafafa" :height="88" :currentTab="currentTab>2?0:currentTab"
  63. :sliderWidth="75" :sliderHeight="60" bottom="50%" color="#888" selectedColor="#C74547" :bold="true"
  64. sliderBgColor="#C74547" @change="change" itemWidth="50%" :width="100" unlined></tui-tabs>
  65. </view>
  66. <view v-if="currentTab==0" class="moments__post" v-for="(post,index) in posts" :key="index" :id="'post-'+index">
  67. <view class="post-left">
  68. <image class="post_header" :src="post.header_image"></image>
  69. </view>
  70. <view class="post_right">
  71. <text class="post-username">{{post.username}}</text>
  72. <view id="paragraph" class="paragraph">{{post.content.text}}</view>
  73. <!-- 相册 -->
  74. <view class="thumbnails">
  75. <view :class="post.content.images.length === 1?'my-gallery':'thumbnail'" v-for="(image, index_images) in post.content.images" :key="index_images">
  76. <image class="gallery_img" lazy-load mode="aspectFill" :src="image" :data-src="image" @tap="previewImage(post.content.images,index_images)"></image>
  77. </view>
  78. </view>
  79. <!-- 资料条 -->
  80. <view class="toolbar">
  81. <view class="timestamp">{{post.timestamp}}</view>
  82. <view class="like" @tap="like(index)">
  83. <image :src="post.islike===0?'../../static/index/islike.png':'../../static/index/like.png'"></image>
  84. </view>
  85. <view class="comment" @tap="comment(index)">
  86. <image src="../../static/index/comment.png"></image>
  87. </view>
  88. </view>
  89. <!-- 赞/评论区 -->
  90. <view class="post-footer">
  91. <view class="footer_content">
  92. <image class="liked" src="../../static/index/liked.png"></image>
  93. <text class="nickname" v-for="(user,index_like) in post.like" :key="index_like">{{user.username}}</text>
  94. </view>
  95. <view class="footer_content" v-for="(comment,comment_index) in post.comments.comment" :key="comment_index" @tap="reply(index,comment_index)">
  96. <text class="comment-nickname">{{comment.username}}: <text class="comment-content">{{comment.content}}</text></text>
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 结束 post -->
  101. </view>
  102. <view v-if="currentTab==1" style="padding: 30rpx 30rpx;" :key="index" :id="'post-'+index">
  103. <view class="tui-flex" style="width: 100%;height:128rpx;margin-bottom:30rpx;">
  104. <view class="tui-col-2" style="font-size: 40rpx;display: table-cell;">今天</view>
  105. <view class="tui-center tui-col-2" style="background-color: #eaeaea;" @tap="goPublish" hover-class="tui-opcity">
  106. <tui-icon name="camera-fill" :size="24"></tui-icon>
  107. </view>
  108. <view class=" tui-col-8" style="margin-left: 20rpx;overflow: hidden;font-size: 28rpx;"></view>
  109. </view>
  110. <view class="tui-flex" style="width: 100%;height:128rpx;margin-bottom:30rpx;">
  111. <view class="tui-col-2" style="font-size: 40rpx;display: table-cell;">01<text style="font-size: 28rpx;">8月</text></view>
  112. <view class="tui-col-2" @tap="details">
  113. <image style="width: 100%;height: 100%;" src="../../static/images/basic/grid.png"></image>
  114. </view>
  115. <view class=" tui-col-8" @tap="details" style="margin-left: 20rpx;overflow: hidden;font-size: 28rpx;padding: 10rpx 0;">奥术大师奥术大师奥术大师奥术大师奥术大师奥术大师奥术大师奥术大师奥术大师奥术大师奥术大师奥术大师</view>
  116. </view>
  117. </view>
  118. <view v-if="currentTab==2" style="padding: 30rpx 30rpx;" :key="index" :id="'post-'+index">
  119. <view style="margin: 10rpx 0;">
  120. <view class="tui-title">
  121. <view>姓名<tui-icon name="edit" :size="22" style="margin-left: 6rpx;" @click="name"></tui-icon></view>
  122. </view>
  123. <view class="tui-default" style="background: #fff;font-size: 24rpx;">
  124. <view class="contenfont">
  125. <view class="container" v-for="(item,index11) in textfont" :key="index11" :class="fold ? 'fold' : 'unfold'" v-if="item.font !==''" >
  126. <label>
  127. <span>{{item.font}}</span>
  128. </label>
  129. </view>
  130. <view style="width: 100%;text-align: center;">
  131. <view class="show" @click="btn" v-show="fold"><tui-icon name="arrowdown"></tui-icon></view>
  132. <view class="show" @click="btn" v-show="!fold"><tui-icon name="arrowup"></tui-icon></view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. <view style="margin: 10rpx 0;">
  138. <view class="tui-title">
  139. <view>生日<tui-icon name="edit" :size="22" style="margin-left: 6rpx;" @click="birthday"></tui-icon></view>
  140. </view>
  141. <view class="tui-default" style="background: #fff;font-size: 24rpx;">
  142. <view class="contenfont">
  143. <view class="container" v-for="(item,index11) in textfont" :key="index11" :class="fold ? 'fold' : 'unfold'" v-if="item.font !==''" >
  144. <label>
  145. <span>{{item.font}}</span>
  146. </label>
  147. </view>
  148. <view style="width: 100%;text-align: center;">
  149. <view class="show" @click="btn" v-show="fold"><tui-icon name="arrowdown"></tui-icon></view>
  150. <view class="show" @click="btn" v-show="!fold"><tui-icon name="arrowup"></tui-icon></view>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <view style="margin: 10rpx 0;">
  156. <view class="tui-title">
  157. <view>喜好<tui-icon name="edit" :size="22" style="margin-left: 6rpx;" @click="hobby"></tui-icon></view>
  158. </view>
  159. <view class="tui-default" style="background: #fff;font-size: 24rpx;">
  160. <view class="contenfont">
  161. <view class="container" v-for="(item,index11) in textfont" :key="index11" :class="fold ? 'fold' : 'unfold'" v-if="item.font !==''" >
  162. <label>
  163. <span>{{item.font}}</span>
  164. </label>
  165. </view>
  166. <view style="width: 100%;text-align: center;">
  167. <view class="show" @click="btn" v-show="fold"><tui-icon name="arrowdown"></tui-icon></view>
  168. <view class="show" @click="btn" v-show="!fold"><tui-icon name="arrowup"></tui-icon></view>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. <view class="foot" style="margin-bottom: 50px;" v-show="showInput">
  175. <chat-input @send-message="send_comment" @blur="blur" :focus="focus" :placeholder="input_placeholder"></chat-input>
  176. <!-- <chat-input @send-message="send_comment" @blur="blur" :placeholder="input_placeholder"></chat-input> -->
  177. </view>
  178. <view class="uni-loadmore" v-if="showLoadMore">{{loadMoreText}}</view>
  179. </view>
  180. </view>
  181. </view>
  182. </template>
  183. <script>
  184. import chatInput from '../../components/im-chat/chatinput.vue'; //input框
  185. import tuiButton from "../../components/thorui/tui-button/tui-button"
  186. import tuiIcon from '@/components/thorui/tui-icon/tui-icon';
  187. import tRtPopup from '@/components/views/t-rt-popup/t-rt-popup';
  188. import postData from '../../common/index/index.post.data.js';//族友圈数据
  189. import personalData from '../../common/index/personal.post.data.js';//我的近况数据
  190. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  191. import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
  192. import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
  193. import tuiModal from "@/components/thorui/tui-modal/tui-modal"
  194. import {
  195. mapState,
  196. mapMutations
  197. } from 'vuex'
  198. export default {
  199. components: {
  200. chatInput,
  201. tuiButton,
  202. tRtPopup,
  203. tuiIcon,
  204. uniPopup,
  205. uniPopupMessage,
  206. uniPopupDialog,
  207. tuiModal
  208. },
  209. data() {
  210. return {
  211. editname: false,
  212. editbirthday: false,
  213. edithobby: false,
  214. navbar: [{
  215. name: "族友圈"
  216. }, {
  217. name: "我都近况"
  218. }, {
  219. name: "个人详情"
  220. }],
  221. textfont:[{
  222. font:"合抱之木,生于毫末;九层之台,起于垒土。实现中华民族伟大复兴是一个长期而艰巨的过程,需要凝聚磅礴之力,才能实现质的飞跃实现中华民族伟大复兴的中国梦汇聚了强。大的中国力量2013年3月17日"
  223. }],
  224. users: personalData,
  225. show: false,
  226. posts: postData,//模拟数据
  227. user_id: 4,
  228. username: 'Liuxy',
  229. index: '',
  230. fold:true,
  231. comment_index: '',
  232. currentTab: 0,
  233. input_placeholder: '评论', //占位内容
  234. focus: false, //是否自动聚焦输入框
  235. is_reply: false, //回复还是评论
  236. showInput: false, //评论输入框
  237. screenHeight: '', //屏幕高度(系统)
  238. platform: '',
  239. windowHeight: '' ,//可用窗口高度(不计入软键盘)
  240. loadMoreText: "加载中...",
  241. showLoadMore: false,
  242. }
  243. },
  244. mounted() {
  245. uni.getStorage({
  246. key: 'posts',
  247. success: function (res) {
  248. console.log(res.data);
  249. this.posts = res.data;
  250. }
  251. });
  252. },
  253. onReady() {
  254. uni.setNavigationBarColor({ frontColor: '#ffffff', backgroundColor: '#c74547' });
  255. },
  256. onLoad() {
  257. uni.getSystemInfo({ //获取设备信息
  258. success: (res) => {
  259. this.screenHeight = res.screenHeight;
  260. this.platform = res.platform;
  261. }
  262. });
  263. uni.startPullDownRefresh();
  264. },
  265. onShow() {
  266. uni.onWindowResize((res) => { //监听窗口尺寸变化,窗口尺寸不包括底部导航栏
  267. if(this.platform === 'ios'){
  268. this.windowHeight = res.size.windowHeight;
  269. this.adjust();
  270. }else{
  271. if (this.screenHeight - res.size.windowHeight > 60 && this.windowHeight <= res.size.windowHeight) {
  272. this.windowHeight = res.size.windowHeight;
  273. this.adjust();
  274. }
  275. }
  276. });
  277. },
  278. onHide() {
  279. },
  280. onUnload() {
  281. this.max = 0,
  282. this.data = [],
  283. this.loadMoreText = "加载更多",
  284. this.showLoadMore = false;
  285. },
  286. onReachBottom() { //监听上拉触底事件
  287. console.log('onReachBottom');
  288. this.showLoadMore = true;
  289. setTimeout(() => {
  290. //获取数据
  291. if (this.posts.length < 20){//测试数据
  292. this.posts = this.posts.concat(this.posts);
  293. }else{
  294. this.loadMoreText = "暂无更多";
  295. }
  296. }, 1000);
  297. },
  298. onPullDownRefresh() { //监听下拉刷新动作
  299. console.log('onPullDownRefresh');
  300. // 这里获取数据
  301. setTimeout(function() {
  302. //初始化数据
  303. uni.stopPullDownRefresh(); //停止下拉刷新
  304. }, 1000);
  305. },
  306. onNavigationBarButtonTap(e) {
  307. if (e.index === 0) {
  308. this.$refs.rtBubble.toggle();
  309. }
  310. },
  311. computed: mapState(['forcedLogin', 'hasLogin', 'userName']),
  312. onLoad() {
  313. const loginType = uni.getStorageSync('login_type')
  314. if (loginType === 'local') {
  315. this.login(uni.getStorageSync('username'))
  316. return
  317. }
  318. let uniIdToken = uni.getStorageSync('uniIdToken')
  319. if (uniIdToken) {
  320. this.login(uni.getStorageSync('username'))
  321. uniCloud.callFunction({
  322. name: 'user-center',
  323. data: {
  324. action: 'checkToken',
  325. },
  326. success: (e) => {
  327. console.log('checkToken success', e);
  328. if (e.result.code > 0) {
  329. //token过期或token不合法,重新登录
  330. if (this.forcedLogin) {
  331. uni.reLaunch({
  332. url: '../login/login'
  333. });
  334. } else {
  335. uni.navigateTo({
  336. url: '../login/login'
  337. });
  338. }
  339. }
  340. },
  341. fail(e) {
  342. uni.showModal({
  343. content: JSON.stringify(e),
  344. showCancel: false
  345. })
  346. }
  347. })
  348. } else {
  349. this.guideToLogin()
  350. }
  351. },
  352. methods: {
  353. name() {
  354. this.editname = true;
  355. },
  356. hide1() {
  357. this.editname = false;
  358. },
  359. handleClick1() {
  360. this.hide1();
  361. },
  362. birthday() {
  363. this.editbirthday = true;
  364. },
  365. hide2() {
  366. this.editbirthday = false;
  367. },
  368. handleClick2() {
  369. this.hide2();
  370. },
  371. hobby() {
  372. this.edithobby = true;
  373. },
  374. hide3() {
  375. this.edithobby = false;
  376. },
  377. handleClick3() {
  378. this.hide3();
  379. },
  380. btn:function(){ // 收起 展开
  381. this.fold=!this.fold;
  382. },
  383. open(){
  384. this.$refs.popup.open()
  385. },
  386. close(){
  387. this.$refs.popup.close()
  388. },
  389. change(e) {
  390. this.currentTab = e.index
  391. },
  392. showTips: function(e) {
  393. let index = e.currentTarget.dataset.index;
  394. let options = {
  395. msg: this.basicData[index].msg,
  396. duration: this.basicData[index].duration || 2000,
  397. type: this.basicData[index].type
  398. };
  399. this.$refs.toast.showTips(options);
  400. },
  401. switchTabs: function(e) {
  402. this.index = e.currentTarget.dataset.index
  403. },
  404. details: function() {
  405. uni.navigateTo({
  406. url: '../show/show'
  407. });
  408. },
  409. friends: function() {
  410. uni.navigateTo({
  411. url: './friends/friends'
  412. });
  413. },
  414. join: function() {
  415. uni.navigateTo({
  416. url: './join/join'
  417. });
  418. },
  419. establish: function() {
  420. uni.navigateTo({
  421. url: './establish/establish'
  422. });
  423. },
  424. personal: function() {
  425. uni.navigateTo({
  426. url: './personal/personal'
  427. });
  428. },
  429. loginurl: function() {
  430. uni.navigateTo({
  431. url: '/pages/login/login'
  432. });
  433. },
  434. rtBubble() {
  435. this.$refs.rtBubble.toggle();
  436. },
  437. topBubble() {
  438. this.show = !this.show;
  439. },
  440. navigateTo(url) {
  441. uni.navigateTo({
  442. url: url
  443. });
  444. },
  445. like(index) {
  446. if (this.posts[index].islike === 0) {
  447. this.posts[index].islike = 1;
  448. this.posts[index].like.push({
  449. "uid": this.user_id,
  450. "username": "," + this.username
  451. });
  452. } else {
  453. this.posts[index].islike = 0;
  454. this.posts[index].like.splice(this.posts[index].like.indexOf({
  455. "uid": this.user_id,
  456. "username": "," + this.username
  457. }), 1);
  458. }
  459. },
  460. comment(index) {
  461. this.showInput = true; //调起input框
  462. this.focus = true;
  463. this.index = index;
  464. },
  465. adjust() { //当弹出软键盘发生评论动作时,调整页面位置pageScrollTo
  466. return;
  467. uni.createSelectorQuery().selectViewport().scrollOffset(res => {
  468. var scrollTop = res.scrollTop;
  469. let view = uni.createSelectorQuery().select("#post-" + this.index);
  470. view.boundingClientRect(data => {
  471. console.log("data:" + JSON.stringify(data));
  472. console.log("手机屏幕高度:" + this.screenHeight);
  473. console.log("竖直滚动位置" + scrollTop);
  474. console.log("节点离页面顶部的距离为" + data.top);
  475. console.log("节点高度为" + data.height);
  476. console.log("窗口高度为" + this.windowHeight);
  477. uni.pageScrollTo({
  478. scrollTop: scrollTop - (this.windowHeight - (data.height + data.top + 45)), //一顿乱算
  479. // scrollTop: 50,
  480. duration: 300
  481. });
  482. }).exec();
  483. }).exec();
  484. },
  485. reply(index, comment_index) {
  486. this.is_reply = true; //回复中
  487. this.showInput = true; //调起input框
  488. let replyTo = this.posts[index].comments.comment[comment_index].username;
  489. this.input_placeholder = '回复' + replyTo;
  490. this.index = index; //post索引
  491. this.comment_index = comment_index; //评论索引
  492. this.focus = true;
  493. },
  494. blur: function() {
  495. this.init_input();
  496. },
  497. send_comment: function(message) {
  498. if (this.is_reply) {
  499. var reply_username = this.posts[this.index].comments.comment[this.comment_index].username;
  500. var comment_content = '回复' + reply_username + ':' + message.content;
  501. } else {
  502. var comment_content = message.content;
  503. }
  504. this.posts[this.index].comments.total += 1;
  505. this.posts[this.index].comments.comment.push({
  506. "uid": this.user_id,
  507. "username": this.username,
  508. "content": comment_content //直接获取input中的值
  509. });
  510. this.init_input();
  511. },
  512. init_input() {
  513. this.showInput = false;
  514. this.focus = false;
  515. this.input_placeholder = '评论';
  516. this.is_reply = false;
  517. },
  518. previewImage(imageList, image_index) {
  519. var current = imageList[image_index];
  520. uni.previewImage({
  521. current: current,
  522. urls: imageList
  523. });
  524. },
  525. goPublish() {
  526. uni.navigateTo({
  527. url: './publish/publish',
  528. success: res => {},
  529. fail: () => {},
  530. complete: () => {}
  531. });
  532. },
  533. ...mapMutations(['login']),
  534. guideToLogin() {
  535. uni.showModal({
  536. title: '未登录',
  537. content: '您未登录,需要登录后才能继续',
  538. /**
  539. * 如果需要强制登录,不显示取消按钮
  540. */
  541. showCancel: !this.forcedLogin,
  542. success: (res) => {
  543. if (res.confirm) {
  544. /**
  545. * 如果需要强制登录,使用reLaunch方式
  546. */
  547. if (this.forcedLogin) {
  548. uni.reLaunch({
  549. url: '../login/login'
  550. });
  551. } else {
  552. uni.navigateTo({
  553. url: '../login/login'
  554. });
  555. }
  556. }
  557. }
  558. });
  559. }
  560. }
  561. }
  562. </script>
  563. <style>
  564. @import url("../../common/index/index.css");
  565. @import '@/static/style/thorui.css';
  566. .tui-modal-input {
  567. width: 80%;
  568. border-bottom: 1rpx solid #e6e6e6;
  569. margin: 30rpx auto 50rpx;
  570. padding-bottom: 20rpx;
  571. font-size: 32rpx;
  572. }
  573. .fold{
  574. height: 120rpx;
  575. overflow: hidden;
  576. padding: 20rpx 20rpx 0px 20rpx;
  577. }
  578. .unfold{height: auto;
  579. overflow: hidden;
  580. padding: 20rpx 20rpx 0px 20rpx;}
  581. .hello {
  582. display: flex;
  583. flex: 1;
  584. flex-direction: column;
  585. width: 100%;
  586. }
  587. .uni-loadmore{
  588. height:80rpx;
  589. line-height:80rpx;
  590. text-align:center;
  591. padding-bottom:30rpx;
  592. }
  593. .tui-subsection {
  594. width: 50%;
  595. display: flex;
  596. align-items: center;
  597. justify-content: center;
  598. margin: 80rpx auto 20rpx;
  599. border-radius: 10rpx;
  600. overflow: hidden;
  601. transform: translateZ(0);
  602. border: 0;
  603. position: relative;
  604. border: 1rpx solid #5677fc;
  605. }
  606. .tui-subsection-item {
  607. position: relative;
  608. z-index: 10;
  609. }
  610. .tui-subsection view {
  611. flex: 1;
  612. font-size: 28rpx;
  613. text-align: center;
  614. padding: 10rpx 30rpx;
  615. color: #5677fc;
  616. position: relative;
  617. border-right: 1rpx solid #5677fc;
  618. }
  619. .tui-last-child {
  620. border-right: 0 !important;
  621. }
  622. .tui-subsection .tui-active {
  623. background-color: #5677fc;
  624. color: #fff;
  625. }
  626. .title {
  627. color: #8f8f94;
  628. margin-top: 210rpx;
  629. }
  630. .ul {
  631. font-size: 11rpx;
  632. color: #8f8f94;
  633. margin-top: 210rpx;
  634. width: 100%;
  635. }
  636. .ul>view {
  637. line-height: 50rpx;
  638. }
  639. .sub-title {
  640. font-size: 24rpx;
  641. color: #7a7a7a;
  642. padding-top: 18rpx;
  643. }
  644. .tui-title {
  645. width: 100%;
  646. box-sizing: border-box;
  647. font-weight: bold;
  648. }
  649. .tui-btn-box {
  650. width: 100%;
  651. padding: 0rpx 30rpx;
  652. box-sizing: border-box;
  653. position: relative;
  654. }
  655. .tui-chat-item {
  656. width: 100%;
  657. padding: 30rpx 30rpx 0 30rpx;
  658. box-sizing: border-box;
  659. display: flex;
  660. position: relative;
  661. }
  662. .tui-chat-box {
  663. max-width: 70%;
  664. }
  665. .tui-user-name {
  666. font-size: 24rpx;
  667. color: #999;
  668. }
  669. .tui-chat-text {
  670. width: 100%;
  671. min-width: 40rpx;
  672. padding: 18rpx 24rpx;
  673. display: flex;
  674. align-items: center;
  675. flex-wrap: wrap;
  676. word-break: break-all;
  677. box-sizing: border-box;
  678. }
  679. .tui-user-avatar {
  680. width: 84rpx;
  681. height: 84rpx;
  682. border-radius: 50%;
  683. flex-shrink: 0;
  684. }
  685. .tui-mr {
  686. margin-right: 24rpx;
  687. }
  688. .tui-ml {
  689. margin-left: 24rpx;
  690. }
  691. .tui-flex-end {
  692. justify-content: flex-end;
  693. }
  694. .tui-chat-text {
  695. width: 100%;
  696. min-width: 40rpx;
  697. padding: 18rpx 24rpx;
  698. display: flex;
  699. align-items: center;
  700. flex-wrap: wrap;
  701. word-break: break-all;
  702. color: #fff;
  703. box-sizing: border-box;
  704. }
  705. .tui-menu-item {
  706. width: 100%;
  707. padding: 30rpx 20rpx;
  708. box-sizing: border-box;
  709. }
  710. </style>