Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
50cc4cb2
Commit
50cc4cb2
authored
Sep 28, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5c200d41
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
index.vue
src/components/Loan/LoanHotSwipe/index.vue
+5
-6
index.vue
src/views/withMenu/Loan/index.vue
+9
-8
No files found.
src/components/Loan/LoanHotSwipe/index.vue
View file @
50cc4cb2
<
template
>
<
template
>
<Skeleton
:row=
"3"
:loading=
"skeLoading"
>
<Skeleton
:row=
"3"
:loading=
"skeLoading"
>
<van-swipe
class=
"my-swipe"
indicator-color=
"#3E4FAF"
style=
"margin
T
op:20px"
>
<van-swipe
class=
"my-swipe"
indicator-color=
"#3E4FAF"
style=
"margin
-t
op:20px"
>
<van-swipe-item
<van-swipe-item
class=
"flex justify-center swpiItem"
class=
"flex justify-center swpiItem"
v-for=
"item in hotProductList"
v-for=
"item in
state.
hotProductList"
:key=
"item.value"
:key=
"item.value"
>
>
<LoanHotCard
<LoanHotCard
...
@@ -38,11 +38,10 @@ const props = defineProps({
...
@@ -38,11 +38,10 @@ const props = defineProps({
});
});
let
skeLoading
=
ref
(
true
);
let
skeLoading
=
ref
(
true
);
let
hotProductList
:
Array
<
hotProduct
>
=
reactive
([]);
let
state
=
reactive
({
hotProductList
:
[]
as
Array
<
hotProduct
>
})
watch
(
props
,
(
newV
,
oldV
)
=>
{
watch
(
props
,
(
newV
,
oldV
)
=>
{
console
.
log
(
props
.
loanMode
);
state
.
hotProductList
=
[];
hotProductList
=
[];
fetchList
();
fetchList
();
});
});
...
@@ -63,7 +62,7 @@ const fetchList = () => {
...
@@ -63,7 +62,7 @@ const fetchList = () => {
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
const
{
rate_lower
,
max_amount
,
max_date
,
inst_name
,
product_name
}
=
const
{
rate_lower
,
max_amount
,
max_date
,
inst_name
,
product_name
}
=
ret
.
data
;
ret
.
data
;
hotProductList
.
push
({
state
.
hotProductList
.
push
({
rate_lower
,
rate_lower
,
max_amount
,
max_amount
,
max_date
,
max_date
,
...
...
src/views/withMenu/Loan/index.vue
View file @
50cc4cb2
...
@@ -65,11 +65,12 @@
...
@@ -65,11 +65,12 @@
<!-- 非热门贷款 -->
<!-- 非热门贷款 -->
<GroupTitle
<GroupTitle
title=
"贷款精选"
title=
"贷款精选"
v-if=
"state.allProductList"
@
seeMore=
"$router.push(
{ name: 'LoanList', params: { mode: mode } })"
@
seeMore=
"$router.push(
{ name: 'LoanList', params: { mode: mode } })"
/>
/>
<Skeleton
:row=
"3"
:loading=
"skeLoading"
style=
"margin
Top:20px
"
>
<Skeleton
:row=
"3"
:loading=
"skeLoading"
style=
"margin
-top: 20px"
v-if=
"state.allProductList
"
>
<LoanCard
<LoanCard
v-for=
"item in allProductList"
v-for=
"item in
state.
allProductList"
:key=
"item.value"
:key=
"item.value"
:max_amount=
"item.max_amount"
:max_amount=
"item.max_amount"
:product_name=
"item.product_name"
:product_name=
"item.product_name"
...
@@ -139,7 +140,7 @@ let skeLoading = ref(false);
...
@@ -139,7 +140,7 @@ let skeLoading = ref(false);
const
setMode
=
(
v
:
eLoanMode
)
=>
{
const
setMode
=
(
v
:
eLoanMode
)
=>
{
mode
.
value
=
v
;
mode
.
value
=
v
;
};
};
let
allProductList
:
Array
<
simpleItemInfo
>
=
reactive
([]
);
let
state
=
reactive
({
allProductList
:
[]
as
Array
<
simpleItemInfo
>
}
);
const
src
=
ref
(
""
);
const
src
=
ref
(
""
);
const
uuid
=
ref
(
""
);
const
uuid
=
ref
(
""
);
const
hotNews
=
ref
([]);
const
hotNews
=
ref
([]);
...
@@ -151,7 +152,7 @@ const limit = reactive({
...
@@ -151,7 +152,7 @@ const limit = reactive({
});
});
watch
(
mode
,
()
=>
{
watch
(
mode
,
()
=>
{
allProductList
=
[];
state
.
allProductList
=
[];
fetchList
();
fetchList
();
});
});
...
@@ -189,7 +190,7 @@ const fetchList = () => {
...
@@ -189,7 +190,7 @@ const fetchList = () => {
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
const
{
max_amount
,
inst_name
,
uuid
,
features
,
product_name
}
=
const
{
max_amount
,
inst_name
,
uuid
,
features
,
product_name
}
=
ret
.
data
;
ret
.
data
;
allProductList
.
push
({
state
.
allProductList
.
push
({
max_amount
,
max_amount
,
product_name
,
product_name
,
features
,
features
,
...
@@ -202,9 +203,9 @@ const fetchList = () => {
...
@@ -202,9 +203,9 @@ const fetchList = () => {
});
});
};
};
const
formatLimit
=
(
limit
:
string
):
string
=>
{
const
formatLimit
=
(
limit
:
string
):
string
=>
{
return
Number
(
limit
+
'0000'
).
toLocaleString
()
return
Number
(
limit
+
"0000"
).
toLocaleString
();
}
}
;
const
fetchLimit
=
()
=>
{
const
fetchLimit
=
()
=>
{
limit
.
state
=
true
;
limit
.
state
=
true
;
...
...
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