xxxrrrdddd 3 years ago
parent
commit
7708562ed0

+ 27 - 0
application/sub/controller/Index.php

@@ -13,4 +13,31 @@ class Index extends SubCommon
     {
         return $this->view->fetch();
     }
+    public function main(){
+
+    }
+    public function menu(){
+        return [
+            [
+                "title"=>"后台首页",
+	            "icon"=>"icon-computer",
+	            "href"=>url('index/main'),
+	            "spread"=>false,
+            ],
+            [
+                "title"=>"订单管理",
+                "icon"=>"icon-loginout",
+                "href"=>'',
+                "spread"=>false,
+                'children'=>[
+                    [
+                        "title"=>"号码商城",
+                        "icon"=>"icon-dengji3",
+                        "href"=>url('order/mobile'),
+                        "spread"=>false,
+                    ]
+                ]
+            ],
+        ];
+    }
 }

+ 18 - 0
application/sub/controller/Order.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace app\sub\controller;
+
+
+use app\common\model\Attachment;
+use think\Cookie;
+use think\Hook;
+use think\Validate;
+
+/**
+ * 会员中心
+ */
+class Order extends SubCommon
+{
+    protected $noNeedLogin=[];
+    protected $noNeedRight="*";
+}

+ 2 - 2
application/sub/view/index/index.html

@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8">
-    <title>layui后台管理模板</title>
+    <title>分站管理系统</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta http-equiv="Access-Control-Allow-Origin" content="*">
@@ -65,7 +65,7 @@
             </ul>
             <div class="layui-tab-content clildFrame">
                 <div class="layui-tab-item layui-show">
-                    <iframe src="page/main.html"></iframe>
+                    <iframe src="{:url('main')}"></iframe>
                 </div>
             </div>
         </div>

+ 2 - 101
public/assets/sub/js/index.js

@@ -8,7 +8,7 @@ layui.config({
 		$ = layui.jquery;
 		tab = layui.bodyTab({
 			openTabNum : "50",  //最大可打开窗口数量
-			url : "json/navs.json" //获取菜单json地址
+			url : "menu" //获取菜单json地址
 		});
 
 	//更换皮肤
@@ -141,55 +141,6 @@ layui.config({
 	//渲染左侧菜单
 	tab.render();
 
-	//锁屏
-	function lockPage(){
-		layer.open({
-			title : false,
-			type : 1,
-			content : '	<div class="admin-header-lock" id="lock-box">'+
-							'<div class="admin-header-lock-img"><img src="images/face.jpg"/></div>'+
-							'<div class="admin-header-lock-name" id="lockUserName">请叫我马哥</div>'+
-							'<div class="input_btn">'+
-								'<input type="password" class="admin-header-lock-input layui-input" autocomplete="off" placeholder="请输入密码解锁.." name="lockPwd" id="lockPwd" />'+
-								'<button class="layui-btn" id="unlock">解锁</button>'+
-							'</div>'+
-							'<p>请输入“123456”,否则不会解锁成功哦!!!</p>'+
-						'</div>',
-			closeBtn : 0,
-			shade : 0.9
-		})
-		$(".admin-header-lock-input").focus();
-	}
-	$(".lockcms").on("click",function(){
-		window.sessionStorage.setItem("lockcms",true);
-		lockPage();
-	})
-	// 判断是否显示锁屏
-	if(window.sessionStorage.getItem("lockcms") == "true"){
-		lockPage();
-	}
-	// 解锁
-	$("body").on("click","#unlock",function(){
-		if($(this).siblings(".admin-header-lock-input").val() == ''){
-			layer.msg("请输入解锁密码!");
-			$(this).siblings(".admin-header-lock-input").focus();
-		}else{
-			if($(this).siblings(".admin-header-lock-input").val() == "123456"){
-				window.sessionStorage.setItem("lockcms",false);
-				$(this).siblings(".admin-header-lock-input").val('');
-				layer.closeAll("page");
-			}else{
-				layer.msg("密码错误,请重新输入!");
-				$(this).siblings(".admin-header-lock-input").val('').focus();
-			}
-		}
-	});
-	$(document).on('keydown', function() {
-		if(event.keyCode == 13) {
-			$("#unlock").click();
-		}
-	});
-
 	//手机设备的简单适配
 	var treeMobile = $('.site-tree-mobile'),
 		shadeMobile = $('.site-mobile-shade')
@@ -212,42 +163,6 @@ layui.config({
 		$(this).parent("li").siblings().removeClass("layui-nav-itemed");
 	})
 
-	//公告层
-	function showNotice(){
-		layer.open({
-	        type: 1,
-	        title: "系统公告",
-	        closeBtn: false,
-	        area: '310px',
-	        shade: 0.8,
-	        id: 'LAY_layuipro',
-	        btn: ['火速围观'],
-	        moveType: 1,
-	        content: '<div style="padding:15px 20px; text-align:justify; line-height: 22px; text-indent:2em;border-bottom:1px solid #e2e2e2;"><p>最近偶然发现贤心大神的layui框架,瞬间被他的完美样式所吸引,虽然功能不算强大,但毕竟是一个刚刚出现的框架,后面会慢慢完善的。很早之前就想做一套后台模版,但是感觉bootstrop代码的冗余太大,不是非常喜欢,自己写又太累,所以一直闲置了下来。直到遇到了layui我才又燃起了制作一套后台模版的斗志。由于本人只是纯前端,所以页面只是单纯的实现了效果,没有做服务器端的一些处理,可能后期技术跟上了会更新的,如果有什么问题欢迎大家指导。谢谢大家。</p><p>在此特别感谢Beginner和Paco,他们写的框架给了我很好的启发和借鉴。希望有时间可以多多请教。</p></div>',
-	        success: function(layero){
-				var btn = layero.find('.layui-layer-btn');
-				btn.css('text-align', 'center');
-				btn.on("click",function(){
-					window.sessionStorage.setItem("showNotice","true");
-				})
-				if($(window).width() > 432){  //如果页面宽度不足以显示顶部“系统公告”按钮,则不提示
-					btn.on("click",function(){
-						layer.tips('系统公告躲在了这里', '#showNotice', {
-							tips: 3
-						});
-					})
-				}
-	        }
-	    });
-	}
-	//判断是否处于锁屏状态(如果关闭以后则未关闭浏览器之前不再显示)
-	if(window.sessionStorage.getItem("lockcms") != "true" && window.sessionStorage.getItem("showNotice") != "true"){
-		showNotice();
-	}
-	$(".showNotice").on("click",function(){
-		showNotice();
-	})
-
 	//刷新后还原打开的窗口
 	if(window.sessionStorage.getItem("menu") != null){
 		menu = JSON.parse(window.sessionStorage.getItem("menu"));
@@ -263,7 +178,7 @@ layui.config({
 				}
 			}
 			openTitle += '<cite>'+menu[i].title+'</cite>';
-			openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="'+menu[i].layId+'">&#x1006;</i>';
+			openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="'+menu[i].layId+'" data-url="'+menu[i].href+'">&#x1006;</i>';
 			element.tabAdd("bodyTab",{
 				title : openTitle,
 		        content :"<iframe src='"+menu[i].href+"' data-id='"+menu[i].layId+"'></frame>",
@@ -352,17 +267,3 @@ function addTab(_this){
 	tab.tabAdd(_this);
 }
 
-//捐赠弹窗
-function donation(){
-	layer.tab({
-		area : ['260px', '367px'],
-		tab : [{
-			title : "微信",
-			content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/wechat.jpg'></div>"
-		},{
-			title : "支付宝",
-			content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/alipay.jpg'></div>"
-		}]
-	})
-}
-