lrf 2 年之前
父節點
當前提交
7f95db850b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/service/user/user.js

+ 1 - 1
app/service/user/user.js

@@ -115,7 +115,7 @@ class UserService extends CrudService {
   async toBindPhone({ id, phone }) {
     const code = _.random(100000, 999999);
     const value = `${phone}${this.conenctCode}${code}`;
-    await this.redis.set(`${this.bindPhoneKey}${id}`, value); // , 'EX', 300
+    await this.redis.set(`${this.bindPhoneKey}${id}`, value, 'EX', 300);
     // 发短信
     const data = { config: this.smsServiceConfig, template: 'bind', phone, params: { code } };
     const url = `${this.smsServiceUrl}/sendMessage`;