Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
ded7e8cc
提交
ded7e8cc
authored
8月 30, 2025
作者:
毛细亚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化组件样式与交互
上级
108e1d81
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
265 行增加
和
0 行删除
+265
-0
getRoleList.vue
src/components/getRoleList.vue
+155
-0
giftCodeDialog.vue
src/views/components/quickSendGame/giftCodeDialog.vue
+108
-0
vipTools.vue
src/views/components/quickSendGame/vipTools.vue
+2
-0
roleInfoPanel.vue
src/views/components/roleInfo/roleInfoPanel.vue
+0
-0
没有找到文件。
src/components/getRoleList.vue
0 → 100644
浏览文件 @
ded7e8cc
<!--
# getRoleList 传入 member_id 获取角色列表
-->
<
template
>
<el-select
v-model=
"selectedValue"
placeholder=
"请选择"
clearable
size=
"small"
:style=
"
{ width: width || '100%' }"
v-bind="$attrs" :clearable="false" filterable remote :remote-method="remoteMethod" @clear="handleClear"
v-on="$listeners" @change="handleChange" @visible-change="handleVisibleChange">
<div
class=
"select-dropdown"
@
scroll=
"handleScroll"
>
<el-option
v-for=
"item in RuleList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
<div
v-if=
"loading"
v-loading=
"true"
class=
"loading-more"
>
加载中...
</div>
</div>
</el-select>
</
template
>
<
script
lang=
"jsx"
>
import
{
getRoleHoLo
}
from
'@/api/game'
import
{
debounce
}
from
'@/utils'
export
default
{
name
:
'getRoleList'
,
props
:
{
member_id
:
{
type
:
[
String
,
Number
],
default
:
''
},
value
:
{
type
:
[
String
,
Number
],
default
:
''
},
width
:
{
type
:
[
String
,
Number
],
default
:
''
}
},
data
()
{
return
{
RuleList
:
[],
loading
:
false
,
currentPage
:
1
,
hasMore
:
true
,
searchQuery
:
''
,
selectedValue
:
this
.
value
,
_debouncedRemote
:
null
}
},
watch
:
{
value
(
newVal
)
{
this
.
selectedValue
=
newVal
},
member_id
(
newVal
)
{
this
.
getRuleList
()
}
},
created
()
{
this
.
getRuleList
()
},
methods
:
{
async
getRuleList
(
isLoadMore
=
false
,
query
)
{
// 仅在加载更多时受 hasMore 限制;新检索应始终允许
if
(
this
.
loading
||
(
isLoadMore
&&
!
this
.
hasMore
))
return
try
{
this
.
loading
=
true
const
keyword
=
typeof
query
===
'string'
?
query
:
this
.
searchQuery
if
(
!
isLoadMore
)
{
// 新检索时记录关键字
this
.
searchQuery
=
keyword
||
''
}
const
res
=
await
getRoleHoLo
({
page
:
isLoadMore
?
this
.
currentPage
+
1
:
1
,
page_size
:
20
,
api_search_name
:
keyword
,
search_type
:
'list'
,
member_id
:
this
.
member_id
})
if
(
res
.
status_code
===
1
&&
res
.
data
&&
res
.
data
.
data
)
{
res
.
data
.
data
.
forEach
(
item
=>
{
item
.
server_name
?
item
.
label
=
`
${
item
.
role_name
}
-
${
item
.
server_name
}
`
:
item
.
label
=
item
.
role_name
item
.
value
=
item
.
role_id
})
if
(
isLoadMore
)
{
this
.
RuleList
=
[...
this
.
RuleList
,
...
res
.
data
.
data
]
this
.
currentPage
++
}
else
{
this
.
RuleList
=
res
.
data
.
data
this
.
currentPage
=
1
}
this
.
hasMore
=
res
.
data
.
data
.
length
>=
20
}
else
{
this
.
$message
.
warning
(
res
.
data
.
msg
)
}
}
catch
(
error
)
{
this
.
$message
.
error
(
'获取数据失败'
)
}
finally
{
this
.
loading
=
false
}
},
handleScroll
(
e
)
{
const
{
scrollTop
,
scrollHeight
,
clientHeight
}
=
e
.
target
if
(
scrollHeight
-
scrollTop
-
clientHeight
<
50
&&
this
.
hasMore
)
{
this
.
getRuleList
(
true
,
this
.
searchQuery
)
}
},
handleClear
()
{
this
.
selectedValue
=
''
this
.
searchQuery
=
''
this
.
$emit
(
'clear'
)
},
handleChange
()
{
const
roleInfo
=
this
.
RuleList
.
find
(
item
=>
item
.
value
===
this
.
selectedValue
)
this
.
$emit
(
'selectChange'
,
roleInfo
)
},
handleVisibleChange
(
visible
)
{
// if (visible) {
// this.getRuleList()
// }
},
remoteMethod
(
query
)
{
if
(
!
this
.
_debouncedRemote
)
{
this
.
_debouncedRemote
=
debounce
((
q
)
=>
{
this
.
getRuleList
(
false
,
q
)
},
300
)
}
this
.
_debouncedRemote
(
query
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.select-dropdown
{
max-height
:
300px
;
overflow-y
:
auto
;
&::-webkit-scrollbar
{
width
:
6px
;
}
&
::-webkit-scrollbar-thumb
{
background-color
:
#e4e7ed
;
border-radius
:
3px
;
}
}
.loading-more
{
text-align
:
center
;
padding
:
5px
0
;
}
</
style
>
\ No newline at end of file
src/views/components/quickSendGame/giftCodeDialog.vue
0 → 100644
浏览文件 @
ded7e8cc
<!--
* @Author: maoxiya 937667504@qq.com
* @Date: 2025-08-28 15:59:46
* @LastEditors: maoxiya 937667504@qq.com
* @LastEditTime: 2025-08-30 11:35:36
* @FilePath: /company_wx_frontend/src/views/works/component/chat/giftCodeDialog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<el-dialog
title=
"礼包码"
:visible=
"dialogVisible"
class=
"giftCodeDialogForm"
width=
"500px"
@
close=
"closeDialog"
>
<el-form
:model=
"form"
ref=
"giftCodeDialogForm"
label-width=
"120px"
:rules=
"rules"
>
<el-form-item
label=
"账号ID"
prop=
"member_id"
>
<el-select
style=
"width: 320px;"
:clearable=
"false"
@
change=
"handleMemberIdChange"
v-model=
"form.member_id"
placeholder=
"请选择账号ID"
>
<el-option
v-for=
"item in bindGameUserList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"角色ID"
prop=
"role_id"
>
<getRoleList
v-model=
"form.role_id"
width=
"320px"
placeholder=
"请选择角色"
:member_id=
"form.member_id"
@
selectChange=
"handleSelectionChange"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"getGiftCodeSubmit('send')"
>
确定
</el-button>
<el-button
type=
"text"
@
click=
"getGiftCodeSubmit('copy')"
>
仅复制
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
getRoleList
from
'@/components/getRoleList.vue'
import
{
getRoleHoLo
}
from
'@/api/game'
import
{
mapState
}
from
'vuex'
export
default
{
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
}
},
components
:
{
getRoleList
},
data
()
{
return
{
form
:
{
member_id
:
''
,
username
:
''
,
role_id
:
''
,
role_name
:
''
,
},
rules
:
{
member_id
:
[{
required
:
true
,
message
:
'请选择账号ID'
,
trigger
:
'change'
}],
role_id
:
[{
required
:
true
,
message
:
'请选择角色ID'
,
trigger
:
'change'
}]
},
getRoleHoLo
:
getRoleHoLo
,
gift_code
:
[],
roleList
:
[],
pageInfo
:
{
page
:
1
,
page_size
:
10
},
loading
:
false
}
},
mounted
()
{
this
.
form
.
member_id
=
this
.
accountSelect
this
.
form
.
username
=
this
.
bindGameUserList
.
find
(
item
=>
item
.
member_id
===
this
.
accountSelect
).
username
},
computed
:
{
...
mapState
(
'game'
,
[
'accountSelect'
,
'bindGameUserList'
])
},
methods
:
{
handleMemberIdChange
(
value
)
{
this
.
form
.
role_id
=
''
this
.
form
.
role_name
=
''
const
userInfo
=
this
.
bindGameUserList
.
find
(
item
=>
item
.
value
===
value
)
this
.
form
.
username
=
userInfo
.
label
||
userInfo
.
username
this
.
form
.
member_id
=
value
},
handleSelectionChange
(
roleInfo
)
{
console
.
log
(
roleInfo
,
'roleInfo'
)
this
.
form
.
role_name
=
roleInfo
.
label
||
''
},
closeDialog
()
{
this
.
$emit
(
'update:dialogVisible'
,
false
)
},
getGiftCodeSubmit
(
type
)
{
this
.
$refs
.
giftCodeDialogForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$emit
(
'update:dialogVisible'
,
false
)
this
.
$emit
(
'result'
,
this
.
form
,
type
)
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.giftCodeDialogForm
{
.dialog-footer
{
border
:
none
;
padding
:
0
;
}
}
</
style
>
\ No newline at end of file
src/views/components/quickSendGame/vipTools.vue
浏览文件 @
ded7e8cc
...
@@ -59,12 +59,14 @@
...
@@ -59,12 +59,14 @@
</el-collapse>
</el-collapse>
</el-collapse-transition>
</el-collapse-transition>
</div>
</div>
<giftCodeDialog
ref=
"giftCodeDialog"
:dialogVisible=
"dialogVisible"
@
result=
"getGiftCodeSubmit"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapState
,
mapMutations
}
from
'vuex'
import
{
mapState
,
mapMutations
}
from
'vuex'
import
{
passwardEncryption
,
createVipUrl
}
from
'@/api/game'
import
{
passwardEncryption
,
createVipUrl
}
from
'@/api/game'
import
{
giftCodeList
,
sendGiftCode
,
getZyouAuthLink
}
from
'@/api/works'
import
{
giftCodeList
,
sendGiftCode
,
getZyouAuthLink
}
from
'@/api/works'
import
giftCodeDialog
from
'./giftCodeDialog.vue'
export
default
{
export
default
{
name
:
'vipTools'
,
name
:
'vipTools'
,
data
()
{
data
()
{
...
...
src/views/components/roleInfo/roleInfoPanel.vue
浏览文件 @
ded7e8cc
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论