index.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. <!--列表-->
  101. <div class="layui-row layui-col-space15">
  102. <div class="layui-col-md12">
  103. <div class="layui-card">
  104. <div class="content acea-row row-middle">
  105. <div class="demo-basic--circle acea-row row-middle">
  106. <!-- <Avatar :size="50" :src="circleUrl" class="mr20"/>-->
  107. <!-- <Avatar icon="ios-person" size="large" />-->
  108. <div class="circleUrl mr20"><img src="/system/images/plat_user.png"></div>
  109. <div class="dashboard-workplace-header-tip">
  110. <div class="dashboard-workplace-header-tip-title">{$info['phone']},祝您每一天开心!</div>
  111. <div class="dashboard-workplace-header-tip-desc">
  112. <span class="mr10"><a href="{:Url('setting.systemPlat/modify')}">修改密码</a></span>
  113. <span @click="loginOut" class="login-out"><a>退出登录</a></span>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="dashboard-workplace-header-extra acea-row">
  118. <div class="pfontBox">
  119. <span class="pfont acea-row row-middle">
  120. <div class="pfontImg"><img src="/system/images/plat_sms.png"><Icon type="md-apps"></Icon></div>
  121. <span>短信剩余条数</span>
  122. </span>
  123. <?php if (isset($info['sms']['open']) && $info['sms']['open'] == 1) { ?>
  124. <div>剩余
  125. <span class="rR" v-text="numbers">{$info['sms']['num']} </span>条
  126. 已使用 <span class="rR" v-text="numbers">{$info['sms']['surp']} </span>条
  127. </div>
  128. <?php } else { ?>
  129. <span><a href="{:Url('setting.systemPlat/sms_open')}">开通服务</a></span>
  130. <?php } ?>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  135. <ul class="layui-tab-title">
  136. <li lay-id="list" {eq name='type' value='sms' } class="layui-this" {/eq}>
  137. <a href="{eq name='type' value='sms'}javascript:;{else}{:Url('index',['type'=>'sms'])}{/eq}">短信</a>
  138. </li>
  139. </ul>
  140. </div>
  141. <div class="layui-card-body">
  142. <div class="layui-btn-container" id="container-action">
  143. <?php if (isset($info['sms']['open']) && $info['sms']['open'] == 1) { ?>
  144. <span class="layui-btn-sm" style="margin-right:10px;font-size: 18px;color: #333; ">短信签名:{$info.sms.sign}</span>
  145. <button class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame('修改签名','{:Url('sms_modify')}',{h:540,w:600})" type="button">修改签名</button>
  146. <?php } ?>
  147. <button type="button" class="layui-btn layui-btn-sm" onclick="window.location.reload()">刷新</button>
  148. </div>
  149. <table class="layui-hide" id="List" lay-filter="List"></table>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <!--end-->
  155. </div>
  156. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  157. {/block}
  158. {block name="script"}
  159. <script>
  160. var type = "<?php echo $type;?>";
  161. layList.tableList('List', "{:Url('record',['type'=>$type])}", function () {
  162. if(type == 'sms'){
  163. return [
  164. {field: 'phone', title: '手机号码', width: '10%', align: 'center'},
  165. {field: 'content', title: '短信内容', height: 'full-20'},
  166. {field: '_resultcode', title: '发送状态', width: '8%', align: 'center'},
  167. {field: 'add_time', title: '发送时间', align: 'center'},
  168. ];
  169. }
  170. });
  171. $(document).on('click', ".open_image", function (e) {
  172. var image = $(this).data('image');
  173. $eb.openImage(image);
  174. });
  175. $(document).on('click', ".login-out", function (e) {
  176. $eb.axios.post("{:Url('loginOut')}",).then(function (res) {
  177. if (res.status == 200 && res.data.code == 200) {
  178. $eb.message('success', res.data.msg || '退出成功!');
  179. $eb.closeModalFrame(window.name);
  180. window.location.href = "{:url('setting.systemPlat/index?out=1')}";
  181. } else {
  182. $eb.message('error', res.data.msg || '请求失败!');
  183. }
  184. }).catch(function (err) {
  185. $eb.message('error', err);
  186. })
  187. });
  188. //自定义方法
  189. var action={
  190. //打开新添加页面
  191. open_add: function (url,title) {
  192. layer.open({
  193. type: 2 //Page层类型
  194. ,area: ['50%', '50%']
  195. ,title: title
  196. ,shade: 0.6 //遮罩透明度
  197. ,maxmin: true //允许全屏最小化
  198. ,anim: 1 //0-6的动画形式,-1不开启
  199. ,content: url
  200. ,end:function() {
  201. location.reload();
  202. }
  203. });
  204. }
  205. };
  206. require(['vue'], function (Vue) {
  207. new Vue({
  208. el: "#app",
  209. data: {},
  210. watch: {},
  211. methods: {},
  212. mounted: function () {
  213. }
  214. })
  215. });
  216. </script>
  217. {/block}