64], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'cx_mch_id' => '平台商户ID', 'type' => '类型,0=阿里云,1=腾讯云', 'access_key_id' => '阿里云AccessKeyId', 'access_secret' => '阿里云AccessSecret', 'secret_id' => '腾讯短信SecretId', 'secret_key' => '腾讯短信SecretKey', 'sdk_app_id' => '腾讯短信应用ID', 'sign_name' => '签名', 'expire_time' => '有效时长', 'time_delay' => '获取时间间隔', 'day_limit' => '每日获取验证码次数', 'is_prod' => '环境,0=非正式,1=正式环境', 'code_len' => '验证码长度', 'super_code' => '超级验证码,默认6666', ]; } public function beforeSave($insert) { if(parent::beforeSave($insert)){ if($this->isNewRecord){ } return true; } else { return false; } } public static function getType($type) { $labels = self::typeLabels(); return isset($labels[$type]) ? $labels[$type] : "未知"; } public static function typeLabels() { return [ '0' => '阿里云', '1' => '腾讯云', ]; } }