|
@@ -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`;
|