index.html 22 KB

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