Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-web-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
lanbaoming
jiedao-web-master
Commits
0325952c
Commit
0325952c
authored
Aug 28, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
fixed defect See merge request
!5
parents
963024e2
541356af
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
60 deletions
+100
-60
IntegralExchange.vue
src/views/jiedao/profile/components/IntegralExchange.vue
+6
-2
detailsActivity.vue
src/views/jiedao/profile/detailsActivity.vue
+1
-1
exchangeDetails.vue
src/views/jiedao/profile/exchangeDetails.vue
+1
-1
exchangeOperate.vue
src/views/jiedao/profile/exchangeOperate.vue
+4
-0
integral.vue
src/views/jiedao/profile/integral.vue
+88
-56
No files found.
src/views/jiedao/profile/components/IntegralExchange.vue
View file @
0325952c
...
...
@@ -5,9 +5,8 @@
<div
class=
"red"
>
{{
$t
(
"
integral.pointsRemark
"
)
}}
</div>
</div>
<div
class=
"content"
>
<!--
<div
class=
"content-text"
>
1、2、3
</div>
<div
class=
"content-select"
>
请选择网点
 
<i
class=
"el-icon-arrow-right"
/></div>
-->
<el-cascader
v-if=
"cascaderState"
v-model=
"selectedNodeId"
:props=
"
{
checkStrictly,
...
...
@@ -73,10 +72,15 @@ export default {
nodeList
:
[],
selectedNodeId
:
null
,
checkStrictly
:
true
,
cascaderState
:
true
,
}
;
}
,
computed
:
{
language
()
{
this
.
cascaderState
=
false
;
this
.
$nextTick
(()
=>
{
this
.
cascaderState
=
true
;
}
);
return
this
.
$store
.
getters
.
language
;
}
,
}
,
...
...
src/views/jiedao/profile/detailsActivity.vue
View file @
0325952c
...
...
@@ -124,7 +124,7 @@ export default {
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
"
0
"
);
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
"
0
"
);
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
"
0
"
);
return
`${year
}
:${month
}
:
${day
}
`
;
return
`${year
}
-${month
}
-
${day
}
`
;
}
;
return
`${formatDate(start)
}
${this.$t("exchange.to")
}
${formatDate(end)
}
`
;
}
,
...
...
src/views/jiedao/profile/exchangeDetails.vue
View file @
0325952c
...
...
@@ -145,7 +145,7 @@ export default {
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
"
0
"
);
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
"
0
"
);
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
"
0
"
);
return
`${year
}
:${month
}
:${day
}
${hours
}
:${minutes
}
:${seconds
}
`
;
return
`${year
}
-${month
}
-${day
}
`
;
}
,
}
,
}
;
...
...
src/views/jiedao/profile/exchangeOperate.vue
View file @
0325952c
...
...
@@ -180,6 +180,7 @@ export default {
}
,
computed
:
{
isChinese
()
{
this
.
getCode
=
this
.
$t
(
'
login.getCode
'
)
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
}
,
}
,
...
...
@@ -236,6 +237,9 @@ export default {
r
.
data
.
forEach
((
element
)
=>
{
element
.
isDefault
===
0
?
(
this
.
addressInfo
=
element
)
:
""
;
}
);
if
(
this
.
addressInfo
.
isDefault
!=
0
){
this
.
addressInfo
=
r
.
data
[
0
]
}
}
);
}
,
getRewardsDetailsAPI
()
{
...
...
src/views/jiedao/profile/integral.vue
View file @
0325952c
...
...
@@ -5,15 +5,26 @@
<div
class=
"header-content"
>
<div
class=
"content-box"
>
<div
class=
"avatar"
>
<img
class=
"imgs"
src=
"@/assets/integral/vip_avatar.png"
alt=
""
>
<img
class=
"imgs"
src=
"@/assets/integral/vip_avatar.png"
alt=
""
/
>
</div>
<div
class=
"content-text"
>
<div
class=
"text-vip"
>
{{
$t
(
'
integral.headerTitle
'
)
}}{{
integralInfo
.
levelName
}}
</div>
<div
class=
"text-integral"
>
{{
$t
(
'
integral.spend
'
)
}}{{
integralInfo
.
holdScore
}}
 
{{
$t
(
'
integral.available
'
)
}}{{
integralInfo
.
usedScore
}}
</div>
<div
class=
"text-vip"
>
{{
$t
(
"
integral.headerTitle
"
)
}}{{
integralInfo
.
levelName
}}
</div>
<div
class=
"text-integral"
>
{{
$t
(
"
integral.spend
"
)
}}{{
integralInfo
.
usedScore
}}
 
{{
$t
(
"
integral.available
"
)
}}{{
integralInfo
.
holdScore
}}
</div>
</div>
<div
class=
"content-image"
>
<img
v-if=
"levelIcon"
class=
"imgs"
:src=
"levelIcon"
alt=
""
>
<img
v-else
class=
"imgs"
src=
"@/assets/integral/vip_avatar.png"
alt=
""
>
<img
v-if=
"levelIcon"
class=
"imgs"
:src=
"levelIcon"
alt=
""
/>
<img
v-else
class=
"imgs"
src=
"@/assets/integral/vip_avatar.png"
alt=
""
/>
</div>
</div>
<div
class=
"content-divider"
>
...
...
@@ -23,27 +34,45 @@
</div>
</div>
<div
class=
"header-menu"
>
<div
class=
"menu-item"
@
click=
"toJump(1)"
>
{{
$t
(
'
integral.logPoints
'
)
}}
 
<i
class=
"el-icon-arrow-right"
/></div>
<div
class=
"menu-item"
@
click=
"toJump(2)"
>
{{
$t
(
'
integral.logExchange
'
)
}}
 
<i
class=
"el-icon-arrow-right"
/></div>
<div
class=
"menu-item"
@
click=
"toJump(1)"
>
{{
$t
(
"
integral.logPoints
"
)
}}
 
<i
class=
"el-icon-arrow-right"
/>
</div>
<div
class=
"menu-item"
@
click=
"toJump(2)"
>
{{
$t
(
"
integral.logExchange
"
)
}}
 
<i
class=
"el-icon-arrow-right"
/>
</div>
</div>
</div>
<div
class=
"nav"
>
<div
class=
"nav-item"
:class=
"
{'nav-item-active1':count ==1}" @click="count=1">
{{
$t
(
'
integral.redeemGifts
'
)
}}
</div>
<div
class=
"nav-item"
:class=
"
{'nav-item-active2':count ==2}" @click="count=2">
{{
$t
(
'
integral.pointsCampaign
'
)
}}
</div>
<div
class=
"nav-item"
:class=
"
{ 'nav-item-active1': count == 1 }"
@click="count = 1"
>
{{
$t
(
"
integral.redeemGifts
"
)
}}
</div>
<div
class=
"nav-item"
:class=
"
{ 'nav-item-active2': count == 2 }"
@click="count = 2"
>
{{
$t
(
"
integral.pointsCampaign
"
)
}}
</div>
</div>
<IntegralExchange
v-show=
"count == 1"
/>
<IntegralActivity
v-show=
"count == 2
"
/>
<IntegralActivity
v-show=
"count == 2"
/>
</div>
</
template
>
<
script
>
import
IntegralExchange
from
'
./components/IntegralExchange.vue
'
import
IntegralActivity
from
'
./components/IntegralActivity.vue
'
import
{
getMemberInfo
}
from
'
@/api/integral
'
import
IntegralExchange
from
"
./components/IntegralExchange.vue
"
;
import
IntegralActivity
from
"
./components/IntegralActivity.vue
"
;
import
{
getMemberInfo
}
from
"
@/api/integral
"
;
export
default
{
name
:
'
JdIntegral
'
,
name
:
"
JdIntegral
"
,
components
:
{
IntegralExchange
,
IntegralActivity
IntegralActivity
,
},
data
()
{
return
{
...
...
@@ -51,48 +80,51 @@ export default {
// 会员积分信息
integralInfo
:
{},
// 会员图标
levelIcon
:
''
}
levelIcon
:
""
,
}
;
},
computed
:
{
score
()
{
if
(
this
.
integralInfo
.
totalScore
)
{
return
Math
.
min
(
Math
.
floor
((
this
.
integralInfo
.
totalScore
/
this
.
integralInfo
.
upperCount
)
*
100
),
Math
.
floor
(
(
this
.
integralInfo
.
totalScore
/
this
.
integralInfo
.
upperCount
)
*
100
),
100
)
)
;
}
return
0
}
return
0
;
}
,
},
created
()
{
this
.
getIntegralInfo
()
const
{
loginUser
}
=
this
.
$store
.
state
.
user
this
.
getIntegralInfo
()
;
const
{
loginUser
}
=
this
.
$store
.
state
.
user
;
if
(
loginUser
)
{
const
userScoreLevelInfo
=
loginUser
.
userScoreLevelInfo
this
.
levelIcon
=
userScoreLevelInfo
.
levelIcon
console
.
log
(
this
.
levelIcon
)
const
userScoreLevelInfo
=
loginUser
.
userScoreLevelInfo
;
this
.
levelIcon
=
userScoreLevelInfo
.
levelIcon
;
console
.
log
(
this
.
levelIcon
)
;
}
},
methods
:
{
// 跳转 日志
toJump
(
val
)
{
const
path
=
val
===
1
?
'
/jiedao/jd-integral-log
'
:
'
/jiedao/jd-exchange-log
'
this
.
$router
.
push
({
path
})
const
path
=
val
===
1
?
"
/jiedao/jd-integral-log
"
:
"
/jiedao/jd-exchange-log
"
;
this
.
$router
.
push
({
path
});
},
// 获取个人积分信息
async
getIntegralInfo
()
{
try
{
const
id
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
getMemberInfo
({
id
})
if
(
code
!==
0
)
return
this
.
integralInfo
=
data
const
id
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
getMemberInfo
({
id
})
;
if
(
code
!==
0
)
return
;
this
.
integralInfo
=
data
;
}
catch
(
err
)
{
console
.
log
(
err
)
console
.
log
(
err
)
;
}
}
}
}
}
,
}
,
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
.integral
{
...
...
@@ -101,7 +133,7 @@ export default {
width
:
100%
;
height
:
160px
;
color
:
#333
;
background
:
#
B9BCC
8
;
background
:
#
b9bcc
8
;
border-top-left-radius
:
10px
;
border-top-right-radius
:
10px
;
box-sizing
:
border-box
;
...
...
@@ -117,7 +149,7 @@ export default {
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.content-box
{
.content-box
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
...
...
@@ -147,16 +179,16 @@ export default {
.content-text
{
.text-vip
{
font-size
:
16px
;
}
}
}
}
.header-menu
{
.menu-item
{
.header-menu
{
.menu-item
{
margin-bottom
:
20px
;
&
:last-child
{
&
:last-child
{
margin-bottom
:
0
;
}
i
{
i
{
font-weight
:
700
;
}
}
...
...
@@ -170,19 +202,19 @@ export default {
margin
:
20px
0
;
border-radius
:
2px
;
}
.divider-active
{
.divider-active
{
position
:
absolute
;
top
:
0
;
left
:
0
;
height
:
4px
;
background
:
#3461
D
4
;
background
:
#3461
d
4
;
border-radius
:
2px
;
}
.divider-vip
{
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translate
(
120%
,-
50%
);
transform
:
translate
(
120%
,
-50%
);
font-size
:
16px
;
font-weight
:
700
;
color
:
#333
;
...
...
@@ -190,39 +222,39 @@ export default {
.divider-num
{
top
:
0
;
right
:
50%
;
transform
:
translate
(
-50%
,-
120%
);
transform
:
translate
(
-50%
,
-120%
);
position
:
absolute
;
font-size
:
16px
;
color
:
#3461
D
4
;
color
:
#3461
d
4
;
font-weight
:
700
;
}
.content-text
{
.content-text
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.text-vip
{
.text-vip
{
font-size
:
24px
!
important
;
font-weight
:
700
;
color
:
#2
A426B
;
color
:
#2
a426b
;
}
}
.nav
{
.nav
{
display
:
flex
;
justify-content
:
space-around
;
box-sizing
:
border-box
;
background-color
:
#
D1D5E
1
;
background-color
:
#
d1d5e
1
;
border-bottom
:
1px
solid
#e9e9e9
;
.nav-item
{
.nav-item
{
display
:
flex
;
width
:
50%
;
height
:
60px
;
align-items
:
center
;
justify-content
:
center
;
box-sizing
:
border-box
;
&
:hover
{
color
:
#3461
D
4
;
&
:hover
{
color
:
#3461
d
4
;
}
}
.nav-item-active1
{
...
...
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