main.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <?php
  2. /* @var $this \yii\web\View */
  3. /* @var $content string */
  4. use yii\helpers\Html;
  5. use yii\helpers\Url;
  6. use yii\web\YiiAsset;
  7. YiiAsset::register($this);
  8. ?>
  9. <?php $this->beginPage() ?>
  10. <!DOCTYPE html>
  11. <html lang="<?= Yii::$app->language ?>">
  12. <head>
  13. <meta charset="<?= Yii::$app->charset ?>">
  14. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  15. <meta name="viewport" content="width=device-width, initial-scale=1">
  16. <?= Html::csrfMetaTags() ?>
  17. <title><?= Html::encode($this->title) ?></title>
  18. <?php $this->head() ?>
  19. <link href="<?= STATIC_URL ?>/ui/css/bootstrap.min.css" rel="stylesheet">
  20. <link href="<?= STATIC_URL ?>/ui/font-awesome/css/font-awesome.css" rel="stylesheet">
  21. <link href="<?= STATIC_URL ?>/ui/css/animate.css" rel="stylesheet">
  22. <link href="<?= STATIC_URL ?>/ui/css/style.css" rel="stylesheet">
  23. <link href="<?= STATIC_URL ?>/ui/css/plugins/iCheck/custom.css" rel="stylesheet">
  24. <link href="<?= STATIC_URL ?>/ui/css/plugins/toastr/toastr.min.css" rel="stylesheet">
  25. <link href="<?= STATIC_URL ?>/ui/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
  26. <link href="<?= STATIC_URL ?>/ui/css/plugins/select2/select2.min.css" rel="stylesheet">
  27. <style>
  28. #datatables tr.selected {
  29. background: #1ab394;
  30. color: #FFF;
  31. }
  32. .ibox-title {
  33. border-width: 1px 0 0;
  34. }
  35. @media (min-width: 1366px) {
  36. .container {
  37. width: 1170px;
  38. }
  39. }
  40. @media (min-width: 1440px) {
  41. .container {
  42. width: 1200px;
  43. }
  44. }
  45. @media (min-width: 1600px) {
  46. .container {
  47. width: 1300px;
  48. }
  49. }
  50. @media (min-width: 1920px) {
  51. .container {
  52. width: 1300px;
  53. }
  54. }
  55. .breadcrumb {
  56. background: none;
  57. padding-bottom: 10px;
  58. }
  59. </style>
  60. <!--[if lt IE 9]>
  61. <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  62. <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  63. <![endif]-->
  64. <?= isset($this->blocks['header_script']) ? trim($this->blocks['header_script']) : '' ?>
  65. </head>
  66. <body class="top-navigation">
  67. <?php $this->beginBody() ?>
  68. <div id="wrapper">
  69. <div id="page-wrapper" class="gray-bg">
  70. <div class="row border-bottom white-bg">
  71. <nav class="navbar navbar-static-top" role="navigation">
  72. <div class="container">
  73. <div class="navbar-header">
  74. <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
  75. <i class="fa fa-reorder"></i>
  76. </button>
  77. <a href="<?= Url::to(['/ib/dashboard']) ?>" class="navbar-brand"><b>X</b>Broker</a>
  78. </div>
  79. <div class="navbar-collapse collapse" id="navbar">
  80. <ul class="nav navbar-nav">
  81. <li id="navdashboard">
  82. <a href="<?= Url::to(['/ib/dashboard']) ?>">首页</a>
  83. </li>
  84. <li id="navnotice">
  85. <a href="<?= Url::to(['/ib/notice']) ?>">公告
  86. <span class="label label-danger" id="findNotReadCount"></span>
  87. </a>
  88. </li>
  89. <li id="navdw">
  90. <a href="<?= Url::to(['/ib/bankwithdraw']) ?>">出金</a>
  91. </li>
  92. <!--<li id="navtransfer">
  93. <a href="<?= Url::to(['/ib/transfer']) ?>">同名转账</a>
  94. </li>-->
  95. <li id="navr">
  96. <a href="<?= Url::to(['/ib/r']) ?>">推广</a>
  97. </li>
  98. <li id="navhelp">
  99. <a href="<?= Url::to(['/ib/help']) ?>">常见问题</a>
  100. </li>
  101. <!--<li id="navhelp">
  102. <a href="javascript:">在线客服</a>
  103. </li>-->
  104. </ul>
  105. <ul class="nav navbar-nav navbar-right">
  106. <li id="navsetting" class="dropdown">
  107. <a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown">
  108. <?= Yii::$app->getUser()->getIdentity(false)->username ?> <span class="caret"></span>
  109. </a>
  110. <ul role="menu" class="dropdown-menu">
  111. <li><a href="<?= Url::to(['/ib/info']) ?>">基本资料</a></li>
  112. <li><a href="<?= Url::to(['/ib/password']) ?>">修改密码</a></li>
  113. <li><a href="<?= Url::to(['/account/logout']) ?>">退出</a></li>
  114. </ul>
  115. </li>
  116. </ul>
  117. </div>
  118. </div>
  119. </nav>
  120. </div>
  121. <div class="wrapper wrapper-content">
  122. <div class="container">
  123. <?= $content ?>
  124. </div>
  125. </div>
  126. <br>
  127. <div class="footer">
  128. <div class="container">
  129. <div class="pull-right">V2.0</div>
  130. <div><strong>Copyright</strong> &copy; <?= date('Y') ?></div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  136. <div class="modal-dialog" role="document">
  137. <div class="modal-content">
  138. <div class="modal-header">
  139. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  140. <h4 class="modal-title" id="myModalLabel"><a href="javascript:;" class="modal-title-a" target="_blank"></a></h4>
  141. </div>
  142. <div class="modal-body"></div>
  143. <div class="modal-footer">
  144. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. <?php $this->endBody() ?>
  150. <!-- Mainly scripts -->
  151. <script src="<?= STATIC_URL ?>/ui/js/bootstrap.min.js"></script>
  152. <script src="<?= STATIC_URL ?>/ui/js/plugins/metisMenu/jquery.metisMenu.js"></script>
  153. <script src="<?= STATIC_URL ?>/ui/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
  154. <script src="<?= STATIC_URL ?>/ui/js/inspinia.js"></script>
  155. <script src="<?= STATIC_URL ?>/ui/js/plugins/pace/pace.min.js"></script>
  156. <script src="<?= STATIC_URL ?>/ui/js/plugins/toastr/toastr.min.js"></script>
  157. <script src="<?= STATIC_URL ?>/ui/js/plugins/datapicker/bootstrap-datepicker.js"></script>
  158. <script src="<?= STATIC_URL ?>/ui/js/plugins/validate/jquery.validate.min.js"></script>
  159. <script src="<?= STATIC_URL ?>/ui/js/plugins/validate/additional-methods.min.js"></script>
  160. <script src="<?= STATIC_URL ?>/ui/js/plugins/validate/messages.cn.js"></script>
  161. <!-- iCheck -->
  162. <script src="<?= STATIC_URL ?>/ui/js/plugins/iCheck/icheck.min.js"></script>
  163. <script src="<?= STATIC_URL ?>/ui/js/plugins/select2/select2.full.min.js"></script>
  164. <script>
  165. $(document).ready(function () {
  166. $('.i-checks').iCheck({
  167. checkboxClass: 'icheckbox_square-green',
  168. radioClass: 'iradio_square-green'
  169. });
  170. $('.data').datepicker({
  171. startView: 1,
  172. todayBtn: "linked",
  173. keyboardNavigation: true,
  174. forceParse: false,
  175. autoclose: true,
  176. format: "yyyy-mm-dd"
  177. });
  178. $(".select2").select2();
  179. $("#kefu").click(function () {
  180. window.open('http://crm2.qq.com/page/portalpage/wpa.php?uin=800800642&aty=1&a=0&curl=&ty=1', '_blank', 'width=760,height=430,top=0px,left=0px');
  181. });
  182. findNotReadCount();
  183. showLastUnreadNotice();
  184. });
  185. function findNotReadCount() {
  186. $.ajax({
  187. type: "GET",
  188. url: "<?= Url::to(['notice/find-not-read-count']) ?>",
  189. data: $('#form').serialize(),
  190. dataType: "text",
  191. beforeSend: function () {
  192. },
  193. success: function (data) {
  194. if (data != "0") {
  195. $("#findNotReadCount").html(data + "未读");
  196. }
  197. },
  198. complete: function (XMLHttpRequest, textStatus) {
  199. },
  200. error: function () {
  201. }
  202. });
  203. }
  204. function showLastUnreadNotice() {
  205. if (location.pathname === '/ib/notice' || location.pathname.indexOf('/ib/notice/') === 0) {
  206. return;
  207. }
  208. $.get('<?= Url::to(['notice/last-unread-notice']) ?>', {}, function (response) {
  209. if (response.code == 1 && response.data.notice) {
  210. $('#myModal .modal-title-a').html(response.data.notice.title);
  211. $('#myModal .modal-title-a').attr('href', '/ib/notice/nview?id=' + response.data.notice.id);
  212. $('#myModal .modal-body').html(response.data.notice.content);
  213. $('#myModal').modal();
  214. $('#myModal .modal-title-a').on('click', function () {
  215. $('#myModal').modal('hide');
  216. });
  217. }
  218. }, 'json');
  219. }
  220. </script>
  221. <script>
  222. var url = location.href;
  223. if (url.indexOf("/dashboard") != -1) {
  224. $("#navdashboard").addClass("active");
  225. } else if (url.indexOf("/dw") != -1) {
  226. $("#navdw").addClass("active");
  227. } else if (url.indexOf("/lever") != -1) {
  228. $("#navlever").addClass("active");
  229. } else if (url.indexOf("/transfer") != -1) {
  230. $("#navtransfer").addClass("active");
  231. } else if (url.indexOf("/bankdeposit") != -1) {
  232. $("#navbankdeposit").addClass("active");
  233. } else if (url.indexOf("/notice") != -1) {
  234. $("#navnotice").addClass("active");
  235. } else if (url.indexOf("/nview") != -1) {
  236. $("#navnotice").addClass("active");
  237. } else if (url.indexOf("/r") != -1) {
  238. $("#navr").addClass("active");
  239. } else if (url.indexOf("/help") != -1) {
  240. $("#navhelp").addClass("active");
  241. }
  242. </script>
  243. <script>
  244. // 对Date的扩展,将 Date 转化为指定格式的String
  245. // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
  246. // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
  247. // 例子:
  248. // (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
  249. // (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
  250. Date.prototype.Format = function (fmt) { //author: meizz
  251. var o = {
  252. "M+": this.getMonth() + 1, //月份
  253. "d+": this.getDate(), //日
  254. "h+": this.getHours(), //小时
  255. "m+": this.getMinutes(), //分
  256. "s+": this.getSeconds(), //秒
  257. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  258. "S": this.getMilliseconds() //毫秒
  259. };
  260. if (/(y+)/.test(fmt))
  261. fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  262. for (var k in o)
  263. if (new RegExp("(" + k + ")").test(fmt))
  264. fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  265. return fmt;
  266. };
  267. function timeStamp2String(time) {
  268. time += new Date().getTimezoneOffset() * 60 * 1000;
  269. var datetime = new Date();
  270. datetime.setTime(parseInt(time));
  271. var year = datetime.getFullYear();
  272. var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
  273. var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
  274. var hour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
  275. var minute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
  276. var second = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
  277. return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
  278. }
  279. function timeStamp2StringForEcharts(time) {
  280. time += new Date().getTimezoneOffset() * 60 * 1000;
  281. var datetime = new Date();
  282. datetime.setTime(parseInt(time));
  283. var year = datetime.getFullYear();
  284. var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
  285. var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
  286. var hour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
  287. var minute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
  288. var second = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
  289. //return year + "/" + month + "/" + date + " " + hour + ":" + minute + ":" + second;
  290. return month + "/" + date + " " + hour + ":" + minute;
  291. }
  292. function timeStamp2StringMin(time) {
  293. time += new Date().getTimezoneOffset() * 60 * 1000;
  294. var datetime = new Date();
  295. datetime.setTime(parseInt(time));
  296. var year = datetime.getFullYear();
  297. var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
  298. var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
  299. var hour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
  300. var minute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
  301. var second = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
  302. //return hour + ":" + minute + ":" + second;
  303. return hour + ":" + minute;
  304. }
  305. </script>
  306. <?= isset($this->blocks['left_menu_script']) ? trim($this->blocks['left_menu_script']) : '' ?>
  307. <?= isset($this->blocks['footer_script']) ? trim($this->blocks['footer_script']) : '' ?>
  308. </body>
  309. </html>
  310. <?php $this->endPage() ?>