@@ -43,7 +43,8 @@ export default {
isLogin:false,
phone:'',
code:'',
- time:0
+ time:0,
+
}
},
watch:{
@@ -64,6 +65,7 @@ export default {
senCode(){
if(this.phone.length !== 11){
tools.error('请输入手机号码')
+ tools.vibrate()
return false
this.time=60
@@ -176,6 +176,20 @@ tools.platformType = function () {
+/**
+ * 手机震动
+ */
+tools.vibrate=function (){
+ console.log('vibrate')
+ // #ifndef H5
+ uni.vibrate({
+ success: function () {
+ console.log('success');
+ }
+ });
+ //#endif
+}
/**
* 获取开发平台