为了账号安全,请及时绑定邮箱和手机立即绑定

请问各位大神为什么报错?

请问各位大神为什么报错?

何荷i 2016-12-14 15:57:46
options:{            startX: null            startY: null        };          touchStart: function(event){          var self = touchMain;            try{                var touch = event.touches[0], //获取第一个触点                    x = Number(touch.pageX), //页面触点X坐标                    y = Number(touch.pageY); //页面触点Y坐标                //记录触点初始位置                self.options.startX = x;                self.options.startY = y;            }catch(e){                console.log(e.message)            }        }                /**         * 滑动时判断下滑、上滑         * @param  {[type]} event                 * @param  {[type]} upcallback   [上滑回调函数]         * @param  {[type]} downcallback [下滑回调函数]         */        touchMove: function(event,upcallback,downcallback){            var self = touchMain;            try{                var touch = event.touches[0], //获取第一个触点                    x = Number(touch.pageX), //页面触点X坐标                    y = Number(touch.pageY); //页面触点Y坐标                                //判断滑动方向                if (y - self.options.startY > 0) {                    //console.log('下滑了!');                    downcallback && downcallback();                }else{                    //alert('上滑了!');                    upcallback && upcallback();                }            }catch(e){                console.log('滑动时出错:',e.message)            }        }        //下滑显示、上滑隐藏            require(['touch'],function(){                var $getTicktImgSection = $('#near_main');                document.addEventListener('touchstart',window.touchMain.touchStart,false);                document.addEventListener('touchmove',function(event){                    window.touchMain.touchMove(event,function(){//上滑                        $getTicktImgSection.hide();                        $getTicktImgSection.css({"padding-top":"0px"});                    },function(){//下滑                        $getTicktImgSection.show();                        $getTicktImgSection.css({"padding-top":"40px"});                    })                },false);            })
查看完整描述

1 回答

?
杰杰就是我

TA贡献32条经验 获得超24个赞

说是面向对象 不是面向对象, 说是定义了方法,又不是定义了方法  ,  注意 ' , ' 和  ' ; '的使用 

查看完整回答
反对 回复 2016-12-15
  • 1 回答
  • 0 关注
  • 1461 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信