Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporateCulture-qd
Commits
a48a7912
Commit
a48a7912
authored
Feb 13, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 20331】 feat: 优化积分商城相关页面
parent
ea5de822
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
24 deletions
+36
-24
exchangeYabiRecordDilaog.vue
...views/pointsStore/components/exchangeYabiRecordDilaog.vue
+24
-6
index.vue
src/views/pointsStore/index.vue
+12
-18
No files found.
src/views/pointsStore/components/exchangeYabiRecordDilaog.vue
View file @
a48a7912
...
...
@@ -11,19 +11,19 @@
<!-- 搜索筛选区域 - 优化布局 -->
<div
class=
"mb-4 flex items-center gap-3 justify-end"
>
<div
class=
"w-750px flex items-center gap-3"
>
<el-select
v-model=
"searchParams.type"
placeholder=
"选择商品类型"
clearable
>
<
!--
<
el-select
v-model=
"searchParams.type"
placeholder=
"选择商品类型"
clearable
>
<el-option
label=
"亚声实物"
:value=
"ShopGoodsTypeEnum.REAL_GOODS"
/>
<el-option
label=
"虚拟装饰"
:value=
"ShopGoodsTypeEnum.VIRTUAL_GOODS"
/>
</el-select>
</el-select>
-->
<el-date-picker
v-model=
"
searchParams.dat
eRange"
v-model=
"
tim
eRange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"YYYY-MM-DD"
value-format=
"
YYYY-MM-DD
"
value-format=
"
x
"
clearable
style=
"width: 700px"
/>
...
...
@@ -42,7 +42,7 @@
class=
"font-semibold"
:class=
"
{ 'text-red-500': !scope.row.isIncr, 'text-green-500': scope.row.isIncr }"
>
{{
scope
.
row
.
isIncr
?
'+'
:
'-'
}}
<!--
{{
scope
.
row
.
isIncr
?
'+'
:
'-'
}}
-->
{{
scope
.
row
.
scoreAyabi
}}
</span>
</
template
>
...
...
@@ -74,12 +74,30 @@
import
{
usePageSearch
}
from
'@/hooks'
import
{
getExchangeYabiRecordList
}
from
'@/api'
import
dayjs
from
'dayjs'
import
{
ShopGoodsTypeEnum
}
from
'@/constants'
const
{
total
,
searchParams
,
refresh
,
goToPage
,
list
}
=
usePageSearch
(
getExchangeYabiRecordList
,
{
immediate
:
false
,
})
const
timeRange
=
computed
({
get
()
{
if
(
!
searchParams
.
value
.
startTime
||
!
searchParams
.
value
.
endTime
)
{
return
[]
}
else
{
return
[
searchParams
.
value
.
startTime
*
1000
,
searchParams
.
value
.
endTime
*
1000
]
}
},
set
(
value
)
{
if
(
!
value
)
{
searchParams
.
value
.
startTime
=
undefined
searchParams
.
value
.
endTime
=
undefined
}
else
{
searchParams
.
value
.
startTime
=
value
[
0
]
!
/ 100
0
searchParams
.
value
.
endTime
=
value
[
1
]
!
/ 100
0
}
},
})
const
visible
=
shallowRef
(
false
)
const
open
=
()
=>
{
...
...
src/views/pointsStore/index.vue
View file @
a48a7912
...
...
@@ -2,7 +2,7 @@
<div>
<div
class=
"flex gap-6"
>
<!-- 左侧:商品列表区域 -->
<div
class=
"flex-
1
min-w-0"
>
<div
class=
"flex-
3/4
min-w-0"
>
<!-- 虚拟装饰区域 -->
<div
class=
"bg-white/90 backdrop-blur-sm rounded-2xl p-6 shadow-lg mb-6 border border-white/60"
...
...
@@ -137,7 +137,7 @@
</div>
<!-- 右侧:信息面板 -->
<div
class=
"
w-80
flex-shrink-0 space-y-6"
>
<div
class=
"
flex-1/4
flex-shrink-0 space-y-6"
>
<!-- YA币信息卡片 -->
<div
class=
"bg-white/90 backdrop-blur-sm rounded-2xl p-6 shadow-lg border border-white/60 sticky top-[52px]"
...
...
@@ -147,7 +147,7 @@
<div
class=
"text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 text-5xl font-bold"
>
{{
currentYaBi
}}
{{
yabiData.currentValue
}}
</div>
</div>
...
...
@@ -212,17 +212,21 @@
</template>
<
script
setup
lang=
"tsx"
>
import
{
exchangeGoods
,
getShopItemList
,
getYaBiData
}
from
'@/api'
import
{
exchangeGoods
,
getShopItemList
}
from
'@/api'
import
{
usePageSearch
}
from
'@/hooks'
import
{
regionListOptions
,
ShopGoodsTypeEnum
}
from
'@/constants'
import
type
{
ExchangeGoodsParams
,
BackendShopItemDto
}
from
'@/api'
import
ExchangeContent
from
'./components/exchangeContent.tsx'
import
ExchangeGoodsRecordDialog
from
'./components/exchangeGoodsRecordDilaog.vue'
import
ExchangeYabiRecordDialog
from
'./components/exchangeYabiRecordDilaog.vue'
import
{
useYaBiStore
}
from
'@/stores'
import
{
storeToRefs
}
from
'pinia'
const
yabiStore
=
useYaBiStore
()
const
{
yabiData
}
=
storeToRefs
(
yabiStore
)
const
activeTab
=
ref
(
'深圳'
)
const
tabs
=
ref
(
regionListOptions
)
const
currentYaBi
=
ref
(
0
)
const
exchangeGoodsRecordDialogRef
=
useTemplateRef
<
InstanceType
<
typeof
ExchangeGoodsRecordDialog
>>
(
'exchangeGoodsRecordDialogRef'
,
)
...
...
@@ -270,12 +274,6 @@ const onOpenExchangeGoodsRecordDialog = () => {
exchangeGoodsRecordDialogRef
.
value
?.
open
()
}
// 获取YA币数据
const
getYaBiDataFn
=
async
()
=>
{
const
{
data
}
=
await
getYaBiData
()
currentYaBi
.
value
=
data
.
currentValue
}
// 兑换商品
const
onExchangeGoods
=
async
(
item
:
BackendShopItemDto
)
=>
{
...
...
@@ -302,15 +300,15 @@ const onExchangeGoods = async (item: BackendShopItemDto) => {
center
:
true
,
beforeClose
:
async
(
action
,
instance
,
done
)
=>
{
if
(
action
===
'cancel'
)
return
done
()
if
(
currentYaBi
.
v
alue
<
item
.
price
*
form
.
value
.
num
)
if
(
yabiData
.
value
.
currentV
alue
<
item
.
price
*
form
.
value
.
num
)
return
ElMessage
.
error
(
`您的YA币不足,兑换所需
${
item
.
price
*
form
.
value
.
num
}
YA币,当前YA币
${
currentYaBi
.
v
alue
}
`
,
`您的YA币不足,兑换所需
${
item
.
price
*
form
.
value
.
num
}
YA币,当前YA币
${
yabiData
.
value
.
currentV
alue
}
`
,
)
try
{
instance
.
confirmButtonLoading
=
true
await
exchangeGoods
(
form
.
value
)
ElMessage
.
success
(
'兑换成功'
)
getYaBiDataFn
()
yabiStore
.
fetchYaBiData
()
done
()
}
catch
(
error
)
{
console
.
log
(
error
)
...
...
@@ -320,8 +318,4 @@ const onExchangeGoods = async (item: BackendShopItemDto) => {
},
})
}
onMounted
(
async
()
=>
{
getYaBiDataFn
()
})
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment