256], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'cx_mch_id' => '平台商户ID', 'name' => '小程序名称', 'app_id' => 'AppId', 'app_secret' => 'AppSecret', 'desc' => '描述', 'mch_id' => '商户ID', 'key' => 'ApiKeyv2', 'cert_pem' => '微信支付CertPem', 'key_pem' => '微信支付KeyPem', 'is_delete' => '是否删除', 'created_at' => '添加时间', 'key_three' => 'ApiKeyv3', ]; } public function beforeSave($insert) { if(parent::beforeSave($insert)){ if($this->isNewRecord){ $this->created_at = time(); } return true; } else { return false; } } }