up.
This commit is contained in:
parent
9d077cb93e
commit
c5ccc91586
14
app/controller/admin/GlobalController.php
Normal file
14
app/controller/admin/GlobalController.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\controller\admin;
|
||||||
|
|
||||||
|
use app\BaseController;
|
||||||
|
use think\response\Json;
|
||||||
|
|
||||||
|
class GlobalController extends BaseController
|
||||||
|
{
|
||||||
|
public function index(): Json
|
||||||
|
{
|
||||||
|
return $this->writeSuccess('success', []);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -16,7 +16,7 @@ class MemberController extends BaseController
|
|||||||
'telephone_md5' => $this->request->get('telephone_md5/s', ''),
|
'telephone_md5' => $this->request->get('telephone_md5/s', ''),
|
||||||
'realname' => $this->request->get('realname/s', ''),
|
'realname' => $this->request->get('realname/s', ''),
|
||||||
'register_channel_id ' => $this->request->get('register_channel_id/d', 0),
|
'register_channel_id ' => $this->request->get('register_channel_id/d', 0),
|
||||||
]);
|
])->append(['channel']);
|
||||||
|
|
||||||
$paginate = CurdService::getPaginate($this->request, $model);
|
$paginate = CurdService::getPaginate($this->request, $model);
|
||||||
|
|
||||||
|
|||||||
24
app/model/XmChannel.php
Normal file
24
app/model/XmChannel.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\model;
|
||||||
|
|
||||||
|
use app\BaseModel;
|
||||||
|
use think\model\concern\SoftDelete;
|
||||||
|
use think\model\relation\HasMany;
|
||||||
|
|
||||||
|
class XmChannel extends BaseModel
|
||||||
|
{
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
protected $name = "xm_channel";
|
||||||
|
protected $pk = "channel_id";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道下的会员列表
|
||||||
|
* @return HasMany
|
||||||
|
*/
|
||||||
|
public function members(): HasMany
|
||||||
|
{
|
||||||
|
return $this->hasMany(XmMember::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ namespace app\model;
|
|||||||
|
|
||||||
use app\BaseModel;
|
use app\BaseModel;
|
||||||
use think\model\concern\SoftDelete;
|
use think\model\concern\SoftDelete;
|
||||||
|
use think\model\relation\HasOne;
|
||||||
|
|
||||||
class XmMember extends BaseModel
|
class XmMember extends BaseModel
|
||||||
{
|
{
|
||||||
@ -11,4 +12,12 @@ class XmMember extends BaseModel
|
|||||||
|
|
||||||
protected $name = "xm_member";
|
protected $name = "xm_member";
|
||||||
protected $pk = "member_id";
|
protected $pk = "member_id";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员所属渠道
|
||||||
|
*/
|
||||||
|
public function channel(): HasOne
|
||||||
|
{
|
||||||
|
return $this->hasOne(XmChannel::class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -6,6 +6,7 @@ use app\entity\SysOrganization;
|
|||||||
use app\http\middleware\ClientMiddleware;
|
use app\http\middleware\ClientMiddleware;
|
||||||
use app\model\SysDictionary;
|
use app\model\SysDictionary;
|
||||||
use app\controller\admin\{auth,
|
use app\controller\admin\{auth,
|
||||||
|
GlobalController,
|
||||||
member\MemberController,
|
member\MemberController,
|
||||||
system\CacheController,
|
system\CacheController,
|
||||||
system\CacheDataController,
|
system\CacheDataController,
|
||||||
@ -51,6 +52,7 @@ Route::group("adminapi", function () {
|
|||||||
|
|
||||||
Route::post("login", [auth\LoginController::class, "index"])->name("admin.SysUserLogin");
|
Route::post("login", [auth\LoginController::class, "index"])->name("admin.SysUserLogin");
|
||||||
|
|
||||||
|
Route::get("global", [GlobalController::class, "index"])->name("admin.SysUserLogin");
|
||||||
|
|
||||||
Route::group(function () {
|
Route::group(function () {
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#VITE_API_URL=https://v2.eleadmin.com/api
|
#VITE_API_URL=https://v2.eleadmin.com/api
|
||||||
#VITE_API_URL=http://a.tcp.run/adminapi
|
#VITE_API_URL=http://a.tcp.run/adminapi
|
||||||
VITE_API_URL=http://xm.tcp.run/adminapi
|
VITE_API_URL=http://xm.tcp.run/adminapi
|
||||||
|
VITE_WS_URL=ws://xm.tcp.run/socket.io
|
||||||
VITE_LICENSE=dk9mcwJyetRWQlxWRiojIiwiIzVHbQ5Wa6ICdjVmaiV3ciQWaiwCN3YDNW9ERolFcMJiOpNnclZnIsIyViQjLxIiOi42bQf0NW==
|
VITE_LICENSE=dk9mcwJyetRWQlxWRiojIiwiIzVHbQ5Wa6ICdjVmaiV3ciQWaiwCN3YDNW9ERolFcMJiOpNnclZnIsIyViQjLxIiOi42bQf0NW==
|
||||||
# 禁请求加密
|
# 禁请求加密
|
||||||
VITE_SKIP_REQUEST_ENCRYPTION=0
|
VITE_SKIP_REQUEST_ENCRYPTION=0
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
/** 接口地址 */
|
/** 接口地址 */
|
||||||
export const API_BASE_URL: string = import.meta.env.VITE_API_URL;
|
export const API_BASE_URL: string = import.meta.env.VITE_API_URL;
|
||||||
|
|
||||||
|
/** Ws地址 */
|
||||||
|
export const WS_BASE_URL: string = import.meta.env.VITE_WS_URL;
|
||||||
|
|
||||||
/** 项目名称 */
|
/** 项目名称 */
|
||||||
export const PROJECT_NAME: string = import.meta.env.VITE_APP_NAME;
|
export const PROJECT_NAME: string = import.meta.env.VITE_APP_NAME;
|
||||||
|
|
||||||
@ -35,7 +38,8 @@ export const MAP_KEY = '006d995d433058322319fa797f2876f5';
|
|||||||
export const LICENSE_CODE = import.meta.env.VITE_LICENSE;
|
export const LICENSE_CODE = import.meta.env.VITE_LICENSE;
|
||||||
|
|
||||||
/** 数据加密key */
|
/** 数据加密key */
|
||||||
export const DATA_SECRET_KEY = import.meta.env.VITE_DATA_SECRET_KEY
|
export const DATA_SECRET_KEY = import.meta.env.VITE_DATA_SECRET_KEY;
|
||||||
|
|
||||||
/** 请求加密开关 */
|
/** 请求加密开关 */
|
||||||
export const SKIP_REQUEST_ENCRYPTION = import.meta.env.VITE_SKIP_REQUEST_ENCRYPTION;
|
export const SKIP_REQUEST_ENCRYPTION = import.meta.env
|
||||||
|
.VITE_SKIP_REQUEST_ENCRYPTION;
|
||||||
|
|||||||
@ -16,12 +16,13 @@ import './styles/themes/rounded.scss';
|
|||||||
import './styles/themes/dark.scss';
|
import './styles/themes/dark.scss';
|
||||||
import './styles/themes/transparent.scss';
|
import './styles/themes/transparent.scss';
|
||||||
import './styles/index.scss';
|
import './styles/index.scss';
|
||||||
|
import { WS_BASE_URL } from '@/config/setting';
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
// WebSocket配置
|
// WebSocket配置
|
||||||
const websocketConfig: Partial<WsConfig> = {
|
const websocketConfig: Partial<WsConfig> = {
|
||||||
url: 'ws://139.155.146.146:19981', // 你的WebSocket服务器地址
|
url: WS_BASE_URL, // 你的WebSocket服务器地址
|
||||||
reconnectAttempts: 10,
|
reconnectAttempts: 10,
|
||||||
reconnectDelay: 5000,
|
reconnectDelay: 5000,
|
||||||
autoConnect: true // 应用启动时自动连接
|
autoConnect: true // 应用启动时自动连接
|
||||||
|
|||||||
@ -67,28 +67,41 @@
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'roleName',
|
prop: 'memberId',
|
||||||
label: '角色名称',
|
label: '会员ID',
|
||||||
sortable: 'custom',
|
width: 80
|
||||||
minWidth: 120
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'roleCode',
|
prop: 'realname',
|
||||||
label: '角色标识',
|
label: '姓名',
|
||||||
sortable: 'custom',
|
width: 80
|
||||||
minWidth: 120
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'comments',
|
prop: 'channel.name',
|
||||||
label: '备注',
|
label: '姓名',
|
||||||
sortable: 'custom',
|
width: 80
|
||||||
minWidth: 140
|
},
|
||||||
|
{
|
||||||
|
prop: 'telephoneMd5',
|
||||||
|
label: '手机号MD5',
|
||||||
|
minWidth: 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'onlineIp',
|
||||||
|
label: '最后在线Ip',
|
||||||
|
width: 170,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'onlineTime',
|
||||||
|
label: '最后在线时间',
|
||||||
|
width: 170,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '创建时间',
|
label: '注册时间',
|
||||||
sortable: 'custom',
|
width: 170,
|
||||||
width: 180,
|
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user