|
@@ -73,6 +73,21 @@ class Auth
|
|
|
$this->wechat->login('component/auth.oauth');
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 定期获取oauth的token 用户token
|
|
|
+ *
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function cron()
|
|
|
+ {
|
|
|
+ $user = Dever::db('component/user')->state();
|
|
|
+ if ($user) {
|
|
|
+ foreach ($user as $k => $v) {
|
|
|
+ $wechat->oauth($v['oauth_id'], 2000, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取oauth的token 用户token
|
|
|
*
|