美文网首页
crov首页、搜索、产品详情、购物车-alecandria

crov首页、搜索、产品详情、购物车-alecandria

作者: smartHui | 来源:发表于2019-05-29 17:32 被阅读0次

1、首页index.vm引入所有的需要的js,重点看一下几个js:

Alexandria下的global.js(引用logSend.js)

slideNav.js(shenyang)

loginDialog.js

home.js(qinfan)

发现项目中现有问题如下:

1、js文件命名以及css文件命名和文件夹命名,需同velocity层级保持一致,但现有的home.js以及velocity中index文件夹名不一致

2、common文件夹下的scss文件,定义的keyframes函数,从未被调用过

学习知识点:

1、e.target.tagName;//"DIV" ,获取的html元素

      e.which;//1;鼠标移出

2、 通过判断是否支持触摸,支持触摸的设备大都都是移动端。

var tap = 'ontouchend' in document ? 'touchend':'mousedown'; //为true就是移动端

用ontouchend的原因是,ontouchend相对于ontouchstart、ontouchmove、ontouchcancel来说长度最短。

      知识扩展:通过判断用户代理字符串中是否包含mobile关键字

       if (/mobile/i.test(navigator.userAgent)) {

             // 移动端

        }

3、$.isFunction(value) ;//判断value是不是对象

4、轮播图Swiper组件

鼠标事件'mouseenter' , 'mouseleave'

5、More tools

Google现在dom层级

相关文章

网友评论

      本文标题:crov首页、搜索、产品详情、购物车-alecandria

      本文链接:https://www.haomeiwen.com/subject/xfvetctx.html