Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
2f96af0e
提交
2f96af0e
authored
12月 12, 2025
作者:
施汉文
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'release' 到 'master'
🐞
fix: 充值礼包按申请倒序排序 查看合并请求
!40
上级
4e77a778
7f2fd673
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
385 行增加
和
196 行删除
+385
-196
emailGift.vue
src/views/components/giftRecord/emailGift.vue
+385
-196
没有找到文件。
src/views/components/giftRecord/emailGift.vue
浏览文件 @
2f96af0e
<
template
>
<div
class=
"detailsGiftApply columnFlex"
>
<div
class=
"detailsGiftApplyContent"
v-scroll=
"requestemailGiftList"
v-loading=
"listLoading"
>
<div
class=
"detailsGiftApplyContent"
v-scroll=
"requestemailGiftList"
v-loading=
"listLoading"
>
<div
class=
"detailsGiftApplyTitle rowFlex spaceBetween columnCenter"
>
<!--
<p>
充值礼包
</p>
-->
<span></span>
<el-button
type=
"primary"
size=
"small"
@
click=
"showApplyGift = true"
>
礼包申请
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"showApplyGift = true"
>
礼包申请
</el-button
>
</div>
<!-- 过滤条件 -->
<el-form
class=
"filterList"
label-position=
"top"
:class=
"
{ 'collapsed-form': isCollapsed }">
<el-form
class=
"filterList"
label-position=
"top"
:class=
"
{ 'collapsed-form': isCollapsed }"
>
<div
class=
"filter-header"
>
<span
class=
"filter-title"
>
筛选条件
</span>
<i
:class=
"isCollapsed ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
class=
"collapse-icon"
@
click=
"toggleCollapse"
></i>
<i
:class=
"isCollapsed ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
class=
"collapse-icon"
@
click=
"toggleCollapse"
></i>
</div>
<el-form-item
label=
"主游戏"
>
<el-select
v-model
.
trim=
"form.main_game_id"
filterable
remote
clearable
reserve-keyword
placeholder=
"请输入主游戏名"
style=
"width:100%;"
:remote-method=
"remoteMethod"
:loading=
"loading"
@
change=
"searchInput"
@
focus=
"gameNameList = optionsList"
>
<el-option
v-for=
"item in gameNameList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
<el-select
v-model
.
trim=
"form.main_game_id"
filterable
remote
clearable
reserve-keyword
placeholder=
"请输入主游戏名"
style=
"width: 100%"
:remote-method=
"remoteMethod"
:loading=
"loading"
@
change=
"searchInput"
@
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=
"区服"
>
<el-select
v-model
.
trim=
"form.zyou_server_id"
filterable
remote
multiple
reserve-keyword
style=
"width:100%;"
placeholder=
"请先选择主游戏"
:remote-method=
"remoteMethodServer"
:loading=
"loading"
@
change=
"searchInput"
>
<el-option
v-for=
"item in serverNameList"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
>
<el-select
v-model
.
trim=
"form.zyou_server_id"
filterable
remote
multiple
reserve-keyword
style=
"width: 100%"
placeholder=
"请先选择主游戏"
:remote-method=
"remoteMethodServer"
:loading=
"loading"
@
change=
"searchInput"
>
<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=
"svip权益"
>
<el-select
v-model
.
trim=
"form.right_type"
filterable
style=
"width:100%;"
placeholder=
"请选择svip权益"
@
change=
"searchInput"
>
<el-option
v-for=
"item in benefitOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
<el-select
v-model
.
trim=
"form.right_type"
filterable
style=
"width: 100%"
placeholder=
"请选择svip权益"
@
change=
"searchInput"
>
<el-option
v-for=
"item in benefitOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"角色名称"
>
<el-input
v-model=
"form.role_name_or_cp_id"
placeholder=
"请输入角色名称"
style=
"width:100%;"
@
change=
"searchInput"
></el-input>
<el-input
v-model=
"form.role_name_or_cp_id"
placeholder=
"请输入角色名称"
style=
"width: 100%"
@
change=
"searchInput"
></el-input>
</el-form-item>
<el-form-item
label=
"礼包标题"
>
<el-input
v-model=
"form.active_title"
placeholder=
"请输入礼包名称"
style=
"width:100%;"
@
change=
"searchInput"
></el-input>
<el-input
v-model=
"form.active_title"
placeholder=
"请输入礼包名称"
style=
"width: 100%"
@
change=
"searchInput"
></el-input>
</el-form-item>
</el-form>
<el-tabs
v-model=
"form.gift_type"
class=
"tabStyle"
@
tab-click=
"tabChange"
>
<el-tab-pane
v-for=
"(item, index) in giftTypeList"
:key=
"index"
:label=
"item.label"
:name=
"item.value"
></el-tab-pane>
<el-tab-pane
v-for=
"(item, index) in giftTypeList"
:key=
"index"
:label=
"item.label"
:name=
"item.value"
></el-tab-pane>
</el-tabs>
<!-- 订单列表 -->
<div
class=
"email-gift-main-scroll"
>
<div
v-if=
"emailGiftList.length > 0"
style=
"height: auto"
>
<div
class=
"email-gift-main-scroll"
>
<div
v-if=
"emailGiftList.length > 0"
style=
"height:auto;"
>
<div
v-for=
"(item, index) in emailGiftList"
:key=
"index"
class=
"orderDetails"
>
v-for=
"(item, index) in emailGiftList"
:key=
"index"
class=
"orderDetails"
>
<div
class=
"orderDetailsTitle"
>
<div
class=
"rowFlex spaceBetween columnCenter"
>
<div>
<p
class=
"text"
><label>
角色信息:
</label>
{{
`${item.role_name
}
- ${item.server_name
}
`
}}
<
/p
>
<
p
class
=
"text hidden"
><
label
>
礼包标题:
<
/label> {{ item.active_title
}}
</
p
>
<
p
class
=
"text hidden"
><
label
>
充值金额
:
<
/label> ¥{{ item.amount
}}
</
p
>
<
p
class
=
"text hidden"
><
label
>
充值日期
:
<
/label> {{ item.apply_recharge_date
}}
</
p
>
<p
class=
"text"
>
<label>
角色信息:
</label>
{{
`${item.role_name
}
- ${item.server_name
}
`
}}
<
/p
>
<
p
class
=
"text hidden"
>
<
label
>
礼包标题:
<
/label> {{ item.active_title
}}
<
/p
>
<
p
class
=
"text hidden"
>
<
label
>
充值金额
:
<
/label> ¥{{ item.amount
}}
<
/p
>
<
p
class
=
"text hidden"
>
<
label
>
充值日期
:
<
/label> {{ item.apply_recharge_date
}}
<
/p
>
<
/div
>
<
i
v
-
if
=
"item.showDetails"
class
=
"el-icon-arrow-down iconStyle"
@
click
=
"closePage(item, index)"
><
/i
>
<
i
v
-
else
class
=
"el-icon-arrow-right iconStyle"
@
click
=
"openPage(item, index)"
><
/i
>
<
i
v
-
if
=
"item.showDetails"
class
=
"el-icon-arrow-down iconStyle"
@
click
=
"closePage(item, index)"
><
/i
>
<
i
v
-
else
class
=
"el-icon-arrow-right iconStyle"
@
click
=
"openPage(item, index)"
><
/i
>
<
/div
>
<
el
-
collapse
-
transition
>
<
div
v
-
if
=
"item.showDetails"
>
<
p
class
=
"text hidden"
><
label
>
svip
权益
:
<
/label> {{ item.right_type_name || '-'
}}
</
p
>
<
p
v
-
if
=
"item.status == '待提交'"
class
=
"text"
><
label
>
状态:
<
/label> <span class="noSend">{{ item.statu
s
}}
<
/span> </
p
>
<
p
v
-
else
-
if
=
"item.status == '已提交'"
class
=
"text"
><
label
>
状态:
<
/label> <span class="sended">{{
item
.
status
}}
<
/span> </
p
>
<
p
v
-
else
-
if
=
"item.status == '已驳回'"
class
=
"text"
><
label
>
状态:
<
/label> <span class="sendFail">{{
item
.
status
}}
<
/span> </
p
>
<
p
class
=
"text"
><
label
>
申请时间:
<
/label> {{ item.create_time
}}
</
p
>
<
p
class
=
"text"
><
label
>
提交时间:
<
/label> {{ item.confirm_time
}}
</
p
>
<
label
style
=
"margin-right:10px;margin-top:3px;"
class
=
"text"
>
<
label
>
奖品信息:
<
/label> </
label
>
<
div
v
-
for
=
"items in item.level_attribute"
:
key
=
"items.rule_id"
class
=
"columnCenter userInfoStyle"
style
=
"border-top: 1px solid rgb(196 205 226);margin-top: 5px;"
>
<
div
class
=
"contentConfirmItem rowFlex spaceBetween"
style
=
"padding-left:0;margin-top:10px;"
>
<
p
class
=
"text hidden"
>
<
label
>
svip
权益
:
<
/label> {{ item.right_type_name || "-"
}}
<
/p
>
<
p
v
-
if
=
"item.status == '待提交'"
class
=
"text"
>
<
label
>
状态:
<
/label
>
<
span
class
=
"noSend"
>
{{
item
.
status
}}
<
/span
>
<
/p
>
<
p
v
-
else
-
if
=
"item.status == '已提交'"
class
=
"text"
>
<
label
>
状态:
<
/label
>
<
span
class
=
"sended"
>
{{
item
.
status
}}
<
/span
>
<
/p
>
<
p
v
-
else
-
if
=
"item.status == '已驳回'"
class
=
"text"
>
<
label
>
状态:
<
/label
>
<
span
class
=
"sendFail"
>
{{
item
.
status
}}
<
/span
>
<
/p
>
<
p
class
=
"text"
>
<
label
>
申请时间:
<
/label> {{ item.create_time
}}
<
/p
>
<
p
class
=
"text"
>
<
label
>
提交时间:
<
/label> {{ item.confirm_time
}}
<
/p
>
<
label
style
=
"margin-right: 10px; margin-top: 3px"
class
=
"text"
>
<
label
>
奖品信息:
<
/label
>
<
/label
>
<
div
v
-
for
=
"items in item.level_attribute"
:
key
=
"items.rule_id"
class
=
"columnCenter userInfoStyle"
style
=
"
border-top: 1px solid rgb(196 205 226);
margin-top: 5px;
"
>
<
div
class
=
"contentConfirmItem rowFlex spaceBetween"
style
=
"padding-left: 0; margin-top: 10px"
>
<
p
class
=
"title"
>
{{
items
.
prize_level_name
}}
<
/p
>
<
p
v
-
if
=
"items.compare_amount"
>
{{
items
.
compare_amount
?
Number
(
items
.
compare_amount
)
/
100
+
(
item
.
exchange_score_status
==
1
?
'积分'
:
'金额'
)
:
items
.
compare_amount
}}
<
span
>
*
{{
items
.
apply_num
}}
<
/span></
p
>
{{
items
.
compare_amount
?
Number
(
items
.
compare_amount
)
/
100
+
(
item
.
exchange_score_status
==
1
?
"积分"
:
"金额"
)
:
items
.
compare_amount
}}
<
span
>
*
{{
items
.
apply_num
}}
<
/span
>
<
/p
>
<
/div
>
<!--
固定奖
-->
<
div
v
-
if
=
"items.prize_default"
>
<
div
class
=
"contentConfirmItem"
>
<
p
class
=
"title"
>
固定奖
<
span
v
-
if
=
"item.exchange_score_status == 1"
>
{{
items
.
apply_num
?
'*'
+
items
.
apply_num
:
''
}}
<
/span></
p
>
<
div
v
-
for
=
"(prize, prizeIndex) in items.prize_default"
:
key
=
"prizeIndex"
class
=
"contentConfirmItem rowFlex "
>
<
p
class
=
"info"
>
{{
prize
.
name
}}
<
/p
>
<
p
class
=
"info"
style
=
"margin-left:40px;"
>
ID
:
{{
prize
.
prize_id
}}
<
/p
>
<
p
class
=
"title"
>
固定奖
<
span
v
-
if
=
"item.exchange_score_status == 1"
>
{{
items
.
apply_num
?
"*"
+
items
.
apply_num
:
""
}}
<
/span
>
<
/p
>
<
div
v
-
for
=
"(prize, prizeIndex) in items.prize_default"
:
key
=
"prizeIndex"
class
=
"contentConfirmItem rowFlex"
>
<
p
class
=
"info"
>
{{
prize
.
name
}}
<
/p
>
<
p
class
=
"info"
style
=
"margin-left: 40px"
>
ID
:
{{
prize
.
prize_id
}}
<
/p
>
<
/div
>
<
/div
>
<
/div
>
<!--
自选奖
-->
<
div
v
-
if
=
"items.prize_auto"
class
=
"contentConfirmItem"
>
<
p
class
=
"title"
>
自选奖
({{
items
.
prize_auto
.
length
}}
选
{{
items
.
prize_auto_num
}}
)
<
/p
>
<
div
v
-
for
=
"(prize, prizeIndex) in items.prize_auto"
:
key
=
"prizeIndex"
class
=
"contentConfirmItem "
>
<
div
v
-
for
=
"(auto, autoIndex) in prize.group"
:
key
=
"autoIndex"
>
<
div
v
-
if
=
"prize.apply_num > 0"
class
=
"rowFlex spaceBetween"
>
<
p
class
=
"title"
>
自选奖
({{
items
.
prize_auto
.
length
}}
选
{{
items
.
prize_auto_num
}}
)
<
/p
>
<
div
v
-
for
=
"(prize, prizeIndex) in items.prize_auto"
:
key
=
"prizeIndex"
class
=
"contentConfirmItem"
>
<
div
v
-
for
=
"(auto, autoIndex) in prize.group"
:
key
=
"autoIndex"
>
<
div
v
-
if
=
"prize.apply_num > 0"
class
=
"rowFlex spaceBetween"
>
<
span
>
{{
auto
.
name
}}
<
/span
>
<
span
>
ID
:{{
auto
.
prize_id
}}
<
/span
>
<
div
>*
{{
prize
.
apply_num
}}
<
/div
>
...
...
@@ -114,17 +253,26 @@
<
/div
>
<
/div
>
<!--
返利
-->
<
div
v
-
if
=
"item.rebate_ratio_amount"
class
=
"contentConfirmItem"
>
<
p
class
=
"rowFlex spaceBetween"
>
<
span
>
返利
:
¥
{{
item
.
rebate_ratio_amount
}}
<
/span> <span>1:{{
items
.
rebate_ratio_rate
}}
<
/span> </
p
>
<
div
v
-
if
=
"item.rebate_ratio_amount"
class
=
"contentConfirmItem"
>
<
p
class
=
"rowFlex spaceBetween"
>
<
span
>
返利
:
¥
{{
item
.
rebate_ratio_amount
}}
<
/span
>
<
span
>
1
:{{
items
.
rebate_ratio_rate
}}
<
/span
>
<
/p
>
<
/div
>
<
/div
>
<
div
v
-
if
=
"item.prize && item.prize.length > 0"
>
<
div
v
-
for
=
"(prize, prizeIndex) in item.prize"
:
key
=
"prizeIndex"
class
=
"contentConfirmItem rowFlex "
>
<
p
class
=
"info"
>
{{
prize
.
name
}}
<
/p
>
<
p
class
=
"info"
style
=
"margin-left:40px;"
>
ID
:
{{
prize
.
prize_id
}}
<
/p
>
<
div
v
-
for
=
"(prize, prizeIndex) in item.prize"
:
key
=
"prizeIndex"
class
=
"contentConfirmItem rowFlex"
>
<
p
class
=
"info"
>
{{
prize
.
name
}}
<
/p
>
<
p
class
=
"info"
style
=
"margin-left: 40px"
>
ID
:
{{
prize
.
prize_id
}}
<
/p
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -132,34 +280,47 @@
<
/div
>
<
/div
>
<
/div
>
<
div
v
-
else
-
if
=
"!listLoading && emailGiftList.length == 0"
class
=
"noContent rowFlex allCenter"
>
<
div
v
-
else
-
if
=
"!listLoading && emailGiftList.length == 0"
class
=
"noContent rowFlex allCenter"
>
<
noContent
/>
<
/div
>
<
/div
>
<
/div
>
<!--
申请礼包
-->
<
applyGift
v
-
if
=
"showApplyGift"
:
show
.
sync
=
"showApplyGift"
title
=
"礼包申请"
@
requestData
=
"requestData"
/>
<
applyGift
v
-
if
=
"showApplyGift"
:
show
.
sync
=
"showApplyGift"
title
=
"礼包申请"
@
requestData
=
"requestData"
/>
<
/div
>
<
/template
>
<
script
>
import
{
emailGiftList
,
memberView
,
completionOrder
,
selectSearch
}
from
'@/api/game'
import
{
mapMutations
,
mapActions
,
mapState
}
from
'vuex'
import
{
removeDp
,
debounce
}
from
'@/utils/index'
import
{
emailGiftList
,
memberView
,
completionOrder
,
selectSearch
,
}
from
"@/api/game"
;
import
{
mapMutations
,
mapActions
,
mapState
}
from
"vuex"
;
import
{
debounce
}
from
"@/utils/index"
;
// import
{
roleList
,
memberView
,
zyouBind
,
selectSearch
}
from
'@/api/game'
import
applyGift
from
'./applyGift.vue'
import
selectDate
from
'@/components/selectDate.vue'
import
applyGift
from
"./applyGift.vue"
;
import
selectDate
from
"@/components/selectDate.vue"
;
export
default
{
name
:
'emailGift'
,
name
:
"emailGift"
,
components
:
{
selectDate
,
applyGift
applyGift
,
}
,
data
()
{
return
{
isloadMore
:
true
,
showApplyGift
:
false
,
collapseValue
:
[
'1'
],
collapseValue
:
[
"1"
],
emailGiftList
:
[],
optionsList
:
[],
gameNameList
:
[],
...
...
@@ -168,188 +329,217 @@ export default {
serverNameList
:
[],
giftTypeList
:
[],
form
:
{
main_game_id
:
''
,
main_game_id
:
""
,
zyou_server_id
:
[],
role_name_or_cp_id
:
''
,
member_id
:
''
,
active_title
:
''
,
gift_type
:
''
,
right_type
:
''
,
role_name_or_cp_id
:
""
,
member_id
:
""
,
active_title
:
""
,
gift_type
:
""
,
right_type
:
""
,
}
,
benefitOptions
:
[],
inputValue
:
''
,
inputValue
:
""
,
pageInfo
:
{
page
:
0
,
page_size
:
20
,
total
:
0
total
:
0
,
}
,
isCollapsed
:
false
}
isCollapsed
:
false
,
}
;
}
,
computed
:
{
...
mapState
(
'game'
,
[
'accountSelect'
]),
...
mapState
(
"game"
,
[
"accountSelect"
]),
}
,
watch
:
{
accountSelect
(
newVal
,
oldVal
)
{
if
(
newVal
&&
newVal
!==
''
)
{
if
(
newVal
&&
newVal
!==
""
)
{
this
.
pageInfo
=
{
page
:
0
,
page_size
:
20
,
total
:
0
}
this
.
emailGiftList
=
[]
this
.
isloadMore
=
true
this
.
requestemailGiftList
()
}
total
:
0
,
}
;
this
.
emailGiftList
=
[];
this
.
isloadMore
=
true
;
this
.
requestemailGiftList
();
}
}
,
}
,
mounted
()
{
this
.
requestGameList
()
this
.
requestGiftType
()
this
.
getBenefitOptions
()
this
.
requestGameList
()
;
this
.
requestGiftType
()
;
this
.
getBenefitOptions
()
;
}
,
methods
:
{
// 重新拉去数据
requestData
()
{
this
.
emailGiftList
=
[]
this
.
isloadMore
=
true
this
.
requestemailGiftList
()
this
.
emailGiftList
=
[]
;
this
.
isloadMore
=
true
;
this
.
requestemailGiftList
()
;
}
,
tabChange
:
debounce
(
function
()
{
this
.
pageInfo
.
page
=
0
this
.
emailGiftList
=
[]
this
.
isloadMore
=
true
this
.
requestemailGiftList
()
this
.
pageInfo
.
page
=
0
;
this
.
emailGiftList
=
[]
;
this
.
isloadMore
=
true
;
this
.
requestemailGiftList
()
;
}
,
1000
),
async
requestGiftType
()
{
const
data
=
{
field_name
:
'gift_type'
,
table_name
:
'role_gift_bag'
,
type
:
'dictionaries'
}
const
res
=
await
selectSearch
(
data
)
field_name
:
"gift_type"
,
table_name
:
"role_gift_bag"
,
type
:
"dictionaries"
,
}
;
const
res
=
await
selectSearch
(
data
)
;
if
(
res
.
status_code
===
1
)
{
res
.
data
.
data
.
map
(
item
=>
{
item
.
value
=
item
.
value
.
toString
()
}
)
this
.
giftTypeList
=
res
.
data
.
data
res
.
data
.
data
.
map
(
(
item
)
=>
{
item
.
value
=
item
.
value
.
toString
()
;
}
)
;
this
.
giftTypeList
=
res
.
data
.
data
;
this
.
giftTypeList
.
unshift
({
value
:
''
,
label
:
'全部'
}
)
value
:
""
,
label
:
"全部"
,
}
)
;
}
}
,
requestGameList
()
{
const
data
=
{
type
:
'mainGameList'
,
value
:
''
,
weixin_blong_id
:
''
}
selectSearch
(
data
).
then
(
res
=>
{
this
.
loading
=
false
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
this
.
gameNameList
=
this
.
optionsList
=
res
.
data
.
data
;
}
}
)
}
)
;
}
,
closePage
(
item
,
index
)
{
this
.
$set
(
this
.
emailGiftList
[
index
],
'showDetails'
,
false
)
this
.
$set
(
this
.
emailGiftList
[
index
],
"showDetails"
,
false
);
}
,
openPage
(
item
,
index
)
{
this
.
$set
(
this
.
emailGiftList
[
index
],
'showDetails'
,
true
)
this
.
$set
(
this
.
emailGiftList
[
index
],
"showDetails"
,
true
);
}
,
remoteMethodServer
(
query
)
{
if
(
query
!==
''
)
{
this
.
loading
=
true
if
(
query
!==
""
)
{
this
.
loading
=
true
;
const
data
=
{
type
:
'server_info'
,
type
:
"server_info"
,
value
:
query
,
main_game_ids
:
this
.
form
.
main_game_id
}
selectSearch
(
data
).
then
(
res
=>
{
this
.
loading
=
false
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
this
.
serverNameList
=
res
.
data
.
data
;
}
}
)
}
)
;
}
}
,
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
gameNameList
=
this
.
optionsList
.
filter
(
item
=>
{
return
item
.
label
.
toLowerCase
()
.
indexOf
(
query
.
toLowerCase
())
>
-
1
}
)
if
(
query
!==
""
)
{
this
.
gameNameList
=
this
.
optionsList
.
filter
((
item
)
=>
{
return
item
.
label
.
toLowerCase
().
indexOf
(
query
.
toLowerCase
())
>
-
1
;
}
);
}
else
{
this
.
gameNameList
=
[]
this
.
gameNameList
=
[]
;
}
}
,
searchInput
(
value
)
{
console
.
log
(
value
)
console
.
log
(
value
)
;
this
.
pageInfo
=
{
page
:
0
,
page_size
:
20
,
total
:
0
}
this
.
isloadMore
=
true
this
.
emailGiftList
=
[]
this
.
requestemailGiftList
()
total
:
0
,
}
;
this
.
isloadMore
=
true
;
this
.
emailGiftList
=
[]
;
this
.
requestemailGiftList
()
;
}
,
async
getBenefitOptions
()
{
try
{
const
data
=
{
type
:
'svip_right'
,
}
const
res
=
await
selectSearch
(
data
)
if
(
res
.
status_code
===
1
&&
res
.
data
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
const
showList
=
[
'转生石福利'
,
'月核心玩家礼包'
,
'超R生日福利礼包'
,
'超R行会专属礼包'
]
this
.
benefitOptions
=
res
.
data
.
data
.
filter
((
item
,
index
)
=>
{
return
showList
.
includes
(
item
.
label
)
}
).
map
(
item
=>
({
type
:
"svip_right"
,
}
;
const
res
=
await
selectSearch
(
data
);
if
(
res
.
status_code
===
1
&&
res
.
data
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
const
showList
=
[
"转生石福利"
,
"月核心玩家礼包"
,
"超R生日福利礼包"
,
"超R行会专属礼包"
,
];
this
.
benefitOptions
=
res
.
data
.
data
.
filter
((
item
,
index
)
=>
{
return
showList
.
includes
(
item
.
label
);
}
)
.
map
((
item
)
=>
({
...
item
,
value
:
item
.
value
||
item
.
id
// 确保每个选项都有value属性,优先使用value,不存在则使用id
value
:
item
.
value
||
item
.
id
,
// 确保每个选项都有value属性,优先使用value,不存在则使用id
}
));
console
.
log
(
this
.
benefitOptions
)
console
.
log
(
this
.
benefitOptions
)
;
}
}
catch
(
error
)
{
console
.
error
(
'获取权益选项失败:'
,
error
)
console
.
error
(
"获取权益选项失败:"
,
error
);
}
}
,
requestemailGiftList
()
{
this
.
listLoading
=
true
if
(
this
.
accountSelect
==
''
)
{
this
.
$message
.
warning
(
'暂无关联的账号,请先去关联账号!'
)
return
false
this
.
listLoading
=
true
;
if
(
this
.
accountSelect
==
""
)
{
this
.
$message
.
warning
(
"暂无关联的账号,请先去关联账号!"
);
return
false
;
}
if
(
!
this
.
isloadMore
)
{
console
.
log
(
'没有更多数据了'
)
this
.
listLoading
=
false
return
false
}
this
.
pageInfo
.
page
+=
1
this
.
form
.
member_id
=
this
.
accountSelect
emailGiftList
({
...
this
.
form
,
...
this
.
pageInfo
}
).
then
(
res
=>
{
this
.
listLoading
=
false
console
.
log
(
"没有更多数据了"
);
this
.
listLoading
=
false
;
return
false
;
}
this
.
pageInfo
.
page
+=
1
;
this
.
form
.
member_id
=
this
.
accountSelect
;
emailGiftList
({
...
this
.
form
,
...
this
.
pageInfo
}
).
then
(
(
res
)
=>
{
this
.
listLoading
=
false
;
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
length
<
20
)
{
this
.
isloadMore
=
false
this
.
isloadMore
=
false
;
}
res
.
data
.
data
.
map
((
item
,
index
)
=>
{
item
.
showDetails
=
false
}
)
this
.
emailGiftList
=
removeDp
(
res
.
data
.
data
,
this
.
emailGiftList
,
'id'
)
}
,
err
=>
{
this
.
listLoading
=
false
}
)
item
.
showDetails
=
false
;
}
);
this
.
emailGiftList
=
this
.
removeDp
(
res
.
data
.
data
,
this
.
emailGiftList
,
"id"
);
}
,
toggleCollapse
()
{
this
.
isCollapsed
=
!
this
.
isCollapsed
}
(
err
)
=>
{
this
.
listLoading
=
false
;
}
}
);
}
,
toggleCollapse
()
{
this
.
isCollapsed
=
!
this
.
isCollapsed
;
}
,
removeDp
(
arr1
,
arr2
,
id
)
{
let
arr
;
arr2
?
(
arr
=
arr1
.
concat
(
arr2
))
:
(
arr
=
arr1
);
const
obj
=
{
}
;
const
newArray
=
arr
.
reduce
((
pre
,
cur
)
=>
{
if
(
!
obj
[
cur
[
id
]])
{
obj
[
cur
[
id
]]
=
true
;
pre
.
push
(
cur
);
}
return
pre
;
}
,
[]);
return
newArray
;
}
,
}
,
}
;
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
detailsGiftApply
{
...
...
@@ -382,14 +572,14 @@ export default {
padding
:
0
10
px
;
overflow
:
auto
;
overflow
-
x
:
hidden
;
::
v
-
deep
.
el
-
tabs__content
{
::
v
-
deep
.
el
-
tabs__content
{
height
:
auto
;
}
::
v
-
deep
.
el
-
tabs
{
::
v
-
deep
.
el
-
tabs
{
height
:
auto
;
}
.
noContent
{
.
noContent
{
margin
-
top
:
50
px
;
}
...
...
@@ -439,7 +629,7 @@ export default {
display
:
inline
-
block
;
width
:
8
px
;
height
:
8
px
;
background
:
#
409
EFF
;
background
:
#
409
eff
;
border
-
radius
:
5
px
;
}
...
...
@@ -472,7 +662,7 @@ export default {
p
{
font
-
size
:
22
px
;
color
:
#
409
EFF
;
color
:
#
409
eff
;
}
}
}
...
...
@@ -480,7 +670,7 @@ export default {
.
filterList
{
margin
-
bottom
:
10
px
;
position
:
relative
;
border
:
1
px
solid
#
EBEEF
5
;
border
:
1
px
solid
#
ebeef
5
;
border
-
radius
:
4
px
;
padding
:
10
px
;
transition
:
all
0.3
s
;
...
...
@@ -491,7 +681,7 @@ export default {
align
-
items
:
center
;
margin
-
bottom
:
10
px
;
padding
-
bottom
:
5
px
;
border
-
bottom
:
1
px
dashed
#
EBEEF
5
;
border
-
bottom
:
1
px
dashed
#
ebeef
5
;
}
.
filter
-
title
{
...
...
@@ -502,7 +692,7 @@ export default {
.
collapse
-
icon
{
cursor
:
pointer
;
color
:
#
409
EFF
;
color
:
#
409
eff
;
font
-
size
:
16
px
;
padding
:
5
px
;
transition
:
all
0.3
s
;
...
...
@@ -585,7 +775,7 @@ export default {
.
iconStyle
{
font
-
size
:
18
px
;
cursor
:
pointer
;
color
:
#
409
EFF
;
color
:
#
409
eff
;
}
.
money
{
...
...
@@ -621,7 +811,7 @@ export default {
background
:
#
e1fff0
;
font
-
family
:
PingFangSC
-
Regular
,
PingFang
SC
;
font
-
weight
:
400
;
color
:
#
409
EFF
;
color
:
#
409
eff
;
border
:
none
;
}
}
...
...
@@ -661,7 +851,6 @@ export default {
}
}
}
}
.
tabStyle
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论