Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
7df1f826
提交
7df1f826
authored
4月 02, 2026
作者:
施汉文
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
w账号详情新增字段
上级
082689f6
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
475 行增加
和
330 行删除
+475
-330
works.js
src/api/works.js
+20
-8
addUser.vue
src/views/components/bindGameAccount/addUser.vue
+455
-322
没有找到文件。
src/api/works.js
浏览文件 @
7df1f826
...
...
@@ -313,22 +313,35 @@ export function corp_follow_up_task_index(data) {
return
request
({
url
:
returnApi
(
'/corp_follow_up_task/index'
),
method
:
'post'
,
data
})
data
,
})
;
}
// 【智能待办】工作台-我的
export
function
corpIntelligentTaskMineList
(
data
)
{
return
request
({
url
:
returnApi
(
'/corp_intelligent_task/mineList'
),
method
:
'post'
,
data
})
data
,
})
;
}
// 【智能待办】工作台-完成、未完成
export
function
corpIntelligentTaskExternalList
(
data
)
{
return
request
({
url
:
returnApi
(
'/corp_intelligent_task/externalList'
),
method
:
'post'
,
data
})
}
\ No newline at end of file
data
,
});
}
/**
* 查询会员首次绑定企微微信信息(首次绑定昵称/标识与首次绑定时间)
* @see https://doc.wozhangwan.com/project/514/interface/api/58755
* @param {{ member_id: string|number }} data - 掌游会员 id
* @returns {import('axios').AxiosPromise}
*/
export
function
getFirstBindExternalUser
(
data
)
{
return
request
({
url
:
returnApi
(
'/corp_zyou_bind/getFirstBindExternalUser'
),
method
:
'post'
,
data
,
});
}
src/views/components/bindGameAccount/addUser.vue
浏览文件 @
7df1f826
<
template
>
<el-drawer
title=
"新增关联账号"
:visible=
"show"
size=
"360px"
:append-to-body=
"true"
@
close=
"close"
>
<el-drawer
title=
"新增关联账号"
:visible=
"show"
size=
"360px"
:append-to-body=
"true"
@
close=
"close"
>
<div
class=
"content-wrapper"
>
<div
class=
"content"
>
<el-form
ref=
"form"
:model=
"form"
label-position=
"top"
:rules=
"rules"
label-width=
"120px"
>
<div
class=
"inputContent"
>
<el-form-item
label=
"请输入w账号"
prop=
"username"
>
<el-input
v-model
.
trim=
"form.username"
placeholder=
"请输入w账号"
class=
"input-with-select"
>
</el-input>
</el-form-item>
<el-form-item
label=
"请输入主游戏名"
prop=
"main_game_id"
>
<el-select
v-model=
"form.main_game_id"
filterable
remote
clearable
reserve-keyword
placeholder=
"请输入主游戏名"
style=
"width: 100%;"
:remote-method=
"remoteMethod"
:loading=
"loading"
@
focus=
"gameNameList = optionsList"
>
<el-option
v-for=
"item in gameNameList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"请输入CP角色ID"
prop=
"username"
>
<el-input
v-model
.
trim=
"form.cp_role_id"
placeholder=
"请先选择主游戏"
:disabled=
"form.main_game_id==''"
class=
"input-with-select"
>
</el-input>
</el-form-item>
<el-form-item
label=
"请输入区服"
prop=
"server_info"
>
<el-select
v-model
.
trim=
"form.server_info"
filterable
remote
:disabled=
"form.main_game_id == ''"
clearable
style=
"width: 100%;"
reserve-keyword
placeholder=
"请先选择主游戏"
:remote-method=
"remoteMethodServer"
:loading=
"loading"
>
<el-option
v-for=
"item in serverNameList"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"请输入角色名"
prop=
"role_name"
>
<el-input
v-model
.
trim=
"form.role_name"
:disabled=
"form.main_game_id==''"
placeholder=
"请先选择主游戏"
class=
"input-with-select"
>
</el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"onSubmit"
>
搜索
</el-button>
</el-form-item>
</div>
</el-form>
<div
class=
"table account_table"
>
<div
class=
"bind-account-title"
>
账号列表
</div>
<userTable
:list=
"tableList"
@
checkedTag=
"checkedTag"
/>
</div>
<!--
<div
class=
"line"
></div>
w92865226508-->
<div
v-if=
"userDetails.username"
class=
"account_select_userInfo"
>
<div
class=
"bind-account-title"
style=
"margin-top: 20px;"
>
账号详情
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
账号
</span>
<p
class=
"text"
>
{{
userDetails
.
username
}}
</p>
<span
v-if=
"userDetails.account_type == 2"
class=
"account_type"
>
内
</span>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
获客渠道
</span>
<p
class=
"text"
>
{{
userDetails
.
channel_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
注册渠道
</span>
<p
class=
"text"
>
{{
userDetails
.
register_channel_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
运营渠道
</span>
<p
class=
"text"
>
{{
userDetails
.
operator_channel_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
注册游戏
</span>
<p
class=
"text"
>
{{
userDetails
.
reg_game_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
主游戏
</span>
<p
class=
"text"
>
{{
userDetails
.
main_game_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
真实姓名
</span>
<p
class=
"text"
>
{{
userDetails
.
real_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
手机号
</span>
<p
class=
"text"
>
{{
userDetails
.
mobile
}}
</p>
<div
class=
"content"
>
<el-form
ref=
"form"
:model=
"form"
label-position=
"top"
:rules=
"rules"
label-width=
"120px"
>
<div
class=
"inputContent"
>
<el-form-item
label=
"请输入w账号"
prop=
"username"
>
<el-input
v-model
.
trim=
"form.username"
placeholder=
"请输入w账号"
class=
"input-with-select"
>
</el-input>
</el-form-item>
<el-form-item
label=
"请输入主游戏名"
prop=
"main_game_id"
>
<el-select
v-model=
"form.main_game_id"
filterable
remote
clearable
reserve-keyword
placeholder=
"请输入主游戏名"
style=
"width: 100%"
:remote-method=
"remoteMethod"
:loading=
"loading"
@
focus=
"gameNameList = optionsList"
>
<el-option
v-for=
"item in gameNameList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"请输入CP角色ID"
prop=
"username"
>
<el-input
v-model
.
trim=
"form.cp_role_id"
placeholder=
"请先选择主游戏"
:disabled=
"form.main_game_id == ''"
class=
"input-with-select"
>
</el-input>
</el-form-item>
<el-form-item
label=
"请输入区服"
prop=
"server_info"
>
<el-select
v-model
.
trim=
"form.server_info"
filterable
remote
:disabled=
"form.main_game_id == ''"
clearable
style=
"width: 100%"
reserve-keyword
placeholder=
"请先选择主游戏"
:remote-method=
"remoteMethodServer"
:loading=
"loading"
>
<el-option
v-for=
"item in serverNameList"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"请输入角色名"
prop=
"role_name"
>
<el-input
v-model
.
trim=
"form.role_name"
:disabled=
"form.main_game_id == ''"
placeholder=
"请先选择主游戏"
class=
"input-with-select"
>
</el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"onSubmit"
>
搜索
</el-button
>
</el-form-item>
</div>
</el-form>
<div
class=
"table account_table"
>
<div
class=
"bind-account-title"
>
账号列表
</div>
<userTable
:list=
"tableList"
@
checkedTag=
"checkedTag"
/>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
染色时间
</span>
<p
class=
"text"
>
{{
moment
(
userDetails
.
seq_time
*
1000
).
format
(
'YYYY-MM-DD'
)
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
注册时间
</span>
<p
class=
"text"
>
{{
moment
(
userDetails
.
reg_time
*
1000
).
format
(
'YYYY-MM-DD'
)
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
登录系统
</span>
<p
class=
"text"
>
{{
userDetails
.
last_login_os
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
充值金额
</span>
<p
class=
"text"
>
{{
userDetails
.
recharge_total
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
><span
class=
"label"
>
是否添加微信
</span>
<p
class=
"text"
>
{{
userDetails
.
wechat_add_status_text
}}
</p>
<!--
<div
class=
"line"
></div>
w92865226508-->
<div
v-if=
"userDetails.username"
class=
"account_select_userInfo"
>
<div
class=
"bind-account-title"
style=
"margin-top: 20px"
>
账号详情
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
账号
</span>
<p
class=
"text"
>
{{
userDetails
.
username
}}
</p>
<span
v-if=
"userDetails.account_type == 2"
class=
"account_type"
>
内
</span
>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
获客渠道
</span>
<p
class=
"text"
>
{{
userDetails
.
channel_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
注册渠道
</span>
<p
class=
"text"
>
{{
userDetails
.
register_channel_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
运营渠道
</span>
<p
class=
"text"
>
{{
userDetails
.
operator_channel_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
注册游戏
</span>
<p
class=
"text"
>
{{
userDetails
.
reg_game_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
主游戏
</span>
<p
class=
"text"
>
{{
userDetails
.
main_game_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
真实姓名
</span>
<p
class=
"text"
>
{{
userDetails
.
real_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
手机号
</span>
<p
class=
"text"
>
{{
userDetails
.
mobile
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
染色时间
</span>
<p
class=
"text"
>
{{
moment
(
userDetails
.
seq_time
*
1000
).
format
(
'YYYY-MM-DD'
)
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
注册时间
</span>
<p
class=
"text"
>
{{
moment
(
userDetails
.
reg_time
*
1000
).
format
(
'YYYY-MM-DD'
)
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
登录系统
</span>
<p
class=
"text"
>
{{
userDetails
.
last_login_os
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
充值金额
</span>
<p
class=
"text"
>
{{
userDetails
.
recharge_total
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
是否添加微信
</span>
<p
class=
"text"
>
{{
userDetails
.
wechat_add_status_text
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
首次绑定微信
</span>
<p
class=
"text"
>
{{
firstWechatBind
?.
external_user_name
}}
</p>
</div>
<div
class=
"item rowFlex columnCenter"
>
<span
class=
"label"
>
首次绑定时间
</span>
<p
class=
"text"
>
{{
firstWechatBind
?.
bind_time
}}
</p>
</div>
</div>
</div>
</div>
<page
class=
"pageInfo"
:page-info=
"pageInfo"
@
requestNextPage=
"requestNextPage"
/>
<span
class=
"dialog-footer rowFlex"
>
<el-button
class=
"btn"
type=
"primary"
size=
"small"
:disabled=
"!userDetails.id"
@
click=
"confirmSubmit"
>
确
定
</el-button>
<page
class=
"pageInfo"
:page-info=
"pageInfo"
@
requestNextPage=
"requestNextPage"
/>
<span
class=
"dialog-footer rowFlex"
>
<el-button
class=
"btn"
type=
"primary"
size=
"small"
:disabled=
"!userDetails.id"
@
click=
"confirmSubmit"
>
确 定
</el-button
>
<el-button
class=
"btn"
size=
"small"
@
click=
"close"
>
取 消
</el-button>
</span>
</div>
...
...
@@ -108,246 +193,296 @@
</
template
>
<
script
type=
"text/javascript"
>
import
moment
from
'moment'
import
userTable
from
'./userTable.vue'
import
{
getRoleHoLo
,
memberView
,
selectSearch
}
from
'@/api/game'
import
{
checkZyouBind
,
zyouBind
}
from
'@/api/works'
import
{
mapMutations
,
mapActions
,
mapState
}
from
'vuex'
import
page
from
'@/components/page/pageNum.vue'
export
default
{
name
:
'addUser'
,
components
:
{
userTable
,
page
},
props
:
[
'show'
],
data
()
{
return
{
moment
,
tableList
:
[],
checkoutUser
:
{},
userDetails
:
{},
loading
:
false
,
pageInfo
:
{
page
:
1
,
page_size
:
20
,
total
:
0
},
form
:
{
member_id
:
''
,
username
:
''
,
role_name
:
''
,
cp_role_id
:
''
,
main_game_id
:
''
,
server_info
:
''
},
gameNameList
:
[],
optionsList
:
[],
serverNameList
:
[],
rules
:
{},
import
moment
from
'moment'
;
import
userTable
from
'./userTable.vue'
;
import
{
getRoleHoLo
,
memberView
,
selectSearch
}
from
'@/api/game'
;
import
{
checkZyouBind
,
zyouBind
}
from
'@/api/works'
;
import
{
mapMutations
,
mapActions
,
mapState
}
from
'vuex'
;
import
{
getFirstBindExternalUser
}
from
'@/api/works'
;
import
page
from
'@/components/page/pageNum.vue'
;
export
default
{
name
:
'addUser'
,
components
:
{
userTable
,
page
,
},
props
:
[
'show'
],
data
()
{
return
{
moment
,
tableList
:
[],
checkoutUser
:
{},
userDetails
:
{},
firstWechatBind
:
{},
loading
:
false
,
pageInfo
:
{
page
:
1
,
page_size
:
20
,
total
:
0
,
},
form
:
{
member_id
:
''
,
username
:
''
,
role_name
:
''
,
cp_role_id
:
''
,
main_game_id
:
''
,
server_info
:
''
,
},
gameNameList
:
[],
optionsList
:
[],
serverNameList
:
[],
rules
:
{},
};
},
computed
:
{
...
mapState
(
'game'
,
[
'chatUserInfo'
,
'userid'
,
'external_userid'
]),
},
watch
:
{
show
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
// this.requestRoleList()
this
.
requestGameList
();
}
},
computed
:
{
...
mapState
(
'game'
,
[
'chatUserInfo'
,
'userid'
,
'external_userid'
]),
},
watch
:
{
show
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
// this.requestRoleList()
this
.
requestGameList
()
},
mounted
()
{},
methods
:
{
...
mapActions
(
'game'
,
[
'gameBindUser'
]),
...
mapMutations
(
'game'
,
[
'set_accountSelect'
]),
requestRoleList
()
{
const
data
=
{
member_id
:
this
.
form
.
member_id
,
username
:
this
.
form
.
username
.
trim
(),
role_name
:
this
.
form
.
role_name
.
trim
(),
main_game_id
:
this
.
form
.
main_game_id
!==
''
?
[
this
.
form
.
main_game_id
]
:
[],
zyou_server_id
:
this
.
form
.
server_info
!==
''
?
[
this
.
form
.
server_info
]
:
[],
cp_role_id
:
this
.
form
.
cp_role_id
.
trim
()
||
''
,
search_type
:
'bind'
,
...
this
.
pageInfo
,
};
getRoleHoLo
(
data
).
then
((
res
)
=>
{
if
(
res
.
status_code
==
1
)
{
if
(
res
.
data
.
data
.
length
==
0
)
{
this
.
tableList
=
[];
this
.
$message
.
warning
(
'暂无数据'
);
}
else
{
this
.
tableList
=
res
.
data
.
data
;
this
.
pageInfo
=
res
.
data
.
page_info
;
}
}
}
}
);
},
mounted
()
{
// S181.啊呸¤可瑞 八荒181服
// 分页
requestNextPage
(
pageInfo
)
{
this
.
pageInfo
.
page
=
pageInfo
.
page
;
this
.
requestRoleList
();
},
methods
:
{
...
mapActions
(
'game'
,
[
'gameBindUser'
]),
...
mapMutations
(
'game'
,
[
'set_accountSelect'
]),
requestRoleList
()
{
remoteMethodServer
(
query
)
{
if
(
query
!==
''
)
{
this
.
loading
=
true
;
const
data
=
{
member_id
:
this
.
form
.
member_id
,
username
:
this
.
form
.
username
.
trim
(),
role_name
:
this
.
form
.
role_name
.
trim
(),
main_game_id
:
this
.
form
.
main_game_id
!==
''
?
[
this
.
form
.
main_game_id
]
:
[],
zyou_server_id
:
this
.
form
.
server_info
!==
''
?
[
this
.
form
.
server_info
]
:
[],
cp_role_id
:
this
.
form
.
cp_role_id
.
trim
()
||
''
,
search_type
:
'bind'
,
...
this
.
pageInfo
}
getRoleHoLo
(
data
).
then
(
res
=>
{
type
:
'server_info'
,
value
:
query
,
main_game_ids
:
this
.
form
.
main_game_id
,
};
selectSearch
(
data
).
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
status_code
==
1
)
{
if
(
res
.
data
.
data
.
length
==
0
)
{
this
.
tableList
=
[]
this
.
$message
.
warning
(
'暂无数据'
)
}
else
{
this
.
tableList
=
res
.
data
.
data
this
.
pageInfo
=
res
.
data
.
page_info
}
this
.
serverNameList
=
res
.
data
.
data
;
}
})
},
// S181.啊呸¤可瑞 八荒181服
// 分页
requestNextPage
(
pageInfo
)
{
this
.
pageInfo
.
page
=
pageInfo
.
page
this
.
requestRoleList
()
},
remoteMethodServer
(
query
)
{
if
(
query
!==
''
)
{
this
.
loading
=
true
const
data
=
{
type
:
'server_info'
,
value
:
query
,
main_game_ids
:
this
.
form
.
main_game_id
}
selectSearch
(
data
).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
status_code
==
1
)
{
this
.
serverNameList
=
res
.
data
.
data
}
})
});
}
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
gameNameList
=
this
.
optionsList
.
filter
((
item
)
=>
{
return
item
.
label
.
toLowerCase
().
indexOf
(
query
.
toLowerCase
())
>
-
1
;
});
}
else
{
this
.
gameNameList
=
[];
}
},
requestGameList
()
{
const
data
=
{
type
:
'mainGameList'
,
value
:
''
,
weixin_blong_id
:
''
,
};
selectSearch
(
data
).
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
status_code
==
1
)
{
this
.
gameNameList
=
this
.
optionsList
=
res
.
data
.
data
;
}
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
gameNameList
=
this
.
optionsList
.
filter
(
item
=>
{
return
item
.
label
.
toLowerCase
()
.
indexOf
(
query
.
toLowerCase
())
>
-
1
})
});
},
close
()
{
this
.
$emit
(
'update:show'
,
false
);
this
.
resizeData
();
this
.
$emit
(
'close'
);
},
onSubmit
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
pageInfo
=
{
page
:
1
,
page_size
:
20
,
total
:
0
,
};
if
(
valid
)
{
if
(
this
.
form
.
role_name
==
''
&&
this
.
form
.
username
==
''
&&
this
.
form
.
cp_role_id
==
''
)
{
this
.
$message
.
warning
(
'请输入角色名或者w账号或者CP角色ID'
);
return
;
}
this
.
requestRoleList
();
}
else
{
this
.
gameNameList
=
[]
console
.
log
(
'error submit!!'
);
return
false
;
}
}
,
requestGameList
()
{
const
data
=
{
type
:
'mainGameList'
,
value
:
''
,
weixin_blong_id
:
''
}
selectSearch
(
data
).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
status_code
==
1
)
{
this
.
gameNameList
=
this
.
optionsList
=
res
.
data
.
data
}
})
},
close
()
{
this
.
$emit
(
'update:show'
,
false
)
this
.
resizeData
()
this
.
$emit
(
'close'
)
},
onSubmit
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
pageInfo
=
{
page
:
1
,
page_size
:
20
,
total
:
0
}
if
(
valid
)
{
if
(
this
.
form
.
role_name
==
''
&&
this
.
form
.
username
==
''
&&
this
.
form
.
cp_role_id
==
''
)
{
this
.
$message
.
warning
(
'请输入角色名或者w账号或者CP角色ID'
)
return
}
this
.
requestRoleList
()
}
);
},
resizeData
()
{
this
.
form
=
{
member_id
:
''
,
username
:
''
,
role_name
:
''
,
cp_role_id
:
''
,
main_game_id
:
''
,
server_info
:
''
,
};
this
.
tableList
=
[];
this
.
checkoutUser
=
{};
this
.
userDetails
=
{};
this
.
firstWechatBind
=
{};
},
/**
* 拉取当前选中会员的首次绑定微信信息;仅在表格勾选 w 账号并成功返回 memberView 后调用(见 rquestUserInfo)。
* 快速切换用户时用 member_id 比对,避免旧请求覆盖新数据。
* @param {string|number|undefined} memberId - 会员 id,与 userDetails.id 一致
*/
requestFirstWechatBind
(
memberId
)
{
if
(
!
memberId
)
{
this
.
firstWechatBind
=
{};
return
;
}
const
reqMemberId
=
memberId
;
getFirstBindExternalUser
({
member_id
:
memberId
})
.
then
((
res
)
=>
{
if
(
reqMemberId
!==
this
.
userDetails
.
id
)
return
;
if
(
res
.
status_code
===
1
&&
res
.
data
)
{
this
.
firstWechatBind
=
res
.
data
;
}
else
{
console
.
log
(
'error submit!!'
)
return
false
this
.
firstWechatBind
=
{};
}
})
},
resizeData
()
{
this
.
form
=
{
member_id
:
''
,
username
:
''
,
role_name
:
''
,
cp_role_id
:
''
,
main_game_id
:
''
,
server_info
:
''
.
catch
(()
=>
{
if
(
reqMemberId
===
this
.
userDetails
.
id
)
{
this
.
firstWechatBind
=
{};
}
});
},
confirmSubmit
()
{
const
data
=
{
member_id
:
this
.
userDetails
.
id
&&
this
.
userDetails
.
id
!=
''
?
this
.
userDetails
.
id
:
this
.
checkoutUser
.
member_id
,
username
:
this
.
userDetails
.
username
,
};
checkZyouBind
(
data
).
then
((
res
)
=>
{
console
.
log
(
data
);
if
(
!
res
.
data
.
has_bind
)
{
this
.
submit
();
}
else
{
this
.
$confirm
(
res
.
data
.
tip
||
''
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
this
.
submit
();
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
,
});
});
}
this
.
tableList
=
[]
this
.
checkoutUser
=
{}
this
.
userDetails
=
{}
},
confirmSubmit
()
{
const
data
=
{
member_id
:
this
.
userDetails
.
id
&&
this
.
userDetails
.
id
!=
''
?
this
.
userDetails
.
id
:
this
.
checkoutUser
.
member_id
,
username
:
this
.
userDetails
.
username
});
},
submit
()
{
const
data
=
{
userid
:
this
.
userid
||
this
.
chatUserInfo
.
userid
,
external_userid
:
this
.
external_userid
||
this
.
chatUserInfo
.
external_userid
,
member_id
:
this
.
userDetails
.
id
&&
this
.
userDetails
.
id
!=
''
?
this
.
userDetails
.
id
:
this
.
checkoutUser
.
member_id
,
username
:
this
.
userDetails
.
username
,
reg_game_id
:
this
.
userDetails
.
reg_game_id
,
main_game_id
:
this
.
userDetails
.
main_game_id
,
recharge_total
:
this
.
userDetails
.
recharge_total
,
};
console
.
log
(
this
.
chatUserInfo
,
'this.chatUserInfo'
,
this
.
userid
,
this
.
external_userid
,
);
// 绑定掌游账号
zyouBind
(
data
).
then
((
res
)
=>
{
if
(
res
.
status_code
==
1
)
{
this
.
$message
.
success
(
res
.
msg
);
this
.
updateData
();
}
checkZyouBind
(
data
).
then
(
res
=>
{
console
.
log
(
data
)
if
(
!
res
.
data
.
has_bind
)
{
this
.
submit
()
});
},
// 更新列表数据
updateData
()
{
const
data
=
{
userid
:
this
.
chatUserInfo
.
userid
,
external_userid
:
this
.
chatUserInfo
.
external_userid
,
};
this
.
gameBindUser
(
data
).
then
((
res
)
=>
{
this
.
set_accountSelect
(
this
.
userDetails
.
id
);
this
.
close
();
});
},
// 勾选活码
checkedTag
(
value
)
{
this
.
checkoutUser
=
value
;
const
data
=
{
member_id
:
value
.
member_id
,
need_channel
:
1
,
need_roleInfo
:
1
,
};
this
.
rquestUserInfo
(
data
);
},
rquestUserInfo
(
data
)
{
memberView
(
data
).
then
((
res
)
=>
{
if
(
res
.
status_code
==
1
)
{
this
.
userDetails
=
res
.
data
;
const
memberId
=
res
.
data
.
id
??
res
.
data
.
member_id
??
data
.
member_id
;
if
(
memberId
)
{
this
.
requestFirstWechatBind
(
memberId
);
}
else
{
this
.
$confirm
(
res
.
data
.
tip
||
''
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
submit
()
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
this
.
firstWechatBind
=
{};
}
})
},
submit
()
{
const
data
=
{
userid
:
this
.
userid
||
this
.
chatUserInfo
.
userid
,
external_userid
:
this
.
external_userid
||
this
.
chatUserInfo
.
external_userid
,
member_id
:
this
.
userDetails
.
id
&&
this
.
userDetails
.
id
!=
''
?
this
.
userDetails
.
id
:
this
.
checkoutUser
.
member_id
,
username
:
this
.
userDetails
.
username
,
reg_game_id
:
this
.
userDetails
.
reg_game_id
,
main_game_id
:
this
.
userDetails
.
main_game_id
,
recharge_total
:
this
.
userDetails
.
recharge_total
,
}
console
.
log
(
this
.
chatUserInfo
,
'this.chatUserInfo'
,
this
.
userid
,
this
.
external_userid
)
// 绑定掌游账号
zyouBind
(
data
).
then
(
res
=>
{
if
(
res
.
status_code
==
1
)
{
this
.
$message
.
success
(
res
.
msg
)
this
.
updateData
()
}
})
},
// 更新列表数据
updateData
()
{
const
data
=
{
userid
:
this
.
chatUserInfo
.
userid
,
external_userid
:
this
.
chatUserInfo
.
external_userid
}
this
.
gameBindUser
(
data
).
then
(
res
=>
{
this
.
set_accountSelect
(
this
.
userDetails
.
id
)
this
.
close
()
})
},
// 勾选活码
checkedTag
(
value
)
{
this
.
checkoutUser
=
value
const
data
=
{
member_id
:
value
.
member_id
,
need_channel
:
1
,
need_roleInfo
:
1
}
this
.
rquestUserInfo
(
data
)
},
rquestUserInfo
(
data
)
{
memberView
(
data
).
then
(
res
=>
{
if
(
res
.
status_code
==
1
)
{
this
.
userDetails
=
res
.
data
}
})
}
}
}
</
script
>
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
::v-deep
.el-drawer
{
...
...
@@ -428,7 +563,6 @@
}
}
}
}
.account_table
{
...
...
@@ -477,4 +611,4 @@
::v-deep
.el-select-dropdown
{
min-width
:
210px
!important
;
}
</
style
>
\ No newline at end of file
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论