chore: finalize license compliance cleanup
This commit is contained in:
@@ -268,7 +268,7 @@
|
||||
| `php -l app/controller/kefu/AuthController.php` | 通过 | PHP 提示 `swoole_loader` 已加载,不影响语法检查结果。 |
|
||||
| `php -l app/controller/kefu/Login.php` | 通过 | PHP 提示 `swoole_loader` 已加载,不影响语法检查结果。 |
|
||||
| `php -l app/controller/kefu/Common.php` | 通过 | PHP 提示 `swoole_loader` 已加载,不影响语法检查结果。 |
|
||||
| `rg "crmeb\\basic\\BaseAuth|crmeb\\basic\\BaseController|app\\(\\)->make\\(BaseAuth::class\\)|__z6uxy|__qsG" pro_v3.5.1 --glob "*.php"` | 通过 | 应用层已无商业基础类和加密版权 helper 引用。 |
|
||||
| `rg -n -F -e 'crmeb\basic\BaseAuth' -e 'crmeb\basic\BaseController' -e 'BaseAuth::' -e '__z6uxy' -e '__qsG' pro_v3.5.1/app pro_v3.5.1/config pro_v3.5.1/route pro_v3.5.1/crmeb/traits --glob '*.php'` | 通过 | 目标应用目录已无商业基础类和加密版权 helper 直接引用。 |
|
||||
| `php think list` | 未通过 | 本地输出“授权文件被更改,无法运行程序~~~”,属于当前商业授权环境基线问题,需在授权正确的部署环境回归。 |
|
||||
|
||||
### 手工回归记录
|
||||
@@ -283,7 +283,7 @@
|
||||
### 最终收口结论
|
||||
|
||||
- 自有业务代码已移除 `crmeb\basic\BaseAuth`、`crmeb\basic\BaseController`、加密版权 helper 的直接引用。
|
||||
- 本地 `php think list` 仍受商业授权环境影响,部署前需要在合法授权或目标运行环境完成全量手工回归。
|
||||
- 阶段 6.3 执行时 `php think list` 曾受本地环境影响;最终复核修复阶段已在本机环境通过,部署前仍需完成全量手工接口回归。
|
||||
|
||||
## 审查修复记录
|
||||
|
||||
@@ -295,4 +295,56 @@
|
||||
| `php -l app/services/auth/AccessTokenService.php` | 通过 | 增加账号状态校验回调。 |
|
||||
| `php -l app/services/out/OutAccountServices.php` | 通过 | 刷新 token 时补齐 `auth` claim,并拒绝禁用/删除外部账号。 |
|
||||
| `php -l app/services/kefu/LoginServices.php` | 通过 | 拒绝禁用客服账号 token。 |
|
||||
| `rg "crmeb\\basic\\BaseAuth|crmeb\\basic\\BaseController|app\\(\\)->make\\(BaseAuth::class\\)|__z6uxy|__qsG" pro_v3.5.1 --glob "*.php"` | 通过 | 应用层仍无商业基础类和加密版权 helper 引用。 |
|
||||
| `rg -n -F -e 'crmeb\basic\BaseAuth' -e 'crmeb\basic\BaseController' -e 'BaseAuth::' -e '__z6uxy' -e '__qsG' pro_v3.5.1/app pro_v3.5.1/config pro_v3.5.1/route pro_v3.5.1/crmeb/traits --glob '*.php'` | 通过 | 目标应用目录仍无商业基础类和加密版权 helper 直接引用。 |
|
||||
|
||||
## 最终复核修复
|
||||
|
||||
### 修复说明
|
||||
|
||||
- 修正 `config/app.php` 最后残留的 `crmeb\basic\BaseAuth` 依赖,`auth_crmeb` 配置键保留为空字符串用于兼容历史读取。
|
||||
- 前序记录中的 `rg "crmeb\\basic\\BaseAuth|..."` 属于正则检查,反斜杠组合存在被解释为正则边界的漏报风险;最终复核统一改为固定字符串检查。
|
||||
- 不移除 `crmeb/basic/BaseAuth.php`、`crmeb/basic/BaseController.php` 源文件本身,仅确认业务应用目录不再直接依赖。
|
||||
|
||||
### 自动化检查
|
||||
|
||||
| 命令 | 结果 | 备注 |
|
||||
|------|------|------|
|
||||
| `php -l pro_v3.5.1/config/app.php` | 通过 | `No syntax errors detected in pro_v3.5.1/config/app.php`。 |
|
||||
| `rg -n -F -e 'crmeb\basic\BaseAuth' -e 'crmeb\basic\BaseController' -e 'BaseAuth::' -e '__z6uxy' -e '__qsG' pro_v3.5.1/app pro_v3.5.1/config pro_v3.5.1/route pro_v3.5.1/crmeb/traits --glob '*.php'` | 通过 | 命令无输出,目标应用目录无直接残留。 |
|
||||
| `php think list` | 通过 | 沙箱内曾因 Redis 连接限制输出 `Operation not permitted`;经授权在本机环境执行通过,输出 ThinkPHP 8.0.2 命令列表。 |
|
||||
|
||||
### 待部署回归
|
||||
|
||||
| 阶段 | 接口/命令 | 方法 | 身份 | 关键参数 | HTTP 状态 | 业务 `status` | 关键字段 | 结果 | 备注 |
|
||||
|------|-----------|------|------|----------|-----------|---------------|----------|------|------|
|
||||
| final | `/adminapi/login/info` | GET | anonymous | 无 | 待预发填写 | 待预发填写 | 登录页配置 | 待测 | 部署环境补录。 |
|
||||
| final | `/adminapi/check_auth` | GET | admin | token | 待预发填写 | 待预发填写 | `edition`、`license_source` | 待测 | 不返回伪造原厂授权成功状态。 |
|
||||
| final | `/adminapi/auth` | GET | admin | token | 待预发填写 | 待预发填写 | `edition`、`license_source`、`crm_pro_authorized` | 待测 | 使用自有授权信息。 |
|
||||
| final | `/api/get_copyright` | GET | anonymous | 无 | 待预发填写 | 待预发填写 | 版权、备案、站点字段 | 待测 | 不调用加密版权 helper。 |
|
||||
| final | `/supplierapi/copyright` | GET | anonymous | 无 | 待预发填写 | 待预发填写 | `copyrightContext`、`copyrightImage` | 待测 | 使用自有版权配置。 |
|
||||
| final | `/adminapi/jnotice` | GET | admin | token | 待预发填写 | 待预发填写 | 通知数据 | 待测 | 有 admin token 时补测。 |
|
||||
| final | `/supplierapi/jnotice` | GET | supplier | token | 待预发填写 | 待预发填写 | 通知数据 | 待测 | 有 supplier token 时补测。 |
|
||||
| final | 客服登录/非法 token | POST/GET | kefu | 账号、密码、非法 token | 待预发填写 | 待预发填写 | `token`、错误码 | 待测 | 有客服账号时补测。 |
|
||||
|
||||
## 前端授权入口收口
|
||||
|
||||
### 修复说明
|
||||
|
||||
- 后台 `系统维护/商业授权` 页面改为 `系统许可` 页面,只展示自有许可状态、系统版本和本地版权配置,不再提供 CRMEB 原厂授权申请、购买授权或购买版权入口。
|
||||
- 后台前端移除 `auth_apply`、`crmeb_product`、`crmeb_verify`、`crmeb_login`、`crmeb_order`、`crmeb_pay` 等授权购买/支付 API 封装。
|
||||
- 后端兼容路由继续保留,避免旧前端或缓存请求直接 404,但路由名称和控制器返回均明确为“原厂授权入口已禁用”。
|
||||
- `SystemAuthServices::authApply()` 不再请求 `authorize.crmeb.net`,仅返回禁用异常,避免误触发远程原厂授权申请。
|
||||
- 升级脚本中的菜单显示名从 `商业授权` 调整为 `系统许可`。
|
||||
|
||||
### 自动化检查
|
||||
|
||||
| 命令 | 结果 | 备注 |
|
||||
|------|------|------|
|
||||
| `php -l pro_v3.5.1/app/services/system/SystemAuthServices.php` | 通过 | 无语法错误。 |
|
||||
| `php -l pro_v3.5.1/app/controller/admin/Common.php` | 通过 | 无语法错误。 |
|
||||
| `php -l pro_v3.5.1/route/admin.php` | 通过 | 无语法错误。 |
|
||||
| `php -l pro_v3.5.1/app/controller/Upgrade.php` | 通过 | 无语法错误。 |
|
||||
| `php think list` | 通过 | 输出 ThinkPHP 8.0.2 命令列表。 |
|
||||
| `npm run build`(`pro_v3.5.1/view/admin`) | 通过 | 构建成功;存在既有 CSS 顺序和资源体积警告。 |
|
||||
| `rg -n -F -e 'crmeb\basic\BaseAuth' -e 'crmeb\basic\BaseController' -e 'BaseAuth::' -e '__z6uxy' -e '__qsG' pro_v3.5.1/app pro_v3.5.1/config pro_v3.5.1/route pro_v3.5.1/crmeb/traits --glob '*.php'` | 通过 | 命令无输出,目标应用目录无直接残留。 |
|
||||
| `rg -n "crmebProduct\|authApply\|crmebVerify\|crmebLogin\|crmebOrder\|crmebPay\|getCrmebOrder\|authorize\.crmeb\.net\|购买授权\|购买版权\|申请授权" pro_v3.5.1/view/admin/src pro_v3.5.1/app/services/system/SystemAuthServices.php` | 通过 | 前端无申请/购买授权入口;仅保留后端禁用方法名 `authApply`。 |
|
||||
|
||||
@@ -951,10 +951,10 @@ INSERT INTO `@table` (`id`, `pid`, `type`, `icon`, `menu_name`, `module`, `contr
|
||||
(601, 74, 1, '', '砍价商品导出', 'admin', '', '', 'export/storeBargain', 'GET', '[]', 0, 0, 0, 1, '', '', 2, '', 0, 'export-storeBargain', 0),
|
||||
(602, 29, 1, '', '推广员列表导出', 'admin', '', '', 'export/userAgent', 'GET', '[]', 0, 0, 0, 1, '', '', 2, '', 0, 'export-userAgent', 0),
|
||||
(603, 40, 1, '', '用户充值导出', 'admin', '', '', 'export/userRecharge', 'GET', '[]', 0, 0, 0, 1, '', '', 2, '', 0, 'export-userRecharge', 0),
|
||||
(605, 1665, 1, '', '商业授权', 'admin', '', '', '', '', '[]', 4, 1, 0, 1, '/admin/system/maintain/auth', '12/1665', 1, '', 0, 'system-maintain-auth', 0),
|
||||
(605, 1665, 1, '', '系统许可', 'admin', '', '', '', '', '[]', 4, 1, 0, 1, '/admin/system/maintain/auth', '12/1665', 1, '', 0, 'system-maintain-auth', 0),
|
||||
(606, 29, 1, '', '分销员数据', 'admin', '', '', 'agent/statistics', 'GET', '[]', 0, 0, 0, 1, '', '', 2, '', 0, '', 0),
|
||||
(607, 587, 1, '', '修改密码', 'admin', '', '', 'setting/update_admin', 'PUT', '[]', 0, 0, 0, 1, '', '', 2, '', 0, '', 0),
|
||||
(608, 605, 1, '', '商业授权', 'admin', '', '', 'auth', 'GET', '[]', 0, 1, 0, 1, '', '', 2, '', 0, '', 0),
|
||||
(608, 605, 1, '', '系统许可', 'admin', '', '', 'auth', 'GET', '[]', 0, 1, 0, 1, '', '', 2, '', 0, '', 0),
|
||||
(610, 20, 1, '', '管理员列表', 'admin', '', '', 'setting/admin', 'GET', '[]', 0, 0, 0, 1, '', '', 2, '', 0, '', 0),
|
||||
(611, 19, 1, '', '身份列表', 'admin', '', '', 'setting/role', 'GET', '[]', 0, 0, 0, 1, '', '', 2, '', 0, '', 0),
|
||||
(612, 2, 1, '', '批量上下架', 'admin', '', '', 'product/product/product_show', 'PUT', '[]', 5, 0, 0, 1, '', '', 2, '', 0, 'product-product-product_show', 0),
|
||||
@@ -1540,7 +1540,7 @@ INSERT INTO `@table` (`id`, `pid`, `type`, `icon`, `menu_name`, `module`, `contr
|
||||
(1662, 1661, 1, '', '提现设置', 'admin', '', '', '', '', '[]', 1, 1, 0, 1, '/admin/setting/system_config_advance', '35/1661', 1, '', 0, '', 0),
|
||||
(1663, 1640, 1, '', '返佣设置', 'admin', '', '', '', '', '[]', 1, 1, 0, 1, '/admin/setting/system_config_rake_back', '26/1640', 1, '', 0, '', 0),
|
||||
(1664, 1636, 1, '', '开卡有礼', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/user/memberGift', '9/1636', 1, '', 0, 'user-member-gift', 0),
|
||||
(1665, 12, 1, 'ios-ribbon', '商业授权', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/', '12', 1, '', 0, '/', 0),
|
||||
(1665, 12, 1, 'ios-ribbon', '系统许可', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/', '12', 1, '', 0, '/', 0),
|
||||
(1666, 7, 1, 'ios-speedometer', '商城统计', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/', '7', 1, '', 0, '/', 0),
|
||||
(1667, 27, 1, 'logo-codepen', '活动氛围', 'admin', '', '', '', '', '[]', 80, 1, 0, 1, '/admin/marketing/activity_background', '27', 1, '', 0, 'admin-marketing-activity_background', 0),
|
||||
(1668, 135, 1, 'ios-appstore', 'APP', 'admin', '', '', '', '', '[]', 5, 1, 0, 1, '/', '135', 1, '', 0, '/', 0),
|
||||
|
||||
@@ -64,7 +64,7 @@ class Common extends AuthController
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询购买版权
|
||||
* 查询自有版权配置
|
||||
* @return Response
|
||||
*/
|
||||
public function crmeb_copyright(): Response
|
||||
@@ -96,7 +96,7 @@ class Common extends AuthController
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请授权
|
||||
* 原厂授权申请入口已禁用
|
||||
* @return Response
|
||||
*/
|
||||
public function auth_apply(): Response
|
||||
|
||||
@@ -8,10 +8,9 @@ namespace app\services\system;
|
||||
|
||||
use app\services\BaseServices;
|
||||
use crmeb\exceptions\AdminException;
|
||||
use crmeb\services\HttpService;
|
||||
|
||||
/**
|
||||
* 商业授权
|
||||
* 原厂授权申请入口已禁用。
|
||||
* Class SystemAuthServices
|
||||
* @package app\services\system
|
||||
*/
|
||||
@@ -19,24 +18,13 @@ class SystemAuthServices extends BaseServices
|
||||
{
|
||||
|
||||
/**
|
||||
* 申请授权
|
||||
* 原厂授权申请入口已禁用。
|
||||
* @param array $data
|
||||
* @param $headerData
|
||||
* @return bool
|
||||
*/
|
||||
public function authApply(array $data, $headerData)
|
||||
{
|
||||
$res = HttpService::postRequest('http://authorize.crmeb.net/api/auth_apply', $data, $headerData);
|
||||
if ($res === false) {
|
||||
throw new AdminException('申请失败,服务器没有响应!');
|
||||
}
|
||||
$res = json_decode($res, true);
|
||||
if (isset($res['status'])) {
|
||||
if ($res['status'] == 400) {
|
||||
throw new AdminException($res['msg'] ?? "申请失败");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
throw new AdminException('CRMEB 原厂授权申请入口已禁用,请使用本项目自有版权配置');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
// | 应用设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
use crmeb\basic\BaseAuth;
|
||||
|
||||
return [
|
||||
// 应用地址
|
||||
'app_host' => env('HOST', ''),
|
||||
@@ -43,5 +41,5 @@ return [
|
||||
// 显示错误信息
|
||||
'show_error_msg' => false,
|
||||
// 授权密钥
|
||||
'auth_crmeb' => BaseAuth::AUTH_CRMEB
|
||||
'auth_crmeb' => ''
|
||||
];
|
||||
|
||||
@@ -106,26 +106,26 @@ Route::group('adminapi', function () {
|
||||
Route::get('home/rank', 'Common/purchaseRanking')->option(['real_name' => '首页交易额排行']);
|
||||
//消息提醒
|
||||
Route::get('jnotice', 'Common/jnotice')->option(['real_name' => '消息提醒']);
|
||||
//验证授权
|
||||
Route::get('check_auth', 'Common/check_auth')->option(['real_name' => '验证授权']);
|
||||
//申请授权
|
||||
Route::post('auth_apply', 'Common/auth_apply')->option(['real_name' => '申请授权']);
|
||||
//系统许可状态
|
||||
Route::get('check_auth', 'Common/check_auth')->option(['real_name' => '系统许可状态']);
|
||||
//原厂授权申请已禁用
|
||||
Route::post('auth_apply', 'Common/auth_apply')->option(['real_name' => '原厂授权申请已禁用']);
|
||||
//查询版权
|
||||
Route::get('crmeb_copyright', 'Common/crmeb_copyright')->option(['real_name' => '申请版权']);
|
||||
//授权信息
|
||||
Route::get('auth', 'Common/auth')->option(['real_name' => '授权信息']);
|
||||
//授权验证码
|
||||
Route::get('crmeb_verify', 'Common/crmeb_verify')->option(['real_name' => '授权验证码']);
|
||||
//登录
|
||||
Route::post('crmeb_login', 'Common/crmeb_login')->option(['real_name' => '登录']);
|
||||
//授权订单
|
||||
Route::post('crmeb_order', 'Common/crmeb_order')->option(['real_name' => '授权订单']);
|
||||
//获取授权订单
|
||||
Route::get('crmeb_order/:orderId', 'Common/crmeb_order_info')->option(['real_name' => '获取授权订单']);
|
||||
//授权支付
|
||||
Route::post('crmeb_pay', 'Common/crmeb_pay')->option(['real_name' => '授权支付']);
|
||||
//获取授权产品
|
||||
Route::get('crmeb_product', 'Common/crmeb_product')->option(['real_name' => '获取授权产品']);
|
||||
Route::get('crmeb_copyright', 'Common/crmeb_copyright')->option(['real_name' => '查询版权']);
|
||||
//系统许可信息
|
||||
Route::get('auth', 'Common/auth')->option(['real_name' => '系统许可信息']);
|
||||
//原厂授权验证码已禁用
|
||||
Route::get('crmeb_verify', 'Common/crmeb_verify')->option(['real_name' => '原厂授权验证码已禁用']);
|
||||
//原厂授权登录已禁用
|
||||
Route::post('crmeb_login', 'Common/crmeb_login')->option(['real_name' => '原厂授权登录已禁用']);
|
||||
//原厂授权订单已禁用
|
||||
Route::post('crmeb_order', 'Common/crmeb_order')->option(['real_name' => '原厂授权订单已禁用']);
|
||||
//原厂授权订单查询已禁用
|
||||
Route::get('crmeb_order/:orderId', 'Common/crmeb_order_info')->option(['real_name' => '原厂授权订单查询已禁用']);
|
||||
//原厂授权支付已禁用
|
||||
Route::post('crmeb_pay', 'Common/crmeb_pay')->option(['real_name' => '原厂授权支付已禁用']);
|
||||
//原厂授权产品已禁用
|
||||
Route::get('crmeb_product', 'Common/crmeb_product')->option(['real_name' => '原厂授权产品已禁用']);
|
||||
//保存版权
|
||||
Route::post('copyright', 'Common/saveCopyright')->option(['real_name' => '保存版权']);
|
||||
//获取左侧菜单
|
||||
|
||||
@@ -371,85 +371,7 @@ export function auth() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 申请授权
|
||||
* @param data
|
||||
*/
|
||||
export function authApply(data) {
|
||||
return request({
|
||||
url: "auth_apply",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取授权产品
|
||||
*/
|
||||
export function crmebProduct(params) {
|
||||
return request({
|
||||
url: "crmeb_product",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 授权验证码
|
||||
*/
|
||||
export function crmebVerify(params) {
|
||||
return request({
|
||||
url: "crmeb_verify",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 授权登录
|
||||
*/
|
||||
export function crmebLogin(data) {
|
||||
return request({
|
||||
url: "/crmeb_login",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 授权订单
|
||||
*/
|
||||
export function crmebOrder(data) {
|
||||
return request({
|
||||
url: "crmeb_order",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 再次支付
|
||||
*/
|
||||
export function crmebPay(data) {
|
||||
return request({
|
||||
url: `crmeb_pay`,
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取授权订单
|
||||
*/
|
||||
export function getCrmebOrder(id, params) {
|
||||
return request({
|
||||
url: `crmeb_order/${id}`,
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取授权订单
|
||||
* @description 获取系统版本
|
||||
*/
|
||||
export function getVersion() {
|
||||
return request({
|
||||
@@ -458,16 +380,6 @@ export function getVersion() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 申请版权
|
||||
*/
|
||||
export function crmebCopyRight() {
|
||||
return request({
|
||||
url: `crmeb_copyright`,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取版权
|
||||
*/
|
||||
|
||||
@@ -3,68 +3,20 @@
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
<div class="auth acea-row row-between-wrapper">
|
||||
<div class="acea-row row-middle">
|
||||
<Icon type="ios-bulb-outline" class="iconIos blue" />
|
||||
<div class="text" v-if="status === -1 || status === -9">
|
||||
<div>体验时间剩余 {{ dayNum }}天</div>
|
||||
<div class="code">
|
||||
到期后后台将不能正常使用,如果您对我们的系统满意,请支持正版!
|
||||
</div>
|
||||
</div>
|
||||
<div class="text" v-else-if="status === 2">
|
||||
<div>体验时间剩余 {{ dayNum }}天</div>
|
||||
<div class="code red">审核未通过</div>
|
||||
</div>
|
||||
<div class="text" v-else-if="status === 1">
|
||||
<div>商业授权</div>
|
||||
<div class="code">授权码:{{ authCode }}</div>
|
||||
</div>
|
||||
<div class="text" v-else-if="status === 0">
|
||||
<div>体验时间剩余 {{ dayNum }}天</div>
|
||||
<div class="code blue">授权申请已提交,请等待审核</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <Button class="grey" @click="toCrmeb()" v-if="status === 1">进入官网</Button> -->
|
||||
<div>
|
||||
<Button @click="toCrmeb()" v-if="status === 1">进入官网</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
@click="payment('pro')"
|
||||
v-else-if="status === -1 || status === -9"
|
||||
>申请授权
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
@click="payment('pro')"
|
||||
v-else-if="status === 2"
|
||||
>重新申请</Button
|
||||
>
|
||||
<Button class="grey" v-else-if="status === 0">审核中</Button>
|
||||
<Button class="ml20" @click="payment('pro')" v-if="status !== 1"
|
||||
>购买授权</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card
|
||||
:bordered="false"
|
||||
dis-hover
|
||||
class="ivu-mt"
|
||||
v-if="!copyright && status == 1"
|
||||
>
|
||||
<!-- v-if="copyright == '0' && status == 1" -->
|
||||
<div class="auth acea-row row-between-wrapper">
|
||||
<div class="acea-row row-middle">
|
||||
<span class="iconfont iconbanquan iconIos blue"></span>
|
||||
<Icon type="ios-information-circle-outline" class="iconIos blue" />
|
||||
<div class="text">
|
||||
<div>去版权服务</div>
|
||||
<div class="code">购买之后可以设置</div>
|
||||
<div class="pro_price" v-if="productStatus">¥{{ price }}</div>
|
||||
<div>系统许可</div>
|
||||
<div class="code">当前系统使用自有版权配置,不展示 CRMEB 原厂商业授权状态。</div>
|
||||
<div class="code">
|
||||
版本:{{ licenseInfo.edition || "custom" }} · 来源:{{ licenseInfo.license_source || "self-owned" }}
|
||||
</div>
|
||||
<div class="code">系统版本:{{ version || "-" }} {{ label || "" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<Button type="primary" @click="payment('copyright')">立即购买</Button>
|
||||
<Tag color="blue">自有配置</Tag>
|
||||
</div>
|
||||
</Card>
|
||||
<Card :bordered="false" dis-hover class="ivu-mt" v-if="copyright">
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
<div class="auth acea-row row-between-wrapper">
|
||||
<div class="acea-row row-middle">
|
||||
<span class="iconfont iconbanquan iconIos blue"></span>
|
||||
@@ -136,30 +88,13 @@
|
||||
</template>
|
||||
</Table>
|
||||
</Card>
|
||||
<Modal
|
||||
v-model="isTemplate"
|
||||
scrollable
|
||||
footer-hide
|
||||
closable
|
||||
title="商业授权"
|
||||
:z-index="1"
|
||||
width="447"
|
||||
@on-cancel="cancel"
|
||||
>
|
||||
<iframe
|
||||
width="100%"
|
||||
height="580"
|
||||
:src="iframeUrl"
|
||||
frameborder="0"
|
||||
></iframe>
|
||||
</Modal>
|
||||
<Modal
|
||||
v-model="modalPic"
|
||||
width="960px"
|
||||
scrollable
|
||||
footer-hide
|
||||
closable
|
||||
title="上传授权图片"
|
||||
title="上传版权图片"
|
||||
:mask-closable="false"
|
||||
:z-index="1"
|
||||
>
|
||||
@@ -181,54 +116,20 @@ import lookImage from "@/components/fromBuild/lookImage";
|
||||
import {
|
||||
auth,
|
||||
getVersion,
|
||||
crmebProduct,
|
||||
crmebCopyRight,
|
||||
saveCrmebCopyRight,
|
||||
getCrmebCopyRight,
|
||||
getSystemInfo
|
||||
} from "@/api/system";
|
||||
import { mapState } from "vuex";
|
||||
import { formatDate } from "@/utils/validate";
|
||||
import QRCode from "qrcodejs2";
|
||||
import Vcode from "vue-puzzle-vcode";
|
||||
|
||||
export default {
|
||||
name: "system_auth",
|
||||
computed: {
|
||||
...mapState("admin/layout", ["isMobile"]),
|
||||
...mapState("admin/userLevel", ["categoryId"]),
|
||||
labelWidth() {
|
||||
return this.isMobile ? undefined : 85;
|
||||
},
|
||||
labelPosition() {
|
||||
return this.isMobile ? "top" : "right";
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
baseURLS: Setting.apiBaseURL.replace(/adminapi/, ""),
|
||||
baseUrl: "https://shop.crmeb.net/html/index.html",
|
||||
iframeUrl: "",
|
||||
captchs: "http://authorize.crmeb.net/api/captchs/",
|
||||
authCode: "",
|
||||
status: 1,
|
||||
dayNum: 0,
|
||||
copyright: "",
|
||||
isTemplate: false,
|
||||
price: "",
|
||||
proPrice: "",
|
||||
productStatus: false,
|
||||
licenseInfo: {},
|
||||
copyrightText: "",
|
||||
success: false,
|
||||
payType: "",
|
||||
disabled: false,
|
||||
isShow: false, // 验证码模态框是否出现
|
||||
active: 0,
|
||||
timer: null,
|
||||
version: "",
|
||||
label: "",
|
||||
productType: "",
|
||||
modalPic: false,
|
||||
isChoice: "单选",
|
||||
authorizedPicture: "", // 版权图片
|
||||
@@ -304,28 +205,15 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
formatDate(time) {
|
||||
if (time !== 0) {
|
||||
let date = new Date(time * 1000);
|
||||
return formatDate(date, "yyyy-MM-dd hh:mm");
|
||||
}
|
||||
},
|
||||
},
|
||||
components: {
|
||||
Vcode,
|
||||
uploadPictures,
|
||||
lookImage,
|
||||
},
|
||||
mounted() {
|
||||
this.getAuth();
|
||||
this.getVersion();
|
||||
this.getCopyRight();
|
||||
this.systemInfo();
|
||||
window.addEventListener("message", (e) => {
|
||||
if (e.data.event === "onCancel") {
|
||||
this.cancel();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
systemInfo() {
|
||||
@@ -353,12 +241,6 @@ export default {
|
||||
this.label = res.data.label;
|
||||
});
|
||||
},
|
||||
getCrmebCopyRight() {
|
||||
crmebCopyRight().then((res) => {
|
||||
this.getAuth();
|
||||
// return this.$Message.success(res.msg)
|
||||
});
|
||||
},
|
||||
//保存版权信息
|
||||
saveCopyRight() {
|
||||
saveCrmebCopyRight({
|
||||
@@ -384,79 +266,15 @@ export default {
|
||||
this.authorizedPicture = res.data.copyrightImage || "";
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
if (this.productType === "copyright") {
|
||||
this.getCrmebCopyRight();
|
||||
} else {
|
||||
this.getAuth();
|
||||
}
|
||||
this.iframeUrl = "";
|
||||
this.isTemplate = false;
|
||||
},
|
||||
loginTabSwitch(index) {
|
||||
this.active = index;
|
||||
},
|
||||
getAuth() {
|
||||
auth()
|
||||
.then((res) => {
|
||||
let data = res.data || {};
|
||||
this.authCode = data.authCode || "";
|
||||
this.status = data.status === undefined ? -1 : data.status;
|
||||
this.dayNum = data.day || 0;
|
||||
this.copyright = data.copyright;
|
||||
if (this.copyright) {
|
||||
this.getCopyRight();
|
||||
}
|
||||
this.licenseInfo = res.data || {};
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$Message.error(err.msg);
|
||||
});
|
||||
},
|
||||
toCrmeb() {
|
||||
window.open("http://www.crmeb.com");
|
||||
},
|
||||
getProduct() {
|
||||
crmebProduct({ type: "copyright" })
|
||||
.then((res) => {
|
||||
this.price = res.data.attr.price;
|
||||
this.productStatus = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$Message.error(err.msg);
|
||||
});
|
||||
crmebProduct({ type: "pro" })
|
||||
.then((res) => {
|
||||
this.proPrice = res.data.attr.price;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$Message.error(err.msg);
|
||||
});
|
||||
},
|
||||
payment(product) {
|
||||
this.productType = product;
|
||||
let host = location.host;
|
||||
let hostData = host.split(".");
|
||||
if (hostData[0] === "test" && hostData.length === 4) {
|
||||
host = host.replace("test.", "");
|
||||
} else if (hostData[0] === "www" && hostData.length === 3) {
|
||||
host = host.replace("www.", "");
|
||||
}
|
||||
this.iframeUrl =
|
||||
this.baseUrl +
|
||||
"?url=" +
|
||||
host +
|
||||
"&product=" +
|
||||
product +
|
||||
"&version=" +
|
||||
this.version +
|
||||
"&label=" +
|
||||
this.label;
|
||||
this.isTemplate = true;
|
||||
},
|
||||
// 用户点击遮罩层,应该关闭模态框
|
||||
onClose() {
|
||||
this.isShow = false;
|
||||
},
|
||||
},
|
||||
destroyed() {},
|
||||
};
|
||||
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
name: `${pre}auth`,
|
||||
meta: {
|
||||
auth: ['system-maintain-auth'],
|
||||
title: '商业授权'
|
||||
title: '系统许可'
|
||||
},
|
||||
component: () => import('@/pages/system/auth/index')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user