Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
7ea438c4
提交
7ea438c4
authored
12月 16, 2025
作者:
毛细亚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🐞
fix: 优化复制指令和游戏分身包链接处理
上级
d55a4eec
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
40 行增加
和
79 行删除
+40
-79
copy.js
src/directive/copy/copy.js
+21
-2
sendGame.vue
src/views/components/quickSendGame/sendGame.vue
+11
-7
roleInfoPanel.vue
src/views/components/roleInfo/roleInfoPanel.vue
+8
-70
没有找到文件。
src/directive/copy/copy.js
浏览文件 @
7ea438c4
...
...
@@ -75,11 +75,29 @@ const copy = {
unbind
:
function
(
el
)
{
// 清理事件监听器和元素
if
(
el
.
__copyIcon
)
{
el
.
__copyIcon
.
removeEventListener
(
'click'
,
null
)
el
.
parentNode
.
removeChild
(
el
.
__copyIcon
)
try
{
// 移除事件监听器
const
clickHandler
=
el
.
__copyIcon
.
__clickHandler
if
(
clickHandler
)
{
el
.
__copyIcon
.
removeEventListener
(
'click'
,
clickHandler
)
delete
el
.
__copyIcon
.
__clickHandler
}
// 安全地移除图标元素
if
(
el
.
__copyIcon
&&
el
.
__copyIcon
.
parentNode
)
{
el
.
__copyIcon
.
parentNode
.
removeChild
(
el
.
__copyIcon
)
}
else
if
(
el
.
__copyIcon
&&
el
.
__copyIcon
.
remove
)
{
// 如果节点还在DOM中,使用 remove() 方法
el
.
__copyIcon
.
remove
()
}
}
catch
(
error
)
{
// 忽略移除节点时的错误,可能节点已经被移除了
console
.
warn
(
'移除复制图标时出错:'
,
error
)
}
finally
{
delete
el
.
__copyIcon
}
}
}
}
export
default
copy
\ No newline at end of file
src/views/components/quickSendGame/sendGame.vue
浏览文件 @
7ea438c4
...
...
@@ -1140,24 +1140,25 @@ export default {
},
500
),
// 转端发送游戏分身包 h5 安卓游戏 IOS游戏 发送分身包
async
sendTransferCloneGame
(
type
)
{
console
.
log
(
type
,
'type'
)
const
res
=
await
memberRegGameCloneLink
({
member_id
:
this
.
accountSelect
})
if
(
res
.
status_code
==
1
)
{
// 通过 type 判断 用 switch
switch
(
type
)
{
case
2
:
if
(
!
res
?.
data
?.
data
?.
h5_download_url
)
{
if
(
!
res
?.
data
?.
h5_download_url
)
{
this
.
$message
.
warning
(
'H5安卓分身包链接不存在,请联系掌游配置'
)
return
}
break
case
3
:
if
(
!
res
?.
data
?.
data
?.
android_download_url
)
{
if
(
!
res
?.
data
?.
android_download_url
)
{
this
.
$message
.
warning
(
'安卓分身包链接不存在,请联系掌游配置'
)
return
}
break
case
4
:
if
(
!
res
?.
data
?.
data
?.
ios_download_url
)
{
if
(
!
res
?.
data
?.
ios_download_url
)
{
this
.
$message
.
warning
(
'IOS分身包链接不存在,请联系掌游配置'
)
return
}
...
...
@@ -1168,11 +1169,14 @@ export default {
}
let
srt
=
''
switch
(
type
)
{
case
'android'
:
srt
=
'安卓分身包链接: '
+
res
.
data
.
data
.
android_download_url
case
2
:
srt
=
'H5分身包链接: '
+
res
.
data
.
h5_download_url
break
case
3
:
srt
=
'安卓分身包链接: '
+
res
.
data
.
android_download_url
break
case
'ios'
:
srt
=
'IOS分身包链接: '
+
res
.
data
.
data
.
ios_download_url
case
4
:
srt
=
'IOS分身包链接: '
+
res
.
data
.
ios_download_url
break
}
const
list
=
[
...
...
src/views/components/roleInfo/roleInfoPanel.vue
浏览文件 @
7ea438c4
...
...
@@ -182,10 +182,9 @@
<span
class=
"label"
>
带教记录:
</span>
<el-button
type=
"text"
class=
"text cursor-pointer"
style=
"cursor: pointer;"
@
click=
"openMentorRecordDrawer(items)"
>
{{ items.teach_num || '-' }} 次 1231
</el-button>
style=
"cursor: pointer;z-index:10;"
@
click
.
stop=
"openMentorRecordDrawer(items)"
>
{{ items.teach_num || '-' }}次
</el-button>
</div>
</div>
</div>
...
...
@@ -210,13 +209,13 @@
/>
<!-- 带教记录弹窗 -->
<el-drawer
v-model=
"showMentorRecord"
drawer-title=
"带教记录"
drawer-size=
"400px"
:show
.
sync=
"showMentorRecord"
v-if=
"showMentorRecord"
title=
"带教记录"
size=
"400px"
:append-to-body=
"true"
>
<mentorRecord
v-if=
"showMentorRecord"
:role-id=
"currentRoleId"
:role-name=
"currentRoleName"
@
refresh=
"handleMentorRecordRefresh"
...
...
@@ -330,68 +329,6 @@ export default {
});
}
},
/**
* 打开带教记录弹窗
*/
openMentorRecordDrawer
(
roleItem
)
{
console
.
log
(
roleItem
,
'roleItem'
)
this
.
currentRoleId
=
roleItem
.
role_id
this
.
currentRoleName
=
`
${
roleItem
.
role_name
}
-
${
roleItem
.
server_name
}
`
this
.
showMentorRecord
=
true
},
/**
* 带教记录刷新后,更新角色列表中的带教次数
*/
async
handleMentorRecordRefresh
(
roleId
,
teachingListLength
)
{
// 重新获取角色列表,更新带教次数
const
index
=
this
.
roleList
.
findIndex
(
item
=>
item
.
role_id
===
roleId
)
if
(
index
!==
-
1
)
{
this
.
$set
(
this
.
roleList
[
index
],
'teach_num'
,
teachingListLength
)
}
this
.
roleList
=
this
.
roleList
.
concat
([])
},
/**
* 处理角色展开时获取带教次数
* @param {Array} openedRoleIds - 新展开的角色ID数组
*/
handleChangeRoleTeachingNum
(
openedRoleIds
)
{
if
(
!
openedRoleIds
||
openedRoleIds
.
length
===
0
)
{
return
}
// 遍历新展开的角色,获取带教次数
openedRoleIds
.
forEach
(
roleId
=>
{
const
roleItem
=
this
.
roleList
.
find
(
item
=>
item
.
role_id
===
roleId
)
if
(
roleItem
)
{
// 如果已经存在 teach_num 字段,则不请求接口
if
(
roleItem
.
teach_num
===
undefined
||
roleItem
.
teach_num
===
null
)
{
this
.
getRoleTeachingNum
(
roleId
)
}
}
})
},
/**
* 获取角色带教次数
* @param {String|Number} roleId - 角色ID
*/
async
getRoleTeachingNum
(
roleId
)
{
try
{
const
res
=
await
roleTeachingNum
({
role_id
:
roleId
})
console
.
log
(
res
,
'res'
)
if
(
res
.
status_code
===
1
)
{
// 更新对应角色的 teach_num 字段
const
index
=
this
.
roleList
.
findIndex
(
item
=>
item
.
role_id
===
roleId
)
if
(
index
!==
-
1
)
{
this
.
$set
(
this
.
roleList
[
index
],
'teach_num'
,
res
.
data
.
data
?.
role_teaching_num
||
0
)
this
.
roleList
=
[...
this
.
roleList
]
}
}
}
catch
(
error
)
{
console
.
error
(
'获取带教次数失败:'
,
error
)
}
},
async
handleChange
(
v
)
{
const
index
=
this
.
roleList
.
findIndex
(
(
item
)
=>
v
.
includes
(
item
.
role_id
)
&&
!
item
.
server_day
...
...
@@ -444,6 +381,7 @@ export default {
* 打开带教记录弹窗
*/
openMentorRecordDrawer
(
roleItem
)
{
console
.
log
(
roleItem
,
'roleItem'
)
this
.
currentRoleId
=
roleItem
.
role_id
this
.
currentRoleName
=
`
${
roleItem
.
role_name
}
-
${
roleItem
.
server_name
}
`
this
.
showMentorRecord
=
true
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论