Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
2ebf3a13
提交
2ebf3a13
authored
9月 17, 2025
作者:
毛细亚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新代码
上级
e7b46bf6
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
299 行增加
和
11 行删除
+299
-11
game.js
src/api/game.js
+59
-0
game.js
src/store/modules/game.js
+4
-0
roleInfoPanel.vue
src/views/components/roleInfo/roleInfoPanel.vue
+27
-4
Info.vue
src/views/userInfo/components/Info.vue
+10
-7
vipLevel.vue
src/views/userInfo/components/gameInfo/vipLevel.vue
+199
-0
没有找到文件。
src/api/game.js
浏览文件 @
2ebf3a13
...
@@ -1338,3 +1338,61 @@ export function getRoleRecentActivityNotPushNumApi(data) {
...
@@ -1338,3 +1338,61 @@ export function getRoleRecentActivityNotPushNumApi(data) {
});
});
});
});
}
}
// 获取 w 账号下的等级最高的角色
export
function
marketingMemberRoleGrade
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cross_systemRequest
({
system
:
'zhangyou'
,
api
:
'/api/marketing_role_grade/marketingMemberRoleGrade'
,
params
:
data
}).
then
((
res
)
=>
{
resolve
(
res
)
}).
catch
((
error
)
=>
{
reject
(
error
)
})
})
}
// 获取角色对应的vip等级
export
function
marketingRoleGrade
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cross_systemRequest
({
system
:
'zhangyou'
,
api
:
'/api/marketing_role_grade/marketingRoleGrade'
,
params
:
data
}).
then
((
res
)
=>
{
resolve
(
res
)
}).
catch
((
error
)
=>
{
reject
(
error
)
})
})
}
// VIP 等级权益
export
function
marketingRoleGradeBenefit
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cross_systemRequest
({
system
:
'zhangyou'
,
api
:
'/api/marketing_role_grade/marketingRoleGradeBenefit'
,
params
:
data
}).
then
((
res
)
=>
{
resolve
(
res
)
}).
catch
((
error
)
=>
{
reject
(
error
)
})
})
}
// 发送vip等级海报链接
export
function
marketingRoleGradeUrl
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cross_systemRequest
({
system
:
'zhangyou'
,
api
:
'/api/marketing_role_grade/marketingRoleGradeUrl'
,
params
:
data
}).
then
((
res
)
=>
{
resolve
(
res
)
}).
catch
((
error
)
=>
{
reject
(
error
)
})
})
}
\ No newline at end of file
src/store/modules/game.js
浏览文件 @
2ebf3a13
...
@@ -16,6 +16,7 @@ const state = {
...
@@ -16,6 +16,7 @@ const state = {
chatUserInfo
:
{},
// 当前选中的用户的详情
chatUserInfo
:
{},
// 当前选中的用户的详情
viewLoading
:
false
,
// 查看用户详情的时候 加载状态
viewLoading
:
false
,
// 查看用户详情的时候 加载状态
taskDetails
:
{},
// 任务详情
taskDetails
:
{},
// 任务详情
vipRoleInfo
:
{},
// VIP等级信息
// 任务数据
// 任务数据
taskData
:
{
taskData
:
{
user_task
:
0
,
user_task
:
0
,
...
@@ -53,6 +54,9 @@ const mutations = {
...
@@ -53,6 +54,9 @@ const mutations = {
...
data
,
...
data
,
lastUpdateTime
:
Date
.
now
()
lastUpdateTime
:
Date
.
now
()
}
}
},
set_vipRoleInfo
(
state
,
data
)
{
state
.
vipRoleInfo
=
data
}
}
}
}
...
...
src/views/components/roleInfo/roleInfoPanel.vue
浏览文件 @
2ebf3a13
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
?
items
.
recharge_total
+
'元'
?
items
.
recharge_total
+
'元'
:
'0元'
:
'0元'
}}
</span>
}}
</span>
<vip-level
:role-info=
"items"
/>
</div>
</div>
</div>
</div>
<div
class=
"flex-1 h-0 flex justify-end items-start pt-[10px]"
>
<div
class=
"flex-1 h-0 flex justify-end items-start pt-[10px]"
>
...
@@ -143,17 +144,19 @@
...
@@ -143,17 +144,19 @@
<
script
>
<
script
>
import
{
mapState
,
mapMutations
,
mapActions
}
from
'vuex'
;
import
{
mapState
,
mapMutations
,
mapActions
}
from
'vuex'
;
import
{
getRoleHoLo
}
from
'@/api/game'
;
import
{
getRoleHoLo
,
marketingRoleGrade
}
from
'@/api/game'
;
import
noContent
from
'@/components/noContent.vue'
;
import
noContent
from
'@/components/noContent.vue'
;
import
appeal
from
'./layer/appeal.vue'
;
import
appeal
from
'./layer/appeal.vue'
;
import
watchMember
from
'@/mixins/watchMember'
;
import
watchMember
from
'@/mixins/watchMember'
;
import
{
createDetails
}
from
'@/views/popup/RecentActivitiesPopup/index.js'
;
import
{
createDetails
}
from
'@/views/popup/RecentActivitiesPopup/index.js'
;
import
{
createRoleRecentActivityNotPushNum
}
from
'@/views/hooks/useGetCount.js'
;
import
{
createRoleRecentActivityNotPushNum
}
from
'@/views/hooks/useGetCount.js'
;
import
vipLevel
from
'@/views/userInfo/components/gameInfo/vipLevel.vue'
;
export
default
{
export
default
{
name
:
'roleInfo'
,
name
:
'roleInfo'
,
components
:
{
components
:
{
noContent
,
noContent
,
appeal
,
appeal
,
vipLevel
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -205,6 +208,28 @@ export default {
...
@@ -205,6 +208,28 @@ export default {
this
this
);
);
},
},
async
handleRoleListLevel
(
roleList
){
try
{
const
role_id_list
=
roleList
.
map
((
item
)
=>
item
.
role_id
)
const
res
=
await
marketingRoleGrade
({
role_id
:
role_id_list
})
if
(
res
.
status_code
==
1
&&
res
?.
data
?.
data
?.
length
>
0
){
const
levelList
=
res
.
data
.
data
roleList
.
forEach
((
item
)
=>
{
const
levelItem
=
levelList
.
find
((
level
)
=>
level
.
role_id
==
item
.
role_id
)
if
(
levelItem
){
item
.
vip_level
=
levelItem
.
vip_level
}
})
}
}
catch
(
error
)
{
console
.
log
(
error
)
}
finally
{
this
.
roleList
=
roleList
.
sort
((
a
,
b
)
=>
{
return
Number
(
b
.
recharge_total
)
-
Number
(
a
.
recharge_total
)
})
}
},
handleChange
()
{
},
handleChange
()
{
},
memberChange
()
{
memberChange
()
{
this
.
requestRoleList
();
this
.
requestRoleList
();
...
@@ -231,9 +256,7 @@ export default {
...
@@ -231,9 +256,7 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
status_code
==
1
)
{
if
(
res
.
status_code
==
1
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
this
.
roleList
=
res
.
data
.
data
.
sort
((
a
,
b
)
=>
{
this
.
handleRoleListLevel
(
res
.
data
.
data
)
return
Number
(
b
.
recharge_total
)
-
Number
(
a
.
recharge_total
);
});
}
else
{
}
else
{
this
.
roleList
=
[];
this
.
roleList
=
[];
}
}
...
...
src/views/userInfo/components/Info.vue
浏览文件 @
2ebf3a13
...
@@ -53,13 +53,14 @@
...
@@ -53,13 +53,14 @@
chatUserDetails
.
add_way_text
}}
<
/span
>
chatUserDetails
.
add_way_text
}}
<
/span
>
<
/div
>
<
/div
>
<!--
游戏模块特有
-->
<!--
游戏模块特有
-->
<
div
v
-
if
=
"accountSelect && accountSelect !== ''"
style
=
"margin-top: 3px"
>
<
div
v
-
if
=
"accountSelect && accountSelect !== ''"
class
=
"rowFlex columnCenter"
style
=
"margin-top: 3px"
>
<
vipLevel
:
gameUserInfo
=
"gameUserInfo"
/>
<
el
-
button
-
group
>
<
el
-
button
-
group
>
<
el
-
button
size
=
"mini
"
@
click
=
"zyouUnBindConfirm"
>
解绑
<
/el-button
>
<
el
-
button
type
=
"text
"
@
click
=
"zyouUnBindConfirm"
>
解绑
<
/el-button
>
<!--
<
el
-
button
size
=
"mini"
@
click
=
"autoResetPassword"
>
修改密码
<
/el-button
>
<!--
<
el
-
button
type
=
"text"
size
=
"mini"
@
click
=
"autoResetPassword"
>
修改密码
<
/el-button
>
<
el
-
button
size
=
"mini"
@
click
=
"changePhoneClick"
>
修改手机号
<
/el-button> --
>
<
el
-
button
type
=
"text"
size
=
"mini"
@
click
=
"changePhoneClick"
>
修改手机号
<
/el-button> --
>
<
el
-
button
v
-
if
=
"!chatUserDetails.bind_cser"
size
=
"mini"
@
click
=
"relationKfh"
>
关联客服
<
/el-button
>
<
el
-
button
v
-
if
=
"!chatUserDetails.bind_cser"
type
=
"text"
@
click
=
"relationKfh"
>
关联客服
<
/el-button
>
<
el
-
button
size
=
"mini"
v
-
if
=
"false"
@
click
=
"errorHandle"
>
误操作
<
/el-button
>
<
el
-
button
type
=
"text"
v
-
if
=
"false"
@
click
=
"errorHandle"
>
误操作
<
/el-button
>
<
/el-button-group
>
<
/el-button-group
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -163,6 +164,7 @@ import selectTag from '@/components/selectTag.vue'
...
@@ -163,6 +164,7 @@ import selectTag from '@/components/selectTag.vue'
import
{
getClientStatus
,
remarkSessionIntelTag
,
finishRest
,
client_session_rest
,
checkSingleAgree
,
checkUserPermit
,
sendComment
,
logout
}
from
'@/api/user.js'
import
{
getClientStatus
,
remarkSessionIntelTag
,
finishRest
,
client_session_rest
,
checkSingleAgree
,
checkUserPermit
,
sendComment
,
logout
}
from
'@/api/user.js'
import
{
sendChatMessage
}
from
'@/utils/index.js'
import
{
sendChatMessage
}
from
'@/utils/index.js'
import
{
getToken
,
removeToken
}
from
'@/utils/auth'
import
{
getToken
,
removeToken
}
from
'@/utils/auth'
import
vipLevel
from
'./gameInfo/vipLevel.vue'
import
Cookies
from
'js-cookie'
import
Cookies
from
'js-cookie'
export
default
{
export
default
{
name
:
'info'
,
name
:
'info'
,
...
@@ -170,7 +172,8 @@ export default {
...
@@ -170,7 +172,8 @@ export default {
gameDetails
,
gameDetails
,
changePhone
,
changePhone
,
shareInfo
,
shareInfo
,
selectTag
selectTag
,
vipLevel
}
,
}
,
props
:
{
props
:
{
// 用户详情
// 用户详情
...
...
src/views/userInfo/components/gameInfo/vipLevel.vue
0 → 100644
浏览文件 @
2ebf3a13
<!--
* @Author: maoxiya 937667504@qq.com
* @Date: 2025-09-13 14:05:01
* @LastEditors: maoxiya 937667504@qq.com
* @LastEditTime: 2025-09-17 14:08:37
* @FilePath: /company_wx_frontend/src/views/works/component/gameInfo/vipLevel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div
class=
"vipLevel"
v-if=
"vip_role_info.role_id"
>
<el-popover
v-model=
"popoverVisible"
placement=
"top"
:title=
"vipLevelBenefit.length > 0 ? 'VIP等级权益' : '暂无 vip 等级权益'"
trigger=
"manual"
:disabled=
"loading"
>
<!-- 最大宽度 400px -->
<div
class=
"vipLevelContent"
style=
"max-width: 400px;max-height: 300px;overflow: auto;"
>
<div
v-if=
"loading"
class=
"loading-content"
>
<i
class=
"el-icon-loading"
></i>
<span>
加载中...
</span>
</div>
<div
v-else
>
<div
class=
"vipLevelItem rowFlex columnCenter"
v-for=
"(item,index) in vipLevelBenefit"
:key=
"index"
>
<p
class=
"vipLevelItemRow"
v-if=
"item.num"
:style=
"
{color: item.target ? '#333333' : '#c9cdd4'}" >
<span
v-if=
"item.name"
class=
"label"
>
{{
item
.
name
}}
</span>
<span
v-if=
"item.num"
:style=
"
{color: item.target ? '#00bf8a' : '#c9cdd4'}" class="value">
{{
item
.
num
}}
次
</span>
</p>
</div>
<div
v-if=
"vipLevelBenefit.length === 0"
class=
"no-data"
>
<span>
暂无VIP等级权益
</span>
</div>
</div>
</div>
<div
slot=
"reference"
>
<span
class=
"vipLevelText"
v-if=
"vip_role_info.vip_level"
@
click
.
stop=
"showVipLevel"
>
{{
`SVIP等级${vip_role_info.vip_level
}
`
}}
<
/span
>
<
/div
>
<
/el-popover
>
<
/div
>
<
/template
>
<
script
>
import
{
marketingRoleGradeBenefit
,
marketingMemberRoleGrade
}
from
'@/api/game'
import
{
mapState
,
mapMutations
}
from
'vuex'
export
default
{
name
:
'VipLevel'
,
data
()
{
return
{
vip_role_info
:
{
}
,
vipLevelBenefit
:
[],
popoverVisible
:
false
,
loading
:
false
}
}
,
props
:
{
roleInfo
:
{
type
:
Object
,
default
:
()
=>
({
}
)
}
}
,
mounted
()
{
if
(
this
.
roleInfo
&&
Object
.
keys
(
this
.
roleInfo
).
length
>
0
)
{
this
.
vip_role_info
=
this
.
roleInfo
// 将VIP信息存储到Vuex中
this
.
set_vipRoleInfo
(
this
.
roleInfo
)
}
else
{
this
.
marketingMemberRoleGrade
()
}
}
,
watch
:
{
accountSelect
(
newVal
,
oldVal
)
{
if
(
newVal
&&
newVal
!==
''
){
this
.
marketingMemberRoleGrade
()
}
}
}
,
computed
:
{
...
mapState
(
'game'
,
[
'accountSelect'
])
}
,
methods
:
{
...
mapMutations
(
'game'
,
[
'set_vipRoleInfo'
]),
async
marketingMemberRoleGrade
()
{
if
(
this
.
accountSelect
&&
this
.
accountSelect
!==
''
){
const
res
=
await
marketingMemberRoleGrade
({
member_id
:
this
.
accountSelect
}
)
if
(
res
.
data
.
data
.
role_id
){
this
.
vip_role_info
=
res
.
data
.
data
// 将VIP信息存储到Vuex中,供其他组件使用
this
.
set_vipRoleInfo
(
res
.
data
.
data
)
}
else
{
this
.
vip_role_info
=
{
}
this
.
set_vipRoleInfo
({
}
)
}
}
}
,
/**
* 获取VIP等级权益数据
*/
async
getVipLevel
()
{
try
{
this
.
loading
=
true
;
const
levelBenefitRes
=
await
marketingRoleGradeBenefit
({
main_game_id
:
this
.
vip_role_info
.
main_game_id
,
role_id
:
this
.
vip_role_info
.
role_id
,
weixin_blongs_id
:
this
.
vip_role_info
.
weixin_blongs_id
,
vip_level
:
this
.
vip_role_info
.
vip_level
}
);
if
(
levelBenefitRes
.
status_code
===
1
)
{
this
.
vipLevelBenefit
=
levelBenefitRes
.
data
.
data
||
[];
// 数据获取成功后显示popover
this
.
popoverVisible
=
true
;
}
else
{
this
.
vipLevelBenefit
=
[];
this
.
$message
({
message
:
levelBenefitRes
.
data
.
msg
||
'获取VIP等级权益失败'
,
type
:
'error'
}
);
}
}
catch
(
error
)
{
console
.
error
(
'获取VIP等级权益失败:'
,
error
);
this
.
vipLevelBenefit
=
[];
this
.
$message
({
message
:
'获取VIP等级权益失败,请重试'
,
type
:
'error'
}
);
}
finally
{
this
.
loading
=
false
;
}
}
,
/**
* 显示VIP等级权益弹窗
*/
async
showVipLevel
()
{
// 如果已经显示,则隐藏
if
(
this
.
popoverVisible
)
{
this
.
popoverVisible
=
false
;
return
;
}
// 获取数据并显示popover
await
this
.
getVipLevel
();
}
}
}
<
/script
>
<
style
scoped
lang
=
"scss"
>
.
vipLevel
{
.
vipLevelText
{
color
:
#
409
EFF
;
cursor
:
pointer
;
margin
-
right
:
10
px
;
font
-
weight
:
600
;
position
:
relative
;
top
:
-
1
px
;
}
.
loading
-
content
{
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
center
;
padding
:
20
px
;
color
:
#
666
;
i
{
margin
-
right
:
8
px
;
font
-
size
:
16
px
;
}
}
.
no
-
data
{
text
-
align
:
center
;
padding
:
20
px
;
color
:
#
c9cdd4
;
}
.
vipLevelContent
{
.
vipLevelItem
{
margin
-
bottom
:
8
px
;
.
vipLevelItemRow
{
margin
:
0
;
display
:
flex
;
justify
-
content
:
space
-
between
;
align
-
items
:
center
;
.
label
{
flex
:
1
;
}
.
value
{
font
-
weight
:
bold
;
}
}
}
}
}
<
/style>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论