index.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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: 400px;
  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: 33%;
  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. <span class="rR" v-text="numbers">{$info['sms']['num']} </span>
  125. <?php } else { ?>
  126. <span><a href="{:Url('setting.systemPlat/sms_open')}">开通服务</a></span>
  127. <?php } ?>
  128. </div>
  129. <div class="pfontBox">
  130. <span class="pfont acea-row row-middle">
  131. <div class="pfontImg"><img src="/system/images/plat_copy.png"></div>
  132. <span>商品采集次数</span>
  133. </span>
  134. <?php if (isset($info['copy']['open']) && $info['copy']['open'] == 1) { ?>
  135. <span class="rR" v-text="numbers">{$info['copy']['num']} </span>
  136. <?php } else { ?>
  137. <span @click="copy_open" class="copy_open" style="cursor:pointer;">开通服务</span>
  138. <?php } ?>
  139. </div>
  140. <div class="pfontBox">
  141. <span class="pfont acea-row row-middle">
  142. <div class="pfontImg"><img src="/system/images/plat_express.png"></div>
  143. <span>物流查询次数</span>
  144. </span>
  145. <?php if (isset($info['query']['open']) && $info['query']['open'] == 1) { ?>
  146. <span class="rR" v-text="numbers">{$info['query']['num']} </span>
  147. <?php } else { ?>
  148. <span @click="express_open" class="express_open" style="cursor:pointer;">开通服务</span>
  149. <?php } ?>
  150. </div>
  151. </div>
  152. </div>
  153. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  154. <ul class="layui-tab-title">
  155. <li lay-id="list" {eq name='type' value='sms' } class="layui-this" {/eq}>
  156. <a href="{eq name='type' value='sms'}javascript:;{else}{:Url('index',['type'=>'sms'])}{/eq}">短信</a>
  157. </li>
  158. <li lay-id="list" {eq name='type' value='copy' } class="layui-this" {/eq}>
  159. <a href="{eq name='type' value='copy'}javascript:;{else}{:Url('index',['type'=>'copy'])}{/eq}">商品采集</a>
  160. </li>
  161. <li lay-id="list" {eq name='type' value='expr_query' } class="layui-this" {/eq}>
  162. <a href="{eq name='type' value='expr_query'}javascript:;{else}{:Url('index',['type'=>'expr_query'])}{/eq}">物流查询</a>
  163. </li>
  164. </ul>
  165. </div>
  166. <div class="layui-card-body">
  167. <div class="layui-btn-container" id="container-action">
  168. <?php if($type == 'sms'){?>
  169. <!-- <a href="{:Url('index',['type'=>'sms'])}"><button class="layui-btn layui-btn-sm" data-type="del_order">批量删除订单</button></a>-->
  170. <?php } ?>
  171. </div>
  172. <table class="layui-hide" id="List" lay-filter="List"></table>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. <!--end-->
  178. </div>
  179. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  180. {/block}
  181. {block name="script"}
  182. <script>
  183. var type = "<?php echo $type;?>";
  184. layList.tableList('List', "{:Url('record',['type'=>$type])}", function () {
  185. if(type == 'sms'){
  186. return [
  187. {field: 'phone', title: '手机号码', width: '10%', align: 'center'},
  188. {field: 'content', title: '短信内容', height: 'full-20'},
  189. {field: '_resultcode', title: '发送状态', width: '8%', align: 'center'},
  190. {field: 'add_time', title: '发送时间', align: 'center'},
  191. ];
  192. }else if(type == 'copy'){
  193. return [
  194. {field: 'url', title: '采集链接'},
  195. // {field: 'info', title: '返回信息'},
  196. {field: '_resultcode', title: '状态',align: 'center'},
  197. {field: 'add_time', title: '时间', align: 'center'},
  198. ];
  199. }else if(type == 'expr_query'){
  200. return [
  201. {field: 'name', title: '快递公司', width: '14%'},
  202. {field: 'code', title: '快递公司编号', width: '14%'},
  203. {field: 'num', title: '快递单号', align: 'center'},
  204. {field: '_resultcode', title: '状态',align: 'center'},
  205. {field: 'add_time', title: '时间', align: 'center'},
  206. ];
  207. }
  208. });
  209. $(document).on('click', ".open_image", function (e) {
  210. var image = $(this).data('image');
  211. $eb.openImage(image);
  212. });
  213. $(document).on('click', ".login-out", function (e) {
  214. $eb.axios.post("{:Url('loginOut')}",).then(function (res) {
  215. if (res.status == 200 && res.data.code == 200) {
  216. $eb.message('success', res.data.msg || '退出成功!');
  217. $eb.closeModalFrame(window.name);
  218. location.href = "{:url('setting.systemPlat/index?out=1')}";
  219. } else {
  220. $eb.message('error', res.data.msg || '请求失败!');
  221. }
  222. }).catch(function (err) {
  223. $eb.message('error', err);
  224. })
  225. });
  226. $(document).on('click', ".copy_open", function (e) {
  227. $eb.axios.post("{:Url('go_copy_open')}",).then(function (res) {
  228. if (res.status == 200 && res.data.code == 200) {
  229. $eb.message('success', res.data.msg || '退出成功!');
  230. $eb.closeModalFrame(window.name);
  231. location.href = "{:url('setting.systemPlat/index')}";
  232. } else {
  233. $eb.message('error', res.data.msg || '请求失败!');
  234. }
  235. }).catch(function (err) {
  236. $eb.message('error', err);
  237. })
  238. });
  239. $(document).on('click', ".express_open", function (e) {
  240. $eb.axios.post("{:Url('go_express_open')}",).then(function (res) {
  241. if (res.status == 200 && res.data.code == 200) {
  242. $eb.message('success', res.data.msg || '退出成功!');
  243. $eb.closeModalFrame(window.name);
  244. location.href = "{:url('setting.systemPlat/index')}";
  245. } else {
  246. $eb.message('error', res.data.msg || '请求失败!');
  247. }
  248. }).catch(function (err) {
  249. $eb.message('error', err);
  250. })
  251. });
  252. require(['vue'], function (Vue) {
  253. new Vue({
  254. el: "#app",
  255. data: {},
  256. watch: {},
  257. methods: {},
  258. mounted: function () {
  259. }
  260. })
  261. });
  262. </script>
  263. {/block}