index.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. {extend name="public/container"}
  2. {block name="head_top"}
  3. <style scoped lang="scss">
  4. /*$cursor: #1890ff;*/
  5. .content {
  6. justify-content: space-between;
  7. padding:10px;
  8. border-bottom-width: 1px;
  9. border-bottom-style: solid;
  10. border-color: #e6e6e6;
  11. }
  12. .login-out {
  13. cursor:pointer;
  14. }
  15. .rR {
  16. text-align: center;
  17. font-size: 22px;
  18. /*display: block;*/
  19. }
  20. .dashboard-workplace-header-tip {
  21. display: inline-block;
  22. vertical-align: middle;
  23. }
  24. .dashboard-workplace-header-tip-title {
  25. font-size: 20px;
  26. font-weight: 700;
  27. margin-bottom: 12px;
  28. }
  29. .dashboard-workplace-header-tip-desc {
  30. /*line-height: 0 !important;*/
  31. display: block;
  32. span {
  33. font-size: 12px;
  34. color: $ cursor;
  35. cursor: pointer;
  36. display: inline-block;
  37. }
  38. }
  39. .dashboard-workplace-header-extra {
  40. width: auto !important;
  41. min-width: 300px;
  42. }
  43. .pfont {
  44. font-size: 12px;
  45. color: #808695;
  46. }
  47. .circleUrl {
  48. width: 50px;
  49. height: 50px;
  50. }
  51. .circleUrl img {
  52. width: 100%;
  53. height: 100%;
  54. border-radius: 50%;
  55. overflow: hidden;
  56. }
  57. .mr20 {
  58. margin-right: 20px;
  59. }
  60. .acea-row {
  61. display: -webkit-box;
  62. display: -moz-box;
  63. display: -webkit-flex;
  64. display: -ms-flexbox;
  65. display: flex;
  66. -webkit-box-lines: multiple;
  67. -moz-box-lines: multiple;
  68. -o-box-lines: multiple;
  69. -webkit-flex-wrap: wrap;
  70. -ms-flex-wrap: wrap;
  71. flex-wrap: wrap;
  72. /* 辅助类 */
  73. }
  74. .acea-row.row-middle {
  75. -webkit-box-align: center;
  76. -moz-box-align: center;
  77. -o-box-align: center;
  78. -ms-flex-align: center;
  79. -webkit-align-items: center;
  80. align-items: center;
  81. }
  82. .pfontBox {
  83. width: 93%;
  84. }
  85. .pfontImg {
  86. width: 28px;
  87. height: 28px;
  88. margin-right: 5px;
  89. }
  90. .pfontImg img {
  91. width: 100%;
  92. height: 100%;
  93. overflow: hidden;
  94. border-radius: 50%;
  95. }
  96. </style>
  97. {/block}
  98. {block name="content"}
  99. <div class="layui-fluid">
  100. <div class="layui-card">
  101. <div class="content acea-row row-middle">
  102. <div class="demo-basic--circle acea-row row-middle">
  103. <div class="circleUrl mr20"><img src="/system/images/plat_user.png"></div>
  104. <div class="dashboard-workplace-header-tip">
  105. <div class="dashboard-workplace-header-tip-title">{$info['phone']},祝您每一天开心!</div>
  106. <div class="dashboard-workplace-header-tip-desc">
  107. <span class="mr10"><a href="{:Url('setting.systemPlat/modify')}">修改密码</a></span>
  108. <span @click="loginOut" class="login-out"><a>退出登录</a></span>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="dashboard-workplace-header-extra acea-row">
  113. <div class="pfontBox">
  114. <span class="pfont acea-row row-middle">
  115. <div class="pfontImg"><img src="/system/images/plat_sms.png"><Icon type="md-apps"></Icon></div>
  116. <span>短信剩余条数</span>
  117. </span>
  118. <?php if (isset($info['sms']['open']) && $info['sms']['open'] == 1) { ?>
  119. <div>剩余
  120. <span class="rR" v-text="numbers">{$info['sms']['num']} </span>条
  121. </div>
  122. <?php } else { ?>
  123. <span><a href="{:Url('setting.systemPlat/sms_open')}">开通服务</a></span>
  124. <?php } ?>
  125. </div>
  126. <div class="pfontBox">
  127. <span class="pfont acea-row row-middle">
  128. <div class="pfontImg"><img src="/system/images/plat_express.png"></div>
  129. <span>物流查询次数</span>
  130. </span>
  131. <?php if (isset($info['query']['open']) && $info['query']['open'] == 1) { ?>
  132. <span class="rR" v-text="numbers">{$info['query']['num']} </span>
  133. <?php } else { ?>
  134. <span @click="express_open" class="express_open" style="cursor:pointer;">开通服务</span>
  135. <?php } ?>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  140. <ul class="layui-tab-title">
  141. <li lay-id="list" {eq name='type' value='sms' } class="layui-this" {/eq}>
  142. <a href="{eq name='type' value='sms'}javascript:;{else}{:Url('index',['type'=>'sms'])}{/eq}">短信</a>
  143. </li>
  144. <li lay-id="list" {eq name='type' value='expr_query' } class="layui-this" {/eq}>
  145. <a href="{eq name='type' value='expr_query'}javascript:;{else}{:Url('index',['type'=>'expr_query'])}{/eq}">物流查询</a>
  146. </li>
  147. </ul>
  148. </div>
  149. <div class="layui-card-body">
  150. <div class="layui-btn-container" id="container-action">
  151. <?php if ($type == 'sms' && isset($info['sms']['open']) && $info['sms']['open'] == 1) { ?>
  152. <span class="layui-btn-sm" style="margin-right:10px;font-size: 18px;color: #333; ">短信签名:{$info.sms.sign}</span>
  153. <button class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame('修改签名','{:Url('sms_modify')}',{h:540,w:600})" type="button">修改签名</button>
  154. <?php } ?>
  155. <button type="button" class="layui-btn layui-btn-sm" onclick="window.location.reload()">刷新</button>
  156. </div>
  157. <table class="layui-hide" id="List" lay-filter="List"></table>
  158. </div>
  159. </div>
  160. </div>
  161. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  162. {/block}
  163. {block name="script"}
  164. <script>
  165. var type = "<?php echo $type;?>";
  166. layList.tableList('List', "{:Url('record',['type'=>$type])}", function () {
  167. if(type == 'sms'){
  168. return [
  169. {field: 'phone', title: '手机号码', width: '10%', align: 'center'},
  170. {field: 'content', title: '短信内容', height: 'full-20'},
  171. {field: '_resultcode', title: '发送状态', width: '8%', align: 'center'},
  172. {field: 'add_time', title: '发送时间', align: 'center'},
  173. ];
  174. }else if(type == 'expr_query'){
  175. return [
  176. {field: 'name', title: '快递公司', width: '14%'},
  177. {field: 'code', title: '快递公司编号', width: '14%'},
  178. {field: 'num', title: '快递单号', align: 'center'},
  179. {field: '_resultcode', title: '状态',align: 'center'},
  180. {field: 'add_time', title: '时间', align: 'center'},
  181. ];
  182. }
  183. });
  184. $(document).on('click', ".open_image", function (e) {
  185. var image = $(this).data('image');
  186. $eb.openImage(image);
  187. });
  188. $(document).on('click', ".login-out", function (e) {
  189. $eb.axios.post("{:Url('loginOut')}",).then(function (res) {
  190. if (res.status == 200 && res.data.code == 200) {
  191. $eb.message('success', res.data.msg || '退出成功!');
  192. $eb.closeModalFrame(window.name);
  193. window.location.href = "{:url('setting.systemPlat/index?out=1')}";
  194. } else {
  195. $eb.message('error', res.data.msg || '请求失败!');
  196. }
  197. }).catch(function (err) {
  198. $eb.message('error', err);
  199. })
  200. });
  201. $(document).on('click', ".express_open", function (e) {
  202. $eb.axios.post("{:Url('go_express_open')}",).then(function (res) {
  203. if (res.status == 200 && res.data.code == 200) {
  204. $eb.message('success', res.data.msg || '退出成功!');
  205. $eb.closeModalFrame(window.name);
  206. location.href = "{:url('setting.systemPlat/index')}";
  207. } else {
  208. $eb.message('error', res.data.msg || '请求失败!');
  209. }
  210. }).catch(function (err) {
  211. $eb.message('error', err);
  212. })
  213. });
  214. //自定义方法
  215. var action={
  216. //打开新添加页面
  217. open_add: function (url,title) {
  218. layer.open({
  219. type: 2 //Page层类型
  220. ,area: ['50%', '50%']
  221. ,title: title
  222. ,shade: 0.6 //遮罩透明度
  223. ,maxmin: true //允许全屏最小化
  224. ,anim: 1 //0-6的动画形式,-1不开启
  225. ,content: url
  226. ,end:function() {
  227. location.reload();
  228. }
  229. });
  230. }
  231. };
  232. require(['vue'], function (Vue) {
  233. new Vue({
  234. el: "#app",
  235. data: {},
  236. watch: {},
  237. methods: {},
  238. mounted: function () {
  239. }
  240. })
  241. });
  242. </script>
  243. {/block}