m_Orchestrate learning system---十七、页面美观的关键是什么

一、总结

一句话总结:图片用好看的

1、项目板块化?

就是一个个模块,能复用的话很快的

页面由这一个个模块拼装而成

2、通过jquery添加class方法来实现使导航栏出现的效果?

 1 <script>
2 $(function(){
3
4 // 动态计算列表文字样式
5 auto_resize();
6 $(window).resize(function() {
7 auto_resize();
8 });
9 $('.am-list-thumb img').load(function(){
10 auto_resize();
11 });
12
13 $('.am-list > li:last-child').css('border','none');
14 function auto_resize(){
15 $('.pet_list_one_nr').height($('.pet_list_one_img').height());
16
17 }
18 $('.pet_nav_gengduo').on('click',function(){
19 $('.pet_more_list').addClass('pet_more_list_show');
20 });
21 $('.pet_head_gd_ico').on('click',function(){
22 $('.pet_more_list').addClass('pet_more_list_show');
23 });
24 $('.pet_more_close').on('click',function(){
25 $('.pet_more_list').removeClass('pet_more_list_show');
26 });
27 });
28
29 </script>

3、页面内跳转?

<div data-am-widget="gotop" class="am-gotop am-gotop-fixed">
<a href="#top" title=""> <img class="am-gotop-icon-custom"
src="__STUDENT__/img/goTop.png" />
</a>
</div> <div class="pet_mian" id="top">

与目标处直接用id定义位置,跳转处在a标签的href属性中用#访问id即可

4、关于session和cookie?

1、在index(前台)模块登录成功的时候记录cookie和session

if($res){
//5、登录成功,将数据存入cookie和session
//5.1、将登录信息写入session
session('id', $res['id']);
session('username', $res['username']);
session('password', $res['password']);
//5.2、设置cookie
cookie('id', $res['id'], 3600);
cookie('username', $res['username'], 3600);
cookie('password', $res['password'], 3600);
if($data['status']) $this->success("即将跳转到老师界面!!",url('teacher/index/index'));
else $this->success("即将跳转到学生界面!!",url('student/index/index'));
}

2、其它用到cookie和session的位置

页面 {$Request.session.username}

控制器 session('username')

3、权限验证(Base控制器)中需要来判断系统中是否有cookie和session来确定是否已经登录了系统

public function _initialize()
{
if(!session('username')){
//如果cookie存在的话
if(cookie('username')){
//设置session
session('id', cookie('id'));
session('username',cookie('username'));
session('password', cookie('password'));
// dump(cookie('username'));die;
return;
}
$this->error('您尚未登录系统',url('index/login/login'));
}
}

4、退出登录时销毁cookie和session中的数据

public function logout(){
session(null);
cookie('id', null);
cookie('username', null);
cookie('password', null);
//退出登录清空session之后要成功跳转
$this->success('退出系统成功',url('index/index/index'));
}

5、mysql解决设置默认值不显示问题(它不是为空么,你不让它为空就好)?

已有test表,表中有个case_status字段,现在给该字段设置默认值为A:

ALTER TABLE test ALTER COLUMN case_status SET DEFAULT 'A';
在定义表的时候设置字段的default就可以了,比如:
ALTER TABLE tb1
CHANGE `type` `type` INT DEFAULT 0 NOT NULL

6、页面板块信息非常清楚,添加板块,删除板块啥的非常轻松?

比如说在个人信息和底部之间添加推荐板块,非常方便,而且丝毫丝毫不影响界面

添加板块啥的非常清楚

7、添加的板块用div容器包起来(结构清晰)?

比如说这里的修改个人信息

<div><a href="" class="am-fr am-btn am-btn-primary am-round" style="margin: 10px;">修改个人信息</a></div>

或者别的添加的板块,都用div包起来,这样结构异常清晰

8、论页面图片对页面美观的影响力?

二、内容在总结中

m_Orchestrate learning system---十七、页面美观的关键是什么的更多相关文章

  1. m_Orchestrate learning system---二十七、修改时如何快速找到作用位置

    m_Orchestrate learning system---二十七.修改时如何快速找到作用位置 一.总结 一句话总结:找人,找起作用的位置真的重要,找到就事半功倍了 加载页面的时候观察在f12的e ...

  2. m_Orchestrate learning system---九、在无法保证是否有图片的情况下,如何保证页面格式

    m_Orchestrate learning system---九.在无法保证是否有图片的情况下,如何保证页面格式 一.总结 一句话总结:都配上默认缩略图就可以解决了 1.如何获取页面get方式传过来 ...

  3. m_Orchestrate learning system---二十五、复制类的时候最容易出现的错误是什么

    m_Orchestrate learning system---二十五.复制类的时候最容易出现的错误是什么 一.总结 一句话总结:命名空间错误导致Analyze类虽然继承了Base类,但是没有执行里面 ...

  4. Machine Learning - 第6周(Advice for Applying Machine Learning、Machine Learning System Design)

    In Week 6, you will be learning about systematically improving your learning algorithm. The videos f ...

  5. m_Orchestrate learning system---mo系统权限思考

    m_Orchestrate learning system---mo系统权限思考 一.总结 一句话总结:注意不同身份访问同一客户端时候的权限,比如面板显示,比如功能按钮 权限 面板 功能 1.小组之间 ...

  6. m_Orchestrate learning system---三十五、php数据和js数据的解耦:php数据(php代码)不要放到js代码中

    m_Orchestrate learning system---三十五.php数据和js数据的解耦:php数据(php代码)不要放到js代码中 一.总结 一句话总结:也就是以html为中介,用html ...

  7. m_Orchestrate learning system---三十四、使用重定义了$的插件的时候最容易出现的问题是什么

    m_Orchestrate learning system---三十四.使用重定义了$的插件的时候最容易出现的问题是什么 一.总结 一句话总结:如下面这段代码,定义了$的值,还是会习惯性的把$当成jQ ...

  8. m_Orchestrate learning system---三十三、公共变量多弄成全局变量

    m_Orchestrate learning system---三十三.公共变量多弄成全局变量 一.总结 一句话总结:比如班级id,小组id,这样省事,而且减少数据库的访问,加快访问速度,而且节约代码 ...

  9. m_Orchestrate learning system---三十二、数据库字段判断为空时容易出现问题,如何从根本上解决这个问题

    m_Orchestrate learning system---三十二.数据库字段判断为空时容易出现问题,如何从根本上解决这个问题 一.总结 一句话总结:字段禁止为空,设置默认值0即可 禁止 空 默认 ...

随机推荐

  1. 使用Handler在子线程中更新UI

    Android规定仅仅能在主线程中更新UI.假设在子线程中更新UI 的话会提演示样例如以下错误:Only the original thread that created a view hierach ...

  2. mybatis使用generator自己主动生成代码时的类型转换

    使用mybatis的generator自己主动生成代码,可是oracle数据库中number(6,2)总是自己主动转成BigDecimal.我想要转成的是float类型 这样就写了一个类型转换器,须要 ...

  3. Swift3.0 闭包整理

    语法表达式 一般形式:{             (parameters) -> returnType in              statements            } 这里的参数 ...

  4. 杂项-DB:数据挖掘

    ylbtech-杂项-DB:数据挖掘 数据挖掘(Data mining)又译为资料探勘.数据采矿.它是数据库知识发现(英语:Knowledge-Discovery in Databases,简称:KD ...

  5. 杂项:ExtJS

    ylbtech-杂项:ExtJS extjs是一种软件.自动生成行号,支持checkbox全选,动态选择显示哪些列,支持本地以及远程分页,可以对单元格按照自己的想法进行渲染,这些也算可以想到的功能. ...

  6. angular 兼容ie11 ie11兼容

    兼容一(new Date()用法) new Date('2018-01-01 00:00:00').getHours(); new Date('2018-01-01 00:00:00').getMin ...

  7. HTML5 CSS3面试题

    一.CSS3有哪些新特性? 1. CSS3实现圆角(border-radius),阴影(box-shadow), 2. 对文字加特效(text-shadow.),线性渐变(gradient),旋转(t ...

  8. 使用DWR实现JS调用服务端Java代码

    DWR简介 DWR全称Direct Web Remoting,是一款非常优秀的远程过程调用(Remote Procedure Call)框架,通过浏览器提供的Ajax引擎实现在前端页面的JS代码中调用 ...

  9. 杭电 2817 A sequence of numbers【快速幂取模】

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2817 解题思路:arithmetic or geometric sequences 是等差数列和等比数 ...

  10. day16 闭包以及装饰器(好东西)

    目录 闭包 装饰器 最基础的装饰器 完善装饰器 有返回值的 有参数的 装饰器模版 语法糖 登录装饰器 可变类型的局部变量可以修改全局变量 三层装饰器 闭包 首先要理解函数对象的概念,其实函数名就相当于 ...