"ID", 'store_id' => "商户ID", 'auth' => "授权", 'auth_app_id' => "小程序ID", 'is_cancel' => "是否取消授权", "is_merchant"=> "是否为商户", "license_no"=> "营业执照编号", "license_pic"=> "营业执照", "app_name"=> "小程序名称", "app_english_name"=> "小程序英文名称", "app_slogan"=> "小程序应用简介", "app_logo"=> "小程序LOGO", "app_desc"=> "小程序应用描述", "aweme_id"=> "引导关注抖音号", "service_phone"=> "客服手机号", "service_email"=> "客服邮箱", "mini_categoryIds"=> "分类ID", "license_name"=> "营业执照名称", "license_date"=> "有效期", "category_name"=> "分类名称", "is_long_effective"=> "是否长期有效", "legal_personal_name"=> "商家法人名称", "contact_name"=> "商家联系人名称", "category_data"=> "分类数据", "store_face_photo"=> "门头照", "is_get_phone"=> "获取手机号权限状态", "apply_phone_msg"=> "申请手机号信息资料", "apply_phone_fail"=> "申请手机号失败信息", 'other_data'=> "其他申请资料", 'is_use' => "是否使用", 'bind_food_qr' => "是否绑定点餐码" ]; } public static function authUpdate($mini_id, $auth) { $appid = $auth['authorizer_appid']; if($mini_id){ $mini = self::findOne($mini_id); }else{ $mini = self::findOne(['auth_app_id' => $appid]); } if(!$mini){ $mini = new StoreDouyinMini(); $mini->auth_app_id = $appid; } $init = 1; if((empty($mini->auth) || empty($mini->app_name)) && $auth){ $init = 1; } $auth && $mini->auth = json_encode($auth); $auth['store_id'] && $mini->store_id = $auth['store_id']; if($mini->save()){ return [ 'code' => 0, 'data' => $mini, ]; }else{ \Yii::error(array_shift($mini->getFirstErrors())); return [ 'code' => 0, 'data' => $mini, 'msg' => 'StoreDouyinMini数据保存失败,' . array_shift($mini->getFirstErrors()), ]; } } }