移动端触摸事件

touchstart事件:当手指触摸屏幕时候触发,即使已经有一个手指放在屏幕上也会触发。

touchmove事件:当手指在屏幕上滑动的时候连续地触发。在这个事件发生期间,调用preventDefault()事件可以阻止滚动。

touchend事件:当手指从屏幕上离开的时候触发。

图形验证码:

 <img class="get_verification" @click="getCaptcha" src="http://localhost:4000/captcha" alt="captcha">
   "http://localhost:4000/captcha"是后台提供的接口
点击图形验证码获取动态的图形
methods:{
   getCaptcha(event){
        event.target.src="http://localhost:4000/captcha?time="+Date.now()
  }
}
 
容联云通讯:可以在模拟发送短信验证码  https://www.yuntongxun.com/?ly=baidu-pz-p&qd=cpc&cp=ppc&xl=null&kw=10360228
 
 
[RECEIVE_ADDCOUNT](state, { food }) {
        if (food.count) {
            food.count++

        } else {
            Vue.set(food, 'count', 1)           //让新增的属性也有属性绑定   food是源数据,count是键,1是value
        }
    },
    [RECEIVE_DESCOUNT](state, { food }) {
        if (food.count > 0) {
            food.count--
        }
    }
原文地址:https://www.cnblogs.com/licchang/p/12601156.html