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
994aab41
Commit
994aab41
authored
Oct 21, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:热门贷款查询
parent
659af81c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
18 deletions
+35
-18
index.vue
src/components/Loan/LoanHotSwipe/index.vue
+18
-10
index.ts
src/service/LoanProductService/index.ts
+3
-2
type.ts
src/service/LoanProductService/type.ts
+9
-1
index.vue
src/views/withMenu/Home/index.vue
+2
-0
index.vue
src/views/withMenu/Loan/index.vue
+3
-5
No files found.
src/components/Loan/LoanHotSwipe/index.vue
View file @
994aab41
<
template
>
<
template
>
<Skeleton
:row=
"3"
:loading=
"skeLoading"
>
<Skeleton
:row=
"3"
:loading=
"skeLoading"
>
<van-swipe
class=
"my-swipe"
indicator-color=
"#3E4FAF"
style=
"margin-top:20px"
>
<van-swipe
class=
"my-swipe"
indicator-color=
"#3E4FAF"
style=
"margin-top: 20px"
>
<van-swipe-item
<van-swipe-item
class=
"flex justify-center swpiItem"
class=
"flex justify-center swpiItem"
v-for=
"item in state.hotProductList"
v-for=
"item in state.hotProductList"
...
@@ -29,6 +33,7 @@ import { onMounted, PropType, reactive, watch } from "@vue/runtime-core";
...
@@ -29,6 +33,7 @@ import { onMounted, PropType, reactive, watch } from "@vue/runtime-core";
import
{
eLoanMode
}
from
"@/views/withMenu/Loan/types"
;
import
{
eLoanMode
}
from
"@/views/withMenu/Loan/types"
;
import
{
hotProduct
}
from
"./type"
;
import
{
hotProduct
}
from
"./type"
;
import
{
Skeleton
}
from
"vant"
;
import
{
Skeleton
}
from
"vant"
;
import
{
eProductStatus
}
from
"@/service/LoanProductService/type"
;
const
props
=
defineProps
({
const
props
=
defineProps
({
loanMode
:
{
loanMode
:
{
...
@@ -38,7 +43,7 @@ const props = defineProps({
...
@@ -38,7 +43,7 @@ const props = defineProps({
});
});
let
skeLoading
=
ref
(
true
);
let
skeLoading
=
ref
(
true
);
let
state
=
reactive
({
hotProductList
:
[]
as
Array
<
hotProduct
>
})
let
state
=
reactive
({
hotProductList
:
[]
as
Array
<
hotProduct
>
});
watch
(
props
,
(
newV
,
oldV
)
=>
{
watch
(
props
,
(
newV
,
oldV
)
=>
{
state
.
hotProductList
=
[];
state
.
hotProductList
=
[];
...
@@ -55,16 +60,21 @@ const fetchList = () => {
...
@@ -55,16 +60,21 @@ const fetchList = () => {
limit
:
3
,
limit
:
3
,
loan_type
:
props
.
loanMode
!
,
loan_type
:
props
.
loanMode
!
,
offset
:
0
,
offset
:
0
,
product_status
:
eProductStatus
.
hot
,
}).
then
((
ret
)
=>
{
}).
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
skeLoading
.
value
=
false
;
skeLoading
.
value
=
false
;
ret
.
data
.
uuid
.
map
((
uuid
)
=>
{
ret
.
data
.
uuid
.
map
((
uuid
)
=>
{
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
const
{
rate_lower
,
max_amount
,
max_date
,
inst_name
,
product_name
,
product_status
}
=
const
{
ret
.
data
;
rate_lower
,
console
.
log
(
'status'
,
product_status
);
max_amount
,
max_date
,
inst_name
,
product_name
,
product_status
,
}
=
ret
.
data
;
if
(
product_status
==
3
){
state
.
hotProductList
.
push
({
state
.
hotProductList
.
push
({
rate_lower
,
rate_lower
,
max_amount
,
max_amount
,
...
@@ -72,15 +82,13 @@ const fetchList = () => {
...
@@ -72,15 +82,13 @@ const fetchList = () => {
inst_name
,
inst_name
,
product_name
,
product_name
,
uuid
,
uuid
,
product_status
product_status
,
});
});
}
});
});
});
});
}
}
});
});
console
.
log
(
'pro'
,
state
.
hotProductList
);
console
.
log
(
"pro"
,
state
.
hotProductList
);
};
};
</
script
>
</
script
>
...
...
src/service/LoanProductService/index.ts
View file @
994aab41
import
baseAxios
from
'../index'
import
baseAxios
from
'../index'
import
{
eLoanMode
}
from
'@/views/withMenu/Loan/types'
import
{
eLoanMode
}
from
'@/views/withMenu/Loan/types'
import
{
iLoanProdcutItem
}
from
"./type"
import
{
iLoanProdcutItem
,
eProductStatus
}
from
"./type"
const
prefix
=
'/loan/query'
const
prefix
=
'/loan/query'
export
function
queryLoanProductList
(
data
:
{
export
function
queryLoanProductList
(
data
:
{
limit
:
number
,
limit
:
number
,
loan_type
:
eLoanMode
loan_type
:
eLoanMode
,
product_status
:
eProductStatus
,
offset
:
number
offset
:
number
})
{
})
{
return
baseAxios
<
{
return
baseAxios
<
{
...
...
src/service/LoanProductService/type.ts
View file @
994aab41
...
@@ -10,7 +10,7 @@ export interface iLoanProdcutItem{
...
@@ -10,7 +10,7 @@ export interface iLoanProdcutItem{
min_amount
:
number
,
min_amount
:
number
,
min_date
:
number
,
min_date
:
number
,
product_name
:
string
,
product_name
:
string
,
product_status
:
number
,
product_status
:
eProductStatus
,
loan_type
:
number
,
loan_type
:
number
,
products
:
string
,
products
:
string
,
rate_lower
:
number
,
rate_lower
:
number
,
...
@@ -20,6 +20,14 @@ export interface iLoanProdcutItem{
...
@@ -20,6 +20,14 @@ export interface iLoanProdcutItem{
uuid
:
string
uuid
:
string
}
}
export
enum
eProductStatus
{
all
=
0
,
unpublished
=
1
,
normal
=
2
,
hot
=
3
,
published
=
4
}
export
enum
eGuaranteeType
{
export
enum
eGuaranteeType
{
credit
=
1
,
credit
=
1
,
mortgage
=
2
,
mortgage
=
2
,
...
...
src/views/withMenu/Home/index.vue
View file @
994aab41
...
@@ -81,6 +81,7 @@ import {
...
@@ -81,6 +81,7 @@ import {
}
from
"@/service/LoanProductService"
;
}
from
"@/service/LoanProductService"
;
import
{
number
}
from
"bitcoinjs-lib/types/script"
;
import
{
number
}
from
"bitcoinjs-lib/types/script"
;
import
{
Skeleton
}
from
"vant"
;
import
{
Skeleton
}
from
"vant"
;
import
{
eProductStatus
}
from
"@/service/LoanProductService/type"
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
...
@@ -186,6 +187,7 @@ export default defineComponent({
...
@@ -186,6 +187,7 @@ export default defineComponent({
limit
:
1
,
limit
:
1
,
offset
:
0
,
offset
:
0
,
loan_type
:
2
,
loan_type
:
2
,
product_status
:
eProductStatus
.
hot
});
});
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
this
.
skeLoading
=
false
;
this
.
skeLoading
=
false
;
...
...
src/views/withMenu/Loan/index.vue
View file @
994aab41
...
@@ -154,6 +154,7 @@ import {
...
@@ -154,6 +154,7 @@ import {
}
from
"@/service/LoanProductService"
;
}
from
"@/service/LoanProductService"
;
import
{
loanMode
}
from
"@/store/loanModeStore"
;
import
{
loanMode
}
from
"@/store/loanModeStore"
;
import
{
clearSearchResult
}
from
"@/store/loanSearchResultStore"
;
import
{
clearSearchResult
}
from
"@/store/loanSearchResultStore"
;
import
{
eProductStatus
}
from
"@/service/LoanProductService/type"
;
let
skeLoading
=
ref
(
false
);
let
skeLoading
=
ref
(
false
);
let
state
=
reactive
({
allProductList
:
[]
as
Array
<
simpleItemInfo
>
});
let
state
=
reactive
({
allProductList
:
[]
as
Array
<
simpleItemInfo
>
});
...
@@ -209,9 +210,10 @@ const fetchList = () => {
...
@@ -209,9 +210,10 @@ const fetchList = () => {
// 取前7贷款产品遍历
// 取前7贷款产品遍历
skeLoading
.
value
=
true
;
skeLoading
.
value
=
true
;
queryLoanProductList
({
queryLoanProductList
({
limit
:
8
,
limit
:
4
,
loan_type
:
mode
.
value
,
loan_type
:
mode
.
value
,
offset
:
0
,
offset
:
0
,
product_status
:
eProductStatus
.
normal
}).
then
((
ret
)
=>
{
}).
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
skeLoading
.
value
=
false
;
skeLoading
.
value
=
false
;
...
@@ -225,8 +227,6 @@ const fetchList = () => {
...
@@ -225,8 +227,6 @@ const fetchList = () => {
product_name
,
product_name
,
product_status
,
product_status
,
}
=
ret
.
data
;
}
=
ret
.
data
;
if
(
count
.
value
<
5
)
{
if
(
product_status
==
2
)
{
count
.
value
=
count
.
value
+
1
;
count
.
value
=
count
.
value
+
1
;
state
.
allProductList
.
push
({
state
.
allProductList
.
push
({
max_amount
,
max_amount
,
...
@@ -235,8 +235,6 @@ const fetchList = () => {
...
@@ -235,8 +235,6 @@ const fetchList = () => {
inst_name
,
inst_name
,
uuid
,
uuid
,
});
});
}
}
});
});
});
});
}
}
...
...
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