After following, you can keep track of his dynamic information in a timely manner
Courses in the relevant section:Encapsulate database access class
数据需要插入一个信息,视频中创建数据表后未添加数据,这个地方有差别
2018-08-160个赞
Courses in the relevant section:Administrator login verification
D:\>cd phpStudy/www/video D:\phpStudy\WWW\video>composer require topthink/think-captcha 1.*
login.html 用户名 密码 验证码的值视频没有做的过程
2018-08-170个赞
Courses in the relevant section:Added edit admin-2
把update 写成updata导致无法更新
2018-08-190个赞
Courses in the relevant section:Video pagination
Array callback has to contain indices 0 and 1错误提示,是因为 pages($data['pageSize'])写成了pages($data('pageSize'));
2018-09-140个赞
Courses in the relevant section:Add slideshow interface and image upload
上传浏览器提示$is not defined,是script脚本里 $ = layui.jquery; 漏加了
2018-09-140个赞
Courses in the relevant section:Rendering homepage navigation tags
// 今日焦点 $today_hot_list = $this->db->table('video')->where(array('channel_id'=>2,'status'=>1))->lists(12); 最后面要使用lists,使用视频中的pages方法,就会提示为牵引数组。替换成老师做好的课件问题依旧。
2018-09-150个赞
Courses in the relevant section:List multi-condition filtering
<li <?php if(!in_array($data['label_channel'],array_keys($channel_list))){echo 'class="selected"';}?>> <a href="/index.php/index/index/cate?label_channel=0&label_charge={$data.label_charge}&label_area={$data.label_area}">全部</a> </li> {volist name="channel_list" id="channel"} <li {if condition="$data.label_channel eq $channel.id"}class="selected"{/if}> <a href="/index.php/index/index/cate?label_channel={$channel.id}&label_charge={$data.label_charge}&label_area={$data.label_area}">{$channel.title}</a> </li> {/volist} 频道列表有点BUG,老师没做,上面是做好的
2018-09-172个赞
Courses in the relevant section:Classification, definition and traversal skills of arrays
rtrim() 去除最右边的符号,
2019-01-150个赞
Courses in the relevant section:html basics
块级元素独占一行,可以设置宽高、默认浏览器高度、有行间距。行内元素可以多个并行、靠内容撑开,不可以设置宽高
2018-12-110个赞
Courses in the relevant section:Common tags and attributes (hyperlinks) in HTML
text-decoration: none; 取消链接下划线,text-decoration: underline;设置下划线;a:hover{}设置a链接的伪属性,<a href="top">页面顶部</a> 与 <a href="" name="top">回到顶部</a>做出回到顶部效果。
2018-12-110个赞
Courses in the relevant section:Common tags and attributes in HTML (list)
ul li{list-style:url(img/huangguan.png);} 列表前面插入一个图片 ul li{list-style-type: none;不显示排序前面的圆点或数字 height: 40px;width: 400px; border:1px solid #ccc; 边框 margin:5px 0px;text-align: center;line-height: 20px;} ul li:before{content: url(img/huangguan.png);margin-right: 10px;} 前面插入图片 ul li:after{content: url(img/huangguan.png);}右边插入图片
2018-12-110个赞
Courses in the relevant section:Convert block-level elements to inline elements and back
display: inline 块级元素转换成行内;display: block;行内元素转换成块级;display: inline-block;将标签转为行内块元素。
2018-12-110个赞
Courses in the relevant section:Positioning in CSS
13课 CSS的定位-相对定位和绝对定位 绝对定位要相对于父级元素,否则就会默认定位 给行内元素一个绝对定位后,它就会变成一个块级框,就不用给他display: block;来转成块级元素了。 通常在做绝对定位时,会给它的父级设置相对定位。 一般情况是结合使用,也可单独使用,单独使用时绝对元素是找body的属性。 它们是相对于水平或者垂直方向进行位移。 position: relative; 设置相对定位 position: absolute;设置绝对定位
2018-12-110个赞
Courses in the relevant section:Variables Assignment of variables and variable types
typeof 用来检测数据类型
2018-12-140个赞
//加减按钮 // siblings('input').val() 用于匹配input框里的val属性 $('.plus').click(function(){ var nowvalue=$(this).siblings('input').val() var nowvalue=parseInt(nowvalue) //把input框里的文本类型转换成整数parseInt // var currentvalue=0 //做下清零,加号这里可以不用,减号那里必须有 var currentvalue=nowvalue+1 $(this).siblings('input').val(currentvalue) // 前台单价的里面是3199元,有个中文,用parseFloat()方法只取数字 /*parents() 获得当前匹配元素集合中每个元素的祖先元素,这里是获取good-num的 祖先元素下的good-price里的html值*/ var danjia=parseFloat($(this).parents('.good-num').siblings('.good-price').html()) var xiaoji=danjia*currentvalue //在页面中输出 $(this).parents('.good-num').siblings('.good-total-price').html(xiaoji+'元') }) $('.minus').click(function(){ var nowvalue=$(this).siblings('input').val() var nowvalue=parseInt(nowvalue) //把input框里的文本类型转换成整数parseInt var currentvalue=0 //做下清零,加号这里可以不用,减号那里必须有 /*三元运算符(nowvalue<=1?)小于等于1就设置为1(?currentvalue=1) 否则:currentvalue=nowvalue-1 (nowvalue可以减-1)*/ nowvalue<=1?currentvalue=1:currentvalue=nowvalue-1 $(this).siblings('input').val(currentvalue) var danjia=parseFloat($(this).parents('.good-num').siblings('.good-price').html()) var xiaoji=danjia*currentvalue //在页面中输出 $(this).parents('.good-num').siblings('.good-total-price').html(xiaoji+'元') })
2018-12-261个赞