chat_enlarge.addEventListener('touchend', function(event) {
            if(fingers == 1){
                event.preventDefault();
                // 如果长按事件超过 1秒,则提示弹出是否保存框
                if((new Date()).getTime() - startTime > 1 * 1000){
                    // 调用原生方法保存图片
                    //二次确认判断
                    _TTPopups.open2({
                        content:"您确定要保存图片吗?",
                        cancelBtn:"否",
                        submitBtn:"是",
                        closeCallBack:"saveIMG"
                      });
                } else {
                    // 长按时间过短则隐藏图片显示层
                    document.body.removeChild(document.getElementById("chat_enlarge"));
                    document.body.removeChild(document.getElementById("maskId"));
                    // 去除滚动条不可滚动的限制
                    document.ontouchmove = function(e){}
                }
            }
}, false);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案