zhengjinyi 5 年之前
父节点
当前提交
6e3e6dd3f5
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      App.vue

+ 9 - 1
App.vue

@@ -62,7 +62,15 @@
 			refresh(){
 				let TIME = (20*60)*1000;
 				setInterval(()=>{
-					wxLogin.wxLoginAuthorize()
+					authorize.getSetting().then(res =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+						if(res == 1){
+							wxLogin.wxLoginAuthorize()
+						}else{
+							console.log('授权失败============>:'+'用户取消授权或者未操作')
+						}
+					}).catch(error=>{
+						console.log('授权失败============>:'+'用户授权失败,提醒用户重新授权')
+					})
 				},TIME)
 			}
 		},