diff --git a/10.3.4/app/api/controller/HostController.php b/10.3.4/app/api/controller/HostController.php deleted file mode 100644 index 310e115b..00000000 --- a/10.3.4/app/api/controller/HostController.php +++ /dev/null @@ -1,18 +0,0 @@ -request->param(); - $data = [ - 'title'=>'首页-智简魔方', - ]; - - $data['template_catalog'] = 'web'; - //$tplName = empty($param['view_html'])?'index':$param['view_html']; - - if(empty($param['html'])){ - $tplName = 'index'; - }else if(!empty($param['html3'])){ - $tplName = $param['html']."/".$param['html2']."/".$param['html3']; - }else if(!empty($param['html2'])){ - $tplName = $param['html']."/".$param['html2']; - }else{ - $tplName = $param['html']; - } - - if (isset($param['theme']) && !empty($param['theme'])){ - cookie('web_theme',$param['theme']); - $data['themes'] = $param['theme']; - } elseif (cookie('web_theme')){ - $data['themes'] = cookie('web_theme'); - } else{ - $data['themes'] = configuration('web_theme'); - } - - if($tplName=='index'){ - $view_path = '../public/web/'.$data['themes'].'/'; - //header('location:/theme/index.html');die; - //$view_path = '../public/theme/'; - }else{ - $view_path = '../public/web/'.$data['themes'].'/'; - } - - if(!file_exists($view_path.$tplName)){ - $theme_config=$this->themeConfig($view_path); - if(!empty($theme_config['config-parent-theme'])){ - $view_path = '../public/web/'.$theme_config['config-parent-theme'].'/'; - } - } - - $PluginModel = new PluginModel(); - $addons = $PluginModel->plugins('addon'); - - $data['addons'] = $addons['list']; - - $config['view_path'] = $view_path; - /*if($tplName=='index'){ - $config['view_suffix'] = 'html'; - }*/ - $config['view_suffix'] = 'html'; - - View::config($config); - - return View::fetch("/".$tplName,$data); - } - - /*public function plugin() - { - $param = $this->request->param(); - $plugin_id = $param['plugin_id']; - $tplName = empty($param['view_html'])?'index':$param['view_html']; - $addon = (new PluginModel())->plugins('addon')['list']; - $addon = array_column($addon,'name','id'); - $name=parse_name($addon[$plugin_id]??''); - if(empty($name)){ - throw new TemplateNotFoundException(lang('not_found'), $name); - #exit('not found template1'); - } - $tpl = '../public/plugins/addon/'.$name.'/template/web/'; - - $data['template_catalog'] = 'web'; - - if (isset($param['theme']) && !empty($param['theme'])){ - cookie('web_theme',$param['theme']); - $data['themes'] = $param['theme']; - } elseif (cookie('web_theme')){ - $data['themes'] = cookie('web_theme'); - } else{ - $data['themes'] = configuration('web_theme'); - } - - $PluginModel = new PluginModel(); - $addons = $PluginModel->plugins('addon'); - - $data['addons'] = $addons['list']; - - if(file_exists($tpl.$tplName.".html")){ - $content=$this->view('header',$data); - $content.=$this->pluginView($tplName,$data,$name); - $content.=$this->view('footer',$data); - return $content; - }else{ - throw new TemplateNotFoundException(lang('not_found'), $tpl); - #exit('not found template'); - } - - } - - private function view($tplName, $data){ - View::config(['view_path' => '../public/web/default/', 'view_suffix' => 'html']); - return View::fetch('/'.$tplName,$data); - } - - private function pluginView($tplName, $data, $name){ - View::config(['view_path' => '../public/plugins/addon/'.$name.'/template/web/', 'view_suffix' => 'html']); - return View::fetch('/'.$tplName,$data); - }*/ - //模板继承文件读取 - private function themeConfig($file){ - $theme=$file.'/theme.config';$themes=[]; - if(file_exists($theme)){ - $theme=file_get_contents($theme); - - $theme=explode("\r\n",$theme); - $theme=array_filter($theme); - - foreach($theme as $v){ - $theme_config=explode(":",$v); - $themes[trim($theme_config[0])]=trim(trim(trim($theme_config[1],"'"),'"')); - } - } - return $themes; - } -} diff --git a/10.3.4/public/admin/language/zh-hk.php b/10.3.4/public/admin/language/zh-hk.php deleted file mode 100644 index 54c06d50..00000000 --- a/10.3.4/public/admin/language/zh-hk.php +++ /dev/null @@ -1,946 +0,0 @@ - '中文繁體',//用于在语言切换下拉中显示 - 'display_flag' => 'CN',//用于显示图片,使用国家代码大写 - 'not_found' => '页面找不到了', - - - 'success_message' => '请求成功', - 'fail_message' => '请求失败', - 'create_success' => '创建成功', - 'create_fail' => '创建失败', - 'delete_success' => '删除成功', - 'delete_fail' => '删除失败', - 'update_success' => '修改成功', - 'update_fail' => '修改失败', - 'save_success' => '保存成功', - 'save_fail' => '保存失败', - 'register_success' => '注册成功', - 'register_fail' => '注册失败', - 'pay_success' => '支付成功', - 'pay_fail' => '支付失败', - 'id_error' => 'ID错误', - 'param_error' => '参数错误', - 'cannot_repeat_opreate' => '不可重复操作', - 'disable_success' => '禁用成功', - 'disable_fail' => '禁用失败', - 'enable_success' => '启用成功', - 'enable_fail' => '启用失败', - 'login_success' => '登录成功', - 'login_fail' => '登录失败', - 'move_success' => '移动成功', - 'move_fail' => '移动失败', - 'file_name_error' => '文件名不允许包含!@^&"\'/\\', - 'file_mime_error' => '文件mime类型错误', - 'file_less_than_150M' => '文件大小不超过150M', - 'upload_success' => '上传成功', - 'upload_fail' => '上传失败', - 'file_is_not_exist' => '文件不存在', - 'buy_fail' => '购买失败', - 'buy_success' => '购买成功', - 'client_credit_fail' => '用户余额修改失败', - 'client_credit_success' => '用户余额修改成功', - 'missing_route_paramters' => '缺少路由参数{param}', - 'range_of_values' => '{key}取值范围:{value}', - 'gateway_error' => '支付接口错误', - 'login_unauthorized' => '未授权', - 'remember_password_value_0_or_1' => '记住密码取值为0或1', - 'password_is_change_please_login_again' => '密码已修改,请重新授权', - 'logout_success' => '成功退出', - 'inconsistent_login_ip' => '登录ip不一致', - 'login_user_ID_is_inconsistent' => '登录用户ID不一致', - 'log_out_automatically_after_2_hours_without_operation' => '2个小时未操作自动退出登录', - 'login_captcha' => '请输入图形验证码', - 'login_captcha_token' => '请输入图形验证码唯一识别码', - 'login_captcha_error' => '行为验证码错误,请查看配置是否正确', - 'login_phone_code_require' => '请选择国家区号', - 'login_phone_code_error' => '国家区号错误', - 'login_phone_require' => '请输入手机号', - 'login_phone_is_not_right' => '请输入手机号', - 'login_phone_is_not_register' => '手机号未注册', - 'login_client_is_disabled' => '该帐号已停用/关闭,请联系管理员处理', - 'permission_denied' => '您没有访问【{name}】接口权限!', - - # 权限规则 - 'auth_rule_admin_list' => '管理员列表', - 'auth_rule_admin_index' => '获取单个管理员', - 'auth_rule_admin_create' => '添加管理员', - 'auth_rule_admin_update' => '修改管理员', - 'auth_rule_admin_delete' => '删除管理员', - 'auth_rule_admin_status' => '管理员状态切换', - 'auth_rule_admin_role_list' => '管理员分组列表', - 'auth_rule_admin_role_index' => '获取单个管理员分组', - 'auth_rule_admin_role_create' => '添加管理员分组', - 'auth_rule_admin_role_update' => '修改管理员分组', - 'auth_rule_admin_role_delete' => '删除管理员分组', - 'auth_rule_client_list' => '用户列表', - 'auth_rule_client_index' => '用户详情', - 'auth_rule_client_create' => '新建用户', - 'auth_rule_client_update' => '修改用户', - 'auth_rule_client_delete' => '删除用户', - 'auth_rule_client_status' => '用户状态切换', - 'auth_rule_client_search' => '搜索用户', - 'auth_rule_client_login' => '以用户登录', - 'auth_rule_client_credit_list' => '用户余额变更记录列表', - 'auth_rule_client_credit_update' => '更改用户余额', - 'auth_rule_configuration_system' => '获取系统设置', - 'auth_rule_configuration_system_update' => '保存系统设置', - 'auth_rule_configuration_login' => '获取登录设置', - 'auth_rule_configuration_login_update' => '保存登录设置', - 'auth_rule_configuration_security' => '获取验证码设置', - 'auth_rule_configuration_security_update' => '保存验证码设置', - 'auth_rule_configuration_currency' => '获取货币设置', - 'auth_rule_configuration_currency_update' => '保存货币设置', - 'auth_rule_configuration_cron' => '获取自动化设置', - 'auth_rule_configuration_cron_update' => '保存自动化设置', - 'auth_rule_order_list' => '订单列表', - 'auth_rule_order_index' => '订单详情', - 'auth_rule_order_create' => '新建订单', - 'auth_rule_order_upgrade_amount' => '获取升降级订单金额', - 'auth_rule_order_amount_update' => '调整订单金额', - 'auth_rule_order_status_paid' => '标记支付', - 'auth_rule_order_delete' => '删除订单', - 'auth_rule_transaction_list' => '交易流水列表', - 'auth_rule_transaction_create' => '新增交易流水', - 'auth_rule_transaction_delete' => '删除交易流水', - 'auth_rule_host_list' => '产品列表', - 'auth_rule_host_index' => '产品详情', - 'auth_rule_host_update' => '修改产品', - 'auth_rule_host_delete' => '删除产品', - 'auth_rule_plugin_list' => '获取支付/短信/邮件/插件列表', - 'auth_rule_plugin_setting' => '获取单个插件配置', - 'auth_rule_plugin_status' => '禁用(启用)插件', - 'auth_rule_plugin_install' => '插件安装', - 'auth_rule_plugin_uninstall' => '插件卸载', - 'auth_rule_plugin_setting_update' => '保存配置', - 'auth_rule_email_template_list' => '邮件模板列表', - 'auth_rule_email_template_create' => '创建邮件模板', - 'auth_rule_email_template_index' => '获取单个邮件模板', - 'auth_rule_email_template_update' => '编辑邮件模板', - 'auth_rule_email_template_delete' => '删除邮件模板', - 'auth_rule_email_template_test' => '测试邮件模板', - 'auth_rule_sms_template_list' => '获取短信模板', - 'auth_rule_sms_template_create' => '创建短信模板', - 'auth_rule_sms_template_index' => '获取单个短信模板', - 'auth_rule_sms_template_update' => '编辑短信模板', - 'auth_rule_sms_template_delete' => '删除短信模板', - 'auth_rule_sms_template_test' => '测试短信模板', - 'auth_rule_notice_setting_list' => '发送管理', - 'auth_rule_notice_setting_update' => '发送设置', - 'auth_rule_task_list' => '任务列表', - 'auth_rule_task_retry' => '任务重试', - 'auth_rule_system_log_list' => '系统日志列表', - 'auth_rule_email_log_list' => '邮件日志列表', - 'auth_rule_sms_log_list' => '短信日志列表', - 'auth_rule_product_list' => '商品列表', - 'auth_rule_product_index' => '商品详情', - 'auth_rule_product_create' => '新建商品', - 'auth_rule_product_update' => '编辑商品', - 'auth_rule_product_order' => '商品拖动排序', - 'auth_rule_product_delete' => '删除商品', - 'auth_rule_product_hidden' => '隐藏/显示商品', - 'auth_rule_product_group_create' => '新建商品分组', - 'auth_rule_product_group_move_product' => '移动商品至其他商品组', - 'auth_rule_product_group_delete' => '删除商品分组', - 'auth_rule_product_group_first_list' => '获取商品一级分组', - 'auth_rule_product_group_second_list' => '获取商品二级分组', - 'auth_rule_product_group_update' => '编辑商品分组', - 'auth_rule_product_upgrade' => '获取商品关联的升降级商品', - 'auth_rule_server_group_list' => '接口分组列表', - 'auth_rule_server_group_create' => '新建接口分组', - 'auth_rule_server_group_update' => '修改接口分组', - 'auth_rule_server_group_delete' => '删除接口分组', - 'auth_rule_server_list' => '接口列表', - 'auth_rule_server_create' => '新建接口', - 'auth_rule_server_update' => '编辑接口', - 'auth_rule_server_delete' => '删除接口', - 'auth_rule_server_status' => '获取接口连接状态', - 'auth_rule_module_list' => '模块列表', - 'auth_rule_host_module' => '产品内页模块', - 'auth_rule_host_upgrade_config_option' => '产品升降级配置', - 'auth_rule_host_upgrade_config_option_price' => '产品升降级配置计算价格', - 'auth_rule_host_module_create' => '模块开通', - 'auth_rule_host_module_suspend' => '模块暂停', - 'auth_rule_host_module_unsuspend' => '模块解除暂停', - 'auth_rule_host_module_terminate' => '模块删除', - 'auth_rule_product_server_config_option' => '选择接口获取配置', - 'auth_rule_product_config_option' => '商品配置页面', - 'auth_rule_product_config_option_price' => '修改配置计算价格', - 'auth_rule_get_admin_menu' => '获取后台导航', - 'auth_rule_get_home_menu' => '获取前台导航', - 'auth_rule_save_admin_menu' => '保存后台导航', - 'auth_rule_save_home_menu' => '保存前台导航', - - #权限 - 'auth_user_management' => '用户管理', - 'auth_user_list' => '用户列表', - 'auth_view' => '查看', - 'auth_add' => '新增', - 'auth_user_details' => '用户详情', - 'auth_management' => '管理', - 'auth_delete' => '删除', - 'auth_user_host' => '用户产品', - 'auth_recharge_record' => '充值记录', - 'auth_user_order' => '用户订单', - 'auth_user_transaction' => '用户流水', - 'auth_user_log' => '用户日志', - 'auth_business_management' => '业务管理', - 'auth_order_management' => '订单管理', - 'auth_marker_payment' => '标记支付', - 'auth_adjustment_amount' => '调整金额', - 'auth_host_management' => '产品管理', - 'auth_host_details' => '产品详情', - 'auth_module_management' => '模块管理', - 'auth_transaction' => '交易流水', - 'auth_product_management' => '商品管理', - 'auth_product_group' => '商品分组', - 'auth_server_management' => '接口管理', - 'auth_server_group' => '接口分组', - 'auth_update' => '修改', - 'auth_system_settings' => '系统设置', - 'auth_login_settings' => '登录设置', - 'auth_admin_settings' => '管理员设置', - 'auth_admin_group' => '管理员分组', - 'auth_security_settings' => '验证码设置', - 'auth_currency_settings' => '货币设置', - 'auth_payment_gateway' => '支付接口', - 'auth_enable_disable' => '启用/停用', - 'auth_install_uninstall_config' => '安装/卸载/配置', - 'auth_notice' => '通知接口', - 'auth_sms_notice' => '短信通知', - 'auth_template_management' => '模板管理', - 'auth_email_notice' => '邮件通知', - 'auth_send_settings' => '发送设置', - 'auth_task' => '任务', - 'auth_log' => '日志', - 'auth_system_log' => '系统日志', - 'auth_notice_log' => '通知日志', - 'auth_auto' => '自动化', - 'auth_plugin' => '插件', - 'auth_plugin_list' => '插件列表', - 'auth_nav_management' => '导航管理', - - # 导航 - 'nav_user_management' => '用户管理', - 'nav_user_list' => '用户列表', - 'nav_business_management' => '业务管理', - 'nav_order_management' => '订单管理', - 'nav_host_management' => '产品管理', - 'nav_transaction' => '交易流水', - 'nav_product_management' => '商品管理', - 'nav_server_management' => '接口管理', - 'nav_server_group' => '接口分组', - 'nav_system_settings' => '系统设置', - 'nav_admin_settings' => '管理员设置', - 'nav_security_settings' => '验证码设置', - 'nav_currency_settings' => '货币设置', - 'nav_payment_gateway' => '支付接口', - 'nav_notice' => '通知接口', - 'nav_sms_notice' => '短信通知', - 'nav_email_notice' => '邮件通知', - 'nav_send_settings' => '发送设置', - 'nav_management' => '管理', - 'nav_task' => '任务', - 'nav_log' => '日志', - 'nav_auto' => '自动化', - 'nav_plugin' => '插件', - 'nav_plugin_list' => '插件列表', - 'nav_navigation' => '导航管理', - 'nav_real_name_approval' => '实名认证', - - - # 日志 - 'admin_enable_user' => '{admin}启用用户{client}', - 'admin_disable_user' => '{admin}禁用用户{client}', - 'admin_delete_user' => '{admin}删除用户{client}', - 'admin_modify_user_profile' => '{admin}将{client}的{description}', - 'admin_delete_user_host' => '{admin}将{client}的{host}删除', - 'admin_adjust_user_order_price' => '{admin}将{client}的{order}的价格{old}改为{new}', - 'admin_mark_user_order_payment_status' => '{admin}将{client}的{order}标记为已付款', - 'admin_delete_user_order' => '{admin}将{client}的{order}删除', - 'admin_delete_transaction' => '{admin}删除交易流水{transaction},流水所属用户为{client}', - 'admin_add_transaction' => '{admin}新增交易流水{transaction},流水所属用户为{client}', - 'admin_create_new_user' => '{admin}新建用户{client}', - 'admin_create_new_purchase_order' => '{admin}新建新购订单{order},订单用户为{client}', - 'admin_create_upgrade_order' => '{admin}新建升降级订单{order},订单用户为{client}', - 'admin_create_renew_order' => '{admin}新建续费订单{order},订单用户为{client}', - 'admin_create_artificial_order' => '{admin}新建人工订单{order},订单用户为{client}', - 'admin_edit_email_template' => '{admin}编辑邮件模板:{template}', - 'admin_delete_email_template' => '{admin}删除邮件模板:{template}', - 'admin_create_email_template' => '{admin}创建邮件模板:{template}', - 'admin_retry_task' => '{admin}重试任务:{task}{description}', - 'admin_configuration_system' => '{admin}将系统设置的{description}', - 'admin_configuration_login' => '{admin}将登录设置的{description}', - 'admin_configuration_security' => '{admin}将验证码设置的{description}', - 'admin_configuration_currency' => '{admin}将货币设置的{description}', - 'admin_configuration_cron' => '{admin}将自动化设置的{description}', - 'admin_configuration_send' => '{admin}将默认通知接口设置的{description}', - 'admin_old_to_new' => '{field}的{old}改为{new}', - 'admin_sms_template_log_create' => '{admin}短信接口"{sms_name}"创建模板"{sms_title}"成功', - 'admin_sms_template_log_update' => '{admin}短信接口"{sms_name}"模板修改:{description}', - 'admin_sms_template_log_delete' => '{admin}短信接口"{sms_name}"模板删除"{sms_title}"成功', - 'admin_notice_send_log_update' => '{admin}发送设置,{description}', - 'sub_account' => '(子账户)', - - 'client_username' => '姓名', - 'client_email' => '邮箱', - 'client_phone_code' => '国际电话区号', - 'client_phone' => '手机号', - 'client_company' => '公司', - 'client_country' => '国家', - 'client_address' => '地址', - 'client_language' => '语言', - 'client_notes' => '备注', - - 'host_product' => '商品', - 'host_server' => '接口', - 'host_name' => '标识', - 'host_notes' => '备注', - 'host_first_payment_amount' => '订购金额', - 'host_renew_amount' => '续费金额', - 'host_billing_cycle' => '计费方式', - 'host_billing_cycle_free' => '免费', - 'host_billing_cycle_onetime' => '一次性', - 'host_billing_cycle_recurring_prepayment' => '周期先付', - 'host_billing_cycle_recurring_postpaid' => '周期后付', - 'host_active_time' => '开通时间', - 'host_due_time' => '到期时间', - 'host_status' => '状态', - 'host_status_Unpaid' => '未付款', - 'host_status_Pending' => '开通中', - 'host_status_Active' => '使用中', - 'host_status_Suspended' => '已暂停', - 'host_status_Deleted' => '已删除', - 'host_status_Failed' => '开通失败', - 'host_status_Cancelled' => '已取消', - - 'admin_modify_host' => '{admin}将{host}的{description}', - - - # 通用描述 - 'log_admin_update_description' => '{field}{old}为{new}', - - 'log_admin_login' => '{admin}登录系统', - 'log_admin_login_not_exist' => '{admin}登录系统失败,管理员不存在', - 'log_admin_login_disabled' => '{admin}登录系统失败,已被禁用', - 'log_admin_login_password_error' => '{admin}登录系统失败,密码不正确', - 'log_admin_logout' => '{admin}注销登录', - 'log_login_by_client' => '{admin}用{client}登录前台系统', - 'log_create_admin' => '{admin}添加管理员{name}', - 'log_update_admin' => '{admin}修改管理员信息{name}:{description}', - 'log_update_admin_description' => '{field}为{content}', - 'admin_disable_admin' => '{admin}启用管理员{name}', - 'admin_enable_admin' => '{admin}禁用管理员{name}', - 'admin_delete_admin' => '{admin}删除管理员{name}', - 'admin_create_admin_role' => '{admin}添加人员分组{name}', - 'admin_update_admin_role' => '{admin}修改人员分组{name}', - 'admin_delete_admin_role' => '{admin}删除人员分组{name}', - 'log_change_password' => '修改密码', - - 'admin_name' => '用户名', - 'admin_password' => '密码', - 'admin_email' => '邮箱', - 'admin_nickname' => '名称', - 'admin_status' => '状态', - 'admin_role_id' => '分组ID', - - 'log_admin_create_product' => '{admin}新增商品{product}', - 'log_admin_delete_product' => '{admin}删除商品{product}', - 'log_admin_hidden_product' => '{admin}隐藏商品{product}', - 'log_admin_show_product' => '{admin}显示商品{product}', - 'log_admin_update_product' => '{admin}修改商品{product}:{description}', - 'log_admin_update_product_upgrade_product' => '升级商品ID{old}为{new}', - - 'field_product_name' => '名称', - 'field_product_product_group_id' => '分组ID', - 'field_product_description' => '描述', - 'field_product_hidden' => '是否隐藏', - 'field_product_stock_control' => '库存控制', - 'field_product_qty' => '库存数量', - 'field_product_creating_notice_sms' => '开通中短信通知是否开启', - 'field_product_creating_notice_sms_api' => '开通中短信通知接口', - 'field_product_creating_notice_sms_api_template' => '开通中短信通知接口模板', - 'field_product_created_notice_sms' => '已开通短信通知是否开启', - 'field_product_created_notice_sms_api' => '已开通短信通知接口', - 'field_product_created_notice_sms_api_template' => '已开通短信通知接口模板', - 'field_product_creating_notice_mail' => '开通中邮件通知是否开启', - 'field_product_creating_notice_mail_template' => '开通中邮件通知模板', - 'field_product_created_notice_mail_template' => '已开通邮件通知模板', - 'field_product_pay_type' => '付款类型', - 'field_product_auto_setup' => '是否自动开通', - 'field_product_type' => '关联类型', - 'field_product_rel_id' => '关联ID', - - 'log_admin_create_product_group' => '{admin}新增商品分组{product_group}', - 'log_admin_update_product_group' => '{admin}修改商品分组名称{old}为{new}', - 'log_admin_delete_product_group' => '{admin}删除商品分组{product_group}', - - 'log_admin_plugin_gateway' => '支付', - 'log_admin_plugin_sms' => '短信', - 'log_admin_plugin_mail' => '邮件', - 'log_admin_plugin_addon' => '插件', - 'log_admin_install_plugin' => '{admin}安装{module}接口:{name}', - 'log_admin_uninstall_plugin' => '{admin}卸载{module}接口:{name}', - 'log_admin_enable_plugin' => '{admin}启用{module}接口:{name}', - 'log_admin_disable_plugin' => '{admin}禁用{module}接口:{name}', - 'log_admin_config_plugin' => '{admin}配置{module}接口:{name}', - 'log_admin_upgrade_plugin' => '{admin}升级{module}接口:{name}', - - # 用户管理 - 'client_is_not_exist' => '用户不存在', - 'client_is_disabled' => '用户已被禁用', - 'client_name_cannot_exceed_20_chars' => '用户姓名最多不能超过20个字符', - 'please_enter_vaild_email' => '请输入正确的邮箱', - 'email_has_been_registered' => '邮箱已被注册', - 'please_select_phone_code' => '请选择国际电话区号', - 'please_enter_vaild_phone' => '请输入正确的手机号', - 'phone_has_been_registered' => '手机号已被注册', - 'please_enter_password' => '请输入密码', - 'password_formatted_incorrectly' => '密码格式错误,需为6~32位的字符', - 'please_enter_password_again' => '请重复输入密码', - 'passwords_not_match' => '两次输入的密码不一致', - 'company_cannot_exceed_255_chars' => '公司最多不能超过255个字符', - 'country_cannot_exceed_100_chars' => '国家最多不能超过100个字符', - 'address_cannot_exceed_255_chars' => '地址最多不能超过255个字符', - 'notes_cannot_exceed_1000_chars' => '备注最多不能超过1000个字符', - - # 用户余额管理 - 'insufficient_credit_deduction_failed' => '用户余额不足,扣费失败', - 'please_enter_amount' => '请输入金额', - 'amount_formatted_incorrectly' => '金额格式错误', - 'please_enter_notes' => '请输入备注', - - # 订单管理 - 'order_is_not_exist' => '订单不存在', - 'order_item_is_not_exist' => '订单子项不存在', - 'order_item_cannot_update' => '非人工调整的订单子项不可修改', - 'order_amount_adjustment_failed' => '订单金额调整失败,调整后的待付金额不得小于0', - 'please_select_order_type' => '请选择订单类型', - 'order_type_error' => '订单类型错误', - 'please_select_order_status' => '请选择订单状态', - 'order_status_error' => '订单状态错误', - 'please_enter_description' => '请输入描述', - 'description_cannot_exceed_1000_chars' => '描述最多不能超过1000个字符', - 'order_already_paid' => '订单已付款,无需重复操作', - 'order_already_paid_cannot_adjustment_amount' => '订单已付款,不可调整金额', - 'hosts_under_activation_in_the_order' => '订单中存在开通中的产品,不可删除订单', - 'please_select_order_delete_host' => '请选择是否删除订单下的产品', - 'client_credit_is_0' => '余额为0', - 'client_credit_is_used' => '您已使用过余额', - 'recharge_order_cannot_use_credit' => '充值订单不可使用余额', - 'active_host_can_be_upgraded' => '已开通的产品才可以升降级', - 'host_cannot_be_upgraded_to_the_product' => '该产品不可升降级到选择的商品', - 'please_select_host' => '请选择产品', - 'host_id_error' => '产品ID错误', - 'client_host_error' => '产品用户和选择的用户不一致', - 'update_amount' => '调整金额', - - # 产品管理 - 'host_is_not_exist' => '产品不存在', - 'please_select_product' => '请选择商品', - 'product_id_error' => '商品ID错误', - 'server_id_error' => '接口ID错误', - 'host_name_cannot_exceed_100_chars' => '产品标识最多不能超过100个字符', - 'please_enter_first_payment_amount' => '请输入订购金额', - 'first_payment_amount_formatted_incorrectly' => '订购金额格式错误', - 'please_enter_renew_amount' => '请输入续费金额', - 'renew_amount_formatted_incorrectly' => '续费金额格式错误', - 'please_select_billing_cycle' => '请选择计费周期', - 'billing_cycle_error' => '计费周期错误', - 'please_select_host_status' => '请选择产品状态', - 'host_status_error' => '产品状态错误', - 'active_time_formatted_incorrectly' => '开通时间格式错误', - 'due_time_formatted_incorrectly' => '到期时间格式错误', - 'order_is_paid_host_status_cannot_be_unpaid' => '订单已付款,产品状态不可修改为未付款', - 'order_is_unpaid_host_status_cannot_be_paid' => '订单未付款,产品状态不可修改为未付款以外的状态', - 'order_is_paid_host_amount_cannot_update' => '订单已付款,产品订购金额不可修改', - 'host_opening_cannot_delete' => '开通中的产品不可删除', - 'host_is_active' => '产品已开通', - 'host_is_suspended' => '产品已暂停', - 'host_is_not_active_cannot_suspend' => '产品未开通,不能暂停', - 'host_is_already_unsuspend' => '产品已解除暂停', - 'host_status_not_need_unsuspend' => '当前状态不需要解除暂停', - 'please_select_suspend_type' => '请选择暂停类型', - 'suspend_reason_length_cannot_exceed_1000_words' => '暂停原因不能超过1000个字', - - # 流水管理 - 'transaction_is_not_exist' => '交易流水不存在', - 'please_select_gateway' => '请选择支付方式', - 'please_enter_transaction_number' => '请输入交易流水号', - 'transaction_number_formatted_incorrectly' => '交易流水号格式错误,只能为数字和字母', - 'please_select_client' => '请选择用户', - 'client_id_error' => '用户ID错误', - 'gateway_is_not_exist' => '支付方式不存在', - - # 任务管理 - 'task_is_not_exist' => '任务不存在', - 'task_has_been_retried' => '任务已经发起重试,不可再次发起', - 'only_failed_task_can_retry' => '失败的任务才可以发起重试', - - # 系统设置 - 'configuration_log_switch_1' =>'开启', - 'configuration_log_switch_0' =>'关闭', - 'configuration_log_lang_admin' =>'后台默认语言', - 'configuration_log_lang_home' =>'前台默认语言', - 'configuration_log_lang_home_open' =>'是否允许用户选择语言', - 'configuration_log_lang_home_open_0' =>'禁止', - 'configuration_log_lang_home_open_1' =>'允许', - 'configuration_log_maintenance_mode' =>'维护模式', - 'configuration_log_maintenance_mode_message' =>'维护模式内容', - 'configuration_log_website_name' =>'网站名称', - 'configuration_log_website_url' =>'网站域名地址', - 'configuration_log_terms_service_url' =>'服务条款地址', - 'configuration_log_terms_privacy_url' =>'隐私条款地址', - 'configuration_log_system_logo' =>'系统LOGO', - 'configuration_admin_default_language_cannot_empty' => '后台默认语言不能为空', - 'configuration_admin_default_language_error' => '后台默认语言设置错误', - 'configuration_home_default_language_open_cannot_empty' => '前台多语言开关不能为空', - 'configuration_home_default_language_error' => '前台多语言设置错误', - 'configuration_home_default_language_open' => '前台多语言开关值只能是1或0', - 'configuration_home_default_language_cannot_empty' => '前台默认语言不能为空', - 'configuration_maintenance_mode_cannot_empty' => '维护模式开关不能为空', - 'configuration_maintenance_mode' => '维护模式开关值只能是1或0', - 'configuration_website_name' => '网站名称不能为空', - 'configuration_website_name_cannot_exceed_255_chars' => '网站名称最多不能超过255个字符', - 'configuration_website_url' => '网站域名地址不能为空', - 'configuration_website_url_cannot_exceed_255_chars' => '网站域名地址最多不能超过255个字符', - 'configuration_website_url_error' => '请输入这样https://wwww.a.com的域名地址', - 'configuration_terms_service_url_cannot_exceed_255_chars' => '服务条款地址最多不能超过255个字符', - 'configuration_terms_privacy_url' => '隐私条款地址不能为空', - 'configuration_terms_privacy_url_cannot_exceed_255_chars' => '隐私条款地址最多不能超过255个字符', - 'configuration_system_logo' => '请选择系统LOGO', - # 登录设置 - 'configuration_log_register_phone' =>'手机是否支持注册', - 'configuration_log_register_email' =>'邮箱是否支持注册', - 'configuration_log_login_phone_verify' =>'手机是否支持免密码登录', - 'configuration_log_register_1' =>'是', - 'configuration_log_register_0' =>'否', - 'configuration_register_email_cannot_empty' => '邮箱注册开关不能为空', - 'configuration_register_email' => '邮箱注册开关值只能是1或0', - 'configuration_register_phone_cannot_empty' => '手机号注册开关不能为空', - 'configuration_register_phone' => '手机号注册开关值只能是1或0', - 'configuration_login_phone_verify_cannot_empty' => '手机号登录短信验证开关不能为空', - 'configuration_login_phone_verify' => '手机号登录短信验证开关值只能是1或0', - # 验证码设置 - 'configuration_log_captcha_client_register' =>'新用户注册启用图形验证码', - 'configuration_log_captcha_client_login' =>'用户登录启用图形验证码', - 'configuration_log_captcha_admin_login' =>'后台系统登录启用图形验证码', - 'configuration_log_captcha_client_login_error' =>'客户登录失败时验证码', - 'configuration_log_captcha_client_login_error_1' =>'失败三次后显示', - 'configuration_log_captcha_client_login_error_0' =>'始终显示', - 'configuration_log_captcha_width' =>'图形验证码宽度', - 'configuration_log_captcha_height' =>'图形验证码高度', - 'configuration_log_captcha_length' =>'图形验证码字符长度', - 'configuration_log_code_client_email_register' =>'邮箱注册数字验证码', - 'configuration_captcha_client_register_cannot_empty' => '客户注册图形验证码开关不能为空', - 'configuration_captcha_client_register' => '客户注册图形验证码开关值只能是1或0', - 'configuration_captcha_client_login_cannot_empty' => '客户登录图形验证码开关不能为空', - 'configuration_captcha_client_login' => '客户登录图形验证码开关值只能是1或0', - 'configuration_captcha_client_login_error_cannot_empty' => '客户登录失败图形验证码开关不能为空', - 'configuration_captcha_client_login_error' => '客户登录失败图形验证码开关值只能是1或0', - 'configuration_captcha_admin_login_cannot_empty' => '管理员登录图形验证码开关不能为空', - 'configuration_captcha_admin_login' => '管理员登录图形验证码开关值只能是1或0', - 'configuration_captcha_width_cannot_empty' => '图形验证码宽度不能为空', - 'configuration_captcha_width' => '图形验证码宽度只能在200到400之间的数字', - 'configuration_captcha_height_cannot_empty' => '图形验证码高度不能为空', - 'configuration_captcha_height' => '图形验证码高度只能在50到100之间的数字', - 'configuration_captcha_length_cannot_empty' => '图形验证码字符长度不能为空', - 'configuration_captcha_length' => '图形验证码字符长度只能是在4到6之间的整数', - # 货币设置 - 'configuration_log_currency_code' =>'货币代码', - 'configuration_log_currency_prefix' =>'货币符号', - 'configuration_log_currency_suffix' =>'货币后缀', - 'configuration_log_recharge_open' =>'启用充值', - 'configuration_log_recharge_min' =>'单笔最小金额', - 'configuration_currency_code_cannot_empty' => '货币代码不能为空', - 'configuration_currency_prefix_cannot_empty' => '货币符号不能为空', - 'configuration_currency_suffix_cannot_empty' => '货币后缀不能为空', - 'configuration_recharge_open_cannot_empty' => '启用充值开关不能为空', - 'configuration_recharge_open' => '启用充值开关值只能是1或0', - 'configuration_recharge_min_float' => '单笔最小金额必须大于零的数字', - 'configuration_recharge_max_egt_recharge_min' => '单笔最大金额大于等于单笔最小金额', - # 定时任务设置 - 'configuration_log_cron_due_suspend_swhitch' =>'产品暂停', - 'configuration_log_cron_due_unsuspend_swhitch' =>'产品解除暂停', - 'configuration_log_cron_due_terminate_swhitch' =>'产品删除', - 'configuration_log_cron_due_renewal_first_swhitch' =>'第一次续费提醒', - 'configuration_log_cron_due_renewal_second_swhitch' =>'第二次续费提醒', - 'configuration_log_cron_overdue_first_swhitch' =>'第一次逾期提醒', - 'configuration_log_cron_overdue_second_swhitch' =>'第二次逾期提醒', - 'configuration_log_cron_overdue_third_swhitch' =>'第三次逾期提醒', - 'configuration_log_cron_ticket_close_swhitch' =>'已回复工单关闭', - 'configuration_log_cron_aff_swhitch' =>'推广成果', - 'configuration_log_cron_order_overdue_swhitch' =>'订单未付款通知', - 'configuration_log_cron_due_day' =>'天', - 'configuration_log_cron_due_hour' =>'小时', - 'configuration_cron_due_suspend_day_cannot_empty' => '产品到期暂停天数大于或等于0的整数', - 'configuration_cron_due_terminate_day_cannot_empty' => '产品到期删除天数大于或等于0的整数', - 'configuration_cron_due_renewal_first_day_cannot_empty' => '续费第一次提醒天数大于或等于0的整数', - 'configuration_cron_due_renewal_second_day_cannot_empty' => '续费第二次提醒天数大于或等于0的整数', - 'configuration_cron_overdue_first_day_cannot_empty' => '产品逾期第一次提醒天数大于或等于0的整数', - 'configuration_cron_overdue_second_day_cannot_empty' => '产品逾期第二次提醒天数大于或等于0的整数', - 'configuration_cron_overdue_third_day_cannot_empty' => '产品逾期第三次提醒天数大于或等于0的整数', - 'configuration_cron_ticket_close_day_cannot_empty' => '已回复状态的工单提醒小时大于或等于0的整数', - 'configuration_cron_order_overdue_day_cannot_empty' => '订单未付款通知天数大于或等于0的整数', - 'configuration_cron_due_suspend_swhitch' => '产品到期暂停开关值只能是1或0', - 'configuration_cron_due_unsuspend_swhitch' => '自动解除暂停开关值只能是1或0', - 'configuration_cron_due_terminate_swhitch' => '产品到期删除开关值只能是1或0', - 'configuration_cron_due_renewal_first_swhitch' => '续费第一次提醒开关值只能是1或0', - 'configuration_cron_due_renewal_second_swhitch' => '续费第二次提醒开关值只能是1或0', - 'configuration_cron_overdue_first_swhitch' => '产品逾期第一次提醒开关值只能是1或0', - 'configuration_cron_overdue_second_swhitch' => '产品逾期第二次提醒开关值只能是1或0', - 'configuration_cron_overdue_third_swhitch' => '产品逾期第三次提醒开关值只能是1或0', - 'configuration_cron_ticket_close_swhitch' => '自动关闭工单开关值只能是1或0', - 'configuration_cron_aff_swhitch' => '推介月报开关值只能是1或0', - 'configuration_cron_order_overdue_swhitch' => '订单未付款通知开关值只能是1或0', - - 'configuration_cron_suspend_day_less_terminate_day' => '产品到期暂停天数应小于产品到期删除天数', - 'configuration_cron_renewal_first_day_less_renewal_second_day' => '第一次续费提醒天数应大于第二次续费提醒天数', - 'configuration_cron_overdue_day_less_terminate_day' => '第一次逾期提醒天数应小于第二次逾期提醒天数小于第三次逾期提醒天数小于产品到期删除天数', - - # 主题设置 - 'configuration_theme_admin_theme_cannot_empty' => '后台主题不能为空', - 'configuration_theme_admin_theme_cannot_error' => '后台主题错误', - 'configuration_theme_clientarea_theme_cannot_empty' => '会员中心主题不能为空', - 'configuration_theme_clientarea_theme_cannot_error' => '会员中心主题错误', - - # 实名设置 - 'configuration_certification_open_require' => '实名认证是否开启必填', - 'configuration_certification_approval_require' => '人工复审必填', - 'configuration_certification_notice_require' => '审批通过后,是否通知客户必填', - 'configuration_certification_update_client_name_require' => '是否自动更新姓名必填', - 'configuration_certification_upload_require' => '是否需要上传证件照必填', - 'configuration_certification_update_client_phone_require' => '手机一致性必填', - 'configuration_certification_uncertified_suspended_host_require' => '未认证暂停产品必填', - - - # 管理员与管理员分组 - 'super_admin_cannot_delete' => '超级管理员不可删除', - 'super_admin_cannot_opreate' => '超级管理员不可操作', - 'super_admin_role_cannot_delete' => '超级管理员分组不可删除', - 'admin_is_not_exist' => '管理员不存在', - 'admin_password_is_same' => '新旧密码一样', - 'admin_role_name_cannot_empty' => '管理员分组名称不能为空', - 'admin_role_name_at_least_1_chars' => '管理员分组名称至少1个字符', - 'admin_role_name_cannot_exceed_50_chars' => '管理员分组名称最多不能超过50个字符', - 'admin_role_description_cannot_exceed_1_chars' => '管理员分组描述至少1个字符', - 'admin_role_description_cannot_exceed_1000_chars' => '管理员分组描述最多不能超过1000个字符', - 'admin_role_create_success' => '已成功添加管理员分组', - 'admin_role_is_not_exist' => '管理员分组不存在', - 'admin_role_has_admin_cannot_delete' => '管理员分组下有管理员,无法删除', - 'please_enter_admin_name' => '请填写管理员用户名', - 'admin_name_at_least_1_chars' => '管理员用户名至少1个字符', - 'admin_name_cannot_exceed_50_chars' => '管理员用户名最多不能超过50个字符', - 'admin_name_unique' => '管理员用户名已存在', - 'admin_email_unique' => '管理员邮箱已存在', - 'please_enter_admin_nickname' => '请输入管理员名称', - 'admin_nickname_cannot_exceed_20_chars' => '管理员名称最多不能超过20个字符', - 'admin_nickname_at_least_1_chars' => '管理员名称至少1个字符', - 'admin_is_disabled' => '管理员已被禁用', - 'admin_name_or_password_error' => '账号或密码错误', - 'auth_error' => '权限错误', - 'supper_admin_cannot_update_role' => '不可修改超级管理员所属分组', - 'default_admin_role_cannot_update' => '默认管理员分组不可修改', - - # 插件 - 'plugin_is_not_exist' => '插件不存在', - 'plugin_is_installed' => '插件已安装', - 'plugin_information_is_missing' => '插件信息缺失', - 'plugin_install_success' => '插件安装成功', - 'plugin_install_fail' => '插件安装失败', - 'plugin_uninstall_success' => '插件卸载成功', - 'plugin_uninstall_fail' => '插件卸载失败', - 'plugin_uninstall_pre_fail' => '插件预卸载失败', - 'plugin_uninstall_cannot' => '默认插件不能卸载', - 'plugin_disabled_cannot' => '默认插件不能禁用', - 'plugin_upgrade_pre_fail' => '插件预升级失败', - 'plugin_upgrade_success' => '插件升级成功', - 'plugin_upgrade_fail' => '插件升级失败', - 'plugin_version_information_is_missing' => '插件版本信息缺失', - 'plugin_can_not_upgrade' => '插件不可升级', - 'plugin_new_version_get_fail' => '插件最新版本获取失败', - - # 商品与商品分组 - 'product_group_is_not_exist' => '商品分组不存在', - 'please_enter_product_group_name' => '请填写商品分组名称', - 'product_group_name_cannot_exceed_100_chars' => '商品分组名称最多不能超过100个字符', - 'product_group_has_son_cannot_delete' => '商品分组下存在子分组,不可删除', - 'product_group_has_product_cannot_delete' => '商品分组下存在商品,不可删除', - 'please_enter_product_group_first' => '请传入一级分组ID', - 'please_select_product_group_second' => '请选择商品二级分组', - 'please_enter_product_name' => '请填写商品名称', - 'product_name_cannot_exceed_100_chars' => '商品名称最多不能超过100个字符', - 'product_is_not_exist' => '商品不存在', - 'product_hidden' => '商品是否隐藏只能为0或1', - 'product_stock_control' => '商品是否开启库存控制只能为0或1', - 'product_creating_notice_sms' => '商品开通中短信通知是否开启只能为0或1', - 'product_created_notice_sms' => '商品已开通短信通知是否开启只能为0或1', - 'product_creating_notice_mail' => '商品开通中邮件通知是否开启只能为0或1', - 'product_created_notice_mail' => '商品已开通邮件通知是否开启只能为0或1', - 'product_qty_num' => '商品库存为自然数', - 'product_creating_notice_sms_cannot_use' => '开通中短信通知接口不可用', - 'product_created_notice_sms_cannot_use' => '已开通短信通知接口不可用', - 'product_creating_notice_mail_cannot_use' => '开通中通知邮件接口不可用', - 'product_created_notice_mail_cannot_use' => '已开通通知邮件接口不可用', - 'product_creating_notice_sms_api_template_is_not_exist' => '开通中短信通知模板不存在', - 'product_created_notice_sms_api_template_is_not_exist' => '已开通短信通知模板不存在', - 'product_creating_notice_mail_template_is_not_exist' => '开通中邮件通知模板不存在', - 'product_created_notice_mail_template_is_not_exist' => '已开通邮件通知模板不存在', - 'pre_product_id_require' => '移动后前一个商品ID必传', - 'pre_product_id_integer' => '移动后前一个商品ID为整数', - 'product_group_id_require' => '移动后的商品组ID必传', - 'product_group_id_integer' => '移动后的商品组ID为整数', - 'product_is_not_in_product_group' => '移动后的商品不在移动后商品分组下', - 'product_group_id_first_greater_than_0' => '一级分组ID大于0', - 'product_description_max' => '商品描述不超过1000个字符', - 'product_pay_type_require' => '商品费用类型必须', - 'product_pay_type_in' => '商品费用类型为free,onetime,recurring_prepayment,recurring_postpaid', - 'product_auto_setup_require' => '自动开通设置必须', - 'product_auto_setup_in' => '自动开通设置为0或1', - 'product_type_in' => '接口类型为server或server_group', - 'product_type_require' => '接口类型必须', - 'product_rel_id_require' => '关联ID必须', - 'product_rel_id_integer' => '关联ID只能是整数', - 'parent_product_id_integer' => '父级商品ID只能是整数', - 'product_upgrade_product_is_not_exist' => '升级商品不存在', - 'product_upgrade_product_cannot_self' => '升级商品不能是本商品', - 'parent_product_is_not_exist' => '父级商品不存在', - 'product_has_host' => '商品已使用,不可删除', - 'pre_product_group_id_require' => '移动后前一个分组ID必传', - 'pre_product_group_id_integer' => '移动后前一个分组ID为整数', - 'pre_first_product_group_id_require' => '移动后的一级分组ID必传', - 'pre_first_product_group_id_integer' => '移动后的一级分组ID为整数', - 'first_product_group_is_not_exist' => '移动后的一级分组不存在', - 'pre_product_group_is_not_exist' => '移动后前一个分组不存在', - 'first_product_group_id_is_not_exist' => '一级分组不存在', - - - # 邮件模板 - 'email_template_is_not_exist' => '邮件模板不存在', - 'please_enter_email_name' => '请输入邮件名称', - 'please_enter_email_subject' => '请输入邮件标题', - 'email_name_cannot_exceed_100_chars' => '邮件名称最多不能超过100个字符', - 'email_subject_cannot_exceed_100_chars' => '邮件标题最多不能超过100个字符', - 'please_enter_email_message' => '请输入邮件内容', - 'email_cannot_be_empty' => '邮箱不能为空', - 'email_format_error' => '邮箱格式错误', - - # 短信模板 - 'sms_template_log_template_id' => '短信模板ID', - 'sms_template_log_type' => '模板类型', - 'sms_template_log_type_0' => '大陆', - 'sms_template_log_type_1' => '国际', - 'sms_template_log_title' => '模板标题', - 'sms_template_log_content' => '模版内容', - 'sms_template_log_notes' => '备注', - 'sms_template_log_status' => '状态', - 'sms_template_log_status_0' => '未提交', - 'sms_template_log_status_1' => '审核中', - 'sms_template_log_status_2' => '通过', - 'sms_template_log_status_3' => '未通过', - 'sms_template_is_not_exist' => '短信模板不存在', - 'sms_template_review_before_sending' => '短信模板审核通过才能发短信', - 'sms_template_cannot_be_modified' => '短信模板状态审核中,不能修改', - 'sms_please_enter_sms_type' => '请选择短信模板区域', - 'sms_type_must' => '请选择短信模板区域只能是1或0', - 'sms_title_cannot_empty' => '请输入短信标题', - 'sms_title_cannot_exceed_50_chars' => '短信标题最多不能超过50个字符', - 'sms_please_enter_content' => '请输入短信内容', - 'sms_content_cannot_exceed_255_chars' => '短信内容最多不能超过255个字符', - 'sms_notes_cannot_exceed_1000_chars' => '短信备注最多不能超过1000个字符', - 'sms_please_enter_sms_status' => '请选择短信模板状态', - 'sms_status_error' => '短信模板状态错误,只能是0,2,3', - 'sms_area_code_must_be_integer' => '短信区号必须是整数', - 'sms_phone_number_cannot_be_empty' => '手机号不能为空', - 'sms_phone_number_must_be_integer' => '手机号必须是整数', - - # 短信/邮件发送 - 'send_notice_log_sms_global_name' => '短信国际接口', - 'send_notice_log_sms_global_template' => '短信国际接口模板', - 'send_notice_log_sms_name' => '短信国内接口', - 'send_notice_log_sms_template' => '短信国内接口模板', - 'send_notice_log_email_name' => '邮件接口', - 'send_notice_log_email_template' => '邮件接口模板', - 'send_wrong_action_name' => '动作名称错误', - 'send_sms_success' => '短信发送成功', - 'send_sms_error' => '短信发送失败', - 'send_sms_area_code_error' => '区号错误', - 'send_sms_interface_is_not_exist' => '短信接口不存在', - 'send_sms_interface_not_supported' => '短信接口不支持', - 'send_sms_interface_is_not_exist_domestic' => '国内短信接口不存在', - 'send_sms_interface_is_disabled_domestic' => '国内短信接口已禁用', - 'send_sms_interface_not_installed_domestic' => '国内短信接口未安装', - 'send_sms_interface_is_not_exist_global' => '国际短信接口不存在', - 'send_sms_interface_is_disabled_global' => '国际短信接口已禁用', - 'send_sms_interface_not_installed_global' => '国际短信接口未安装', - 'send_sms_action_not_enabled' => '短信发送动作未开启', - 'send_sms_interface_not_set_domestic' => '国内短信发送接口未设置', - 'send_sms_template_not_set_domestic' => '国内短信发送模板未设置', - 'send_sms_template_is_not_exist_domestic' => '国内短信模板不存在', - 'send_sms_interface_not_set_global' => '国际短信发送接口未设置', - 'send_sms_template_not_set_global' => '国际短信发送模板未设置', - 'send_sms_template_is_not_exist_global' => '国际短信模板不存在', - 'send_mail_success' => '邮件发送成功', - 'send_mail_error' => '邮件发送失败', - 'send_mail_interface_is_not_exist' => '邮件接口不存在', - 'send_mail_interface_not_supported' => '邮件接口不支持', - 'send_mail_interface_is_disabled' => '邮件接口已禁用', - 'send_mail_interface_not_installed_' => '邮件接口未安装', - 'send_mail_action_not_enabled' => '邮件发送动作未开启', - 'send_mail_interface_not_set' => '邮件发送接口未设置', - 'send_mail_template_not_set' => '邮件发送模板未设置', - 'email_cancel_send' => '邮件取消发送', - 'sms_cancel_send' => '短信取消发送', - - - # 发送管理 - 'notice_action_code'=>'验证码', - 'notice_action_client_login_success'=>'用户登录', - 'notice_action_client_register_success'=>'用户注册', - 'notice_action_client_change_phone'=>'用户更改手机', - 'notice_action_client_change_email'=>'用户更改邮箱', - 'notice_action_client_change_password'=>'用户更改密码', - 'notice_action_order_create'=>'订单创建', - 'notice_action_host_pending'=>'产品开通中', - 'notice_action_host_active'=>'开通成功', - 'notice_action_host_suspend'=>'产品暂停通知', - 'notice_action_host_unsuspend'=>'产品解除暂停通知', - 'notice_action_host_terminate'=>'产品删除通知', - 'notice_action_host_upgrad'=>'产品升降级', - 'notice_action_admin_create_account'=>'超级管理员添加后台管理员', - 'notice_action_host_renewal_first'=>'第一次续费提醒', - 'notice_action_host_renewal_second'=>'第二次续费提醒', - 'notice_action_host_overdue_first'=>'逾期付款第一次提醒', - 'notice_action_host_overdue_second'=>'逾期付款第二次提醒', - 'notice_action_host_overdue_third'=>'逾期付款第三次提醒', - 'notice_action_order_overdue'=>'订单未付款通知', - 'notice_action_admin_order_amount'=>'订单金额修改', - 'notice_action_order_pay'=>'订单支付通知', - 'notice_action_order_recharge'=>'充值成功通知', - 'notice_setting_sms_global_template_error' => '国际短信模板ID错误', - 'notice_setting_sms_template_error' => '国内短信模板ID错误', - 'notice_setting_email_template_error' => '邮件接口模板ID错误', - 'notice_setting_sms_enable_error' => '短信启用参数只能是1或0', - 'notice_setting_email_enable_error' => '邮件启用参数只能是1或0', - 'notice_setting_name_not_exist' => '动作名称不能为空', - - # 接口管理 - 'module_error' => '模块类型错误', - 'server_is_not_exist' => '接口不存在', - 'server_is_used_for_host_cannot_delete' => '产品正在使用该接口,不能删除', - 'server_is_used_for_product_cannot_delete' => '商品正在使用该接口,不能删除', - 'please_enter_server_name' => '请填写接口名称', - 'server_name_at_least_1_chars' => '接口名称至少1个字符', - 'server_name_cannot_exceed_50_chars' => '接口名称最多不能超过50个字符', - 'please_select_module' => '请选择模块类型', - 'module_at_least_1_chars' => '模块类型至少1个字符', - 'module_cannot_exceed_100_chars' => '模块类型最多不能超过100个字符', - 'please_enter_url' => '请填写地址', - 'please_enter_an_right_url' => '请输入正确的地址', - 'server_username_cannot_exceed_100_chars' => '用户名最多不能超过100个字符', - 'server_password_cannot_exceed_100_chars' => '密码最多不能超过100个字符', - 'server_status_only_zero_or_one' => '是否启用只能是0或1', - 'select_server_used_or_not_found' => '所选接口已使用或不存在', - 'select_server_module_is_different' => '所选接口模块不同', - 'server_group_not_found' => '接口分组不存在', - 'server_group_is_used_for_product_cannot_delete' => '商品正在使用该接口分组,不能删除', - 'server_group_have_server_cannot_delete' => '该分组下有接口则不能删除分组', - 'please_enter_server_group_name' => '请输入接口分组名称', - 'server_group_name_at_least_1_chars' => '接口分组名称至少1个字符', - 'server_group_name_cannot_exceed_50_chars' => '接口分组名称最多不能超过50个字符', - 'please_select_server' => '请选择接口', - 'server_must_be_array' => '接口只能是数组', - 'server_group_have_multi_server_cannot_modify_one_server_module' => '接口所属分组有其他接口,不能修改模块类型', - - # 模块功能 - 'undefined_test_connect_function' => '未定义测试连接方法', - 'module_file_is_not_exist' => '模块文件不存在', - 'module_create_success' => '开通成功', - 'module_create_fail' => '开通失败', - 'module_suspend_success' => '暂停成功', - 'module_suspend_fail' => '暂停失败', - 'module_unsuspend_success' => '解除暂停成功', - 'module_unsuspend_fail' => '解除暂停失败', - 'module_cannot_find_template_file' => '模块找不到对应模板文件', - 'module_res_format_error' => '模块返回值格式错误', - 'module_operate_success' => '操作成功', - 'module_operate_fail' => '操作失败', - 'module_test_connect_success' => '连接成功', - 'module_test_connect_fail' => '连接失败', - - # 系统升级 - 'get_new_version_failed' => '未获取到最新系统版本号,请稍后重试', - 'package_has_downloaded' => '安装包已下载', - 'root_cannot_read_write' => '根目录不可读/写', - 'upgrade_cannot_read_write' => '升级目录不可读/写', - 'version_is_last' => '您的系统已经是最新版本,无需升级', - 'open_remote_file_failed' => '打开远程文件失败!', - 'download_sucesss' => '已成功下载', - 'download_failed' => '下载压缩包失败', - 'upgrade_download_not_exist' => '当前不存在升级下载任务', - 'not_login_market_no_license' => '未登录应用商店,无识别码', - 'not_order_service' => '未订购服务', - - # 导航管理 - 'nav_is_not_exist' => '默认导航不存在', - 'product_error' => '商品错误', - - # 首页管理 - 'one_year_ago' => '一年前', - 'day' => '天', - 'hour' => '小时', - 'minute' => '分钟', - 'ago' => '前', - - # 实名认证 - 'certification_is_not_open' => '实名认证尚未开启', - 'certification_approve' => '实名认证已通过', - 'certification_reject' => '实名认证已驳回', - 'certification_person_completed' => '账号已完成个人认证', - 'certification_person_uncompleted' => '账号未完成个人认证', - 'certification_plugin_name_require' => '请选择实名接口', - 'certification_card_name_require' => '姓名必须', - 'certification_card_name_max' => '姓名不超过255个字符', - 'certification_card_type_require' => '证件类型必须', - 'certification_card_type_in' => '证件类型为0或1', - 'certification_card_number_require' => '证件号必须', - 'certification_card_number_max' => '证件号不超过255个字符', - 'certification_company_require' => '公司名称必须', - 'certification_company_max' => '公司名称不超过255个字符', - 'certification_company_organ_code_require' => '公司代码必须', - 'certification_company_organ_code_max' => '公司代码不超过255个字符', - 'certification_company_completed' => '账号已完成企业认证', - 'certification_company_pending' => '企业认证待审核,不可提交', - 'certification_company_post' => '企业认证已提交资料,不可提交', - 'certification_card_number_other_client_used' => '身份证号已被他人使用', - 'certification_must' => '必须', - 'certification_upload' => '必须上传', - 'certification_file_allow' => '文件名只允许数字,字母,还有汉字', - 'certification_customfields_select_options' => '{title}在{options}之中', - 'certification_phone_consistency' => '用户注册手机号需与实名手机号一致', - 'certification_img_one' => '请上传身份证号正面照', - 'certification_img_two' => '请上传身份证号反面照', - 'certification_img_three' => '请上传营业执照', - 'certification_info_post_again' => '请重新提交实名资料', - 'personal' => '个人', - 'company' => '公司', - - # 应用接口 - 'not_install_ioncube' => '未安装ionCube扩展不可安装应用', - 'request_fail_http_code' => '请求失败,HTTP状态码:{code}', - 'app_install_success' => '应用安装成功', - 'app_download_fail' => '应用下载失败', - 'app_unzip_fail' => '应用文件解压失败,失败code:{code},请到网站目录下解压下载的文件{file}', - - # - 'log_module_create_account_success' => '产品{host}模块开通成功', - 'log_module_create_account_failed' => '产品{host}模块开通失败,原因:{reason}', - 'log_module_suspend_account_success' => '产品{host}模块暂停成功,暂停类型:{type},暂停原因:{reason}', - 'log_module_suspend_account_failed' => '产品{host}模块暂停失败,原因:{reason}', - 'log_module_unsuspend_account_success' => '产品{host}模块取消暂停成功', - 'log_module_unsuspend_account_failed' => '产品{host}模块取消暂停失败,原因:{reason}', - 'log_module_terminate_account_success' => '产品{host}模块删除成功', - 'log_module_terminate_account_failed' => '产品{host}模块删除失败,原因:{reason}', - -]; diff --git a/10.3.4/public/admin/template/default/css/invoice_address.less b/10.3.4/public/admin/template/default/css/invoice_address.less deleted file mode 100644 index 0f2a612a..00000000 --- a/10.3.4/public/admin/template/default/css/invoice_address.less +++ /dev/null @@ -1,12 +0,0 @@ -.invoice-address { - .operation-icon { - font-size: 18px; - color: #0052D9; - cursor: pointer; - // margin-right: 15px; - } -} - -.t-dialog__body__icon { - padding-bottom: 0; -} \ No newline at end of file diff --git a/10.3.4/public/admin/template/default/js/configuration_upgrade.js b/10.3.4/public/admin/template/default/js/configuration_upgrade.js deleted file mode 100644 index cb9c1c8e..00000000 --- a/10.3.4/public/admin/template/default/js/configuration_upgrade.js +++ /dev/null @@ -1,192 +0,0 @@ -(function (window, undefined) { - var old_onload = window.onload - window.onload = function () { - const template = document.getElementsByClassName('configuration-system')[0] - Vue.prototype.lang = window.lang - Vue.prototype.moment = window.moment; - const host = location.host - const fir = location.pathname.split('/')[1] - const str = `${host}/${fir}/` - new Vue({ - data() { - return { - newList: [], - isLoading: false, - columns: [ - { - colKey: 'title', - title: lang.title, - className: 'table-row', - }, - { - className: 'table-row', - colKey: 'create_time', - title: lang.release_time, - }, - ], - total: 0, - pagination: { - current: 1, - pageSize: 10, - showJumper: true, - }, - adminArr: JSON.parse(localStorage.getItem('common_set')).lang_admin, - homeArr: JSON.parse(localStorage.getItem('common_set')).lang_home, - // 系统版本信息 - systemData: {}, - // 更新信息 - updateContent: {}, - isDown: false, - updateData: { - progress: '0.00%' - }, - newListParams: { - limit: 10, - page: 1, - parent_id: 3 - }, - isShowProgress: false, - timer: null, - hasUpdate: false, - isCanUpdata: sessionStorage.isCanUpdata === 'true', - } - - }, - methods: { - // 获取版本信息 - async getVersion() { - try { - const res = await version() - this.systemData = res.data.data - if (this.systemData.is_download == 1) { - this.isDown = true - } - // 判断版本是否可以更新 - this.hasUpdate = this.checkVersion(this.systemData.version, this.systemData.last_version) - this.isCanUpdata = this.hasUpdate - localStorage.setItem('systemData', JSON.stringify(this.systemData)) - sessionStorage.setItem('isCanUpdata', this.hasUpdate) - } catch (error) { - - } - }, - /** - * - * @param {string} nowStr 当前版本 - * @param {string} lastStr 最新版本 - */ - checkVersion(nowStr, lastStr) { - const nowArr = nowStr.split('.') - const lastArr = lastStr.split('.') - let hasUpdate = false - const nowLength = nowArr.length - const lastLength = lastArr.length - - const length = Math.min(nowLength, lastLength) - for (let i = 0; i < length; i++) { - if (lastArr[i] - nowArr[i] > 0) { - hasUpdate = true - } - } - if (!hasUpdate && lastLength - nowLength > 0) { - hasUpdate = true - } - return hasUpdate - }, - // 获取更新信息 - getUpContent() { - upContent().then(res => { - if (res.data.status == 200) { - this.updateContent = res.data.data - localStorage.setItem('updateContent', JSON.stringify(this.updateContent)) - } - }) - }, - // BaseTable 中只有 page-change 事件,没有 change 事件 - onPageChange(pageInfo) { - this.pagination.current = pageInfo.current - this.pagination.pageSize = pageInfo.pageSize - this.newListParams.limit = pageInfo.pageSize - this.newListParams.page = pageInfo.current - this.fetchData() - }, - async fetchData() { - try { - this.isLoading = true; - // 请求可能存在跨域问题 - await newsList(this.newListParams).then((res) => { - this.newList = res.data.data.list - this.newList.forEach(item => { - item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD HH:mm') - }) - this.pagination.total = res.data.data.count - }) - // 数据加载完成,设置数据总条数 - } catch (err) { - this.data = []; - } - this.isLoading = false; - }, - // 跳转到升级页面 - toUpdate() { - location.href = '/upgrade/update.html' - // location.href = 'update.htm' - }, - onRowClick(item) { - // window.open(`https://www.idcsmart.com/news_cont2/${item.row.id}.html`) - window.open(`https://my.idcsmart.com/plugin/21/news_detail.htm?id=${item.row.id}`) - }, - onRowMouseover(item) { - - }, - // 开始下载 - beginDown() { - if (this.systemData.last_version == this.systemData.version) { - this.$message.warning(lang.invoice_text27) - return false - } - - this.isShowProgress = true - upDown().then(res => { - - if (res.data.status === 200) { - - } - }).catch((error) => { - this.$message.warning(error.data.msg) - }) - - // 轮询下载进度 - if (this.timer) { - clearInterval(timer) - } - this.timer = setInterval(() => { - upProgress().then(res => { - if (res.data.status === 200) { - this.updateData = res.data.data - if (this.updateData.progress == '100.00%') { - clearInterval(this.timer) - this.isShowProgress = false - this.isDown = true - } - } - }).catch(error => { - console.log(error.data.data); - if (error.data.data == lang.invoice_text28) { - this.isShowProgress = false - clearInterval(this.timer) - } - }) - }, 2000) - } - }, - created() { - this.getVersion() - this.getUpContent() - this.fetchData() - document.title = lang.system_upgrade + '-' + localStorage.getItem('back_website_name') - }, - }).$mount(template) - typeof old_onload == 'function' && old_onload() - }; -})(window); diff --git a/10.3.4/public/admin/template/default/js/host_detail.js b/10.3.4/public/admin/template/default/js/host_detail.js deleted file mode 100644 index 0778e34e..00000000 --- a/10.3.4/public/admin/template/default/js/host_detail.js +++ /dev/null @@ -1,994 +0,0 @@ -(function (window, undefined) { - var old_onload = window.onload - window.onload = function () { - const template = document.getElementsByClassName('host-detail')[0] - Vue.prototype.lang = window.lang - Vue.prototype.moment = window.moment - const host = location.origin - const fir = location.pathname.split('/')[1] - const str = `${host}/${fir}/` - new Vue({ - data() { - return { - urlPath: url, - baseUrl: str, - id: '', - client_id: '', - data: [], - tableLayout: false, - bordered: true, - visible: false, - delVisible: false, - hover: true, - isLoading: false, - diaTitle: '', - isAgent: false, - serverParams: { - page: 1, - limit: 20 - }, - serverGroupParams: { - page: 1, - limit: 20 - }, - total: 0, - groupTotal: 0, - loading: false, - moneyLoading: false, - statusVisble: false, - title: '', - delId: '', - formData: { - id: '', - product_id: '', - server_id: '', - name: '', - notes: '', - first_payment_amount: '', - renew_amount: '', - billing_cycle: '', - active_time: '', - due_time: '', - status: '', - customfield: {}, - upstream_host_id: null - }, - upData: {}, - status: [], - rules: { - name: [ - { validator: val => val.length <= 100, message: lang.verify3 + 100 } - ], - notes: [ - { validator: val => val.length <= 1000, message: lang.verify3 + 1000 } - ], - first_payment_amount: [ - { required: true, message: lang.input + lang.buy_amount, type: 'error' }, - { - pattern: /^\d+(\.\d{0,2})?$/, message: lang.verify12, type: 'warning' - }, - { - validator: val => val >= 0, message: lang.verify12, type: 'warning' - } - ], - renew_amount: [ - { required: true, message: lang.input + lang.renew_amount, type: 'error' }, - { - pattern: /^\d+(\.\d{0,2})?$/, message: lang.verify12, type: 'warning' - }, - { - validator: val => val >= 0, message: lang.verify12, type: 'warning' - } - ] - }, - // 变更记录 - logData: [], - logCunt: 0, - tableLayout: false, - bordered: true, - hover: true, - statusTip: '', - proList: [], - currency_prefix: JSON.parse(localStorage.getItem('common_set')).currency_prefix, - serverList: [], - cycleList: [ - { value: 'free', label: lang.free }, - { value: 'onetime', label: lang.onetime }, - { value: 'recurring_prepayment', label: lang.recurring_prepayment }, - { value: 'recurring_postpaid', label: lang.recurring_postpaid }, - ], - cycleObj: { - free: lang.free, - onetime: lang.onetime, - recurring_prepayment: lang.recurring_prepayment, - recurring_postpaid: lang.recurring_postpaid - }, - done: false, - popupProps: { - overlayStyle: (trigger) => ({ width: `${trigger.offsetWidth}px` }), - }, - config: '', - // 续费相关 - renewVisible: false, - renewList: [], - curId: 1, - renewTotal: '', - pay: false, - submitLoading: false, - showId: [1, 2, 3], - curRenew: {}, - curStatus: '', - promoList: [], - recordColumns: [ - { - colKey: 'create_time', - title: lang.use_time - }, - { - colKey: 'scene', - title: lang.use_cycle - }, - { - colKey: 'order_id', - title: lang.order_number - }, - { - colKey: 'promo', - title: lang.promo_code, - width: 220 - }, - ], - recordLoading: false, - hasPlugin: false, - tempCycle: '', - /* 1-7 */ - moduleVisible: false, - suspendVisible: false, - optTilte: '', - optType: '', // create unsuspend delete - suspendType: [ - { - value: 'overdue', - label: lang.overdue - }, - { - value: 'overtraffic', - label: lang.overtraffic - }, - { - value: 'certification_not_complete', - label: lang.certification_not_complete - }, - { - value: 'other', - label: lang.other - } - ], - suspendForm: { - suspend_type: 'overdue', - suspend_reason: '' - }, - moduleLoading: false, - isShowModule: false, - optBtns: [], - clientDetail: {}, - searchLoading: false, - clientList: [], - clinetParams: { - page: 1, - limit: 20, - orderby: 'id', - sort: 'desc' - }, - hasTicket: false, - authList: JSON.parse( - JSON.stringify(localStorage.getItem("backAuth")) - ), - /* 新增下拉优化插件 */ - hasProPlugin: false, - selectWay: '', - visibleTree: false, - productName: '', - firstGroup: [], - secondGroup: [], - fir_pro: [], // 一级+商品 - second_pro: [], // 二级+商品 - fir_second_pro: [], // 一级+二级+商品 - isClick: false, - clickExpand: [], - hostFieldList: [], - hostArr: [], - tempHostId: null, - // 手动资源 - hasResources: false, - curResourcesId: '', - resourceDialog: false, - resourceList: [], - resourceType: '', // allot free - resourceTitle: '', - resourceVisible: false, - resourceId: '', - resourcesColumns: [ - { colKey: 'dedicated_ip', title: 'IP', width: '120' }, - { colKey: 'power_status', title: lang.status }, - { colKey: 'configuration', title: lang.config, width: '200', ellipsis: true }, - { colKey: 'notes', title: lang.notes }, - // { colKey: 'ipmi', title: 'IPMI' }, - // { colKey: 'ipmi_auth', title: lang.ipmi_auth }, - { colKey: 'supplier', title: lang.manual_text10 }, - { colKey: 'cost', title: lang.manual_text11 }, - { colKey: 'user', title: lang.manual_text12, width: '200', ellipsis: true }, - { colKey: 'due_time', title: lang.due_time, width: '180' }, - { colKey: 'opt', title: lang.operation, width: '80' } - ] - } - }, - watch: { - 'formData.type': { - immediate: true, - handler(val) { - this.curList = val === 'server' ? this.serverList : this.serverGroupList - } - }, - serverList() { - this.done = this.serverList.length === this.total - }, - curId: { - handler(val) { - this.curRenew = this.renewList[val - 1] - } - } - }, - created() { - const query = this.getUrlParams() - this.client_id = query.client_id - this.formData.id = this.id = query.id - this.langList = JSON.parse(localStorage.getItem('common_set')).lang_home - this.getClintList() - this.getProDetail() - this.getproModule() - this.getUpHostDetail() - this.getPlugin() - const navList = JSON.parse(localStorage.getItem('backMenus')) - let tempArr = navList.reduce((all, cur) => { - cur.child && all.push(...cur.child) - return all - }, []) - const curValue = tempArr.filter(item => item.url === 'client.htm')[0]?.id - localStorage.setItem('curValue', curValue) - - this.getBtns() - this.getUserDetail() - this.getHostList() - }, - computed: { - calcStatus() { - return status => { - switch (status) { - case 'on': - return lang.manual_text14 - case 'off': - return lang.manual_text15 - case 'error': - return lang.manual_text16 - default: - return '--' - } - - } - }, - disabled() { - return this.formData.due_time === '' && this.formData.billing_cycle === 'onetime' - }, - calcShow() { - return (data) => { - return `#${data.id}-` + (data.username ? data.username : (data.phone ? data.phone : data.email)) + (data.company ? `(${data.company})` : '') - } - }, - isExist() { - return !this.clientList.find(item => item.id === this.clientDetail.id) - }, - /* 04-12 */ - calcProduct() { - switch (this.selectWay) { - case 'first_group': - return this.fir_pro; - case 'second_group': - return this.second_pro; - case 'first_second_group': - return this.fir_second_pro; - } - }, - calcName() { - return (id) => { - return this.proList.filter(item => item.id === id)[0]?.name - } - }, - calcExpand() { - const arr = this.proList.filter(item => item.id === this.formData.product_id) - return ['f' + arr[0]?.product_group_id_first, 's' + arr[0]?.product_group_id_second] - } - }, - mounted() { - document.addEventListener('click', () => { - this.visibleTree = false - }) - this.$nextTick(() => { - document.getElementById(`myPopup`).onclick = () => { - event.stopPropagation() - } - }) - }, - methods: { - /* 手动资源 */ - async getResourcesList() { - try { - const res = await getManualResource({ page: 1, limit: 1000 }) - this.resourceList = res.data.data.list - this.resourceList.forEach(item => { - getResourceStatus({id: item.id}).then(result => { - item.power_status = result.data.data.status - }).catch(err => { - item.power_status = err.data.data.status - }) - }) - } catch (error) { - - } - }, - handlerDistribute() { - this.resourceDialog = true - }, - optItem(row, type) { - this.resourceId = row.id - this.resourceType = type - if (type === 'allot') { - this.resourceTitle = lang.sure_allot_resource - } else { - this.resourceTitle = lang.sure_free_resource - } - this.resourceVisible = true - }, - async handlerResource() { - try { - const res = await changeResource(this.resourceType, { - id: this.resourceId, - host_id: this.id - }) - this.$message.success(res.data.msg) - this.resourceVisible = false - this.getResourcesList() - this.getHostField() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - /* 手动资源 end */ - goBack() { - const url = sessionStorage.currentHostUrl || '' - sessionStorage.removeItem('currentHostUrl') - if (url) { - location.href = url - } else { - window.history.back() - } - }, - goClient() { - sessionStorage.removeItem('hostListParams') - sessionStorage.removeItem('currentHostUrl') - location.href = 'client.htm' - }, - changePro() { - this.id = this.formData.id - location.href = `host_detail.htm?client_id=${this.client_id}&id=${this.id}` - // this.getProDetail() - // this.getproModule() - // this.getUpHostDetail() - }, - async getHostList() { - try { - const res = await getClientPro(this.id, { page: 1, limit: 9999, client_id: this.client_id }) - this.hostArr = res.data.data.list - } catch (error) { - this.$message.error(error.data.msg) - } - }, - /* 产品内页模块输入框输出 */ - getHostField() { - hostField(this.id).then((res) => { - this.hostFieldList = res.data.data || [] - this.hasResources = this.hostFieldList[0]?.field.reduce((all, cur) => { - all.push(cur.key) - return all - }, []).includes('manual_resource') - if (this.hasResources) { - this.curResourcesId = this.hostFieldList[0]?.field.filter(item => item.key === 'manual_resource')[0]?.value - this.getResourcesList() - } - }) - }, - - /* 新增下拉优化插件 */ - // 获取一级分组 - async getFirPro() { - try { - const res = await getFirstGroup() - this.firstGroup = res.data.data.list.map(item => { - item.key = 'f' + item.id - return item - }) - return this.firstGroup - } catch (error) { - } - }, - // 获取二级分组 - async getSecPro() { - try { - const res = await getSecondGroup() - this.secondGroup = res.data.data.list.map(item => { - item.key = 's' + item.id - return item - }) - return this.secondGroup - } catch (error) { - } - }, - // 初始化 - init() { - try { - this.loading = true - // 获取商品,一级,二级分组 - Promise.all([this.getProList(), this.getFirPro(), this.getSecPro()]).then(res => { - // 一级+商品 - if (this.selectWay === 'first_group') { - this.fir_pro = this.firstGroup.map(item => { - item.children = [] - item.children.push(...this.proList.filter(el => el.product_group_id_first === item.id)) - return item - }).filter(item => item.children.length > 0) - } else if (this.selectWay === 'second_group') { - // 二级+商品 - this.second_pro = this.secondGroup.map(item => { - item.children = [] - item.children.push(...this.proList.filter(el => el.product_group_id_second === item.id)) - return item - }).filter(item => item.children.length > 0) - } else if (this.selectWay === 'first_second_group') { - // 一二级+商品 - const fArr = res[1].map(item => { - let secondArr = [] - res[2].forEach(sItem => { - if (sItem.parent_id === item.id) { - secondArr.push(sItem) - } - }) - item.children = secondArr - return item - }) - setTimeout(() => { - this.fir_second_pro = fArr.map(item => { - item.children.map(ele => { - let temp = [] - res[0].forEach(e => { - if (e.product_group_id_second === ele.id) { - temp.push(e) - } - }) - ele.children = temp - return ele - }) - return item - }) - }, 0) - } - }) - } catch (error) { - console.log('@@@@', error) - this.loading = false - } - }, - async getConfig() { - try { - const res = await getSelectConfig() - this.selectWay = res.data.data.config - } catch (error) { - } - }, - focusHandler() { - this.visibleTree = true - this.isClick = false - }, - // 商品选择 - onClick(e) { - if (!e.node.data.children) { - const pName = e.node.data.name - const pId = e.node.data.id - this.productName = pName - this.formData.product_id = pId - this.visibleTree = false - } else { - this.isClick = true - // if (Array.from(this.clickExpand).toString() == [e.node.value].toString()) { - // this.clickExpand = [] - // } else { - // if (this.selectWay === 'first_second_group' && Array.from(this.clickExpand).length < 2) { - // this.clickExpand.push(e.node.value) - // } else { - // this.clickExpand = [e.node.value] - // } - - // } - } - }, - getLabel(createElement, node) { - const label = node.data.name - const { data } = node - data.label = label - return label - }, - /* 新增下拉优化插件 end*/ - changeUser(id) { - this.id = id - location.href = `client_host.htm?client_id=${this.client_id}` - }, - async getUpHostDetail() { - try { - const res = await upHostDetail(this.id) - this.upData = res.data.data.host.host - } catch (error) { - console.log(error.data.msg) - } - }, - async getClintList() { - try { - this.searchLoading = true - const res = await getClientList(this.clinetParams) - this.clientList = res.data.data.list - this.clientTotal = res.data.data.count - this.searchLoading = false - } catch (error) { - this.searchLoading = false - console.log(error.data.msg) - } - }, // 远程搜素 - remoteMethod(key) { - this.clinetParams.keywords = key - this.getClintList() - }, - filterMethod(search, option) { - return option - }, - // 获取用户详情 - async getUserDetail() { - try { - const res = await getClientDetail(this.client_id); - this.clientDetail = res.data.data.client; - } catch (error) { } - }, - /* 1-31 */ - async getBtns() { - try { - const res = await getMoudleBtns({ - id: this.id - }) - this.optBtns = res.data.data.button - } catch (error) { - - } - }, - /* 1-7 start */ - handlerMoudle(type) { - this.optType = type - switch (type) { - case 'create': - this.optTilte = lang.module_tip1; - break; - case 'unsuspend': - this.optTilte = lang.module_tip2; - break; - case 'terminate': - this.optTilte = lang.module_tip3; - break; - case 'suspend': - this.optTilte = lang.module_tip4; - this.handlerSuspend(); - break; - case 'renew': - this.renewDialog() - } - if (type !== 'renew' && type !== 'suspend') { - this.moduleVisible = true - } - - }, - confirmModule() { - switch (this.optType) { - case 'create': - return this.createHandler(); - case 'unsuspend': - return this.unsuspendHandler(); - case 'terminate': - return this.deleteHandler() - } - }, - // 开通 - async createHandler() { - try { - this.moduleLoading = true - const res = await createModule({ - id: this.id - }) - this.$message.success(res.data.msg) - this.getProDetail() - this.getUpHostDetail() - this.getBtns() - this.moduleLoading = false - this.moduleVisible = false - } catch (error) { - this.moduleLoading = false - this.moduleVisible = false - this.$message.error(error.data.msg) - } - }, - // 取消停用 - async unsuspendHandler() { - try { - this.moduleLoading = true - const res = await unsuspendModule({ - id: this.id - }) - this.$message.success(res.data.msg) - this.getProDetail() - this.getUpHostDetail() - this.getBtns() - this.moduleLoading = false - this.moduleVisible = false - } catch (error) { - this.moduleLoading = false - this.moduleVisible = false - this.$message.error(error.data.msg) - } - }, - // 删除 - async deleteHandler() { - try { - this.moduleLoading = true - const res = await delModule({ - id: this.id - }) - this.$message.success(res.data.msg) - this.getProDetail() - this.getBtns() - this.getUpHostDetail() - - this.moduleLoading = false - this.moduleVisible = false - } catch (error) { - this.moduleLoading = false - this.moduleVisible = false - this.$message.error(error.data.msg) - } - }, - // 暂停 - handlerSuspend() { - this.suspendForm.suspend_type = 'overdue' - this.suspendForm.suspend_reason = '' - this.suspendVisible = true - }, - // 提交停用 - async onSubmit() { - try { - this.moduleLoading = true - const res = await suspendModule({ - id: this.id, - suspend_type: this.suspendForm.suspend_type, - suspend_reason: this.suspendForm.suspend_reason - }) - this.$message.success(res.data.msg) - this.getProDetail() - this.getBtns() - this.getUpHostDetail() - - this.moduleLoading = false - this.suspendVisible = false - } catch (error) { - this.moduleLoading = false - this.$message.error(error.data.msg) - } - }, - /* 1-7 end */ - async getPlugin() { - try { - const res = await getAddon(); - const temp = res.data.data.list - .reduce((all, cur) => { - all.push(cur.name); - return all; - }, []) - this.hasPlugin = temp.includes("PromoCode"); - this.hasTicket = temp.includes("IdcsmartTicket") - this.hasPlugin && this.getPromoList() - this.hasProPlugin = temp.includes("ProductDropDownSelect"); - if (this.hasProPlugin) { - this.getConfig() - } else { - this.selectWay = 'default' - } - } catch (error) { } - }, - // 获取优惠码使用记录 - async getPromoList() { - try { - const res = await proPromoRecord({ id: this.id }) - this.promoList = res.data.list - } catch (error) { - console.log(error) - } - }, - jumpOrder(row) { - location.href = str + `order.htm?order_id=${row.order_id}` - }, - /* 跳转到订单/工单 */ - jumpToOrder() { - location.href = str + `client_order.htm?id=${this.client_id}&host_id=${this.id}` - }, - jumpToTicket() { - location.href = str + `plugin/idcsmart_ticket/client_ticket.htm?id=${this.client_id}&host_id=${this.id}` - }, - /* 续费 */ - renewDialog() { - this.getRenewPage() - }, - // 获取续费页面 - async getRenewPage() { - try { - const res = await getSingleRenew(this.formData.id) - this.renewList = res.data.data.host.map((item, index) => { - item.id = index + 1 - return item - }) - if (this.renewList.length === 0) { - return this.$message.warning(lang.renew_tip) - } - this.renewVisible = true - this.curRenew = this.renewList[0] - } catch (error) { - this.$message.error(error.data.msg) - } - }, - // 向左移动 - subIndex() { - let num = this.curId - if (num > 1) { - num -= 1 - this.curId -= 1 - } - if (this.showId[0] > 1) { - let newIds = this.showId - newIds[0] = newIds[0] - 1 - newIds[1] = newIds[1] - 1 - newIds[2] = newIds[2] - 1 - this.showId = newIds - } - }, - // 向右移动 - addIndex() { - let num = this.curId - if (num < this.renewList.length) { - num += 1 - this.curId = num++ - } - if (this.showId[2] < this.renewList.length) { - let newIds = this.showId - newIds[0] = newIds[0] + 1 - newIds[1] = newIds[1] + 1 - newIds[2] = newIds[2] + 1 - this.showId = newIds - } - }, - checkCur(item) { - this.curId = item.id - }, - async submitRenew() { - try { - this.submitLoading = true - const temp = JSON.parse(JSON.stringify(this.curRenew)) - delete temp.id - const params = { - id: this.formData.id, - pay: this.pay, - ...temp - } - const res = await postSingleRenew(params) - this.$message.success(res.data.msg) - this.submitLoading = false - this.renewVisible = false - this.getProDetail() - this.getUpHostDetail() - - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - }, - back() { - this.delVisible = true - }, - // 删除 - deltePro(row) { - this.delVisible = true - }, - async onConfirm() { - try { - const res = await deletePro(this.id) - this.$message.success(res.data.msg) - this.delVisible = false - setTimeout(() => { - window.location = document.referrer - }, 300) - } catch (error) { - this.delVisible = false - this.$message.error(error.data.msg) - } - }, - - getUrlParams() { - const url = window.location.href; - // 判断是否有参数 - if (url.indexOf('?') === -1) { - return {} - } - const params = url.split('?')[1]; - const paramsArr = params.split('&'); - const paramsObj = {}; - paramsArr.forEach((item) => { - const key = item.split('=')[0]; - const value = item.split('=')[1]; - paramsObj[key] = value; - }) - return paramsObj; - }, - getQuery(val) { - return val.split('=')[1] - }, - checkTime(val) { - if (moment(val).unix() > moment(this.formData.due_time).unix()) { - return { result: false, message: lang.verify6, type: 'error' } - } - return { result: true } - }, - checkTime1(val) { - if (moment(val).unix() < moment(this.formData.active_time).unix()) { - return { result: false, message: lang.verify6, type: 'error' } - } - return { result: true } - }, - changeActive() { - this.$refs.userInfo.validate({ - fields: ['active_time', 'due_time'] - }); - }, - async getproModule() { - try { - const res = await getproModule(this.id) - this.isShowModule = res.data.data.content ? true : false - this.$nextTick(() => { - $('.config-box .content').html(res.data.data.content) - }) - } catch (error) { - } - }, - async getProList() { - try { - const res = await getProList() - const temp = res.data.data.list.map(item => { - item.key = 't' + item.id - return item - }) - // 处理老财务迁移过后的数据:产品id不在产品列表中 - let hasPro = temp.some(item => this.formData.product_id === item.id) - if (!hasPro) { - temp.unshift({ - id: this.formData.product_id, - name: this.formData.product_name - }) - } - this.proList = temp - return this.proList - } catch (error) { - } - }, - changeType(type) { - this.formData.type = type - this.formData.rel_id = '' - }, - // 修改 - updateUserInfo() { - this.$refs.userInfo.validate().then(async res => { - if (res !== true) { - this.$message.error(res.name[0].message) - return - } - // 验证通过 - try { - this.isLoading = true - const params = { ...this.formData } - params.due_time = (params.due_time === '') ? 0 : params.due_time - params.active_time = (params.active_time === '') ? 0 : params.active_time - if (params.active_time === 0) { - params.active_time = moment(params.active_time * 1000).format('YYYY-MM-DD HH:mm:ss') - } - if (params.due_time === 0) { - params.due_time = moment(params.due_time * 1000).format('YYYY-MM-DD HH:mm:ss') - } - // 修改前台 - const obj = {} - const tempArr = JSON.parse(JSON.stringify(this.hostFieldList)).reduce((all, cur) => { - all.push(...cur.field) - return all - }, []) - tempArr.forEach((item) => { - obj[item.key] = item.value - }) - params.customfield.module_admin_field = obj - // 修改前台结束 - const res = await updateProduct(this.id, params) - this.$message.success(res.data.msg) - this.getProDetail() - this.getUpHostDetail() - this.isLoading = false - } catch (error) { - this.isLoading = false - this.$message.error(error.data.msg) - } - }).catch(err => { - console.log(err) - }) - }, - // 获取用户详情 - async getProDetail() { - try { - let inter = await getInterface(this.serverParams) - this.serverList = inter.data.data.list - this.total = inter.data.data.count - if (this.total > 20) { - this.serverParams.limit = this.total - inter = await getInterface(this.serverParams) - this.serverList = inter.data.data.list - } - - const res = await getProductDetail(this.id) - const temp = res.data.data.host - this.isAgent = res.data.data?.host.agent === 1 - Object.assign(this.formData, temp) - this.formData.active_time = temp.active_time ? moment(temp.active_time * 1000).format('YYYY-MM-DD HH:mm:ss') : '' - this.formData.due_time = temp.due_time ? moment(temp.due_time * 1000).format('YYYY-MM-DD HH:mm:ss') : '' - this.formData.server_id = temp.server_id === 0 ? '' : temp.server_id - this.tempCycle = temp.billing_cycle - this.tempHostId = temp.upstream_host_id - this.$forceUpdate() - this.getHostField() - this.status = res.data.data.status.map((item, index) => { - return { value: item, label: lang[item] } - }) - this.curStatus = this.formData.status - document.title = lang.user_list + '-' + temp.product_name + '-' + localStorage.getItem('back_website_name') - this.init() - } catch (error) { - console.log(error); - } - }, - // 续费 - async renew() { - try { - const res = await getSingleRenew(this.id) - console.log(res) - } catch (error) { - this.$message.error(error.data.msg) - } - } - }, - }).$mount(template) - typeof old_onload == 'function' && old_onload() - }; -})(window); diff --git a/10.3.4/public/clientarea/language/zh-hk.php b/10.3.4/public/clientarea/language/zh-hk.php deleted file mode 100644 index e7a25c29..00000000 --- a/10.3.4/public/clientarea/language/zh-hk.php +++ /dev/null @@ -1,270 +0,0 @@ - '中文繁體',//用于在语言切换下拉中显示 - 'display_flag' => 'CN',//用于显示图片,使用国家代码大写 - 'add_success' => '添加成功', - 'add_fail' => '添加失败', - 'success_message' => '请求成功', - 'fail_message' => '请求失败', - 'create_success' => '创建成功', - 'create_fail' => '创建失败', - 'delete_success' => '删除成功', - 'delete_fail' => '删除失败', - 'update_success' => '修改成功', - 'update_fail' => '修改失败', - 'save_success' => '保存成功', - 'save_fail' => '保存失败', - 'register_success' => '注册成功', - 'register_fail' => '注册失败', - 'pay_success' => '支付成功', - 'pay_fail' => '支付失败', - 'id_error' => 'ID错误', - 'param_error' => '参数错误', - 'cannot_repeat_opreate' => '不可重复操作', - 'disable_success' => '禁用成功', - 'disable_fail' => '禁用失败', - 'enable_success' => '启用成功', - 'enable_fail' => '启用失败', - 'login_success' => '登录成功', - 'login_fail' => '登录失败', - 'move_success' => '移动成功', - 'move_fail' => '移动失败', - 'buy_fail' => '购买失败', - 'buy_success' => '购买成功', - 'missing_route_paramters' => '缺少路由参数{param}', - 'range_of_values' => '{key}取值范围:{value}', - 'gateway_error' => '支付接口错误', - 'login_unauthorized' => '未授权', - 'remember_password_value_0_or_1' => '记住密码取值为0或1', - 'password_is_change_please_login_again' => '密码已修改,请重新授权', - 'logout_success' => '成功退出', - 'inconsistent_login_ip' => '登录ip不一致', - 'login_user_ID_is_inconsistent' => '登录用户ID不一致', - 'log_out_automatically_after_2_hours_without_operation' => '2个小时未操作自动退出登录', - 'login_captcha' => '请输入图形验证码', - 'login_captcha_token' => '请输入图形验证码唯一识别码', - 'login_captcha_error' => '行为验证码错误,请查看配置是否正确', - 'certification_uncertified_cannot_buy_product' => '未实名认证不可购买产品', - - # 权限规则 - 'clientarea_auth_rule_account_index' => '账户详情', - 'clientarea_auth_rule_account_update' => '账户编辑', - 'clientarea_auth_rule_account_verify_old_phone' => '验证原手机', - 'clientarea_auth_rule_account_update_phone' => '修改手机', - 'clientarea_auth_rule_account_verify_old_email' => '验证原邮箱', - 'clientarea_auth_rule_account_update_email' => '修改邮箱', - 'clientarea_auth_rule_account_update_password' => '修改密码', - 'clientarea_auth_rule_account_code_update_password' => '验证码修改密码', - 'clientarea_auth_rule_account_credit_list' => '余额变更记录列表', - 'clientarea_auth_rule_api_list' => 'API密钥列表', - 'clientarea_auth_rule_api_create' => '创建API密钥', - 'clientarea_auth_rule_api_white_list_setting' => 'API白名单设置', - 'clientarea_auth_rule_api_delete' => '删除API密钥', - 'clientarea_auth_rule_cart_index' => '获取购物车', - 'clientarea_auth_rule_cart_create' => '加入购物车', - 'clientarea_auth_rule_cart_update' => '编辑购物车商品', - 'clientarea_auth_rule_cart_update_qty' => '修改购物车商品数量', - 'clientarea_auth_rule_cart_delete' => '删除购物车商品', - 'clientarea_auth_rule_cart_batch_delete' => '批量删除购物车商品', - 'clientarea_auth_rule_cart_clear' => '清空购物车', - 'clientarea_auth_rule_cart_settle' => '结算购物车', - 'clientarea_auth_rule_log_list' => '操作日志', - 'clientarea_auth_rule_order_list' => '订单列表', - 'clientarea_auth_rule_order_index' => '订单详情', - 'clientarea_auth_rule_order_delete' => '删除订单', - 'clientarea_auth_rule_pay_pay' => '支付', - 'clientarea_auth_rule_pay_status' => '支付状态', - 'clientarea_auth_rule_pay_recharge' => '充值', - 'clientarea_auth_rule_pay_credit' => '使用(取消)余额', - 'clientarea_auth_rule_product_settle' => '结算商品', - 'clientarea_auth_rule_transaction_list' => '交易记录', - - # 权限 - 'clientarea_auth_basic_auth' => '基础权限', - 'clientarea_auth_order_product' => '订购产品', - 'clientarea_auth_payment' => '支付', - 'clientarea_auth_account_info' => '账户信息', - 'clientarea_auth_outline' => '概要', - 'clientarea_auth_view_log' => '查看日志', - 'clientarea_auth_finance_info' => '财务信息', - 'clientarea_auth_order_record' => '订单记录', - 'clientarea_auth_transaction' => '交易记录', - 'clientarea_auth_balance_record' => '余额记录', - 'clientarea_auth_security_center' => '安全中心', - 'clientarea_auth_api' => 'API', - 'clientarea_auth_api_log' => 'API日志', - 'clientarea_auth_resource_center' => '资源中心', - 'clientarea_auth_product_auth' => '产品权限', - 'clientarea_auth_on_off_restart' => '开机、关机、重启', - 'clientarea_auth_refund_renew_upgrade' => '退款、续费、升降级', - 'clientarea_auth_control_reinstall_rescue_reset_set_mount' => '控制台、重装、救援、重置密码、设置启动项、挂载ISO', - 'clientarea_auth_delete' => '删除', - - - # 前台登录注册修改密码 - 'login_type_is_required' => '请传入登录类型', - 'login_type_only_code_or_password' => '登录类型取值为code或password', - 'login_account_require' => '请输入账号', - 'login_email_error' => '邮箱格式错误', - 'login_password_require' => '请输入密码', - 'login_password_len' => '密码长度为6-32位', - 'login_remember_password_is_0_or_1' => '记住密码取值为0或1', - 'login_email_is_not_register' => '邮箱未注册', - 'login_password_error' => '账号或密码错误', - 'login_email_is_not_open' => '未开启邮箱登录', - 'login_phone_is_not_open' => '未开启手机登录', - 'login_phone_verify_is_not_open' => '未开启手机验证码登录', - 'register_type_is_required' => '请传入注册类型', - 'register_type_only_phone_or_email' => '注册类型取值为phone或email', - 'register_account_is_required' => '请输入账号', - 'verification_code_has_expired' => '验证码已过期', - 'register_email_is_not_open' => '未开启邮箱注册', - 'register_phone_is_not_open' => '未开启手机注册', - 'login_phone_code_require' => '请选择国家区号', - 'login_phone_code_error' => '国家区号错误', - 'login_phone_require' => '请输入手机号', - 'login_phone_is_not_right' => '手机号格式错误', - 'login_phone_is_not_register' => '手机号未注册', - 'login_client_is_disabled' => '该帐号已停用/关闭,请联系管理员处理', - 'please_enter_vaild_phone' => '请输入正确的手机号', - 'client_name_cannot_exceed_20_chars' => '用户姓名最多不能超过20个字符', - 'passwords_not_match' => '两次输入的密码不一致', - 'phone_has_been_registered' => '手机号已被注册', - 'email_has_been_registered' => '邮箱已被注册', - - # 支付 - 'order_id_is_not_exist' => '请传入订单ID', - 'order_is_not_exist' => '订单不存在', - 'order_ownership_error' => '订单归属错误', - 'order_is_paid' => '订单已支付', - 'gateway_is_required' => '请选择支付方式', - 'no_support_gateway' => '不支持的支付方式', - 'recharge_is_not_open' => '充值功能未开启', - 'recharge_amount_is_greater_than_0' => '最小充值金额大于等于0.01', - 'min_recharge_is_error' => '最小充值金额为{min}', - 'max_recharge_is_error' => '最大充值金额为{max}', - 'recharge_success' => '充值成功', - 'client_recharge' => '用户充值', - 'recharge_order_cannot_use_credit' => '充值订单不可使用余额', - 'client_credit_is_0' => '余额为0', - 'client_credit_is_used' => '您已使用过余额', - 'client_credit_is_not_enough' => '余额不足', - - # 验证码 - 'error_message' => '请求错误', - 'verification_code_error' => '验证码错误', - 'please_get_verification_code' => '请获取验证码', - 'verification_code_can_only_sent_once_per_minute' => '验证码每分钟只能发送一次', - - # 导航 - 'nav_index' => '首页', - 'nav_host_list' => '产品列表', - 'nav_finance_info' => '财务信息', - 'nav_account_info' => '账户信息', - 'nav_security' => '安全', - 'nav_goods_list' => '订购产品', - - # 日志 - 'modify_profile' => '{client}将{description}', - 'old_to_new' => '{old}改为{new}', - 'submit_order' => '{client}提交订单:{order}包含商品:{product}', - 'bound_mobile' => '{client}绑定手机{phone}', - 'change_bound_mobile' => '{client}修改绑定手机为{phone}原手机号为:{old_phone}', - 'bound_email' => '{client}绑定邮箱{email}', - 'change_bound_email' => '{client}修改绑定邮箱为{email}原邮箱为:{old_email}', - 'change_password' => '{client}修改密码', - - 'log_client_login' => '{client}登录系统', - 'log_client_login_status_disabled' => '{client}登录系统失败,已被禁用', - 'log_client_login_code_error' => '{client}登录系统失败,验证码不正确', - 'log_client_login_account_not_register' => '{client}登录系统失败,用户不存在', - 'log_client_login_password_error' => '{client}登录系统失败,密码不正确', - 'log_client_logout' => '{client}注销登录', - 'log_client_register' => '账号{account}注册成功', - 'log_client_pay_order_success' => '{client}支付订单:{order_id},支付金额:{amount}', - 'log_client_pay_with_credit_fail' => '{client}使用部分余额支付失败,失败原因:余额不足(可能将余额应用至其它订单).已将支付金额存入客户余额', - 'log_client_recharge' => '{client}交易流水号:{transaction},充值金额:{amount}', - - 'log_client_add_api' => '{client}添加API,API名称:{name}', - 'log_client_edit_api' => '{client}修改API,API名称:{name}', - 'log_client_delete_api' => '{client}删除API,API名称:{name}', - - 'log_client_cancel_order' => '{client}取消订单{order}', - - - 'client_username' => '姓名', - 'client_company' => '公司', - 'client_country' => '国家', - 'client_address' => '地址', - 'client_language' => '语言', - 'client_notes' => '备注', - - - # 账户管理 - 'please_enter_old_password' => '请输入旧密码', - 'please_enter_new_password' => '请输入新密码', - 'old_password_error' => '旧密码错误', - 'new_password_cannot_same_old_password' => '新密码不能和旧密码相同', - 'please_enter_code' => '请输入验证码', - 'please_verify_old_phone' => '请验证原手机', - 'please_verify_old_email' => '请验证原邮箱', - 'user_not_bind_phone' => '用户未绑定手机', - 'user_not_bind_email' => '用户未绑定邮箱', - 'verify_type_is_required' => '请选择验证类型', - 'verify_type_only_phone_or_email' => '验证类型只能为手机或邮箱', - - # 购物车 - 'clear_cart_success' => '清空购物车成功', - 'position_error' => '位置错误', - 'please_enter_config_options' => '请传入自定义配置', - 'config_options_error' => '自定义配置错误', - 'please_enter_qty' => '请传入数量', - 'qty_error' => '数量错误', - 'product_inventory_shortage' => '商品库存不足', - 'there_are_no_items_in_the_cart' => '购物车内没有商品', - 'please_select_products_in_the_cart' => '请选择购物车商品', - 'cannot_only_buy_son_product' => '子商品不可直接购买', - - # API密钥 - 'api_is_not_exist' => 'API密钥不存在', - 'please_enter_api_name' => '请输入API密钥名称', - 'api_name_cannot_exceed_10_chars' => 'API密钥名称最多不能超过10个字符', - 'please_select_api_status' => '清选择是否开启白名单', - 'api_status_error' => '白名单参数错误', - 'please_enter_api_ip' => '请输入白名单IP', - 'api_ip_error' => '白名单IP格式错误', - 'api_key_create_max' => '单个用户最多只允许创建10个API密钥', - 'api_auth_fail' => '鉴权失败', - - # 产品 - 'host_notes_cannot_exceed_1000_chars' => '备注最多不能超过1000个字符', - 'upstream_host_is_not_exist' => '上游产品不存在', - - # 订单 - 'order_cannot_cancel' => '未支付订单才可以取消', - 'order_host_not_unpaid' => '订单下产品不是未支付状态,不可取消订单', - - # 日志 - 'log_api_auth_login' => '{client}API鉴权登录', - - # 意见反馈 - 'please_enter_feedback_title' => '请输入标题', - 'feedback_title_cannot_exceed_255_chars' => '标题不能超过255个字符', - 'please_enter_feedback_description' => '请输入描述', - 'feedback_contact_cannot_exceed_255_chars' => '联系方式不能超过255个字符', - - # 方案咨询 - 'please_enter_consult_contact' => '请输入联系人', - 'consult_contact_cannot_exceed_50_chars' => '联系人不能超过50个字符', - 'consult_company_cannot_exceed_255_chars' => '公司名称不能超过255个字符', - 'please_enter_consult_phone' => '请输入手机号码', - 'consult_phone_cannot_exceed_20_chars' => '手机号码不能超过20个字符', - 'please_enter_consult_email' => '请输入联系邮箱', - 'consult_email_error' => '联系邮箱格式错误', - 'please_enter_consult_matter' => '请输入咨询产品', - 'consult_matter_cannot_exceed_1000_chars' => '咨询产品不能超过1000个字符', - - 'order_description_append' => '{product_name}({name}),购买时长:{billing_cycle_name}({time})', -]; diff --git a/10.3.4/public/clientarea/template/default/components/topMenu/topMenu.js b/10.3.4/public/clientarea/template/default/components/topMenu/topMenu.js deleted file mode 100644 index 5f4ff70b..00000000 --- a/10.3.4/public/clientarea/template/default/components/topMenu/topMenu.js +++ /dev/null @@ -1,474 +0,0 @@ - -// css 样式依赖common.css -ELEMENT.Dialog.props.closeOnClickModal.default = false -const topMenu = { - template: - ` -
- -
- -
-
- - - - -
- - - - - -
-
- - -
- - - - - -
-
- -
-
- - - -
-
- -
- -
-
- {{lang.subaccount_text56}} - {{lang.subaccount_text57}} -
-
-
-
- - -
-
-
{{item.title}}
-
- {{msgType[item.type]}} - {{item.create_time | formateTime}} -
-
-
-
- -
-
- - - -
-
- -
- -
- -
- - -
- - {{item.display_name}} - -
-
- -
-
-
- -
- -
- -
- -
-
{{firstName}}
- -
- - {{lang.topMenu_text2}} - {{lang.topMenu_text3}} - -
-
- -
-
-
- `, - directives: { - plugin: { - inserted: function (el, binding) { - const addonsDom = document.querySelector('#addons_js') - let addonsArr = []; - let arr = []; - if (addonsDom) { - addonsArr = JSON.parse(addonsDom.getAttribute('addons_js')) || [] // 插件列表 - // 判断是否安装了某插件 - arr = addonsArr.filter(item => item.name === binding.value) - if (arr.length === 0) { - // 未安装 移除该元素的dom - el.parentNode.removeChild(el) - } - } else { - el.parentNode.removeChild(el) - } - } - } - }, - data() { - return { - topInput: "", - // curSrc: url+'/img/common/'+lang_obj.countryImg+'.png' , - curSrc: `/upload/common/country/${lang_obj.countryImg}.png`, - isShowMenu: false, - logo: `/upload/logo.png`, - menu1: [], - menu2: [], - menuActiveId: "", - firstName: '', - hasSeparate: false, - produclData: [], - selectValue: '', - shoppingCarNum: 0, - headBgcList: ['#3699FF', '#57C3EA', '#5CC2D7', '#EF8BA2', '#C1DB81', '#F1978C', '#F08968'], - commonData: { - lang_list: [] - }, - unLogin: true, - isGetData: false, - msgList: [], - msgCount: 0, - accountData: {}, - msgType: { - official: lang.subaccount_text54, - } - } - }, - props: { - isShowMore: { - type: Boolean, - default: false - }, - isShowCart: { - type: Boolean, - default: true - }, - num: { - type: Number, - default: 0 - } - }, - watch: { - num(val) { - if (val) { - this.shoppingCarNum = val - } - } - }, - filters: { - formateTime(time) { - if (time && time !== 0) { - const date = new Date(time * 1000); - Y = date.getFullYear() + '-'; - M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; - D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '; - h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'; - m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); - return (Y + M + D + h + m); - } else { - return "--" - } - } - }, - created() { - this.GetIndexData() - this.doGetMenu() - this.setActiveMenu() - this.getCartList() - this.getCommonSetting() - }, - mounted() { - if (this.getPluginId('ClientCare')) { - this.getMessageList() - } - }, - methods: { - getPluginId(pluginName) { - const addonsDom = document.querySelector('#addons_js') - if (addonsDom) { - const addonsArr = JSON.parse(addonsDom.getAttribute('addons_js')) // 插件列表 - for (let index = 0; index < addonsArr.length; index++) { - const element = addonsArr[index]; - if (pluginName === element.name) { - return element.id - } - } - } else { - throw new Error('请检查页面是否有插件dom') - } - }, - goAccount() { - location.href = '/account.htm?type=3' - }, - getMessageList() { - messageInfo().then(res => { - this.msgList = res.data.data.credit_limit.list - this.msgCount = res.data.data.credit_limit.count - }) - }, - goMsgDetail(id) { - location.href = `/plugin/${getPluginId('ClientCare')}/msgDetail.htm?id=${id}` - }, - // 退出登录 - logOut() { - this.$confirm(lang.topMenu_text4, lang.topMenu_text5, { - confirmButtonText: lang.topMenu_text6, - cancelButtonText: lang.topMenu_text7, - type: 'warning' - }).then(() => { - //const res = await Axios.post('/logout') - Axios.post('/logout').then(res => { - localStorage.removeItem("jwt") - setTimeout(() => { - location.href = '/login.htm' - }, 300) - }) - }).catch(() => { }) - }, - goLogin() { - location.href = '/login.htm' - }, - goHome() { - localStorage.frontMenusActiveId = ""; - location.href = "/home.htm"; - }, - // 获取购物车数量 - getCartList() { - cartList().then((res) => { - this.shoppingCarNum = res.data.data.list.filter(item => item.customfield?.is_domain !== 1).length - }) - }, - GetIndexData() { - accountDetail().then((res) => { - if (res.data.status == 200) { - this.accountData = res.data.data.account; - localStorage.lang = res.data.data.account.language || 'zh-cn'; - this.firstName = res.data.data.account.username.substring(0, 1).toUpperCase() - this.unLogin = false - if (sessionStorage.headBgc) { - this.$refs.headBoxRef.style.background = sessionStorage.headBgc - } else { - const index = Math.round(Math.random() * (this.headBgcList.length - 1)) - this.$refs.headBoxRef.style.background = this.headBgcList[index] - sessionStorage.headBgc = this.headBgcList[index] - } - } - }).finally(() => { - this.isGetData = true - }) - }, - goShoppingCar() { - localStorage.frontMenusActiveId = '' - location.href = '/shoppingCar.htm' - }, - goAccountpage() { - location.href = '/account.htm' - }, - // 语言切换 - changeLang(e) { - if (localStorage.getItem("lang") !== e || !localStorage.getItem("lang")) { - localStorage.setItem("lang", e); - this.accountData.language = e; - this.saveAccount(); - } - }, - // 编辑基础资料 - saveAccount() { - const { username, company, country, address, language, notes } = this.accountData; - const params = { - username, - company, - country, - address, - language, - notes, - }; - updateAccount(params).then((res) => { - if (res.data.status === 200) { - this.$message.success(res.data.msg); - window.location.reload(); - } - }).catch((error) => { - this.$message.error(error.data.msg); - }); - }, - handleCommand(e) { - if (e == 'account') { - this.goAccountpage() - } - if (e == 'quit') { - this.logOut() - } - console.log(e); - }, - // 全局搜索 - querySearchAsync(queryString, cb) { - if (queryString.length == 0) { - return false - } - const params = { - keywords: queryString - } - globalSearch(params).then(res => { - if (res.data.status === 200) { - const data = res.data.data.hosts - const result = [] - data.map(item => { - let value = item.product_name + '#/' + item.id - result.push( - { - id: item.id, - value, - name: item.name - } - ) - }) - cb(result) - - } - }) - }, - handleSelect(key) { - localStorage.setItem("frontMenusActiveId", key); - // 跳转到对应路径 - location.href = "/" + key; - }, - showMenu() { - this.isShowMenu = true - }, - handleClose() { - this.isShowMenu = false - }, - // 获取前台导航 - doGetMenu() { - // 判断本地缓存是否有 前台导航,没有则调用接口获取,有则直接使用 - if (JSON.parse(localStorage.getItem('frontMenus'))) { - const menu = JSON.parse(localStorage.getItem('frontMenus')) - let index = menu.findIndex((item) => item.name == "分隔符"); - if (index != -1) { - this.hasSeparate = true - this.menu1 = menu.slice(0, index); - this.menu2 = menu.slice(index + 1); - } else { - this.hasSeparate = false - this.menu1 = menu; - } - this.setActiveMenu(); - } else { - getMenu().then(res => { - if (res.data.status === 200) { - const menu = res.data.data.menu; - localStorage.setItem("frontMenus", JSON.stringify(menu)); - let index = menu.findIndex((item) => item.name == "分隔符"); - if (index != -1) { - this.hasSeparate = true - this.menu1 = menu.slice(0, index); - this.menu2 = menu.slice(index + 1); - } else { - this.hasSeparate = false - this.menu1 = menu; - } - this.setActiveMenu(); - } - }) - } - }, - // 判断当前菜单激活 - setActiveMenu() { - const url = location.href; - let isTrue = true; - this.menu1.forEach((item) => { - // 当前url下存在和导航菜单对应的路径 - if (item.url && url.indexOf(item.url) != -1) { - this.menuActiveId = item.url; - isTrue = false; - } - }); - if (isTrue) { - // 不存在对应的 读取本地存储的 导航id\ - this.menuActiveId = localStorage.getItem("frontMenusActiveId"); - } - }, - // 页面跳转 - toPage(e) { - location.href = '/' + e.url - }, - - // 获取通用配置 - async getCommonSetting() { - try { - const res = await getCommon() - this.commonData = res.data.data - localStorage.setItem('common_set_before', JSON.stringify(res.data.data)) - } catch (error) { - } - }, - }, -} \ No newline at end of file diff --git a/10.3.4/public/plugins/addon/idcsmart_sub_account/lang/en-us.php b/10.3.4/public/plugins/addon/idcsmart_sub_account/lang/en-us.php deleted file mode 100644 index 395fddf9..00000000 --- a/10.3.4/public/plugins/addon/idcsmart_sub_account/lang/en-us.php +++ /dev/null @@ -1,3 +0,0 @@ -'Hello,Plugin!']; diff --git a/10.3.4/public/plugins/addon/promo_code/lang/en-us.php b/10.3.4/public/plugins/addon/promo_code/lang/en-us.php deleted file mode 100644 index ca5d8ed5..00000000 --- a/10.3.4/public/plugins/addon/promo_code/lang/en-us.php +++ /dev/null @@ -1,5 +0,0 @@ -alias('p') - ->field('p.id,s.module,ss.module as module2') - ->leftjoin('server s','p.type=\'server\' AND p.rel_id=s.id AND s.module=\'idcsmart_common\'') - ->leftjoin('server_group sg','p.type=\'server_group\' AND p.rel_id=sg.id') - ->leftjoin('server ss','ss.server_group_id=sg.id AND ss.module=\'idcsmart_common\'') - ->where('p.id',$productId) - ->find(); - if (!empty($product) && ($product['module']=='idcsmart_common' || $product['module2']=='idcsmart_common')){ - $IdcsmartCommonProductModel = new \server\idcsmart_common\model\IdcsmartCommonProductModel(); - return $IdcsmartCommonProductModel->updateProductMinPrice($productId); - } - - return true; -}); - -# 删除商品时实现钩子 -add_hook('after_product_delete', function($param){ - $productId = $param['id']??0; - $ProductModel = new \app\common\model\ProductModel(); - # 通用模块接口 - $product = $ProductModel->alias('p') - ->field('p.id,s.module,ss.module as module2') - ->leftjoin('server s','p.type=\'server\' AND p.rel_id=s.id AND s.module=\'idcsmart_common\'') - ->leftjoin('server_group sg','p.type=\'server_group\' AND p.rel_id=sg.id') - ->leftjoin('server ss','ss.server_group_id=sg.id AND ss.module=\'idcsmart_common\'') - ->where('p.id',$productId) - ->find(); - if (!empty($product) && ($product['module']=='idcsmart_common' || $product['module2']=='idcsmart_common')){ - $IdcsmartCommonProductModel = new \server\idcsmart_common\model\IdcsmartCommonProductModel(); - return $IdcsmartCommonProductModel->deleteProduct($param); - } - - return true; -}); - -# 删除产品时实现钩子 -add_hook('after_host_delete', function($param){ - $hostId = $param['id']??0; - $HostModel = new \app\common\model\HostModel(); - $ProductModel = new \app\common\model\ProductModel(); - $host = $HostModel->find($hostId); - $productId = $host['product_id']; - # 通用模块接口 - $product = $ProductModel->alias('p') - ->field('p.id,s.module,ss.module as module2') - ->leftjoin('server s','p.type=\'server\' AND p.rel_id=s.id AND s.module=\'idcsmart_common\'') - ->leftjoin('server_group sg','p.type=\'server_group\' AND p.rel_id=sg.id') - ->leftjoin('server ss','ss.server_group_id=sg.id AND ss.module=\'idcsmart_common\'') - ->where('p.id',$productId) - ->find(); - if (!empty($product) && ($product['module']=='idcsmart_common' || $product['module2']=='idcsmart_common')){ - $IdcsmartCommonHostConfigoptionModel = new \server\idcsmart_common\model\IdcsmartCommonHostConfigoptionModel(); - return $IdcsmartCommonHostConfigoptionModel->deleteHost($param); - } - - return true; -}); - -# 产品详情自定义字段 -add_hook('product_detail_custom_fields',function ($param){ - $productId= $param['id']??0; - - $IdcsmartCommonProductConfigoptionModel = new \server\idcsmart_common\model\IdcsmartCommonProductConfigoptionModel(); - $ProductModel = new \app\common\model\ProductModel(); - $product = $ProductModel->alias('p') - ->field('p.id,s.module,ss.module as module2') - ->leftjoin('server s','p.type=\'server\' AND p.rel_id=s.id AND s.module=\'idcsmart_common\'') - ->leftjoin('server_group sg','p.type=\'server_group\' AND p.rel_id=sg.id') - ->leftjoin('server ss','ss.server_group_id=sg.id AND ss.module=\'idcsmart_common\'') - ->where('p.id',$productId) - ->find(); - if (!empty($product) && ($product['module']=='idcsmart_common' || $product['module2']=='idcsmart_common')){ - $sonCount = $IdcsmartCommonProductConfigoptionModel->where('product_id',$productId) - ->where('son_product_id','>',0) - ->count(); - if ($sonCount>0){ - $flag=true; - }else{ - $flag=false; - } - - return ['is_link'=>$flag]; - } - return false; -}); - -# 创建订单之后钩子 -add_hook('after_order_create',function ($param){ - - $orderId = $param['id']; - $OrderItemModel = new \app\common\model\OrderItemModel(); - $HostModel = new \app\common\model\HostModel(); - $UpgradeModel = new \app\common\model\UpgradeModel(); - $ProductModel = new \app\common\model\ProductModel(); - $IdcsmartCommonHostConfigoptionModel = new \server\idcsmart_common\model\IdcsmartCommonHostConfigoptionModel(); - $IdcsmartCommonProductConfigoptionModel = new \server\idcsmart_common\model\IdcsmartCommonProductConfigoptionModel(); - $IdcsmartCommonProductConfigoptionSubModel = new \server\idcsmart_common\model\IdcsmartCommonProductConfigoptionSubModel(); - $IdcsmartCommonLogic = new \server\idcsmart_common\logic\IdcsmartCommonLogic(); - - $upgrade = $UpgradeModel->where('order_id',$orderId) - ->whereIn('status',['Unpaid','Pending']) - ->order('id','desc') - ->find(); - if(is_null($upgrade) || empty($upgrade)){ - return false; - } - $configoptionHost = $HostModel->find($upgrade['host_id']); - if(is_null($configoptionHost) || empty($configoptionHost)){ - return false; - } - $product = $ProductModel->alias('p') - ->field('p.id,p.name,s.module,ss.module as module2') - ->leftjoin('server s','p.type=\'server\' AND p.rel_id=s.id AND s.module=\'idcsmart_common\'') - ->leftjoin('server_group sg','p.type=\'server_group\' AND p.rel_id=sg.id') - ->leftjoin('server ss','ss.server_group_id=sg.id AND ss.module=\'idcsmart_common\'') - ->where('p.id',$configoptionHost['product_id']) - ->find(); - if (!empty($product) && ($product['module']=='idcsmart_common' || $product['module2']=='idcsmart_common')){ - if (!empty($upgrade)){ - $new = json_decode($upgrade['data'],true); - if ($upgrade['type']=='config_option'){ // 更改配置升降级订单子项描述 - $configoptionOrderItems = $OrderItemModel->where('order_id',$orderId) - ->where('type','upgrade') - ->select(); - foreach ($configoptionOrderItems as $configoptionOrderItem){ - $olds = $IdcsmartCommonHostConfigoptionModel->where('host_id',$configoptionOrderItem['host_id']) - ->select()->toArray(); - $description= []; - foreach ($olds as $key=>$old){ # 考虑到配置项只有两个,且只有数量 - $configoption = $IdcsmartCommonProductConfigoptionModel->find($old['configoption_id']); - if ($IdcsmartCommonLogic->checkQuantity($configoption['option_type'])){ - if (isset($new['configoption'][$old['configoption_id']]) && !empty($new['configoption'][$old['configoption_id']])){ - foreach ($new['configoption'][$old['configoption_id']] as $temp){ - $description[] = $configoption['option_name'] . ':' . $old['qty'] . '=>' . $temp; - } - } - //$description[] = $configoption['option_name'] . ':' . $old['qty'] . '=>' . ($new['configoption'][$old['configoption_id']][0]??0); - }elseif($IdcsmartCommonLogic->checkMultiSelect($configoption['option_type'])){ - $oldSub = $IdcsmartCommonProductConfigoptionSubModel->find($old['configoption_sub_id']); - $newSub = $IdcsmartCommonProductConfigoptionSubModel->find($new['configoption'][$old['configoption_id']][0]??0); - $description[] = $configoption['option_name'] . ':' . $oldSub['option_name'] . '=>' . ($newSub['option_name']??''); - }else{ - $oldSub = $IdcsmartCommonProductConfigoptionSubModel->find($old['configoption_sub_id']); - $newSub = $IdcsmartCommonProductConfigoptionSubModel->find($new['configoption'][$old['configoption_id']]??0); - $description[] = $configoption['option_name'] . ':' . $oldSub['option_name'] . '=>' . ($newSub['option_name']??''); - } - } - $description = implode("\n",$description); - $configoptionOrderItem->save([ - 'description' => $product['name'] . '升降级配置:'.$description - ]); - } - - } - elseif($upgrade['type']=='product'){ // 产品升降级描述 - $productOrderItems = $OrderItemModel->where('order_id',$orderId) - ->where('type','upgrade') - ->select(); - if (!empty($productOrderItems)){ - foreach ($productOrderItems as $productOrderItem){ - $productUpgradeHost = $HostModel->find($productOrderItem['host_id']); - $oldProduct = $ProductModel->find($productUpgradeHost['product_id']); - $newProduct = $ProductModel->find($upgrade['rel_id']); - $subDescription = ''; - if (!empty($new['configoption'])){ - foreach ($new['configoption'] as $k=>$item){ - $productUpgradeConfigoption = $IdcsmartCommonProductConfigoptionModel->find($k); - if ($IdcsmartCommonLogic->checkQuantity($productUpgradeConfigoption['option_type'])){ - $subDescription .= $productUpgradeConfigoption['option_name'] . ":" . $item[0] . ';'; - } - } - } - $description = '升级/降级产品:' . ($oldProduct['name']??'') . '=>' . ($newProduct['name']??'') . '(' . $subDescription . ')'; - $productOrderItem->save([ - 'description' => $description - ]); - } - } - - } - } - - // 原产品可能存在优惠码,更改upgrade表金额 - $hookResults = hook('apply_promo_code',['host_id'=>$upgrade['host_id'],'price'=>$upgrade['price'],'scene'=>'upgrade','duration'=>$upgrade['billing_cycle_time']]); - foreach ($hookResults as $hookResult){ - if ($hookResult['status']==200){ - $upgradePrice = bcsub($upgrade['price'],$hookResult['data']['discount']??0,2); - $upgrade->save([ - 'price' => $upgradePrice - ]); - } - } - - $hookResults2 = hook('apply_promo_code',['host_id'=>$upgrade['host_id'],'price'=>$upgrade['renew_price'],'scene'=>'upgrade','duration'=>$upgrade['billing_cycle_time']]); - foreach ($hookResults2 as $hookResult2){ - if ($hookResult2['status']==200){ - $upgradeRenewPrice = bcsub($upgrade['renew_price'],$hookResult2['data']['discount']??0,2); - $upgrade->save([ - 'renew_price' => $upgradeRenewPrice - ]); - } - } - - // 通用商品子模块 - $orderItems = $OrderItemModel->alias('oi') - ->field('oi.host_id,cp.type,cp.rel_id') - ->leftJoin('host h','h.id=oi.host_id') - ->leftJoin('module_idcsmart_common_product cp','cp.product_id=h.product_id') - ->where('oi.order_id',$orderId) - ->where('oi.type','host') - ->select()->toArray(); - $IdcsmartCommonServerHostLinkModel = new \server\idcsmart_common\model\IdcsmartCommonServerHostLinkModel(); - $insert = []; - foreach ($orderItems as $orderItem){ - if ($orderItem['type']=='server' && !empty($orderItem['rel_id'])){ - $temp = [ - 'host_id' => $orderItem['host_id'], - 'server_id' => $orderItem['rel_id'] - ]; - $insert[] = $temp; - } - } - $IdcsmartCommonServerHostLinkModel->insertAll($insert); - - } - - - return true; -}); diff --git a/10.3.4/public/plugins/server/mf_cloud/hooks.php b/10.3.4/public/plugins/server/mf_cloud/hooks.php deleted file mode 100644 index 5678c454..00000000 --- a/10.3.4/public/plugins/server/mf_cloud/hooks.php +++ /dev/null @@ -1,100 +0,0 @@ -column('id'); - - // BackupConfigModel::where('product_id', $param['id'])->delete(); - // ConfigModel::where('product_id', $param['id'])->delete(); - // DataCenterModel::where('product_id', $param['id'])->delete(); - // ImageGroupModel::where('product_id', $param['id'])->delete(); - // ImageModel::where('product_id', $param['id'])->delete(); - // PackageModel::where('product_id', $param['id'])->delete(); - - // if(!empty($imageId)){ - // HostImageLinkModel::whereIn('image_id', $imageId)->delete(); - // } - }catch(\Exception $e){ - - } - */ -}); - -add_hook('after_host_delete', function($param){ - try{ - HostLinkModel::where('host_id', $param['id'])->delete(); - }catch(\Exception $e){ - - } -}); - -// 购买流量包后 -add_hook('flow_packet_order_paid', function($param){ - $hostId = $param['host_id']; - $flow = $param['flow_packet']['capacity']; - $moduleParam = $param['module_param']; - - if(!empty($moduleParam['server']) && $moduleParam['server']['module'] == 'mf_cloud'){ - $hash = \server\mf_cloud\logic\ToolLogic::formatParam($moduleParam['server']['hash']); - - $idcsmartCloud = new \server\mf_cloud\idcsmart_cloud\IdcsmartCloud($moduleParam['server']); - $idcsmartCloud->setIsAgent(isset($hash['account_type']) && $hash['account_type'] == 'agent'); - - $hostLink = HostLinkModel::where('host_id', $hostId)->find(); - $res = $idcsmartCloud->cloudIncTempTraffic($hostLink['rel_id'] ?? 0, (int)$flow); - if($res['status'] == 200){ - $description = lang_plugins('log_mf_cloud_buy_flow_packet_success', [ - '{host}' => 'host#'.$hostId.'#'.$moduleParam['host']['name'].'#', - '{order}' => '#'.$param['order_id'], - '{flow}' => $flow.'G', - ]); - - // 如果是流量暂停在检查流量 - if($moduleParam['host']['status'] == 'Suspended' && $moduleParam['host']['suspend_type'] == 'overtraffic'){ - if($moduleParam['host']['due_time'] == 0 || time() < $moduleParam['host']['due_time']){ - $res = $idcsmartCloud->netInfo($hostLink['rel_id']); - if($res['status'] == 'success' && $res['data']['info']['30_day']['float'] < 100){ - //执行解除暂停 - $result = $moduleParam['host']->unsuspendAccount($hostId); - if ($result['status'] == 200){ - $description .= lang_plugins('log_mf_cloud_buy_flow_packet_and_unsuspend_success'); - }else{ - $description .= lang_plugins('log_mf_cloud_buy_flow_packet_but_unsuspend_fail', ['{reason}'=>$result['msg']]); - } - } - } - } - }else{ - $description = lang_plugins('log_mf_cloud_buy_flow_packet_remote_add_fail', [ - '{host}' => 'host#'.$hostId.'#'.$moduleParam['host']['name'].'#', - '{order}' => '#'.$param['order_id'], - '{flow}' => $flow.'G', - ]); - } - // 记录日志 - active_log($description, 'host', $hostId); - } -}); - -// 在购买流量包之前 -add_hook('flow_packet_before_order', function($param){ - try{ - $hostLink = hostLinkModel::where('host_id', $param['host']['id'])->find(); - if(!empty($hostLink)){ - $configData = json_decode($hostLink['config_data'], true); - if(isset($configData['line']['bill_type']) && $configData['line']['bill_type'] !== 'flow'){ - // 不是流量线路,不能购买 - return ['status'=>400, 'msg'=>lang_plugins('mf_cloud_cannot_buy_flow_packet')]; - } - } - }catch(PDOException $e){ - - } -}); \ No newline at end of file diff --git a/10.3.4/public/plugins/server/mf_cloud/model/RecommendConfigModel.php b/10.3.4/public/plugins/server/mf_cloud/model/RecommendConfigModel.php deleted file mode 100644 index a2cc1f7f..00000000 --- a/10.3.4/public/plugins/server/mf_cloud/model/RecommendConfigModel.php +++ /dev/null @@ -1,575 +0,0 @@ - 'int', - 'product_id' => 'int', - 'name' => 'string', - 'description' => 'string', - 'order' => 'int', - 'data_center_id' => 'int', - 'line_id' => 'int', - 'cpu' => 'int', - 'memory' => 'int', - 'system_disk_size' => 'int', - 'system_disk_type' => 'string', - 'data_disk_size' => 'int', - 'data_disk_type' => 'string', - 'network_type' => 'string', - 'bw' => 'int', - 'flow' => 'int', - 'peak_defence' => 'int', - 'create_time' => 'int', - ]; - - /** - * 时间 2023-02-02 - * @title 添加推荐配置 - * @desc 添加推荐配置 - * @author hh - * @version v1 - * @param string name - 名称 require - * @param string description - 描述 - * @param int order - 排序ID - * @param int data_center_id - 数据中心ID require - * @param int cpu - 核心数 require - * @param int memory - 内存大小 require - * @param int system_disk_size - 系统盘大小 require - * @param string system_disk_type - 系统盘类型 - * @param int data_disk_size - 数据盘大小 - * @param string data_disk_type - 数据盘类型 - * @param string network_type - 网络类型(normal=经典网络,vpc=VPC网络) require - * @param int bw - 带宽 require - * @param int peak_defence - 防御峰值 - * @return int id - 推荐配置ID - */ - public function recommendConfigCreate($param){ - $DataCenterModel = DataCenterModel::find($param['data_center_id']); - if(empty($DataCenterModel)){ - return ['status'=>400, 'msg'=>lang_plugins('data_center_not_found')]; - } - $param['product_id'] = $DataCenterModel['product_id']; - - $check = $this->recommendConfigCheck($param); - if(!$check['data']['validate']){ - return ['status'=>400, 'msg'=>implode(',', array_column($check['data']['error'], 'msg'))]; - } - $ConfigLimitModel = new ConfigLimitModel(); - $check = $ConfigLimitModel->checkConfigLimit($param['product_id'], $param); - if($check['status'] != 200){ - return ['status'=>400, 'msg'=>lang_plugins('this_config_in_recommend_config_cannot_add')]; - } - - $param['description'] = $param['description'] ?? ''; - $param['order'] = $param['order'] ?? 0; - $param['data_disk_size'] = $param['data_disk_size'] ?? 0; - $param['peak_defence'] = $param['peak_defence'] ?? 0; - $param['system_disk_type'] = $param['system_disk_type'] ?? ''; - $param['data_disk_type'] = $param['data_disk_type'] ?? ''; - $param['create_time'] = time(); - if(empty($param['data_disk_size'])){ - $param['data_disk_type'] = ''; - } - - $recommendConfig = $this->create($param, ['product_id','name','description','order','data_center_id','line_id','cpu','memory','system_disk_size','system_disk_type','data_disk_size','data_disk_type','network_type','bw','flow','peak_defence','create_time']); - - $description = lang_plugins('log_mf_cloud_add_recommend_config_success', [ - '{name}' => $param['name'], - '{cpu}' => $param['cpu'], - '{memory}' => $param['memory'], - ]); - active_log($description, 'product', $param['product_id']); - - $result = [ - 'status' => 200, - 'msg' => lang_plugins('create_success'), - 'data' => [ - 'id' => (int)$recommendConfig->id, - ], - ]; - return $result; - } - - /** - * 时间 2023-02-03 - * @title 推荐配置列表 - * @desc 推荐配置列表 - * @author hh - * @version v1 - * @param int page - 页数 - * @param int limit - 每页条数 - * @param string orderby - 排序(id,order) - * @param string sort - 升降序(asc,desc) - * @param int product_id - 商品ID - * @return array list - 列表数据 - * @return int list[].id - 推荐配置ID - * @return int list[].product_id - 商品ID - * @return string list[].name - 名称 - * @return string list[].description - 描述 - * @return string list[].order - 排序ID - * @return int list[].data_center_id - 数据中心ID - * @return int list[].cpu - CPU - * @return int list[].memory - 内存 - * @return int list[].system_disk_size - 系统盘 - * @return string list[].system_disk_type - 系统盘类型 - * @return int list[].data_disk_size - 数据盘 - * @return string list[].data_disk_type - 数据盘类型 - * @return string list[].network_type - 网络类型(normal=经典网络,vpc=VPC网络) - * @return int list[].bw - 带宽 - * @return int list[].peak_defence - 防护峰值 - * @return int list[].create_time - 创建时间 - * @return int count - 总条数 - */ - public function recommendConfigList($param){ - $param['page'] = isset($param['page']) ? ($param['page'] ? (int)$param['page'] : 1) : 1; - $param['limit'] = isset($param['limit']) ? ($param['limit'] ? (int)$param['limit'] : config('idcsmart.limit')) : config('idcsmart.limit'); - $param['sort'] = isset($param['sort']) ? ($param['sort'] ?: config('idcsmart.sort')) : config('idcsmart.sort'); - - if (!isset($param['orderby']) || !in_array($param['orderby'], ['id','order'])){ - $param['orderby'] = 'rc.id'; - } - - $where = []; - if(!empty($param['product_id'])){ - $where[] = ['rc.product_id', '=', $param['product_id']]; - } - - $list = $this - ->alias('rc') - ->field('rc.*,dc.country_id,dc.city') - ->where($where) - ->leftJoin('module_mf_cloud_data_center dc', 'rc.data_center_id=dc.id') - ->page($param['page'], $param['limit']) - ->order($param['orderby'], $param['sort']) - ->select() - ->toArray(); - - $count = $this - ->alias('rc') - ->where($where) - ->count(); - - return ['list'=>$list, 'count'=>$count]; - } - - /** - * 时间 2023-02-02 - * @title 修改推荐配置 - * @desc 修改推荐配置 - * @author hh - * @version v1 - * @param int id - 推荐配置ID require - * @param string name - 名称 require - * @param string description - 描述 - * @param int order - 排序ID - * @param int data_center_id - 数据中心ID require - * @param int cpu - 核心数 require - * @param int memory - 内存大小 require - * @param int system_disk_size - 系统盘大小 require - * @param string system_disk_type - 系统盘类型 - * @param int data_disk_size - 数据盘大小 - * @param string data_disk_type - 数据盘类型 - * @param string network_type - 网络类型(normal=经典网络,vpc=VPC网络) require - * @param int bw - 带宽 require - * @param int peak_defence - 防御峰值 - * @return int id - 推荐配置ID - */ - public function recommendConfigUpdate($param){ - $recommendConfig = $this->find($param['id']); - if(empty($recommendConfig)){ - return ['status'=>400, 'msg'=>lang_plugins('recommend_config_not_found')]; - } - $DataCenterModel = DataCenterModel::find($param['data_center_id']); - if(empty($DataCenterModel) || $recommendConfig['product_id'] != $DataCenterModel['product_id']){ - return ['status'=>400, 'msg'=>lang_plugins('data_center_not_found')]; - } - $line = LineModel::find($param['line_id']); - if(empty($line)){ - return ['status'=>400, 'msg'=>lang_plugins('line_not_found')]; - } - - $param['product_id'] = $recommendConfig['product_id']; - - $check = $this->recommendConfigCheck($param); - if(!$check['data']['validate']){ - return ['status'=>400, 'msg'=>implode(',', array_column($check['data']['error'], 'msg'))]; - } - $ConfigLimitModel = new ConfigLimitModel(); - $check = $ConfigLimitModel->checkConfigLimit($param['product_id'], $param); - if($check['status'] != 200){ - return ['status'=>400, 'msg'=>lang_plugins('this_config_in_recommend_config_cannot_add')]; - } - - $param['system_disk_type'] = $param['system_disk_type'] ?? ''; - $param['data_disk_type'] = $param['data_disk_type'] ?? ''; - - $this->update($param, ['id'=>$recommendConfig['id']], ['name','description','order','data_center_id','line_id','cpu','memory','system_disk_size','system_disk_type','data_disk_size','data_disk_type','network_type','bw','flow','peak_defence']); - - $des = [ - 'name' => lang_plugins('mf_cloud_recommend_config_name'), - 'description' => lang_plugins('mf_cloud_recommend_config_description'), - 'order' => lang_plugins('mf_cloud_recommend_config_order'), - 'data_center' => lang_plugins('data_center'), - 'line' => lang_plugins('mf_cloud_line_name'), - 'cpu' => 'CPU', - 'memory' => lang_plugins('memory'), - 'system_disk' => lang_plugins('system_disk'), - 'data_disk' => lang_plugins('data_disk'), - 'network_type' => lang_plugins('mf_cloud_recommend_config_network_type'), - 'bw' => lang_plugins('bw'), - 'flow' => lang_plugins('flow'), - 'peak_defence' => lang_plugins('mf_cloud_recommend_config_peak_defence'), - ]; - - $networkType = [ - 'normal' => lang_plugins('mf_cloud_recommend_config_normal_network'), - 'vpc' => lang_plugins('mf_cloud_recommend_config_vpc_network'), - ]; - - $oldDataCenter = DataCenterModel::find( $recommendConfig['data_center_id'] ); - $oldLine = LineModel::find($recommendConfig['line_id']); - - $old = $recommendConfig->toArray(); - $old['data_center'] = $oldDataCenter ? $oldDataCenter->getDataCenterName() : lang_plugins('null'); - $old['line'] = $oldLine['name'] ?? lang_plugins('null'); - $old['system_disk'] = $old['system_disk_type'].$old['system_disk_size'].'G'; - $old['data_disk'] = $old['data_disk_type'].$old['data_disk_size'].'G'; - $old['network_type'] = $networkType[ $old['network_type'] ]; - - $param['data_center'] = $DataCenterModel->getDataCenterName(); - $param['line'] = $line['name']; - $param['system_disk'] = $param['system_disk_type'].$param['system_disk_size'].'G'; - $param['data_disk'] = $param['data_disk_type'].$param['data_disk_size'].'G'; - $param['network_type'] = $networkType[ $param['network_type'] ]; - - $description = ToolLogic::createEditLog($old, $param, $des, ['description']); - if(!empty($description)){ - $description = lang_plugins('log_mf_cloud_modify_recommend_config_success', ['{detail}'=>$description]); - active_log($description, 'product', $param['product_id']); - } - - $result = [ - 'status' => 200, - 'msg' => lang_plugins('update_success'), - ]; - return $result; - } - - /** - * 时间 2023-01-31 - * @title 删除配置 - * @desc 删除配置 - * @author hh - * @version v1 - * @param int id - 配置ID require - */ - public function recommendConfigDelete($id){ - $recommendConfig = $this->find($id); - if(empty($recommendConfig)){ - return ['status'=>400, 'msg'=>lang_plugins('recommend_config_not_found')]; - } - - $this->where('id', $id)->delete(); - - $description = lang_plugins('log_mf_cloud_delete_recommend_config_success', [ - '{name}' => $recommendConfig['name'], - '{cpu}' => $recommendConfig['cpu'], - '{memory}' => $recommendConfig['memory'], - ]); - active_log($description, 'product', $recommendConfig['product_id']); - - $result = [ - 'status' => 200, - 'msg' => lang_plugins('delete_success'), - ]; - return $result; - } - - /** - * 时间 2023-02-02 - * @title 验证推荐配置是否存在 - * @desc 验证推荐配置是否存在 - * @author hh - * @version v1 - * @param int data_center_id - 数据中心ID require - * @param int cpu - 核心数 require - * @param int memory - 内存大小 require - * @param int system_disk_size - 系统盘大小 require - * @param string system_disk_type - 系统盘类型 - * @param int data_disk_size - 数据盘大小 - * @param string data_disk_type - 数据盘类型 - * @param string network_type - 网络类型(normal=经典网络,vpc=VPC网络) require - * @param int bw - 带宽 require - * @param int peak_defence - 防御峰值 - */ - public function recommendConfigCheck(&$param){ - $result = [ - 'status' => 200, - 'msg' => lang_plugins('success_message'), - 'data' => [ - 'validate' => true, - 'error' => [] - ] - ]; - $param['product_id'] = 0; - // 验证数据中心 - $dataCenter = DataCenterModel::find($param['data_center_id']); - if(empty($dataCenter)){ - $result['data']['error'][] = [ - 'field' => 'data_center_id', - 'msg' => lang_plugins('data_center_not_found'), - ]; - }else{ - $param['product_id'] = $dataCenter['product_id']; - } - $line = LineModel::find($param['line_id']); - if(empty($line)){ - $result['data']['error'][] = [ - 'field' => 'line_id', - 'msg' => lang_plugins('line_not_found'), - ]; - } - // 验证CPU - $cpu = OptionModel::where('product_id', $param['product_id'])->where('rel_type', OptionModel::CPU)->where('value', $param['cpu'])->find(); - if(empty($cpu)){ - $result['data']['error'][] = [ - 'field' => 'cpu', - 'msg' => lang_plugins('mf_cloud_please_check_cpu', ['{cpu}'=>$param['cpu']]), - ]; - } - // 验证内存 - $memory = OptionModel::where('product_id', $param['product_id']) - ->where('rel_type', OptionModel::MEMORY) - ->where(function($query) use ($param) { - $query->whereOr('value', $param['memory']) - ->whereOr('min_value<='.$param['memory'].' AND max_value>='.$param['memory']); - }) - ->select() - ->toArray(); - $memoryUnit = ConfigModel::where('product_id', $param['product_id'])->value('memory_unit') ?? 'GB'; - if(!empty($memory)){ - $match = false; - foreach($memory as $v){ - if($v['type'] == 'radio'){ - $match = true; - break; - }else{ - if(($param['memory'] - $v['min_value'])%$v['step'] == 0){ - $match = true; - break; - } - } - } - if(!$match){ - $result['data']['error'][] = [ - 'field' => 'memory', - 'msg' => lang_plugins('mf_cloud_please_check_memory', ['{memory}'=>$param['memory'].$memoryUnit]), - ]; - } - }else{ - $result['data']['error'][] = [ - 'field' => 'memory', - 'msg' => lang_plugins('mf_cloud_please_check_memory', ['{memory}'=>$param['memory'].$memoryUnit]), - ]; - } - // 验证系统盘 - $systemDiskSize = OptionModel::where('product_id', $param['product_id']) - ->where('rel_type', OptionModel::SYSTEM_DISK) - ->where(function($query) use ($param) { - $query->whereOr('value', $param['system_disk_size']) - ->whereOr('min_value<='.$param['system_disk_size'].' AND max_value>='.$param['system_disk_size']); - }) - ->select() - ->toArray(); - $param['system_disk_type'] = $param['system_disk_type'] ?? ''; - if(!empty($systemDiskSize)){ - $match = false; - foreach($systemDiskSize as $v){ - // 先匹配类型,类型不对直接pass - $otherConfig = json_decode($v['other_config'], true); - if($otherConfig['disk_type'] !== $param['system_disk_type']){ - continue; - } - if($v['type'] == 'radio'){ - $match = true; - break; - }else{ - if(($param['system_disk_size'] - $v['min_value'])%$v['step'] == 0){ - $match = true; - break; - } - } - } - if(!$match){ - $result['data']['error'][] = [ - 'field' => 'system_disk_size', - 'msg' => lang_plugins('mf_cloud_please_check_system_disk', ['{system_disk}'=>$param['system_disk_type'].$param['system_disk_size']]), - ]; - } - }else{ - $result['data']['error'][] = [ - 'field' => 'system_disk_size', - 'msg' => lang_plugins('mf_cloud_please_check_system_disk', ['{system_disk}'=>$param['system_disk_type'].$param['system_disk_size']]), - ]; - } - // 验证数据盘 - if(isset($param['data_disk_size']) && $param['data_disk_size']>0){ - $dataDiskSize = OptionModel::where('product_id', $param['product_id']) - ->where('rel_type', OptionModel::DATA_DISK) - ->where(function($query) use ($param) { - $query->whereOr('value', $param['data_disk_size']) - ->whereOr('min_value<='.$param['data_disk_size'].' AND max_value>='.$param['data_disk_size']); - }) - ->select() - ->toArray(); - $param['data_disk_type'] = $param['data_disk_type'] ?? ''; - if(!empty($dataDiskSize)){ - $match = false; - foreach($dataDiskSize as $v){ - // 先匹配类型,类型不对直接pass - $otherConfig = json_decode($v['other_config'], true); - if($otherConfig['disk_type'] !== $param['data_disk_type']){ - continue; - } - if($v['type'] == 'radio'){ - $match = true; - break; - }else{ - if(($param['data_disk_size'] - $v['min_value'])%$v['step'] == 0){ - $match = true; - break; - } - } - } - if(!$match){ - $result['data']['error'][] = [ - 'field' => 'data_disk_size', - 'msg' => lang_plugins('mf_cloud_please_check_data_disk', ['{data_disk}'=>$param['data_disk_type'].$param['data_disk_size']]), - ]; - } - }else{ - $result['data']['error'][] = [ - 'field' => 'data_disk_size', - 'msg' => lang_plugins('mf_cloud_please_check_data_disk', ['{data_disk}'=>$param['data_disk_type'].$param['data_disk_size']]), - ]; - } - } - $networkType = [ - 'normal' => lang_plugins('mf_cloud_recommend_config_normal_network'), - 'vpc' => lang_plugins('mf_cloud_recommend_config_vpc_network'), - ]; - // 验证网络类型 - $config = ConfigModel::where('product_id', $param['product_id'])->find(); - if(!empty($config)){ - if($config['support_'.$param['network_type'].'_network'] != 1){ - $result['data']['error'][] = [ - 'field' => 'network_type', - 'msg' => lang_plugins('mf_cloud_please_check_network_type', ['{network_type}'=>$networkType[$param['network_type']]]), - ]; - } - } - if(!empty($line)){ - if($line['bill_type'] == 'bw'){ - if(isset($param['bw']) && !empty($param['bw']) && is_numeric($param['bw'])){ - // 验证带宽 - $bw = OptionModel::where('product_id', $param['product_id']) - ->where('rel_type', OptionModel::LINE_BW) - ->where('rel_id', $line['id']) - ->where(function($query) use ($param) { - $query->whereOr('value', $param['bw']) - ->whereOr('min_value<='.$param['bw'].' AND max_value>='.$param['bw']); - }) - ->select() - ->toArray(); - $match = false; - foreach($bw as $v){ - if($v['type'] == 'radio'){ - $match = true; - break; - }else{ - if(($param['bw'] - $v['min_value'])%$v['step'] == 0){ - $match = true; - break; - } - } - } - if(!$match){ - $result['data']['error'][] = [ - 'field' => 'bw', - 'msg' => lang_plugins('mf_cloud_please_check_line_bw', ['{line}'=>$line['name'],'{bw}'=>$param['bw'] ]), - ]; - } - }else{ - $result['data']['error'][] = [ - 'field' => 'bw', - 'msg' => lang_plugins('please_input_bw'), - ]; - } - $param['flow'] = 0; - }else{ - if(isset($param['flow']) && is_numeric($param['flow']) && $param['flow']>=0){ - // 验证带宽 - $flow = OptionModel::where('product_id', $param['product_id']) - ->where('rel_type', OptionModel::LINE_FLOW) - ->where('rel_id', $line['id']) - ->where('value', $param['flow']) - ->find(); - if(empty($flow)){ - $result['data']['error'][] = [ - 'field' => 'bw', - 'msg' => lang_plugins('mf_cloud_please_check_line_flow', ['{line}'=>$line['name'],'{flow}'=>$param['flow']]), - ]; - } - }else{ - $result['data']['error'][] = [ - 'field' => 'flow', - 'msg' => lang_plugins('please_input_line_flow'), - ]; - } - $param['bw'] = 0; - } - // 验证防御峰值 - if(isset($param['peak_defence']) && $param['peak_defence']>0){ - if($line['defence_enable'] != 1){ - $result['data']['error'][] = [ - 'field' => 'peak_defence', - 'msg' => lang_plugins('mf_cloud_please_check_line_peak_defence', ['{peak_defence}'=>$param['peak_defence']]), - ]; - }else{ - // 带宽没有关联线路直接不管 - $defence = OptionModel::where('product_id', $param['product_id']) - ->where('rel_type', OptionModel::LINE_DEFENCE) - ->whereIn('rel_id', $line['id']) - ->where('value', $param['peak_defence']) - ->value('id'); - if(empty($defence)){ - $result['data']['error'][] = [ - 'field' => 'peak_defence', - 'msg' => lang_plugins('mf_cloud_please_check_line_peak_defence', ['{peak_defence}'=>$param['peak_defence']]), - ]; - } - } - } - } - if(!empty($result['data']['error'])){ - $result['data']['validate'] = false; - } - return $result; - } - - -} \ No newline at end of file diff --git a/10.3.4/public/plugins/server/mf_cloud/template/admin/js/mf_cloud.js b/10.3.4/public/plugins/server/mf_cloud/template/admin/js/mf_cloud.js deleted file mode 100644 index d88b06e7..00000000 --- a/10.3.4/public/plugins/server/mf_cloud/template/admin/js/mf_cloud.js +++ /dev/null @@ -1,2869 +0,0 @@ -const template = document.getElementsByClassName('common_config')[0] -Vue.prototype.lang = window.lang -new Vue({ - data () { - return { - host: location.origin, - id: '', - tabs: 'duration', // duration,calc,data_center,store,limit,system,recommend,other - hover: true, - tableLayout: false, - delVisible: false, - loading: false, - currency_prefix: JSON.parse(localStorage.getItem('common_set')).currency_prefix || '¥', - currency_suffix: JSON.parse(localStorage.getItem('common_set')).currency_suffix || '', - optType: 'add', // 新增/编辑 - comTitle: '', - delTit: '', - delType: '', - delId: '', - submitLoading: false, - /* 周期 */ - cycleData: [], - dataModel: false, - cycleModel: false, - cycleForm: { - product_id: '', - name: '', - num: '', - unit: 'month', - price_factor: null - }, - cycleTime: [ - { - value: 'hour', - label: lang.hour - }, - { - value: 'day', - label: lang.day - }, - { - value: 'month', - label: lang.natural_month - }, - ], - cycleColumns: [ - { - colKey: 'name', - title: lang.cycle_name, - ellipsis: true - }, - { - colKey: 'unit', - title: lang.cycle_time, - ellipsis: true - }, - { - colKey: 'price_factor', - title: lang.price_factor, - ellipsis: true, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - cycleRules: { - name: [ - { required: true, message: lang.input + lang.cycle_name, type: 'error' }, - { - validator: val => val?.length <= 10, message: lang.verify8 + '1-10', type: 'warning' - } - ], - num: [ - { required: true, message: lang.input + lang.cycle_time, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + lang.verify16, type: 'warning' - }, - { - validator: val => val > 0 && val <= 999, message: lang.cycle_time + '1-999', type: 'warning' - } - ], - // 系统相关 - image_group_id: [ - { required: true, message: lang.select + lang.system_classify, type: 'error' } - ], - rel_image_id: [ - { required: true, message: lang.input + lang.opt_system + 'ID', type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + lang.verify16, type: 'warning' - }, - ], - price: [ - { required: true, message: lang.input + lang.box_title34, type: 'error' }, - { - pattern: /^\d+(\.\d{0,2})?$/, message: lang.verify12, type: 'warning' - }, - { - validator: val => val >= 0, message: lang.verify12, type: 'warning' - } - ], - icon: [ - { required: true, message: lang.select + lang.mf_icon, type: 'error', trigger: 'change' } - ], - }, - /* 操作系统 */ - systemGroup: [], - systemList: [], - systemParams: { - product_id: '', - page: 1, - limit: 1000, - image_group_id: '', - keywords: '' - }, - systemModel: false, - createSystem: { // 添加操作系统表单 - image_group_id: '', - name: '', - charge: 0, - price: '', - enable: 0, - rel_image_id: '' - }, - systemColumns: [ // 套餐表格 - { - colKey: 'id', - title: lang.order_index, - width: 100, - ellipsis: true - }, - { - colKey: 'image_group_name', - title: lang.system_classify, - width: 200, - ellipsis: true - }, - { - colKey: 'name', - title: lang.system_name, - ellipsis: true, - }, - { - colKey: 'charge', - title: lang.mf_charge, - width: 200 - }, - { - colKey: 'price', - title: lang.box_title34, - }, - { - colKey: 'enable', - title: lang.mf_enable, - width: 200 - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - groupColumns: [ // 套餐表格 - { - // 列拖拽排序必要参数 - colKey: 'drag', - width: 20, - className: 'drag-icon' - }, - { - colKey: 'image_group_name', - title: lang.system_classify, - ellipsis: true, - className: 'group-column' - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - // 操作系统图标 - iconList: ['Windows', 'CentOS', 'Ubuntu', 'Debian', 'ESXi', 'XenServer', 'FreeBSD', 'Fedora', '其他', 'ArchLinux', 'Rocky', 'OpenEuler', 'AlmaLinux'], - iconSelecet: [], - classModel: false, - classParams: { - id: '', - name: '', - icon: '' - }, - popupProps: { - overlayClassName: `custom-select`, - overlayStyle: (trigger) => ({ width: `${trigger.offsetWidth}px` }), - }, - /* 其他设置 */ - otherForm: { - product_id: '', - host_prefix: '', - host_length: '', - ipv6_num: '', - nat_acl_limit: '', - nat_web_limit: '', - niccard: 0, - cpu_model: 0, - node_priority: 1, - ip_mac_bind: 0, - support_ssh_key: 0, - rand_ssh_port: 0, - backup_enable: 0, - snap_enable: 0, - reinstall_sms_verify: 0, - reset_password_sms_verify: 0, - snap_data: [], - backup_data: [], - resource_package: [], - is_agent: '', - type: '', // host: kvm专业版 lightHost: kvm轻量版 hyperv :Hyper-V - disk_limit_switch: 0, - disk_limit_num: null, - free_disk_switch: 0, - free_disk_size: null - }, - versionArr: [ - { value: 'host', label: lang.kvm_major }, - { value: 'lightHost', label: lang.kvm_light }, - { value: 'hyperv', label: 'Hyper-V' }, - ], - rulesList: [ // 平衡规则 - { value: 1, label: lang.mf_rule1 }, - { value: 2, label: lang.mf_rule2 }, - { value: 3, label: lang.mf_rule3 }, - ], - dataRules: { - data_center_id: [ - { required: true, message: `${lang.select}${lang.area}`, type: 'error' }, - ], - line_id: [ - { required: true, message: `${lang.select}${lang.line_name}`, type: 'error' }, - ], - flow: [ - { required: true, message: `${lang.input}${lang.cloud_flow}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '0-999999' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 0 && val <= 999999, message: lang.input + '0-999999' + lang.verify2, type: 'warning' - } - ], - host_prefix: [ - { required: true, message: `${lang.input}${lang.host_prefix}`, type: 'error' }, - { - pattern: /^[A-Za-z][a-zA-Z0-9_.]{0,9}$/, message: lang.verify8 + '1-10', type: 'warning' - }, - ], - host_length: [ - { required: true, message: `${lang.input}${lang.mf_tip2}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.mf_tip2, type: 'warning' - }, - ], - country_id: [ - { required: true, message: lang.select + lang.country_area, type: 'error' }, - ], - city: [ - { required: true, message: lang.select + lang.city, type: 'error' }, - ], - cloud_config: [ - { required: true, message: lang.select + lang.city, type: 'error' }, - ], - cloud_config_id: [ - { required: true, message: lang.input + 'ID', type: 'error' }, - ], - area: [ - { required: true, message: `${lang.input}${lang.area}${lang.nickname}`, type: 'error' }, - ], - name: [ - { required: true, message: `${lang.input}${lang.box_label23}`, type: 'error' }, - ], - description: [ - { required: true, message: `${lang.input}${lang.description}`, type: 'error' }, - ], - order: [ - { required: true, message: `${lang.input}${lang.sort}ID`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.verify7, type: 'warning' - }, - { - validator: val => val >= 0, message: lang.verify7, type: 'warning' - } - ], - cpu: [ - { required: true, message: `${lang.input}CPU`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-240' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 240, message: lang.input + '1-240' + lang.verify2, type: 'warning' - } - ], - memory: [ - { required: true, message: `${lang.input}${lang.memory}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-512' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 512, message: lang.input + '1-512' + lang.verify2, type: 'warning' - } - ], - system_disk_size: [ - { required: true, message: `${lang.input}${lang.system_disk_size}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-1048576' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 1048576, message: lang.input + '1-1048576' + lang.verify2, type: 'warning' - } - ], - data_disk_size: [{ - pattern: /^[0-9]*$/, message: lang.input + '1-1048576' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 1048576, message: lang.input + '1-1048576' + lang.verify2, type: 'warning' - } - ], - network_type: [ - { required: true, message: lang.select + lang.net_type, type: 'error' }, - ], - bw: [ - { required: true, message: `${lang.input}${lang.bw}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-30000' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 30000, message: lang.input + '1-30000' + lang.verify2, type: 'warning' - } - ], - peak_defence: [{ - pattern: /^[0-9]*$/, message: lang.input + '1-999999' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 999999, message: lang.input + '1-999999' + lang.verify2, type: 'warning' - }], - min_memory: [ - { required: true, message: `${lang.input}${lang.memory}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-512' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 512, message: lang.input + '1-512' + lang.verify2, type: 'warning' - } - ], - max_memory: [ - { required: true, message: `${lang.input}${lang.memory}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-512' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 512, message: lang.input + '1-512' + lang.verify2, type: 'warning' - } - ], - line_id: [ - { required: true, message: `${lang.select}${lang.bw_line}`, type: 'error' }, - ], - min_bw: [ - { required: true, message: `${lang.input}${lang.min_value}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-30000' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 30000, message: lang.input + '1-30000' + lang.verify2, type: 'warning' - } - ], - max_bw: [ - { required: true, message: `${lang.input}${lang.max_value}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-30000' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 30000, message: lang.input + '1-30000' + lang.verify2, type: 'warning' - } - ], - }, - backupColumns: [ // 备份表格 - { - colKey: 'id', - title: lang.order_index, - width: 160 - }, - { - colKey: 'num', - title: lang.allow_back_num, - ellipsis: true, - width: 180 - }, - { - colKey: 'price', - title: lang.min_cycle_price, - className: 'back-price' - }, - ], - snappColumns: [ // 快照表格 - { - colKey: 'id', - title: lang.order_index, - width: 160 - }, - { - colKey: 'num', - title: lang.allow_snap_num, - width: 180, - ellipsis: true - }, - { - colKey: 'price', - title: lang.min_cycle_price, - className: 'back-price' - }, - ], - resourceColumns: [ // 资源包 - { - colKey: 'id', - title: lang.order_index, - width: 160 - }, - { - colKey: 'rid', - title: `${lang.resource_package}ID`, - width: 180, - ellipsis: true - }, - { - colKey: 'name', - title: `${lang.resource_package}${lang.nickname}`, - className: 'back-price' - }, - ], - backList: [], - snapList: [], - resourceList: [], - backLoading: false, - snapLoading: false, - backAllStatus: false, - /* 计算配置 */ - cpuList: [], - cpuLoading: false, - memoryList: [], - memoryLoading: false, - memoryType: '', // 内存方式 - cpuColumns: [ // cpu表格 - { - colKey: 'value', - title: `CPU(${lang.cores})`, - width: 300 - }, - { - colKey: 'price', - title: lang.box_title34, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - memoryColumns: [ // memory表格 - { - colKey: 'value', - title: `${lang.memory}(GB)`, - width: 300 - }, - { - colKey: 'price', - title: lang.box_title34, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - calcType: '', // cpu, memory - calcForm: { - // cpu - product_id: '', - cpuValue: '', // cpu里面的value, 提交的时候转换 - price: [], - other_config: { - advanced_cpu: '', - cpu_limit: '', - ipv6_num: '', - disk_type: '' - }, - // memory - type: '', - value: '', - min_value: '', - max_value: '', - step: '', - calcForm: 'GB', - // 性能 - read_bytes: '', - write_bytes: '', - read_iops: '', - write_iops: '' - }, - calcModel: false, - configType: [ - { value: 'radio', label: lang.mf_radio }, - { value: 'step', label: lang.mf_step }, - { value: 'total', label: lang.mf_total }, - ], - calcRules: { // 计算配置验证 - value: [ - { required: true, message: `${lang.input}${lang.bw}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '0-30000' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 0 && val <= 30000, message: lang.input + '0-30000' + lang.verify2, type: 'warning' - } - ], - cpuValue: [ - { required: true, message: `${lang.input}${lang.mf_cores}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + '1-240' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 240, message: lang.input + '1-240' + lang.verify2, type: 'warning' - } - ], - type: [ - { required: true, message: `${lang.select}${lang.config}${lang.mf_way}`, type: 'error' }, - ], - price: [ - { - pattern: /^\d+(\.\d{0,2})?$/, message: lang.input + lang.money, type: 'warning' - }, - { - validator: val => val >= 0 && val <= 999999, message: lang.verify12, type: 'warning' - } - ], - min_value: [ - { required: true, message: `${lang.input}${lang.min_value}`, type: 'error' }, - { - pattern: /^([1-9][0-9]*)$/, message: lang.input + '1~1048576' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 1 && val <= 1048576, message: lang.input + '1~1048576' + lang.verify2, type: 'warning' - } - ], - max_value: [ - { required: true, message: `${lang.input}${lang.max_value}`, type: 'error' }, - { - pattern: /^([1-9][0-9]*)$/, message: lang.input + '2~1048576' + lang.verify2, type: 'warning' - }, - { - validator: val => val >= 2 && val <= 1048576, message: lang.input + '2~1048576' + lang.verify2, type: 'warning' - } - ], - step: [ - { required: true, message: `${lang.input}${lang.min_step}`, type: 'error' }, - { - pattern: /^([1-9][0-9]*)$/, message: lang.input + lang.verify16, type: 'warning' - }, - ], - read_bytes: [ - { required: true, message: `${lang.input}`, type: 'error' }, - { validator: this.checkLimit } - ], - write_bytes: [ - { required: true, message: `${lang.input}`, type: 'error' }, - { validator: this.checkLimit } - ], - read_iops: [ - { required: true, message: `${lang.input}`, type: 'error' }, - { validator: this.checkLimit } - ], - write_iops: [ - { required: true, message: `${lang.input}`, type: 'error' }, - { validator: this.checkLimit } - ], - traffic_type: [ - { required: true, message: `${lang.select}${lang.traffic_type}`, type: 'error' }, - ], - bill_cycle: [ - { required: true, message: `${lang.select}${lang.billing_cycle}`, type: 'error' }, - ], - }, - isAdvance: false, // 是否展开高级配置 - /* 存储配置 */ - systemDisk: [], - systemLoading: false, - systemType: '', // 系统盘类型 - dataDisk: [], - dataLoading: false, - diskType: '', // 数据盘类型 - systemDiskColumns: [ - { - colKey: 'value', - title: `${lang.system_disk_size}(GB)`, - width: 300 - }, - { - colKey: 'price', - title: lang.box_title34, - }, - { - colKey: 'type', - title: lang.disk, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - diskColumns: [], - store_limit: 0, // 性能限制 - systemLimitList: [], - systemLimitLoading: false, - diskLimitLoading: false, - diskLimitList: [], - natureColumns: [ // 性能表格 - { - colKey: 'id', - title: lang.index_text8, - width: 100, - ellipsis: true, - }, - { - colKey: 'capacity_size', - title: `${lang.capacity_size}(GB)`, - width: 200 - }, - { - colKey: 'read_bytes', - title: `${lang.random_read}(MB/s)`, - ellipsis: true, - }, - { - colKey: 'write_bytes', - title: `${lang.random_write}(MB/s)`, - ellipsis: true, - }, - { - colKey: 'read_iops', - title: `${lang.read_iops}(IOPS/s)`, - ellipsis: true, - }, - { - colKey: 'write_iops', - title: `${lang.write_iops}(IOPS/s)`, - ellipsis: true, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - disabledWay: false, // 配置方式是否可选 - natureModel: false, - /* 数据中心 */ - dataList: [], - dataColumns: [ - { - colKey: 'order', - title: lang.index_text8, - width: 100, - ellipsis: true, - }, - { - colKey: 'country_name', - title: lang.country, - width: 150, - ellipsis: true, - className: 'country-td', - }, - { - colKey: 'city', - title: lang.city, - width: 150, - ellipsis: true, - className: 'city-td', - }, - { - colKey: 'area', - title: `${lang.area}${lang.nickname}`, - width: 150, - ellipsis: true, - className: 'area-td', - }, - { - colKey: 'line', - title: lang.line_name, - className: 'line-td', - width: 250, - ellipsis: true, - }, - { - colKey: 'price', - title: lang.box_title34, - className: 'line-td', - ellipsis: true, - }, - { - colKey: 'op', - title: lang.operation, - width: 120, - className: 'line-td' - }, - ], - dataForm: { // 新建数据中心 - country_id: '', - city: '', - area: '', - cloud_config: 'node', - cloud_config_id: '', - order: null - }, - countryList: [], - // 配置选项 - dataConfig: [ - { value: 'node', lable: lang.node + 'ID' }, - { value: 'area', lable: lang.area + 'ID' }, - { value: 'node_group', lable: lang.node_group + 'ID' }, - ], - /* 线路相关 */ - lineType: '', // 新增,编辑线路,新增的时候本地操作,保存一次性提交 - subType: '', // 线路子项类型, line_bw, line_flow, line_defence, line_ip - lineForm: { - country_id: '', // 线路国家 - city: '', // 线路城市 - data_center_id: '', - name: '', - order: 0, - bill_type: '', // bw, flow - bw_ip_group: '', - defence_ip_group: '', - ip_enable: 0, // ip开关 - defence_enable: 0, // 防护开关 - bw_data: [], // 带宽 - flow_data: [], //流量 - defence_data: [], // 防护 - ip_data: [], // ip - flow: '', - line_id: '', - link_clone: false, - /* 推荐配置 */ - description: '', - order: '', - cpu: '', - memory: '', - system_disk_size: '', - system_disk_type: '', - data_disk_size: '', - data_disk_type: '', - network_type: '', - bw: '', - peak_defence: '', - /* 配置限制 */ - type: '', // cpu, data_center,line - line_id: '', - min_bw: '', - max_bw: '', - min_memory: '', - max_memory: '' - }, - bw_ip_show: false, // bw 高级配置 - defence_ip_show: false, // 防护高级配置 - subForm: { // 线路子项表单 - type: '', - value: '', - price: [], - min_value: '', - max_value: '', - step: '', - other_config: { - in_bw: '', - out_bw: '', - traffic_type: '', - bill_cycle: '', - store_id: '', - advanced_bw: '' - } - }, - lineModel: false, - lineRight: false, - delSubIndex: 0, - subId: '', - countrySelect: [], // 国家三级联动 - billType: [ - { value: 'bw', label: lang.mf_bw }, - { value: 'flow', label: lang.mf_flow } - ], - bwColumns: [ - { - colKey: 'fir', - title: lang.bw, - }, - { - colKey: 'price', - title: lang.box_title34, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - trafficTypes: [ - { value: '1', label: lang.in }, - { value: '2', label: lang.out }, - { value: '3', label: lang.in_out }, - ], - billingCycle: [ - { value: 'month', label: lang.natural_month }, - { value: 'last_30days', label: lang.last_30days }, - ], - /* 推荐配置 */ - calcLineType: '', - recommendList: [], - systemDiskType: [], - dataDiskType: [], - recommendModel: false, - recommendColumns: [ - { - colKey: 'id', - title: lang.order_text68, - width: 150 - }, - { - colKey: 'name', - title: `${lang.mf_recommend}${lang.nickname}`, - width: 250, - ellipsis: true, - }, - { - colKey: 'description', - title: lang.mf_des, - ellipsis: true, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - networkType: [ - { value: 'normal', label: lang.normal_network }, - { value: 'vpc', label: lang.vpc_network } - ], - /* 配置限制 */ - cpu_list: [], - data_center_list: [], - line_ist: [], - cpu_loading: false, - data_center_loading: false, - line_oading: false, - data_center_columns: [], - cpu_columns: [ - { - colKey: 'cpu', - title: 'CPU', - }, - { - colKey: 'memory', - title: lang.memory, - }, - { - colKey: 'op', - title: lang.operation, - width: 120 - }, - ], - line_columns: [], - limitArr: [ - { name: 'cpu', tit: lang.mf_tip16 }, - { name: 'data_center', tit: lang.mf_tip17 }, - // { name: 'line', tit: lang.mf_tip18 }, - ], - limitType: '', - limitModel: false, - limitMemoryType: '', // 配置限制里面内存的方式 - memory_unit: '', - showConfirm: false, - deleteTip: '', - backNatureColumns: [], - tempNum: null, - tempFree: null - } - }, - watch: { - 'otherForm.type' (val) { - if (val !== 'hyperv') { - this.natureColumns = this.backNatureColumns - } else { - this.natureColumns = this.backNatureColumns.filter(item => item.colKey !== 'read_bytes' && item.colKey !== 'write_bytes' ) - } - }, - 'otherForm.backup_enable': { - handler () { - if (this.backList.length === 0) { - this.backList.push({ - num: 1, - type: 'backup', - price: 0.00, - status: true - }) - this.backAllStatus = true - } - }, - immediate: true - }, - 'otherForm.snap_enable': { - handler () { - if (this.snapList.length === 0) { - this.snapList.push({ - num: 1, - type: 'snap', - price: 0.00, - status: true - }) - this.backAllStatus = true - } - }, - immediate: true - }, - store_limit: { - immediate: true, - handler (val) { - if (val * 1) { - this.getStoreLimitList('system_disk_limit') - this.getStoreLimitList('data_disk_limit') - } - } - } - }, - computed: { - calcCountryName () { - return item => { - const lang = localStorage.getItem('backLang') || 'zh-cn' - if (lang === 'zh-cn') { - return item.name_zh - } else { - return item.name - } - } - }, - calcName () { - return (type) => { - switch (type) { - case 'memory': - return `${lang.memory_config}`; - case 'system_disk': - return `${lang.system_disk_size}${lang.capacity}`; - case 'data_disk': - return `${lang.data_disk}${lang.capacity}` - case 'line_bw': - return `${lang.bw}(Mbps)`; - } - } - - }, - calcIcon () { - return this.host + '/upload/common/country/' + this.countryList.filter(item => item.id === this.dataForm.country_id)[0]?.iso + '.png' - }, - calcIcon1 () { - if (!this.countrySelect) { - return - } - return this.host + '/upload/common/country/' + this.countrySelect.filter(item => item.id === this.lineForm.country_id)[0]?.iso + '.png' - }, - calcCity () { - if (!this.countrySelect) { - return - } - const city = this.countrySelect.filter(item => item.id === this.lineForm.country_id)[0]?.city || [] - if (city.length === 1) { - this.lineForm.city = city[0].name - } - return city - }, - calcArea () { - if (!this.countrySelect) { - return - } - const area = this.countrySelect.filter(item => item.id === this.lineForm.country_id)[0]?.city.filter(item => item.name === this.lineForm.city)[0]?.area || [] - if (area.length === 1) { - this.lineForm.data_center_id = area[0].id - } - return area - }, - calcSelectLine () { - if (!this.countrySelect) { - return - } - const line = this.countrySelect.filter(item => item.id === this.lineForm.country_id)[0] - ?.city.filter(item => item.name === this.lineForm.city)[0] - ?.area.filter(item => item.id === this.lineForm.data_center_id)[0]?.line || [] - if (line.length === 1) { - this.lineForm.line_id = line[0].id - this.calcLineType = line[0].bill_type - } - return line - }, - calcColums () { - return (val) => { - const temp = JSON.parse(JSON.stringify(this.bwColumns)) - switch (val) { - case 'flow': - temp[0].title = lang.cloud_flow + '(GB)' - return temp; - case 'defence': - temp[0].title = lang.defence + '(GB)' - return temp; - case 'ip': - temp[0].title = 'IP' + lang.auth_num + `(${lang.one})` - return temp - } - } - }, - calcSubTitle () { // 副标题 - return (data) => { - if (data.length > 0) { - return lang[`mf_${data[0].type}`] + lang.mf_way - } else { - return '' - } - } - }, - calcPrice () { // 处理本地价格展示 - return (price) => { - // 找到价格最低的 - const arr = Object.values(price).sort((a, b) => { - return a - b - }).filter(Number) - if (arr.length > 0) { - let temp = '' - Object.keys(price).forEach(item => { - if (price[item] * 1 === arr[0] * 1) { - const name = this.cycleData.filter(el => el.id === item * 1)[0]?.name - temp = (arr[0] * 1).toFixed(2) + '/' + name - } - }) - return temp - } else { - return '0.00' - } - } - }, - // 子项的计费方式是否可选 - calcShow () { - switch (this.subType) { - case 'line_bw': - return this.lineForm.bw_data.length > 0 ? true : false - } - }, - calcLimitData () { - return (name) => { - return this[`${name}_list`] - } - }, - calcLimitCol () { - return (name) => { - return this[`${name}_columns`] - } - }, - calcCpu () { - return (val) => { - return val.value + lang.cores - } - }, - calcMemory () { - return (val) => { - return val.value + this.memory_unit - } - }, - calcLine () { // 当前线路 - return this.dataList.filter(item => item.country_id === this.lineForm.country_id && item.city === this.lineForm.city)[0]?.line - }, - calcMemery () { - return (data) => { - return data.split(',') - } - }, - calcRange () { // 计算验证范围 - return (val) => { - if (this.calcType === 'memory') { // 内存 - if (this.calcForm.memory_unit === 'GB') { - return val >= 1 && val <= 512 - } else { - return val >= 128 && val <= 524288 - } - } else { - return val >= 1 && val <= 1048576 - } - } - }, - calcReg () { // 动态生成规则 - return (name, min, max) => { - return [ - { required: true, message: `${lang.input}${name}`, type: 'error' }, - { - pattern: /^[0-9]*$/, message: lang.input + `${min}-${max}` + lang.verify1, type: 'warning' - }, - { - validator: val => val >= min && val <= max, message: lang.input + `${min}-${max}` + lang.verify1, type: 'warning' - }] - } - }, - calcUnit () { - if (this.calcType === 'memory') { - return this.calcForm.memory_unit - } else { - return 'GB' - } - }, - calcPlaceh () { - if (this.calcType === 'memory') { - return this.calcForm.memory_unit === 'GB' ? lang.mf_tip9 : lang.mf_tip33 - } else { - return lang.mf_tip9 - } - }, - calcMemeryColumns () { - if (this.memoryList.length === 0) { - return this.memoryColumns - } else { - const temp = JSON.parse(JSON.stringify(this.memoryColumns)) - temp[0].title = `${lang.memory}(MB)` - return this.memory_unit === 'MB' ? temp : this.memoryColumns - } - } - }, - methods: { - async changeSort (e) { - try { - this.systemGroup = e.newData - const image_group_order = e.newData.reduce((all, cur) => { - all.push(cur.id) - return all - }, []) - const res = await changeImageGroup({ image_group_order }) - this.$message.success(res.data.msg) - this.getGroup() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - // 切换选项卡 - changeTab (e) { - this.allStatus = false - this.backAllStatus = false - switch (e) { - case 'duration': - this.getDurationList() - break; - case 'calc': - this.getCpuList() - this.getMemoryList() - this.getDurationList() - break; - case 'data_center': - this.getDataList() - this.getCountryList() - this.chooseData() - this.getDurationList() - break; - case 'store': - this.getOtherConfig() - this.getStoreList('system_disk') - this.getStoreList('data_disk') - this.getDurationList() - break; - case 'limit': - this.getConfigLimitList('cpu') - this.getConfigLimitList('data_center') - // this.getConfigLimitList('line') - this.getCpuList() - this.getMemoryList() - this.chooseData() - this.getDataList() - break; - case 'recommend': - this.getRecommendList() - this.getMemoryList() - this.chooseData() - this.getDiskTypeList('system_disk') - this.getDiskTypeList('data_disk') - this.calcType = 'memory' - break; - case 'system': - this.getSystemList() - this.getGroup() - break; - case 'other': - this.getOtherConfig() - break; - default: - break; - } - }, - checkLimit (val) { - const reg = /^[0-9]*$/ - if (reg.test(val) && val >= 0 && val <= 99999999) { - return { result: true }; - } else { - return { result: false, message: lang.input + '0~99999999' + lang.verify2, type: 'warning' }; - } - }, - changeMinMemory (val) { - if (this.lineForm.max_memory) { - if (val * 1 >= this.lineForm.max_memory * 1) { - this.lineForm.min_memory = val >= 524288 ? val - 1 : val - this.lineForm.max_memory = this.lineForm.min_memory * 1 + 1 - } - } - }, - changeMaxMemory (val) { - if (this.lineForm.min_memory) { - if (val * 1 <= this.lineForm.min_memory * 1) { - this.lineForm.max_memory = this.lineForm.max_memory >= 2 ? val : 2 - this.lineForm.min_memory = this.lineForm.max_memory * 1 - 1 - } - } - }, - // 处理价格 - blurPrice (val, ind) { - let temp = (String(val).match(/^\d*(\.?\d{0,2})/g)[0]) || '' - if (temp && !isNaN(Number(temp))) { - temp = Number(temp).toFixed(2) - } - if (temp >= 999999) { - this.calcForm.price[ind].price = Number(999999).toFixed(2) - } else { - this.calcForm.price[ind].price = temp - } - }, - blurSubPrice (val, ind) { - let temp = (String(val).match(/^\d*(\.?\d{0,2})/g)[0]) || '' - if (temp && !isNaN(Number(temp))) { - temp = Number(temp).toFixed(2) - } - if (temp >= 999999) { - val = 999999.00 - this.subForm.price[ind].price = Number(999999).toFixed(2) - } else { - this.subForm.price[ind].price = temp - } - }, - /* 配置限制 */ - /* name: cpu , data_center ,line */ - async getConfigLimitList (name) { - try { - this[`${name}_loading`] = true - const res = await getConfigLimit({ - product_id: this.id, - type: name, - orderby: 'id', - sort: 'desc', - page: 1, - limit: 1000 - }) - this[`${name}_list`] = res.data.data.list - this[`${name}_loading`] = false - } catch (error) { - this[`${name}_loading`] = false - } - }, - addLimit (name) { - this.optType = 'add' - this.limitType = name - this.limitModel = true - this.dataForm.country_id = '' - this.lineForm = { - country_id: '', - city: '', - data_center_id: '', - type: '', // cpu, data_center,line - line_id: '', - min_bw: '', - max_bw: '', - cpu: [], - memory: [], - min_memory: '', - max_memory: '' - } - this.comTitle = `${lang.order_text53}${lang.limit}` - }, - editLimit (name, row) { - this.comTitle = `${lang.edit}${lang.limit}` - this.limitType = name - this.limitModel = true - this.optType = 'update' - const temp = JSON.parse(JSON.stringify(row)) - temp.memory = temp.memory.split(',').map(item => item * 1) - temp.cpu = temp.cpu.map(item => item * 1) - this.lineForm = temp - - }, - async submitLimit ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.lineForm)) - params.product_id = this.id - params.type = this.limitType - if (this.optType === 'add') { - delete params.id - } - this.submitLoading = true - const res = await createAndUpdateConfigLimit(this.optType, params) - this.$message.success(res.data.msg) - this.getConfigLimitList(this.limitType) - this.limitModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - async delLimit () { - try { - const res = await delConfigLimit({ id: this.delId }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getConfigLimitList(this.delType) - } catch (error) { - this.$message.error(error.data.msg) - } - }, - /* 推荐配置 */ - async getRecommendList () { - try { - this.dataLoading = true - const res = await getRecommend({ - product_id: this.id, - page: 1, - limit: 1000 - }) - this.recommendList = res.data.data.list - this.dataLoading = false - } catch (error) { - this.dataLoading = false - } - }, - async getDiskTypeList (type) { - try { - const res = await getDiskType(type, { - product_id: this.id, - }) - if (type === 'system_disk') { - this.systemDiskType = res.data.data.list - } else { - this.dataDiskType = res.data.data.list - } - } catch (error) { - this.dataLoading = false - } - }, - - addRecommend () { - this.lineForm = { - country_id: '', - city: '', - name: '', - description: '', - order: '', - data_center_id: '', - cpu: '', - memory: '', - system_disk_size: '', - system_disk_type: '', - data_disk_size: '', - data_disk_type: '', - network_type: 'normal', - bw: '', - peak_defence: '', - flow: '', - line_id: '' - } - this.optType = 'add' - this.recommendModel = true - }, - editRecommend (row) { - this.lineForm = JSON.parse(JSON.stringify(row)) - this.optType = 'update' - this.recommendModel = true - const type = this.countrySelect.filter(item => item.id === this.lineForm.country_id)[0] - ?.city.filter(item => item.name === this.lineForm.city)[0] - ?.area.filter(item => item.id === this.lineForm.data_center_id)[0] - ?.line.filter(item => item.id === this.lineForm.line_id)[0]?.bill_type - this.calcLineType = type - }, - async submitRecommend ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.lineForm)) - if (this.optType === 'add') { - delete params.id - } - if (this.calcLineType === 'bw') { - delete params.flow - } else if (this.calcLineType === 'flow') { - delete params.bw - } - this.submitLoading = true - const res = await createAndUpdateRecommend(this.optType, params) - this.$message.success(res.data.msg) - this.getRecommendList(this.calcType) - this.recommendModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - // 删除推荐 - async delRecommend () { - try { - const res = await delRecommend({ id: this.delId }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getRecommendList() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - /* 推荐配置 end*/ - /* 线路 */ - addLine () { - this.lineModel = true - this.lineType = 'add' - this.dataForm.country_id = '' - this.lineForm = { - country_id: '', // 线路国家 - city: '', // 线路城市 - data_center_id: '', - name: '', - order: 0, - bill_type: 'bw', // bw, flow - bw_ip_group: '', - defence_ip_group: '', - ip_enable: 0, // ip开关 - defence_enable: 0, // 防护开关 - bw_data: [], // 带宽 - flow_data: [], //流量 - defence_data: [], // 防护 - ip_data: [], // ip - link_clone: false - } - this.lineRight = false - }, - async editLine (row) { - try { - const res = await getLineDetails({ id: row.id }) - this.lineForm = JSON.parse(JSON.stringify(res.data.data)) - this.lineForm.link_clone = this.lineForm.link_clone * 1 ? true : false - this.lineType = 'update' - this.optType = 'update' - this.lineRight = false - this.lineModel = true - this.bw_ip_show = this.lineForm.bw_ip_group ? true : false - this.defence_ip_show = this.lineForm.defence_ip_group ? true : false - this.subId = row.id - } catch (error) { - - } - }, - changeCountry () { - this.lineForm.city = '' - this.lineForm.data_center_id = '' - }, - changeCity () { - this.lineForm.data_center_id = '' - }, - // 编辑线路子项 - async editSubItem (row, index, type) { - this.subType = type - this.optType = 'update' - this.delSubIndex = index - this.lineRight = true - let temp = '' - if (this.lineType === 'add') { - temp = row - } else { - const res = await getLineChildDetails(type, { id: row.id }) - temp = res.data.data - if (temp.other_config?.traffic_type) { - temp.other_config.traffic_type = String(temp.other_config.traffic_type) - } - this.delId = row.id - } - setTimeout(() => { - const price = temp.duration.reduce((all, cur) => { - all.push({ - id: cur.id, - name: cur.name, - price: cur.price - }) - return all - }, []).sort((a, b) => { - return a.id - b.id - }) - Object.assign(this.subForm, temp) - this.subForm.price = price - if (this.subForm.other_config.in_bw || this.subForm.other_config.advanced_bw) { - this.isAdvance = true - } else { - this.isAdvance = false - } - }, 0); - }, - // 删除线路子项 - async delSubItem () { - try { - this.lineRight = false - if (this.lineType === 'add') { // 本地删除 - switch (this.delType) { - case 'line_bw': - return this.lineForm.bw_data.splice(this.delSubIndex, 1) - case 'line_flow': - return this.lineForm.flow_data.splice(this.delSubIndex, 1) - case 'line_defence': - return this.lineForm.defence_data.splice(this.delSubIndex, 1) - case 'line_ip': - return this.lineForm.ip_data.splice(this.delSubIndex, 1) - } - } else { // 编辑的时候删除 - const res = await delLineChild(this.delType, { id: this.delId }) - this.$message.success(res.data.msg) - this.delVisible = false - // this.editLine({ id: this.subId }) - this.submitLine({ validateResult: true, firstError: '' }, false) - } - } catch (error) { - this.delVisible = false - this.$message.error(error.data.msg) - } - }, - // 新增线路子项 - addLineSub (type) { - this.subType = type - this.optType = 'add' - this.isAdvance = false - if (type === 'line_bw') { - this.subForm.type = this.lineForm.bw_data[0]?.type || 'radio' - } - - this.subForm.value = '' - this.subForm.other_config = { - in_bw: '', - advanced_bw: '', - traffic_type: '3', - bill_cycle: 'last_30days' - } - this.lineRight = true - const price = this.cycleData.reduce((all, cur) => { - all.push({ - id: cur.id, - name: cur.name, - price: '' - }) - return all - }, []).sort((a, b) => { - return a.id - b.id - }) - this.subForm.price = price - this.bw_ip_show = false - this.defence_ip_show = false - }, - /* 推荐配置 */ - changeBillType (e) { - this.calcLineType = this.calcSelectLine.filter(item => item.id === e)[0]?.bill_type - }, - // 保存线路子项 - async submitSub ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.subForm)) - params.product_id = this.id - params.step = 1 - this.submitLoading = true - const duration = JSON.parse(JSON.stringify(params.price)) - params.price = params.price.reduce((all, cur) => { - cur.price && (all[cur.id] = cur.price) - return all - }, {}) - - // 新增的时候本地处理 - if (this.lineType === 'add') { - params.duration = duration - switch (this.subType) { - case 'line_bw': - this.optType === 'add' - ? this.lineForm.bw_data.unshift(params) - : this.lineForm.bw_data.splice(this.delSubIndex, 1, params) - break; - case 'line_flow': - this.optType === 'add' - ? this.lineForm.flow_data.unshift(params) - : this.lineForm.flow_data.splice(this.delSubIndex, 1, params) - break; - case 'line_defence': - this.optType === 'add' - ? this.lineForm.defence_data.unshift(params) - : this.lineForm.defence_data.splice(this.delSubIndex, 1, params) - break; - case 'line_ip': - this.optType === 'add' - ? this.lineForm.ip_data.unshift(params) - : this.lineForm.ip_data.splice(this.delSubIndex, 1, params) - break; - } - this.submitLoading = false - this.lineRight = false - return - } - // 新增:传线路id,编辑传配置id - params.id = this.optType === 'add' ? this.subId : this.delId - const res = await createAndUpdateLineChild(this.subType, this.optType, params) - this.$message.success(res.data.msg) - // this.editLine({ id: this.subId }) - // 保存子项的时候需要保存线路配置,第一次未开启防护/附加IP的时候,开关会被重置 - this.submitLine({ validateResult: true, firstError: '' }, false) - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - - async submitLine ({ validateResult, firstError }, bol = true) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.lineForm)) - params.product_id = this.id - params.link_clone = params.link_clone ? 1 : 0 - // if (params.bill_type === 'bw') { - // if (params.bw_data.length === 0) { - // return this.$message.warning(lang.mf_tip13) - // } - // } - // if (params.bill_type === 'flow') { - // if (params.flow_data.length === 0) { - // return this.$message.warning(lang.mf_tip14) - // } - // } - const isAdd = params.id ? 'update' : 'add' - this.submitLoading = true - const res = await createAndUpdateLine(isAdd, params) - if (bol) { - this.$message.success(res.data.msg) - this.getDataList() - this.lineModel = false - } else { - this.editLine({ id: this.subId }) - } - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - - /* 数据中心 */ - async getDataList () { - try { - this.dataLoading = true - const res = await getDataCenter({ - product_id: this.id, - page: 1, - limit: 1000 - }) - this.dataList = res.data.data.list - this.dataLoading = false - } catch (error) { - this.dataLoading = false - } - }, - // 国家列表 - async getCountryList () { - try { - const res = await getCountry() - this.countryList = res.data.data.list - } catch (error) { - - } - }, - async chooseData () { - try { - const res = await chooseDataCenter({ - product_id: this.id - }) - this.countrySelect = res.data.data.list - if (this.countrySelect.length === 1) { - this.lineForm.country_id = this.countrySelect[0].id - } - } catch (error) { - } - }, - changeType () { - this.$refs.dataForm.clearValidate(['cloud_config_id']) - }, - addData () { - this.optType = 'add' - this.dataModel = true - this.dataForm.country_id = '' - this.dataForm.city = '' - this.dataForm.area = '' - this.dataForm.order = 0 - this.dataForm.cloud_config = 'node' - this.dataForm.cloud_config_id = '' - this.comTitle = lang.new_create + lang.data_center - }, - async deleteData () { - try { - const res = await deleteDataCenter({ id: this.delId }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getDataList() - this.chooseData() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - async deleteLine () { - try { - const res = await delLine({ id: this.delId }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getDataList() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - editData (row) { - this.comTitle = lang.edit + lang.data_center - this.optType = 'update' - this.dataModel = true - const { id, country_id, city, area, cloud_config, cloud_config_id, order } = row - this.dataForm = { - id, country_id, city, area, cloud_config, cloud_config_id, order - } - }, - // 保存数据中心 - async submitData ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.dataForm)) - params.product_id = this.id - if (this.optType === 'add') { - delete params.id - } - this.submitLoading = true - const res = await createOrUpdateDataCenter(this.optType, params) - this.$message.success(res.data.msg) - this.getDataList() - this.chooseData() - this.dataModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - /* 存储配置 */ - async getStoreList (name) { - try { - if (name === 'system_disk') { - this.systemLoading = true - } else { - this.dataLoading = true - } - const res = await getStore(name, { - product_id: this.id, - page: 1, - limit: 1000 - }) - if (name === 'system_disk') { - this.systemDisk = res.data.data.list - } else { - this.dataDisk = res.data.data.list - } - if (name === 'system_disk') { - this.systemLoading = false - } else { - this.dataLoading = false - } - } catch (error) { - this.systemLoading = false - this.dataLoading = false - } - }, - async getStoreLimitList (name) { - try { - if (name === 'system_disk_limit') { - this.systemLimitLoading = true - } else { - this.diskLimitLoading = true - } - const res = await getStoreLimit(name, { - product_id: this.id, - page: 1, - limit: 1000 - }) - if (name === 'system_disk_limit') { - this.systemLimitList = res.data.data.list - } else { - this.diskLimitList = res.data.data.list - } - if (name === 'system_disk_limit') { - this.systemLimitLoading = false - } else { - this.diskLimitLoading = false - } - } catch (error) { - this.systemLimitLoading = false - this.diskLimitLoading = false - } - }, - // 修改数据盘新购数量 - async changeDiskLimit (val,type) { - try { - if (type === 'num') { - if (val > 16) { - val = 16 - } - if (val === this.tempNum) { - return - } - } - - const res = await saveDiskNumLimit({ - product_id: this.id, - disk_limit_switch: this.otherForm.disk_limit_switch, - disk_limit_num: this.otherForm.disk_limit_num - }) - this.$message.success(res.data.msg) - this.getOtherConfig() - } catch (error) { - this.$message.error(error.data.msg) - this.getOtherConfig() - } - }, - // 修改免费数据盘 - async changeFreeDiskLimit (val,type) { - try { - if (type === 'num') { - if (val > 1048576) { - val = 1048576 - } - if (val === this.tempFree) { - return - } - } - const res = await saveFreeData({ - product_id: this.id, - free_disk_switch: this.otherForm.free_disk_switch, - free_disk_size: this.otherForm.free_disk_size - }) - this.$message.success(res.data.msg) - this.getOtherConfig() - } catch (error) { - this.$message.error(error.data.msg) - this.getOtherConfig() - } - }, - - // 切换性能开关 - async changeLimit (val) { - try { - const res = await changeCloudSwitch({ - product_id: this.id, - status: val * 1 - }) - this.$message.success(res.data.msg) - this.getOtherConfig() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - // 删除存储 - async deleteStore (name) { - try { - const res = await delStore(name, { id: this.delId }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getStoreList(name) - } catch (error) { - this.$message.error(error.data.msg) - } - }, - // 删除存储限制 - async deleteStoreLimit (name) { - try { - const res = await delStoreLimit(name, { id: this.delId }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getStoreLimitList(name) - } catch (error) { - this.$message.error(error.data.msg) - } - }, - // 性能提交 - async submitNature ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const { - id, - min_value, - max_value, - read_bytes, - write_bytes, - read_iops, - write_iops } = this.calcForm - const params = { - id, - product_id: this.id, - min_value, - max_value, - read_bytes, - write_bytes, - read_iops, - write_iops - } - if (this.optType === 'add') { - delete params.id - } - this.submitLoading = true - const res = await createAndUpdateStoreLimit(this.calcType, this.optType, params) - this.$message.success(res.data.msg) - this.getStoreLimitList(this.calcType) - this.natureModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - /* 存储配置 end*/ - /* 计算配置 */ - async getCpuList () { - try { - this.cpuLoading = true - const res = await getCpu({ - product_id: this.id, - page: 1, - limit: 1000 - }) - this.cpuList = res.data.data.list - this.cpuLoading = false - } catch (error) { - this.cpuLoading = false - } - }, - async getMemoryList () { - try { - this.memoryLoading = true - const res = await getMemory({ - product_id: this.id, - page: 1, - limit: 1000 - }) - this.memoryList = res.data.data.list - this.calcForm.memory_unit = this.memory_unit = res.data.data.memory_unit - this.memoryLoading = false - this.memoryType = lang['mf_' + this.memoryList[0]?.type] - this.limitMemoryType = this.memoryList[0]?.type || '' - } catch (error) { - this.memoryLoading = false - } - }, - addCalc (type) { // 添加cpu/memory/system/disk - this.calcType = type - this.optType = 'add' - let temp_type = '', memory_unit = '' - switch (type) { - case 'cpu': - this.comTitle = `${lang.order_text53}CPU${lang.auth_num}`; - break; - case 'memory': - if (this.memoryList.length > 0) { - this.disabledWay = true - temp_type = this.memoryList[0].type - memory_unit = this.memory_unit - } else { - this.disabledWay = false - memory_unit = 'GB' - } - this.comTitle = `${lang.order_text53}${lang.memory}`; - break; - case 'system_disk': - if (this.systemDisk.length > 0) { - this.disabledWay = true - temp_type = this.systemDisk[0].type - } else { - this.disabledWay = false - } - this.comTitle = `${lang.order_text53}${lang.system_disk_size}`; - break; - case 'data_disk': - if (this.dataDisk.length > 0) { - this.disabledWay = true - temp_type = this.dataDisk[0].type - } else { - this.disabledWay = false - } - this.comTitle = `${lang.order_text53}${lang.data_disk}`; - break; - case 'system_disk_limit': - case 'data_disk_limit': - this.comTitle = `${lang.order_text53}${lang.disk_limit_enable}`; - this.natureModel = true - this.calcForm = { - min_value: '', - max_value: '', - read_bytes: '', - write_bytes: '', - read_iops: '', - write_iops: '' - } - return; - } - this.calcModel = true - const price = this.cycleData.reduce((all, cur) => { - all.push({ - id: cur.id, - name: cur.name, - price: '' - }) - return all - }, []).sort((a, b) => { - return a.id - b.id - }) - this.isAdvance = false - this.calcForm = { - product_id: '', - cpuValue: '', // cpu里面的value, 提交的时候转换 - price, - other_config: { - advanced_cpu: '', - cpu_limit: '', - ipv6_num: '', - disk_type: '', - store_id: '' - }, - // memory - type: temp_type, - value: '', - min_value: '', - max_value: '', - step: '', - memory_unit: memory_unit - } - }, - // 编辑cpu,memory - async editCalc (row, type) { - this.calcType = type - this.optType = 'update' - this.disabledWay = true - switch (type) { - case 'cpu': - this.comTitle = `${lang.edit}CPU${lang.auth_num}` - this.editCpu(row) - break; - case 'memory': - this.comTitle = `${lang.edit}${lang.memory}` - this.calcForm.memory_unit = this.memory_unit - this.editMemory(row) - break; - case 'system_disk': - this.comTitle = `${lang.edit}${lang.system_disk_size}` - this.editStore('system_disk', row) - break; - case 'data_disk': - this.comTitle = `${lang.edit}${lang.data_disk}` - this.editStore('data_disk', row) - break; - case 'system_disk_limit': - this.comTitle = `${lang.edit}${lang.system_disk_size}` - Object.assign(this.calcForm, row) - this.natureModel = true - break; - case 'data_disk_limit': - this.comTitle = `${lang.edit}${lang.system_disk_size}` - Object.assign(this.calcForm, row) - this.natureModel = true - break; - } - this.isAdvance = false - }, - async editCpu (row) { - try { - const res = await getCpuDetails({ - id: row.id - }) - this.calcModel = true - const temp = res.data.data - this.calcForm.id = temp.id - this.calcForm.cpuValue = temp.value - let price = temp.duration.reduce((all, cur) => { - all.push({ - id: cur.id, - name: cur.name, - price: cur.price - }) - return all - }, []).sort((a, b) => { - return a.id - b.id - }) - this.calcForm.id = row.id - this.calcForm.price = price - this.calcForm.other_config = temp.other_config - this.optType = 'update' - this.calcModel = true - if (this.calcForm.other_config.advanced_cpu || this.calcForm.other_config.cpu_limit || this.calcForm.other_config.ipv6_num) { - this.isAdvance = true - } - } catch (error) { - - } - }, - // 编辑内存 - async editMemory (row) { - try { - const res = await getMemoryDetails({ - id: row.id - }) - this.calcModel = true - const temp = res.data.data - this.calcForm.id = temp.id - this.calcForm.type = temp.type - this.calcForm.value = temp.value - let price = temp.duration.reduce((all, cur) => { - all.push({ - id: cur.id, - name: cur.name, - price: cur.price - }) - return all - }, []).sort((a, b) => { - return a.id - b.id - }) - this.calcForm.id = row.id - this.calcForm.price = price - this.calcForm.min_value = temp.min_value - this.calcForm.max_value = temp.max_value - this.calcForm.step = temp.step - this.optType = 'update' - this.calcModel = true - } catch (error) { - - } - }, - // 编辑存储 - async editStore (name, row) { - try { - const res = await getStoreDetails(name, { - id: row.id - }) - const temp = res.data.data - this.calcForm.id = temp.id - this.calcForm.value = temp.value - this.calcForm.min_value = temp.min_value - this.calcForm.max_value = temp.max_value - this.calcForm.step = temp.step - this.calcForm.type = temp.type - let price = temp.duration.reduce((all, cur) => { - all.push({ - id: cur.id, - name: cur.name, - price: cur.price - }) - return all - }, []).sort((a, b) => { - return a.id - b.id - }) - this.calcForm.price = price - this.calcForm.other_config = temp.other_config - this.optType = 'update' - if (temp.other_config.disk_type || temp.other_config.store_id) { - this.isAdvance = true - } - this.calcModel = true - } catch (error) { - - } - }, - submitCalc ({ validateResult, firstError }) { - if (validateResult === true) { - switch (this.calcType) { - case 'cpu': - return this.handlerCpu() - case 'memory': - return this.handlerMemory() - case 'system_disk': - case 'data_disk': - return this.handlerStore() - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - async deleteCpu () { - try { - const res = await delCpu({ - id: this.delId - }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getCpuList() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - // 提交cpu - async handlerCpu () { - try { - let { id, cpuValue, price, other_config } = this.calcForm - price = price.reduce((all, cur) => { - cur.price && (all[cur.id] = cur.price) - return all - }, {}) - const params = { - id, - product_id: this.id, - value: cpuValue, - price, - other_config - } - if (this.optType === 'add') { - delete params.id - } - this.submitLoading = true - const res = await createAndUpdateCpu(this.optType, params) - this.$message.success(res.data.msg) - this.getCpuList() - this.calcModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - }, - /* 改变最大最小值:内存,系统盘和数据盘 - 根据calcType来区分:memory=512, 其他 1048576 - */ - changeMin (e) { - const num = this.calcType === 'memory' ? (this.calcForm.memory_unit === 'GB' ? 512 : 524288) : 1048576 - if (e * 1 >= num) { - this.calcForm.min_value = 1 - } else if (e * 1 >= this.calcForm.max_value * 1) { - if (this.calcForm.max_value * 1) { - this.calcForm.max_value = e * 1 + 1 - } - } - }, - changeMax (e) { - const num = this.calcType === 'memory' ? (this.calcForm.memory_unit === 'GB' ? 512 : 524288) : 1048576 - if (e * 1 === 1) { - return this.calcForm.max_value = 2 - } - if (e * 1 > num) { - this.calcForm.max_value = num - } else if (e * 1 <= this.calcForm.min_value * 1 && e * 1 > 1) { - if (this.calcForm.min_value * 1) { - this.calcForm.min_value = e * 1 - 1 - } - } - }, - changeStep (e) { - if (e * 1 > this.calcForm.max_value * 1 - this.calcForm.min_value * 1) { - this.calcForm.step = 1 - } - }, - async deleteMemory () { - try { - const res = await delMemory({ - id: this.delId - }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getMemoryList() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - // 提交内存 - async handlerMemory () { - try { - let { id, value, type, price, min_value, max_value, memory_unit } = this.calcForm - price = price.reduce((all, cur) => { - cur.price && (all[cur.id] = cur.price) - return all - }, {}) - const params = { - id, - product_id: this.id, - type, - value, - price, - min_value, - max_value, - memory_unit, - step: 1 - } - if (this.optType === 'add') { - delete params.id - } - this.submitLoading = true - const res = await createAndUpdateMemory(this.optType, params) - this.$message.success(res.data.msg) - this.getMemoryList() - this.calcModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - }, - // 提交存储 - async handlerStore () { - try { - let { id, value, type, price, min_value, max_value, step, other_config } = this.calcForm - price = price.reduce((all, cur) => { - cur.price && (all[cur.id] = cur.price) - return all - }, {}) - const params = { - id, - product_id: this.id, - type, - value, - price, - min_value, - max_value, - step: 1, - other_config - } - if (this.optType === 'add') { - delete params.id - } - this.submitLoading = true - const res = await createAndUpdateStore(this.calcType, this.optType, params) - this.$message.success(res.data.msg) - this.getStoreList(this.calcType) - this.calcModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - }, - - changeAdvance () { - this.isAdvance = !this.isAdvance - }, - /* 计算配置 end*/ - /* 周期相关 */ - closeData () { - this.dataModel = false - }, - async getDurationList () { - try { - this.loading = true - const res = await getDuration({ - product_id: this.id, - page: 1, - limit: 100 - }) - this.cycleData = res.data.data.list - this.loading = false - } catch (error) { - this.loading = false - } - }, - addCycle () { - this.optType = 'add' - this.comTitle = lang.add_cycle - this.cycleForm.name = '' - this.cycleForm.unit = 'month' - this.cycleForm.num = '' - this.cycleForm.price_factor = 1 - this.cycleModel = true - }, - editCycle (row) { - this.optType = 'update' - this.comTitle = lang.update + lang.cycle - this.cycleForm = JSON.parse(JSON.stringify(row)) - this.cycleModel = true - }, - async submitCycle ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.cycleForm)) - params.product_id = this.id - if (this.optType === 'add') { - delete params.id - } - if (!params.price_factor && params.price_factor !== 0) { - params.price_factor = '1.00' - } - this.submitLoading = true - const res = await createAndUpdateDuration(this.optType, params) - this.$message.success(res.data.msg) - this.getDurationList() - this.cycleModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - // 删除周期 - async deleteCycle () { - try { - const res = await delDuration({ - product_id: this.id, - id: this.delId - }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getDurationList() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - /* 操作系统 */ - // 系统列表 - async getSystemList () { - try { - this.loading = true - const params = JSON.parse(JSON.stringify(this.systemParams)) - params.product_id = this.id - const res = await getImage(params) - this.systemList = res.data.data.list - this.loading = false - } catch (error) { - this.loading = false - } - }, - // 系统分类 - async getGroup () { - try { - const res = await getImageGroup({ - product_id: this.id, - orderby: 'id', - sort: 'desc' - }) - this.systemGroup = res.data.data.list - } catch (error) { - - } - }, - createNewSys () { // 新增 - this.systemModel = true - this.optType = 'add' - this.comTitle = `${lang.add}${lang.system}` - this.createSystem.image_group_id = '' - this.createSystem.name = '' - this.createSystem.charge = 0 - this.createSystem.price = '' - this.createSystem.enable = 0 - this.createSystem.rel_image_id = '' - }, - editSystem (row) { - this.optType = 'update' - this.comTitle = lang.update + lang.system - this.createSystem = { ...row } - this.systemModel = true - }, - async submitSystem ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.createSystem)) - params.product_id = this.id - if (this.optType === 'add') { - delete params.id - } - this.submitLoading = true - const res = await createAndUpdateImage(this.optType, params) - this.$message.success(res.data.msg) - this.getSystemList() - this.systemModel = false - this.submitLoading = false - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - // 列表修改状态 - async changeSystemStatus (row) { - try { - const params = JSON.parse(JSON.stringify(row)) - params.product_id = this.id - const res = await createAndUpdateImage('update', params) - this.$message.success(res.data.msg) - this.getSystemList() - } catch (error) { - - } - }, - // 拉取系统 - async refeshImageHandler () { - try { - this.$message.success(lang.mf_tip) - await refreshImage({ - product_id: this.id - }) - this.getSystemList() - this.getGroup() - } catch (error) { - - } - }, - // 分类管理 - classManage () { - this.classModel = true - this.classParams.name = '' - this.classParams.icon = '' - this.optType = 'add' - }, - async submitSystemGroup ({ validateResult, firstError }) { - if (validateResult === true) { - try { - const params = JSON.parse(JSON.stringify(this.classParams)) - if (this.optType === 'add') { - delete params.id - params.product_id = this.id - } - this.submitLoading = true - const res = await createAndUpdateImageGroup(this.optType, params) - this.$message.success(res.data.msg) - this.getGroup() - this.submitLoading = false - this.classParams.name = '' - this.classParams.icon = '' - this.$refs.classForm.reset() - this.optType = 'add' - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - editGroup (row) { - this.optType = 'update' - this.classParams = JSON.parse(JSON.stringify(row)) - }, - async deleteGroup () { - try { - const res = await delImageGroup({ - id: this.delId - }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getGroup() - this.classParams.name = '' - this.classParams.icon = '' - this.$refs.classForm.reset() - this.optType = 'add' - } catch (error) { - this.$message.error(error.data.msg) - } - }, - async deleteSystem () { - try { - const res = await delImage({ - id: this.delId - }) - this.$message.success(res.data.msg) - this.delVisible = false - this.getSystemList() - } catch (error) { - this.$message.error(error.data.msg) - } - }, - /* 其他设置 */ - async getOtherConfig () { - try { - const res = await getCloudConfig({ - product_id: this.id - }) - const temp = res.data.data - temp.support_normal_network = Boolean(temp.support_normal_network) - temp.support_vpc_network = Boolean(temp.support_vpc_network) - // 处理快照备份的数据 - this.backList = temp.backup_data.map(item => { - item.status = false - item.price = item.price * 1 - return item - }) - if (temp.backup_data.length === 0) { - this.otherForm.backup_enable = 0 - } - // 处理快照数据 - this.snapList = temp.snap_data.map(item => { - item.status = false - item.price = item.price * 1 - return item - }) - if (temp.snap_data.length === 0) { - this.otherForm.snap_enable = 0 - } - // 处理资源包数据 - this.resourceList = temp.resource_package.map(item => { - item.status = false - return item - }) - this.tempNum = this.otherForm.disk_limit_num - this.tempFree = this.otherForm.free_disk_size - // 默认允许公网IP - temp.support_public_ip = 1 - this.otherForm = temp - this.store_limit = temp.disk_limit_enable * 1 - } catch (error) { - this.$message.error(error.data.msg) - } - }, - changeLenth (e) { - if (e - this.otherForm.host_prefix.length > 25) { - this.otherForm.host_length = 25 - this.otherForm.host_prefix.length - } else if (e * 1 + this.otherForm.host_prefix.length * 1 < 6) { - this.otherForm.host_length = 6 - this.otherForm.host_prefix.length - } - }, - addGroup (type) { - const temp = { - num: 1, - type: type, - price: 0.00, - status: true // 编辑状态 - } - this.backAllStatus = true - if (type === 'backup') { - this.backList.push(temp) - } else if (type === 'snap') { - this.snapList.push(temp) - } else if (type === 'resource') { - this.resourceList.push({ - rid: '', - name: '', - status: true - }) - } - }, - // 添加资源包 - addResourece () { - this.resourceList.push({ - rid: '', - name: '', - status: true // 编辑状态 - }) - }, - openEdit (type, index) { - this.backAllStatus = true - if (type === 'backup') { - this.backList[index].status = true - } else if (type === 'snap') { - this.snapList[index].status = true - } else if (type === 'resource') { - this.resourceList[index].status = true - } - }, - closeEdit (row, index, type) { - if (row.id) { // 取消已有数据的编辑 - if (type === 'backup') { - this.backList[index].status = false - } else if (type === 'snap') { - this.snapList[index].status = false - } else if (type === 'resource') { - this.resourceList[index].status = false - } - } else { // 新增未加入数据库的 - if (type === 'backup') { - this.backList.splice(index, 1) - } else if (type === 'snap') { - this.snapList.splice(index, 1) - } else if (type === 'resource') { - this.resourceList.splice(index, 1) - } - } - this.backAllStatus = false - }, - - // 删除 备份/快照 - deleteBackup (type, index) { - if (type === 'backup') { - this.backList.splice(index, 1) - } else if (type === 'snap') { - this.snapList.splice(index, 1) - } else if (type === 'resource') { - this.resourceList.splice(index, 1) - } - }, - async submitConfig ({ validateResult, firstError }) { - if (validateResult === true) { - try { - // 检测是否需要清空数据 - const clearRes = await checkType({ - product_id: this.id, - type: this.otherForm.type - }) - if (clearRes.data.data.clear) { - this.showConfirm = true - this.deleteTip = clearRes.data.data.desc - } else { - this.handlerConfig() - } - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - } else { - console.log('Errors: ', validateResult); - this.$message.warning(firstError); - } - }, - async handlerConfig () { - try { - const params = JSON.parse(JSON.stringify(this.otherForm)) - params.product_id = this.id - params.backup_data = this.backList - params.snap_data = this.snapList - params.resource_package = this.resourceList - params.support_normal_network = params.support_normal_network ? 1 : 0 - params.support_vpc_network = params.support_vpc_network ? 1 : 0 - if (!params.support_normal_network && !params.support_vpc_network) { - return this.$message.warning(`${lang.select}${lang.net_type}`) - } - const res = await saveCloudConfig(params) - this.$message.success(res.data.msg) - this.submitLoading = false - this.dataModel = false - this.showConfirm = false - this.getOtherConfig() - } catch (error) { - this.submitLoading = false - this.$message.error(error.data.msg) - } - }, - /* 通用删除按钮 */ - comDel (type, row, index) { - this.delId = row.id - if (type === 'cycle') { - this.delTit = lang.sure_del_cycle - } - this.delTit = lang.sureDelete - this.delType = type - // 新增的时候,本地删除线路子项 - if ((this.lineType === 'add') && - (this.subType === 'line_bw' || this.subType === 'line_flow' || this.subType === 'line_defence' || this.subType === 'line_ip') - ) { - this.delSubIndex = index - this.delSubItem() - return - } - this.delVisible = true - }, - // 通用删除 - sureDelete () { - switch (this.delType) { - case 'cycle': - return this.deleteCycle() - case 'c_cpu': - return this.deleteCpu() - case 'memory': - return this.deleteMemory() - case 'system': // 删除镜像 - return this.deleteSystem() - case 'group': // 删除镜像分类 - return this.deleteGroup() - case 'system_disk': - return this.deleteStore('system_disk') - case 'data_disk': - return this.deleteStore('data_disk') - case 'system_disk_limit': - return this.deleteStoreLimit('system_disk_limit') - case 'data_disk_limit': - return this.deleteStoreLimit('data_disk_limit') - case 'data': - return this.deleteData() - case 'c_line': - return this.deleteLine() - case 'line_bw': - case 'line_flow': - case 'line_defence': - case 'line_ip': - return this.delSubItem() - case 'recommend': - return this.delRecommend() - case 'cpu': - case 'data_center': - case 'line': - return this.delLimit() - default: - return null - } - }, - formatPrice (val) { - return (val * 1).toFixed(2) - }, - }, - created () { - this.id = location.href.split('?')[1].split('=')[1] - this.iconSelecet = this.iconList.reduce((all, cur) => { - all.push({ - value: cur, - label: `${this.host}/plugins/server/mf_cloud/template/admin/img/${cur}.svg` - }) - return all - }, []); - this.diskColumns = JSON.parse(JSON.stringify(this.systemDiskColumns)) - this.diskColumns[0].title = `${lang.data_disk}(GB)` - const temp = JSON.parse(JSON.stringify(this.cpu_columns)) - this.data_center_columns = [{ - colKey: 'fir', - title: lang.data_center, - }].concat(temp) - this.line_columns = [{ - colKey: 'fir', - title: lang.bw, - }].concat(temp) - // 默认拉取数据 - this.getDurationList() - this.getMemoryList() - // 拉取其他设置获取版本 - this.getOtherConfig() - this.backNatureColumns = JSON.parse(JSON.stringify(this.natureColumns)) - }, -}).$mount(template) diff --git a/10.3.4/public/plugins/server/mf_cloud/validate/CartValidate.php b/10.3.4/public/plugins/server/mf_cloud/validate/CartValidate.php deleted file mode 100644 index a58765f1..00000000 --- a/10.3.4/public/plugins/server/mf_cloud/validate/CartValidate.php +++ /dev/null @@ -1,132 +0,0 @@ - 'require|integer', - 'cpu' => 'require|integer', - 'memory' => 'require|integer', - 'image_id' => 'require|integer', // 镜像ID,暂时必须 - 'system_disk' => 'require|array|checkDisk:thinkphp', - 'data_disk' => 'array|checkDataDisk:thinkphp', - 'size' => 'require|integer', - 'backup_num' => 'integer', - 'snap_num' => 'integer', - 'duration_id' => 'require|integer', - 'password' => 'requireWithout:ssh_key_id|checkPassword:thinkphp', - 'ssh_key_id' => 'requireWithout:password|number', - 'notes' => 'length:0,1000', - 'network_type' => 'require|in:normal,vpc|checkConfigLimit:thinkphp', - 'bw' => 'integer', - 'security_group_protocol' => 'array|checkSecurityGroupProtocol:thinkphp', - ]; - - protected $message = [ - 'data_center_id.require' => 'data_center_id_error', - 'data_center_id.integer' => 'data_center_id_error', - 'cpu.require' => 'please_select_cpu_config', - 'cpu.integer' => 'please_select_cpu_config', - 'memory.require' => 'please_select_memory_config', - 'memory.integer' => 'please_select_memory_config', - 'image_id.require' => 'please_select_os', - 'image_id.integer' => 'please_select_os', - 'system_disk.require' => 'please_select_system_disk_config', - 'system_disk.array' => 'please_select_system_disk_config', - 'data_disk.array' => 'please_select_data_disk_config', - 'size.require' => 'please_select_disk_size', - 'size.integer' => 'please_select_disk_size', - 'backup_num.integer' => 'backup_num_error', - 'snap_num.integer' => 'snap_num_error', - 'duration_id.require' => 'please_select_pay_duration', - 'duration_id.integer' => 'please_select_pay_duration', - 'password.requireWithout' => 'please_set_login_password', - 'password.checkPassword' => 'mf_cloud_password_format_error', - 'ssh_key_id.requireWithout' => 'password_and_ssh_key_must_have_one', - 'ssh_key_id.number' => 'ssh_key_format_error', - 'notes.length' => 'instance_name_length_error', - 'network_type.require' => 'please_select_network_type', - 'network_type.in' => 'please_select_network_type', - 'bw.integer' => 'bw_error', - ]; - - protected $scene = [ - // 下单验证 - 'cal' => ['data_center_id','cpu','memory','image_id','system_disk','data_disk','backup_num','snap_num','duration_id','password','ssh_key_id','notes','network_type','bw'], - 'upgrade_config' => ['cpu','memory'], - 'check_disk' => ['size'], - ]; - - public function sceneCalPrice(){ - return $this->only(['data_center_id','cpu','memory','image_id','system_disk','data_disk','backup_num','snap_num','duration_id']); - } - - // 验证密码 - public function checkPassword($value){ - if(is_null($value)){ - return true; - } - return ToolLogic::checkPassword($value); - } - - public function checkDisk($value){ - $CartValidate = new CartValidate(); - - if(!$CartValidate->scene('check_disk')->check($value)){ - return $CartValidate->getError(); - } - return true; - } - - public function checkDataDisk($value){ - $CartValidate = new CartValidate(); - - foreach($value as $v){ - if(!$CartValidate->scene('check_disk')->check($v)){ - return $CartValidate->getError(); - } - } - return true; - } - - // 验证配置限制,下单时验证 - public function checkConfigLimit($value, $type, $param){ - $dataCenter = DataCenterModel::find($param['data_center_id']); - if(empty($dataCenter)){ - return 'data_center_not_found'; - } - $ConfigLimitModel = new ConfigLimitModel(); - $checkConfigLimit = $ConfigLimitModel->checkConfigLimit($dataCenter['product_id'], $param); - if($checkConfigLimit['status'] == 400){ - return $checkConfigLimit['msg']; - } - return true; - } - - // 验证主机名 英文大小写字母开头+数字及"_"、"-"、“.”组成,6位及以上 - public function checkHostname($value){ - return preg_match('/^[a-zA-Z][0-9a-zA-Z_\-.]{5,254}$/', $value) ? true : false; - } - - public function checkSecurityGroupProtocol($value){ - $allow = ['icmp','ssh','telnet','http','https','mssql','oracle','mysql','rdp','postgresql','redis']; - foreach($value as $v){ - if(!in_array($v, $allow)){ - return 'security_group_rule_error'; - } - } - return true; - } - - - -} \ No newline at end of file diff --git a/10.3.4.version b/10.3.5.version similarity index 100% rename from 10.3.4.version rename to 10.3.5.version diff --git a/10.3.4/app/admin/controller/AdminBaseController.php b/10.3.5/app/admin/controller/AdminBaseController.php similarity index 100% rename from 10.3.4/app/admin/controller/AdminBaseController.php rename to 10.3.5/app/admin/controller/AdminBaseController.php diff --git a/10.3.4/app/admin/controller/AdminController.php b/10.3.5/app/admin/controller/AdminController.php similarity index 100% rename from 10.3.4/app/admin/controller/AdminController.php rename to 10.3.5/app/admin/controller/AdminController.php diff --git a/10.3.4/app/admin/controller/AdminRoleController.php b/10.3.5/app/admin/controller/AdminRoleController.php similarity index 100% rename from 10.3.4/app/admin/controller/AdminRoleController.php rename to 10.3.5/app/admin/controller/AdminRoleController.php diff --git a/10.3.4/app/admin/controller/AppMarketController.php b/10.3.5/app/admin/controller/AppMarketController.php similarity index 100% rename from 10.3.4/app/admin/controller/AppMarketController.php rename to 10.3.5/app/admin/controller/AppMarketController.php diff --git a/10.3.4/app/admin/controller/BaseController.php b/10.3.5/app/admin/controller/BaseController.php similarity index 100% rename from 10.3.4/app/admin/controller/BaseController.php rename to 10.3.5/app/admin/controller/BaseController.php diff --git a/10.3.4/app/admin/controller/ClientController.php b/10.3.5/app/admin/controller/ClientController.php similarity index 100% rename from 10.3.4/app/admin/controller/ClientController.php rename to 10.3.5/app/admin/controller/ClientController.php diff --git a/10.3.4/app/admin/controller/ClientCreditController.php b/10.3.5/app/admin/controller/ClientCreditController.php similarity index 100% rename from 10.3.4/app/admin/controller/ClientCreditController.php rename to 10.3.5/app/admin/controller/ClientCreditController.php diff --git a/10.3.4/app/admin/controller/ClientRecordController.php b/10.3.5/app/admin/controller/ClientRecordController.php similarity index 100% rename from 10.3.4/app/admin/controller/ClientRecordController.php rename to 10.3.5/app/admin/controller/ClientRecordController.php diff --git a/10.3.4/app/admin/controller/CommonController.php b/10.3.5/app/admin/controller/CommonController.php similarity index 100% rename from 10.3.4/app/admin/controller/CommonController.php rename to 10.3.5/app/admin/controller/CommonController.php diff --git a/10.3.4/app/admin/controller/ConfigurationController.php b/10.3.5/app/admin/controller/ConfigurationController.php similarity index 99% rename from 10.3.4/app/admin/controller/ConfigurationController.php rename to 10.3.5/app/admin/controller/ConfigurationController.php index 4c2ed1ce..0ab4bb0e 100644 --- a/10.3.4/app/admin/controller/ConfigurationController.php +++ b/10.3.5/app/admin/controller/ConfigurationController.php @@ -417,6 +417,7 @@ public function cronUpdate() * @version v1 * @return string admin_theme - 后台主题 * @return string clientarea_theme - 会员中心主题 + * @return int web_switch - 官网开关0关闭1开启 * @return string web_theme - 官网主题 * @return array admin_theme_list - 后台主题列表 * @return string admin_theme_list[].name - 名称 @@ -453,6 +454,7 @@ public function themeList() * @version v1 * @param string admin_theme - 后台主题 required * @param string clientarea_theme - 会员中心主题 required + * @param int web_switch - 官网开关0关闭1开启 required * @param string web_theme - 官网主题 required */ public function themeUpdate() @@ -548,7 +550,6 @@ public function certificationUpdate() * @method GET * @author theworld * @version v1 - * @return string put_on_record - 备案信息 * @return string enterprise_name - 企业名称 * @return string enterprise_telephone - 企业电话 * @return string enterprise_mailbox - 企业邮箱 @@ -587,7 +588,6 @@ public function infoList() * @method PUT * @author theworld * @version v1 - * @param string put_on_record - 备案信息 required * @param string enterprise_name - 企业名称 required * @param string enterprise_telephone - 企业电话 required * @param string enterprise_mailbox - 企业邮箱 required diff --git a/10.3.4/app/admin/controller/ConsultController.php b/10.3.5/app/admin/controller/ConsultController.php similarity index 100% rename from 10.3.4/app/admin/controller/ConsultController.php rename to 10.3.5/app/admin/controller/ConsultController.php diff --git a/10.3.4/app/admin/controller/FeedbackController.php b/10.3.5/app/admin/controller/FeedbackController.php similarity index 100% rename from 10.3.4/app/admin/controller/FeedbackController.php rename to 10.3.5/app/admin/controller/FeedbackController.php diff --git a/10.3.4/app/admin/controller/FriendlyLinkController.php b/10.3.5/app/admin/controller/FriendlyLinkController.php similarity index 100% rename from 10.3.4/app/admin/controller/FriendlyLinkController.php rename to 10.3.5/app/admin/controller/FriendlyLinkController.php diff --git a/10.3.4/app/admin/controller/HonorController.php b/10.3.5/app/admin/controller/HonorController.php similarity index 100% rename from 10.3.4/app/admin/controller/HonorController.php rename to 10.3.5/app/admin/controller/HonorController.php diff --git a/10.3.4/app/admin/controller/HostController.php b/10.3.5/app/admin/controller/HostController.php similarity index 100% rename from 10.3.4/app/admin/controller/HostController.php rename to 10.3.5/app/admin/controller/HostController.php diff --git a/10.3.4/app/admin/controller/IndexController.php b/10.3.5/app/admin/controller/IndexController.php similarity index 100% rename from 10.3.4/app/admin/controller/IndexController.php rename to 10.3.5/app/admin/controller/IndexController.php diff --git a/10.3.4/app/admin/controller/LogController.php b/10.3.5/app/admin/controller/LogController.php similarity index 100% rename from 10.3.4/app/admin/controller/LogController.php rename to 10.3.5/app/admin/controller/LogController.php diff --git a/10.3.4/app/admin/controller/MenuController.php b/10.3.5/app/admin/controller/MenuController.php similarity index 100% rename from 10.3.4/app/admin/controller/MenuController.php rename to 10.3.5/app/admin/controller/MenuController.php diff --git a/10.3.4/app/admin/controller/ModuleController.php b/10.3.5/app/admin/controller/ModuleController.php similarity index 100% rename from 10.3.4/app/admin/controller/ModuleController.php rename to 10.3.5/app/admin/controller/ModuleController.php diff --git a/10.3.4/app/admin/controller/NoticeEmailController.php b/10.3.5/app/admin/controller/NoticeEmailController.php similarity index 100% rename from 10.3.4/app/admin/controller/NoticeEmailController.php rename to 10.3.5/app/admin/controller/NoticeEmailController.php diff --git a/10.3.4/app/admin/controller/NoticeSettingController.php b/10.3.5/app/admin/controller/NoticeSettingController.php similarity index 100% rename from 10.3.4/app/admin/controller/NoticeSettingController.php rename to 10.3.5/app/admin/controller/NoticeSettingController.php diff --git a/10.3.4/app/admin/controller/NoticeSmsController.php b/10.3.5/app/admin/controller/NoticeSmsController.php similarity index 100% rename from 10.3.4/app/admin/controller/NoticeSmsController.php rename to 10.3.5/app/admin/controller/NoticeSmsController.php diff --git a/10.3.4/app/admin/controller/OrderController.php b/10.3.5/app/admin/controller/OrderController.php similarity index 95% rename from 10.3.4/app/admin/controller/OrderController.php rename to 10.3.5/app/admin/controller/OrderController.php index 2ee7aa42..80fb852b 100644 --- a/10.3.4/app/admin/controller/OrderController.php +++ b/10.3.5/app/admin/controller/OrderController.php @@ -645,14 +645,17 @@ public function settle() 'amount_unpaid' => $param['custom_order_amount'] ],['id'=>$orderId]); } - OrderItemModel::create([ - 'type' => 'manual', - 'order_id' => $orderId, - 'client_id' => $order['client_id'], - 'description' => "手动更改金额", - 'amount' => $param['custom_order_amount']-$order['amount'], - 'create_time' => time() - ]); + if(($param['custom_order_amount']-$order['amount'])!=0){ + OrderItemModel::create([ + 'type' => 'manual', + 'order_id' => $orderId, + 'client_id' => $order['client_id'], + 'description' => lang('update_amount'), + 'amount' => $param['custom_order_amount']-$order['amount'], + 'create_time' => time() + ]); + } + /*$OrderItemModel = new OrderItemModel(); $orderItems = $OrderItemModel->where('order_id',$orderId)->select(); @@ -684,4 +687,27 @@ public function settle() return json($result); } + /** + * 时间 2022-05-30 + * @title 商品配置页面 + * @desc 商品配置页面 + * @url /admin/v1/product/:id/config_option + * @method GET + * @author wyh + * @version v1 + * @param int id - 商品ID required + * @param string tag - 商品价格显示标识 + * @return string data.content - 模块输出内容 + */ + public function moduleClientConfigOption() + { + $param = $this->request->param(); + + $ProductModel = new ProductModel(); + + $ProductModel->isAdmin = true; + + $result = $ProductModel->moduleClientConfigOption($param); + return json($result); + } } \ No newline at end of file diff --git a/10.3.4/app/admin/controller/PartnerController.php b/10.3.5/app/admin/controller/PartnerController.php similarity index 100% rename from 10.3.4/app/admin/controller/PartnerController.php rename to 10.3.5/app/admin/controller/PartnerController.php diff --git a/10.3.4/app/admin/controller/PluginController.php b/10.3.5/app/admin/controller/PluginController.php similarity index 100% rename from 10.3.4/app/admin/controller/PluginController.php rename to 10.3.5/app/admin/controller/PluginController.php diff --git a/10.3.4/app/admin/controller/ProductController.php b/10.3.5/app/admin/controller/ProductController.php similarity index 97% rename from 10.3.4/app/admin/controller/ProductController.php rename to 10.3.5/app/admin/controller/ProductController.php index 3070da39..01c9825b 100644 --- a/10.3.4/app/admin/controller/ProductController.php +++ b/10.3.5/app/admin/controller/ProductController.php @@ -545,6 +545,23 @@ public function modulesProductList() return json($result); } + /** + * 时间 2023-10-16 + * @title 复制商品 + * @desc 复制商品 + * @url /admin/v1/product/:id/copy + * @method POST + * @author theworld + * @version v1 + * @param int id - 商品ID + */ + public function copy() + { + $param = $this->request->param(); + $ProductModel = new ProductModel(); + $result = $ProductModel->copyProduct($param); + return json($result); + } } diff --git a/10.3.4/app/admin/controller/ProductGroupController.php b/10.3.5/app/admin/controller/ProductGroupController.php similarity index 100% rename from 10.3.4/app/admin/controller/ProductGroupController.php rename to 10.3.5/app/admin/controller/ProductGroupController.php diff --git a/10.3.4/app/admin/controller/PublicController.php b/10.3.5/app/admin/controller/PublicController.php similarity index 97% rename from 10.3.4/app/admin/controller/PublicController.php rename to 10.3.5/app/admin/controller/PublicController.php index 69651af0..43c4acb8 100644 --- a/10.3.4/app/admin/controller/PublicController.php +++ b/10.3.5/app/admin/controller/PublicController.php @@ -98,8 +98,4 @@ public function captcha() return json($result); } - - public function test(){ - echo amount_format(3.199); - } } \ No newline at end of file diff --git a/10.3.4/app/admin/controller/ServerController.php b/10.3.5/app/admin/controller/ServerController.php similarity index 100% rename from 10.3.4/app/admin/controller/ServerController.php rename to 10.3.5/app/admin/controller/ServerController.php diff --git a/10.3.4/app/admin/controller/ServerGroupController.php b/10.3.5/app/admin/controller/ServerGroupController.php similarity index 100% rename from 10.3.4/app/admin/controller/ServerGroupController.php rename to 10.3.5/app/admin/controller/ServerGroupController.php diff --git a/10.3.4/app/admin/controller/SupplierController.php b/10.3.5/app/admin/controller/SupplierController.php similarity index 100% rename from 10.3.4/app/admin/controller/SupplierController.php rename to 10.3.5/app/admin/controller/SupplierController.php diff --git a/10.3.4/app/admin/controller/TaskController.php b/10.3.5/app/admin/controller/TaskController.php similarity index 100% rename from 10.3.4/app/admin/controller/TaskController.php rename to 10.3.5/app/admin/controller/TaskController.php diff --git a/10.3.4/app/admin/controller/TransactionController.php b/10.3.5/app/admin/controller/TransactionController.php similarity index 100% rename from 10.3.4/app/admin/controller/TransactionController.php rename to 10.3.5/app/admin/controller/TransactionController.php diff --git a/10.3.4/app/admin/controller/UpgradeSystemController.php b/10.3.5/app/admin/controller/UpgradeSystemController.php similarity index 73% rename from 10.3.4/app/admin/controller/UpgradeSystemController.php rename to 10.3.5/app/admin/controller/UpgradeSystemController.php index f8bc117e..3ff41adf 100644 --- a/10.3.4/app/admin/controller/UpgradeSystemController.php +++ b/10.3.5/app/admin/controller/UpgradeSystemController.php @@ -84,4 +84,40 @@ public function upgradeDownloadProgress() $result = $UpgradeSystemLogic->getUpgradeDownloadProgress(); return json($result); } + + /** + * 时间 2023-10-13 + * @title 获取授权信息 + * @desc 获取授权信息 + * @author theworld + * @version v1 + * @url /admin/v1/system/auth + * @method GET + */ + public function getAuth() + { + $UpgradeSystemLogic = new UpgradeSystemLogic(); + $result = $UpgradeSystemLogic->getAuth(); + return json($result); + } + + /** + * 时间 2023-10-13 + * @title 更换授权码 + * @desc 更换授权码 + * @author theworld + * @version v1 + * @url /admin/v1/system/license + * @method PUT + * @param string license - 授权码 required + */ + public function updateLicense() + { + // 接收参数 + $param = $this->request->param(); + + $UpgradeSystemLogic = new UpgradeSystemLogic(); + $result = $UpgradeSystemLogic->updateLicense($param); + return json($result); + } } \ No newline at end of file diff --git a/10.3.4/app/admin/controller/UpstreamHostController.php b/10.3.5/app/admin/controller/UpstreamHostController.php similarity index 100% rename from 10.3.4/app/admin/controller/UpstreamHostController.php rename to 10.3.5/app/admin/controller/UpstreamHostController.php diff --git a/10.3.4/app/admin/controller/UpstreamOrderController.php b/10.3.5/app/admin/controller/UpstreamOrderController.php similarity index 100% rename from 10.3.4/app/admin/controller/UpstreamOrderController.php rename to 10.3.5/app/admin/controller/UpstreamOrderController.php diff --git a/10.3.4/app/admin/controller/UpstreamProductController.php b/10.3.5/app/admin/controller/UpstreamProductController.php similarity index 100% rename from 10.3.4/app/admin/controller/UpstreamProductController.php rename to 10.3.5/app/admin/controller/UpstreamProductController.php diff --git a/10.3.4/app/admin/controller/ViewController.php b/10.3.5/app/admin/controller/ViewController.php similarity index 100% rename from 10.3.4/app/admin/controller/ViewController.php rename to 10.3.5/app/admin/controller/ViewController.php diff --git a/10.3.4/app/admin/controller/WidgetController.php b/10.3.5/app/admin/controller/WidgetController.php similarity index 100% rename from 10.3.4/app/admin/controller/WidgetController.php rename to 10.3.5/app/admin/controller/WidgetController.php diff --git a/10.3.4/app/admin/model/AdminLoginModel.php b/10.3.5/app/admin/model/AdminLoginModel.php similarity index 100% rename from 10.3.4/app/admin/model/AdminLoginModel.php rename to 10.3.5/app/admin/model/AdminLoginModel.php diff --git a/10.3.4/app/admin/model/AdminModel.php b/10.3.5/app/admin/model/AdminModel.php similarity index 99% rename from 10.3.4/app/admin/model/AdminModel.php rename to 10.3.5/app/admin/model/AdminModel.php index aad4024a..0f2da834 100644 --- a/10.3.4/app/admin/model/AdminModel.php +++ b/10.3.5/app/admin/model/AdminModel.php @@ -169,7 +169,7 @@ public function createAdmin($param) active_log(lang('log_create_admin',['{admin}'=>'admin#'.get_admin_id().'#'.request()->admin_name.'#','{name}'=>$param['name']]),'admin',$admin->id); add_task([ 'type' => 'email', - 'description' => '超级管理员添加后台管理员,发送邮件', + 'description' => lang('superadmin_add_admin_send_mail'), 'task_data' => [ 'name'=>'admin_create_account',//发送动作名称 'email'=>$param['email'], @@ -255,10 +255,10 @@ public function updateAdmin($param) $description .= lang('log_update_admin_description',['{field}'=>lang('admin_role_id'),'{content}'=>$param['role_id']]); } if(isset($param['phone_code']) && $admin['phone_code'] != $param['phone_code']){ - $description .= lang('log_update_admin_description',['{field}'=>'国际电话区号','{content}'=>$param['phone_code']]); + $description .= lang('log_update_admin_description',['{field}'=>lang('client_phone_code'),'{content}'=>$param['phone_code']]); } if(isset($param['phone']) && $admin['phone'] != $param['phone']){ - $description .= lang('log_update_admin_description',['{field}'=>'手机号','{content}'=>$param['phone']]); + $description .= lang('log_update_admin_description',['{field}'=>lang('client_phone'),'{content}'=>$param['phone']]); } $this->startTrans(); diff --git a/10.3.4/app/admin/model/AdminRoleLinkModel.php b/10.3.5/app/admin/model/AdminRoleLinkModel.php similarity index 100% rename from 10.3.4/app/admin/model/AdminRoleLinkModel.php rename to 10.3.5/app/admin/model/AdminRoleLinkModel.php diff --git a/10.3.4/app/admin/model/AdminRoleModel.php b/10.3.5/app/admin/model/AdminRoleModel.php similarity index 100% rename from 10.3.4/app/admin/model/AdminRoleModel.php rename to 10.3.5/app/admin/model/AdminRoleModel.php diff --git a/10.3.4/app/admin/model/AdminRoleWidgetModel.php b/10.3.5/app/admin/model/AdminRoleWidgetModel.php similarity index 100% rename from 10.3.4/app/admin/model/AdminRoleWidgetModel.php rename to 10.3.5/app/admin/model/AdminRoleWidgetModel.php diff --git a/10.3.4/app/admin/model/AdminWidgetModel.php b/10.3.5/app/admin/model/AdminWidgetModel.php similarity index 100% rename from 10.3.4/app/admin/model/AdminWidgetModel.php rename to 10.3.5/app/admin/model/AdminWidgetModel.php diff --git a/10.3.4/app/admin/model/AuthLinkModel.php b/10.3.5/app/admin/model/AuthLinkModel.php similarity index 100% rename from 10.3.4/app/admin/model/AuthLinkModel.php rename to 10.3.5/app/admin/model/AuthLinkModel.php diff --git a/10.3.4/app/admin/model/AuthModel.php b/10.3.5/app/admin/model/AuthModel.php similarity index 100% rename from 10.3.4/app/admin/model/AuthModel.php rename to 10.3.5/app/admin/model/AuthModel.php diff --git a/10.3.4/app/admin/model/AuthRuleLinkModel.php b/10.3.5/app/admin/model/AuthRuleLinkModel.php similarity index 100% rename from 10.3.4/app/admin/model/AuthRuleLinkModel.php rename to 10.3.5/app/admin/model/AuthRuleLinkModel.php diff --git a/10.3.4/app/admin/model/AuthRuleModel.php b/10.3.5/app/admin/model/AuthRuleModel.php similarity index 100% rename from 10.3.4/app/admin/model/AuthRuleModel.php rename to 10.3.5/app/admin/model/AuthRuleModel.php diff --git a/10.3.4/app/admin/model/EmailLogModel.php b/10.3.5/app/admin/model/EmailLogModel.php similarity index 100% rename from 10.3.4/app/admin/model/EmailLogModel.php rename to 10.3.5/app/admin/model/EmailLogModel.php diff --git a/10.3.4/app/admin/model/PluginHookModel.php b/10.3.5/app/admin/model/PluginHookModel.php similarity index 100% rename from 10.3.4/app/admin/model/PluginHookModel.php rename to 10.3.5/app/admin/model/PluginHookModel.php diff --git a/10.3.4/app/admin/model/PluginModel.php b/10.3.5/app/admin/model/PluginModel.php similarity index 100% rename from 10.3.4/app/admin/model/PluginModel.php rename to 10.3.5/app/admin/model/PluginModel.php diff --git a/10.3.4/app/admin/model/SmsLogModel.php b/10.3.5/app/admin/model/SmsLogModel.php similarity index 100% rename from 10.3.4/app/admin/model/SmsLogModel.php rename to 10.3.5/app/admin/model/SmsLogModel.php diff --git a/10.3.4/app/admin/validate/AdminRoleValidate.php b/10.3.5/app/admin/validate/AdminRoleValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/AdminRoleValidate.php rename to 10.3.5/app/admin/validate/AdminRoleValidate.php diff --git a/10.3.4/app/admin/validate/AdminValidate.php b/10.3.5/app/admin/validate/AdminValidate.php similarity index 92% rename from 10.3.4/app/admin/validate/AdminValidate.php rename to 10.3.5/app/admin/validate/AdminValidate.php index 496eb5b3..e88dca50 100644 --- a/10.3.4/app/admin/validate/AdminValidate.php +++ b/10.3.5/app/admin/validate/AdminValidate.php @@ -40,9 +40,9 @@ class AdminValidate extends Validate 'email.email' => 'please_enter_vaild_email', 'email.unique' => 'admin_email_unique', 'remember_password.in' => 'remember_password_value_0_or_1', - 'phone_code.number' => '国际电话区号格式错误', - 'phone.max' => '手机号格式错误', - 'phone.number' => '手机号格式错误', + 'phone_code.number' => 'phone_code_error', + 'phone.max' => 'phone_error', + 'phone.number' => 'phone_error', ]; protected $scene = [ diff --git a/10.3.4/app/admin/validate/ClientCreditValidate.php b/10.3.5/app/admin/validate/ClientCreditValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/ClientCreditValidate.php rename to 10.3.5/app/admin/validate/ClientCreditValidate.php diff --git a/10.3.4/app/admin/validate/ClientRecordValidate.php b/10.3.5/app/admin/validate/ClientRecordValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/ClientRecordValidate.php rename to 10.3.5/app/admin/validate/ClientRecordValidate.php diff --git a/10.3.4/app/admin/validate/ClientValidate.php b/10.3.5/app/admin/validate/ClientValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/ClientValidate.php rename to 10.3.5/app/admin/validate/ClientValidate.php diff --git a/10.3.4/app/admin/validate/ConfigurationValidate.php b/10.3.5/app/admin/validate/ConfigurationValidate.php similarity index 87% rename from 10.3.4/app/admin/validate/ConfigurationValidate.php rename to 10.3.5/app/admin/validate/ConfigurationValidate.php index fc191a84..2ebd348a 100644 --- a/10.3.4/app/admin/validate/ConfigurationValidate.php +++ b/10.3.5/app/admin/validate/ConfigurationValidate.php @@ -71,6 +71,7 @@ class ConfigurationValidate extends Validate # 主题设置 'admin_theme' => 'require', 'clientarea_theme' => 'require', + 'web_switch' => 'require|in:0,1', 'web_theme' => 'require', # 实名设置 @@ -83,19 +84,18 @@ class ConfigurationValidate extends Validate 'certification_uncertified_suspended_host' => 'require|in:0,1', # 实名设置 - 'put_on_record' => 'require|max:255', - 'enterprise_name' => 'require|max:255', - 'enterprise_telephone' => 'require|max:50', - 'enterprise_mailbox' => 'require|max:255', - 'enterprise_qrcode' => 'require', - 'online_customer_service_link' => 'require', - 'icp_info' => 'require|max:255', - 'icp_info_link' => 'require|max:255|url', - 'public_security_network_preparation' => 'require|max:255', - 'public_security_network_preparation_link' => 'require|max:255|url', - 'telecom_appreciation' => 'require|max:255', - 'copyright_info' => 'require|max:255', - 'official_website_logo' => 'require', + 'enterprise_name' => 'max:255', + 'enterprise_telephone' => 'max:50', + 'enterprise_mailbox' => 'max:255', + //'enterprise_qrcode' => 'require', + //'online_customer_service_link' => 'require', + 'icp_info' => 'max:255', + 'icp_info_link' => 'max:255|url', + 'public_security_network_preparation' => 'max:255', + 'public_security_network_preparation_link' => 'max:255|url', + 'telecom_appreciation' => 'max:255', + 'copyright_info' => 'max:255', + //'official_website_logo' => 'require', ]; protected $message = [ @@ -196,6 +196,8 @@ class ConfigurationValidate extends Validate # 主题设置 'admin_theme.require' => 'configuration_theme_admin_theme_cannot_empty', 'clientarea_theme.require' => 'configuration_theme_clientarea_theme_cannot_empty', + 'web_switch.require' => 'param_error', + 'web_switch.in' => 'param_error', 'web_theme.require' => 'configuration_theme_web_theme_cannot_empty', # 实名设置 @@ -208,35 +210,33 @@ class ConfigurationValidate extends Validate 'certification_uncertified_suspended_host.require' => 'configuration_certification_uncertified_suspended_host_require', # 信息设置 - 'put_on_record.require' => 'put_on_record_require', - 'put_on_record.max' => 'put_on_record_max', - 'enterprise_name.require' => 'enterprise_name_require', + //'enterprise_name.require' => 'enterprise_name_require', 'enterprise_name.max' => 'enterprise_name_max', - 'enterprise_telephone.require' => 'enterprise_telephone_require', + //'enterprise_telephone.require' => 'enterprise_telephone_require', 'enterprise_telephone.max' => 'enterprise_telephone_max', - 'enterprise_mailbox.require' => 'enterprise_mailbox_require', + //'enterprise_mailbox.require' => 'enterprise_mailbox_require', 'enterprise_mailbox.max' => 'enterprise_mailbox_max', - 'enterprise_qrcode.require' => 'enterprise_qrcode_require', - 'online_customer_service_link.require' => 'online_customer_service_link_require', - 'icp_info.require' => 'icp_info_require', + //'enterprise_qrcode.require' => 'enterprise_qrcode_require', + //'online_customer_service_link.require' => 'online_customer_service_link_require', + //'icp_info.require' => 'icp_info_require', 'icp_info.max' => 'icp_info_max', - 'icp_info_link.require' => 'icp_info_link_require', + //'icp_info_link.require' => 'icp_info_link_require', 'icp_info_link.max' => 'icp_info_link_max', 'icp_info_link.url' => 'icp_info_link_error', - 'public_security_network_preparation.require' => 'public_security_network_preparation_require', + //'public_security_network_preparation.require' => 'public_security_network_preparation_require', 'public_security_network_preparation.max' => 'public_security_network_preparation_max', - 'public_security_network_preparation_link.require' => 'public_security_network_preparation_link_require', + //'public_security_network_preparation_link.require' => 'public_security_network_preparation_link_require', 'public_security_network_preparation_link.max' => 'public_security_network_preparation_link_max', 'public_security_network_preparation_link.url' => 'public_security_network_preparation_link_error', - 'telecom_appreciation.require' => 'telecom_appreciation_require', + //'telecom_appreciation.require' => 'telecom_appreciation_require', 'telecom_appreciation.max' => 'telecom_appreciation_max', - 'copyright_info.require' => 'copyright_info_require', + //'copyright_info.require' => 'copyright_info_require', 'copyright_info.max' => 'copyright_info_max', - 'official_website_logo.require' => 'official_website_logo_require', - 'cloud_product_link.require' => 'cloud_product_link_require', + //'official_website_logo.require' => 'official_website_logo_require', + //'cloud_product_link.require' => 'cloud_product_link_require', 'cloud_product_link.max' => 'cloud_product_link_max', 'cloud_product_link.url' => 'cloud_product_link_error', - 'dcim_product_link.require' => 'dcim_product_link_require', + //'dcim_product_link.require' => 'dcim_product_link_require', 'dcim_product_link.max' => 'dcim_product_link_max', 'dcim_product_link.url' => 'dcim_product_link_error', ]; @@ -270,7 +270,7 @@ class ConfigurationValidate extends Validate 'cron_order_unpaid_delete_swhitch', 'cron_order_unpaid_delete_day', ], - 'theme_update' => ['admin_theme', 'clientarea_theme', 'web_theme'], + 'theme_update' => ['admin_theme', 'clientarea_theme', 'web_switch', 'web_theme'], 'certification_update' => [ 'certification_open', 'certification_approval', @@ -281,7 +281,6 @@ class ConfigurationValidate extends Validate 'certification_upload' ], 'info_update' => [ - 'put_on_record', 'enterprise_name', 'enterprise_telephone', 'enterprise_mailbox', diff --git a/10.3.4/app/admin/validate/FeedbackTypeValidate.php b/10.3.5/app/admin/validate/FeedbackTypeValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/FeedbackTypeValidate.php rename to 10.3.5/app/admin/validate/FeedbackTypeValidate.php diff --git a/10.3.4/app/admin/validate/FriendlyLinkValidate.php b/10.3.5/app/admin/validate/FriendlyLinkValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/FriendlyLinkValidate.php rename to 10.3.5/app/admin/validate/FriendlyLinkValidate.php diff --git a/10.3.4/app/admin/validate/HonorValidate.php b/10.3.5/app/admin/validate/HonorValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/HonorValidate.php rename to 10.3.5/app/admin/validate/HonorValidate.php diff --git a/10.3.4/app/admin/validate/HostValidate.php b/10.3.5/app/admin/validate/HostValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/HostValidate.php rename to 10.3.5/app/admin/validate/HostValidate.php diff --git a/10.3.4/app/admin/validate/MenuValidate.php b/10.3.5/app/admin/validate/MenuValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/MenuValidate.php rename to 10.3.5/app/admin/validate/MenuValidate.php diff --git a/10.3.4/app/admin/validate/NoticeEmailValidate.php b/10.3.5/app/admin/validate/NoticeEmailValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/NoticeEmailValidate.php rename to 10.3.5/app/admin/validate/NoticeEmailValidate.php diff --git a/10.3.4/app/admin/validate/NoticeSettingValidate.php b/10.3.5/app/admin/validate/NoticeSettingValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/NoticeSettingValidate.php rename to 10.3.5/app/admin/validate/NoticeSettingValidate.php diff --git a/10.3.4/app/admin/validate/NoticeSmsValidate.php b/10.3.5/app/admin/validate/NoticeSmsValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/NoticeSmsValidate.php rename to 10.3.5/app/admin/validate/NoticeSmsValidate.php diff --git a/10.3.4/app/admin/validate/OrderValidate.php b/10.3.5/app/admin/validate/OrderValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/OrderValidate.php rename to 10.3.5/app/admin/validate/OrderValidate.php diff --git a/10.3.4/app/admin/validate/PartnerValidate.php b/10.3.5/app/admin/validate/PartnerValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/PartnerValidate.php rename to 10.3.5/app/admin/validate/PartnerValidate.php diff --git a/10.3.4/app/admin/validate/ProductGroupValidate.php b/10.3.5/app/admin/validate/ProductGroupValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/ProductGroupValidate.php rename to 10.3.5/app/admin/validate/ProductGroupValidate.php diff --git a/10.3.4/app/admin/validate/ProductValidate.php b/10.3.5/app/admin/validate/ProductValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/ProductValidate.php rename to 10.3.5/app/admin/validate/ProductValidate.php diff --git a/10.3.4/app/admin/validate/ServerGroupValidate.php b/10.3.5/app/admin/validate/ServerGroupValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/ServerGroupValidate.php rename to 10.3.5/app/admin/validate/ServerGroupValidate.php diff --git a/10.3.4/app/admin/validate/ServerValidate.php b/10.3.5/app/admin/validate/ServerValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/ServerValidate.php rename to 10.3.5/app/admin/validate/ServerValidate.php diff --git a/10.3.4/app/admin/validate/SupplierValidate.php b/10.3.5/app/admin/validate/SupplierValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/SupplierValidate.php rename to 10.3.5/app/admin/validate/SupplierValidate.php diff --git a/10.3.4/app/admin/validate/TransactionValidate.php b/10.3.5/app/admin/validate/TransactionValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/TransactionValidate.php rename to 10.3.5/app/admin/validate/TransactionValidate.php diff --git a/10.3.4/app/admin/validate/UpstreamProductValidate.php b/10.3.5/app/admin/validate/UpstreamProductValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/UpstreamProductValidate.php rename to 10.3.5/app/admin/validate/UpstreamProductValidate.php diff --git a/10.3.4/app/admin/validate/WidgetValidate.php b/10.3.5/app/admin/validate/WidgetValidate.php similarity index 100% rename from 10.3.4/app/admin/validate/WidgetValidate.php rename to 10.3.5/app/admin/validate/WidgetValidate.php diff --git a/10.3.4/app/api/controller/AuthController.php b/10.3.5/app/api/controller/AuthController.php similarity index 74% rename from 10.3.4/app/api/controller/AuthController.php rename to 10.3.5/app/api/controller/AuthController.php index 9325a387..a6f78227 100644 --- a/10.3.4/app/api/controller/AuthController.php +++ b/10.3.5/app/api/controller/AuthController.php @@ -25,20 +25,20 @@ class AuthController * @param string password - 密码(api信息的token) */ public function auth() - { - $param = request()->param(); - - $validate = new \think\Validate([ - 'username' => 'require|length:4,20', - 'password' => 'require' - ]); - $validate->message([ - 'username.require' => '用户不能为空', - 'username.length' => '用户名4-20位', - 'password.require' => '密码不能为空', - ]); - if (!$validate->check($param)) { - return json(['status' => 400, 'msg' => '鉴权失败']); + { + $param = request()->param(); + + $validate = new \think\Validate([ + 'username' => 'require|length:4,20', + 'password' => 'require' + ]); + $validate->message([ + 'username.require' => lang('user_cannot_empty'), + 'username.length' => lang('username_4_20_digits'), + 'password.require' => lang('password_cannot_empty'), + ]); + if (!$validate->check($param)) { + return json(['status' => 400, 'msg' => lang('auth_failed')]); } $ClientModel = new ClientModel(); @@ -64,7 +64,7 @@ public function hostSync() $id = $param['id']; if (empty($param['signature'])){ - return json(['status'=>400,'msg'=>'签名错误']); + return json(['status'=>400,'msg'=>lang('signature_error')]); } $HostModel = new HostModel(); @@ -77,7 +77,7 @@ public function hostSync() $token = $stream_info['token']; if(empty($token)){ $result['status'] = 400; - $result['msg'] = '该产品不能使用该接口'; + $result['msg'] = lang('host_cannot_use_this_interface'); return json($result); } $param['password'] = html_entity_decode($param['password'], ENT_QUOTES); @@ -85,7 +85,7 @@ public function hostSync() $UpstreamLogic = new UpstreamLogic(); if(!$UpstreamLogic->validateSign($param, $param['signature'])){ $result['status'] = 400; - $result['msg'] = '签名验证失败'; + $result['msg'] = lang('signature_verification_failed'); return json($result); } @@ -122,26 +122,26 @@ public function hostSync() // 一开始为开通状态 if($hostStatus=="Active"){ $result['status'] = 200; - $result['msg'] = '更新成功'; + $result['msg'] = lang('sync_success'); return json($result); }else{ // 发送开通通知 if ($param['domainstatus']=='Active' && $hostStatus=='Pending'){ $host_active = (new NoticeSettingModel())->indexSetting('host_active'); - if($host_active['email_enable']==1){ + if($host_active['sms_enable']==1){ add_task([ 'type' => 'email', - 'description' => '产品开通成功,发送邮件', + 'description' => lang('host_create_success_send_mail'), 'task_data' => [ 'name'=>'host_active',//发送动作名称 'host_id'=>$id,//主机ID ], ]); } - if($host_active['sms_enable']==1){ + if($host_active['email_enable']==1){ add_task([ 'type' => 'sms', - 'description' => '产品开通成功,发送短信', + 'description' => lang('host_create_success_send_sms'), 'task_data' => [ 'name'=>'host_active',//发送动作名称 'host_id'=>$id,//主机ID @@ -156,34 +156,51 @@ public function hostSync() }elseif ($param['domainstatus']=="Pending"){ // 开通失败 $description = lang('log_module_create_account_failed', [ '{host}'=>'host#'.$host->id.'#'.$host['name'].'#', - '{reason}'=>"上游开通失败" ?? '', + '{reason}'=> lang('failed_to_open_upstream'), ]); active_log($description, 'host', $id); }else{ $result['status'] = 400; - $result['msg'] = '更新失败'; + $result['msg'] = lang('sync_failed'); return json($result); } } } if ($updateResult){ $map = [ - 'name' => '主机名', - 'status' => '主机状态', - 'due_time' => '到期时间', - 'suspend_type' => '暂停类型', - 'suspend_reason' => '暂停原因' + 'name' => lang('host_name'), + 'status' => lang('host_status'), + 'due_time' => lang('host_due_time'), + 'suspend_type' => lang('suspend_type'), + 'suspend_reason' => lang('suspend_reason'), ]; $desc = ""; foreach ($update as $k=>$v){ if (isset($host[$k]) && $host[$k]!=$v){ - $desc .= $map[$k] . "修改为:" . $v . ','; + $desc .= $map[$k] . lang('change_into') . $v . ','; } } active_log(rtrim($desc,','), 'host', $id); } $result['status'] = 200; - $result['msg'] = '更新成功'; + $result['msg'] = lang('sync_success'); return json($result); } + + public function syncDownStreamHost() + { + $param = request()->param(); + + $HostModel = new HostModel(); + + $host = $HostModel->find($param['id']??0); + + $data = $HostModel->syncDownStreamHost($host); + + return json([ + 'status'=>200, + 'msg'=>lang('sync_success'), + 'data' => $data + ]); + } } \ No newline at end of file diff --git a/10.3.5/app/api/controller/HostController.php b/10.3.5/app/api/controller/HostController.php new file mode 100644 index 00000000..d7d4bea6 --- /dev/null +++ b/10.3.5/app/api/controller/HostController.php @@ -0,0 +1,10 @@ +toArray(); $ProductModel = new ProductModel(); foreach ($groups as &$group){ - $group['products'] = $ProductModel->field("id,name,description") - ->where('product_group_id',$group['id']) - ->where('hidden',0) - ->where('agentable',1) - ->order('id','asc') + $group['products'] = $ProductModel->alias('p') + ->field("p.id,p.name,p.description,s.module,sgs.module as sgs_module") + ->withAttr("module",function ($value,$data){ + return $value??$data['sgs_module']; + }) + ->whereIn('s.module|sgs.module',['mf_dcim','mf_cloud']) + ->where('p.product_group_id',$group['id']) + ->where('p.hidden',0) + ->where('p.agentable',1) + ->leftJoin('server s','p.type=\'server\' and s.id=p.rel_id') + ->leftJoin('server_group sg','p.type=\'server_group\' and sg.id=p.rel_id') + ->leftJoin('server sgs','sgs.server_group_id=sg.id') ->select() ->toArray(); } + + $groupsFilter = []; + foreach ($groups as $item){ + if (!empty($item['products'])){ + $groupsFilter[] = $item; + } + } + return json([ 'status' => 200, 'msg' => lang('success_message'), 'data' => [ - 'products' => $groups, + 'products' => $groupsFilter, 'currency' => configuration("currency_code") ] ]); @@ -70,7 +88,7 @@ public function index() $param = request()->param(); $id = intval($param['id'] ?? 0); $ProductModel = new ProductModel(); - $product = $ProductModel->field('id,name,pay_type,price,cycle') + $product = $ProductModel->field('id,name,pay_type,price,cycle,auto_setup,description') ->where('hidden', 0) ->where('agentable', 1) ->where('id', $id) @@ -78,7 +96,18 @@ public function index() if(empty($product)){ $product = (object)[]; } - + if (!empty($product)){ + $product['cancel_control'] = 0; + if (class_exists("addon\idcsmart_refund\IdcsmartRefund")){ + $product['cancel_control'] = 1; + } + } + + $ModuleLogic = new ModuleLogic(); + $res = $ModuleLogic->getPriceCycle($id); + $product['price'] = $res['price']; + $product['cycle'] = $res['cycle']??$product['cycle']; + $result = [ 'status' => 200, 'msg' => lang('success_message'), diff --git a/10.3.4/app/command/Cron.php b/10.3.5/app/command/Cron.php similarity index 95% rename from 10.3.4/app/command/Cron.php rename to 10.3.5/app/command/Cron.php index 3e6bbc89..3117a4c2 100644 --- a/10.3.4/app/command/Cron.php +++ b/10.3.5/app/command/Cron.php @@ -145,7 +145,7 @@ public function hostDue($config){ add_task([ 'type' => 'email', - 'description' => '#host#'.$h['id'].'#第一次客户续费提醒,发送邮件', + 'description' => '#host#'.$h['id'].'#'.lang('host_renewal_first_send_mail'), 'task_data' => [ 'name'=>'host_renewal_first',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -153,7 +153,7 @@ public function hostDue($config){ ]); add_task([ 'type' => 'sms', - 'description' => '#host#'.$h['id'].'#第一次客户续费提醒,发送短信', + 'description' => '#host#'.$h['id'].'#'.lang('host_renewal_first_send_sms'), 'task_data' => [ 'name'=>'host_renewal_first',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -180,7 +180,7 @@ public function hostDue($config){ foreach($renewal_second_host as $h){ add_task([ 'type' => 'email', - 'description' => '#host#'.$h['id'].'#第二次客户续费提醒,发送邮件', + 'description' => '#host#'.$h['id'].'#'.lang('host_renewal_second_send_mail'), 'task_data' => [ 'name'=>'host_renewal_second',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -188,7 +188,7 @@ public function hostDue($config){ ]); add_task([ 'type' => 'sms', - 'description' => '#host#'.$h['id'].'#第二次客户续费提醒,发送短信', + 'description' => '#host#'.$h['id'].'#'.lang('host_renewal_second_send_sms'), 'task_data' => [ 'name'=>'host_renewal_second',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -219,7 +219,7 @@ public function hostOverdue($config){ foreach($overdue_first_host as $h){ add_task([ 'type' => 'email', - 'description' => '#host#'.$h['id'].'#逾期付款第一次,发送邮件', + 'description' => '#host#'.$h['id'].'#'.lang('host_overdue_first_send_mail'), 'task_data' => [ 'name'=>'host_overdue_first',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -227,7 +227,7 @@ public function hostOverdue($config){ ]); add_task([ 'type' => 'sms', - 'description' => '#host#'.$h['id'].'#逾期付款第一次,发送短信', + 'description' => '#host#'.$h['id'].'#'.lang('host_overdue_first_send_sms'), 'task_data' => [ 'name'=>'host_overdue_first',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -254,7 +254,7 @@ public function hostOverdue($config){ foreach($overdue_second_host as $h){ add_task([ 'type' => 'email', - 'description' => '#host#'.$h['id'].'#逾期付款第二次,发送邮件', + 'description' => '#host#'.$h['id'].'#'.lang('host_overdue_second_send_mail'), 'task_data' => [ 'name'=>'host_overdue_second',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -262,7 +262,7 @@ public function hostOverdue($config){ ]); add_task([ 'type' => 'sms', - 'description' => '#host#'.$h['id'].'#逾期付款第二次,发送短信', + 'description' => '#host#'.$h['id'].'#'.lang('host_overdue_second_send_sms'), 'task_data' => [ 'name'=>'host_overdue_second',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -289,7 +289,7 @@ public function hostOverdue($config){ foreach($overdue_third_host as $h){ add_task([ 'type' => 'email', - 'description' => '#host#'.$h['id'].'#逾期付款第三次,发送邮件', + 'description' => '#host#'.$h['id'].'#'.lang('host_overdue_third_send_mail'), 'task_data' => [ 'name'=>'host_overdue_third',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -297,7 +297,7 @@ public function hostOverdue($config){ ]); add_task([ 'type' => 'sms', - 'description' => '#host#'.$h['id'].'#逾期付款第三次,发送短信', + 'description' => '#host#'.$h['id'].'#'.lang('host_overdue_third_send_sms'), 'task_data' => [ 'name'=>'host_overdue_third',//发送动作名称 'host_id'=>$h['id'],//主机ID @@ -327,7 +327,7 @@ public function orderOverdue($config){ foreach($order as $o){ add_task([ 'type' => 'email', - 'description' => '#order'.$o['id'].'订单未付款通知,发送邮件', + 'description' => '#order'.$o['id'].lang('order_overdue_send_mail'), 'task_data' => [ 'name'=>'order_overdue',//发送动作名称 'order_id'=>$o['id'],//订单ID @@ -335,7 +335,7 @@ public function orderOverdue($config){ ]); add_task([ 'type' => 'sms', - 'description' => '#order'.$o['id'].'订单未付款通知,发送短信', + 'description' => '#order'.$o['id'].lang('order_overdue_send_sms'), 'task_data' => [ 'name'=>'order_overdue',//发送动作名称 'order_id'=>$o['id'],//订单ID @@ -388,7 +388,7 @@ public function hostModule($config){ foreach($suspend_host as $h){ add_task([ 'type' => 'host_suspend', - 'description' => '#host#'.$h['id'].'#主机暂停', + 'description' => '#host#'.$h['id'].'#'.lang('host_suspend'), 'task_data' => [ 'host_id'=>$h['id'],//主机ID ], @@ -413,7 +413,7 @@ public function hostModule($config){ foreach($terminate_host as $h){ add_task([ 'type' => 'host_terminate', - 'description' => '#host#'.$h['id'].'#主机删除', + 'description' => '#host#'.$h['id'].'#'.lang('host_delete'), 'task_data' => [ 'host_id'=>$h['id'],//主机ID ], diff --git a/10.3.4/app/command/Task.php b/10.3.5/app/command/Task.php similarity index 98% rename from 10.3.4/app/command/Task.php rename to 10.3.5/app/command/Task.php index 5c3c8986..dac5ddf4 100644 --- a/10.3.4/app/command/Task.php +++ b/10.3.5/app/command/Task.php @@ -129,7 +129,7 @@ public function host($action,$task_data){ $HostModelAction = get_class_methods($HostModel); if(in_array($action,$HostModelAction)){ if($action=='suspendAccount'){ - $send_result = $HostModel->$action(['suspend_reason'=>'产品到期暂停','id'=>$task_data['host_id']]); + $send_result = $HostModel->$action(['suspend_reason'=>lang('host_overdue_suspend'),'id'=>$task_data['host_id']]); }else if($action=='upgradeAccount'){ $send_result = $HostModel->upgradeAccount($task_data['upgrade_id']); }else{ diff --git a/10.3.4/app/common.php b/10.3.5/app/common.php similarity index 97% rename from 10.3.4/app/common.php rename to 10.3.5/app/common.php index 69009e02..33a73f5b 100644 --- a/10.3.4/app/common.php +++ b/10.3.5/app/common.php @@ -295,16 +295,15 @@ function lang_list($app = 'admin') */ function lang($name = '', $param = []) { - //$defaultLang = config('lang.default_lang'); - $defaultLang = get_system_lang(true); + $defaultLang = config('lang.default_lang'); if(!empty(get_client_id())){ - $defaultLang2 = get_client_lang(); + $defaultLang = get_client_lang(); }else{ - $defaultLang2 = get_system_lang(false); + $defaultLang = get_system_lang(true); } $langAdmin = include WEB_ROOT.'/'.DIR_ADMIN.'/language/'. $defaultLang .'.php'; - $langHome = include WEB_ROOT.'/clientarea/language/'. $defaultLang2 .'.php'; + $langHome = include WEB_ROOT.'/clientarea/language/'. $defaultLang .'.php'; $lang = array_merge($langAdmin, $langHome); if(empty($name)){ return $lang; @@ -313,7 +312,7 @@ function lang($name = '', $param = []) }else{ $language = $lang[$name]; foreach($param as $k => $v){ - $language = str_replace($k, $v, $language); + $language = str_replace($k, $v , $language); } return $language; } @@ -1536,7 +1535,7 @@ function idcsmart_api_curl($api_id,$path,$data=[],$timeout=30,$request='POST') $result = curl($apiUrl,$data,$timeout,$request,$header); if($result['http_code'] != 200){ - return ['status'=>400, 'msg'=>'网络开小差', 'content'=>$result['content']]; + return ['status'=>400, 'msg'=>lang('network_desertion'), 'content'=>$result['content']]; } $result = json_decode($result['content'], true); if(isset($result['status'])){ @@ -1555,11 +1554,11 @@ function idcsmart_api_curl($api_id,$path,$data=[],$timeout=30,$request='POST') $result = curl($apiUrl,$data,$timeout,$request,$header); if($result['http_code'] != 200){ - return ['status'=>400, 'msg'=>'网络开小差', 'content'=>$result['content']]; + return ['status'=>400, 'msg'=>lang('network_desertion'), 'content'=>$result['content']]; } $result = json_decode($result['content'], true); if(empty($result)){ - $result = ['status'=>400, 'msg'=>'网络开小差', 'content'=>$result['content']]; + $result = ['status'=>400, 'msg'=>lang('network_desertion'), 'content'=>$result['content']]; } if ($result['status']==401 || $result['status']==405){ $login = idcsmart_api_login($api_id, true); @@ -1574,12 +1573,12 @@ function idcsmart_api_curl($api_id,$path,$data=[],$timeout=30,$request='POST') $result = curl($apiUrl,$data,$timeout,$request,$header); if($result['http_code'] != 200){ - return ['status'=>400, 'msg'=>'网络开小差', 'content'=>$result['content']]; + return ['status'=>400, 'msg'=>lang('network_desertion'), 'content'=>$result['content']]; } $result = json_decode($result['content'], true); if ($result['status']==401){ $result['status']=400; - $result['msg'] = 'API账号或密码错误'; + $result['msg'] = lang('api_account_or_password_error'); } } } @@ -1652,4 +1651,18 @@ function zjmf_private_encrypt($originalData,$private_key){ $crypted .= $encryptData; } return base64_encode($crypted); +} + +// 生成签名 +function create_sign($params, $token){ + $rand_str = rand_str(6); + $params['token'] = $token; + $params['rand_str'] = $rand_str; + ksort($params, SORT_STRING); + $str = json_encode($params); + $sign = md5($str); + $sign = strtoupper($sign); + $res['signature'] = $sign; + $res['rand_str'] = $rand_str; + return $res; } \ No newline at end of file diff --git a/10.3.4/app/common/lib/IdcsmartCache.php b/10.3.5/app/common/lib/IdcsmartCache.php similarity index 100% rename from 10.3.4/app/common/lib/IdcsmartCache.php rename to 10.3.5/app/common/lib/IdcsmartCache.php diff --git a/10.3.4/app/common/lib/Loader.php b/10.3.5/app/common/lib/Loader.php similarity index 100% rename from 10.3.4/app/common/lib/Loader.php rename to 10.3.5/app/common/lib/Loader.php diff --git a/10.3.4/app/common/lib/Plugin.php b/10.3.5/app/common/lib/Plugin.php similarity index 100% rename from 10.3.4/app/common/lib/Plugin.php rename to 10.3.5/app/common/lib/Plugin.php diff --git a/10.3.4/app/common/lib/RedisPool.php b/10.3.5/app/common/lib/RedisPool.php similarity index 100% rename from 10.3.4/app/common/lib/RedisPool.php rename to 10.3.5/app/common/lib/RedisPool.php diff --git a/10.3.4/app/common/lib/Widget.php b/10.3.5/app/common/lib/Widget.php similarity index 100% rename from 10.3.4/app/common/lib/Widget.php rename to 10.3.5/app/common/lib/Widget.php diff --git a/10.3.4/app/common/logic/EmailLogic.php b/10.3.5/app/common/logic/EmailLogic.php similarity index 100% rename from 10.3.4/app/common/logic/EmailLogic.php rename to 10.3.5/app/common/logic/EmailLogic.php diff --git a/10.3.4/app/common/logic/IndexLogic.php b/10.3.5/app/common/logic/IndexLogic.php similarity index 100% rename from 10.3.4/app/common/logic/IndexLogic.php rename to 10.3.5/app/common/logic/IndexLogic.php diff --git a/10.3.4/app/common/logic/ModuleLogic.php b/10.3.5/app/common/logic/ModuleLogic.php similarity index 98% rename from 10.3.4/app/common/logic/ModuleLogic.php rename to 10.3.5/app/common/logic/ModuleLogic.php index 6a288cbf..3f34cf49 100644 --- a/10.3.4/app/common/logic/ModuleLogic.php +++ b/10.3.5/app/common/logic/ModuleLogic.php @@ -633,14 +633,14 @@ public function customAdminFunction($module, $params) // 验证模块格式是否正确 if(!$this->checkModule($module)){ $res['status'] = 400; - $res['msg'] = '模块格式错误'; + $res['msg'] = lang('module_format_error'); return json($res); } $controller = $params['controller'] ?? ''; $method = $params['method'] ?? ''; if(empty($controller) || empty($method)){ $res['status'] = 400; - $res['msg'] = '模块格式错误'; + $res['msg'] = lang('module_format_error'); return json($res); } $controller = parse_name($controller.'_controller', 1); @@ -654,12 +654,12 @@ public function customAdminFunction($module, $params) $res = call_user_func([$class, $method], $params); }else{ $res['status'] = 400; - $res['msg'] = '模块或方法不存在'; + $res['msg'] = lang('module_or_function_is_not_exist'); $res = json($res); } }else{ $res['status'] = 400; - $res['msg'] = '模块或方法不存在'; + $res['msg'] = lang('module_or_function_is_not_exist'); $res = json($res); } // if($this->importModule($module)){ @@ -672,7 +672,7 @@ public function customAdminFunction($module, $params) // } // if(empty($res)){ // $res['status'] = 400; - // $res['msg'] = '模块或方法不存在'; + // $res['msg'] = lang('module_or_function_is_not_exist'); // } return $res; } @@ -693,14 +693,14 @@ public function customClientFunction($module, $params) // 验证模块格式是否正确 if(!$this->checkModule($module)){ $res['status'] = 400; - $res['msg'] = '模块格式错误'; + $res['msg'] = lang('module_format_error'); return json($res); } $controller = $params['controller'] ?? ''; $method = $params['method'] ?? ''; if(empty($controller) || empty($method)){ $res['status'] = 400; - $res['msg'] = '模块格式错误'; + $res['msg'] = lang('module_format_error'); return json($res); } $controller = parse_name($controller.'_controller', 1); @@ -714,12 +714,12 @@ public function customClientFunction($module, $params) $res = call_user_func([$class, $method], $params); }else{ $res['status'] = 400; - $res['msg'] = '模块或方法不存在'; + $res['msg'] = lang('module_or_function_is_not_exist'); $res = json($res); } }else{ $res['status'] = 400; - $res['msg'] = '模块或方法不存在'; + $res['msg'] = lang('module_or_function_is_not_exist'); $res = json($res); } return $res; diff --git a/10.3.4/app/common/logic/ResModuleLogic.php b/10.3.5/app/common/logic/ResModuleLogic.php similarity index 99% rename from 10.3.4/app/common/logic/ResModuleLogic.php rename to 10.3.5/app/common/logic/ResModuleLogic.php index 03c08e26..e0f7ed6d 100644 --- a/10.3.4/app/common/logic/ResModuleLogic.php +++ b/10.3.5/app/common/logic/ResModuleLogic.php @@ -813,7 +813,7 @@ public function cartCalculatePrice($ProductModel, $params = [], $qty=1, $scene=" $res['data']['preview'][$k]['price'] = $v['price']; } - $description .= $v['name'].': '.$v['value'].',价格:'.$v['price']."\r\n"; + $description .= $v['name'].': '.$v['value'].','.lang('price').':'.$v['price']."\r\n"; } $res['data']['description'] = $description; $res['data']['content'] = $description; @@ -879,7 +879,7 @@ public function cartCalculatePrice($ProductModel, $params = [], $qty=1, $scene=" 'value' => $v['qty']??$v['suboption_name'], 'price' => bcmul($v['suboption_price_total']??0,$this->upstreamProduct['profit_type']==1?1:(1+$this->upstreamProduct['profit_percent']/100),2), ]; - $description .= $v['option_name'].': '.($v['qty']??$v['suboption_name']).',价格:'.(bcmul($v['suboption_price_total']??0,$this->upstreamProduct['profit_type']==1?1:(1+$this->upstreamProduct['profit_percent']/100),2))."\r\n"; + $description .= $v['option_name'].': '.($v['qty']??$v['suboption_name']).','.lang('price').':'.(bcmul($v['suboption_price_total']??0,$this->upstreamProduct['profit_type']==1?1:(1+$this->upstreamProduct['profit_percent']/100),2))."\r\n"; } $res['data']['preview'] = $preview; $res['data']['description'] = $description; @@ -911,7 +911,7 @@ public function cartCalculatePrice($ProductModel, $params = [], $qty=1, $scene=" $v['price'] = bcmul($v['price'],$this->upstreamProduct['profit_type']==1?1:(1+$this->upstreamProduct['profit_percent']/100),2); $res['data']['preview'][$k]['price'] = $v['price']; } - $description .= $v['name'].': '.$v['value'].',价格:'.$v['price']."\r\n"; + $description .= $v['name'].': '.$v['value'].','.lang('price').':'.$v['price']."\r\n"; } $res['data']['description'] = $description; $res['data']['content'] = $description; diff --git a/10.3.4/app/common/logic/SmsLogic.php b/10.3.5/app/common/logic/SmsLogic.php similarity index 100% rename from 10.3.4/app/common/logic/SmsLogic.php rename to 10.3.5/app/common/logic/SmsLogic.php diff --git a/10.3.4/app/common/logic/UpgradePluginsLogic.php b/10.3.5/app/common/logic/UpgradePluginsLogic.php similarity index 100% rename from 10.3.4/app/common/logic/UpgradePluginsLogic.php rename to 10.3.5/app/common/logic/UpgradePluginsLogic.php diff --git a/10.3.4/app/common/logic/UpgradeSystemLogic.php b/10.3.5/app/common/logic/UpgradeSystemLogic.php similarity index 94% rename from 10.3.4/app/common/logic/UpgradeSystemLogic.php rename to 10.3.5/app/common/logic/UpgradeSystemLogic.php index 0ca6dfc5..c27dd14a 100644 --- a/10.3.4/app/common/logic/UpgradeSystemLogic.php +++ b/10.3.5/app/common/logic/UpgradeSystemLogic.php @@ -212,6 +212,29 @@ public function getUpgradeDownloadProgress() return ['status'=>200, 'data'=>$data]; } + public function getAuth() + { + $res = get_idcsamrt_auth(); + if($res){ + return ['status' => 200, 'msg' => lang('get_idcsamrt_auth_success')]; + }else{ + return ['status' => 400, 'msg' => lang('get_idcsamrt_auth_failed')]; + } + } + + public function updateLicense($param) + { + $oldLicense = configuration('system_license'); + updateConfiguration('system_license', $param['license']); + $res = get_idcsamrt_auth(); + if($res){ + return ['status' => 200, 'msg' => lang('replace_idcsamrt_auth_success')]; + }else{ + updateConfiguration('system_license', $oldLicense); + return ['status' => 400, 'msg' => lang('replace_idcsamrt_auth_failed')]; + } + } + private function downloadZip($url) { $url = urldecode($url); diff --git a/10.3.4/app/common/logic/UploadLogic.php b/10.3.5/app/common/logic/UploadLogic.php similarity index 100% rename from 10.3.4/app/common/logic/UploadLogic.php rename to 10.3.5/app/common/logic/UploadLogic.php diff --git a/10.3.4/app/common/logic/UpstreamLogic.php b/10.3.5/app/common/logic/UpstreamLogic.php similarity index 100% rename from 10.3.4/app/common/logic/UpstreamLogic.php rename to 10.3.5/app/common/logic/UpstreamLogic.php diff --git a/10.3.4/app/common/logic/VerificationCodeLogic.php b/10.3.5/app/common/logic/VerificationCodeLogic.php similarity index 96% rename from 10.3.4/app/common/logic/VerificationCodeLogic.php rename to 10.3.5/app/common/logic/VerificationCodeLogic.php index e25a3bbc..288624bf 100644 --- a/10.3.4/app/common/logic/VerificationCodeLogic.php +++ b/10.3.5/app/common/logic/VerificationCodeLogic.php @@ -55,8 +55,9 @@ public function sendPhoneCode($param) if(empty($client['phone'])){ return ['status'=>400, 'msg'=>lang('user_not_bind_phone')]; } - $phone_code = $client['phone_code']; - $phone = $client['phone']; + // 20231019 增加,默认使用接口请求手机号(方便下游调取接口) + $phone_code = $param['phone_code']??$client['phone_code']; + $phone = $param['phone']??$client['phone']; }else if(in_array($param['action'], ['login'])){ $client = ClientModel::where('phone', $param['phone'])->where('phone_code', $param['phone_code'])->find(); if(empty($client)){ diff --git a/10.3.4/app/common/logic/WidgetLogic.php b/10.3.5/app/common/logic/WidgetLogic.php similarity index 100% rename from 10.3.4/app/common/logic/WidgetLogic.php rename to 10.3.5/app/common/logic/WidgetLogic.php diff --git a/10.3.4/app/common/model/ApiModel.php b/10.3.5/app/common/model/ApiModel.php similarity index 100% rename from 10.3.4/app/common/model/ApiModel.php rename to 10.3.5/app/common/model/ApiModel.php diff --git a/10.3.4/app/common/model/ClientCreditModel.php b/10.3.5/app/common/model/ClientCreditModel.php similarity index 100% rename from 10.3.4/app/common/model/ClientCreditModel.php rename to 10.3.5/app/common/model/ClientCreditModel.php diff --git a/10.3.4/app/common/model/ClientCustomFieldModel.php b/10.3.5/app/common/model/ClientCustomFieldModel.php similarity index 100% rename from 10.3.4/app/common/model/ClientCustomFieldModel.php rename to 10.3.5/app/common/model/ClientCustomFieldModel.php diff --git a/10.3.4/app/common/model/ClientLoginModel.php b/10.3.5/app/common/model/ClientLoginModel.php similarity index 100% rename from 10.3.4/app/common/model/ClientLoginModel.php rename to 10.3.5/app/common/model/ClientLoginModel.php diff --git a/10.3.4/app/common/model/ClientModel.php b/10.3.5/app/common/model/ClientModel.php similarity index 98% rename from 10.3.4/app/common/model/ClientModel.php rename to 10.3.5/app/common/model/ClientModel.php index 5acb8357..013a27bf 100644 --- a/10.3.4/app/common/model/ClientModel.php +++ b/10.3.5/app/common/model/ClientModel.php @@ -738,7 +738,7 @@ public function updateClientPhone($param) //客户更改手机发送短信添加到任务队列 add_task([ 'type' => 'sms', - 'description' => '客户更改手机成功,发送短信', + 'description' => lang('client_change_phone_send_sms'), 'task_data' => [ 'name'=>'client_change_phone',//发送动作名称 'phone_code' => $param['phone_code'], @@ -853,7 +853,7 @@ public function updateClientEmail($param) //客户更改邮箱发送邮件添加到任务队列 add_task([ 'type' => 'email', - 'description' => '客户更改邮箱成功,发送邮件', + 'description' => lang('client_change_email_send_mail'), 'task_data' => [ 'name'=>'client_change_email',//发送动作名称 'email' => $param['email'], @@ -917,7 +917,7 @@ public function updateClientPassword($param) if($client['email']){ add_task([ 'type' => 'email', - 'description' => '客户更改密码成功,发送邮件', + 'description' => lang('client_change_password_send_mail'), 'task_data' => [ 'name'=>'client_change_password',//发送动作名称 'email' => $client['email'], @@ -932,7 +932,7 @@ public function updateClientPassword($param) if($client['phone']){ add_task([ 'type' => 'sms', - 'description' => '客户更改密码成功,发送短信', + 'description' => lang('client_change_password_send_sms'), 'task_data' => [ 'name'=>'client_change_password',//发送动作名称 'phone_code' => $client['phone_code'], @@ -1212,7 +1212,7 @@ private function codeLogin($param) active_log(lang('log_client_login',['{client}'=>'client#'.$client->id.'#'.$client->username.'#']),'login',$client->id); # 特殊类型 add_task([ 'type' => 'sms', - 'description' => '手机+验证码登录成功,发送短信', + 'description' => lang('client_phone_code_login_success_send_sms'), 'task_data' => [ 'name'=>'client_login_success',//发送动作名称 'client_id'=>$client->id,//客户ID @@ -1336,7 +1336,7 @@ private function emailLogin($param) active_log(lang('log_client_login',['{client}'=>'client#'.$client->id.'#'.$client->username.'#']),'login',$client->id); add_task([ 'type' => 'email', - 'description' => '邮箱+密码登录成功,发送邮件', + 'description' => lang('client_email_password_login_success_send_mail'), 'task_data' => [ 'name'=>'client_login_success',//发送动作名称 'client_id'=>$client->id,//客户ID @@ -1430,7 +1430,7 @@ private function phoneLogin($param) active_log(lang('log_client_login',['{client}'=>'client#'.$client->id.'#'.$client->username.'#']),'login',$client->id); add_task([ 'type' => 'sms', - 'description' => '手机+密码登录成功,发送短信', + 'description' => lang('client_phone_password_login_success_send_sms'), 'task_data' => [ 'name'=>'client_login_success',//发送动作名称 'client_id'=>$client->id,//客户ID @@ -1582,7 +1582,7 @@ private function phoneRegister($param) //注册成功发送短信添加到任务队列 add_task([ 'type' => 'sms', - 'description' => '短信注册成功,发送短信', + 'description' => lang('client_sms_register_success_send_sms'), 'task_data' => [ 'name'=>'client_register_success',//发送动作名称 'phone_code' => $param['phone_code'], @@ -1690,7 +1690,7 @@ private function emailRegister($param) //注册成功发送邮件添加到任务队列 add_task([ 'type' => 'email', - 'description' => '邮件注册成功,发送邮件', + 'description' => lang('client_mail_register_success_send_mail'), 'task_data' => [ 'name'=>'client_register_success',//发送动作名称 'email' => $param['account'], @@ -1900,7 +1900,7 @@ private function phonePasswordUpdate($param) if($client['email']){ add_task([ 'type' => 'email', - 'description' => '客户更改密码成功,发送邮件', + 'description' => lang('client_change_password_send_mail'), 'task_data' => [ 'name'=>'client_change_password',//发送动作名称 'email' => $client['email'], @@ -1915,7 +1915,7 @@ private function phonePasswordUpdate($param) if($client['phone']){ add_task([ 'type' => 'sms', - 'description' => '客户更改密码成功,发送短信', + 'description' => lang('client_change_password_send_sms'), 'task_data' => [ 'name'=>'client_change_password',//发送动作名称 'phone_code' => $client['phone_code'], @@ -1981,7 +1981,7 @@ private function emailPasswordUpdate($param) if($client['email']){ add_task([ 'type' => 'email', - 'description' => '客户更改密码成功,发送邮件', + 'description' => lang('client_change_password_send_mail'), 'task_data' => [ 'name'=>'client_change_password',//发送动作名称 'email' => $client['email'], @@ -1996,7 +1996,7 @@ private function emailPasswordUpdate($param) if($client['phone']){ add_task([ 'type' => 'sms', - 'description' => '客户更改密码成功,发送短信', + 'description' => lang('client_change_password_send_sms'), 'task_data' => [ 'name'=>'client_change_password',//发送动作名称 'phone_code' => $client['phone_code'], diff --git a/10.3.4/app/common/model/ClientRecordModel.php b/10.3.5/app/common/model/ClientRecordModel.php similarity index 100% rename from 10.3.4/app/common/model/ClientRecordModel.php rename to 10.3.5/app/common/model/ClientRecordModel.php diff --git a/10.3.4/app/common/model/ConfigOptionModel.php b/10.3.5/app/common/model/ConfigOptionModel.php similarity index 100% rename from 10.3.4/app/common/model/ConfigOptionModel.php rename to 10.3.5/app/common/model/ConfigOptionModel.php diff --git a/10.3.4/app/common/model/ConfigOptionSubModel.php b/10.3.5/app/common/model/ConfigOptionSubModel.php similarity index 100% rename from 10.3.4/app/common/model/ConfigOptionSubModel.php rename to 10.3.5/app/common/model/ConfigOptionSubModel.php diff --git a/10.3.4/app/common/model/ConfigurationModel.php b/10.3.5/app/common/model/ConfigurationModel.php similarity index 99% rename from 10.3.4/app/common/model/ConfigurationModel.php rename to 10.3.5/app/common/model/ConfigurationModel.php index 3ce1e427..46d795bb 100644 --- a/10.3.4/app/common/model/ConfigurationModel.php +++ b/10.3.5/app/common/model/ConfigurationModel.php @@ -85,6 +85,7 @@ class ConfigurationModel extends Model 'theme' => [ 'admin_theme', 'clientarea_theme', + 'web_switch', 'web_theme', ], 'certification' => [ @@ -97,7 +98,6 @@ class ConfigurationModel extends Model 'certification_uncertified_suspended_host', ], 'info' => [ - 'put_on_record', 'enterprise_name', 'enterprise_telephone', 'enterprise_mailbox', @@ -785,6 +785,7 @@ public function sendUpdate($param) * @version v1 * @return string admin_theme - 后台主题 * @return string clientarea_theme - 会员中心主题 + * @return int web_switch - 官网开关0关闭1开启 * @return string web_theme - 官网主题 * @return array admin_theme_list - 后台主题列表 * @return string admin_theme_list[].name - 名称 @@ -836,6 +837,7 @@ public function themeList() * @version v1 * @param string param.admin_theme - 后台主题 required * @param string param.clientarea_theme - 会员中心主题 required + * @param int param.web_switch - 官网开关0关闭1开启 required * @param string param.web_theme - 官网主题 required * @return int status - 状态码,200成功,400失败 * @return string msg - 提示信息 @@ -940,7 +942,6 @@ public function certificationUpdate($param) * @desc 获取信息配置 * @author theworld * @version v1 - * @return string put_on_record - 备案信息 * @return string enterprise_name - 企业名称 * @return string enterprise_telephone - 企业电话 * @return string enterprise_mailbox - 企业邮箱 @@ -974,7 +975,6 @@ public function infoList() * @desc 保存信息配置 * @author theworld * @version v1 - * @param string put_on_record - 备案信息 required * @param string enterprise_name - 企业名称 required * @param string enterprise_telephone - 企业电话 required * @param string enterprise_mailbox - 企业邮箱 required diff --git a/10.3.4/app/common/model/ConsultModel.php b/10.3.5/app/common/model/ConsultModel.php similarity index 100% rename from 10.3.4/app/common/model/ConsultModel.php rename to 10.3.5/app/common/model/ConsultModel.php diff --git a/10.3.4/app/common/model/CountryModel.php b/10.3.5/app/common/model/CountryModel.php similarity index 100% rename from 10.3.4/app/common/model/CountryModel.php rename to 10.3.5/app/common/model/CountryModel.php diff --git a/10.3.4/app/common/model/EmailTemplateModel.php b/10.3.5/app/common/model/EmailTemplateModel.php similarity index 100% rename from 10.3.4/app/common/model/EmailTemplateModel.php rename to 10.3.5/app/common/model/EmailTemplateModel.php diff --git a/10.3.4/app/common/model/FeedbackModel.php b/10.3.5/app/common/model/FeedbackModel.php similarity index 100% rename from 10.3.4/app/common/model/FeedbackModel.php rename to 10.3.5/app/common/model/FeedbackModel.php diff --git a/10.3.4/app/common/model/FeedbackTypeModel.php b/10.3.5/app/common/model/FeedbackTypeModel.php similarity index 100% rename from 10.3.4/app/common/model/FeedbackTypeModel.php rename to 10.3.5/app/common/model/FeedbackTypeModel.php diff --git a/10.3.4/app/common/model/FriendlyLinkModel.php b/10.3.5/app/common/model/FriendlyLinkModel.php similarity index 100% rename from 10.3.4/app/common/model/FriendlyLinkModel.php rename to 10.3.5/app/common/model/FriendlyLinkModel.php diff --git a/10.3.4/app/common/model/HonorModel.php b/10.3.5/app/common/model/HonorModel.php similarity index 100% rename from 10.3.4/app/common/model/HonorModel.php rename to 10.3.5/app/common/model/HonorModel.php diff --git a/10.3.4/app/common/model/HostModel.php b/10.3.5/app/common/model/HostModel.php similarity index 90% rename from 10.3.4/app/common/model/HostModel.php rename to 10.3.5/app/common/model/HostModel.php index beb31755..cfd2b954 100644 --- a/10.3.4/app/common/model/HostModel.php +++ b/10.3.5/app/common/model/HostModel.php @@ -358,6 +358,16 @@ public function searchHost($keywords) // 获取当前应用 $app = app('http')->getName(); + $resultHook = hook('before_search_host', ['keywords' => $keywords]); + $resultHook = array_values(array_filter($resultHook ?? [])); + $hostIdArr = []; + foreach ($resultHook as $key => $value) { + if(isset($value['host_id']) && !empty($value['host_id']) && is_array($value['host_id'])){ + $hostIdArr = array_merge($hostIdArr, $value['host_id']); + } + } + $hostIdArr = array_unique($hostIdArr); + //全局搜索 $hosts = $this->alias('h') ->field('h.id,h.name,p.name product_name,h.client_id') @@ -373,6 +383,17 @@ public function searchHost($keywords) }) ->select() ->toArray(); + if(!empty($hostIdArr)){ + $hostIdArr = array_merge($hostIdArr, array_column($hosts, 'id')); + $hostIdArr = array_unique($hostIdArr); + $hosts = $this->alias('h') + ->field('h.id,h.name,p.name product_name,h.client_id') + ->leftjoin('product p', 'p.id=h.product_id') + ->whereIn('h.id', $hostIdArr) + ->select() + ->toArray(); + } + if($app=='home'){ foreach ($hosts as $key => $value) { unset($hosts[$key]['client_id']); @@ -539,7 +560,6 @@ public function updateHost($param) if($upstreamProduct){ // $ResModuleLogic = new ResModuleLogic($upstreamProduct); // $result = $ResModuleLogic->adminField($host); - }else{ $ModuleLogic = new ModuleLogic(); $result = $ModuleLogic->hostUpdate($this->find($host->id), $param['customfield']['module_admin_field'] ?? []); @@ -787,7 +807,7 @@ public function createAccount($id) if($host_active['email_enable']==1){ add_task([ 'type' => 'email', - 'description' => '产品开通成功,发送邮件', + 'description' => lang('host_create_success_send_mail'), 'task_data' => [ 'name'=>'host_active',//发送动作名称 'host_id'=>$id,//主机ID @@ -797,7 +817,7 @@ public function createAccount($id) if($host_active['sms_enable']==1){ add_task([ 'type' => 'sms', - 'description' => '产品开通成功,发送短信', + 'description' => lang('host_create_success_send_sms'), 'task_data' => [ 'name'=>'host_active',//发送动作名称 'host_id'=>$id,//主机ID @@ -880,7 +900,7 @@ public function suspendAccount($param) ], ['id'=>$id]); add_task([ 'type' => 'email', - 'description' => '产品暂停通知,发送邮件', + 'description' => lang('host_suspend_send_mail'), 'task_data' => [ 'name'=>'host_suspend',//发送动作名称 'host_id'=>$id,//主机ID @@ -888,7 +908,7 @@ public function suspendAccount($param) ]); add_task([ 'type' => 'sms', - 'description' => '产品暂停通知,发送短信', + 'description' => lang('host_suspend_send_sms'), 'task_data' => [ 'name'=>'host_suspend',//发送动作名称 'host_id'=>$id,//主机ID @@ -896,10 +916,10 @@ public function suspendAccount($param) ]); $suspendType = [ - 'overdue'=>'到期暂停', - 'overtraffic'=>'超流暂停', - 'certification_not_complete'=>'实名未完成', - 'other'=>'其他', + 'overdue'=>lang('suspend_type_overdue'), + 'overtraffic'=>lang('suspend_type_overtraffic'), + 'certification_not_complete'=>lang('suspend_type_certification_not_complete'), + 'other'=>lang('suspend_type_other'), ]; upstream_sync_host($id, 'module_suspend'); @@ -946,7 +966,7 @@ public function unsuspendAccount($id) return ['status'=>400, 'msg'=>lang('host_status_not_need_unsuspend')]; } if($host['suspend_type'] == 'upstream'){ - return ['status'=>400, 'msg'=>lang('不可解除上游发起的暂停')]; + return ['status'=>400, 'msg'=>lang('cannot_unsuspend_from_upstream')]; } $upstreamProduct = UpstreamProductModel::where('product_id', $host['product_id'])->find(); @@ -973,7 +993,7 @@ public function unsuspendAccount($id) if(configuration('cron_due_unsuspend_swhitch')==1){ add_task([ 'type' => 'email', - 'description' => '产品解除暂停通知,发送邮件', + 'description' => lang('host_unsuspend_send_mail'), 'task_data' => [ 'name'=>'host_unsuspend',//发送动作名称 'host_id'=>$id,//主机ID @@ -981,7 +1001,7 @@ public function unsuspendAccount($id) ]); add_task([ 'type' => 'sms', - 'description' => '产品解除暂停通知,发送短信', + 'description' => lang('host_unsuspend_send_sms'), 'task_data' => [ 'name'=>'host_unsuspend',//发送动作名称 'host_id'=>$id,//主机ID @@ -1047,7 +1067,7 @@ public function terminateAccount($id) add_task([ 'type' => 'email', - 'description' => '产品删除通知,发送邮件', + 'description' => lang('host_delete_send_mail'), 'task_data' => [ 'name'=>'host_terminate',//发送动作名称 'host_id'=>$id,//主机ID @@ -1055,7 +1075,7 @@ public function terminateAccount($id) ]); add_task([ 'type' => 'sms', - 'description' => '产品删除通知,发送短信', + 'description' => lang('host_delete_send_sms'), 'task_data' => [ 'name'=>'host_terminate',//发送动作名称 'host_id'=>$id,//主机ID @@ -1410,7 +1430,7 @@ public function upgradeAccount($id) # 发送邮件短信 add_task([ 'type' => 'email', - 'description' => '产品升降级,发送邮件', + 'description' => lang('host_upgrade_send_mail'), 'task_data' => [ 'name'=>'host_upgrad',//发送动作名称 'host_id'=>$upgrade['host_id'],//主机ID @@ -1421,7 +1441,7 @@ public function upgradeAccount($id) ]); add_task([ 'type' => 'sms', - 'description' => '产品升降级,发送短信', + 'description' => lang('host_upgrade_send_sms'), 'task_data' => [ 'name'=>'host_upgrad',//发送动作名称 'host_id'=>$upgrade['host_id'],//主机ID @@ -1614,22 +1634,36 @@ public function upstreamSyncHost($id, $action = '') if(empty($api)){ return false; } - $api['public_key'] = aes_password_decode($api['public_key']); - $data = json_encode(['action' => $action, 'host' => $host]); + // 魔方财务 + if (isset($downstreamInfo['type']) && $downstreamInfo['type']=='finance'){ - $crypto = ''; - - foreach (str_split($data, 117) as $chunk) { - - openssl_public_encrypt($chunk, $encryptData, $api['public_key']); - - $crypto .= $encryptData; - } - - $data = base64_encode($crypto); + $data = $this->syncDownStreamHost($host); + + $sign = create_sign(['id'=>$host['downstream_host_id']],$downstreamInfo['token']); + + $data = array_merge($data,$sign); + + $res = curl(rtrim($downstreamInfo['url'],'/').'/api/host/sync', $data, 30, 'POST'); + }else{ + $api['public_key'] = aes_password_decode($api['public_key']); - $res = curl(rtrim($downstreamInfo['url'],'/').'/console/v1/upstream/sync', ['host_id' => $host['downstream_host_id'], 'data' => $data], 30, 'POST'); + $data = json_encode(['action' => $action, 'host' => $host]); + + $crypto = ''; + + foreach (str_split($data, 117) as $chunk) { + + openssl_public_encrypt($chunk, $encryptData, $api['public_key']); + + $crypto .= $encryptData; + } + + $data = base64_encode($crypto); + + $res = curl(rtrim($downstreamInfo['url'],'/').'/console/v1/upstream/sync', ['host_id' => $host['downstream_host_id'], 'data' => $data], 30, 'POST'); + + } return true; } @@ -1665,5 +1699,99 @@ public function moduleField($id) return $result; } + // 同步数据至下游(魔方财务) + public function syncDownStreamHost(HostModel $host) + { + $id = $host['id']; + // 状态Unpaid未付款Pending开通中Active已开通Suspended已暂停Deleted已删除Failed开通失败Cancelled已取消 + if ($host['status']=='Unpaid' || $host['status']=='Pending'){ + $domainstatus = 'Pending'; + }elseif ($host['status']=='Suspended'){ + $domainstatus = 'Suspended'; + }elseif ($host['status']=='Deleted'){ + $domainstatus = 'Deleted'; + }elseif ($host['status']=='Failed'){ + $domainstatus = 'Failed'; + }elseif ($host['status']=='Cancelled'){ + $domainstatus = 'Cancelled'; + }elseif ($host['status']=='Active'){ + $domainstatus = 'Active'; + }else{ + $domainstatus = 'Pending'; + } + + $ProductModel = new ProductModel(); + $product = $ProductModel->where('id',$host['product_id'])->find(); + if ($product['type']=='server'){ + $ServerModel = new ServerModel(); + $server = $ServerModel->where('id',$product['rel_id'])->find(); + }else{ + $ServerGroupModel = new ServerGroupModel(); + $serverGroup = $ServerGroupModel->where('id',$product['rel_id'])->find(); + $ServerModel = new ServerModel(); + $server = $ServerModel->where('server_group_id',$serverGroup['id'])->find(); + } + if ($server['module']=="mf_cloud"){ + // TODO 这几个同步操作容易超时 + if (class_exists('server\mf_cloud\logic\CloudLogic')){ + try{ + $CloudLogic = new \server\mf_cloud\logic\CloudLogic($id); + $result = $CloudLogic->detail(); + $password = $result['data']['password']??""; + $username = $result['data']['username']??""; + $port = $result['data']['port']??""; + }catch (\Exception $e){ + + } + } + if (class_exists('server\mf_cloud\model\HostLinkModel')){ + $HostLinkModel = new \server\mf_cloud\model\HostLinkModel(); + $hostlink = $HostLinkModel->detail($id); + if (!empty($hostlink['data'])){ + $ip = $hostlink['data']['ip']??""; + $image = $hostlink['data']['image']['name']??""; + } + } + }elseif ($server['module']=="mf_dcim"){ + // TODO 这几个同步操作容易超时 + if (class_exists('server\mf_dcim\logic\CloudLogic')){ + try{ + $CloudLogic = new \server\mf_dcim\logic\CloudLogic($id); + $result = $CloudLogic->detail(); + $password = $result['data']['password']??""; + $username = $result['data']['username']??""; + $port = $result['data']['port']??""; + }catch (\Exception $e){ + + } + } + if (class_exists('server\mf_dcim\model\HostLinkModel')){ + $HostLinkModel = new \server\mf_dcim\model\HostLinkModel(); + $hostlink = $HostLinkModel->detail($id); + if (!empty($hostlink['data'])){ + $ip = $hostlink['data']['ip']??""; + $image = $hostlink['data']['image']['name']??""; + } + } + } + + $data = [ + 'id' => $host['downstream_host_id'], + 'domain' => "", + 'username' => $username??"", + 'password' => $password??"", + 'os' => $image??"", + 'os_url' => "", + 'dedicatedip' => $ip??"", + 'assignedips' => "", + 'port' => $port??"", + 'suspendreason' => $host['suspend_reason'], + 'nextduedate' => $host['due_time'], + 'domainstatus' => $domainstatus, + ]; + + return $data; + } + } diff --git a/10.3.4/app/common/model/MenuModel.php b/10.3.5/app/common/model/MenuModel.php similarity index 100% rename from 10.3.4/app/common/model/MenuModel.php rename to 10.3.5/app/common/model/MenuModel.php diff --git a/10.3.4/app/common/model/NavModel.php b/10.3.5/app/common/model/NavModel.php similarity index 100% rename from 10.3.4/app/common/model/NavModel.php rename to 10.3.5/app/common/model/NavModel.php diff --git a/10.3.4/app/common/model/NoticeSettingModel.php b/10.3.5/app/common/model/NoticeSettingModel.php similarity index 100% rename from 10.3.4/app/common/model/NoticeSettingModel.php rename to 10.3.5/app/common/model/NoticeSettingModel.php diff --git a/10.3.4/app/common/model/OrderItemModel.php b/10.3.5/app/common/model/OrderItemModel.php similarity index 100% rename from 10.3.4/app/common/model/OrderItemModel.php rename to 10.3.5/app/common/model/OrderItemModel.php diff --git a/10.3.4/app/common/model/OrderModel.php b/10.3.5/app/common/model/OrderModel.php similarity index 92% rename from 10.3.4/app/common/model/OrderModel.php rename to 10.3.5/app/common/model/OrderModel.php index b0958c48..7bfa5eef 100644 --- a/10.3.4/app/common/model/OrderModel.php +++ b/10.3.5/app/common/model/OrderModel.php @@ -126,7 +126,11 @@ public function orderList($param) $query->where('o.amount', 'like', "%{$param['amount']}%"); } if(!empty($param['gateway'])){ - $query->whereRaw('o.amount>o.credit')->where('o.gateway', $param['gateway']); + if(ucfirst($param['gateway'])=='Credit'){ + $query->whereRaw("o.credit>0 OR o.gateway='credit'"); + }else{ + $query->whereRaw('o.amount>o.credit')->where('o.gateway', $param['gateway']); + } } if(!empty($param['start_time']) && !empty($param['end_time'])){ $query->where('o.create_time', '>=', $param['start_time'])->where('o.create_time', '<=', $param['end_time']); @@ -238,7 +242,7 @@ public function orderList($param) foreach ($description as $item1){ if (count(explode('=>',$item1))==4){ $arr = explode('=>',$item1); - $itemDes = $arr[0] . ':' . $arr[1] . $arr[2] . ' 价格' . $arr[3]; + $itemDes = $arr[0] . ':' . $arr[1] . $arr[2] . ' '.lang('price').' ' . $arr[3]; $newDes = $newDes.$itemDes . "\n"; }else{ $newDes = $newDes . ' ' . $item1 . "\n"; @@ -421,7 +425,7 @@ public function indexOrder($id) foreach ($description as $item1){ if (count(explode('=>',$item1))==4){ $arr = explode('=>',$item1); - $itemDes = $arr[0] . ':' . $arr[1] . $arr[2] .' 价格' . $arr[3]; + $itemDes = $arr[0] . ':' . $arr[1] . $arr[2] .' '.lang('price').' ' . $arr[3]; $newDes = $newDes.$itemDes . "\n"; }else{ $newDes = $newDes . $item1 . "\n"; @@ -571,8 +575,8 @@ private function createNewOrder($param) } $this->startTrans(); try { - $gateway = gateway_list(); - $gateway = $gateway['list'][0]??[]; + /*$gateway = gateway_list(); + $gateway = $gateway['list'][0]??[];*/ // 创建订单 $clientId = $param['client_id']; @@ -584,8 +588,8 @@ private function createNewOrder($param) 'amount' => $amount, 'credit' => 0, 'amount_unpaid' => $amount, - 'gateway' => $gateway['name'] ?? '', - 'gateway_name' => $gateway['title'] ?? '', + //'gateway' => $gateway['name'] ?? '', + //'gateway_name' => $gateway['title'] ?? '', 'pay_time' => $amount>0 ? 0 : $time , 'create_time' => $time, 'admin_id' => get_admin_id(), @@ -671,7 +675,7 @@ private function createNewOrder($param) active_log(lang('admin_create_new_purchase_order', ['{admin}'=>request()->admin_name, '{client}'=>'client#'.$client->id.'#'.$client->username.'#', '{order}'=>'#'.$order->id]), 'order', $order->id); add_task([ 'type' => 'email', - 'description' => '订单创建,发送邮件', + 'description' => lang('order_create_send_mail'), 'task_data' => [ 'name'=>'order_create',//发送动作名称 'order_id'=>$order->id,//订单ID @@ -679,7 +683,7 @@ private function createNewOrder($param) ]); add_task([ 'type' => 'sms', - 'description' => '订单创建,发送短信', + 'description' => lang('order_create_send_sms'), 'task_data' => [ 'name'=>'order_create',//发送动作名称 'order_id'=>$order->id,//订单ID @@ -884,7 +888,13 @@ public function createUpgradeOrder($param) }else{ if($host['billing_cycle_time']>0){ if(($host['due_time']-$time)>0){ - $refund = bcdiv($host['first_payment_amount']/$host['billing_cycle_time']*($host['due_time']-$time), 1, 2); + //$refund = bcdiv($host['first_payment_amount']/$host['billing_cycle_time']*($host['due_time']-$time), 1, 2); + $hookResult = hook_one('renew_host_refund_amount',['id'=>$hostId]); + $renewRefundTotal = $hookResult[0]??0; // 总续费退款 + $renewCycleTotal = $hookResult[1]??0; // 总续费周期 + $hostBillingCycleTime = $host['due_time']-$renewCycleTotal-$host['active_time']; // 产品购买周期=(总到期时间-续费周期-开通时间) + $refund = bcdiv(bcdiv($host['first_payment_amount'],$hostBillingCycleTime,20)*($host['due_time']-$renewCycleTotal-$time), 1, 2); + $refund = bcadd($refund,$renewRefundTotal,2); }else{ $refund = $host['first_payment_amount']; } @@ -931,8 +941,8 @@ public function createUpgradeOrder($param) $param['upgrade_refund'] = $param['upgrade_refund'] ?? 1; // 是否退款,默认退款 - $gateway = gateway_list(); - $gateway = $gateway['list'][0]??[]; + /*$gateway = gateway_list(); + $gateway = $gateway['list'][0]??[];*/ // 创建订单 $order = $this->create([ @@ -943,8 +953,8 @@ public function createUpgradeOrder($param) 'credit' => 0, 'amount_unpaid' => $amount>0 ? $amount : 0, 'upgrade_refund' => $param['upgrade_refund'], - 'gateway' => $gateway['name'] ?? '', - 'gateway_name' => $gateway['title'] ?? '', + //'gateway' => $gateway['name'] ?? '', + //'gateway_name' => $gateway['title'] ?? '', 'pay_time' => $amount>0 ? 0 : $time, 'create_time' => $time, 'admin_id' => get_admin_id(), @@ -980,8 +990,8 @@ public function createUpgradeOrder($param) 'rel_id' => $upgrade->id, 'description' => $result['data']['description'], 'amount' => $amount, - 'gateway' => $gateway['name'] ?? '', - 'gateway_name' => $gateway['title'] ?? '', + //'gateway' => $gateway['name'] ?? '', + //'gateway_name' => $gateway['title'] ?? '', 'notes' => '', 'create_time' => $time, ]); @@ -1020,7 +1030,7 @@ public function createUpgradeOrder($param) $desDueTime = date('Y/m/d',$host['due_time']); } - //$des = $product['name'] . '(' .$host['name']. '),购买时长:'.$host['billing_cycle_name'] .'(' . date('Y/m/d',$host['active_time']) . '-'. $desDueTime .')'; + //$des = $product['name'] . '(' .$host['name']. '),'.lang('purchase_duration').':'.$host['billing_cycle_name'] .'(' . date('Y/m/d',$host['active_time']) . '-'. $desDueTime .')'; //$des = lang('order_description_append',['{product_name}'=>$product['name'],'{name}'=>$host['name'],'{billing_cycle_name}'=>$host['billing_cycle_name'],'{time}'=>date('Y/m/d',$host['active_time']) . '-' . $desDueTime]); $des = lang('order_description_append',['{product_name}'=>$product['name'],'{name}'=>$host['name'],'{billing_cycle_name}'=>$host['billing_cycle_name'],'{time}'=>date('Y/m/d',time()) . '-' . $desDueTime]); $newOrderItem = OrderItemModel::find($orderItem['id']); @@ -1058,7 +1068,7 @@ public function createUpgradeOrder($param) $result = update_credit([ 'type' => 'Refund', 'amount' => -$amount, - 'notes' => "升降级退款", + 'notes' => lang('upgrade_refund'), 'client_id' => $host['client_id'], 'order_id' => $order->id, 'host_id' => $host['id'] @@ -1130,8 +1140,8 @@ public function createUpgradeConfigOrder($param) $param['upgrade_refund'] = $param['upgrade_refund'] ?? 1; // 是否退款,默认退款 - $gateway = gateway_list(); - $gateway = $gateway['list'][0]??[]; + /*$gateway = gateway_list(); + $gateway = $gateway['list'][0]??[];*/ // 创建订单 $order = $this->create([ @@ -1142,8 +1152,8 @@ public function createUpgradeConfigOrder($param) 'credit' => 0, 'amount_unpaid' => $amount>0 ? $amount : 0, 'upgrade_refund' => $param['upgrade_refund'], - 'gateway' => $gateway['name'] ?? '', - 'gateway_name' => $gateway['title'] ?? '', + //'gateway' => $gateway['name'] ?? '', + //'gateway_name' => $gateway['title'] ?? '', 'pay_time' => $amount>0 ? 0 : $time, 'create_time' => $time, 'admin_id' => get_admin_id(), @@ -1179,8 +1189,8 @@ public function createUpgradeConfigOrder($param) 'rel_id' => $upgrade->id, 'description' => ($param['description'] ?? ''), 'amount' => $amount, - 'gateway' => $gateway['name'] ?? '', - 'gateway_name' => $gateway['title'] ?? '', + //'gateway' => $gateway['name'] ?? '', + //'gateway_name' => $gateway['title'] ?? '', 'notes' => '', 'create_time' => $time, ]); @@ -1192,32 +1202,65 @@ public function createUpgradeConfigOrder($param) # 金额从数据库重新获取,hook里可能会修改金额,wyh改 20220804 $amount = $this->where('id',$order->id)->value('amount'); + $discountPromo = 0; + $hookPromoCodeResults = hook('apply_promo_code',['host_id'=>$host->id,'price'=>$param['renew_price_difference'],'scene'=>'upgrade','duration'=>$host['billing_cycle_time']]); + foreach ($hookPromoCodeResults as $hookPromoCodeResult){ + if ($hookPromoCodeResult['status']==200){ + if (isset($hookPromoCodeResult['data']['loop']) && $hookPromoCodeResult['data']['loop']){ + $discountPromo = $hookPromoCodeResult['data']['discount']??0; + } + } + } + // 降级 + if ($param['renew_price_difference']<0){ // $discountPromo应该是负数 + // wyh 20231025 获取产品周期原价 + $amountBase = $amountBase1= 0; + $ModuleLogic = new ModuleLogic(); + $durationResult = $ModuleLogic->durationPrice($host); + $cycles = $durationResult['data']?:[]; + foreach ($cycles as $item2){ + $flag = $host->billing_cycle_time == $item2['duration'] || $host->billing_cycle_name==$item2['billing_cycle']; + if ($flag){ + $amountBase = $amountBase1 = $item2['price']; + break; # 只取一个值(存在开发者在模块中把周期写一样的情况) + } + } + $hookPromoCodeResultsOrgins = hook('apply_promo_code',['host_id'=>$host->id,'price'=>$amountBase1,'scene'=>'upgrade','duration'=>$host['billing_cycle_time']]); + foreach ($hookPromoCodeResultsOrgins as $hookPromoCodeResultsOrgin){ + if ($hookPromoCodeResultsOrgin['status']==200){ + if (isset($hookPromoCodeResultsOrgin['data']['loop']) && $hookPromoCodeResultsOrgin['data']['loop']){ + $amountBase = $amountBase - ($hookPromoCodeResultsOrgin['data']['discount']??0); + } + } + } + + $hookDiscountResultsOrgins = hook("client_discount_by_amount",['client_id'=>$host['client_id'],'product_id'=>$host['product_id'],'amount'=>$amountBase1]); + foreach ($hookDiscountResultsOrgins as $hookDiscountResultsOrgin){ + if ($hookDiscountResultsOrgin['status']==200){ + $amountBase = $amountBase - ($hookDiscountResultsOrgin['data']['discount']??0); + } + } + $renewPrice = $amountBase + $param['renew_price_difference']-$discountPromo; + // 若有优惠码,折扣金额这样计算! + }else{ + // 升级 + $renewPrice = $host['renew_amount'] + $param['renew_price_difference'] - $discountPromo; + } - // wyh 20230531 升降级统一处理续费金额:续费差价 = 升降级金额 - (优惠码*升降级金额) - (客户等级*升降级金额) - // 续费差价<0 - //$renewPriceDifference = bcsub($param['amount'],) - $renewPrice = $host['renew_amount']+$param['renew_price_difference']; $hookDiscountResults = hook("client_discount_by_amount",['client_id'=>$host['client_id'],'product_id'=>$host['product_id'],'amount'=>$param['renew_price_difference']]); foreach ($hookDiscountResults as $hookDiscountResult){ if ($hookDiscountResult['status']==200){ - $renewPrice = $renewPrice-($hookDiscountResult['data']['discount']??0); - } - } - $hookPromoCodeResults = hook('apply_promo_code',['host_id'=>$host->id,'price'=>$param['renew_price_difference'],'scene'=>'upgrade','duration'=>$host['billing_cycle_time']]); - foreach ($hookPromoCodeResults as $hookPromoCodeResult){ - if ($hookPromoCodeResult['status']==200){ - $renewPrice = $renewPrice-($hookPromoCodeResult['data']['discount']??0); + $discountClient = $hookDiscountResult['data']['discount']??0; + $renewPrice = $renewPrice-$discountClient; } } + $renewPrice = $renewPrice>0?$renewPrice:0; $upgrade->save([ 'renew_price' => ($host['billing_cycle']=='recurring_postpaid' || $host['billing_cycle']=='recurring_prepayment')?$renewPrice:0 ]); - - - $product = (new ProductModel())->find($host['product_id']); if (in_array($host['billing_cycle'],['onetime','free'])){ $desDueTime = '∞'; @@ -1225,7 +1268,7 @@ public function createUpgradeConfigOrder($param) $desDueTime = date('Y/m/d',$host['due_time']); } - //$des = $product['name'] . '(' .$host['name']. '),购买时长:'.$host['billing_cycle_name'] .'(' . date('Y/m/d',$host['active_time']) . '-'. $desDueTime .')'; + //$des = $product['name'] . '(' .$host['name']. '),'.lang('purchase_duration').':'.$host['billing_cycle_name'] .'(' . date('Y/m/d',$host['active_time']) . '-'. $desDueTime .')'; //$des = lang('order_description_append',['{product_name}'=>$product['name'],'{name}'=>$host['name'],'{billing_cycle_name}'=>$host['billing_cycle_name'],'{time}'=>date('Y/m/d',$host['active_time']) . '-' . $desDueTime]); $des = lang('order_description_append',['{product_name}'=>$product['name'],'{name}'=>$host['name'],'{billing_cycle_name}'=>$host['billing_cycle_name'],'{time}'=>date('Y/m/d',time()) . '-' . $desDueTime]); $newOrderItem = OrderItemModel::find($orderItem['id']); @@ -1250,7 +1293,7 @@ public function createUpgradeConfigOrder($param) $result = update_credit([ 'type' => 'Refund', 'amount' => -$amount, - 'notes' => "升降级退款", + 'notes' => lang('upgrade_refund'), 'client_id' => $host['client_id'], 'order_id' => $order->id, 'host_id' => $host['id'] @@ -1332,10 +1375,10 @@ public function createOrderBase($param) if(!empty($gateway)){ $gateway['config'] = json_decode($gateway['config'],true); $gateway['title'] = (isset($gateway['config']['module_name']) && !empty($gateway['config']['module_name']))?$gateway['config']['module_name']:$gateway['title']; - }else{ + }/*else{ $gateway = gateway_list(); $gateway = $gateway['list'][0]??[]; - } + }*/ // 新建订单 @@ -1440,7 +1483,7 @@ public function updateAmount($param) active_log(lang('admin_adjust_user_order_price', ['{admin}'=>request()->admin_name, '{client}'=>$clientName, '{order}'=>'#'.$order->id, '{old}'=>$order->amount, '{new}'=>($order['amount_unpaid'] + $order['credit'])]), 'order', $order->id); add_task([ 'type' => 'email', - 'description' => '后台管理员调整订单价格,发送邮件', + 'description' => lang('admin_order_amount_send_mail'), 'task_data' => [ 'name'=>'admin_order_amount',//发送动作名称 'order_id'=>$param['id'],//订单ID @@ -1448,7 +1491,7 @@ public function updateAmount($param) ]); add_task([ 'type' => 'sms', - 'description' => '后台管理员调整订单价格,发送短信', + 'description' => lang('admin_order_amount_send_sms'), 'task_data' => [ 'name'=>'admin_order_amount',//发送动作名称 'order_id'=>$param['id'],//订单ID @@ -1531,7 +1574,7 @@ public function updateOrderItem($param) active_log(lang('admin_adjust_user_order_price', ['{admin}'=>request()->admin_name, '{client}'=>$clientName, '{order}'=>'#'.$order->id, '{old}'=>$order->amount, '{new}'=>($order['amount_unpaid'] + $order['credit'])]), 'order', $order->id); add_task([ 'type' => 'email', - 'description' => '后台管理员调整订单价格,发送邮件', + 'description' => lang('admin_order_amount_send_mail'), 'task_data' => [ 'name'=>'admin_order_amount',//发送动作名称 'order_id'=>$order['id'],//订单ID @@ -1539,7 +1582,7 @@ public function updateOrderItem($param) ]); add_task([ 'type' => 'sms', - 'description' => '后台管理员调整订单价格,发送短信', + 'description' => lang('admin_order_amount_send_sms'), 'task_data' => [ 'name'=>'admin_order_amount',//发送动作名称 'order_id'=>$order['id'],//订单ID @@ -1611,7 +1654,7 @@ public function deleteOrderItem($id) active_log(lang('admin_adjust_user_order_price', ['{admin}'=>request()->admin_name, '{client}'=>$clientName, '{order}'=>'#'.$order->id, '{old}'=>$order->amount, '{new}'=>($order['amount_unpaid'] + $order['credit'])]), 'order', $order->id); add_task([ 'type' => 'email', - 'description' => '后台管理员调整订单价格,发送邮件', + 'description' => lang('admin_order_amount_send_mail'), 'task_data' => [ 'name'=>'admin_order_amount',//发送动作名称 'order_id'=>$order['id'],//订单ID @@ -1619,7 +1662,7 @@ public function deleteOrderItem($id) ]); add_task([ 'type' => 'sms', - 'description' => '后台管理员调整订单价格,发送短信', + 'description' => lang('admin_order_amount_send_sms'), 'task_data' => [ 'name'=>'admin_order_amount',//发送动作名称 'order_id'=>$order['id'],//订单ID @@ -1670,7 +1713,7 @@ public function orderPaid($param) update_credit([ 'type' => 'Applied', 'amount' => -$order['amount_unpaid'], - 'notes' => "应用余额至订单#{$param['id']}", + 'notes' => lang('order_apply_credit')."#{$param['id']}", 'client_id' => $order->client_id, 'order_id' => $param['id'], 'host_id' => 0, @@ -1682,7 +1725,7 @@ public function orderPaid($param) update_credit([ 'type' => 'Applied', 'amount' => -$client['credit'], - 'notes' => "应用余额至订单#{$param['id']}", + 'notes' => lang('order_apply_credit')."#{$param['id']}", 'client_id' => $order->client_id, 'order_id' => $param['id'], 'host_id' => 0, @@ -1707,7 +1750,7 @@ public function orderPaid($param) $res = update_credit([ 'type' => 'Applied', 'amount' => -$order['credit'], - 'notes' => "应用余额至订单#{$param['id']}", + 'notes' => lang('order_apply_credit')."#{$param['id']}", 'client_id' => $order->client_id, 'order_id' => $param['id'], 'host_id' => 0, @@ -2062,7 +2105,7 @@ public function orderRefund($param) update_credit([ 'type' => 'Refund', 'amount' => $param['amount'], - 'notes' => "订单#{$id}退款", + 'notes' => lang('order_refund', ['{id}' => $id]), 'client_id' => $order['client_id'], 'order_id' => $id, 'host_id' => 0 @@ -2152,6 +2195,8 @@ public function orderApplyCredit($param) } $amount = $order['amount']-$order['credit']-$amount; + + $amount = amount_format($amount); if($param['amount']>$amount){ throw new \Exception(lang('apply_credit_not_enough')); } @@ -2175,7 +2220,7 @@ public function orderApplyCredit($param) $res = update_credit([ 'type' => 'Applied', 'amount' => -($order['credit']+$param['amount']), - 'notes' => "订单#{$id}使用余额", + 'notes' => lang('order_apply_credit')."#{$id}", 'client_id' => $order['client_id'], 'order_id' => $id, 'host_id' => 0, @@ -2197,7 +2242,7 @@ public function orderApplyCredit($param) $res = update_credit([ 'type' => 'Applied', 'amount' => -$param['amount'], - 'notes' => "订单#{$id}使用余额", + 'notes' => lang('order_apply_credit')."#{$id}", 'client_id' => $order['client_id'], 'order_id' => $id, 'host_id' => 0, @@ -2255,17 +2300,16 @@ public function orderRemoveCredit($param) throw new \Exception(lang('remove_credit_not_enough')); } - - if(in_array($order['status'], ['Paid', 'Refunded'])){ $this->update([ 'credit' => $order['credit']-$param['amount'], 'status' => 'Refunded', ], ['id' => $id]); + update_credit([ 'type' => 'Refund', 'amount' => $param['amount'], - 'notes' => "订单#{$id}移除余额", + 'notes' => lang('order_remove_credit', ['{id}' => $id]), 'client_id' => $order['client_id'], 'order_id' => $id, 'host_id' => 0, @@ -2462,7 +2506,7 @@ public function processPaidOrder($id) if(isset($orderItems[0]['type']) && $orderItems[0]['type'] == 'recharge'){ add_task([ 'type' => 'email', - 'description' => '客户充值成功,发送邮件', + 'description' => lang('order_recharge_send_mail'), 'task_data' => [ 'name'=>'order_recharge',//发送动作名称 'order_id'=>$id,//订单ID @@ -2470,7 +2514,7 @@ public function processPaidOrder($id) ]); add_task([ 'type' => 'sms', - 'description' => '客户充值成功,发送短信', + 'description' => lang('order_recharge_send_sms'), 'task_data' => [ 'name'=>'order_recharge',//发送动作名称 'order_id'=>$id,//订单ID @@ -2479,7 +2523,7 @@ public function processPaidOrder($id) }else{ add_task([ 'type' => 'email', - 'description' => '客户支付成功,发送邮件', + 'description' => lang('order_pay_send_mail'), 'task_data' => [ 'name'=>'order_pay',//发送动作名称 'order_id'=>$id,//订单ID @@ -2487,7 +2531,7 @@ public function processPaidOrder($id) ]); add_task([ 'type' => 'sms', - 'description' => '客户支付成功,发送短信', + 'description' => lang('order_pay_send_sms'), 'task_data' => [ 'name'=>'order_pay',//发送动作名称 'order_id'=>$id,//订单ID @@ -2510,7 +2554,7 @@ public function processPaidOrder($id) update_credit([ 'type' => 'Recharge', 'amount' => $orderItem->amount, - 'notes' => "充值#{$transactionNumber}", + 'notes' => lang('recharge')."#{$transactionNumber}", 'client_id' => $orderItem->client_id, 'order_id' => $id, 'host_id' => 0 @@ -2571,7 +2615,7 @@ public function hostOrderHandle($id) }else{ $desDueTime = date('Y/m/d',$dueTime); } - $des = $host['product_name'] . '(' .$host['name']. '),购买时长:'.$host['billing_cycle_name'] .'(' . date('Y/m/d',$host['active_time']) . '-'. $desDueTime .')'; + $des = $host['product_name'] . '(' .$host['name']. '),'.lang('purchase_duration').':'.$host['billing_cycle_name'] .'(' . date('Y/m/d',$host['active_time']) . '-'. $desDueTime .')'; //$des = lang('order_description_append',['{product_name}'=>$host['product_name'],'{name}'=>$host['name'],'{billing_cycle_name}'=>$host['billing_cycle_name'] ,'{time}'=>date('Y/m/d H',$host['active_time']) . '-' . date('Y/m/d H',date('Y/m/d H',$dueTime))]); $orderItemDes = explode("\n",$orderItem['description'])??[]; if (count($orderItemDes)>=2){ @@ -2587,7 +2631,7 @@ public function hostOrderHandle($id) if ($host->status == 'Suspended'){ add_task([ 'type' => 'host_unsuspend', - 'description' => '#'.$id.'解除暂停', + 'description' => '#'.$id.lang('host_unsuspend'), 'task_data' => [ 'host_id'=>$id,//主机ID ], @@ -2609,7 +2653,7 @@ public function hostOrderHandle($id) if($host_pending['sms_enable']==1){ add_task([ 'type' => 'sms', - 'description' => '产品开通中,发送短信', + 'description' => lang('host_creating_send_sms'), 'task_data' => [ 'name'=>'host_pending',//发送动作名称 'host_id'=>$id,//主机ID @@ -2619,7 +2663,7 @@ public function hostOrderHandle($id) if($host_pending['email_enable']==1){ add_task([ 'type' => 'email', - 'description' => '产品开通中,发送邮件', + 'description' => lang('host_creating_send_mail'), 'task_data' => [ 'name'=>'host_pending',//发送动作名称 'host_id'=>$id,//主机ID @@ -2629,7 +2673,7 @@ public function hostOrderHandle($id) add_task([ 'type' => 'host_create', - 'description' => '#用户'.$host['client_id'].'#产品'.$host['id'].' — 主机创建', + 'description' => lang('client_host_create', ['{client_id}' => $host['client_id'], '{host_id}' => $host['id']]), 'task_data' => [ 'host_id'=>$id,//主机ID ], @@ -2721,7 +2765,7 @@ public function upgradeOrderHandle($id) # 添加到定时任务 add_task([ 'type' => 'host_upgrade', - 'description' => '#用户'.$upgrade['client_id'].'#产品'.$upgrade['host_id'].' — 升降级', + 'description' => lang('client_host_upgrade', ['{client_id}' => $upgrade['client_id'], '{host_id}' => $upgrade['host_id']]), 'task_data' => [ 'upgrade_id'=>$id,//upgrade ID ], @@ -2731,4 +2775,43 @@ public function upgradeOrderHandle($id) return true; } + /** + * 时间 2023-06-08 + * @title 订单列表导出EXCEL + * @desc 订单列表导出EXCEL + * @author theworld + * @version v1 + * @param string keywords - 关键字,搜索范围:订单ID + * @param string type - 类型new新订单renew续费订单upgrade升降级订单artificial人工订单 + * @param string status - 状态Unpaid未付款Paid已付款 + * @param int page - 页数 + * @param int limit - 每页条数 + * @param string orderby - 排序 id,type,create_time,amount,status + * @param string sort - 升/降序 asc,desc + */ + public function exportExcel($param){ + $data = $this->orderList($param); + $data = $data['list']; + foreach ($data as $key => $value) { + $data[$key] = [ + 'id' => $value['id'], + 'product_name' => !empty($value['product_names']) ? implode('', $value['product_names']) : '', + 'amount' => configuration('currency_prefix').$value['amount'], + 'gateway' => $value['credit']>0 ? ($value['amount']==$value['credit'] ? lang('order_credit') : (lang('order_credit').'+'.$value['gateway'])) : $value['gateway'], + 'create_time' => date("Y-m-d H:i", $value['create_time']), + 'status' => lang('order_status_'.$value['status']), + ]; + } + $field = [ + 'id' => 'ID', + 'product_name' => lang('order_product_name'), + 'amount' => lang('order_amount'), + 'gateway' => lang('order_gateway'), + 'create_time' => lang('order_create_time'), + 'status' => lang('order_status'), + ]; + + return export_excel('order'.time(), $field, $data); + } + } diff --git a/10.3.4/app/common/model/OrderTmpModel.php b/10.3.5/app/common/model/OrderTmpModel.php similarity index 96% rename from 10.3.4/app/common/model/OrderTmpModel.php rename to 10.3.5/app/common/model/OrderTmpModel.php index fdf2c115..9e9d8e49 100644 --- a/10.3.4/app/common/model/OrderTmpModel.php +++ b/10.3.5/app/common/model/OrderTmpModel.php @@ -96,7 +96,9 @@ public function pay($param) try{ $order->save([ 'gateway' => $gateway, - 'gateway_name' => $plugin['title']??'余额支付', + 'gateway_name' => $plugin['title']??lang('credit_payment'), + 'credit' => $order['amount'], + 'amount_unpaid' => 0, 'status' => 'Paid', 'pay_time' => time() ]); @@ -104,7 +106,7 @@ public function pay($param) update_credit([ 'type' => 'Applied', 'amount' => -$order->amount, - 'notes' => "应用余额至订单#{$id}", + 'notes' => lang('order_apply_credit')."#{$id}", 'client_id' => $order->client_id, 'order_id' => $id, 'host_id' => 0, @@ -114,7 +116,7 @@ public function pay($param) $OrderItemModel = new OrderItemModel(); $OrderItemModel->update([ 'gateway' => $gateway, - 'gateway_name' => $plugin['title']??'余额支付', + 'gateway_name' => $plugin['title']??lang('credit_payment'), ],['order_id'=>$order->id]); $this->commit(); @@ -548,13 +550,13 @@ public function orderPayHandle($param) $ClientModel = new ClientModel(); # 加锁,使另外一笔查询等待 $client = $ClientModel->lock(true)->find($order->client_id); - # 超付,充值至余额 - if ($amount > $order->amount_unpaid){ + # 超付,充值至余额 (20231018 因国际支付宝加了汇率计算,所以引入误差0.01) + if ($amount > $order->amount_unpaid+0.01){ # 充值进余额 update_credit([ 'type' => 'Overpayment', 'amount' => $amount, - 'notes' => "订单超付,充值至余额#{$order->id}", + 'notes' => lang('order_overpayment', ['{id}' => $order->id]), 'client_id' => $order->client_id, 'order_id' => $order->id, 'host_id' => 0, @@ -571,7 +573,7 @@ public function orderPayHandle($param) update_credit([ 'type' => 'Applied', 'amount' => -$order->amount, - 'notes' => "应用余额至订单#{$order->id}", + 'notes' => lang('order_overpayment', ['{id}' => $order->id]), 'client_id' => $order->client_id, 'order_id' => $order->id, 'host_id' => 0, @@ -595,11 +597,11 @@ public function orderPayHandle($param) $flag = true; } } - elseif($amount < $order->amount_unpaid){ # 少付,充值至余额 + elseif($amount < $order->amount_unpaid-0.01){ # 少付,充值至余额 update_credit([ 'type' => 'Underpayment', 'amount' => $amount, - 'notes' => "少付,充值至余额#{$order->id}", + 'notes' => lang('order_underpayment', ['{id}' => $order->id]), 'client_id' => $order->client_id, 'order_id' => $order->id, 'host_id' => 0, @@ -628,7 +630,7 @@ public function orderPayHandle($param) update_credit([ 'type' => 'Applied', 'amount' => -$order->credit, - 'notes' => "应用余额至订单#{$order->id}", + 'notes' => lang('order_apply_credit')."#{$order->id}", 'client_id' => $order->client_id, 'order_id' => $order->id, 'host_id' => 0, @@ -640,7 +642,7 @@ public function orderPayHandle($param) update_credit([ 'type' => 'Underpayment', 'amount' => $amount, - 'notes' => "少付,充值至余额#{$order->id}", + 'notes' => lang('order_underpayment', ['{id}' => $order->id]), 'client_id' => $order->client_id, 'order_id' => $order->id, 'host_id' => 0, diff --git a/10.3.4/app/common/model/PartnerModel.php b/10.3.5/app/common/model/PartnerModel.php similarity index 100% rename from 10.3.4/app/common/model/PartnerModel.php rename to 10.3.5/app/common/model/PartnerModel.php diff --git a/10.3.5/app/common/model/ProductDurationRatioModel.php b/10.3.5/app/common/model/ProductDurationRatioModel.php new file mode 100644 index 00000000..14a7fac5 --- /dev/null +++ b/10.3.5/app/common/model/ProductDurationRatioModel.php @@ -0,0 +1,191 @@ + 'int', + 'duration_id' => 'int', + 'ratio' => 'string', + ]; + + /** + * 时间 2023-10-20 + * @title 获取周期比例 + * @desc 获取周期比例 + * @author hh + * @version v1 + * @param int product_id - 商品ID require + * @return array + */ + public function indexRatio($product_id){ + try{ + $DurationModel = Db::name($this->linkTable); + + $data = $DurationModel + ->alias('d') + ->field('d.id,d.name,d.num,d.unit,pdr.ratio') + ->leftJoin('product_duration_ratio pdr', 'd.id=pdr.duration_id AND pdr.product_id='.$product_id) + ->where('d.product_id', $product_id) + ->orderRaw('field(d.unit, "hour","day","month")') + ->order('d.num', 'asc') + ->withAttr('ratio', function($val){ + return $val ?? ''; + }) + ->group('d.id') + ->select() + ->toArray(); + }catch(\Exception $e){ + $data = []; + } + return $data; + } + + /** + * 时间 2023-10-20 + * @title 保存周期比例 + * @desc 保存周期比例 + * @author hh + * @version v1 + * @param int product_id - 商品ID require + * @param object ratio - 比例(如{"2":"1.5"},键是周期ID,值是比例) require + */ + public function saveRatio($param){ + $productId = $param['product_id'] ?? 0; + $product = ProductModel::find($productId); + if(empty($product)){ + return ['status'=>400, 'msg'=>lang('product_is_not_exist') ]; + } + $old = $this->indexRatio($productId); + + $data = []; + $detail = ''; + foreach($old as $v){ + if(isset($param['ratio'][$v['id']]) && $param['ratio'][$v['id']] > 0){ + $data[] = [ + 'product_id' => $productId, + 'duration_id' => $v['id'], + 'ratio' => $param['ratio'][$v['id']], + ]; + if($v['ratio'] != $param['ratio'][$v['id']]){ + $detail .= lang('log_product_duration_ratio_change', [ + '{name}' => $v['name'], + '{old}' => $v['ratio'] ?? lang('null'), + '{new}' => $param['ratio'][$v['id']], + ]); + } + } + } + if(empty($data) || count($old) != count($data)){ + return ['status'=>400, 'msg'=>lang('please_input_all_duration_ratio')]; + } + + $this->startTrans(); + try{ + $this->where('product_id', $param['product_id'])->delete(); + $this->insertAll($data); + + $this->commit(); + }catch(\Exception $e){ + $this->rollback(); + + $result = [ + 'status' => 400, + 'msg' => $e->getMessage(), + ]; + return $result; + } + + if(!empty($detail)){ + $description = lang('log_save_product_duration_ratio', [ + '{product}' => 'product#'.$productId.'#'.$product['name'].'#', + '{detail}' => $detail, + ]); + active_log($description, 'product', $productId); + } + + $result = [ + 'status' => 200, + 'msg' => lang('save_success'), + ]; + return $result; + } + + /** + * 时间 2023-10-20 + * @title 计算自动填充 + * @desc 计算自动填充 + * @author hh + * @version v1 + * @param int product_id - 商品ID require + * @param object price - 价格(如{"2":"1.5"},键是周期ID,值是价格) require + */ + public function autoFill($param){ + bcscale(2); + + $productId = $param['product_id'] ?? 0; + $product = ProductModel::find($productId); + if(empty($product)){ + return ['status'=>400, 'msg'=>lang('product_is_not_exist')]; + } + $data = $this->indexRatio($productId); + if(empty($data)){ + return ['status'=>400, 'msg'=>lang('please_set_duration_ratio_first')]; + } + $baseDuration = null; + + $res = []; + foreach($data as $k=>$v){ + // 最小的周期作为基准 + if(isset($param['price'][$v['id']]) && $param['price'][$v['id']] > 0){ + $baseDuration = $v; + $baseDuration['price'] = $param['price'][$v['id']]; + break; + } + } + if(is_null($baseDuration)){ + return ['status'=>400, 'msg'=>lang('please_set_at_lease_one_price')]; + } + foreach($data as $v){ + if(empty($v['ratio'])){ + return ['status'=>400, 'msg'=>lang('please_set_duration_ratio_first')]; + } + if(!isset($res[$v['id']])){ + if($v['id'] == $baseDuration['id']){ + $res[$v['id']] = amount_format($baseDuration['price']); + }else{ + $res[$v['id']] = amount_format(bcdiv(bcmul($baseDuration['price'], $v['ratio']), $baseDuration['ratio'])); + } + } + } + + $result = [ + 'status' => 200, + 'msg' => lang('success_message'), + 'data' => [ + 'list' => $res, + ], + ]; + return $result; + } + + + + + +} \ No newline at end of file diff --git a/10.3.4/app/common/model/ProductGroupModel.php b/10.3.5/app/common/model/ProductGroupModel.php similarity index 100% rename from 10.3.4/app/common/model/ProductGroupModel.php rename to 10.3.5/app/common/model/ProductGroupModel.php diff --git a/10.3.4/app/common/model/ProductModel.php b/10.3.5/app/common/model/ProductModel.php similarity index 95% rename from 10.3.4/app/common/model/ProductModel.php rename to 10.3.5/app/common/model/ProductModel.php index 2cee5533..e9870374 100644 --- a/10.3.4/app/common/model/ProductModel.php +++ b/10.3.5/app/common/model/ProductModel.php @@ -51,6 +51,8 @@ class ProductModel extends Model 'agentable' => 'int', ]; + public $isAdmin = false; + /** * 时间 2022-5-17 * @title 商品列表 @@ -1129,9 +1131,14 @@ public function moduleServerConfigOption($param){ public function moduleClientConfigOption($param){ $id = (int)$param['id']; $ProductModel = $this->find($id); - if(empty($ProductModel) || $ProductModel['hidden'] == 1){ - return ['status'=>400, 'msg'=>lang('product_is_not_exist')]; + if (isset($param['flag']) && $param['flag']){ + + }else{ + if(empty($ProductModel) || $ProductModel['hidden'] == 1){ + return ['status'=>400, 'msg'=>lang('product_is_not_exist')]; + } } + $param['tag'] = $param['tag'] ?? ''; $upstreamProduct = UpstreamProductModel::where('product_id', $ProductModel['id'])->find(); @@ -1295,8 +1302,8 @@ public function settle($param,$isAdmin=false) $this->startTrans(); try { // 创建订单 - $gateway = gateway_list(); - $gateway = $gateway['list'][0]??[]; + /*$gateway = gateway_list(); + $gateway = $gateway['list'][0]??[];*/ $time = time(); $order = OrderModel::create([ @@ -1306,8 +1313,8 @@ public function settle($param,$isAdmin=false) 'amount' => $amount, 'credit' => 0, 'amount_unpaid' => $amount, - 'gateway' => $gateway['name'] ?? '', - 'gateway_name' => $gateway['title'] ?? '', + //'gateway' => $gateway['name'] ?? '', + //'gateway_name' => $gateway['title'] ?? '', 'pay_time' => $amount>0 ? 0 : $time, 'create_time' => $time ]); @@ -1374,6 +1381,7 @@ public function settle($param,$isAdmin=false) $ResModuleLogic = new ResModuleLogic($upstreamProduct); $ResModuleLogic->afterSettle($product, $host->id, $param['config_options']); }else{ + $param['config_options']['customfield'] = $param['customfield']??[]; $ModuleLogic->afterSettle($product, $host->id, $param['config_options']); } @@ -1452,9 +1460,9 @@ public function productCalculatePrice($param) if(empty($ProductModel)){ return ['status'=>400, 'msg'=>lang('product_is_not_exist')]; } - if(app('http')->getName() == 'home' && $ProductModel['hidden'] == 1){ + /*if(app('http')->getName() == 'home' && $ProductModel['hidden'] == 1){ return ['status'=>400, 'msg'=>lang('product_is_not_exist')]; - } + }*/ $param['config_options'] = $param['config_options'] ?? []; $upstreamProduct = UpstreamProductModel::where('product_id', $ProductModel['id'])->find(); @@ -1789,5 +1797,74 @@ public function resModuleProductList($param) return ['list'=>$list]; } + public function copyProduct($param) + { + $id = intval($param['id']); + + $product = $this->find($id); + if (empty($product)){ + return ['status'=>400,'msg'=>lang('product_is_not_exist')]; + } + if (!empty($product['product_id'])){ + return ['status'=>400,'msg'=>lang('son_product_cannot_copy')]; + } + + // 双删 + idcsmart_cache('product:list',null); + + $this->startTrans(); + + try{ + + $data = $product->toArray(); + unset($data['id']); + $data['name'] = $data['name'].'(1)'; + + $product = $this->create($data); + + $sonProduct = $this->where('product_id', $id)->select()->toArray(); + $sonProductIdArr = []; + foreach ($sonProduct as $key => $value) { + $sonProductIdArr[$value['id']] = 0; + unset($value['id']); + $value['product_id'] = $product->id; + $r = $this->create($value); + $sonProductIdArr[$value['id']] = $r->id; + } + + $ProductUpgradeProductModel = new ProductUpgradeProductModel(); + $upgrade = $ProductUpgradeProductModel->where('product_id', $id)->select()->toArray(); + $upgradeIds = []; + foreach ($upgrade as $key => $value) { + $upgradeIds[] = $value['upgrade_product_id']; + } + if(!empty($upgradeIds)){ + foreach ($upgradeIds as $upgradeId){ + $insert[] = [ + 'product_id' => $product->id, + 'upgrade_product_id' => $upgradeId + ]; + } + $ProductUpgradeProductModel->saveAll($insert); + } + + + # 记录日志 + active_log(lang('log_admin_copy_product',['{admin}'=>'admin#'.get_admin_id().'#'.request()->admin_name.'#','{product}'=>'product#'.$product->id.'#'.$data['name'].'#']),'product',$product->id); + + $this->commit(); + }catch (\Exception $e){ + $this->rollback(); + return ['status'=>400,'msg'=>$e->getMessage()]; + } + + idcsmart_cache('product:list',null); + + $res = hook('after_product_copy',['id'=>$product->id, 'product_id' => $param['id'], 'son_product_id' => $sonProductIdArr, 'customfield'=>$param['customfield']??[]]); + + return ['status'=>200,'msg'=>lang('success_message')]; + + } + } diff --git a/10.3.4/app/common/model/ProductUpgradeProductModel.php b/10.3.5/app/common/model/ProductUpgradeProductModel.php similarity index 100% rename from 10.3.4/app/common/model/ProductUpgradeProductModel.php rename to 10.3.5/app/common/model/ProductUpgradeProductModel.php diff --git a/10.3.4/app/common/model/RefundRecordModel.php b/10.3.5/app/common/model/RefundRecordModel.php similarity index 98% rename from 10.3.4/app/common/model/RefundRecordModel.php rename to 10.3.5/app/common/model/RefundRecordModel.php index 3cb06e20..537f18d6 100644 --- a/10.3.4/app/common/model/RefundRecordModel.php +++ b/10.3.5/app/common/model/RefundRecordModel.php @@ -121,7 +121,7 @@ public function deleteRefundRecord($id) update_credit([ 'type' => 'Artificial', 'amount' => -$record['amount'], - 'notes' => "订单#{$record['order_id']}取消退款", + 'notes' => lang('order_cancel_refund', ['{id}' => $record['order_id']]), 'client_id' => $record['client_id'], 'order_id' => $record['order_id'], 'host_id' => 0 diff --git a/10.3.4/app/common/model/ServerGroupModel.php b/10.3.5/app/common/model/ServerGroupModel.php similarity index 100% rename from 10.3.4/app/common/model/ServerGroupModel.php rename to 10.3.5/app/common/model/ServerGroupModel.php diff --git a/10.3.4/app/common/model/ServerModel.php b/10.3.5/app/common/model/ServerModel.php similarity index 99% rename from 10.3.4/app/common/model/ServerModel.php rename to 10.3.5/app/common/model/ServerModel.php index 7bb378d9..33b04961 100644 --- a/10.3.4/app/common/model/ServerModel.php +++ b/10.3.5/app/common/model/ServerModel.php @@ -290,7 +290,7 @@ public function deleteServer($id) // 有商品通过该接口成功开通,则无法删除接口 $activeHost = HostModel::where('server_id', $id)->where('status', 'Active')->find(); if(!empty($activeHost)){ - return ['status'=>400, 'msg'=>lang('有激活产品正在使用,不能删除')]; + return ['status'=>400, 'msg'=>lang('active_host_is_used_cannot_delete')]; } // 是否还在使用 // $host = HostModel::where('server_id', $id)->find(); diff --git a/10.3.4/app/common/model/SmsTemplateModel.php b/10.3.5/app/common/model/SmsTemplateModel.php similarity index 100% rename from 10.3.4/app/common/model/SmsTemplateModel.php rename to 10.3.5/app/common/model/SmsTemplateModel.php diff --git a/10.3.4/app/common/model/SupplierModel.php b/10.3.5/app/common/model/SupplierModel.php similarity index 100% rename from 10.3.4/app/common/model/SupplierModel.php rename to 10.3.5/app/common/model/SupplierModel.php diff --git a/10.3.4/app/common/model/SystemLogModel.php b/10.3.5/app/common/model/SystemLogModel.php similarity index 100% rename from 10.3.4/app/common/model/SystemLogModel.php rename to 10.3.5/app/common/model/SystemLogModel.php diff --git a/10.3.4/app/common/model/TaskModel.php b/10.3.5/app/common/model/TaskModel.php similarity index 100% rename from 10.3.4/app/common/model/TaskModel.php rename to 10.3.5/app/common/model/TaskModel.php diff --git a/10.3.4/app/common/model/TaskWaitModel.php b/10.3.5/app/common/model/TaskWaitModel.php similarity index 100% rename from 10.3.4/app/common/model/TaskWaitModel.php rename to 10.3.5/app/common/model/TaskWaitModel.php diff --git a/10.3.4/app/common/model/TransactionModel.php b/10.3.5/app/common/model/TransactionModel.php similarity index 100% rename from 10.3.4/app/common/model/TransactionModel.php rename to 10.3.5/app/common/model/TransactionModel.php diff --git a/10.3.4/app/common/model/UpgradeModel.php b/10.3.5/app/common/model/UpgradeModel.php similarity index 100% rename from 10.3.4/app/common/model/UpgradeModel.php rename to 10.3.5/app/common/model/UpgradeModel.php diff --git a/10.3.4/app/common/model/UpstreamHostModel.php b/10.3.5/app/common/model/UpstreamHostModel.php similarity index 100% rename from 10.3.4/app/common/model/UpstreamHostModel.php rename to 10.3.5/app/common/model/UpstreamHostModel.php diff --git a/10.3.4/app/common/model/UpstreamOrderModel.php b/10.3.5/app/common/model/UpstreamOrderModel.php similarity index 100% rename from 10.3.4/app/common/model/UpstreamOrderModel.php rename to 10.3.5/app/common/model/UpstreamOrderModel.php diff --git a/10.3.4/app/common/model/UpstreamProductModel.php b/10.3.5/app/common/model/UpstreamProductModel.php similarity index 100% rename from 10.3.4/app/common/model/UpstreamProductModel.php rename to 10.3.5/app/common/model/UpstreamProductModel.php diff --git a/10.3.5/app/common/validate/ProductDurationRatioValidate.php b/10.3.5/app/common/validate/ProductDurationRatioValidate.php new file mode 100644 index 00000000..1ca74f43 --- /dev/null +++ b/10.3.5/app/common/validate/ProductDurationRatioValidate.php @@ -0,0 +1,54 @@ + 'require|integer', + 'ratio' => 'require|checkRatio:thinkphp', + 'price' => 'require|checkPrice:thinkphp', + ]; + + protected $message = [ + 'product_id.require' => 'product_id_error', + 'product_id.integer' => 'product_id_error', + 'ratio.require' => 'validate_product_duration_ratio_ratio_require', + 'price.require' => 'validate_product_duration_ratio_price_require', + ]; + + protected $scene = [ + 'save' => ['product_id','ratio'], + 'fill' => ['product_id','price'], + ]; + + protected function checkRatio($value){ + if(!is_array($value)){ + return 'param_error'; + } + foreach($value as $v){ + if(!is_numeric($v) || $v <= 0 || $v >= 10000){ + return 'validate_product_duration_ratio_ratio_format_error'; + } + } + return true; + } + + protected function checkPrice($value){ + if(!is_array($value)){ + return 'param_error'; + } + foreach($value as $v){ + if(!is_numeric($v) || $v < 0 || $v > 99999999){ + return 'validate_product_duration_ratio_price_format_error'; + } + } + return true; + } + +} \ No newline at end of file diff --git a/10.3.4/app/common/validate/UploadValidate.php b/10.3.5/app/common/validate/UploadValidate.php similarity index 100% rename from 10.3.4/app/common/validate/UploadValidate.php rename to 10.3.5/app/common/validate/UploadValidate.php diff --git a/10.3.4/app/event.php b/10.3.5/app/event.php similarity index 100% rename from 10.3.4/app/event.php rename to 10.3.5/app/event.php diff --git a/10.3.4/app/event/AppInit.php b/10.3.5/app/event/AppInit.php similarity index 100% rename from 10.3.4/app/event/AppInit.php rename to 10.3.5/app/event/AppInit.php diff --git a/10.3.4/app/event/controller/AddonController.php b/10.3.5/app/event/controller/AddonController.php similarity index 100% rename from 10.3.4/app/event/controller/AddonController.php rename to 10.3.5/app/event/controller/AddonController.php diff --git a/10.3.4/app/event/controller/AddonHomeController.php b/10.3.5/app/event/controller/AddonHomeController.php similarity index 100% rename from 10.3.4/app/event/controller/AddonHomeController.php rename to 10.3.5/app/event/controller/AddonHomeController.php diff --git a/10.3.4/app/event/controller/BaseController.php b/10.3.5/app/event/controller/BaseController.php similarity index 100% rename from 10.3.4/app/event/controller/BaseController.php rename to 10.3.5/app/event/controller/BaseController.php diff --git a/10.3.4/app/event/controller/CaptchaController.php b/10.3.5/app/event/controller/CaptchaController.php similarity index 100% rename from 10.3.4/app/event/controller/CaptchaController.php rename to 10.3.5/app/event/controller/CaptchaController.php diff --git a/10.3.4/app/event/controller/CertificationController.php b/10.3.5/app/event/controller/CertificationController.php similarity index 100% rename from 10.3.4/app/event/controller/CertificationController.php rename to 10.3.5/app/event/controller/CertificationController.php diff --git a/10.3.4/app/event/controller/CertificationHomeController.php b/10.3.5/app/event/controller/CertificationHomeController.php similarity index 100% rename from 10.3.4/app/event/controller/CertificationHomeController.php rename to 10.3.5/app/event/controller/CertificationHomeController.php diff --git a/10.3.4/app/event/controller/GatewayController.php b/10.3.5/app/event/controller/GatewayController.php similarity index 100% rename from 10.3.4/app/event/controller/GatewayController.php rename to 10.3.5/app/event/controller/GatewayController.php diff --git a/10.3.4/app/event/controller/ModuleController.php b/10.3.5/app/event/controller/ModuleController.php similarity index 100% rename from 10.3.4/app/event/controller/ModuleController.php rename to 10.3.5/app/event/controller/ModuleController.php diff --git a/10.3.4/app/event/controller/ModuleHomeController.php b/10.3.5/app/event/controller/ModuleHomeController.php similarity index 100% rename from 10.3.4/app/event/controller/ModuleHomeController.php rename to 10.3.5/app/event/controller/ModuleHomeController.php diff --git a/10.3.4/app/event/controller/PluginAdminBaseController.php b/10.3.5/app/event/controller/PluginAdminBaseController.php similarity index 100% rename from 10.3.4/app/event/controller/PluginAdminBaseController.php rename to 10.3.5/app/event/controller/PluginAdminBaseController.php diff --git a/10.3.4/app/event/controller/PluginBaseController.php b/10.3.5/app/event/controller/PluginBaseController.php similarity index 100% rename from 10.3.4/app/event/controller/PluginBaseController.php rename to 10.3.5/app/event/controller/PluginBaseController.php diff --git a/10.3.4/app/exception/TemplateNotFoundException.php b/10.3.5/app/exception/TemplateNotFoundException.php similarity index 100% rename from 10.3.4/app/exception/TemplateNotFoundException.php rename to 10.3.5/app/exception/TemplateNotFoundException.php diff --git a/10.3.4/app/home/controller/AccountController.php b/10.3.5/app/home/controller/AccountController.php similarity index 100% rename from 10.3.4/app/home/controller/AccountController.php rename to 10.3.5/app/home/controller/AccountController.php diff --git a/10.3.4/app/home/controller/ApiController.php b/10.3.5/app/home/controller/ApiController.php similarity index 100% rename from 10.3.4/app/home/controller/ApiController.php rename to 10.3.5/app/home/controller/ApiController.php diff --git a/10.3.4/app/home/controller/BaseController.php b/10.3.5/app/home/controller/BaseController.php similarity index 100% rename from 10.3.4/app/home/controller/BaseController.php rename to 10.3.5/app/home/controller/BaseController.php diff --git a/10.3.4/app/home/controller/CartController.php b/10.3.5/app/home/controller/CartController.php similarity index 100% rename from 10.3.4/app/home/controller/CartController.php rename to 10.3.5/app/home/controller/CartController.php diff --git a/10.3.4/app/home/controller/CommonController.php b/10.3.5/app/home/controller/CommonController.php similarity index 100% rename from 10.3.4/app/home/controller/CommonController.php rename to 10.3.5/app/home/controller/CommonController.php diff --git a/10.3.4/app/home/controller/HomeBaseController.php b/10.3.5/app/home/controller/HomeBaseController.php similarity index 100% rename from 10.3.4/app/home/controller/HomeBaseController.php rename to 10.3.5/app/home/controller/HomeBaseController.php diff --git a/10.3.4/app/home/controller/HooksController.php b/10.3.5/app/home/controller/HooksController.php similarity index 100% rename from 10.3.4/app/home/controller/HooksController.php rename to 10.3.5/app/home/controller/HooksController.php diff --git a/10.3.4/app/home/controller/HostController.php b/10.3.5/app/home/controller/HostController.php similarity index 100% rename from 10.3.4/app/home/controller/HostController.php rename to 10.3.5/app/home/controller/HostController.php diff --git a/10.3.4/app/home/controller/IndexController.php b/10.3.5/app/home/controller/IndexController.php similarity index 100% rename from 10.3.4/app/home/controller/IndexController.php rename to 10.3.5/app/home/controller/IndexController.php diff --git a/10.3.4/app/home/controller/LogController.php b/10.3.5/app/home/controller/LogController.php similarity index 100% rename from 10.3.4/app/home/controller/LogController.php rename to 10.3.5/app/home/controller/LogController.php diff --git a/10.3.4/app/home/controller/LoginController.php b/10.3.5/app/home/controller/LoginController.php similarity index 100% rename from 10.3.4/app/home/controller/LoginController.php rename to 10.3.5/app/home/controller/LoginController.php diff --git a/10.3.4/app/home/controller/ModuleController.php b/10.3.5/app/home/controller/ModuleController.php similarity index 100% rename from 10.3.4/app/home/controller/ModuleController.php rename to 10.3.5/app/home/controller/ModuleController.php diff --git a/10.3.4/app/home/controller/OrderController.php b/10.3.5/app/home/controller/OrderController.php similarity index 81% rename from 10.3.4/app/home/controller/OrderController.php rename to 10.3.5/app/home/controller/OrderController.php index 73985110..c012d461 100644 --- a/10.3.4/app/home/controller/OrderController.php +++ b/10.3.5/app/home/controller/OrderController.php @@ -131,4 +131,32 @@ public function delete() return json($result); } + /** + * 时间 2023-06-08 + * @title 订单列表导出EXCEL + * @desc 订单列表导出EXCEL + * @author theworld + * @version v1 + * @url /console/v1/order/export_excel + * @method GET + * @param string keywords - 关键字,搜索范围:订单ID + * @param string type - 类型new新订单renew续费订单upgrade升降级订单artificial人工订单 + * @param string status - 状态Unpaid未付款Paid已付款 + * @param int page - 页数 + * @param int limit - 每页条数 + * @param string orderby - 排序 id,type,create_time,amount,status + * @param string sort - 升/降序 asc,desc + */ + public function exportExcel() + { + // 合并分页参数 + $param = array_merge($this->request->param(), ['page' => $this->request->page, 'limit' => $this->request->limit, 'sort' => $this->request->sort]); + + // 实例化模型类 + $OrderModel = new OrderModel(); + + // 订单列表导出EXCEL + return $OrderModel->exportExcel($param); + } + } \ No newline at end of file diff --git a/10.3.4/app/home/controller/PayController.php b/10.3.5/app/home/controller/PayController.php similarity index 100% rename from 10.3.4/app/home/controller/PayController.php rename to 10.3.5/app/home/controller/PayController.php diff --git a/10.3.4/app/home/controller/ProductController.php b/10.3.5/app/home/controller/ProductController.php similarity index 98% rename from 10.3.4/app/home/controller/ProductController.php rename to 10.3.5/app/home/controller/ProductController.php index e260b5e5..4dda0ab9 100644 --- a/10.3.4/app/home/controller/ProductController.php +++ b/10.3.5/app/home/controller/ProductController.php @@ -172,6 +172,7 @@ public function settle() * @version v1 * @param int id - 商品ID required * @param string tag - 商品价格显示标识 + * @param boolean flag - true * @return string data.content - 模块输出内容 */ public function moduleClientConfigOption() @@ -227,6 +228,8 @@ public function moduleCalculatePrice() */ public function productStock() { + $param = $this->request->param(); + $result = [ 'status' => 200, 'msg' => lang('success_message'), diff --git a/10.3.4/app/home/controller/TransactionController.php b/10.3.5/app/home/controller/TransactionController.php similarity index 100% rename from 10.3.4/app/home/controller/TransactionController.php rename to 10.3.5/app/home/controller/TransactionController.php diff --git a/10.3.4/app/home/controller/UpstreamController.php b/10.3.5/app/home/controller/UpstreamController.php similarity index 100% rename from 10.3.4/app/home/controller/UpstreamController.php rename to 10.3.5/app/home/controller/UpstreamController.php diff --git a/10.3.4/app/home/controller/ViewClientController.php b/10.3.5/app/home/controller/ViewClientController.php similarity index 100% rename from 10.3.4/app/home/controller/ViewClientController.php rename to 10.3.5/app/home/controller/ViewClientController.php diff --git a/10.3.5/app/home/controller/ViewController.php b/10.3.5/app/home/controller/ViewController.php new file mode 100644 index 00000000..d173c323 --- /dev/null +++ b/10.3.5/app/home/controller/ViewController.php @@ -0,0 +1,187 @@ +request->param(); + $data = [ + 'title'=>'首页-智简魔方', + ]; + + $data['template_catalog'] = 'web'; + //$tplName = empty($param['view_html'])?'index':$param['view_html']; + + if(empty($param['html'])){ + $tplName = 'index'; + }else if(!empty($param['html3'])){ + $tplName = $param['html']."/".$param['html2']."/".$param['html3']; + }else if(!empty($param['html2'])){ + $tplName = $param['html']."/".$param['html2']; + }else{ + $tplName = $param['html']; + } + + if (isset($param['theme']) && !empty($param['theme'])){ + cookie('web_theme',$param['theme']); + $data['themes'] = $param['theme']; + } elseif (cookie('web_theme')){ + $data['themes'] = cookie('web_theme'); + } else{ + $data['themes'] = configuration('web_theme'); + } + + if($tplName=='index'){ + $view_path = '../public/web/'.$data['themes'].'/'; + //header('location:/theme/index.html');die; + //$view_path = '../public/theme/'; + }else{ + $view_path = '../public/web/'.$data['themes'].'/'; + } + + if(!file_exists($view_path.$tplName)){ + $theme_config=$this->themeConfig($view_path); + if(!empty($theme_config['config-parent-theme'])){ + $view_path = '../public/web/'.$theme_config['config-parent-theme'].'/'; + } + } + + $PluginModel = new PluginModel(); + $addons = $PluginModel->plugins('addon'); + + $data['addons'] = $addons['list']; + + $config['view_path'] = $view_path; + /*if($tplName=='index'){ + $config['view_suffix'] = 'html'; + }*/ + $config['view_suffix'] = 'html'; + + View::config($config); + + return View::fetch("/".$tplName,$data); + }else{ + $param = $this->request->param(); + $data = [ + 'title'=>'首页-智简魔方', + ]; + + $data['template_catalog'] = 'clientarea'; + $tplName = empty($param['view_html'])?'home':$param['view_html']; + + if (isset($param['theme']) && !empty($param['theme'])){ + cookie('clientarea_theme',$param['theme']); + $data['themes'] = $param['theme']; + } elseif (cookie('clientarea_theme')){ + $data['themes'] = cookie('clientarea_theme'); + } else{ + $data['themes'] = configuration('clientarea_theme'); + } + + if($tplName=='home'){ + $view_path = '../public/clientarea/template/'.$data['themes'].'/'; + //header('location:/theme/index.html');die; + //$view_path = '../public/theme/'; + }else{ + $view_path = '../public/clientarea/template/'.$data['themes'].'/'; + } + + if(!file_exists($view_path.$tplName)){ + $theme_config=$this->themeConfig($view_path); + if(!empty($theme_config['config-parent-theme'])){ + $view_path = '../public/clientarea/template/'.$theme_config['config-parent-theme'].'/'; + } + } + + $PluginModel = new PluginModel(); + $addons = $PluginModel->plugins('addon'); + + $data['addons'] = $addons['list']; + + $config['view_path'] = $view_path; + /*if($tplName=='index'){ + $config['view_suffix'] = 'html'; + }*/ + + View::config($config); + + return View::fetch("/".$tplName,$data); + } + + } + + /*public function plugin() + { + $param = $this->request->param(); + $plugin_id = $param['plugin_id']; + $tplName = empty($param['view_html'])?'index':$param['view_html']; + $addon = (new PluginModel())->plugins('addon')['list']; + $addon = array_column($addon,'name','id'); + $name=parse_name($addon[$plugin_id]??''); + if(empty($name)){ + throw new TemplateNotFoundException(lang('not_found'), $name); + #exit('not found template1'); + } + $tpl = '../public/plugins/addon/'.$name.'/template/web/'; + + $data['template_catalog'] = 'web'; + + if (isset($param['theme']) && !empty($param['theme'])){ + cookie('web_theme',$param['theme']); + $data['themes'] = $param['theme']; + } elseif (cookie('web_theme')){ + $data['themes'] = cookie('web_theme'); + } else{ + $data['themes'] = configuration('web_theme'); + } + + $PluginModel = new PluginModel(); + $addons = $PluginModel->plugins('addon'); + + $data['addons'] = $addons['list']; + + if(file_exists($tpl.$tplName.".html")){ + $content=$this->view('header',$data); + $content.=$this->pluginView($tplName,$data,$name); + $content.=$this->view('footer',$data); + return $content; + }else{ + throw new TemplateNotFoundException(lang('not_found'), $tpl); + #exit('not found template'); + } + + } + + private function view($tplName, $data){ + View::config(['view_path' => '../public/web/default/', 'view_suffix' => 'html']); + return View::fetch('/'.$tplName,$data); + } + + private function pluginView($tplName, $data, $name){ + View::config(['view_path' => '../public/plugins/addon/'.$name.'/template/web/', 'view_suffix' => 'html']); + return View::fetch('/'.$tplName,$data); + }*/ + //模板继承文件读取 + private function themeConfig($file){ + $theme=$file.'/theme.config';$themes=[]; + if(file_exists($theme)){ + $theme=file_get_contents($theme); + + $theme=explode("\r\n",$theme); + $theme=array_filter($theme); + + foreach($theme as $v){ + $theme_config=explode(":",$v); + $themes[trim($theme_config[0])]=trim(trim(trim($theme_config[1],"'"),'"')); + } + } + return $themes; + } +} diff --git a/10.3.4/app/home/model/CartModel.php b/10.3.5/app/home/model/CartModel.php similarity index 98% rename from 10.3.4/app/home/model/CartModel.php rename to 10.3.5/app/home/model/CartModel.php index bec31959..ec0221a3 100644 --- a/10.3.4/app/home/model/CartModel.php +++ b/10.3.5/app/home/model/CartModel.php @@ -484,8 +484,8 @@ public function settle($position,$customfield=[],$param=[]) $this->startTrans(); try { // 创建订单 - $gateway = gateway_list(); - $gateway = $gateway['list'][0]??[]; + /*$gateway = gateway_list(); + $gateway = $gateway['list'][0]??[];*/ $time = time(); $order = OrderModel::create([ @@ -495,8 +495,8 @@ public function settle($position,$customfield=[],$param=[]) 'amount' => $amount, 'credit' => 0, 'amount_unpaid' => $amount, - 'gateway' => $gateway['name'] ?? '', - 'gateway_name' => $gateway['title'] ?? '', + //'gateway' => $gateway['name'] ?? '', + //'gateway_name' => $gateway['title'] ?? '', 'pay_time' => $amount>0 ? 0 : $time, 'create_time' => $time ]); @@ -542,7 +542,7 @@ public function settle($position,$customfield=[],$param=[]) if (request()->is_api){ $downstreamHostId = intval($param['downstream_host_id'] ?? 0); if(!empty($downstreamHostId)){ - $downstreamInfo = json_encode(['url' => $param['downstream_url']??'', 'token'=>$param['downstream_token']??'', 'api'=>request()->api_id]); + $downstreamInfo = json_encode(['url' => $param['downstream_url']??'', 'token'=>$param['downstream_token']??'', 'api'=>request()->api_id,'type'=>$param['downstream_system_type']??""]); } } @@ -588,6 +588,7 @@ public function settle($position,$customfield=[],$param=[]) $result = $ResModuleLogic->afterSettle($product, $host->id, $value['config_options'],$customfield); }else{ + $value['config_options']['customfield'] = $value['customfield']; $ModuleLogic->afterSettle($product, $host->id, $value['config_options'],$customfield); } diff --git a/10.3.4/app/home/model/ClientareaAuthModel.php b/10.3.5/app/home/model/ClientareaAuthModel.php similarity index 100% rename from 10.3.4/app/home/model/ClientareaAuthModel.php rename to 10.3.5/app/home/model/ClientareaAuthModel.php diff --git a/10.3.4/app/home/model/ClientareaAuthRuleLinkModel.php b/10.3.5/app/home/model/ClientareaAuthRuleLinkModel.php similarity index 100% rename from 10.3.4/app/home/model/ClientareaAuthRuleLinkModel.php rename to 10.3.5/app/home/model/ClientareaAuthRuleLinkModel.php diff --git a/10.3.4/app/home/model/ClientareaAuthRuleModel.php b/10.3.5/app/home/model/ClientareaAuthRuleModel.php similarity index 100% rename from 10.3.4/app/home/model/ClientareaAuthRuleModel.php rename to 10.3.5/app/home/model/ClientareaAuthRuleModel.php diff --git a/10.3.4/app/home/validate/AccountValidate.php b/10.3.5/app/home/validate/AccountValidate.php similarity index 100% rename from 10.3.4/app/home/validate/AccountValidate.php rename to 10.3.5/app/home/validate/AccountValidate.php diff --git a/10.3.4/app/home/validate/ApiValidate.php b/10.3.5/app/home/validate/ApiValidate.php similarity index 100% rename from 10.3.4/app/home/validate/ApiValidate.php rename to 10.3.5/app/home/validate/ApiValidate.php diff --git a/10.3.4/app/home/validate/CartValidate.php b/10.3.5/app/home/validate/CartValidate.php similarity index 100% rename from 10.3.4/app/home/validate/CartValidate.php rename to 10.3.5/app/home/validate/CartValidate.php diff --git a/10.3.4/app/home/validate/CommonValidate.php b/10.3.5/app/home/validate/CommonValidate.php similarity index 100% rename from 10.3.4/app/home/validate/CommonValidate.php rename to 10.3.5/app/home/validate/CommonValidate.php diff --git a/10.3.4/app/home/validate/ConsultValidate.php b/10.3.5/app/home/validate/ConsultValidate.php similarity index 100% rename from 10.3.4/app/home/validate/ConsultValidate.php rename to 10.3.5/app/home/validate/ConsultValidate.php diff --git a/10.3.4/app/home/validate/FeedbackValidate.php b/10.3.5/app/home/validate/FeedbackValidate.php similarity index 100% rename from 10.3.4/app/home/validate/FeedbackValidate.php rename to 10.3.5/app/home/validate/FeedbackValidate.php diff --git a/10.3.4/app/home/validate/HostValidate.php b/10.3.5/app/home/validate/HostValidate.php similarity index 100% rename from 10.3.4/app/home/validate/HostValidate.php rename to 10.3.5/app/home/validate/HostValidate.php diff --git a/10.3.4/app/home/validate/ProductValidate.php b/10.3.5/app/home/validate/ProductValidate.php similarity index 100% rename from 10.3.4/app/home/validate/ProductValidate.php rename to 10.3.5/app/home/validate/ProductValidate.php diff --git a/10.3.4/app/http/middleware/Check.php b/10.3.5/app/http/middleware/Check.php similarity index 100% rename from 10.3.4/app/http/middleware/Check.php rename to 10.3.5/app/http/middleware/Check.php diff --git a/10.3.4/app/http/middleware/CheckAdmin.php b/10.3.5/app/http/middleware/CheckAdmin.php similarity index 100% rename from 10.3.4/app/http/middleware/CheckAdmin.php rename to 10.3.5/app/http/middleware/CheckAdmin.php diff --git a/10.3.4/app/http/middleware/CheckHome.php b/10.3.5/app/http/middleware/CheckHome.php similarity index 100% rename from 10.3.4/app/http/middleware/CheckHome.php rename to 10.3.5/app/http/middleware/CheckHome.php diff --git a/10.3.4/app/http/middleware/ParamFilter.php b/10.3.5/app/http/middleware/ParamFilter.php similarity index 100% rename from 10.3.4/app/http/middleware/ParamFilter.php rename to 10.3.5/app/http/middleware/ParamFilter.php diff --git a/10.3.4/app/middleware.php b/10.3.5/app/middleware.php similarity index 100% rename from 10.3.4/app/middleware.php rename to 10.3.5/app/middleware.php diff --git a/10.3.4/config/app.php b/10.3.5/config/app.php similarity index 100% rename from 10.3.4/config/app.php rename to 10.3.5/config/app.php diff --git a/10.3.4/config/cache.php b/10.3.5/config/cache.php similarity index 100% rename from 10.3.4/config/cache.php rename to 10.3.5/config/cache.php diff --git a/10.3.4/config/captcha.php b/10.3.5/config/captcha.php similarity index 100% rename from 10.3.4/config/captcha.php rename to 10.3.5/config/captcha.php diff --git a/10.3.4/config/console.php b/10.3.5/config/console.php similarity index 100% rename from 10.3.4/config/console.php rename to 10.3.5/config/console.php diff --git a/10.3.4/config/cookie.php b/10.3.5/config/cookie.php similarity index 100% rename from 10.3.4/config/cookie.php rename to 10.3.5/config/cookie.php diff --git a/10.3.4/config/database.php b/10.3.5/config/database.php similarity index 100% rename from 10.3.4/config/database.php rename to 10.3.5/config/database.php diff --git a/10.3.4/config/filesystem.php b/10.3.5/config/filesystem.php similarity index 100% rename from 10.3.4/config/filesystem.php rename to 10.3.5/config/filesystem.php diff --git a/10.3.4/config/idcsmart.php b/10.3.5/config/idcsmart.php similarity index 100% rename from 10.3.4/config/idcsmart.php rename to 10.3.5/config/idcsmart.php diff --git a/10.3.4/config/lang.php b/10.3.5/config/lang.php similarity index 100% rename from 10.3.4/config/lang.php rename to 10.3.5/config/lang.php diff --git a/10.3.4/config/log.php b/10.3.5/config/log.php similarity index 100% rename from 10.3.4/config/log.php rename to 10.3.5/config/log.php diff --git a/10.3.4/config/middleware.php b/10.3.5/config/middleware.php similarity index 100% rename from 10.3.4/config/middleware.php rename to 10.3.5/config/middleware.php diff --git a/10.3.4/config/route.php b/10.3.5/config/route.php similarity index 100% rename from 10.3.4/config/route.php rename to 10.3.5/config/route.php diff --git a/10.3.4/config/session.php b/10.3.5/config/session.php similarity index 100% rename from 10.3.4/config/session.php rename to 10.3.5/config/session.php diff --git a/10.3.4/config/trace.php b/10.3.5/config/trace.php similarity index 100% rename from 10.3.4/config/trace.php rename to 10.3.5/config/trace.php diff --git a/10.3.4/config/view.php b/10.3.5/config/view.php similarity index 100% rename from 10.3.4/config/view.php rename to 10.3.5/config/view.php diff --git a/10.3.4/cron/cron.php b/10.3.5/cron/cron.php similarity index 100% rename from 10.3.4/cron/cron.php rename to 10.3.5/cron/cron.php diff --git a/10.3.4/cron/task.php b/10.3.5/cron/task.php similarity index 100% rename from 10.3.4/cron/task.php rename to 10.3.5/cron/task.php diff --git a/10.3.4/public/.htaccess b/10.3.5/public/.htaccess similarity index 100% rename from 10.3.4/public/.htaccess rename to 10.3.5/public/.htaccess diff --git a/10.3.4/public/503.html b/10.3.5/public/503.html similarity index 100% rename from 10.3.4/public/503.html rename to 10.3.5/public/503.html diff --git a/10.3.4/public/Desktop.ini b/10.3.5/public/Desktop.ini similarity index 100% rename from 10.3.4/public/Desktop.ini rename to 10.3.5/public/Desktop.ini diff --git a/10.3.4/public/admin/index.php b/10.3.5/public/admin/index.php similarity index 100% rename from 10.3.4/public/admin/index.php rename to 10.3.5/public/admin/index.php diff --git a/10.3.4/public/admin/language/en-us.js b/10.3.5/public/admin/language/en-us.js similarity index 100% rename from 10.3.4/public/admin/language/en-us.js rename to 10.3.5/public/admin/language/en-us.js diff --git a/10.3.4/public/admin/language/en-us.php b/10.3.5/public/admin/language/en-us.php similarity index 90% rename from 10.3.4/public/admin/language/en-us.php rename to 10.3.5/public/admin/language/en-us.php index 1bb94768..645aed2c 100644 --- a/10.3.4/public/admin/language/en-us.php +++ b/10.3.5/public/admin/language/en-us.php @@ -3,7 +3,7 @@ return [ 'display_name' => 'English',//用于在语言切换下拉中显示 'display_flag' => 'US',//用于显示图片,使用国家代码大写 - 'not_found' => '页面找不到了', + 'not_found' => 'Page not found', 'success_message' => 'request successful', @@ -61,6 +61,10 @@ 'login_phone_is_not_register' => 'The phone number is not registered', 'login_client_is_disabled' => 'The account has been disabled/closed, please contact the administrator to deal with', 'permission_denied' => 'You do not have permission to access the [{name}] interface! ', + 'get_idcsamrt_auth_success' => 'Authorization information obtained successfully', + 'get_idcsamrt_auth_failed' => 'Failed to obtain authorization information', + 'replace_idcsamrt_auth_success' => 'Authorization code replacement successful', + 'replace_idcsamrt_auth_failed' => 'Authorization code replacement failed', # 权限规则 'auth_rule_admin_list' => 'administrator list', @@ -256,7 +260,7 @@ 'nav_log' => 'log', 'nav_auto' => 'Automation', 'nav_plugin' => 'plugin', - 'nav_plugin_list' => 'plugin list', + 'nav_plugin_list' => 'Plugin list', 'nav_navigation' => 'navigation management', 'nav_real_name_approval' => 'real name authentication', 'nav_upstream_management' => 'upstream and downstream management', @@ -377,6 +381,7 @@ 'log_admin_show_product' => '{admin} show product {product}', 'log_admin_update_product' => '{admin} modify product {product}:{description}', 'log_admin_update_product_upgrade_product' => 'upgrade product ID {old} to {new}', + 'log_admin_copy_product' => '{admin}copy product{product}', 'field_product_name' => 'name', 'field_product_product_group_id' => 'Group ID', @@ -469,6 +474,15 @@ 'order_not_support_apply_credit' => 'order does not support application balance', 'apply_credit_not_enough' => 'The application balance shall not exceed the applicable balance amount', 'remove_credit_not_enough' => 'The deduction balance shall not exceed the applied balance amount', + 'order_apply_credit' => 'Apply balance to order', + 'upgrade_refund' => 'Downgrade Refund', + 'order_refund' => 'order #{id} refund', + 'order_cancel_refund' => 'order #{id} cancel refund', + 'order_overpayment' => 'order overpayment, recharge to balance#{id}', + 'order_underpayment' => 'Underpayment, recharge to balance #{id}', + 'credit_payment' => 'balance payment', + 'order_remove_credit' => 'order #{id} remove balance', + 'recharge' => 'recharge', # 产品管理 'host_is_not_exist' => 'The product does not exist', @@ -775,6 +789,7 @@ 'first_product_group_id_is_not_exist' => 'A group does not exist', 'product_show_in' => 'whether displayed as 0 or 1', 'product_show_require' => 'Whether to show must', + 'son_product_cannot_copy' => 'Sub-product does not support copying', # 邮件模板 @@ -1002,8 +1017,8 @@ 'log_module_suspend_account_failed' => 'Product {host} module suspension failed, reason: {reason}', 'log_module_unsuspend_account_success' => 'Product {host} module unsuspended successfully', 'log_module_unsuspend_account_failed' => 'Product {host} module unsuspend failed, reason: {reason}', - 'log_module_terminate_account_success' => 'Successfully deleted product {host} module for {client}', - 'log_module_terminate_account_failed' => 'The deletion of product {host} module for {client} failed due to {reason}', + 'log_module_terminate_account_success' => '{client} product {host} module was deleted successfully', + 'log_module_terminate_account_failed' => '{client} product {host} module deletion failed, reason: {reason}', # 退款记录 'refund_record_is_not_exist' => 'refund record does not exist', @@ -1124,14 +1139,107 @@ 'order_description_append' => '{product_name}({name}), purchase time: {billing_cycle_name}({time})', - #挂件 + 'user_cannot_empty' => 'user cannot be empty', + 'username_4_20_digits' => 'username 4-20', + 'password_cannot_empty' => 'password cannot be empty', + 'auth_failed' => 'Authentication failed', + 'signature_error' => 'signature error', + 'host_cannot_use_this_interface' => 'This product cannot use this interface', + 'signature_verification_failed' => 'signature verification failed', + 'sync_success' => 'Successful synchronization', + 'sync_failed' => 'Sync failure', + 'failed_to_open_upstream' => 'upstream failed to open', + 'host_name' => 'host name', + 'suspend_type' => 'suspend type', + 'suspend_reason' => 'suspend reason', + 'change_into' => 'modified to:', + + 'superadmin_add_admin_send_mail' => 'Super administrators add background administrators, send mail', + 'host_create_success_send_mail' => 'The product is successfully opened, send mail', + 'host_create_success_send_sms' => 'The product is successfully opened, send a text message', + 'host_renewal_first_send_mail' => 'The first customer renewal reminder, send mail', + 'host_renewal_first_send_sms' => 'The first customer renewal reminder, send SMS', + 'host_renewal_second_send_mail' => 'The second customer renewal reminder, send mail', + 'host_renewal_second_send_sms' => 'The second customer renewal reminder, send SMS', + 'host_overdue_first_send_mail' => 'overdue payment first, send mail', + 'host_overdue_first_send_sms' => 'Overdue payment for the first time, send SMS', + 'host_overdue_second_send_mail' => 'Overdue payment for the second time, send mail', + 'host_overdue_second_send_sms' => 'Overdue payment for the second time, send SMS', + 'host_overdue_third_send_mail' => 'Overdue payment for the third time, send mail', + 'host_overdue_third_send_sms' => 'Overdue payment for the third time, send SMS', + 'order_overdue_send_mail' => 'order overdue payment notice, send mail', + 'order_overdue_send_sms' => 'order overdue payment notification, send SMS', + 'host_suspend' => 'host suspend', + 'host_delete' => 'host delete', + 'client_change_phone_send_sms' => 'The customer changed the phone successfully, send a text message', + 'client_change_email_send_mail' => 'The customer has successfully changed the email address and sent the email', + 'client_change_password_send_mail' => 'The customer changed the password successfully, send mail', + 'client_change_password_send_sms' => 'The customer changed the password successfully, send a text message', + 'client_phone_code_login_success_send_sms' => 'Successful mobile phone + verification code login, send SMS', + 'client_email_password_login_success_send_mail' => 'email + password login success, send mail', + 'client_phone_password_login_success_send_sms' => 'Successful phone + password login, send SMS', + 'client_sms_register_success_send_sms' => 'SMS registration is successful, send SMS', + 'client_mail_register_success_send_mail' => 'Mail registration is successful, send mail', + 'host_suspend_send_mail' => 'Product suspension notice, send mail', + 'host_suspend_send_sms' => 'Product suspension notification, send SMS', + 'suspend_type_overdue' => 'Expiration suspension', + 'suspend_type_overtraffic' => 'Suspend suspension', + 'suspend_type_certification_not_complete' => 'real name incomplete', + 'suspend_type_other' => 'other', + 'cannot_unsuspend_from_upstream' => 'cannot lift the suspension initiated by the upstream', + 'host_unsuspend_send_mail' => 'Product unsuspended notice, send mail', + 'host_unsuspend_send_sms' => 'Product unsuspended notice, send SMS', + 'host_delete_send_mail' => 'product deletion notification, send mail', + 'host_delete_send_sms' => 'Product delete notification, send SMS', + 'host_upgrade_send_mail' => 'Product downgrade, send mail', + 'host_upgrade_send_sms' => 'Product downgrade, send SMS', + 'order_create_send_mail' => 'order creation, send mail', + 'order_create_send_sms' => 'order creation, send SMS', + 'admin_order_amount_send_mail' => 'Backstage administrator adjusts the order price and sends mail', + 'admin_order_amount_send_sms' => 'Backstage administrator adjusts the order price and sends SMS', + 'order_recharge_send_mail' => 'Customer recharge successful, send mail', + 'order_recharge_send_sms' => 'Customer recharge is successful, send SMS', + 'order_pay_send_mail' => 'Customer payment is successful, send mail', + 'order_pay_send_sms' => 'Customer payment is successful, send SMS', + 'host_unsuspend' => 'Unsuspend', + 'host_creating_send_mail' => 'Product opening, send mail', + 'host_creating_send_sms' => 'The product is being activated, sending SMS', + 'client_host_create' => '#User{client_id}#Product{host_id} — host creation', + 'client_host_upgrade' => '#User{client_id}#Product{host_id} — upgrading', + + 'active_host_is_used_cannot_delete' => 'Active products are in use and cannot be deleted', + 'phone_code_error' => 'International telephone area code format error', + 'phone_error' => 'Mobile phone number format error', + 'widget_require' => 'Please select a widget', + 'widget_error' => 'Pendant identification error', + 'host_overdue_suspend' => 'Product expiration suspension', + 'network_desertion' => 'Network desertion', + 'api_account_or_password_error' => 'API account or password error', + 'module_format_error' => 'module format error', + 'module_or_function_is_not_exist' => 'module or method does not exist', + + 'price' => 'price', + 'purchase_duration' => 'Purchase duration', + + # pendant 'widget_not_found' => 'Widget does not exist', - 'widget_validate_widget_require' => 'Please select the widget', - 'widget_validate_widget_error' => 'Pendant identification error', - 'widget_validate_status_param_error' => 'display status parameter error', - - 'log_pay_tmp_order_miss' => '{tem_order_id}missing provisional order', - 'log_pay_order_miss' => '{order_id}missing order', - - 'upstream_host_is_not_exist' => 'The upstream host does not exist', + 'widget_validate_widget_require' => 'Please select a widget', + 'widget_validate_widget_error' => 'Widget identification error', + 'widget_validate_status_param_error' => 'Display status parameter error', + + 'log_pay_tmp_order_miss' => '{tem_order_id} temporary order is missing', + 'log_pay_order_miss' => '{order_id} order is missing', + + 'upstream_host_is_not_exist' => 'The upstream product does not exist', + + # Commodity cycle ratio + 'log_product_duration_ratio_change' => ',Period {name} ratio changed from {old} to {new}', + 'please_input_all_duration_ratio' => 'Please enter all period ratios', + 'log_save_product_duration_ratio' => 'Save product cycle ratio successfully, product: {product}{detail}', + 'please_set_duration_ratio_first' => 'Please set the period ratio first', + 'please_set_at_lease_one_price' => 'Please set at least one price', + 'validate_product_duration_ratio_ratio_require' => 'Please enter the ratio', + 'validate_product_duration_ratio_price_require' => 'Please enter the price', + 'validate_product_duration_ratio_ratio_format_error' => 'The ratio can only be a number greater than 0 and less than 10000', + 'validate_product_duration_ratio_price_format_error' => 'The price can only be a number from 0-99999999', ]; diff --git a/10.3.4/public/admin/language/zh-cn.js b/10.3.5/public/admin/language/zh-cn.js similarity index 100% rename from 10.3.4/public/admin/language/zh-cn.js rename to 10.3.5/public/admin/language/zh-cn.js diff --git a/10.3.4/public/admin/language/zh-cn.php b/10.3.5/public/admin/language/zh-cn.php similarity index 90% rename from 10.3.4/public/admin/language/zh-cn.php rename to 10.3.5/public/admin/language/zh-cn.php index 2a7a1ec2..c1ad46f7 100644 --- a/10.3.4/public/admin/language/zh-cn.php +++ b/10.3.5/public/admin/language/zh-cn.php @@ -61,6 +61,10 @@ 'login_phone_is_not_register' => '手机号未注册', 'login_client_is_disabled' => '该帐号已停用/关闭,请联系管理员处理', 'permission_denied' => '您没有访问【{name}】接口权限!', + 'get_idcsamrt_auth_success' => '授权信息获取成功', + 'get_idcsamrt_auth_failed' => '授权信息获取失败', + 'replace_idcsamrt_auth_success' => '授权码更换成功', + 'replace_idcsamrt_auth_failed' => '授权码更换失败', # 权限规则 'auth_rule_admin_list' => '管理员列表', @@ -378,6 +382,7 @@ 'log_admin_show_product' => '{admin}显示商品{product}', 'log_admin_update_product' => '{admin}修改商品{product}:{description}', 'log_admin_update_product_upgrade_product' => '升级商品ID{old}为{new}', + 'log_admin_copy_product' => '{admin}复制商品{product}', 'field_product_name' => '名称', 'field_product_product_group_id' => '分组ID', @@ -470,6 +475,15 @@ 'order_not_support_apply_credit' => '订单不支持应用余额', 'apply_credit_not_enough' => '应用余额不得超过可应用余额金额', 'remove_credit_not_enough' => '扣除余额不得超过已应用余额金额', + 'order_apply_credit' => '应用余额至订单', + 'upgrade_refund' => '升降级退款', + 'order_refund' => '订单#{id}退款', + 'order_cancel_refund' => '订单#{id}取消退款', + 'order_overpayment' => '订单超付,充值至余额#{id}', + 'order_underpayment' => '少付,充值至余额#{id}', + 'credit_payment' => '余额支付', + 'order_remove_credit' => '订单#{id}移除余额', + 'recharge' => '充值', # 产品管理 'host_is_not_exist' => '产品不存在', @@ -528,6 +542,11 @@ 'configuration_log_terms_service_url' =>'服务条款地址', 'configuration_log_terms_privacy_url' =>'隐私条款地址', 'configuration_log_system_logo' =>'系统LOGO', + 'configuration_log_enterprise_address' =>'企业地址', + 'configuration_log_contact_email' =>'联系邮箱', + 'configuration_log_enterprise_website' =>'企业网站', + 'configuration_log_contact_telephone' =>'联系电话', + 'configuration_log_postal_code' =>'邮政编码', 'configuration_admin_default_language_cannot_empty' => '后台默认语言不能为空', 'configuration_admin_default_language_error' => '后台默认语言设置错误', 'configuration_home_default_language_open_cannot_empty' => '前台多语言开关不能为空', @@ -546,6 +565,13 @@ 'configuration_terms_privacy_url' => '隐私条款地址不能为空', 'configuration_terms_privacy_url_cannot_exceed_255_chars' => '隐私条款地址最多不能超过255个字符', 'configuration_system_logo' => '请选择系统LOGO', + 'configuration_enterprise_address' => '请填写企业地址', + 'configuration_contact_email' => '请填写联系邮箱', + 'configuration_enterprise_website' => '请填写企业网站', + 'configuration_contact_telephone' => '请填写联系电话', + 'configuration_postal_code' => '请填写邮政编码', + + # 登录设置 'configuration_log_register_phone' =>'手机是否支持注册', 'configuration_log_register_email' =>'邮箱是否支持注册', @@ -764,6 +790,7 @@ 'first_product_group_id_is_not_exist' => '一级分组不存在', 'product_show_in' => '是否展示为0或1', 'product_show_require' => '是否展示必须', + 'son_product_cannot_copy' => '子商品不支持复制', # 邮件模板 @@ -1114,6 +1141,88 @@ 'order_description_append' => '{product_name}({name}),购买时长:{billing_cycle_name}({time})', + 'user_cannot_empty' => '用户不能为空', + 'username_4_20_digits' => '用户名4-20位', + 'password_cannot_empty' => '密码不能为空', + 'auth_failed' => '鉴权失败', + 'signature_error' => '签名错误', + 'host_cannot_use_this_interface' => '该产品不能使用该接口', + 'signature_verification_failed' => '签名验证失败', + 'sync_success' => '同步成功', + 'sync_failed' => '同步失败', + 'failed_to_open_upstream' => '上游开通失败', + 'host_name' => '主机名', + 'suspend_type' => '暂停类型', + 'suspend_reason' => '暂停原因', + 'change_into' => '修改为:', + + 'superadmin_add_admin_send_mail' => '超级管理员添加后台管理员,发送邮件', + 'host_create_success_send_mail' => '产品开通成功,发送邮件', + 'host_create_success_send_sms' => '产品开通成功,发送短信', + 'host_renewal_first_send_mail' => '第一次客户续费提醒,发送邮件', + 'host_renewal_first_send_sms' => '第一次客户续费提醒,发送短信', + 'host_renewal_second_send_mail' => '第二次客户续费提醒,发送邮件', + 'host_renewal_second_send_sms' => '第二次客户续费提醒,发送短信', + 'host_overdue_first_send_mail' => '逾期付款第一次,发送邮件', + 'host_overdue_first_send_sms' => '逾期付款第一次,发送短信', + 'host_overdue_second_send_mail' => '逾期付款第二次,发送邮件', + 'host_overdue_second_send_sms' => '逾期付款第二次,发送短信', + 'host_overdue_third_send_mail' => '逾期付款第三次,发送邮件', + 'host_overdue_third_send_sms' => '逾期付款第三次,发送短信', + 'order_overdue_send_mail' => '订单未付款通知,发送邮件', + 'order_overdue_send_sms' => '订单未付款通知,发送短信', + 'host_suspend' => '主机暂停', + 'host_delete' => '主机删除', + 'client_change_phone_send_sms' => '客户更改手机成功,发送短信', + 'client_change_email_send_mail' => '客户更改邮箱成功,发送邮件', + 'client_change_password_send_mail' => '客户更改密码成功,发送邮件', + 'client_change_password_send_sms' => '客户更改密码成功,发送短信', + 'client_phone_code_login_success_send_sms' => '手机+验证码登录成功,发送短信', + 'client_email_password_login_success_send_mail' => '邮箱+密码登录成功,发送邮件', + 'client_phone_password_login_success_send_sms' => '手机+密码登录成功,发送短信', + 'client_sms_register_success_send_sms' => '短信注册成功,发送短信', + 'client_mail_register_success_send_mail' => '邮件注册成功,发送邮件', + 'host_suspend_send_mail' => '产品暂停通知,发送邮件', + 'host_suspend_send_sms' => '产品暂停通知,发送短信', + 'suspend_type_overdue' => '到期暂停', + 'suspend_type_overtraffic' => '超流暂停', + 'suspend_type_certification_not_complete' => '实名未完成', + 'suspend_type_other' => '其他', + 'cannot_unsuspend_from_upstream' => '不可解除上游发起的暂停', + 'host_unsuspend_send_mail' => '产品解除暂停通知,发送邮件', + 'host_unsuspend_send_sms' => '产品解除暂停通知,发送短信', + 'host_delete_send_mail' => '产品删除通知,发送邮件', + 'host_delete_send_sms' => '产品删除通知,发送短信', + 'host_upgrade_send_mail' => '产品升降级,发送邮件', + 'host_upgrade_send_sms' => '产品升降级,发送短信', + 'order_create_send_mail' => '订单创建,发送邮件', + 'order_create_send_sms' => '订单创建,发送短信', + 'admin_order_amount_send_mail' => '后台管理员调整订单价格,发送邮件', + 'admin_order_amount_send_sms' => '后台管理员调整订单价格,发送短信', + 'order_recharge_send_mail' => '客户充值成功,发送邮件', + 'order_recharge_send_sms' => '客户充值成功,发送短信', + 'order_pay_send_mail' => '客户支付成功,发送邮件', + 'order_pay_send_sms' => '客户支付成功,发送短信', + 'host_unsuspend' => '解除暂停', + 'host_creating_send_mail' => '产品开通中,发送邮件', + 'host_creating_send_sms' => '产品开通中,发送短信', + 'client_host_create' => '#用户{client_id}#产品{host_id} — 主机创建', + 'client_host_upgrade' => '#用户{client_id}#产品{host_id} — 升降级', + + 'active_host_is_used_cannot_delete' => '有激活产品正在使用,不能删除', + 'phone_code_error' => '国际电话区号格式错误', + 'phone_error' => '手机号格式错误', + 'widget_require' => '请选择挂件', + 'widget_error' => '挂件标识错误', + 'host_overdue_suspend' => '产品到期暂停', + 'network_desertion' => '网络开小差', + 'api_account_or_password_error' => 'API账号或密码错误', + 'module_format_error' => '模块格式错误', + 'module_or_function_is_not_exist' => '模块或方法不存在', + + 'price' => '价格', + 'purchase_duration' => '购买时长', + #挂件 'widget_not_found' => '挂件不存在', 'widget_validate_widget_require' => '请选择挂件', @@ -1125,6 +1234,14 @@ 'upstream_host_is_not_exist' => '上游产品不存在', - - + # 商品周期比例 + 'log_product_duration_ratio_change' => ',周期{name}比例从{old}改为{new}', + 'please_input_all_duration_ratio' => '请输入所有周期比例', + 'log_save_product_duration_ratio' => '保存商品周期比例成功,商品:{product}{detail}', + 'please_set_duration_ratio_first' => '请先设置周期比例', + 'please_set_at_lease_one_price' => '请至少设置一个价格', + 'validate_product_duration_ratio_ratio_require' => '请输入比例', + 'validate_product_duration_ratio_price_require' => '请输入价格', + 'validate_product_duration_ratio_ratio_format_error' => '比例只能是大于0并且小于10000的数字', + 'validate_product_duration_ratio_price_format_error' => '价格只能是0-99999999的数字', ]; diff --git a/10.3.4/public/admin/language/zh-hk.js b/10.3.5/public/admin/language/zh-hk.js similarity index 100% rename from 10.3.4/public/admin/language/zh-hk.js rename to 10.3.5/public/admin/language/zh-hk.js diff --git a/10.3.5/public/admin/language/zh-hk.php b/10.3.5/public/admin/language/zh-hk.php new file mode 100644 index 00000000..4b63c087 --- /dev/null +++ b/10.3.5/public/admin/language/zh-hk.php @@ -0,0 +1,1247 @@ + '中文繁體',//用於在語言切換下拉中顯示 + 'display_flag' => 'CN',//用於顯示圖片,使用國家代碼大寫 + 'not_found' => '頁面找不到了', + + + 'success_message' => '請求成功', + 'fail_message' => '請求失敗', + 'create_success' => '創建成功', + 'create_fail' => '創建失敗', + 'delete_success' => '刪除成功', + 'delete_fail' => '刪除失敗', + 'update_success' => '修改成功', + 'update_fail' => '修改失敗', + 'save_success' => '保存成功', + 'save_fail' => '保存失敗', + 'register_success' => '註冊成功', + 'register_fail' => '註冊失敗', + 'pay_success' => '支付成功', + 'pay_fail' => '支付失敗', + 'id_error' => 'ID錯誤', + 'param_error' => '參數錯誤', + 'cannot_repeat_opreate' => '不可重複操作', + 'disable_success' => '禁用成功', + 'disable_fail' => '禁用失敗', + 'enable_success' => '啟用成功', + 'enable_fail' => '啟用失敗', + 'login_success' => '登錄成功', + 'login_fail' => '登錄失敗', + 'move_success' => '移動成功', + 'move_fail' => '移動失敗', + 'file_name_error' => '文件名不允許包含!@^&"\'/\\', + 'file_mime_error' => '文件mime類型錯誤', + 'file_less_than_150M' => '文件大小不超過150M', + 'upload_success' => '上傳成功', + 'upload_fail' => '上傳失敗', + 'file_is_not_exist' => '文件不存在', + 'buy_fail' => '購買失敗', + 'buy_success' => '購買成功', + 'client_credit_fail' => '用戶餘額修改失敗', + 'client_credit_success' => '用戶餘額修改成功', + 'missing_route_paramters' => '缺少路由參數{param}', + 'range_of_values' => '{key}取值範圍:{value}', + 'gateway_error' => '支付接口錯誤', + 'login_unauthorized' => '未授權', + 'remember_password_value_0_or_1' => '記住密碼取值為0或1', + 'password_is_change_please_login_again' => '密碼已修改,請重新授權', + 'logout_success' => '成功退出', + 'inconsistent_login_ip' => '登錄ip不一致', + 'login_user_ID_is_inconsistent' => '登錄用戶ID不一致', + 'log_out_automatically_after_2_hours_without_operation' => '2個小時未操作自動退出登錄', + 'login_captcha' => '請輸入圖形驗證碼', + 'login_captcha_token' => '請輸入圖形驗證碼唯一識別碼', + 'login_captcha_error' => '行為驗證碼錯誤,請查看配置是否正確', + 'login_phone_code_require' => '請選擇國家區號', + 'login_phone_code_error' => '國家區號錯誤', + 'login_phone_require' => '請輸入手機號', + 'login_phone_is_not_right' => '請輸入手機號', + 'login_phone_is_not_register' => '手機號未註冊', + 'login_client_is_disabled' => '該帳號已停用/關閉,請聯繫管理員處理', + 'permission_denied' => '您沒有訪問【{name}】接口權限! ', + 'get_idcsamrt_auth_success' => '授權資訊取得成功', + 'get_idcsamrt_auth_failed' => '授權資訊取得失敗', + 'replace_idcsamrt_auth_success' => '授權碼更換成功', + 'replace_idcsamrt_auth_failed' => '授權碼更換失敗', + + # 權限規則 + 'auth_rule_admin_list' => '管理員列表', + 'auth_rule_admin_index' => '獲取單個管理員', + 'auth_rule_admin_create' => '添加管理員', + 'auth_rule_admin_update' => '修改管理員', + 'auth_rule_admin_delete' => '刪除管理員', + 'auth_rule_admin_status' => '管理員狀態切換', + 'auth_rule_admin_role_list' => '管理員分組列表', + 'auth_rule_admin_role_index' => '獲取單個管理員分組', + 'auth_rule_admin_role_create' => '添加管理員分組', + 'auth_rule_admin_role_update' => '修改管理員分組', + 'auth_rule_admin_role_delete' => '刪除管理員分組', + 'auth_rule_client_list' => '用戶列表', + 'auth_rule_client_index' => '用戶詳情', + 'auth_rule_client_create' => '新建用戶', + 'auth_rule_client_update' => '修改用戶', + 'auth_rule_client_delete' => '刪除用戶', + 'auth_rule_client_status' => '用戶狀態切換', + 'auth_rule_client_search' => '搜索用戶', + 'auth_rule_client_login' => '以用戶登錄', + 'auth_rule_client_credit_list' => '用戶餘額變更記錄列表', + 'auth_rule_client_credit_update' => '更改用戶餘額', + 'auth_rule_configuration_system' => '獲取系統設置', + 'auth_rule_configuration_system_update' => '保存系統設置', + 'auth_rule_configuration_login' => '獲取登錄設置', + 'auth_rule_configuration_login_update' => '保存登錄設置', + 'auth_rule_configuration_security' => '獲取驗證碼設置', + 'auth_rule_configuration_security_update' => '保存驗證碼設置', + 'auth_rule_configuration_currency' => '獲取貨幣設置', + 'auth_rule_configuration_currency_update' => '保存貨幣設置', + 'auth_rule_configuration_cron' => '獲取自動化設置', + 'auth_rule_configuration_cron_update' => '保存自動化設置', + 'auth_rule_order_list' => '訂單列表', + 'auth_rule_order_index' => '訂單詳情', + 'auth_rule_order_create' => '新建訂單', + 'auth_rule_order_upgrade_amount' => '獲取升降級訂單金額', + 'auth_rule_order_amount_update' => '調整訂單金額', + 'auth_rule_order_status_paid' => '標記支付', + 'auth_rule_order_delete' => '刪除訂單', + 'auth_rule_transaction_list' => '交易流水列表', + 'auth_rule_transaction_create' => '新增交易流水', + 'auth_rule_transaction_delete' => '刪除交易流水', + 'auth_rule_host_list' => '產品列表', + 'auth_rule_host_index' => '產品詳情', + 'auth_rule_host_update' => '修改產品', + 'auth_rule_host_delete' => '刪除產品', + 'auth_rule_plugin_list' => '獲取支付/短信/郵件/插件列表', + 'auth_rule_plugin_setting' => '獲取單個插件配置', + 'auth_rule_plugin_status' => '禁用(啟用)插件', + 'auth_rule_plugin_install' => '插件安裝', + 'auth_rule_plugin_uninstall' => '插件卸載', + 'auth_rule_plugin_setting_update' => '保存配置', + 'auth_rule_email_template_list' => '郵件模板列表', + 'auth_rule_email_template_create' => '創建郵件模板', + 'auth_rule_email_template_index' => '獲取單個郵件模板', + 'auth_rule_email_template_update' => '編輯郵件模板', + 'auth_rule_email_template_delete' => '刪除郵件模板', + 'auth_rule_email_template_test' => '測試郵件模板', + 'auth_rule_sms_template_list' => '獲取短信模板', + 'auth_rule_sms_template_create' => '創建短信模板', + 'auth_rule_sms_template_index' => '獲取單個短信模板', + 'auth_rule_sms_template_update' => '編輯短信模板', + 'auth_rule_sms_template_delete' => '刪除短信模板', + 'auth_rule_sms_template_test' => '測試短信模板', + 'auth_rule_notice_setting_list' => '發送管理', + 'auth_rule_notice_setting_update' => '發送設置', + 'auth_rule_task_list' => '任務列表', + 'auth_rule_task_retry' => '任務重試', + 'auth_rule_system_log_list' => '系統日誌列表', + 'auth_rule_email_log_list' => '郵件日誌列表', + 'auth_rule_sms_log_list' => '短信日誌列表', + 'auth_rule_product_list' => '商品列表', + 'auth_rule_product_index' => '商品詳情', + 'auth_rule_product_create' => '新建商品', + 'auth_rule_product_update' => '編輯商品', + 'auth_rule_product_order' => '商品拖動排序', + 'auth_rule_product_delete' => '刪除商品', + 'auth_rule_product_hidden' => '隱藏/顯示商品', + 'auth_rule_product_group_create' => '新建商品分組', + 'auth_rule_product_group_move_product' => '移動商品至其他商品組', + 'auth_rule_product_group_delete' => '刪除商品分組', + 'auth_rule_product_group_first_list' => '獲取商品一級分組', + 'auth_rule_product_group_second_list' => '獲取商品二級分組', + 'auth_rule_product_group_update' => '編輯商品分組', + 'auth_rule_product_upgrade' => '獲取商品關聯的升降級商品', + 'auth_rule_server_group_list' => '接口分組列表', + 'auth_rule_server_group_create' => '新建接口分組', + 'auth_rule_server_group_update' => '修改接口分組', + 'auth_rule_server_group_delete' => '刪除接口分組', + 'auth_rule_server_list' => '接口列表', + 'auth_rule_server_create' => '新建接口', + 'auth_rule_server_update' => '編輯接口', + 'auth_rule_server_delete' => '刪除接口', + 'auth_rule_server_status' => '獲取接口連接狀態', + 'auth_rule_module_list' => '模塊列表', + 'auth_rule_host_module' => '產品內頁模塊', + 'auth_rule_host_upgrade_config_option' => '產品升降級配置', + 'auth_rule_host_upgrade_config_option_price' => '產品升降級配置計算價格', + 'auth_rule_host_module_create' => '模塊開通', + 'auth_rule_host_module_suspend' => '模塊暫停', + 'auth_rule_host_module_unsuspend' => '模塊解除暫停', + 'auth_rule_host_module_terminate' => '模塊刪除', + 'auth_rule_product_server_config_option' => '選擇接口獲取配置', + 'auth_rule_product_config_option' => '商品配置頁面', + 'auth_rule_product_config_option_price' => '修改配置計算價格', + 'auth_rule_get_admin_menu' => '獲取後台導航', + 'auth_rule_get_home_menu' => '獲取前台導航', + 'auth_rule_save_admin_menu' => '保存後台導航', + 'auth_rule_save_home_menu' => '保存前台導航', + 'auth_rule_index_base_info' => '首頁基礎數據', + 'auth_rule_index_this_year_sale' => '本年銷售詳情', + 'auth_rule_index_this_year_client' => '本年大客戶統計', + 'auth_rule_index_visit_client' => '最近訪問用戶統計', + 'auth_rule_index_online_admin' => '當前在線管理員', + + #權限 + 'auth_user_management' => '用戶管理', + 'auth_user_list' => '用戶列表', + 'auth_view' => '查看', + 'auth_add' => '新增', + 'auth_user_details' => '用戶詳情', + 'auth_management' => '管理', + 'auth_delete' => '刪除', + 'auth_user_host' => '用戶產品', + 'auth_recharge_record' => '充值記錄', + 'auth_user_order' => '用戶訂單', + 'auth_user_transaction' => '用戶流水', + 'auth_user_log' => '用戶日誌', + 'auth_business_management' => '業務管理', + 'auth_order_management' => '訂單管理', + 'auth_marker_payment' => '標記支付', + 'auth_adjustment_amount' => '調整金額', + 'auth_host_management' => '產品管理', + 'auth_host_details' => '產品詳情', + 'auth_module_management' => '模塊管理', + 'auth_transaction' => '交易流水', + 'auth_product_management' => '商品管理', + 'auth_product_group' => '商品分組', + 'auth_server_management' => '接口管理', + 'auth_server_group' => '接口分組', + 'auth_update' => '修改', + 'auth_system_settings' => '系統設置', + 'auth_login_settings' => '登錄設置', + 'auth_admin_settings' => '管理員設置', + 'auth_admin_group' => '管理員分組', + 'auth_security_settings' => '驗證碼設置', + 'auth_currency_settings' => '貨幣設置', + 'auth_payment_gateway' => '支付接口', + 'auth_enable_disable' => '啟用/停用', + 'auth_install_uninstall_config' => '安裝/卸載/配置', + 'auth_notice' => '通知接口', + 'auth_sms_notice' => '短信通知', + 'auth_template_management' => '模板管理', + 'auth_email_notice' => '郵件通知', + 'auth_send_settings' => '發送設置', + 'auth_task' => '任務', + 'auth_log' => '日誌', + 'auth_system_log' => '系統日誌', + 'auth_notice_log' => '通知日誌', + 'auth_auto' => '自動化', + 'auth_plugin' => '插件', + 'auth_plugin_list' => '插件列表', + 'auth_nav_management' => '導航管理', + 'auth_index' => '首頁', + 'auth_index_pendant' => '首頁挂件', + 'auth_index_base_info' => '首頁基礎數據', + 'auth_index_this_year_sale' => '本年銷售詳情', + 'auth_index_this_year_client' => '本年大客戶統計', + 'auth_index_visit_client' => '最近訪問用戶統計', + 'auth_index_online_admin' => '當前在線管理員', + + # 導航 + 'nav_user_management' => '用戶管理', + 'nav_user_list' => '用戶列表', + 'nav_business_management' => '業務管理', + 'nav_order_management' => '訂單管理', + 'nav_host_management' => '產品管理', + 'nav_transaction' => '交易流水', + 'nav_product_management' => '商品管理', + 'nav_server_management' => '接口管理', + 'nav_server_group' => '接口分組', + 'nav_system_settings' => '系統設置', + 'nav_admin_settings' => '管理員設置', + 'nav_security_settings' => '驗證碼設置', + 'nav_currency_settings' => '貨幣設置', + 'nav_payment_gateway' => '支付接口', + 'nav_notice' => '通知接口', + 'nav_sms_notice' => '短信通知', + 'nav_email_notice' => '郵件通知', + 'nav_send_settings' => '發送設置', + 'nav_management' => '管理', + 'nav_task' => '任務', + 'nav_log' => '日誌', + 'nav_auto' => '自動化', + 'nav_plugin' => '插件', + 'nav_plugin_list' => '插件列表', + 'nav_navigation' => '導航管理', + 'nav_real_name_approval' => '實名認證', + 'nav_upstream_management' => '上下游管理', + 'nav_supplier' => '供應商管理', + 'nav_upstream_order' => '上游訂單管理', + 'nav_upstream_product' => '上游產品管理', + 'nav_upstream_goods' => '上游商品管理', + 'nav_template' => '官網反饋', + + + + # 日誌 + 'admin_enable_user' => '{admin}啟用用戶{client}', + 'admin_disable_user' => '{admin}禁用用戶{client}', + 'admin_delete_user' => '{admin}刪除用戶{client}', + 'admin_modify_user_profile' => '{admin}將{client}的{description}', + 'admin_delete_user_host' => '{admin}將{client}的產品{host}刪除', + 'admin_batch_delete_user_host' => '{admin}將{client}的產品{host}批量刪除', + 'admin_adjust_user_order_price' => '{admin}將{client}的訂單{order}的價格{old}改為{new}', + 'admin_mark_user_order_payment_status' => '{admin}將{client}的訂單{order}標記為已付款', + 'admin_delete_user_order' => '{admin}將{client}的訂單{order}刪除', + 'admin_delete_transaction' => '{admin}刪除交易流水{transaction},流水所屬用戶為{client}', + 'admin_add_transaction' => '{admin}新增交易流水{transaction},流水所屬用戶為{client}', + 'admin_create_new_user' => '{admin}新建用戶{client}', + 'admin_create_new_purchase_order' => '{admin}新建新購訂單{order},訂單用戶為{client}', + 'admin_create_upgrade_order' => '{admin}新建升降級訂單{order},訂單用戶為{client}', + 'admin_create_renew_order' => '{admin}新建續費訂單{order},訂單用戶為{client}', + 'admin_create_artificial_order' => '{admin}新建人工訂單{order},訂單用戶為{client}', + 'admin_edit_email_template' => '{admin}編輯郵件模板:{template}', + 'admin_delete_email_template' => '{admin}刪除郵件模板:{template}', + 'admin_create_email_template' => '{admin}創建郵件模板:{template}', + 'admin_retry_task' => '{admin}重試任務:{task}{description}', + 'admin_configuration_system' => '{admin}將系統設置的{description}', + 'admin_configuration_login' => '{admin}將登錄設置的{description}', + 'admin_configuration_security' => '{admin}將驗證碼設置的{description}', + 'admin_configuration_currency' => '{admin}將貨幣設置的{description}', + 'admin_configuration_cron' => '{admin}將自動化設置的{description}', + 'admin_configuration_send' => '{admin}將默認通知接口設置的{description}', + 'admin_old_to_new' => '{field}的{old}改為{new}', + 'admin_sms_template_log_create' => '{admin}短信接口"{sms_name}"創建模板"{sms_title}"成功', + 'admin_sms_template_log_update' => '{admin}短信接口"{sms_name}"模板修改:{description}', + 'admin_sms_template_log_delete' => '{admin}短信接口"{sms_name}"模板刪除"{sms_title}"成功', + 'admin_notice_send_log_update' => '{admin}發送設置,{description}', + 'sub_account' => '(子賬戶)', + 'admin_refund_user_order_credit' => '{admin}對{client}的訂單{order}操作退款,退款到餘額,退款金額:{amount}', + 'admin_refund_user_order_transaction' => '{admin}對{client}的訂單{order}操作退款,退款到流水{transaction},退款金額:{amount}', + 'admin_apply_credit_to_user_order' => '{admin}應用餘額到{client}的訂單{order},應用金額:{amount}', + 'admin_remove_credit_from_user_order' => '{admin}從{client}的訂單{order}移除餘額,移除金額:{amount}', + 'admin_delete_refund_record' => '{admin}刪除退款記錄{refund_record}', + 'admin_adjust_user_order_gateway' => '{admin}將{client}的訂單{order}的支付方式{old}改為{new}', + 'admin_adjust_user_order_notes' => '{admin}將{client}的訂單{order}的備註{old}改為{new}', + + 'client_username' => '姓名', + 'client_email' => '郵箱', + 'client_phone_code' => '國際電話區號', + 'client_phone' => '手機號', + 'client_company' => '公司', + 'client_country' => '國家', + 'client_address' => '地址', + 'client_language' => '語言', + 'client_notes' => '備註', + + 'host_product' => '商品', + 'host_server' => '接口', + 'host_name' => '標識', + 'host_notes' => '備註', + 'host_first_payment_amount' => '訂購金額', + 'host_renew_amount' => '續費金額', + 'host_billing_cycle' => '計費方式', + 'host_billing_cycle_free' => '免費', + 'host_billing_cycle_onetime' => '一次性', + 'host_billing_cycle_recurring_prepayment' => '週期先付', + 'host_billing_cycle_recurring_postpaid' => '週期後付', + 'host_active_time' => '開通時間', + 'host_due_time' => '到期時間', + 'host_status' => '狀態', + 'host_status_Unpaid' => '未付款', + 'host_status_Pending' => '開通中', + 'host_status_Active' => '使用中', + 'host_status_Suspended' => '已暫停', + 'host_status_Deleted' => '已刪除', + 'host_status_Failed' => '開通失敗', + 'host_status_Cancelled' => '已取消', + + 'admin_modify_host' => '{admin}將{host}的{description}', + + + # 通用描述 + 'log_admin_update_description' => '{field}從{old}改為{new}', + + 'log_admin_login' => '{admin}登錄系統', + 'log_admin_login_not_exist' => '{admin}登錄系統失敗,管理員不存在', + 'log_admin_login_disabled' => '{admin}登錄系統失敗,已被禁用', + 'log_admin_login_password_error' => '{admin}登錄系統失敗,密碼不正確', + 'log_admin_logout' => '{admin}註銷登錄', + 'log_login_by_client' => '{admin}用{client}登錄前台系統', + 'log_create_admin' => '{admin}添加管理員{name}', + 'log_update_admin' => '{admin}修改管理員信息{name}:{description}', + 'log_update_admin_description' => '{field}為{content}', + 'admin_disable_admin' => '{admin}啟用管理員{name}', + 'admin_enable_admin' => '{admin}禁用管理員{name}', + 'admin_delete_admin' => '{admin}刪除管理員{name}', + 'admin_create_admin_role' => '{admin}添加人員分組{name}', + 'admin_update_admin_role' => '{admin}修改人員分組{name}', + 'admin_delete_admin_role' => '{admin}刪除人員分組{name}', + 'log_change_password' => '修改密碼', + + 'admin_name' => '用戶名', + 'admin_password' => '密碼', + 'admin_email' => '郵箱', + 'admin_nickname' => '名稱', + 'admin_status' => '狀態', + 'admin_role_id' => '分組ID', + + 'log_admin_create_product' => '{admin}新增商品{product}', + 'log_admin_delete_product' => '{admin}刪除商品{product}', + 'log_admin_hidden_product' => '{admin}隱藏商品{product}', + 'log_admin_show_product' => '{admin}顯示商品{product}', + 'log_admin_update_product' => '{admin}修改商品{product}:{description}', + 'log_admin_update_product_upgrade_product' => '升級商品ID{old}為{new}', + 'log_admin_copy_product' => '{admin}複製商品{product}', + + 'field_product_name' => '名稱', + 'field_product_product_group_id' => '分組ID', + 'field_product_description' => '描述', + 'field_product_hidden' => '是否隱藏', + 'field_product_stock_control' => '庫存控制', + 'field_product_qty' => '庫存數量', + 'field_product_creating_notice_sms' => '開通中短信通知是否開啟', + 'field_product_creating_notice_sms_api' => '開通中短信通知接口', + 'field_product_creating_notice_sms_api_template' => '開通中短信通知接口模板', + 'field_product_created_notice_sms' => '已開通短信通知是否開啟', + 'field_product_created_notice_sms_api' => '已開通短信通知接口', + 'field_product_created_notice_sms_api_template' => '已開通短信通知接口模板', + 'field_product_creating_notice_mail' => '開通中郵件通知是否開啟', + 'field_product_creating_notice_mail_template' => '開通中郵件通知模板', + 'field_product_created_notice_mail_template' => '已開通郵件通知模板', + 'field_product_pay_type' => '付款類型', + 'field_product_auto_setup' => '是否自動開通', + 'field_product_type' => '關聯類型', + 'field_product_rel_id' => '關聯ID', + + 'log_admin_create_product_group' => '{admin}新增商品分組{product_group}', + 'log_admin_update_product_group' => '{admin}修改商品分組名稱{old}為{new}', + 'log_admin_delete_product_group' => '{admin}刪除商品分組{product_group}', + 'log_admin_hidden_product_group' => '{admin}隱藏商品分組{product_group}', + 'log_admin_show_product_group' => '{admin}顯示商品分組{product_group}', + + 'log_admin_plugin_gateway' => '支付', + 'log_admin_plugin_sms' => '短信', + 'log_admin_plugin_mail' => '郵件', + 'log_admin_plugin_addon' => '插件', + 'log_admin_install_plugin' => '{admin}安裝{module}接口:{name}', + 'log_admin_uninstall_plugin' => '{admin}卸載{module}接口:{name}', + 'log_admin_enable_plugin' => '{admin}啟用{module}接口:{name}', + 'log_admin_disable_plugin' => '{admin}禁用{module}接口:{name}', + 'log_admin_config_plugin' => '{admin}配置{module}接口:{name}', + 'log_admin_upgrade_plugin' => '{admin}升級{module}接口:{name}', + + # 用戶管理 + 'client_is_not_exist' => '用戶不存在', + 'client_is_disabled' => '用戶已被禁用', + 'client_name_cannot_exceed_20_chars' => '用戶姓名最多不能超過20個字符', + 'please_enter_vaild_email' => '請輸入正確的郵箱', + 'email_has_been_registered' => '郵箱已被註冊', + 'please_select_phone_code' => '請選擇國際電話區號', + 'please_enter_vaild_phone' => '請輸入正確的手機號', + 'phone_has_been_registered' => '手機號已被註冊', + 'please_enter_password' => '請輸入密碼', + 'password_formatted_incorrectly' => '密碼格式錯誤,需為6~32位的字符', + 'please_enter_password_again' => '請重複輸入密碼', + 'passwords_not_match' => '兩次輸入的密碼不一致', + 'company_cannot_exceed_255_chars' => '公司最多不能超過255個字符', + 'country_cannot_exceed_100_chars' => '國家最多不能超過100個字符', + 'address_cannot_exceed_255_chars' => '地址最多不能超過255個字符', + 'notes_cannot_exceed_1000_chars' => '備註最多不能超過1000個字符', + + # 用戶餘額管理 + 'insufficient_credit_deduction_failed' => '用戶餘額不足,扣費失敗', + 'please_enter_amount' => '請輸入金額', + 'amount_formatted_incorrectly' => '金額格式錯誤', + 'please_enter_notes' => '請輸入備註', + + # 訂單管理 + 'order_is_not_exist' => '訂單不存在', + 'order_item_is_not_exist' => '訂單子項不存在', + 'order_item_cannot_update' => '非人工調整的訂單子項不可修改', + 'order_item_cannot_delete' => '非人工調整的訂單子項不可刪除', + 'order_amount_adjustment_failed' => '訂單金額調整失敗,調整後的待付金額不得小於0', + 'please_select_order_type' => '請選擇訂單類型', + 'order_type_error' => '訂單類型錯誤', + 'please_select_order_status' => '請選擇訂單狀態', + 'order_status_error' => '訂單狀態錯誤', + 'please_enter_description' => '請輸入描述', + 'description_cannot_exceed_1000_chars' => '描述最多不能超過1000個字符', + 'order_already_paid' => '訂單已付款,無需重複操作', + 'order_already_paid_cannot_adjustment_amount' => '訂單已付款,不可調整金額', + 'hosts_under_activation_in_the_order' => '訂單中存在開通中的產品,不可刪除訂單', + 'please_select_order_delete_host' => '請選擇是否刪除訂單下的產品', + 'client_credit_is_0' => '餘額為0', + 'client_credit_is_used' => '您已使用過餘額', + 'recharge_order_cannot_use_credit' => '充值訂單不可使用餘額', + 'active_host_can_be_upgraded' => '已開通的產品才可以升降級', + 'host_cannot_be_upgraded_to_the_product' => '該產品不可升降級到選擇的商品', + 'please_select_host' => '請選擇產品', + 'host_id_error' => '產品ID錯誤', + 'client_host_error' => '產品用戶和選擇的用戶不一致', + 'update_amount' => '調整金額', + 'order_not_support_refund' => '未付款的訂單不支持退款', + 'refund_amount_not_enough' => '訂單可退款金額不足', + 'order_not_support_apply_credit' => '訂單不支持應用餘額', + 'apply_credit_not_enough' => '應用餘額不得超過可應用餘額金額', + 'remove_credit_not_enough' => '扣除餘額不得超過已應用餘額金額', + 'order_apply_credit' => '應用餘額至訂單', + 'upgrade_refund' => '升降級退款', + 'order_refund' => '訂單#{id}退款', + 'order_cancel_refund' => '訂單#{id}取消退款', + 'order_overpayment' => '訂單超付,充值至餘額#{id}', + 'order_underpayment' => '少付,充值至餘額#{id}', + 'credit_payment' => '餘額支付', + 'order_remove_credit' => '訂單#{id}移除餘額', + 'recharge' => '充值', + + # 產品管理 + 'host_is_not_exist' => '產品不存在', + 'please_select_product' => '請選擇商品', + 'product_id_error' => '商品ID錯誤', + 'server_id_error' => '接口ID錯誤', + 'host_name_cannot_exceed_100_chars' => '產品標識最多不能超過100個字符', + 'please_enter_first_payment_amount' => '請輸入訂購金額', + 'first_payment_amount_formatted_incorrectly' => '訂購金額格式錯誤', + 'please_enter_renew_amount' => '請輸入續費金額', + 'renew_amount_formatted_incorrectly' => '續費金額格式錯誤', + 'please_select_billing_cycle' => '請選擇計費周期', + 'billing_cycle_error' => '計費周期錯誤', + 'please_select_host_status' => '請選擇產品狀態', + 'host_status_error' => '產品狀態錯誤', + 'active_time_formatted_incorrectly' => '開通時間格式錯誤', + 'due_time_formatted_incorrectly' => '到期時間格式錯誤', + 'order_is_paid_host_status_cannot_be_unpaid' => '訂單已付款,產品狀態不可修改為未付款', + 'order_is_unpaid_host_status_cannot_be_paid' => '訂單未付款,產品狀態不可修改為未付款以外的狀態', + 'order_is_paid_host_amount_cannot_update' => '訂單已付款,產品訂購金額不可修改', + 'host_opening_cannot_delete' => '開通中的產品不可刪除', + 'host_is_active' => '產品已開通', + 'host_is_suspended' => '產品已暫停', + 'host_is_not_active_cannot_suspend' => '產品未開通,不能暫停', + 'host_is_already_unsuspend' => '產品已解除暫停', + 'host_status_not_need_unsuspend' => '當前狀態不需要解除暫停', + 'please_select_suspend_type' => '請選擇暫停類型', + 'suspend_reason_length_cannot_exceed_1000_words' => '暫停原因不能超過1000個字', + + # 流水管理 + 'transaction_is_not_exist' => '交易流水不存在', + 'please_select_gateway' => '請選擇支付方式', + 'please_enter_transaction_number' => '請輸入交易流水號', + 'transaction_number_formatted_incorrectly' => '交易流水號格式錯誤,只能為數字和字母', + 'please_select_client' => '請選擇用戶', + 'client_id_error' => '用戶ID錯誤', + 'gateway_is_not_exist' => '支付方式不存在', + + # 任務管理 + 'task_is_not_exist' => '任務不存在', + 'task_has_been_retried' => '任務已經發起重試,不可再次發起', + 'only_failed_task_can_retry' => '失敗的任務才可以發起重試', + + # 系統設置 + 'configuration_log_switch_1' =>'開啟', + 'configuration_log_switch_0' =>'關閉', + 'configuration_log_lang_admin' =>'後台默認語言', + 'configuration_log_lang_home' =>'前台默認語言', + 'configuration_log_lang_home_open' =>'是否允許用戶選擇語言', + 'configuration_log_lang_home_open_0' =>'禁止', + 'configuration_log_lang_home_open_1' =>'允許', + 'configuration_log_maintenance_mode' =>'維護模式', + 'configuration_log_maintenance_mode_message' =>'維護模式內容', + 'configuration_log_website_name' =>'網站名稱', + 'configuration_log_website_url' =>'網站域名地址', + 'configuration_log_terms_service_url' =>'服務條款地址', + 'configuration_log_terms_privacy_url' =>'隱私條款地址', + 'configuration_log_system_logo' =>'系統LOGO', + 'configuration_log_enterprise_address' =>'企業地址', + 'configuration_log_contact_email' =>'聯繫郵箱', + 'configuration_log_enterprise_website' =>'企業網站', + 'configuration_log_contact_telephone' =>'聯繫電話', + 'configuration_log_postal_code' =>'郵政編碼', + 'configuration_admin_default_language_cannot_empty' => '後台默認語言不能為空', + 'configuration_admin_default_language_error' => '後台默認語言設置錯誤', + 'configuration_home_default_language_open_cannot_empty' => '前台多語言開關不能為空', + 'configuration_home_default_language_error' => '前台多語言設置錯誤', + 'configuration_home_default_language_open' => '前台多語言開關值只能是1或0', + 'configuration_home_default_language_cannot_empty' => '前台默認語言不能為空', + 'configuration_maintenance_mode_cannot_empty' => '維護模式開關不能為空', + 'configuration_maintenance_mode' => '維護模式開關值只能是1或0', + 'configuration_website_name' => '網站名稱不能為空', + 'configuration_website_name_cannot_exceed_255_chars' => '網站名稱最多不能超過255個字符', + 'configuration_website_url' => '網站域名地址不能為空', + 'configuration_website_url_cannot_exceed_255_chars' => '網站域名地址最多不能超過255個字符', + 'configuration_website_url_error' => '請輸入這樣https://wwww.a.com的域名地址', + 'configuration_terms_service_url' => '服務條款地址不能為空', + 'configuration_terms_service_url_cannot_exceed_255_chars' => '服務條款地址最多不能超過255個字符', + 'configuration_terms_privacy_url' => '隱私條款地址不能為空', + 'configuration_terms_privacy_url_cannot_exceed_255_chars' => '隱私條款地址最多不能超過255個字符', + 'configuration_system_logo' => '請選擇系統LOGO', + 'configuration_enterprise_address' => '請填寫企業地址', + 'configuration_contact_email' => '請填寫聯繫郵箱', + 'configuration_enterprise_website' => '請填寫企業網站', + 'configuration_contact_telephone' => '請填寫聯繫電話', + 'configuration_postal_code' => '請填寫郵政編碼', + + + # 登錄設置 + 'configuration_log_register_phone' =>'手機是否支持註冊', + 'configuration_log_register_email' =>'郵箱是否支持註冊', + 'configuration_log_home_login_check_ip' =>'前台登錄檢查IP', + 'configuration_log_admin_login_check_ip' =>'後台登錄檢查IP', + 'configuration_log_login_phone_verify' =>'手機是否支持免密碼登錄', + 'configuration_log_register_phone_1' =>'是', + 'configuration_log_register_email_0' =>'否', + 'configuration_log_home_login_check_ip_1' =>'是', + 'configuration_log_home_login_check_ip_0' =>'否', + 'configuration_log_admin_login_check_ip_1' =>'是', + 'configuration_log_admin_login_check_ip_0' =>'否', + 'configuration_register_email_cannot_empty' => '郵箱註冊開關不能為空', + 'configuration_register_email' => '郵箱註冊開關值只能是1或0', + 'configuration_register_phone_cannot_empty' => '手機號註冊開關不能為空', + 'configuration_register_phone' => '手機號註冊開關值只能是1或0', + 'configuration_login_phone_verify_cannot_empty' => '手機號登錄短信驗證開關不能為空', + 'configuration_login_phone_verify' => '手機號登錄短信驗證開關值只能是1或0', + # 驗證碼設置 + 'configuration_log_captcha_client_register' =>'新用戶註冊啟用圖形驗證碼', + 'configuration_log_captcha_client_login' =>'用戶登錄啟用圖形驗證碼', + 'configuration_log_captcha_admin_login' =>'後台系統登錄啟用圖形驗證碼', + 'configuration_log_captcha_client_login_error' =>'客戶登錄失敗時驗證碼', + 'configuration_log_captcha_client_login_error_1' =>'失敗三次後顯示', + 'configuration_log_captcha_client_login_error_0' =>'始終顯示', + 'configuration_log_captcha_width' =>'圖形驗證碼寬度', + 'configuration_log_captcha_height' =>'圖形驗證碼高度', + 'configuration_log_captcha_length' =>'圖形驗證碼字符長度', + 'configuration_log_code_client_email_register' =>'郵箱註冊數字驗證碼', + 'configuration_captcha_client_register_cannot_empty' => '客戶註冊圖形驗證碼開關不能為空', + 'configuration_captcha_client_register' => '客戶註冊圖形驗證碼開關值只能是1或0', + 'configuration_captcha_client_login_cannot_empty' => '客戶登錄圖形驗證碼開關不能為空', + 'configuration_captcha_client_login' => '客戶登錄圖形驗證碼開關值只能是1或0', + 'configuration_captcha_client_login_error_cannot_empty' => '客戶登錄失敗圖形驗證碼開關不能為空', + 'configuration_captcha_client_login_error' => '客戶登錄失敗圖形驗證碼開關值只能是1或0', + 'configuration_captcha_admin_login_cannot_empty' => '管理員登錄圖形驗證碼開關不能為空', + 'configuration_captcha_admin_login' => '管理員登錄圖形驗證碼開關值只能是1或0', + 'configuration_captcha_width_cannot_empty' => '圖形驗證碼寬度不能為空', + 'configuration_captcha_width' => '圖形驗證碼寬度只能在200到400之間的數字', + 'configuration_captcha_height_cannot_empty' => '圖形驗證碼高度不能為空', + 'configuration_captcha_height' => '圖形驗證碼高度只能在50到100之間的數字', + 'configuration_captcha_length_cannot_empty' => '圖形驗證碼字符長度不能為空', + 'configuration_captcha_length' => '圖形驗證碼字符長度只能是在4到6之間的整數', + # 貨幣設置 + 'configuration_log_currency_code' =>'貨幣代碼', + 'configuration_log_currency_prefix' =>'貨幣符號', + 'configuration_log_currency_suffix' =>'貨幣後綴', + 'configuration_log_recharge_open' =>'啟用充值', + 'configuration_log_recharge_min' =>'單筆最小金額', + 'configuration_currency_code_cannot_empty' => '貨幣代碼不能為空', + 'configuration_currency_prefix_cannot_empty' => '貨幣符號不能為空', + 'configuration_currency_suffix_cannot_empty' => '貨幣後綴不能為空', + 'configuration_recharge_open_cannot_empty' => '啟用充值開關不能為空', + 'configuration_recharge_open' => '啟用充值開關值只能是1或0', + 'configuration_recharge_min_float' => '單筆最小金額必須大於零的數字', + 'configuration_recharge_max_egt_recharge_min' => '單筆最大金額大於等於單筆最小金額', + # 定時任務設置 + 'configuration_log_cron_due_suspend_swhitch' =>'產品暫停', + 'configuration_log_cron_due_unsuspend_swhitch' =>'產品解除暫停', + 'configuration_log_cron_due_terminate_swhitch' =>'產品刪除', + 'configuration_log_cron_due_renewal_first_swhitch' =>'第一次續費提醒', + 'configuration_log_cron_due_renewal_second_swhitch' =>'第二次續費提醒', + 'configuration_log_cron_overdue_first_swhitch' =>'第一次逾期提醒', + 'configuration_log_cron_overdue_second_swhitch' =>'第二次逾期提醒', + 'configuration_log_cron_overdue_third_swhitch' =>'第三次逾期提醒', + 'configuration_log_cron_ticket_close_swhitch' =>'已回復工單關閉', + 'configuration_log_cron_aff_swhitch' =>'推廣成果', + 'configuration_log_cron_order_overdue_swhitch' =>'訂單未付款通知', + 'configuration_log_cron_order_unpaid_delete_swhitch' =>'訂單自動刪除', + 'configuration_log_cron_due_day' =>'天', + 'configuration_log_cron_due_hour' =>'小時', + 'configuration_cron_due_suspend_day_cannot_empty' => '產品到期暫停天數大於或等於0的整數', + 'configuration_cron_due_terminate_day_cannot_empty' => '產品到期刪除天數大於或等於0的整數', + 'configuration_cron_due_renewal_first_day_cannot_empty' => '續費第一次提醒天數大於或等於0的整數', + 'configuration_cron_due_renewal_second_day_cannot_empty' => '續費第二次提醒天數大於或等於0的整數', + 'configuration_cron_overdue_first_day_cannot_empty' => '產品逾期第一次提醒天數大於或等於0的整數', + 'configuration_cron_overdue_second_day_cannot_empty' => '產品逾期第二次提醒天數大於或等於0的整數', + 'configuration_cron_overdue_third_day_cannot_empty' => '產品逾期第三次提醒天數大於或等於0的整數', + 'configuration_cron_ticket_close_day_cannot_empty' => '已回复狀態的工單提醒小時大於或等於0的整數', + 'configuration_cron_order_overdue_day_cannot_empty' => '訂單未付款通知天數大於或等於0的整數', + 'configuration_cron_order_unpaid_delete_day_cannot_empty' => '訂單未付款自動刪除天數大於或等於0的整數', + 'configuration_cron_due_suspend_swhitch' => '產品到期暫停開關值只能是1或0', + 'configuration_cron_due_unsuspend_swhitch' => '自動解除暫停開關值只能是1或0', + 'configuration_cron_due_terminate_swhitch' => '產品到期刪除開關值只能是1或0', + 'configuration_cron_due_renewal_first_swhitch' => '續費第一次提醒開關值只能是1或0', + 'configuration_cron_due_renewal_second_swhitch' => '續費第二次提醒開關值只能是1或0', + 'configuration_cron_overdue_first_swhitch' => '產品逾期第一次提醒開關值只能是1或0', + 'configuration_cron_overdue_second_swhitch' => '產品逾期第二次提醒開關值只能是1或0', + 'configuration_cron_overdue_third_swhitch' => '產品逾期第三次提醒開關值只能是1或0', + 'configuration_cron_ticket_close_swhitch' => '自動關閉工單開關值只能是1或0', + 'configuration_cron_aff_swhitch' => '推介月報開關值只能是1或0', + 'configuration_cron_order_overdue_swhitch' => '訂單未付款通知開關值只能是1或0', + 'configuration_cron_order_unpaid_delete_swhitch' => '訂單自動刪除開關值只能是1或0', + + 'configuration_cron_suspend_day_less_terminate_day' => '產品到期暫停天數應小於產品到期刪除天數', + 'configuration_cron_renewal_first_day_less_renewal_second_day' => '第一次續費提醒天數應大於第二次續費提醒天數', + 'configuration_cron_overdue_day_less_terminate_day' => '第一次逾期提醒天數應小於第二次逾期提醒天數小於第三次逾期提醒天數小於產品到期刪除天數', + + # 主題設置 + 'configuration_theme_admin_theme_cannot_empty' => '後台主題不能為空', + 'configuration_theme_admin_theme_cannot_error' => '後台主題錯誤', + 'configuration_theme_clientarea_theme_cannot_empty' => '會員中心主題不能為空', + 'configuration_theme_clientarea_theme_cannot_error' => '會員中心主題錯誤', + 'configuration_theme_web_theme_cannot_empty' => '官網主題不能為空', + 'configuration_theme_web_theme_cannot_error' => '官網主題錯誤', + + # 實名設置 + 'configuration_certification_open_require' => '實名認證是否開啟必填', + 'configuration_certification_approval_require' => '人工複審必填', + 'configuration_certification_notice_require' => '審批通過後,是否通知客戶必填', + 'configuration_certification_update_client_name_require' => '是否自動更新姓名必填', + 'configuration_certification_upload_require' => '是否需要上傳證件照必填', + 'configuration_certification_update_client_phone_require' => '手機一致性必填', + 'configuration_certification_uncertified_suspended_host_require' => '未認證暫停產品必填', + + + # 管理員與管理員分組 + 'super_admin_cannot_delete' => '超級管理員不可刪除', + 'super_admin_cannot_opreate' => '超級管理員不可操作', + 'super_admin_role_cannot_delete' => '超級管理員分組不可刪除', + 'admin_is_not_exist' => '管理員不存在', + 'admin_password_is_same' => '新舊密碼一樣', + 'admin_role_name_cannot_empty' => '管理員分組名稱不能為空', + 'admin_role_name_at_least_1_chars' => '管理員分組名稱至少1個字符', + 'admin_role_name_cannot_exceed_50_chars' => '管理員分組名稱最多不能超過50個字符', + 'admin_role_description_cannot_exceed_1_chars' => '管理員分組描述至少1個字符', + 'admin_role_description_cannot_exceed_1000_chars' => '管理員分組描述最多不能超過1000個字符', + 'admin_role_create_success' => '已成功添加管理員分組', + 'admin_role_is_not_exist' => '管理員分組不存在', + 'admin_role_has_admin_cannot_delete' => '管理員分組下有管理員,無法刪除', + 'please_enter_admin_name' => '請填寫管理員用戶名', + 'admin_name_at_least_1_chars' => '管理員用戶名至少1個字符', + 'admin_name_cannot_exceed_50_chars' => '管理員用戶名最多不能超過50個字符', + 'admin_name_unique' => '管理員用戶名已存在', + 'admin_email_unique' => '管理員郵箱已存在', + 'please_enter_admin_nickname' => '請輸入管理員名稱', + 'admin_nickname_cannot_exceed_20_chars' => '管理員名稱最多不能超過20個字符', + 'admin_nickname_at_least_1_chars' => '管理員名稱至少1個字符', + 'admin_is_disabled' => '管理員已被禁用', + 'admin_name_or_password_error' => '賬號或密碼錯誤', + 'auth_error' => '權限錯誤', + 'supper_admin_cannot_update_role' => '不可修改超級管理員所屬分組', + 'default_admin_role_cannot_update' => '默認管理員分組不可修改', + + # 插件 + 'plugin_is_not_exist' => '插件不存在', + 'plugin_is_installed' => '插件已安裝', + 'plugin_information_is_missing' => '插件信息缺失', + 'plugin_install_success' => '插件安裝成功', + 'plugin_install_fail' => '插件安裝失敗', + 'plugin_pre_install_fail' => '插件預安裝失敗', + 'plugin_uninstall_success' => '插件卸載成功', + 'plugin_uninstall_fail' => '插件卸載失敗', + 'plugin_uninstall_pre_fail' => '插件預卸載失敗', + 'plugin_uninstall_cannot' => '默認插件不能卸載', + 'plugin_disabled_cannot' => '默認插件不能禁用', + 'plugin_upgrade_pre_fail' => '插件預升級失敗', + 'plugin_upgrade_success' => '插件升級成功', + 'plugin_upgrade_fail' => '插件升級失敗', + 'plugin_version_information_is_missing' => '插件版本信息缺失', + 'plugin_can_not_upgrade' => '插件不可升級', + 'plugin_new_version_get_fail' => '插件最新版本獲取失敗', + + # 商品與商品分組 + 'product_group_is_not_exist' => '商品分組不存在', + 'please_enter_product_group_name' => '請填寫商品分組名稱', + 'product_group_name_cannot_exceed_100_chars' => '商品分組名稱最多不能超過100個字符', + 'product_group_has_son_cannot_delete' => '商品分組下存在子分組,不可刪除', + 'product_group_has_product_cannot_delete' => '商品分組下存在商品,不可刪除', + 'please_enter_product_group_first' => '請傳入一級分組ID', + 'please_select_product_group_second' => '請選擇商品二級分組', + 'please_enter_product_name' => '請填寫商品名稱', + 'product_name_cannot_exceed_100_chars' => '商品名稱最多不能超過100個字符', + 'product_is_not_exist' => '商品不存在', + 'product_hidden' => '商品是否隱藏只能為0或1', + 'product_stock_control' => '商品是否開啟庫存控制只能為0或1', + 'product_creating_notice_sms' => '商品開通中短信通知是否開啟只能為0或1', + 'product_created_notice_sms' => '商品已開通短信通知是否開啟只能為0或1', + 'product_creating_notice_mail' => '商品開通中郵件通知是否開啟只能為0或1', + 'product_created_notice_mail' => '商品已開通郵件通知是否開啟只能為0或1', + 'product_qty_num' => '商品庫存為自然數', + 'product_creating_notice_sms_cannot_use' => '開通中短信通知接口不可用', + 'product_created_notice_sms_cannot_use' => '已開通短信通知接口不可用', + 'product_creating_notice_mail_cannot_use' => '開通中通知郵件接口不可用', + 'product_created_notice_mail_cannot_use' => '已開通通知郵件接口不可用', + 'product_creating_notice_sms_api_template_is_not_exist' => '開通中短信通知模板不存在', + 'product_created_notice_sms_api_template_is_not_exist' => '已開通短信通知模板不存在', + 'product_creating_notice_mail_template_is_not_exist' => '開通中郵件通知模板不存在', + 'product_created_notice_mail_template_is_not_exist' => '已開通郵件通知模板不存在', + 'pre_product_id_require' => '移動後前一個商品ID必傳', + 'pre_product_id_integer' => '移動後前一個商品ID為整數', + 'product_group_id_require' => '移動後的商品組ID必傳', + 'product_group_id_integer' => '移動後的商品組ID為整數', + 'product_is_not_in_product_group' => '移動後的商品不在移動後商品分組下', + 'product_group_id_first_greater_than_0' => '一級分組ID大於0', + 'product_description_max' => '商品描述不超過1000個字符', + 'product_pay_type_require' => '商品費用類型必須', + 'product_pay_type_in' => '商品費用類型為free,onetime,recurring_prepayment,recurring_postpaid', + 'product_auto_setup_require' => '自動開通設置必須', + 'product_auto_setup_in' => '自動開通設置為0或1', + 'product_type_in' => '接口類型為server或server_group', + 'product_type_require' => '接口類型必須', + 'product_rel_id_require' => '關聯ID必須', + 'product_rel_id_integer' => '關聯ID只能是整數', + 'parent_product_id_integer' => '父級商品ID只能是整數', + 'product_upgrade_product_is_not_exist' => '升級商品不存在', + 'product_upgrade_product_cannot_self' => '升級商品不能是本商品', + 'parent_product_is_not_exist' => '父級商品不存在', + 'product_has_host' => '商品已使用,不可刪除', + 'pre_product_group_id_require' => '移動後前一個分組ID必傳', + 'pre_product_group_id_integer' => '移動後前一個分組ID為整數', + 'pre_first_product_group_id_require' => '移動後的一級分組ID必傳', + 'pre_first_product_group_id_integer' => '移動後的一級分組ID為整數', + 'first_product_group_is_not_exist' => '移動後的一級分組不存在', + 'pre_product_group_is_not_exist' => '移動後前一個分組不存在', + 'first_product_group_id_is_not_exist' => '一級分組不存在', + 'product_show_in' => '是否展示為0或1', + 'product_show_require' => '是否展示必須', + 'son_product_cannot_copy' => '子商品不支援複製', + + + # 郵件模板 + 'email_template_is_not_exist' => '郵件模板不存在', + 'please_enter_email_name' => '請輸入郵件名稱', + 'please_enter_email_subject' => '請輸入郵件標題', + 'email_name_cannot_exceed_100_chars' => '郵件名稱最多不能超過100個字符', + 'email_subject_cannot_exceed_100_chars' => '郵件標題最多不能超過100個字符', + 'please_enter_email_message' => '請輸入郵件內容', + 'email_cannot_be_empty' => '郵箱不能為空', + 'email_format_error' => '郵箱格式錯誤', + + # 短信模板 + 'sms_template_log_template_id' => '短信模板ID', + 'sms_template_log_type' => '模板類型', + 'sms_template_log_type_0' => '大陸', + 'sms_template_log_type_1' => '國際', + 'sms_template_log_title' => '模板標題', + 'sms_template_log_content' => '模版內容', + 'sms_template_log_notes' => '備註', + 'sms_template_log_status' => '狀態', + 'sms_template_log_status_0' => '未提交', + 'sms_template_log_status_1' => '審核中', + 'sms_template_log_status_2' => '通過', + 'sms_template_log_status_3' => '未通過', + 'sms_template_is_not_exist' => '短信模板不存在', + 'sms_template_review_before_sending' => '短信模板審核通過才能發短信', + 'sms_template_cannot_be_modified' => '短信模板狀態審核中,不能修改', + 'sms_please_enter_sms_type' => '請選擇短信模板區域', + 'sms_type_must' => '請選擇短信模板區域只能是1或0', + 'sms_title_cannot_empty' => '請輸入短信標題', + 'sms_title_cannot_exceed_50_chars' => '短信標題最多不能超過50個字符', + 'sms_please_enter_content' => '請輸入短信內容', + 'sms_content_cannot_exceed_255_chars' => '短信內容最多不能超過255個字符', + 'sms_notes_cannot_exceed_1000_chars' => '短信備註最多不能超過1000個字符', + 'sms_please_enter_sms_status' => '請選擇短信模板狀態', + 'sms_status_error' => '短信模板狀態錯誤,只能是0,2,3', + 'sms_area_code_must_be_integer' => '短信區號必須是整數', + 'sms_phone_number_cannot_be_empty' => '手機號不能為空', + 'sms_phone_number_must_be_integer' => '手機號必須是整數', + + # 短信/郵件發送 + 'send_notice_log_sms_global_name' => '短信國際接口', + 'send_notice_log_sms_global_template' => '短信國際接口模板', + 'send_notice_log_sms_name' => '短信國內接口', + 'send_notice_log_sms_template' => '短信國內接口模板', + 'send_notice_log_email_name' => '郵件接口', + 'send_notice_log_email_template' => '郵件接口模板', + 'send_wrong_action_name' => '動作名稱錯誤', + 'send_sms_success' => '短信發送成功', + 'send_sms_error' => '短信發送失敗', + 'send_sms_area_code_error' => '區號錯誤', + 'send_sms_interface_is_not_exist' => '短信接口不存在', + 'send_sms_interface_not_supported' => '短信接口不支持', + 'send_sms_interface_is_not_exist_domestic' => '國內短信接口不存在', + 'send_sms_interface_is_disabled_domestic' => '國內短信接口已禁用', + 'send_sms_interface_not_installed_domestic' => '國內短信接口未安裝', + 'send_sms_interface_is_not_exist_global' => '國際短信接口不存在', + 'send_sms_interface_is_disabled_global' => '國際短信接口已禁用', + 'send_sms_interface_not_installed_global' => '國際短信接口未安裝', + 'send_sms_action_not_enabled' => '短信發送動作未開啟', + 'send_sms_interface_not_set_domestic' => '國內短信發送接口未設置', + 'send_sms_template_not_set_domestic' => '國內短信發送模板未設置', + 'send_sms_template_is_not_exist_domestic' => '國內短信模板不存在', + 'send_sms_interface_not_set_global' => '國際短信發送接口未設置', + 'send_sms_template_not_set_global' => '國際短信發送模板未設置', + 'send_sms_template_is_not_exist_global' => '國際短信模板不存在', + 'send_mail_success' => '郵件發送成功', + 'send_mail_error' => '郵件發送失敗', + 'send_mail_interface_is_not_exist' => '郵件接口不存在', + 'send_mail_interface_not_supported' => '郵件接口不支持', + 'send_mail_interface_is_disabled' => '郵件接口已禁用', + 'send_mail_interface_not_installed_' => '郵件接口未安裝', + 'send_mail_action_not_enabled' => '郵件發送動作未開啟', + 'send_mail_interface_not_set' => '郵件發送接口未設置', + 'send_mail_template_not_set' => '郵件發送模板未設置', + 'email_cancel_send' => '郵件取消發送', + 'sms_cancel_send' => '短信取消發送', + + + # 發送管理 + 'notice_action_code'=>'驗證碼', + 'notice_action_client_login_success'=>'用戶登錄', + 'notice_action_client_register_success'=>'用戶註冊', + 'notice_action_client_change_phone'=>'用戶更改手機', + 'notice_action_client_change_email'=>'用戶更改郵箱', + 'notice_action_client_change_password'=>'用戶更改密碼', + 'notice_action_order_create'=>'訂單創建', + 'notice_action_host_pending'=>'產品開通中', + 'notice_action_host_active'=>'開通成功', + 'notice_action_host_suspend'=>'產品暫停通知', + 'notice_action_host_unsuspend'=>'產品解除暫停通知', + 'notice_action_host_terminate'=>'產品刪除通知', + 'notice_action_host_upgrad'=>'產品升降級', + 'notice_action_admin_create_account'=>'超級管理員添加後台管理員', + 'notice_action_host_renewal_first'=>'第一次續費提醒', + 'notice_action_host_renewal_second'=>'第二次續費提醒', + 'notice_action_host_overdue_first'=>'逾期付款第一次提醒', + 'notice_action_host_overdue_second'=>'逾期付款第二次提醒', + 'notice_action_host_overdue_third'=>'逾期付款第三次提醒', + 'notice_action_order_overdue'=>'訂單未付款通知', + 'notice_action_admin_order_amount'=>'訂單金額修改', + 'notice_action_order_pay'=>'訂單支付通知', + 'notice_action_order_recharge'=>'充值成功通知', + 'notice_setting_sms_global_template_error' => '國際短信模板ID錯誤', + 'notice_setting_sms_template_error' => '國內短信模板ID錯誤', + 'notice_setting_email_template_error' => '郵件接口模板ID錯誤', + 'notice_setting_sms_enable_error' => '短信啟用參數只能是1或0', + 'notice_setting_email_enable_error' => '郵件啟用參數只能是1或0', + 'notice_setting_name_not_exist' => '動作名稱不能為空', + + # 接口管理 + 'module_error' => '模塊類型錯誤', + 'server_is_not_exist' => '接口不存在', + 'server_is_used_for_host_cannot_delete' => '產品正在使用該接口,不能刪除', + 'server_is_used_for_product_cannot_delete' => '商品正在使用該接口,不能刪除', + 'please_enter_server_name' => '請填寫接口名稱', + 'server_name_at_least_1_chars' => '接口名稱至少1個字符', + 'server_name_cannot_exceed_50_chars' => '接口名稱最多不能超過50個字符', + 'please_select_module' => '請選擇模塊類型', + 'module_at_least_1_chars' => '模塊類型至少1個字符', + 'module_cannot_exceed_100_chars' => '模塊類型最多不能超過100個字符', + 'please_enter_url' => '請填寫地址', + 'please_enter_an_right_url' => '請輸入正確的地址', + 'server_username_cannot_exceed_100_chars' => '用戶名最多不能超過100個字符', + 'server_password_cannot_exceed_100_chars' => '密碼最多不能超過100個字符', + 'server_status_only_zero_or_one' => '是否啟用只能是0或1', + 'select_server_used_or_not_found' => '所選接口已使用或不存在', + 'select_server_module_is_different' => '所選接口模塊不同', + 'server_group_not_found' => '接口分組不存在', + 'server_group_is_used_for_product_cannot_delete' => '商品正在使用該接口分組,不能刪除', + 'server_group_have_server_cannot_delete' => '該分組下有接口則不能刪除分組', + 'please_enter_server_group_name' => '請輸入接口分組名稱', + 'server_group_name_at_least_1_chars' => '接口分組名稱至少1個字符', + 'server_group_name_cannot_exceed_50_chars' => '接口分組名稱最多不能超過50個字符', + 'please_select_server' => '請選擇接口', + 'server_must_be_array' => '接口只能是數組', + 'server_group_have_multi_server_cannot_modify_one_server_module' => '接口所屬分組有其他接口,不能修改模塊類型', + + # 模塊功能 + 'undefined_test_connect_function' => '未定義測試連接方法', + 'module_file_is_not_exist' => '模塊文件不存在', + 'module_create_success' => '開通成功', + 'module_create_fail' => '開通失敗', + 'module_suspend_success' => '暫停成功', + 'module_suspend_fail' => '暫停失敗', + 'module_unsuspend_success' => '解除暫停成功', + 'module_unsuspend_fail' => '解除暫停失敗', + 'module_cannot_find_template_file' => '模塊找不到對應模板文件', + 'module_res_format_error' => '模塊返回值格式錯誤', + 'module_operate_success' => '操作成功', + 'module_operate_fail' => '操作失敗', + 'module_test_connect_success' => '連接成功', + 'module_test_connect_fail' => '連接失敗', + + # 系統升級 + 'get_new_version_failed' => '未獲取到最新系統版本號,請稍後重試', + 'package_has_downloaded' => '安裝包已下載', + 'root_cannot_read_write' => '根目錄不可讀/寫', + 'upgrade_cannot_read_write' => '升級目錄不可讀/寫', + 'version_is_last' => '您的系統已經是最新版本,無需升級', + 'open_remote_file_failed' => '打開遠程文件失敗! ', + 'download_sucesss' => '已成功下載', + 'download_failed' => '下載壓縮包失敗', + 'upgrade_download_not_exist' => '當前不存在升級下載任務', + 'not_login_market_no_license' => '未登錄應用商店,無識別碼', + 'not_order_service' => '未訂購服務', + + # 導航管理 + 'nav_is_not_exist' => '默認導航不存在', + 'product_error' => '商品錯誤', + 'nav_cannot_repeat_add' => '默認導航不可重複添加', + + # 首頁管理 + 'index_view' => '首頁查看', + 'one_year_ago' => '一年前', + 'day' => '天', + 'hour' => '小時', + 'minute' => '分鐘', + 'ago' => '前', + + # 實名認證 + 'certification_is_not_open' => '實名認證尚未開啟', + 'certification_approve' => '實名認證已通過', + 'certification_reject' => '實名認證已駁回', + 'certification_person_completed' => '賬號已完成個人認證', + 'certification_person_uncompleted' => '賬號未完成個人認證', + 'certification_plugin_name_require' => '請選擇實名接口', + 'certification_card_name_require' => '姓名必須', + 'certification_card_name_max' => '姓名不超過255個字符', + 'certification_card_type_require' => '證件類型必須', + 'certification_card_type_in' => '證件類型為0或1', + 'certification_card_number_require' => '證件號必須', + 'certification_card_number_max' => '證件號不超過255個字符', + 'certification_company_require' => '公司名稱必須', + 'certification_company_max' => '公司名稱不超過255個字符', + 'certification_company_organ_code_require' => '公司代碼必須', + 'certification_company_organ_code_max' => '公司代碼不超過255個字符', + 'certification_company_completed' => '賬號已完成企業認證', + 'certification_company_pending' => '企業認證待審核,不可提交', + 'certification_company_post' => '企業認證已提交資料,不可提交', + 'certification_card_number_other_client_used' => '身份證號已被他人使用', + 'certification_must' => '必須', + 'certification_upload' => '必須上傳', + 'certification_file_allow' => '文件名只允許數字,字母,還有漢字', + 'certification_customfields_select_options' => '{title}在{options}之中', + 'certification_phone_consistency' => '用戶註冊手機號需與實名手機號一致', + 'certification_img_one' => '請上傳身份證號正面照', + 'certification_img_two' => '請上傳身份證號反面照', + 'certification_img_three' => '請上傳營業執照', + 'certification_info_post_again' => '請重新提交實名資料', + 'personal' => '個人', + 'company' => '公司', + + # 應用接口 + 'not_install_ioncube' => '未安裝ionCube擴展不可安裝應用', + 'request_fail_http_code' => '請求失敗,HTTP狀態碼:{code}', + 'app_install_success' => '應用安裝成功', + 'app_download_fail' => '應用下載失敗', + 'app_unzip_fail' => '應用文件解壓失敗,失敗code:{code},請到網站目錄下解壓下載的文件{file}', + + # + 'log_module_create_account_success' => '產品{host}模塊開通成功', + 'log_module_create_account_failed' => '產品{host}模塊開通失敗,原因:{reason}', + 'log_module_suspend_account_success' => '產品{host}模塊暫停成功,暫停類型:{type},暫停原因:{reason}', + 'log_module_suspend_account_failed' => '產品{host}模塊暫停失敗,原因:{reason}', + 'log_module_unsuspend_account_success' => '產品{host}模塊取消暫停成功', + 'log_module_unsuspend_account_failed' => '產品{host}模塊取消暫停失敗,原因:{reason}', + 'log_module_terminate_account_success' => '{client}的產品{host}模組刪除成功', + 'log_module_terminate_account_failed' => '{client}的產品{host}模組刪除失敗,原因:{reason}', + + # 退款記錄 + 'refund_record_is_not_exist' => '退款記錄不存在', + + # 供應商 + 'supplier_is_not_exist' => '供應商不存在', + 'cannot_delete_supplier' => '已代理該供應商商品,不可刪除該供應商', + + 'log_create_supplier' => '{admin}新增供應商{name}', + 'log_update_supplier' => '{admin}修改供應商{name}:{description}', + 'log_delete_supplier' => '{admin}刪除供應商{name}', + 'field_supplier_name' => '名稱', + 'field_supplier_url' => '接口地址', + 'log_supplier_token' => '密鑰變更', + 'log_supplier_secret' => '私鑰變更', + 'field_supplier_contact' => '聯繫方式', + 'field_supplier_notes' => '備註', + + 'please_enter_supplier_name' => '請輸入供應商名稱', + 'supplier_name_cannot_exceed_50_chars' => '供應商名稱不能超過50個字符', + 'please_enter_supplier_url' => '請輸入接口地址', + 'supplier_url_cannot_exceed_255_chars' => '接口地址不能超過255個字符', + 'supplier_url_error' => '接口地址格式錯誤', + 'please_enter_supplier_username' => '請輸入用戶名', + 'supplier_username_cannot_exceed_100_chars' => '用戶名不能超過100個字符', + 'please_enter_supplier_token' => '請輸入API密鑰', + 'supplier_token_cannot_exceed_200_chars' => 'API密鑰不能超過200個字符', + 'please_enter_supplier_secret' => '請輸入API私鑰', + 'supplier_contact_cannot_exceed_1000_chars' => '聯繫方式不能超過1000個字符', + 'supplier_notes_cannot_exceed_1000_chars' => '備註不能超過1000個字符', + + # 上游商品 + 'upstream_product_is_not_exist' => '上游商品不存在', + 'agent_product_cannot_repeat_agent' => '已代理商品不可重複代理', + 'file_unzip_failed' => '文件解壓失敗,失敗code:{code},請到網站目錄下解壓下載的文件{file}', + 'resource_download_failed' => '資源下載失敗', + 'upstream_product_resource_get_failed' => '上游商品資源獲取失敗', + 'recommend_product_is_not_exist' => '推薦代理商品不存在', + + + 'log_admin_create_upstream_product' => '{admin}新增上游商品{product}', + 'log_admin_update_upstream_product' => '{admin}修改上游商品{product}:{description}', + 'log_admin_agent_upstream_product' => '{admin}代理上游商品{product}', + 'field_upstream_product_name' => '名稱', + 'field_upstream_product_auto_setup' => '自動開通', + 'field_upstream_product_supplier_id' => '供應商ID', + 'field_upstream_product_upstream_product_id' => '上游商品ID', + 'field_upstream_product_profit_percent' => '利潤百分比', + 'field_upstream_product_certification' => '本地實名認證', + + 'supplier_id_error' => '供應商ID錯誤', + 'upstream_product_id_error' => '上游商品ID錯誤', + 'please_enter_upstream_product_name' => '請輸入商品名稱', + 'upstream_product_name_cannot_exceed_50_chars' => '商品名稱不能超過50個字符', + 'please_enter_upstream_product_profit_percent' => '請輸入利潤百分比', + 'upstream_product_profit_percent_error' => '利潤百分比只能為0以上的數', + 'product_group_id_error' => '二級分組ID錯誤', + + # 主題設置 + 'please_enter_feedback_type_name' => '請輸入名稱', + 'feedback_type_name_cannot_exceed_255_chars' => '名稱不能超過255個字符', + 'please_enter_feedback_type_description' => '請輸入描述', + 'feedback_type_is_not_exist' => '意見反饋類型不存在', + 'upload_file_is_not_exist' => '上傳文件不存在', + 'cannot_delete_feedback_type' => '該類型已被使用不可刪除', + 'friendly_link_is_not_exist' => '友情鏈接不存在', + 'honor_is_not_exist' => '榮譽資質不存在', + 'partner_is_not_exist' => '合作夥伴不存在', + + 'put_on_record_require' => '請輸入備案信息', + 'put_on_record_max' => '備案信息不能超過255個字符', + 'enterprise_name_require' => '請輸入企業名稱', + 'enterprise_name_max' => '企業名稱不能超過255個字符', + 'enterprise_telephone_require' => '請輸入企業電話', + 'enterprise_telephone_max' => '企業電話不能超過50個字符', + 'enterprise_mailbox_require' => '請輸入企業郵箱', + 'enterprise_mailbox_max' => '企業郵箱不能超過255個字符', + 'enterprise_qrcode_require' => '請上傳企業二維碼', + 'online_customer_service_link_require' => '請輸入在線客服鏈接', + 'please_enter_friendly_link_name' => '請輸入名稱', + 'friendly_link_name_cannot_exceed_100_chars' => '名稱不能超過100個字符', + 'please_enter_friendly_link_url' => '請輸入鏈接地址', + 'friendly_link_url_cannot_exceed_255_chars' => '鏈接地址不能超過255個字符', + 'friendly_link_url_error' => '鏈接地址格式有誤', + 'please_enter_honor_name' => '請輸入名稱', + 'honor_name_cannot_exceed_100_chars' => '名稱不能超過100個字符', + 'please_select_honor_image' => '請選擇圖片', + 'please_enter_partner_name' => '請輸入名稱', + 'partner_name_cannot_exceed_100_chars' => '名稱不能超過100個字符', + 'please_select_partner_image' => '請選擇圖片', + 'please_enter_partner_description' => '請輸入描述', + 'icp_info_require' => '請輸入ICP信息', + 'icp_info_max' => 'ICP信息不能超過255個字符', + 'icp_info_link_require' => '請輸入ICP信息跳轉鏈接', + 'icp_info_link_max' => 'ICP信息跳轉鏈接不能超過255個字符', + 'icp_info_link_error' => 'ICP信息跳轉鏈接地址格式錯誤', + 'public_security_network_preparation_require' => '請輸入公安網備', + 'public_security_network_preparation_max' => '公安網備不能超過255個字符', + 'public_security_network_preparation_link_require' => '請輸入公安網備跳轉鏈接', + 'public_security_network_preparation_link_max' => '公安網備跳轉鏈接不能超過255個字符', + 'public_security_network_preparation_link_error' => '公安網備跳轉鏈接地址格式錯誤', + 'telecom_appreciation_require' => '請輸入電信增值', + 'telecom_appreciation_max' => '電信增值不能超過255個字符', + 'copyright_info_require' => '請輸入版權信息', + 'copyright_info_max' => '版權信息不能超過255個字符', + 'official_website_logo_require' => '請上傳官網LOGO', + 'cloud_product_link_require' => '請輸入雲產品跳轉鏈接', + 'cloud_product_link_max' => '雲產品跳轉鏈接不能超過255個字符', + 'cloud_product_link_error' => '雲產品跳轉鏈接地址格式錯誤', + 'dcim_product_link_require' => '請輸入DCIM產品跳轉鏈接', + 'dcim_product_link_max' => 'DCIM產品跳轉鏈接不能超過255個字符', + 'dcim_product_link_error' => 'DCIM產品跳轉鏈接地址格式錯誤', + + 'client_record_is_not_exist' => '用戶信息記錄不存在', + 'client_record_content_cannot_empty' => '內容不能為空', + 'client_record_content_cannot_exceed_300_chars' => '內容不能超過300個字符', + 'client_record_attachment_cannot_empty' => '請選擇附件', + + 'order_description_append' => '{product_name}({name}),購買時長:{billing_cycle_name}({time})', + + 'user_cannot_empty' => '用戶不能為空', + 'username_4_20_digits' => '用戶名4-20位', + 'password_cannot_empty' => '密碼不能為空', + 'auth_failed' => '鑑權失敗', + 'signature_error' => '簽名錯誤', + 'host_cannot_use_this_interface' => '該產品不能使用該接口', + 'signature_verification_failed' => '簽名驗證失敗', + 'sync_success' => '同步成功', + 'sync_failed' => '同步失敗', + 'failed_to_open_upstream' => '上游開通失敗', + 'host_name' => '主機名', + 'suspend_type' => '暫停類型', + 'suspend_reason' => '暫停原因', + 'change_into' => '修改為:', + + 'superadmin_add_admin_send_mail' => '超級管理員添加後台管理員,發送郵件', + 'host_create_success_send_mail' => '產品開通成功,發送郵件', + 'host_create_success_send_sms' => '產品開通成功,發送短信', + 'host_renewal_first_send_mail' => '第一次客戶續費提醒,發送郵件', + 'host_renewal_first_send_sms' => '第一次客戶續費提醒,發送短信', + 'host_renewal_second_send_mail' => '第二次客戶續費提醒,發送郵件', + 'host_renewal_second_send_sms' => '第二次客戶續費提醒,發送短信', + 'host_overdue_first_send_mail' => '逾期付款第一次,發送郵件', + 'host_overdue_first_send_sms' => '逾期付款第一次,發送短信', + 'host_overdue_second_send_mail' => '逾期付款第二次,發送郵件', + 'host_overdue_second_send_sms' => '逾期付款第二次,發送短信', + 'host_overdue_third_send_mail' => '逾期付款第三次,發送郵件', + 'host_overdue_third_send_sms' => '逾期付款第三次,發送短信', + 'order_overdue_send_mail' => '訂單未付款通知,發送郵件', + 'order_overdue_send_sms' => '訂單未付款通知,發送短信', + 'host_suspend' => '主機暫停', + 'host_delete' => '主機刪除', + 'client_change_phone_send_sms' => '客戶更改手機成功,發送短信', + 'client_change_email_send_mail' => '客戶更改郵箱成功,發送郵件', + 'client_change_password_send_mail' => '客戶更改密碼成功,發送郵件', + 'client_change_password_send_sms' => '客戶更改密碼成功,發送短信', + 'client_phone_code_login_success_send_sms' => '手機+驗證碼登錄成功,發送短信', + 'client_email_password_login_success_send_mail' => '郵箱+密碼登錄成功,發送郵件', + 'client_phone_password_login_success_send_sms' => '手機+密碼登錄成功,發送短信', + 'client_sms_register_success_send_sms' => '短信註冊成功,發送短信', + 'client_mail_register_success_send_mail' => '郵件註冊成功,發送郵件', + 'host_suspend_send_mail' => '產品暫停通知,發送郵件', + 'host_suspend_send_sms' => '產品暫停通知,發送短信', + 'suspend_type_overdue' => '到期暫停', + 'suspend_type_overtraffic' => '超流暫停', + 'suspend_type_certification_not_complete' => '實名未完成', + 'suspend_type_other' => '其他', + 'cannot_unsuspend_from_upstream' => '不可解除上游發起的暫停', + 'host_unsuspend_send_mail' => '產品解除暫停通知,發送郵件', + 'host_unsuspend_send_sms' => '產品解除暫停通知,發送短信', + 'host_delete_send_mail' => '產品刪除通知,發送郵件', + 'host_delete_send_sms' => '產品刪除通知,發送短信', + 'host_upgrade_send_mail' => '產品升降級,發送郵件', + 'host_upgrade_send_sms' => '產品升降級,發送短信', + 'order_create_send_mail' => '訂單創建,發送郵件', + 'order_create_send_sms' => '訂單創建,發送短信', + 'admin_order_amount_send_mail' => '後台管理員調整訂單價格,發送郵件', + 'admin_order_amount_send_sms' => '後台管理員調整訂單價格,發送短信', + 'order_recharge_send_mail' => '客戶充值成功,發送郵件', + 'order_recharge_send_sms' => '客戶充值成功,發送短信', + 'order_pay_send_mail' => '客戶支付成功,發送郵件', + 'order_pay_send_sms' => '客戶支付成功,發送短信', + 'host_unsuspend' => '解除暫停', + 'host_creating_send_mail' => '產品開通中,發送郵件', + 'host_creating_send_sms' => '產品開通中,發送短信', + 'client_host_create' => '#用戶{client_id}#產品{host_id} — 主機創建', + 'client_host_upgrade' => '#用戶{client_id}#產品{host_id} — 升降級', + + 'active_host_is_used_cannot_delete' => '有激活產品正在使用,不能刪除', + 'phone_code_error' => '國際電話區號格式錯誤', + 'phone_error' => '手機號格式錯誤', + 'widget_require' => '請選擇挂件', + 'widget_error' => '挂件標識錯誤', + 'host_overdue_suspend' => '產品到期暫停', + 'network_desertion' => '網絡開小差', + 'api_account_or_password_error' => 'API賬號或密碼錯誤', + 'module_format_error' => '模塊格式錯誤', + 'module_or_function_is_not_exist' => '模塊或方法不存在', + + 'price' => '價格', + 'purchase_duration' => '購買時長', + + #掛件 + 'widget_not_found' => '掛件不存在', + 'widget_validate_widget_require' => '請選擇掛件', + 'widget_validate_widget_error' => '掛件識別錯誤', + 'widget_validate_status_param_error' => '顯示狀態參數錯誤', + + 'log_pay_tmp_order_miss' => '{tem_order_id}暫存訂單缺失', + 'log_pay_order_miss' => '{order_id}訂單缺失', + + 'upstream_host_is_not_exist' => '上游產品不存在', + + # 商品週期比例 + 'log_product_duration_ratio_change' => ',週期{name}比例從{old}改為{new}', + 'please_input_all_duration_ratio' => '請輸入所有周期比例', + 'log_save_product_duration_ratio' => '儲存商品週期比例成功,商品:{product}{detail}', + 'please_set_duration_ratio_first' => '請先設定週期比例', + 'please_set_at_lease_one_price' => '請至少設定一個價格', + 'validate_product_duration_ratio_ratio_require' => '請輸入比例', + 'validate_product_duration_ratio_price_require' => '請輸入價格', + 'validate_product_duration_ratio_ratio_format_error' => '比例只能是大於0且小於10000的數字', + 'validate_product_duration_ratio_price_format_error' => '價格只能是0-99999999的數字', +]; diff --git a/10.3.4/public/admin/template/default/404.php b/10.3.5/public/admin/template/default/404.php similarity index 100% rename from 10.3.4/public/admin/template/default/404.php rename to 10.3.5/public/admin/template/default/404.php diff --git a/10.3.4/public/admin/template/default/admin.php b/10.3.5/public/admin/template/default/admin.php similarity index 100% rename from 10.3.4/public/admin/template/default/admin.php rename to 10.3.5/public/admin/template/default/admin.php diff --git a/10.3.4/public/admin/template/default/admin_role.php b/10.3.5/public/admin/template/default/admin_role.php similarity index 100% rename from 10.3.4/public/admin/template/default/admin_role.php rename to 10.3.5/public/admin/template/default/admin_role.php diff --git a/10.3.4/public/admin/template/default/agentList.php b/10.3.5/public/admin/template/default/agentList.php similarity index 100% rename from 10.3.4/public/admin/template/default/agentList.php rename to 10.3.5/public/admin/template/default/agentList.php diff --git a/10.3.4/public/admin/template/default/api/addon.js b/10.3.5/public/admin/template/default/api/addon.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/addon.js rename to 10.3.5/public/admin/template/default/api/addon.js diff --git a/10.3.4/public/admin/template/default/api/childAccount.js b/10.3.5/public/admin/template/default/api/childAccount.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/childAccount.js rename to 10.3.5/public/admin/template/default/api/childAccount.js diff --git a/10.3.4/public/admin/template/default/api/client.js b/10.3.5/public/admin/template/default/api/client.js similarity index 98% rename from 10.3.4/public/admin/template/default/api/client.js rename to 10.3.5/public/admin/template/default/api/client.js index e1d210ab..4bf987fa 100644 --- a/10.3.4/public/admin/template/default/api/client.js +++ b/10.3.5/public/admin/template/default/api/client.js @@ -355,3 +355,7 @@ function changeResource (type,params) { function getResourceStatus(params) { return Axios.get(`/manual_resource/${params.id}/status`); } +// 供应商列表 +function ApiSupplier(params) { + return Axios.get(`/manual_resource/supplier`, { params }) +} diff --git a/10.3.4/public/admin/template/default/api/common.js b/10.3.5/public/admin/template/default/api/common.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/common.js rename to 10.3.5/public/admin/template/default/api/common.js diff --git a/10.3.4/public/admin/template/default/api/customerService.js b/10.3.5/public/admin/template/default/api/customerService.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/customerService.js rename to 10.3.5/public/admin/template/default/api/customerService.js diff --git a/10.3.4/public/admin/template/default/api/home.js b/10.3.5/public/admin/template/default/api/home.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/home.js rename to 10.3.5/public/admin/template/default/api/home.js diff --git a/10.3.4/public/admin/template/default/api/index.js b/10.3.5/public/admin/template/default/api/index.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/index.js rename to 10.3.5/public/admin/template/default/api/index.js diff --git a/10.3.4/public/admin/template/default/api/install.js b/10.3.5/public/admin/template/default/api/install.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/install.js rename to 10.3.5/public/admin/template/default/api/install.js diff --git a/10.3.4/public/admin/template/default/api/invoice.js b/10.3.5/public/admin/template/default/api/invoice.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/invoice.js rename to 10.3.5/public/admin/template/default/api/invoice.js diff --git a/10.3.4/public/admin/template/default/api/manage.js b/10.3.5/public/admin/template/default/api/manage.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/manage.js rename to 10.3.5/public/admin/template/default/api/manage.js diff --git a/10.3.4/public/admin/template/default/api/navigation.js b/10.3.5/public/admin/template/default/api/navigation.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/navigation.js rename to 10.3.5/public/admin/template/default/api/navigation.js diff --git a/10.3.4/public/admin/template/default/api/product.js b/10.3.5/public/admin/template/default/api/product.js similarity index 95% rename from 10.3.4/public/admin/template/default/api/product.js rename to 10.3.5/public/admin/template/default/api/product.js index c2626ed4..eafa4563 100644 --- a/10.3.4/public/admin/template/default/api/product.js +++ b/10.3.5/public/admin/template/default/api/product.js @@ -25,7 +25,7 @@ function getAddon(params) { return Axios.get(`/active_plugin`, { params }); } -// 选择接口获取配置 +// 选择接口获取配置 function getProductConfig(id, params) { return Axios.get(`/product/${id}/server/config_option`, { params }) } @@ -116,4 +116,9 @@ function getGroup(params) { // 保存可代理商品 function agentable(params) { return Axios.put(`/product/agentable`, params) -} \ No newline at end of file +} + +// 复制商品 +function copyProduct(params) { + return Axios.post(`/product/${params.id}/copy`, params) +} diff --git a/10.3.4/public/admin/template/default/api/rc.js b/10.3.5/public/admin/template/default/api/rc.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/rc.js rename to 10.3.5/public/admin/template/default/api/rc.js diff --git a/10.3.4/public/admin/template/default/api/real_name.js b/10.3.5/public/admin/template/default/api/real_name.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/real_name.js rename to 10.3.5/public/admin/template/default/api/real_name.js diff --git a/10.3.4/public/admin/template/default/api/recording1559.js b/10.3.5/public/admin/template/default/api/recording1559.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/recording1559.js rename to 10.3.5/public/admin/template/default/api/recording1559.js diff --git a/10.3.4/public/admin/template/default/api/setting.js b/10.3.5/public/admin/template/default/api/setting.js similarity index 96% rename from 10.3.4/public/admin/template/default/api/setting.js rename to 10.3.5/public/admin/template/default/api/setting.js index e021dc66..4178b031 100644 --- a/10.3.4/public/admin/template/default/api/setting.js +++ b/10.3.5/public/admin/template/default/api/setting.js @@ -228,5 +228,15 @@ function getDebugConfig () { return Axios.get(`/configuration/debug`) } function updateDebugConfig (params) { - return Axios.put(`configuration/debug`, params) + return Axios.put(`/configuration/debug`, params) +} + +// 更新识别码 +function updateLicense () { + return Axios.get('/system/auth') +} + +// 更换识别码 +function changeLicense (params) { + return Axios.put(`/system/license`, params) } diff --git a/10.3.4/public/admin/template/default/api/system.js b/10.3.5/public/admin/template/default/api/system.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/system.js rename to 10.3.5/public/admin/template/default/api/system.js diff --git a/10.3.4/public/admin/template/default/api/upstream.js b/10.3.5/public/admin/template/default/api/upstream.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/upstream.js rename to 10.3.5/public/admin/template/default/api/upstream.js diff --git a/10.3.4/public/admin/template/default/api/withdrawal.js b/10.3.5/public/admin/template/default/api/withdrawal.js similarity index 100% rename from 10.3.4/public/admin/template/default/api/withdrawal.js rename to 10.3.5/public/admin/template/default/api/withdrawal.js diff --git a/10.3.4/public/admin/template/default/captcha.php b/10.3.5/public/admin/template/default/captcha.php similarity index 100% rename from 10.3.4/public/admin/template/default/captcha.php rename to 10.3.5/public/admin/template/default/captcha.php diff --git a/10.3.4/public/admin/template/default/childAccount.php b/10.3.5/public/admin/template/default/childAccount.php similarity index 100% rename from 10.3.4/public/admin/template/default/childAccount.php rename to 10.3.5/public/admin/template/default/childAccount.php diff --git a/10.3.4/public/admin/template/default/child_server.php b/10.3.5/public/admin/template/default/child_server.php similarity index 98% rename from 10.3.4/public/admin/template/default/child_server.php rename to 10.3.5/public/admin/template/default/child_server.php index 0f7b7b52..05dcb5e9 100644 --- a/10.3.4/public/admin/template/default/child_server.php +++ b/10.3.5/public/admin/template/default/child_server.php @@ -130,8 +130,8 @@ - - + + diff --git a/10.3.4/public/admin/template/default/child_server_group.php b/10.3.5/public/admin/template/default/child_server_group.php similarity index 100% rename from 10.3.4/public/admin/template/default/child_server_group.php rename to 10.3.5/public/admin/template/default/child_server_group.php diff --git a/10.3.4/public/admin/template/default/client.php b/10.3.5/public/admin/template/default/client.php similarity index 100% rename from 10.3.4/public/admin/template/default/client.php rename to 10.3.5/public/admin/template/default/client.php diff --git a/10.3.4/public/admin/template/default/client_detail.php b/10.3.5/public/admin/template/default/client_detail.php similarity index 100% rename from 10.3.4/public/admin/template/default/client_detail.php rename to 10.3.5/public/admin/template/default/client_detail.php diff --git a/10.3.4/public/admin/template/default/client_host.php b/10.3.5/public/admin/template/default/client_host.php similarity index 100% rename from 10.3.4/public/admin/template/default/client_host.php rename to 10.3.5/public/admin/template/default/client_host.php diff --git a/10.3.4/public/admin/template/default/client_log.php b/10.3.5/public/admin/template/default/client_log.php similarity index 100% rename from 10.3.4/public/admin/template/default/client_log.php rename to 10.3.5/public/admin/template/default/client_log.php diff --git a/10.3.4/public/admin/template/default/client_notice_email.php b/10.3.5/public/admin/template/default/client_notice_email.php similarity index 100% rename from 10.3.4/public/admin/template/default/client_notice_email.php rename to 10.3.5/public/admin/template/default/client_notice_email.php diff --git a/10.3.4/public/admin/template/default/client_notice_sms.php b/10.3.5/public/admin/template/default/client_notice_sms.php similarity index 100% rename from 10.3.4/public/admin/template/default/client_notice_sms.php rename to 10.3.5/public/admin/template/default/client_notice_sms.php diff --git a/10.3.4/public/admin/template/default/client_order.php b/10.3.5/public/admin/template/default/client_order.php similarity index 92% rename from 10.3.4/public/admin/template/default/client_order.php rename to 10.3.5/public/admin/template/default/client_order.php index f49140b8..9d1dcde4 100644 --- a/10.3.4/public/admin/template/default/client_order.php +++ b/10.3.5/public/admin/template/default/client_order.php @@ -133,22 +133,27 @@