chatrecord.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. </head>
  7. <body>
  8. <div class="chat-container">
  9. <div class="right">
  10. <div class="top">
  11. <span>
  12. <span class="name" style="color: #ff180e; margin-right: 10px; ">
  13. <a href="{:url('admin/massager/massager/chatlist')}?ids={$Request.get.massager_id}">返回上一级</a>
  14. </span>
  15. <span id="session_user_name" class="name">一一</span>
  16. <span id="error_warning"></span>
  17. </span>
  18. </div>
  19. <div class="chat active-chat">
  20. <div id="chat_scroll" class="chat_scroll">
  21. {volist name="rows" id="row"}
  22. <div class="bubble {$row.class}">{$row.message}</div>
  23. {/volist}
  24. </div>
  25. </div>
  26. <!-- <div class="fastchat_footer">
  27. <button class="btn btn-success btn-embossed send">发送</button>
  28. </div> -->
  29. </div>
  30. </div>
  31. </body>
  32. <style>
  33. :root {
  34. --white: #fff;
  35. --black: #000;
  36. --bg: #f8f8f8;
  37. --grey: #999;
  38. --dark: #1a1a1a;
  39. --light: #e6e6e6;
  40. --wrapper: 100%;
  41. --blue: #00b0ff;
  42. }
  43. .chat-wrapper {
  44. position: relative;
  45. left: 50%;
  46. width: var(--wrapper);
  47. height: 620px;
  48. transform: translate(-50%, 0);
  49. -webkit-transform: translate(-50%, 0);
  50. }
  51. .chat-container {
  52. position: relative;
  53. top: 50%;
  54. left: 50%;
  55. width: 100%;
  56. height: 100%;
  57. background-color: var(--white);
  58. transform: translate(-50%, -50%);
  59. -webkit-transform: translate(-50%, -50%);
  60. }
  61. .chat-container .left {
  62. position: relative;
  63. float: left;
  64. width: 37%;
  65. height: 100%;
  66. border: 1px solid var(--light);
  67. background-color: var(--white);
  68. }
  69. .chat-container .left .top {
  70. position: relative;
  71. width: 100%;
  72. height: 96px;
  73. padding: 29px 12px;
  74. }
  75. .chat-container .left input {
  76. float: left;
  77. width: 100%;
  78. height: 42px;
  79. padding: 0 15px;
  80. border: 1px solid var(--light);
  81. background-color: #eceff1;
  82. border-radius: 21px;
  83. font-family: 'Source Sans Pro', sans-serif;
  84. font-weight: 400;
  85. }
  86. .chat-container .left input:focus {
  87. outline: none;
  88. }
  89. .chat-container .left a.search {
  90. display: block;
  91. float: left;
  92. width: 42px;
  93. height: 42px;
  94. margin-left: 10px;
  95. border: 1px solid var(--light);
  96. background-color: var(--blue);
  97. background-image: url("../img/name-type.png");
  98. background-repeat: no-repeat;
  99. background-position: top 12px left 14px;
  100. border-radius: 50%;
  101. }
  102. .chat-container .left .people {
  103. margin-left: -1px;
  104. border-right: 1px solid var(--light);
  105. border-left: 1px solid var(--light);
  106. width: calc(100% + 2px);
  107. height: 84%;
  108. overflow-x: hidden;
  109. overflow-y: auto;
  110. }
  111. .chat-container .left .people::-webkit-scrollbar, .chat_scroll::-webkit-scrollbar, .search_users::-webkit-scrollbar {
  112. width: 4px;
  113. }
  114. .chat-container .left .people::-webkit-scrollbar-track, .chat_scroll::-webkit-scrollbar-track, .search_users::-webkit-scrollbar-track {
  115. background-color: #fff;
  116. -webkit-border-radius: 2em;
  117. -moz-border-radius: 2em;
  118. border-radius: 2em;
  119. }
  120. .chat-container .left .people::-webkit-scrollbar-thumb, .chat_scroll::-webkit-scrollbar-thumb {
  121. background-color: #e6e6e6;
  122. -webkit-border-radius: 2em;
  123. -moz-border-radius: 2em;
  124. border-radius: 2em;
  125. }
  126. .chat-container .left ul {
  127. list-style: none;
  128. padding: 0;
  129. margin: 0;
  130. }
  131. .chat-container .left .people .person {
  132. position: relative;
  133. width: 100%;
  134. padding: 12px 10% 16px;
  135. cursor: pointer;
  136. background-color: var(--white);
  137. }
  138. .chat-container .left .people .person:after {
  139. position: absolute;
  140. bottom: 0;
  141. left: 50%;
  142. display: block;
  143. width: 80%;
  144. height: 1px;
  145. content: '';
  146. background-color: var(--light);
  147. transform: translate(-50%, 0);
  148. -webkit-transform: translate(-50%, 0);
  149. }
  150. .chat-container .left .people .person img {
  151. float: left;
  152. width: 40px;
  153. height: 40px;
  154. margin-right: 12px;
  155. border-radius: 50%;
  156. }
  157. .chat-container .left .people .person .person_head_gray {
  158. -webkit-filter: grayscale(100%);
  159. -moz-filter: grayscale(100%);
  160. -ms-filter: grayscale(100%);
  161. -o-filter: grayscale(100%);
  162. filter: grayscale(100%);
  163. filter: gray;
  164. }
  165. .chat-container .left .people .person .session_info_item {
  166. display: flex;
  167. height: 24px;
  168. overflow: hidden;
  169. justify-content: space-between;
  170. }
  171. .chat-container .left .people .person .name {
  172. width: 60%;
  173. overflow: hidden;
  174. font-size: 14px;
  175. color: var(--dark);
  176. font-family: 'Source Sans Pro', sans-serif;
  177. font-weight: 600;
  178. display: inline-block;
  179. }
  180. .chat-container .left .people .person .time {
  181. font-size: 14px;
  182. padding-top: 2px;
  183. color: var(--grey);
  184. background-color: var(--white);
  185. }
  186. .chat-container .left .people .person .preview {
  187. width: 60%;
  188. white-space: nowrap;
  189. text-overflow: ellipsis;
  190. color: var(--grey);
  191. }
  192. .chat-container .left .people .person .unread_msg_count {
  193. height: 17px;
  194. margin-top: 1.5px;
  195. padding: 0 5px;
  196. background: #f74c31;
  197. text-align: center;
  198. line-height: 17px;
  199. border-radius: 50%;
  200. color: var(--white);
  201. }
  202. .chat-container .left .people .person .count_hide {
  203. display: none;
  204. }
  205. .chat-container .left .people .person.active .unread_msg_count, .chat-container .left .people .person:hover .unread_msg_count {
  206. color: var(--white);
  207. background: #f74c31;
  208. }
  209. .chat-container .left .people .person.active, .chat-container .left .people .person:hover {
  210. margin-top: -1px;
  211. margin-left: -1px;
  212. padding-top: 13px;
  213. border: 0;
  214. background-color: var(--blue);
  215. width: calc(100% + 2px);
  216. padding-left: calc(10% + 1px);
  217. }
  218. .chat-container .left .people .person.active span, .chat-container .left .people .person:hover span {
  219. color: var(--white);
  220. background: transparent;
  221. }
  222. .chat-container .left .people .person.active:after, .chat-container .left .people .person:hover:after {
  223. display: none;
  224. }
  225. .chat-container .right {
  226. position: relative;
  227. float: left;
  228. width: 100%;
  229. height: 100%;
  230. }
  231. .chat-container .right .top {
  232. width: 100%;
  233. height: 47px;
  234. padding: 15px 29px;
  235. background-color: #eceff1;
  236. }
  237. .chat-container .right .top span {
  238. font-size: 15px;
  239. color: var(--grey);
  240. vertical-align: middle;
  241. }
  242. .chat-container .right .top span .name {
  243. color: var(--dark);
  244. font-family: 'Source Sans Pro', sans-serif;
  245. font-weight: 600;
  246. overflow: hidden;
  247. display: inline-block;
  248. text-overflow: ellipsis;
  249. white-space: nowrap;
  250. max-width: 60%;
  251. }
  252. .chat-container .right .top span .shielding {
  253. font-family: 'Source Sans Pro', sans-serif;
  254. margin-left: 10px;
  255. color: var(--blue);
  256. font-size: 13px;
  257. cursor: pointer;
  258. }
  259. .chat-container .right .top span #error_warning {
  260. font-family: 'Source Sans Pro', sans-serif;
  261. margin-left: 10px;
  262. color: #e64340;
  263. font-size: 13px;
  264. }
  265. .chat-container .right .chat {
  266. position: relative;
  267. display: none;
  268. overflow: hidden;
  269. padding: 0 0 110px 0;
  270. border-width: 1px 1px 1px 0;
  271. border-style: solid;
  272. border-color: var(--light);
  273. height: calc(100% - 47px);
  274. justify-content: flex-end;
  275. flex-direction: column;
  276. }
  277. .chat-container .right .chat_scroll {
  278. overflow-y: auto;
  279. overflow-x: hidden;
  280. padding: 20px;
  281. }
  282. .chat-container .right .chat.active-chat {
  283. display: flex;
  284. }
  285. .chat-container .right .chat.active-chat .bubble {
  286. word-break: break-all;
  287. word-wrap: break-word;
  288. }
  289. .chat_button_popover {
  290. position: fixed;
  291. word-break: break-all;
  292. word-wrap: break-word;
  293. }
  294. .chat-container .right .write {
  295. position: absolute;
  296. bottom: 10px;
  297. left: 4%;
  298. height: 100px;
  299. padding: 8px;
  300. border: 1px solid var(--light);
  301. background-color: #eceff1;
  302. width: 92%;
  303. border-radius: 5px;
  304. }
  305. .chat-container .right .chat_emoji {
  306. position: absolute;
  307. bottom: 100px;
  308. left: 2%;
  309. padding: 8px;
  310. border: 1px solid var(--light);
  311. width: 96%;
  312. display: none;
  313. border-radius: 5px;
  314. background: #fff;
  315. z-index: 1070;
  316. }
  317. .chat-container .right .chat_emoji img {
  318. height: 30px;
  319. width: 30px;
  320. padding: 4px;
  321. }
  322. .chat-container .right .chat_emoji img:hover {
  323. border: 1px solid #f2f2f2;
  324. }
  325. .chat-container .right .write pre {
  326. font-size: 16px;
  327. float: left;
  328. width: 100%;
  329. height: 60px;
  330. overflow-y: auto;
  331. overflow-x: hidden;
  332. margin: 0;
  333. padding: 0;
  334. border: 0;
  335. padding-left: 2px;
  336. white-space: pre-wrap;
  337. word-break: normal;
  338. color: var(--dark);
  339. outline: none;
  340. background-color: #eceff1;
  341. font-family: 'Source Sans Pro', sans-serif;
  342. font-weight: 400;
  343. }
  344. .chat-container .right .write .write_top {
  345. height: 24px;
  346. }
  347. .chat-container .right .write .smiley {
  348. display: inline-block;
  349. width: 20px;
  350. height: 20px;
  351. content: '';
  352. background-image: url("../img/smiley.png");
  353. background-repeat: no-repeat;
  354. background-position: center;
  355. vertical-align: middle;
  356. }
  357. .chat-container .right .write .select_file {
  358. display: inline-block;
  359. width: 20px;
  360. height: 20px;
  361. margin-left: 10px;
  362. vertical-align: middle;
  363. position: relative;
  364. }
  365. .chat-container .right .write #chatfile {
  366. filter: alpha(opacity=0);
  367. opacity: 0;
  368. width: 20px;
  369. height: 20px;
  370. display: inline-block;
  371. position: absolute;
  372. z-index: 2;
  373. text-indent: -9999px;
  374. }
  375. .chat-container .right .write .attach {
  376. display: inline-block;
  377. position: absolute;
  378. width: 20px;
  379. height: 20px;
  380. content: '';
  381. background-image: url("../img/attachment.png");
  382. background-repeat: no-repeat;
  383. background-position: center;
  384. vertical-align: middle;
  385. z-index: 1;
  386. }
  387. .chat-container .right .write #send_tis {
  388. display: inline-block;
  389. height: 20px;
  390. font-size: 14px;
  391. line-height: 20px;
  392. margin-left: 10px;
  393. vertical-align: middle;
  394. color: #999;
  395. }
  396. .chat-container .right .fastchat_footer .send {
  397. float: right;
  398. }
  399. .chat-container .right .bubble {
  400. font-size: 16px;
  401. position: relative;
  402. display: inline-block;
  403. clear: both;
  404. margin-bottom: 8px;
  405. padding: 13px 14px;
  406. vertical-align: top;
  407. border-radius: 5px;
  408. }
  409. .chat-container .right .bubble:before {
  410. position: absolute;
  411. top: 19px;
  412. display: block;
  413. width: 8px;
  414. height: 6px;
  415. content: '\00a0';
  416. transform: rotate(29deg) skew(-35deg);
  417. -webkit-transform: rotate(29deg) skew(-35deg);
  418. }
  419. .chat-container .right .bubble.you {
  420. float: left;
  421. color: var(--dark);
  422. background-color: #eceff1;
  423. align-self: flex-start;
  424. }
  425. .chat-container .right .bubble.you:before {
  426. left: -3px;
  427. background-color: #eceff1;
  428. }
  429. .chat-container .right .bubble.you img {
  430. background: #fff;
  431. max-width: 200px;
  432. }
  433. .chat-container .right .bubble.you a {
  434. color: var(--dark);
  435. text-decoration: underline;
  436. font-size: 14px;
  437. }
  438. .chat-container .right .bubble.me {
  439. float: right;
  440. color: var(--white);
  441. background-color: var(--blue);
  442. align-self: flex-end;
  443. }
  444. .chat-container .right .bubble.me img {
  445. background: var(--white);
  446. max-width: 200px;
  447. }
  448. .chat-container .right .bubble.me a {
  449. color: var(--white);
  450. text-decoration: underline;
  451. font-size: 14px;
  452. }
  453. .chat-container .right .bubble.me:before {
  454. right: -3px;
  455. background-color: var(--blue);
  456. }
  457. .chat-container .right .conversation-start {
  458. position: relative;
  459. float: right;
  460. width: 100%;
  461. margin: 20px 0;
  462. text-align: center;
  463. }
  464. .chat-container .right .conversation-start span {
  465. font-size: 14px;
  466. display: inline-block;
  467. color: var(--grey);
  468. }
  469. .chat-container .right .conversation-start span:before, .chat-container .right .conversation-start span:after {
  470. position: absolute;
  471. top: 10px;
  472. display: inline-block;
  473. width: 30%;
  474. height: 1px;
  475. content: '';
  476. background-color: var(--light);
  477. }
  478. .chat-container .right .conversation-start span:before {
  479. left: 0;
  480. }
  481. .chat-container .right .conversation-start span:after {
  482. right: 0;
  483. }
  484. /*搜索预选*/
  485. .chat-container .left .search_users {
  486. display: none;
  487. position: absolute;
  488. top: 96px;
  489. margin-left: -1px;
  490. width: 100%;
  491. height: 84%;
  492. background: #fff;
  493. line-height: 40px;
  494. overflow-x: hidden;
  495. overflow-y: auto;
  496. }
  497. .chat-container .left .search_users :hover, .select_item {
  498. font-weight: bold;
  499. }
  500. .chat-container .left .search_users .fastchat_user {
  501. height: 40px;
  502. width: 100%;
  503. padding-left: 6%;
  504. cursor: pointer;
  505. margin-bottom: 10px;
  506. }
  507. .chat-container .left .search_users .fastchat_user img {
  508. height: 40px;
  509. width: 40px;
  510. }
  511. .chat-container .left .search_users .fastchat_user .name {
  512. margin-left: 10px;
  513. }
  514. .chat-container .left .search_users .fastchat_user .go_chat {
  515. float: right;
  516. margin-right: 6%;
  517. color: var(--blue);
  518. font-weight: normal !important;
  519. }
  520. @media screen and (max-width: 766px) {
  521. .chat-container .left {
  522. float: left;
  523. width: 99%;
  524. height: 100%;
  525. border: 1px solid var(--light);
  526. background-color: var(--white);
  527. }
  528. .chat-container .right {
  529. position: relative;
  530. float: left;
  531. display: none;
  532. width: 99%;
  533. height: 100%;
  534. }
  535. }
  536. @keyframes shake-horizontal {
  537. 2% {
  538. transform: translate(-6px, 0) rotate(0);
  539. }
  540. 4% {
  541. transform: translate(9px, 0) rotate(0);
  542. }
  543. 6% {
  544. transform: translate(-6px, 0) rotate(0);
  545. }
  546. 8% {
  547. transform: translate(-2px, 0) rotate(0);
  548. }
  549. 10% {
  550. transform: translate(8px, 0) rotate(0);
  551. }
  552. 12% {
  553. transform: translate(-6px, 0) rotate(0);
  554. }
  555. 14% {
  556. transform: translate(0px, 0) rotate(0);
  557. }
  558. 16% {
  559. transform: translate(-1px, 0) rotate(0);
  560. }
  561. 18% {
  562. transform: translate(9px, 0) rotate(0);
  563. }
  564. 20% {
  565. transform: translate(-4px, 0) rotate(0);
  566. }
  567. 22% {
  568. transform: translate(-6px, 0) rotate(0);
  569. }
  570. 24% {
  571. transform: translate(-5px, 0) rotate(0);
  572. }
  573. 26% {
  574. transform: translate(-9px, 0) rotate(0);
  575. }
  576. 28% {
  577. transform: translate(-4px, 0) rotate(0);
  578. }
  579. 30% {
  580. transform: translate(2px, 0) rotate(0);
  581. }
  582. 32% {
  583. transform: translate(0px, 0) rotate(0);
  584. }
  585. 34% {
  586. transform: translate(0px, 0) rotate(0);
  587. }
  588. 36% {
  589. transform: translate(1px, 0) rotate(0);
  590. }
  591. 38% {
  592. transform: translate(-1px, 0) rotate(0);
  593. }
  594. 40% {
  595. transform: translate(0px, 0) rotate(0);
  596. }
  597. 42% {
  598. transform: translate(1px, 0) rotate(0);
  599. }
  600. 44% {
  601. transform: translate(-8px, 0) rotate(0);
  602. }
  603. 46% {
  604. transform: translate(-8px, 0) rotate(0);
  605. }
  606. 48% {
  607. transform: translate(8px, 0) rotate(0);
  608. }
  609. 50% {
  610. transform: translate(3px, 0) rotate(0);
  611. }
  612. 52% {
  613. transform: translate(-4px, 0) rotate(0);
  614. }
  615. 54% {
  616. transform: translate(3px, 0) rotate(0);
  617. }
  618. 56% {
  619. transform: translate(-8px, 0) rotate(0);
  620. }
  621. 58% {
  622. transform: translate(0px, 0) rotate(0);
  623. }
  624. 60% {
  625. transform: translate(-9px, 0) rotate(0);
  626. }
  627. 62% {
  628. transform: translate(-4px, 0) rotate(0);
  629. }
  630. 64% {
  631. transform: translate(2px, 0) rotate(0);
  632. }
  633. 66% {
  634. transform: translate(1px, 0) rotate(0);
  635. }
  636. 68% {
  637. transform: translate(-7px, 0) rotate(0);
  638. }
  639. 70% {
  640. transform: translate(-8px, 0) rotate(0);
  641. }
  642. 72% {
  643. transform: translate(5px, 0) rotate(0);
  644. }
  645. 74% {
  646. transform: translate(-7px, 0) rotate(0);
  647. }
  648. 76% {
  649. transform: translate(6px, 0) rotate(0);
  650. }
  651. 78% {
  652. transform: translate(-6px, 0) rotate(0);
  653. }
  654. 80% {
  655. transform: translate(4px, 0) rotate(0);
  656. }
  657. 82% {
  658. transform: translate(-8px, 0) rotate(0);
  659. }
  660. 84% {
  661. transform: translate(-3px, 0) rotate(0);
  662. }
  663. 86% {
  664. transform: translate(2px, 0) rotate(0);
  665. }
  666. 88% {
  667. transform: translate(-1px, 0) rotate(0);
  668. }
  669. 90% {
  670. transform: translate(1px, 0) rotate(0);
  671. }
  672. 92% {
  673. transform: translate(-5px, 0) rotate(0);
  674. }
  675. 94% {
  676. transform: translate(-8px, 0) rotate(0);
  677. }
  678. 96% {
  679. transform: translate(0px, 0) rotate(0);
  680. }
  681. 98% {
  682. transform: translate(-8px, 0) rotate(0);
  683. }
  684. 0%, 100% {
  685. transform: translate(0, 0) rotate(0);
  686. }
  687. }
  688. .fastchat-shake-horizontal {
  689. transform-origin: center center;
  690. animation-name: shake-horizontal;
  691. animation-duration: 100ms;
  692. animation-timing-function: ease-in-out;
  693. animation-iteration-count: 4;
  694. }
  695. </style>
  696. </html>