more.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208
  1. <template>
  2. <view class="page">
  3. <view class="title" v-if="data.type == 0">
  4. <view class="title-msg">
  5. <view class="title_val">会话成员</view>
  6. <view class="title_num">共{{data.member.length}}人</view>
  7. </view>
  8. <view class="title-img">
  9. <uni-icons :size="22" class="uni-icon-wrapper" color="#c9c9cb" type="arrowright" />
  10. </view>
  11. </view>
  12. <view class="photos" v-if="data.type == 0">
  13. <view class="photo_main" v-for="(val,index) of data.member" :key="index" @tap="goDetails(val.user_id)">
  14. <image class="photo" :src="photo(val.photo+'')" :lazy-load="true" style="border-radius: 10px;"
  15. :data-index="index" @erro="imageError" />
  16. <view class="name_class">{{val.show_name}}</view>
  17. </view>
  18. <view class="photo_main" @tap="add" v-if="data.type">
  19. <image class="photo" :src="'../../../static/theme/default/chat/add.png'" :lazy-load="true" />
  20. <view class="name_class msg-size">邀 请</view>
  21. </view>
  22. <view class="photo_main" @tap="reduce" v-if="data.is_action && data.type">
  23. <image class="photo" :src="'../../../static/theme/default/chat/reduce.png'" :lazy-load="true" />
  24. <view class="name_class msg-size">移 除</view>
  25. </view>
  26. </view>
  27. <view class="uni-card" v-if="data.type == 1">
  28. <view class="chatgroup-box">
  29. <view class="chatgroup-top" @tap="goSetGroupPhoto">
  30. <!-- <view class="chatgroup-avatar-group">
  31. <image :class="'chatgroup-avatar-item-' + data.member.length"
  32. v-for="(item,index) in data.member" :key="index" :src="photo(item.photo)" :lazy-load="true">
  33. </image>
  34. </view> -->
  35. <!-- <view class="chatgroup-title" @click.stop="goSet('name')">
  36. <text v-for="(item,index) in data.member" :key="index">{{item.show_name}}
  37. <block v-if="index < data.member.length - 1">、</block>
  38. </text>
  39. </view> -->
  40. <image class="chatgroup-avatar" :src="photo(data.group.is_photo+'')" :lazy-load="true"></image>
  41. <view class="chatgroup-title" @click.stop="goSet('name')">
  42. <text>{{data.group.name}}</text>
  43. </view>
  44. </view>
  45. <view class="chatgroup-center">
  46. <view class="chatgroup-tag">
  47. <image src="/static/group/safe.png" mode=""></image>
  48. <text>消息通道通过端对端加密</text>
  49. </view>
  50. </view>
  51. <view class="chatgroup-list">
  52. <view class="chatgroup-item" @tap="goSet('notice')">
  53. <image src="/static/group/1.png" mode=""></image>
  54. <text>群公告</text>
  55. </view>
  56. <!-- <view class="chatgroup-item">
  57. <image src="/static/group/2.png" mode=""></image>
  58. <text>图片</text>
  59. </view>
  60. <view class="chatgroup-item">
  61. <image src="/static/group/3.png" mode=""></image>
  62. <text>搜索</text>
  63. </view> -->
  64. <view class="chatgroup-item" @tap="manarger('notice')">
  65. <image src="/static/group/4.png" mode=""></image>
  66. <text>管理</text>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="list-member-count"></view>
  71. <view class="uni-list">
  72. <view class="uni-list-cell" @click="toMember">
  73. <view class="uni-list-cell-navigate uni-navigate-right">
  74. <view>
  75. <text class="msg-size">群成员</text>
  76. <view class="show_text msg-size">{{data.member.length}}</view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="group-member-list">
  81. <image class="group-member-item" :src="photo(val.photo+'')" v-for="(val,index) of data.member"
  82. :key="index" :data-index="index" @erro="imageError"></image>
  83. <view class="group-member-btn" @tap="add">
  84. +
  85. </view>
  86. <view class="group-member-btn" @tap="reduce">
  87. -
  88. </view>
  89. </view>
  90. <view class="uni-list-cell" style="height: 80px!important;" @tap="goGroupQrcode">
  91. <view class="uni-media-list uni-list-cell-navigate uni-navigate-right">
  92. <view class="group-tips">
  93. <text class="msg-size">分享群</text>
  94. <text class="" style="color: #8f8f94;">分享群二维码</text>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="list-member-count"></view>
  99. <view class="uni-list-cell" @tap="groupNickname(data.my_nickname)">
  100. <view class="uni-media-list uni-list-cell-navigate uni-navigate-right">
  101. <text class="msg-size">我在本群的昵称</text>
  102. <view class="uni-media-list-logo qun-id">
  103. <view class="show_text msg-size">{{data.my_nickname}}</view>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="uni-list-cell" @tap="goSet('name')">
  108. <view class="uni-list-cell-navigate uni-navigate-right">
  109. <view>
  110. <text class="msg-size">群聊昵称</text>
  111. <view class="msg-size show_text">{{data.group.name}}</view>
  112. </view>
  113. </view>
  114. </view>
  115. <view class="uni-list-cell" @tap="groupCopy">
  116. <view class="uni-list-cell-navigate uni-navigate-right noarrow">
  117. <view>
  118. <text class="msg-size">群ID(点击复制)</text>
  119. <view class="msg-size show_text">{{data.group.list_id + ''}}</view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="list-member-count">
  124. </view>
  125. <view class="uni-list-cell" @tap="goBigRedList">
  126. <view class="uni-media-list uni-list-cell-navigate uni-navigate-right">
  127. <text class="msg-size">长时间未领取红包</text>
  128. <view class="uni-media-list-logo photo_qrcode">
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="switch_class">
  135. <view class="uni-list">
  136. <view class="uni-list-cell uni-list-cell-pd">
  137. <view class="uni-list-cell-db msg-size">置顶聊天</view>
  138. <switch :checked="!!data.top" @change="msgTop" />
  139. </view>
  140. <view class="uni-list-cell uni-list-cell-pd">
  141. <view class="uni-list-cell-db msg-size">消息免打扰</view>
  142. <switch :checked="!!data.is_disturb" @change="disturb" />
  143. </view>
  144. <view v-if="data.type == 1" class="uni-list-cell" @click="clearLog(3,'确定要清空我的聊天记录吗?')">
  145. <view class="uni-list-cell-navigate uni-navigate-right">
  146. <view class="qun-gonggao">
  147. <text class="msg-size">清空我的聊天记录</text>
  148. <view class="show_text_ msg-size"></view>
  149. </view>
  150. </view>
  151. </view>
  152. <view v-if="data.type == 1" class="uni-list-cell" @click="clearLog(2,'确定要清空所有聊天记录吗?')">
  153. <view class="uni-list-cell-navigate uni-navigate-right">
  154. <view class="qun-gonggao">
  155. <text class="msg-size">清空聊天记录</text>
  156. <view class="show_text_ msg-size"></view>
  157. </view>
  158. </view>
  159. </view>
  160. <view v-if="data.type == 0" class="uni-list-cell" @click="clearLog(1,'确定要清空所有聊天记录吗?')">
  161. <view class="uni-list-cell-navigate uni-navigate-right">
  162. <view class="qun-gonggao">
  163. <text class="msg-size">清空聊天记录</text>
  164. <view class="show_text_ msg-size"></view>
  165. </view>
  166. </view>
  167. </view>
  168. <view v-if="data.type == 0" class="uni-list-cell" @click="clearLog(2,'确定要一键销毁双方聊天记录吗')">
  169. <view class="uni-list-cell-navigate uni-navigate-right">
  170. <view class="qun-gonggao">
  171. <text class="msg-size">一键销毁双方记录</text>
  172. <view class="show_text_ msg-size"></view>
  173. </view>
  174. </view>
  175. </view>
  176. <!--<view class="uni-list-cell" v-if="data.type == 0" @tap="xiaoHui">-->
  177. <!--<view class="uni-list-cell-navigate uni-navigate-right">-->
  178. <!--<view class="qun-gonggao">-->
  179. <!--<text class="msg-size">一键销毁双方记录</text>-->
  180. <!--<view class="show_text_ msg-size"></view>-->
  181. <!--</view>-->
  182. <!--</view>-->
  183. <!--</view>-->
  184. <view class="uni-list-cell" v-if="user_id != 5800" @tap="goKefu">
  185. <view class="uni-list-cell-navigate uni-navigate-right">
  186. <view class="qun-gonggao">
  187. <text class="msg-size">举报</text>
  188. <view class="show_text_ msg-size"></view>
  189. </view>
  190. </view>
  191. </view>
  192. <view class="uni-list-cell">
  193. <view class="uni-list-cell-navigate my-padding">
  194. <view class="qun-gonggao">
  195. <text class="msg-size">IP</text>
  196. <view class="show_text_ msg-size">
  197. {{data.ip}}
  198. </view>
  199. </view>
  200. </view>
  201. </view>
  202. <view class="uni-list-cell uni-list-cell-pd" v-if="0">
  203. <view class="uni-list-cell-db msg-size">强提醒</view>
  204. <switch />
  205. </view>
  206. </view>
  207. </view>
  208. <view class="list-member-count">
  209. </view>
  210. <view class="del-btn" v-if="data.type == 1" @tap="leaveGroup">删除并退出</view>
  211. <!-- <view class="doButton" v-show="!data.is_action && data.type == 1">
  212. <button class="group-button" type="button" @tap="liveGroup">离开群聊</button>
  213. </view> -->
  214. </view>
  215. </template>
  216. <script>
  217. import _hook from '../../../common/_hook';
  218. import _data from '../../../common/_data';
  219. import _get from '../../../common/_get';
  220. import _mixins from '../../../common/_mixins';
  221. import _page from '../../../common/common';
  222. export default {
  223. data() {
  224. return {
  225. data: {
  226. member: [],
  227. group: {
  228. is_photo: 'default_group_photo/90.jpg',
  229. },
  230. is_action: 0,
  231. type: 1,
  232. },
  233. list_id: 0,
  234. user_id: 0
  235. };
  236. },
  237. computed: {
  238. staticPhoto() {
  239. return _data.staticPhoto();
  240. },
  241. isAction() {
  242. if (this.data.group.main_id == _data.data('user_info').id) {
  243. return true;
  244. }
  245. return false;
  246. },
  247. showKefu() {
  248. return this.my_data.id != 5880
  249. }
  250. },
  251. onShow() {
  252. this.initData();
  253. },
  254. methods: {
  255. initData() {
  256. _hook.routeSonHook();
  257. let _this = this;
  258. _this.$httpSend({
  259. path: '/im/message/getChatDetails',
  260. data: {
  261. list_id: _this.list_id,
  262. },
  263. success(data) {
  264. _this.data = data;
  265. if (data.type == 1) {
  266. uni.setNavigationBarTitle({
  267. title: data.group.name,
  268. });
  269. }
  270. let cache_data = _data.data('cache');
  271. if (data.type == 1 && !('group_photo_' + _this.list_id in cache_data)) {
  272. uni.downloadFile({
  273. url: _data.staticPhoto() + data.group.is_photo,
  274. success: (res) => {
  275. if (res.statusCode === 200) {
  276. cache_data['group_photo_' + _this.list_id] = res.tempFilePath;
  277. _data.data('cache', cache_data);
  278. }
  279. }
  280. });
  281. }
  282. }
  283. });
  284. },
  285. // 删除退出群聊
  286. leaveGroup() {
  287. let _this = this;
  288. uni.showModal({
  289. title: '重要提示',
  290. content: '确定要删除并退出吗?',
  291. confirmText: '确认',
  292. cancelText: '取消',
  293. confirmColor: 'red',
  294. cancelColor: '#353535',
  295. success: function(res) {
  296. if (res.confirm) {
  297. _this.$httpSend({
  298. path: '/im/remove/sign_out',
  299. data: {
  300. list_id: _this.list_id,
  301. },
  302. success: function(data) {
  303. if (data.code == 0) {
  304. uni.showToast({
  305. icon: 'none',
  306. title: '退出成功'
  307. })
  308. _data.localData('chat_list', []);
  309. _data.localData(_this.list_id, null);
  310. uni.switchTab({
  311. url: '/pages/chat/index'
  312. })
  313. } else {
  314. uni.showToast({
  315. icon: 'none',
  316. title: data.msg
  317. })
  318. }
  319. }
  320. })
  321. }
  322. },
  323. })
  324. },
  325. // 清除聊天我的
  326. clearLog(type, msg) {
  327. let _this = this;
  328. uni.showModal({
  329. title: '重要提示',
  330. content: msg,
  331. confirmText: '确认',
  332. cancelText: '取消',
  333. confirmColor: 'red',
  334. cancelColor: '#353535',
  335. success: function(res) {
  336. if (res.confirm) {
  337. _this.$httpSend({
  338. path: '/im/remove/del_log',
  339. data: {
  340. list_id: _this.list_id,
  341. type: type
  342. },
  343. success: function(data) {
  344. uni.showToast({
  345. icon: 'none',
  346. title: '清除成功'
  347. })
  348. _data.localData(_this.list_id, null);
  349. _this.initData();
  350. }
  351. })
  352. }
  353. },
  354. })
  355. },
  356. toMember() {
  357. uni.navigateTo({
  358. url: './group_member?list_id=' + this.list_id
  359. })
  360. },
  361. reduce() {
  362. uni.navigateTo({
  363. url: ('./reduce?list_id=' + this.list_id),
  364. animationType: 'slide-in-bottom',
  365. });
  366. },
  367. goKefu() {
  368. this.$httpSend({
  369. path: '/im/get/kefu',
  370. success(data) {
  371. console.log('客服数据', data)
  372. uni.navigateTo({
  373. 'url': '/pages/chat/message?list_id=' + data
  374. })
  375. }
  376. });
  377. },
  378. groupNickname(val) {
  379. console.log(val)
  380. uni.navigateTo({
  381. url: 'group_nickname?' + _page.pageParam({
  382. list_id: this.list_id,
  383. nickname: val
  384. })
  385. })
  386. },
  387. disturb(e) {
  388. //消息免打扰
  389. let value = e.detail.value ? 1 : 0;
  390. let _this = this;
  391. this.$httpSend({
  392. path: '/im/message/msgDisturb',
  393. data: {
  394. list_id: this.list_id,
  395. value: value
  396. },
  397. success(data) {
  398. _data.localData('DISTURB:' + _this.list_id, value)
  399. }
  400. });
  401. },
  402. liveGroup() {
  403. //离开群聊
  404. let _this = this;
  405. uni.showModal({
  406. title: '重要提示',
  407. content: '确定要离开群聊吗?',
  408. confirmText: '离开',
  409. cancelText: '再看看',
  410. confirmColor: 'red',
  411. cancelColor: '#353535',
  412. success: function(res) {
  413. if (res.confirm) {
  414. _this.$httpSend({
  415. path: '/im/message/liveGroup',
  416. data: {
  417. list_id: _this.list_id
  418. },
  419. success(data) {
  420. console.log(data)
  421. uni.switchTab({
  422. url: '../index'
  423. });
  424. }
  425. });
  426. }
  427. }
  428. });
  429. },
  430. imageError(e) {
  431. console.log("图片加载失败!", e.detail);
  432. let index = e.currentTarget.dataset.index
  433. console.log(e.currentTarget.dataset.index)
  434. //替换index对应的图片
  435. console.log(this.data.member[index].photo)
  436. this.data.member[index].photo = '/default_photo_path.png';
  437. },
  438. removeGroup() {
  439. let _this = this;
  440. uni.showModal({
  441. title: '重要提示',
  442. content: '此操作数据不可恢复,确定要解散该群吗?',
  443. confirmText: '不解散',
  444. cancelText: '解散',
  445. confirmColor: '#353535',
  446. cancelColor: 'red',
  447. success: function(res) {
  448. if (!res.confirm) {
  449. _this.$httpSend({
  450. path: '/im/message/removeGroup',
  451. data: {
  452. list_id: _this.list_id,
  453. },
  454. success(data) {
  455. uni.switchTab({
  456. url: '../index'
  457. });
  458. }
  459. });
  460. }
  461. }
  462. });
  463. },
  464. photo(path) {
  465. return this.staticPhoto + path + '?_=' + Math.random();
  466. },
  467. msgChange(e) {
  468. let value = e.detail.value ? 1 : 0;
  469. if (this.data.is_action != 2) {
  470. uni.showModal({
  471. content: '没有权限设置',
  472. showCancel: false,
  473. });
  474. return;
  475. }
  476. this.$httpSend({
  477. path: '/im/message/groupIsMsg',
  478. data: {
  479. list_id: this.list_id,
  480. value,
  481. },
  482. success(data) {
  483. return;
  484. uni.showToast({
  485. title: '设置成功',
  486. duration: 1500
  487. });
  488. }
  489. });
  490. },
  491. nimingChange(e) {
  492. let value = e.detail.value ? 1 : 0;
  493. if (!this.data.is_action && this.data.is_action != 2) {
  494. uni.showModal({
  495. content: '没有权限设置',
  496. showCancel: false,
  497. });
  498. return;
  499. }
  500. this.$httpSend({
  501. path: '/im/message/nimingChange',
  502. data: {
  503. list_id: this.list_id,
  504. value,
  505. },
  506. success(data) {
  507. return;
  508. uni.showToast({
  509. title: '设置成功',
  510. duration: 1500
  511. });
  512. }
  513. });
  514. },
  515. msgTop(e) {
  516. let _this = this,
  517. value = e.detail.value ? 1 : 0;
  518. this.$httpSend({
  519. path: '/im/message/chatTop',
  520. data: {
  521. list_id: this.list_id,
  522. value,
  523. },
  524. success(data) {
  525. /** 更新对话列表数据 */
  526. for (let i = 0, local_chat_list = _data.localData('chat_list'), j = local_chat_list
  527. .length; i < j; i++) {
  528. if (local_chat_list[i].list_id == _this.list_id) {
  529. let action_list_data = local_chat_list[i];
  530. local_chat_list.splice(i, 1);
  531. local_chat_list.unshift(action_list_data);
  532. _data.localData('chat_list', local_chat_list);
  533. uni.$emit('data_chat_list', local_chat_list);
  534. break;
  535. }
  536. }
  537. return;
  538. uni.showToast({
  539. title: '设置成功',
  540. duration: 1500
  541. });
  542. }
  543. });
  544. },
  545. switch1Change(e) {
  546. let _this = this,
  547. value = e.detail.value ? 1 : 0;
  548. this.$httpSend({
  549. path: '/im/message/speekChecked',
  550. data: {
  551. list_id: this.list_id,
  552. value: value,
  553. },
  554. success(data) {
  555. /** 更新对话列表数据 */
  556. for (let i = 0, local_chat_list = _data.localData('chat_list'), j = local_chat_list
  557. .length; i < j; i++) {
  558. if (local_chat_list[i].list_id == _this.list_id) {
  559. let action_list_data = local_chat_list[i];
  560. local_chat_list.splice(i, 1);
  561. local_chat_list.unshift(action_list_data);
  562. _data.localData('chat_list', local_chat_list);
  563. uni.$emit('data_chat_list', local_chat_list);
  564. break;
  565. }
  566. }
  567. }
  568. });
  569. },
  570. editChange(e) {
  571. let _this = this,
  572. value = e.detail.value ? 1 : 0;
  573. this.$httpSend({
  574. path: '/im/vendor/editChange',
  575. data: {
  576. list_id: this.list_id,
  577. value: value,
  578. },
  579. success(data) {
  580. }
  581. });
  582. },
  583. goGroupQrcode() {
  584. uni.navigateTo({
  585. url: ('./group_qrcode?list_id=' + this.list_id),
  586. animationType: 'slide-in-bottom',
  587. });
  588. },
  589. goSetGroupPhoto() {
  590. if (this.data.is_action != 2 && !this.data.group.edit_photo) {
  591. uni.showToast({
  592. title: '没有权限设置',
  593. icon: 'none',
  594. duration: 1000
  595. });
  596. return;
  597. }
  598. uni.navigateTo({
  599. url: ('../../set/group_photo?list_id=' + this.list_id),
  600. animationType: 'slide-in-bottom',
  601. });
  602. },
  603. goSetAdmin(type) {
  604. switch (type) {
  605. case 1:
  606. if (this.data.is_action != 2) {
  607. console.log("this.data.is_action", this.data.is_action)
  608. uni.showToast({
  609. title: '群主才能设置',
  610. icon: 'none',
  611. duration: 1000
  612. });
  613. return;
  614. }
  615. break;
  616. case 2:
  617. if (this.data.is_action != 2) {
  618. uni.showModal({
  619. content: '没有权限设置',
  620. showCancel: false,
  621. });
  622. return;
  623. }
  624. break;
  625. case 3:
  626. if (this.data.is_action != 2) {
  627. uni.showModal({
  628. content: '没有权限设置',
  629. showCancel: false,
  630. });
  631. return;
  632. }
  633. break;
  634. case 4:
  635. if (this.data.is_action != 2) {
  636. uni.showModal({
  637. content: '没有权限设置',
  638. showCancel: false,
  639. });
  640. return;
  641. }
  642. break;
  643. default:
  644. return;
  645. break;
  646. }
  647. let url = '../../set/group_admin?list_id=' + this.list_id + '&type=' + type;
  648. if (type == 3) url = '../../set/group_trans?list_id=' + this.list_id + '&type=' + type;
  649. if (type == 4) url = '../../set/copy_group?list_id=' + this.list_id + '&type=' + type;
  650. uni.navigateTo({
  651. url: url,
  652. animationType: 'slide-in-bottom',
  653. });
  654. },
  655. goSet(type) {
  656. if (this.data.is_action != 2 && !this.data.group.edit_photo) {
  657. uni.showToast({
  658. title: '没有权限设置',
  659. icon: 'none',
  660. duration: 1000
  661. });
  662. return;
  663. }
  664. uni.navigateTo({
  665. url: ('../../set/message_more?list_id=' + this.list_id + '&type=' + type),
  666. animationType: 'slide-in-bottom',
  667. });
  668. },
  669. goDetails(user_id) {
  670. if (this.data.type && this.data.is_action != 2) {
  671. uni.showToast({
  672. title: '没有权限查看',
  673. icon: 'none',
  674. duration: 1000
  675. });
  676. return;
  677. }
  678. uni.navigateTo({
  679. url: ('../../details/index?user_id=' + user_id + '&type=' + this.data.type + '&list_id=' + this
  680. .list_id + "&is_action=" + this.data.is_action),
  681. });
  682. },
  683. add() {
  684. if (this.data.is_action != 2) {
  685. uni.showModal({
  686. content: '没有权限设置',
  687. showCancel: false,
  688. });
  689. return;
  690. }
  691. uni.navigateTo({
  692. url: ('../../friend/index_list?list_id=' + this.list_id),
  693. animationType: 'slide-in-bottom',
  694. });
  695. },
  696. reduce() {
  697. if (this.data.is_action != 2) {
  698. uni.showModal({
  699. content: '没有权限设置',
  700. showCancel: false,
  701. });
  702. return;
  703. }
  704. uni.navigateTo({
  705. url: ('./reduce?list_id=' + this.list_id),
  706. animationType: 'slide-in-bottom',
  707. });
  708. },
  709. groupCopy(value) {
  710. _page.uniCopy({
  711. content: this.data.group.list_id,
  712. success: function() {
  713. uni.showToast({
  714. 'title': '复制成功',
  715. duration: 2000
  716. })
  717. }
  718. })
  719. },
  720. replaceStr(str) {
  721. console.log(str)
  722. return str.substr(10)
  723. },
  724. getRedChange(e) {
  725. let _this = this,
  726. value = e.detail.value ? 1 : 0;
  727. this.$httpSend({
  728. path: '/im/vendor/getRedChange',
  729. data: {
  730. list_id: this.list_id,
  731. value: value,
  732. },
  733. success(data) {
  734. }
  735. });
  736. },
  737. goBigRedList() { //todo 长时间未领取红包列表
  738. uni.navigateTo({
  739. url: "../message/red_list?list_id=" + this.list_id
  740. })
  741. },
  742. manarger() {
  743. uni.navigateTo({
  744. url: '../message/qun_manage?list_id=' + this.list_id
  745. })
  746. },
  747. xiaoHui() { //销毁聊天记录
  748. _get.xiaoHui({
  749. type: this.data.type,
  750. list_id: this.list_id
  751. }, function() {
  752. })
  753. }
  754. },
  755. onLoad(option) {
  756. this.list_id = option.list_id;
  757. this.data.type = option.type;
  758. },
  759. }
  760. </script>
  761. <style lang="scss">
  762. .noarrow::after {
  763. content: "";
  764. display: none !important;
  765. }
  766. .uni-card {
  767. margin: 0;
  768. }
  769. .del-btn {
  770. background: #fff;
  771. height: 100rpx;
  772. display: flex;
  773. justify-content: center;
  774. align-items: center;
  775. color: #c5474d;
  776. font-size: 30rpx;
  777. }
  778. .group-tips {
  779. display: flex;
  780. flex-direction: column;
  781. height: 100rpx;
  782. }
  783. .group-member-list::after {
  784. position: absolute;
  785. z-index: 3;
  786. right: 0;
  787. bottom: 0;
  788. left: 10px;
  789. height: 1px;
  790. content: '';
  791. -webkit-transform: scaleY(.5);
  792. transform: scaleY(.5);
  793. background-color: #e7e6ef;
  794. }
  795. .group-member-list {
  796. display: flex;
  797. flex-wrap: wrap;
  798. position: relative;
  799. .group-member-item {
  800. width: 80rpx;
  801. height: 80rpx;
  802. border-radius: 50%;
  803. margin: 32rpx;
  804. }
  805. .group-member-btn {
  806. width: 80rpx;
  807. height: 80rpx;
  808. border-radius: 50%;
  809. background: #efefef;
  810. margin: 32rpx;
  811. display: flex;
  812. justify-content: center;
  813. align-items: center;
  814. font-size: 40rpx;
  815. color: #b6b6b8;
  816. font-weight: bold;
  817. }
  818. }
  819. .chatgroup-box {
  820. display: flex;
  821. flex-direction: column;
  822. .chatgroup-center {
  823. display: flex;
  824. justify-content: center;
  825. align-items: center;
  826. .chatgroup-tag {
  827. display: flex;
  828. justify-content: center;
  829. align-items: center;
  830. height: 40rpx;
  831. background-color: #f7f7f7;
  832. border-radius: 20rpx;
  833. box-sizing: border-box;
  834. padding: 0 10rpx;
  835. image {
  836. width: 30rpx;
  837. height: 30rpx;
  838. }
  839. text {
  840. font-size: 24rpx;
  841. color: #ccc;
  842. }
  843. }
  844. }
  845. .chatgroup-top {
  846. display: flex;
  847. align-items: center;
  848. justify-content: center;
  849. box-sizing: border-box;
  850. padding: 10rpx 40rpx;
  851. position: relative;
  852. .chatgroup-avatar-group {
  853. display: flex;
  854. flex-wrap: wrap;
  855. width: 200rpx;
  856. height: 200rpx;
  857. border-radius: 50%;
  858. overflow: hidden;
  859. margin-right: 20rpx;
  860. box-sizing: border-box;
  861. padding: 20rpx 10rpx;
  862. justify-content: center;
  863. align-items: center;
  864. .chatgroup-avatar-item-0 {
  865. width: 100rpx;
  866. height: 100rpx;
  867. border-radius: 50%;
  868. }
  869. .chatgroup-avatar-item-1 {
  870. width: 100rpx;
  871. height: 100rpx;
  872. border-radius: 50%;
  873. }
  874. .chatgroup-avatar-item-2 {
  875. width: 90rpx;
  876. height: 90rpx;
  877. border-radius: 50%;
  878. }
  879. .chatgroup-avatar-item-3 {
  880. width: 90rpx;
  881. height: 90rpx;
  882. border-radius: 50%;
  883. }
  884. .chatgroup-avatar-item-4 {
  885. width: 80rpx;
  886. height: 80rpx;
  887. border-radius: 50%;
  888. }
  889. .chatgroup-avatar-item-5 {
  890. width: 60rpx;
  891. height: 60rpx;
  892. border-radius: 50%;
  893. }
  894. .chatgroup-avatar-item-6 {
  895. width: 60rpx;
  896. height: 60rpx;
  897. border-radius: 50%;
  898. }
  899. }
  900. .chatgroup-avatar {
  901. width: 150rpx;
  902. height: 150rpx;
  903. border-radius: 10rpx;
  904. margin-right: 20rpx;
  905. }
  906. .chatgroup-title {
  907. flex: 1;
  908. font-size: 40rpx;
  909. font-weight: bold;
  910. width: 400rpx; //固定宽度
  911. display: -webkit-box;
  912. -webkit-box-orient: vertical;
  913. -webkit-line-clamp: 2;
  914. overflow: hidden;
  915. }
  916. }
  917. .chatgroup-top:after {
  918. font-family: uniicons;
  919. content: '\e583';
  920. position: absolute;
  921. right: 12px;
  922. top: 50%;
  923. transform: translateY(-50%);
  924. color: #bbb;
  925. font-size: 40rpx;
  926. }
  927. .chatgroup-list {
  928. display: flex;
  929. justify-content: space-around;
  930. align-items: center;
  931. height: 200rpx;
  932. .chatgroup-item {
  933. display: flex;
  934. flex-direction: column;
  935. align-items: center;
  936. justify-content: center;
  937. image {
  938. width: 60rpx;
  939. height: 60rpx;
  940. }
  941. text {
  942. margin-top: 10rpx;
  943. font-size: 24rpx;
  944. color: #ccc;
  945. }
  946. }
  947. }
  948. }
  949. .my-padding {
  950. padding-right: 0 !important;
  951. }
  952. .page {
  953. max-width: 100%;
  954. }
  955. .photos {
  956. background-color: #FFFFFF;
  957. }
  958. .group-button {
  959. width: 92%;
  960. background-color: #5693ee;
  961. color: white;
  962. height: 70upx;
  963. line-height: 70upx !important;
  964. border-radius: 40upx;
  965. font-size: 36upx;
  966. cursor: pointer;
  967. margin-top: 20upx;
  968. }
  969. .photo_main {
  970. margin: 7upx 0 0 40upx;
  971. display: inline-block;
  972. text-align: center;
  973. }
  974. .qun-gonggao {
  975. display: flex;
  976. justify-content: space-between;
  977. width: 95%;
  978. }
  979. .photo {
  980. width: 106upx;
  981. height: 106upx;
  982. border-radius: 7upx;
  983. }
  984. .name_class {
  985. font-size: 12px;
  986. color: black;
  987. max-width: 106upx;
  988. overflow: hidden;
  989. white-space: nowrap;
  990. }
  991. .msg-size {
  992. font-size: 16px !important;
  993. }
  994. .title {
  995. background: #FFFFFF;
  996. padding: 10px 20px 10px 23px;
  997. border-top: 1px solid #e5e5e5;
  998. display: flex;
  999. justify-content: space-between;
  1000. }
  1001. .title-msg {
  1002. display: flex;
  1003. justify-content: space-between;
  1004. align-items: center;
  1005. width: 90%;
  1006. color: black !important;
  1007. font-size: 16px !important;
  1008. }
  1009. .title-img {
  1010. display: flex;
  1011. align-items: center;
  1012. }
  1013. .title_val {
  1014. display: inline-block;
  1015. }
  1016. .switch_class {
  1017. margin-top: 20upx;
  1018. }
  1019. .show_text {
  1020. position: absolute;
  1021. text-align: right;
  1022. right: 30px;
  1023. color: #8f8f94;
  1024. display: inline-block;
  1025. height: 30px;
  1026. width: 200rpx; //固定宽度
  1027. overflow: hidden;
  1028. text-overflow: ellipsis;
  1029. white-space: nowrap;
  1030. }
  1031. .photo_qrcode {
  1032. width: 52upx;
  1033. height: 52upx;
  1034. margin-right: 0upx;
  1035. }
  1036. .uni-list-cell-navigate.uni-navigate-right:after {
  1037. font-size: 20px !important;
  1038. }
  1039. .uni-list-cell {
  1040. height: 60px !important
  1041. }
  1042. .uni-list-cell-pd {
  1043. padding: 0px 10px 0 12px !important;
  1044. }
  1045. .uni-media-list-logo {
  1046. margin-right: 0px !important;
  1047. }
  1048. .qun-id {
  1049. display: flex;
  1050. justify-content: center;
  1051. align-items: center;
  1052. word-break: break-all;
  1053. }
  1054. .item-left-img {
  1055. display: flex;
  1056. justify-content: center;
  1057. align-items: center;
  1058. padding: 0 10px 0 25px;
  1059. }
  1060. .item-right-img {
  1061. display: flex;
  1062. justify-content: center;
  1063. align-items: center;
  1064. margin-right: 30px;
  1065. }
  1066. .item-right-img image {
  1067. width: 20px;
  1068. height: 20px;
  1069. }
  1070. .item-left-img image {
  1071. width: 45px;
  1072. height: 45px;
  1073. border-radius: 10px;
  1074. }
  1075. .member-list {
  1076. display: flex;
  1077. flex-direction: column;
  1078. background-color: #ffffff;
  1079. }
  1080. .member-item {
  1081. display: flex;
  1082. flex-direction: row;
  1083. justify-content: space-between;
  1084. align-items: center;
  1085. padding: 20rpx;
  1086. border-top: 1px solid #ebebeb;
  1087. }
  1088. .item-left {
  1089. display: flex;
  1090. flex-direction: row;
  1091. justify-content: center;
  1092. align-items: center;
  1093. }
  1094. .item-right {
  1095. display: flex;
  1096. flex-direction: row;
  1097. justify-content: center;
  1098. align-items: center;
  1099. padding: 0 30px 0 20px;
  1100. color: #435d90;
  1101. }
  1102. .yaoqing-menber {
  1103. display: flex;
  1104. align-items: center;
  1105. padding: 10px 0 10px 30px;
  1106. background-color: #ffffff;
  1107. }
  1108. .yaoqing {
  1109. margin-left: 5px;
  1110. }
  1111. .list-member-count {
  1112. padding: 5px 0 5px 30px;
  1113. background-color: #f9f9f9;
  1114. }
  1115. .doButton {
  1116. padding: 10px;
  1117. }
  1118. </style>