evidencelisting.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. {extend name="public/layout" /} {block name="title"}志远装饰-客户见证列表{/block} {block name="body"}
  2. <style type="text/css">
  3. html,
  4. body {
  5. display: block;
  6. min-width: 1100px;
  7. overflow: hidden;
  8. height:100%
  9. }
  10. .layui-table thead tr,
  11. .layui-table-header {
  12. background-color: #D8E6F1 !important;
  13. }
  14. .layui-fluid {
  15. display: block;
  16. box-shadow: 0 0 4px 0 #B6CADE;
  17. border-radius: 5px;
  18. margin: 15px;
  19. background-color: #ffffff;
  20. height:93%;
  21. }
  22. .layui-tab {
  23. padding: 15px;
  24. height: 100%;
  25. }
  26. .layui-form-item {
  27. width: 100%;
  28. }
  29. .layui-form-item .layui-inline {
  30. display: block;
  31. float: left;
  32. width: 145px;
  33. height: 38px;
  34. line-height: 38px;
  35. background: #FFFFFF;
  36. margin-right: 16px;
  37. }
  38. .layui-form-item .layui-input-inline {
  39. width: 145px;
  40. height: 38px;
  41. line-height: 38px;
  42. margin-bottom: 0;
  43. }
  44. .layui-icon {
  45. font-size: 20px !important;
  46. }
  47. .layui-form-item .layui-input-inline .layui-input {
  48. border: 1px solid #9DB6CF;
  49. border-radius: 5px;
  50. }
  51. .layui-form-select dl dd.layui-this {
  52. background-color: #249EFB;
  53. }
  54. .layui-form-item div.searchBox {
  55. width: 320px;
  56. background: #FFFFFF;
  57. border: 1px solid #B6CADE;
  58. border-radius: 24px;
  59. height: 38px;
  60. overflow: hidden;
  61. padding-left: 18px;
  62. position: relative;
  63. margin-bottom: 0px;
  64. float: right;
  65. }
  66. .searchBox .inputBox {
  67. width: 240px;
  68. float: left;
  69. height: 36px;
  70. line-height: 36px;
  71. border-width: 0;
  72. }
  73. .searchBtn {
  74. position: absolute;
  75. top: 0;
  76. right: 0;
  77. width: 51px;
  78. height: 38px;
  79. background-color: #fff;
  80. }
  81. .searchBtn img {
  82. position: absolute;
  83. width: 26px;
  84. top: 6px;
  85. left: 0;
  86. }
  87. .layui-btn-primary {
  88. color: #249EFB;
  89. border: 1px solid #249EFB;
  90. }
  91. .layui-btn-primary:hover {
  92. background-color: #E3F7FF;
  93. color: #249EFB;
  94. }
  95. .layui-table-page>div {
  96. display: flex;
  97. justify-content: flex-start;
  98. }
  99. .layui-btn-xs,
  100. .layui-btn-xs:hover {
  101. border: 1px solid #249EFB;
  102. background-color: #fff;
  103. color: #249EFB;
  104. padding: 0px 10px;
  105. }
  106. .layui-btn-danger,
  107. .layui-btn-danger:hover {
  108. color: #FF5722;
  109. background-color: #fff;
  110. border: 1px solid #FF5722;
  111. padding: 0px 10px;
  112. }
  113. .ml10 {
  114. margin-left: 10px;
  115. }
  116. .layui-form-label {
  117. width: 60px;
  118. }
  119. .flex-sub {
  120. flex: 1;
  121. }
  122. .flex-row {
  123. display: flex;
  124. align-items: center;
  125. }
  126. .justify-end {
  127. justify-content: flex-end;
  128. }
  129. .justify-start {
  130. justify-content: flex-start;
  131. }
  132. .layuiadmin-card-header-auto {
  133. display: flex;
  134. justify-content: space-between;
  135. align-items: center;
  136. }
  137. /* 手机预览样式图文样式 */
  138. .page_evidence_mask {
  139. width: 100%;
  140. height: 100%;
  141. position: fixed;
  142. top: 0px;
  143. left: 0px;
  144. z-index: 999999;
  145. background-color: rgba(0, 0, 0, 0.5);
  146. display: flex;
  147. justify-content: center;
  148. align-items: center;
  149. }
  150. .page_evidence_phone {
  151. width: 410px;
  152. height: 95vh;
  153. max-height: 820px !important;
  154. background: url('__STATIC__/img/phoneModel.png');
  155. background-size: 100% 100%;
  156. display: flex;
  157. justify-content: center;
  158. align-items: center;
  159. }
  160. .page_evidence_article {
  161. width: 375px !important;
  162. height: 96% !important;
  163. background-color: #fff;
  164. position: relative;
  165. overflow-y: auto;
  166. overflow-x: hidden;
  167. border-radius: 30px;
  168. margin-right: 4px;
  169. }
  170. /* 设置滚动条的样式 */
  171. .page_evidence_article::-webkit-scrollbar {
  172. width: 2px;
  173. }
  174. /* 滚动槽 */
  175. .page_evidence_article::-webkit-scrollbar-track {
  176. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
  177. border-radius: 10px;
  178. }
  179. /* 滚动条滑块 */
  180. .page_evidence_article::-webkit-scrollbar-thumb {
  181. background: rgba(0, 0, 0, 0.3);
  182. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
  183. }
  184. .page_evidence_article_title {
  185. padding: 16px 10px 8px;
  186. color: #384855;
  187. font-size: 18px;
  188. }
  189. .page_evidence_article_share_num {
  190. box-sizing: border-box;
  191. padding: 0px 0px 0px 10px;
  192. font-size: 12px;
  193. display: flex;
  194. align-items: center;
  195. }
  196. .page_evidence_article_share_num>img {
  197. width: 12px;
  198. height: 10px;
  199. margin-right: 3px;
  200. }
  201. .page_evidence_article_content {
  202. width: 100%;
  203. box-sizing: border-box;
  204. padding: 12px 10px;
  205. color: #384855;
  206. font-size: 14px;
  207. }
  208. .page_evidence_article_img {
  209. width: 100%;
  210. box-sizing: border-box;
  211. padding: 0px 10px 78px;
  212. }
  213. .page_evidence_article_img>img {
  214. margin-bottom: 10px;
  215. }
  216. /* 手机预览视频样式 */
  217. .page_box {
  218. width: 375px;
  219. height: 96%;
  220. background-color: #000;
  221. border-radius: 30px;
  222. margin-right: 4px;
  223. position: relative;
  224. overflow: hidden;
  225. }
  226. .video_show_msg {
  227. width: 270px;
  228. position: absolute;
  229. bottom: 80px;
  230. left: 20px;
  231. color: #fff;
  232. font-size: 14px;
  233. z-index: 9999999;
  234. }
  235. .video_msg_title {
  236. white-space: nowrap;
  237. overflow: hidden;
  238. text-overflow: ellipsis;
  239. font-size: 14px;
  240. }
  241. .video_msg_content {
  242. margin-top: 3px;
  243. word-break: break-all;
  244. text-overflow: ellipsis;
  245. display: -webkit-box;
  246. -webkit-box-orient: vertical;
  247. -webkit-line-clamp: 2;
  248. /* 这里是超出几行省略 */
  249. overflow: hidden;
  250. font-size: 14px;
  251. }
  252. .video_msg_type {
  253. font-size: 14px;
  254. margin-top: 3px;
  255. }
  256. .video_right_box {
  257. position: absolute;
  258. right: 10px;
  259. bottom: 180px;
  260. font-size: 12px;
  261. color: #fff;
  262. z-index: 9999999;
  263. }
  264. .video_right_item {
  265. width: 50px;
  266. height: 52px;
  267. display: flex;
  268. flex-direction: column;
  269. justify-content: center;
  270. align-items: center;
  271. margin-bottom: 10px;
  272. }
  273. .video_right_avatar {
  274. width: 32px;
  275. height: 32px;
  276. background-color: #ccc;
  277. border-radius: 50%;
  278. }
  279. .video_right_img>img {
  280. width: 23px;
  281. height: 21px;
  282. }
  283. .video_right_name {
  284. margin-top: 5px;
  285. }
  286. .videoDiv {
  287. display: block;
  288. width: 100%;
  289. height: auto;
  290. min-height: 100%;
  291. overflow: hidden;
  292. position: absolute;
  293. top: 50%;
  294. transform: translate(0, -50%);
  295. -webkit-transform: translate(0, -50%);
  296. -moz-transform: translate(0, -50%);
  297. -ms-transform: translate(0, -50%);
  298. }
  299. .videoMsg .videoDiv video {
  300. display: block;
  301. width: 100%;
  302. position: absolute;
  303. max-height: 100%;
  304. height: auto;
  305. top: 50%;
  306. left: 50%;
  307. transform: translate(-50%, -50%);
  308. object-fit: fill;
  309. z-index: 8;
  310. }
  311. .lay-close {
  312. position: absolute;
  313. top: 30px;
  314. right: 25%;
  315. color: #fff;
  316. font-size: 38px !important;
  317. font-weight: 700;
  318. cursor: pointer;
  319. }
  320. .layui-tab-title .layui-this {
  321. color: #249EFB;
  322. }
  323. .layui-tab-title .layui-this:after {
  324. width: 50px;
  325. height: 4px !important;
  326. background-color: #249EFB;
  327. top: 38px !important;
  328. left: 50%;
  329. transform: translateX(-50%);
  330. border: none;
  331. border:1px solid #249EFB !important;
  332. }
  333. .layui-card{box-shadow: none;}
  334. </style>
  335. <body>
  336. <div class="layui-fluid">
  337. <div class="layui-card">
  338. <ul class="layui-tab-title rst_box_top">
  339. <li data-index="1" class="font16 layui_video_list layui-this"><a href="{:url('material/evidencelisting')}">见证列表</a></li>
  340. <li data-index="2" class="font16 layui_video_tjss"><a href="{:url('material/evidence_statistics_data_list')}">数据统计</a></li>
  341. </ul>
  342. <div class="layui-card-header layuiadmin-card-header-auto" style="padding: 15px 15px 20px;">
  343. <div class="flex-row justify-start">
  344. {auth:check name="material/evidencedetail"}
  345. <a type="button" class="layui-btn layui-btn-primary caseaddbtn">
  346. 添加客户见证
  347. </a>
  348. {/auth:check}
  349. <a type="button" class="layui-btn layui-btn-primary" id="cate_administration">分类管理</a>
  350. </div>
  351. <div class="layui-form flex-sub flex-row justify-end">
  352. <div class="layui-inline flex-row" style="margin-right: 0px;">
  353. <label class="layui-form-label">分类</label>
  354. <div class="layui-input-inline flex-sub">
  355. <select name="cate" lay-filter="type" id="type" lay-search>
  356. <option value="">请选择分类</option>
  357. {volist name="cate_list" id="t"}
  358. <option value="{$t.id}">{$t.name}</option>
  359. {/volist}
  360. </select>
  361. </div>
  362. </div>
  363. <div class="layui-inline flex-row">
  364. <label class="layui-form-label">客户见证</label>
  365. <div class="layui-input-inline flex-sub">
  366. <input type="text" name="title" placeholder="请输入客户见证" autocomplete="off"
  367. class="layui-input">
  368. </div>
  369. </div>
  370. <div class="layui-inline flex-row" style="margin-right: 0px;">
  371. <label class="layui-form-label">上传人</label>
  372. <div class="layui-input-inline flex-sub">
  373. <select name="employee_id" id="employee" lay-search>
  374. <option value="">请选择人员</option>
  375. {volist name="employee" id="e"}
  376. <option value="{$e.id}">{$e.name}</option>
  377. {/volist}
  378. </select>
  379. </div>
  380. </div>
  381. <div class="layui-inline">
  382. <label class="layui-form-label">上传时间</label>
  383. <div class="layui-input-inline select-date">
  384. <input type="text" name="add_time" id="select_date" placeholder="开始时间 - 结束时间" autocomplete="off" class="layui-input">
  385. </div>
  386. </div>
  387. <div class="layui-inline ml10">
  388. <button class="layui-btn layuiadmin-btn-list submitbtn" lay-submit lay-filter="LAY-app-contlist-search">
  389. <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
  390. </button>
  391. </div>
  392. </div>
  393. </div>
  394. <div class="layui-card-body" style="text-align: center;">
  395. <!-- <div class="layui-form-item clearfix"></div> -->
  396. <table id="evidence-table" lay-filter="evidence-table"></table>
  397. </div>
  398. </div>
  399. </div>
  400. <div class="page_evidence_mask layui-hide">
  401. <div class="page_evidence_phone">
  402. </div>
  403. <i class="layui-icon layui-icon-close lay-close"></i>
  404. </div>
  405. </body>
  406. {/block} {block name="js"}
  407. <script type="text/html" id="show">
  408. <input type="checkbox" name="show" value="{{d.id}}" lay-skin="switch" lay-text="上架|下架" lay-filter="show" {{ d.publish == 1 ? 'checked' : '' }}>
  409. </script>
  410. <script type="text/html" id="table-evidence-action">
  411. {auth:check name="material/evidencedetail"}
  412. <a class="layui-btn layui-btn-xs" lay-event="evi-details">编辑</a>
  413. {/auth:check}
  414. {auth:check name="data/cluedata"}
  415. <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="evidence-clue-list">线索记录</a>
  416. {/auth:check}
  417. {auth:check name="material/apievidelete"}
  418. <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="evidence-delete">删除</a>
  419. {/auth:check}
  420. {auth:check name="dailyTasks/assign_org"}
  421. <a class="layui-btn layui-btn-xs" lay-event="daily-tasks">设置任务</a>
  422. {/auth:check}
  423. <a class="layui-btn layui-btn-xs" lay-event="preview">预览</a>
  424. </script>
  425. <script type="text/html" id="titletpl">
  426. {{# if(d.title){ }}
  427. <span>{{d.title}}</span>
  428. {{# }else{ }}
  429. <span style="color: #cccccc;">无</span>
  430. {{# } }}
  431. </script>
  432. <script type="text/html" id="cate">
  433. <span>{{d.cate.name}}</span>
  434. </script>
  435. <script type="text/html" id="employee_name">
  436. {{# if(d.employee){ }}
  437. <span>{{d.employee.opt_name}}</span>
  438. {{# }else{ }}
  439. <span style="color: #cccccc;">无</span>
  440. {{# } }}
  441. </script>
  442. <script type="text/html" id="difference">
  443. {{# if(d.difference==1){ }}
  444. <span>视频</span>
  445. {{# }else{ }}
  446. <span>图片</span>
  447. {{# } }}
  448. </script>
  449. <script src="__STATIC__/js/xgplayer.js" type="text/javascript"></script>
  450. <script>
  451. layui.config({
  452. base: '__LAYUI__/',
  453. urlbase: '/sys'
  454. }).extend({
  455. index: 'lib/index' //主入口模块
  456. }).use(['index', 'table', 'element','laydate'], function () {
  457. var $ = layui.$,
  458. form = layui.form,
  459. element = layui.element,
  460. laydate = layui.laydate,
  461. table = layui.table,
  462. scrollTopNum = 0;
  463. //日期范围
  464. laydate.render({
  465. elem: '#select_date'
  466. , type: 'date'
  467. , range: true
  468. , trigger: 'click'//呼出事件改成click
  469. });
  470. //分类管理
  471. $("#cate_administration").click(function () {
  472. layer.open({
  473. type: 2,
  474. title: ['分类管理', 'color:#333333;background-color:#D8E6F1;'],
  475. content: '{:url("material/cate_customer")}',
  476. resize: false,
  477. area: ['80%', '80%'],
  478. end: function () {
  479. location.reload();
  480. }
  481. });
  482. })
  483. //监听搜索
  484. form.on('submit(LAY-app-contlist-search)', function (data) {
  485. var field = data.field;
  486. //执行重载
  487. table.reload('evidence-table', {
  488. where: field
  489. , page: { curr: 1 }
  490. });
  491. });
  492. ///default entery
  493. //客户见证列表
  494. table.render({
  495. elem: '#evidence-table',
  496. autoSort: false,
  497. url: "{:url('material/evidencelist')}",
  498. cols: [
  499. [{
  500. align: 'center',
  501. type: 'numbers',
  502. field: 'id',
  503. width: 80,
  504. title: '序号',
  505. sort: true
  506. }, {
  507. align: 'center',
  508. field: 'title',
  509. title: '客户见证',
  510. templet: '#titletpl'
  511. }, {
  512. align: 'center',
  513. field: 'cate',
  514. title: '分类',
  515. templet: '#cate'
  516. }, {
  517. align: 'center',
  518. field: 'difference',
  519. title: '类型',
  520. templet: '#difference'
  521. }, {
  522. align: 'center',
  523. field: 'addtime',
  524. title: '上传时间',
  525. minWidth: 100
  526. }, {
  527. align: 'center',
  528. title: '浏览次数',
  529. sort: true,
  530. field: 'view_times',
  531. minWidth: 110
  532. }, {
  533. align: 'center',
  534. title: '转发次数',
  535. sort: true,
  536. field: 'shared_times',
  537. minWidth: 110
  538. }, {
  539. align: 'center',
  540. title: '浏览时长',
  541. sort: true,
  542. field: 'visit_due_time',
  543. minWidth: 110
  544. }, {
  545. align: 'center',
  546. title: '展示',
  547. minWidth: 100,
  548. templet: '#show'
  549. }, {
  550. align: 'center',
  551. title: '上传人',
  552. minWidth: 100,
  553. templet: '#employee_name'
  554. }, {
  555. align: 'center',
  556. title: '操作',
  557. width: 380,
  558. align: 'center',
  559. fixed: 'right',
  560. toolbar: '#table-evidence-action'
  561. }]
  562. ],
  563. page: true,
  564. limit: 50,
  565. height: 'full-200',
  566. text: '对不起,加载出现异常!'
  567. });
  568. table.on('sort(evidence-table)', function (obj) {
  569. table.reload('evidence-table', {
  570. initSort: obj
  571. , where: {
  572. order: obj.field + ' ' + obj.type
  573. }
  574. });
  575. });
  576. //监听列表
  577. table.on('tool(evidence-table)', function (obj) {
  578. var data = obj.data;
  579. if (obj.event === 'evidence-clue-list') {
  580. layer.open({
  581. type: 2,
  582. title: ['素材线索数据', 'color:#333333;background-color:#D8E6F1;'],
  583. content: "{:url('data/cluedata')}?type=materialEvidence&id=" + data.id,
  584. resize: false,
  585. area: ['80%', '80%']
  586. });
  587. } else if (obj.event === 'evidence-delete') {
  588. layer.confirm('确定要删除此素材么?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'], }, function () {
  589. $.get("{:url('material/apievidelete')}?id=" + data.id, function (res) {
  590. if (res.code === 0) {
  591. layer.msg(res.msg, { anim: 0, time: 400 }, function () {
  592. table.reload('evidence-table');
  593. });
  594. } else {
  595. layer.msg(res.msg, { anim: 6, time: 400 });
  596. }
  597. });
  598. });
  599. } else if (obj.event === 'evi-details') {
  600. layer.open({
  601. type: 2,
  602. title: ['详情编辑', 'color:#333333;background-color:#D8E6F1;'],
  603. content: "{:url('material/evidencedetail')}?id=" + data.id,
  604. resize: false,
  605. area: ['80%', '80%'],
  606. end: function() {
  607. scrollPostion(scrollTopNum)
  608. setTimeout(() => {
  609. $('.layui-table-main').scroll(function (e) {
  610. scrollTopNum = $(this).scrollTop();
  611. console.log(scrollTopNum, '<<<记录位置');
  612. })
  613. }, 800)
  614. }
  615. });
  616. } else if (obj.event === 'daily-tasks') {
  617. layer.open({
  618. type: 2,
  619. title: ['设置任务', 'color:#333333;background-color:#D8E6F1;'],
  620. content: "{:url('dailyTasks/assign_org')}?type=evidencelist&id=" + data.id,
  621. resize: false,
  622. area: ['80%', '80%']
  623. });
  624. } else if (obj.event === 'preview') {
  625. requestEvidenceDetail(data.id);
  626. }
  627. });
  628. setTimeout(() => {
  629. $('.layui-table-main').scroll(function (e) {
  630. scrollTopNum = $(this).scrollTop();
  631. console.log(scrollTopNum, '<<<记录位置');
  632. })
  633. }, 800)
  634. function scrollPostion(num) {
  635. $('.layui-table-main').scrollTop(num)
  636. }
  637. function requestEvidenceDetail(id) {
  638. $.ajax({
  639. type: 'post',
  640. url: '{:url("material/preview_read")}',
  641. data: {
  642. id: id
  643. },
  644. success: function (res) {
  645. if (res.code == 0) {
  646. renderPhoneHtml(res.data);
  647. $('.page_evidence_mask').removeClass('layui-hide');
  648. }
  649. }
  650. })
  651. }
  652. function renderPhoneHtml(data) {
  653. let htmls = '';
  654. if (data.difference == 2) {
  655. htmls = `<div class="page_evidence_article">
  656. <div class="page_evidence_article_title">${data.title}</div>
  657. <div class="page_evidence_article_share_num">
  658. <img src="https://o.nczyzs.com/xcx/conshare.png" alt="">
  659. <span>${data.shared_times}</span>
  660. </div>
  661. <div class="page_evidence_article_content">${data.desc}</div>
  662. <div class="page_evidence_article_img">
  663. ${data.pics && data.pics.length ? data.pics.map(v => {
  664. return `<img src="${v}" alt="" width="100%">`
  665. }).join('') : ''}
  666. </div>
  667. </div>`;
  668. } else {
  669. htmls = `<div class="page_box">
  670. <div class="videoDiv" id="evidenceVideo"></div>
  671. <div class="video_right_box">
  672. <div class="video_right_item">
  673. <div class="video_right_avatar">
  674. <img src="__STATIC__/img/default.png" width="100%" height="100%" />
  675. </div>
  676. <span class="video_right_name">分享人</span>
  677. </div>
  678. <div class="video_right_item">
  679. <div class="video_right_img">
  680. <img src="__STATIC__/img/addedwx.png" alt="">
  681. </div>
  682. <span class="video_right_name">微信咨询</span>
  683. </div>
  684. <div class="video_right_item">
  685. <div class="video_right_img">
  686. <img src="__STATIC__/img/whitemobile.png" alt="">
  687. </div>
  688. <span class="video_right_name">电话预约</span>
  689. </div>
  690. <div class="video_right_item">
  691. <div class="video_right_img">
  692. <img src="__STATIC__/img/wcollect.png" alt="">
  693. </div>
  694. <span class="video_right_name">收藏</span>
  695. </div>
  696. <div class="video_right_item">
  697. <div class="video_right_img">
  698. <img src="__STATIC__/img/zhuanfaicon.png" alt="">
  699. </div>
  700. <span class="video_right_name">转发</span>
  701. </div>
  702. </div>
  703. <div class="video_show_msg">
  704. <div class="video_msg_title">${data.title}</div>
  705. <div class="video_msg_content">${data.desc}</div>
  706. </div>
  707. </div>`;
  708. }
  709. $('.page_evidence_phone').html(htmls);
  710. setTimeout(() => {
  711. if (data.difference == 1) {
  712. var posters = data.cover;
  713. if (posters == null || posters == '') {
  714. posters = `${data.pics}?x-oss-process=video/snapshot,t_100,f_jpg`;
  715. }
  716. let player = new Player({
  717. id: 'evidenceVideo',
  718. autoplay: false,
  719. volume: 0.3,
  720. url: data.pics,
  721. poster: posters,
  722. 'x5-video-player-type': 'h5',
  723. playsinline: true,
  724. thumbnail: {
  725. pic_num: 44,
  726. width: 160,
  727. height: 90,
  728. col: 10,
  729. row: 10,
  730. },
  731. lang: 'zh-cn',
  732. fitVideoSize: 'fixWidth',
  733. width: 375,
  734. whitelist: ['']
  735. });
  736. }
  737. }, 500)
  738. }
  739. $('.lay-close').click(function () {
  740. $('.page_evidence_phone').html('');
  741. $('.page_evidence_mask').addClass('layui-hide');
  742. })
  743. $('.caseaddbtn').click(function () {
  744. layer.open({
  745. type: 2,
  746. title: ['添加客户见证', 'color:#333333;background-color:#D8E6F1;'],
  747. content: "{:url('material/evidence_add')}",
  748. resize: false,
  749. area: ['80%', '80%']
  750. });
  751. })
  752. //备注
  753. $('body').on('mouseover', '.remarksInfo', function () {
  754. var type = $(this).data('type');
  755. layer.tips(type, this, {
  756. tips: [1, '#3595CC'],
  757. time: 2000
  758. });
  759. });
  760. document.onkeydown=function(event){
  761. var e = event || window.event || arguments.callee.caller.arguments[0];
  762. if(e && e.keyCode==13){
  763. $(".submitbtn").trigger("click");
  764. }
  765. };
  766. form.on('switch(show)', function (obj) {
  767. var id = obj.value;
  768. $.ajax({
  769. type: "post",
  770. url: '{:url("material/apipublish")}',
  771. data: {
  772. id: id,
  773. cate: 'evidence'
  774. },
  775. success: function (res) {
  776. layer.msg(res.msg);
  777. }
  778. });
  779. });
  780. //添加客户见证
  781. $('.add_kj').click(function () {
  782. layer.open({
  783. type: 2,
  784. title: ['新建见证', 'color:#333333;background-color:#D8E6F1;'],
  785. content: "{:url('material/evidence_add')}",
  786. resize: false,
  787. area: ['80%', '80%'],
  788. // btn: ['确定','关闭'],
  789. // yes: function(index){
  790. // //当点击‘确定’按钮的时候,获取弹出层返回的值
  791. // // var res = window["layui-layer-iframe" + index].callbackdata();
  792. // //打印返回的值,看是否有我们想返回的值。
  793. // console.log(index);
  794. // //最后关闭弹出层
  795. // layer.close(index);
  796. // },
  797. // cancel: function(){
  798. // //右上角关闭回调
  799. // }
  800. });
  801. });
  802. });
  803. </script>
  804. {/block}