Commit 90f65c7c authored by xiabin's avatar xiabin

修改model

parent 8799babc
...@@ -15,7 +15,7 @@ return [ ...@@ -15,7 +15,7 @@ return [
], ],
'db' => [ 'db' => [
'class' => 'yii\db\Connection', 'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=192.168.1.185;dbname=zuiketang1', 'dsn' => 'mysql:host=192.168.1.185;dbname=zuiketang',
'username' => 'root', 'username' => 'root',
'password' => 'mysql123', 'password' => 'mysql123',
'charset' => 'utf8', 'charset' => 'utf8',
......
...@@ -50,7 +50,6 @@ class Message ...@@ -50,7 +50,6 @@ class Message
$content .= ' ' . Yii::$app->params['msg.signature']; $content .= ' ' . Yii::$app->params['msg.signature'];
$this->query['mobile'] = $telephones; $this->query['mobile'] = $telephones;
$this->query['content'] = $content; $this->query['content'] = $content;
return FALSE;
try { try {
$response = $this->httpClient->request('GET', $this->hosts, [ $response = $this->httpClient->request('GET', $this->hosts, [
'form_params' => $this->query 'form_params' => $this->query
......
...@@ -21,8 +21,8 @@ use yii\web\IdentityInterface; ...@@ -21,8 +21,8 @@ use yii\web\IdentityInterface;
* @property string $avatar * @property string $avatar
* @property string $wx_open_id * @property string $wx_open_id
* @property string $ip * @property string $ip
* @property string $create_at * @property string $created_at
* @property string $update_at * @property string $updated_at
* @property string $logged_at * @property string $logged_at
* *
* @property BrowseRecord[] $browseRecords * @property BrowseRecord[] $browseRecords
...@@ -62,8 +62,8 @@ class User extends ActiveRecord implements IdentityInterface ...@@ -62,8 +62,8 @@ class User extends ActiveRecord implements IdentityInterface
[ [
'class' => TimestampBehavior::className(), 'class' => TimestampBehavior::className(),
'attributes' => [ 'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['create_at', 'update_at'], ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['update_at'], ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
], ],
// if you're using datetime instead of UNIX timestamp: // if you're using datetime instead of UNIX timestamp:
// 'value' => new Expression('NOW()'), // 'value' => new Expression('NOW()'),
...@@ -78,7 +78,7 @@ class User extends ActiveRecord implements IdentityInterface ...@@ -78,7 +78,7 @@ class User extends ActiveRecord implements IdentityInterface
return [ return [
[['username', 'auth_key', 'password_hash', 'telephone', 'ip', 'logged_at'], 'required'], [['username', 'auth_key', 'password_hash', 'telephone', 'ip', 'logged_at'], 'required'],
[['role', 'status'], 'integer'], [['role', 'status'], 'integer'],
[['create_at', 'update_at', 'logged_at'], 'safe'], [['created_at', 'updated_at', 'logged_at'], 'safe'],
[['username', 'auth_key', 'wx_open_id', 'ip'], 'string', 'max' => 32], [['username', 'auth_key', 'wx_open_id', 'ip'], 'string', 'max' => 32],
[['password_hash'], 'string', 'max' => 255], [['password_hash'], 'string', 'max' => 255],
['password_reset_token', 'string', 'max' => 32], ['password_reset_token', 'string', 'max' => 32],
...@@ -106,8 +106,8 @@ class User extends ActiveRecord implements IdentityInterface ...@@ -106,8 +106,8 @@ class User extends ActiveRecord implements IdentityInterface
'avatar' => 'avatar', 'avatar' => 'avatar',
'wx_open_id' => 'wx_open_id', 'wx_open_id' => 'wx_open_id',
'ip' => 'ip', 'ip' => 'ip',
'create_at' => 'create_at', 'created_at' => 'created_at',
'update_at' => 'update_at', 'updated_at' => 'updated_at',
'logged_at' => 'logged_at', 'logged_at' => 'logged_at',
]; ];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment