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
05097a01
Commit
05097a01
authored
Sep 24, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
贷款产品筛选
parent
f761e32a
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
328 additions
and
211 deletions
+328
-211
package-lock.json
package-lock.json
+17
-101
index.vue
src/components/Loan/LoanCard/index.vue
+5
-0
index.vue
src/components/Loan/LoanHotSwipe/index.vue
+13
-4
index.vue
src/components/PopUpContent/LoanFilter/index.vue
+10
-0
index.vue
src/components/SelectList/index.vue
+11
-4
index.ts
src/service/LoanProductService/index.ts
+37
-0
type.ts
src/service/LoanProductService/type.ts
+1
-1
index.vue
src/views/LoanDetail/components/LoanDetailDescribe/index.vue
+1
-5
index.vue
src/views/LoanList/index.vue
+161
-76
index.vue
src/views/withMenu/Home/index.vue
+54
-12
index.vue
src/views/withMenu/Loan/index.vue
+18
-8
No files found.
package-lock.json
View file @
05097a01
...
...
@@ -6103,15 +6103,9 @@
"integrity"
:
"sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
},
"fastq"
:
{
<<<<<<<
HEAD
"version"
:
"1.13.0"
,
"resolved"
:
"https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz"
,
"integrity"
:
"sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw=="
,
=======
"version"
:
"1.12.0"
,
"resolved"
:
"https://registry.nlark.com/fastq/download/fastq-1.12.0.tgz?cache=0&sync_timestamp=1629361026370&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffastq%2Fdownload%2Ffastq-1.12.0.tgz"
,
"integrity"
:
"sha1-7XtqtdYjk/ssxZHIU2UqXDGL95Q="
,
>>>>>>>
8
c
6e1
cb
12
fa
16334817e11
ca
6871
efb
8141
b
39
d
9
"resolved"
:
"https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz"
,
"integrity"
:
"sha1-YWdg+Ip1Jr38WWt8q4wYk4w2uYw="
,
"dev"
:
true
,
"requires"
:
{
"reusify"
:
"^1.0.4"
...
...
@@ -8629,6 +8623,12 @@
"resolved"
:
"https://registry.npmjs.org/nan/-/nan-2.15.0.tgz"
,
"integrity"
:
"sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
},
"nanocolors"
:
{
"version"
:
"0.1.12"
,
"resolved"
:
"https://registry.npmmirror.com/nanocolors/download/nanocolors-0.1.12.tgz?cache=0&sync_timestamp=1632383384131&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fnanocolors%2Fdownload%2Fnanocolors-0.1.12.tgz"
,
"integrity"
:
"sha1-hXdILFjL17W7FoHbTPSPEah/1fY="
,
"dev"
:
true
},
"nanoid"
:
{
"version"
:
"3.1.25"
,
"resolved"
:
"https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz"
,
...
...
@@ -9781,7 +9781,7 @@
"dependencies"
:
{
"postcss"
:
{
"version"
:
"6.0.23"
,
"resolved"
:
"https://registry.nlark.com/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=16
26882933935
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz"
,
"resolved"
:
"https://registry.nlark.com/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=16
32290182939
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz"
,
"integrity"
:
"sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -10716,18 +10716,18 @@
"dependencies"
:
{
"commander"
:
{
"version"
:
"6.2.1"
,
"resolved"
:
"https://registry.nlark.com/commander/download/commander-6.2.1.tgz
?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcommander%2Fdownload%2Fcommander-6.2.1.tgz
"
,
"resolved"
:
"https://registry.nlark.com/commander/download/commander-6.2.1.tgz"
,
"integrity"
:
"sha1-B5LraC37wyWZm7K4T93duhEKxzw="
,
"dev"
:
true
},
"postcss"
:
{
"version"
:
"8.3.
6
"
,
"resolved"
:
"https://registry.nlark.com/postcss/download/postcss-8.3.
6.tgz?cache=0&sync_timestamp=1626882933935&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss%2Fdownload%2Fpostcss-8.3.6
.tgz"
,
"integrity"
:
"sha1-
JzDddql5afN/U7mmCWGXvjEcxO
o="
,
"version"
:
"8.3.
7
"
,
"resolved"
:
"https://registry.nlark.com/postcss/download/postcss-8.3.
7.tgz?cache=0&sync_timestamp=1632290182939&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss%2Fdownload%2Fpostcss-8.3.7
.tgz"
,
"integrity"
:
"sha1-
7IhWNYjI2o5Y5yJvdjO1GuIh7t
o="
,
"dev"
:
true
,
"requires"
:
{
"
colorette"
:
"^1.2.2
"
,
"nanoid"
:
"^3.1.2
3
"
,
"
nanocolors"
:
"^0.1.5
"
,
"nanoid"
:
"^3.1.2
5
"
,
"source-map-js"
:
"^0.6.2"
}
}
...
...
@@ -12548,8 +12548,8 @@
},
"tailwindcss"
:
{
"version"
:
"npm:@tailwindcss/postcss7-compat@2.2.14"
,
"resolved"
:
"https://registry.n
pmjs.org/@tailwindcss/postcss7-compat/-
/postcss7-compat-2.2.14.tgz"
,
"integrity"
:
"sha
512-vtzYILqywIY1GWELwHVF7goPhaJpm/1P5kJZ0Kx8lNlarALTFEWwIWCM6MxQ7pXzDWa1eUeozVJVeqfOBXKwXg=
="
,
"resolved"
:
"https://registry.n
lark.com/@tailwindcss/postcss7-compat/download/@tailwindcss
/postcss7-compat-2.2.14.tgz"
,
"integrity"
:
"sha
1-vdgtdcvGtZZRnyvVTBBHphXgY2Y
="
,
"dev"
:
true
,
"requires"
:
{
"arg"
:
"^5.0.1"
,
...
...
@@ -13805,90 +13805,6 @@
}
}
},
<<<<<<<
HEAD
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.7.0"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.7.0.tgz"
,
"integrity"
:
"sha512-43I0grWtwSCE8fiH/hAwFK+6sNlmvDuHhXScYH8HVSVAMS81IM66tgUOcxbPCeqhhz/1BE51YPxX59eZKGallQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
=======
>>>>>>>
8
c
6e1
cb
12
fa
16334817e11
ca
6871
efb
8141
b
39
d
9
"vue-router"
:
{
"version"
:
"4.0.11"
,
"resolved"
:
"https://registry.npmjs.org/vue-router/-/vue-router-4.0.11.tgz"
,
...
...
src/components/Loan/LoanCard/index.vue
View file @
05097a01
...
...
@@ -17,6 +17,7 @@
</
template
>
<
script
lang=
"ts"
setup
>
import
Icon
from
"@/components/common/Icon.vue"
;
import
{
eLoanMode
}
from
"@/views/withMenu/Loan/types"
;
const
props
=
defineProps
({
max_amount
:{
...
...
@@ -35,6 +36,10 @@ const props = defineProps({
type
:
String
,
required
:
true
},
loanMode
:
{
type
:
Number
as
PropType
<
eLoanMode
>
,
requried
:
true
,
},
})
</
script
>
<
style
scoped
>
...
...
src/components/Loan/LoanHotSwipe/index.vue
View file @
05097a01
...
...
@@ -23,7 +23,7 @@ import {
queryLoanProductList
,
queryLoanProductInfo
,
}
from
"@/service/LoanProductService"
;
import
{
onMounted
,
PropType
,
reactive
}
from
"@vue/runtime-core"
;
import
{
onMounted
,
PropType
,
reactive
,
watch
}
from
"@vue/runtime-core"
;
import
{
eLoanMode
}
from
"@/views/withMenu/Loan/types"
;
import
{
hotProduct
}
from
"./type"
;
...
...
@@ -31,16 +31,25 @@ const props = defineProps({
loanMode
:
{
type
:
Number
as
PropType
<
eLoanMode
>
,
requried
:
true
,
default
:
eLoanMode
.
personal
,
},
});
let
hotProductList
:
Array
<
hotProduct
>
=
reactive
([]);
watch
(
props
,(
newV
,
oldV
)
=>
{
console
.
log
(
props
.
loanMode
);
hotProductList
=
[]
fetchList
()
})
onMounted
(()
=>
{
fetchList
()
});
const
fetchList
=
()
=>
{
queryLoanProductList
({
limit
:
3
,
loan_type
:
props
.
loanMode
,
loan_type
:
props
.
loanMode
!
,
offset
:
0
,
}).
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
...
...
@@ -60,7 +69,7 @@ onMounted(() => {
});
}
});
}
);
}
</
script
>
<
style
lang=
"less"
scoped
>
...
...
src/components/PopUpContent/LoanFilter/index.vue
View file @
05097a01
...
...
@@ -65,6 +65,13 @@
</div>
</div>
</div>
<div
class=
"group-title mt-8"
>
类型
</div>
<SelectList
class=
"mt-5"
:list=
"typeList"
:selecteds=
"selectedTypes"
:setSelecteds=
"setSelectedTypes"
/>
<div
class=
"group-title mt-8"
>
期限
</div>
<SelectList
class=
"mt-5"
...
...
@@ -89,6 +96,9 @@ export default defineComponent({
peridList
:
Array
,
selectedPerids
:
Array
,
setSelectedPerids
:
Function
,
typeList
:
Array
,
selectedTypes
:
Array
,
setSelectedTypes
:
Function
,
min
:
[
Number
,
String
],
max
:
[
Number
,
String
],
setMin
:
{
...
...
src/components/SelectList/index.vue
View file @
05097a01
...
...
@@ -19,13 +19,21 @@ export default defineComponent({
props
:
[
"list"
,
"selecteds"
,
"setSelecteds"
],
components
:
{
SelectItem
},
methods
:
{
clickItem
(
id
:
any
)
{
// clickItem(id: any) {
// if (this.selecteds.includes(id)) {
// this.setSelecteds(this.selecteds.filter((i: any) => i !== id));
// } else {
// this.setSelecteds([...this.selecteds, id]);
// }
// },
// 单选
clickItem
(
id
:
any
){
if
(
this
.
selecteds
.
includes
(
id
))
{
this
.
setSelecteds
(
this
.
selecteds
.
filter
((
i
:
any
)
=>
i
!==
id
));
}
else
{
this
.
setSelecteds
([...
this
.
selecteds
,
id
]);
this
.
setSelecteds
([
id
]);
}
}
},
},
});
</
script
>
\ No newline at end of file
src/service/LoanProductService/index.ts
View file @
05097a01
...
...
@@ -25,3 +25,40 @@ export function queryLoanProductInfo(data: { uuid: string }) {
params
:
data
})
}
export
function
queryBankList
()
{
return
baseAxios
<
{
item
:{
code
:
number
,
name
:
string
}[]
}
>
({
url
:
'/query/banks'
,
method
:
'GET'
,
})
}
export
function
queryDirectLoanReq
(
data
:
{
min_date
:
number
max_date
:
number
bank_code
:
number
rate_upper
:
number
rate_lower
:
number
min_amount
:
number
max_amount
:
number
loan_type
:
number
product_status
:
number
})
{
return
baseAxios
<
{
count
:
number
items
:
iLoanProdcutItem
[]
total
:
number
}
>
({
url
:
'/loan/query/direct/list'
,
method
:
'POST'
,
data
,
})
}
src/service/LoanProductService/type.ts
View file @
05097a01
...
...
@@ -11,7 +11,7 @@ export interface iLoanProdcutItem{
min_date
:
number
,
product_name
:
string
,
product_status
:
number
,
product
_type
:
number
,
loan
_type
:
number
,
products
:
string
,
rate_lower
:
number
,
rate_upper
:
number
,
...
...
src/views/LoanDetail/components/LoanDetailDescribe/index.vue
View file @
05097a01
...
...
@@ -41,7 +41,7 @@
<div
class=
"ml-3"
>
<div
class=
"title"
>
提交条件
</div>
<div
class=
"content whitespace-pre-wrap mt-2.5"
>
{{
submit_cond
.
value
}}
{{
submit_cond
}}
</div>
</div>
</div>
...
...
@@ -74,10 +74,6 @@ const props = defineProps({
},
})
onMounted
(()
=>
{
console
.
log
(
props
.
products
);
})
</
script
>
<
style
lang=
"less"
scoped
>
.describe {
...
...
src/views/LoanList/index.vue
View file @
05097a01
...
...
@@ -18,7 +18,7 @@
@
load=
"onLoad"
>
<LoanCard
v-for=
"item in
loanProductL
ist"
v-for=
"item in
state.l
ist"
:key=
"item.value"
:max_amount=
"item.max_amount"
:product_name=
"item.product_name"
...
...
@@ -45,6 +45,9 @@
:peridList=
"peridList"
:selectedPerids=
"selectedPerids"
:setSelectedPerids=
"(v) => (selectedPerids = v)"
:typeList=
"typeList"
:selectedTypes=
"selectedTypes"
:setSelectedTypes=
"(v) => (selectedTypes = v)"
:min=
"min"
:max=
"max"
:setMin=
"(v) => (min = v)"
...
...
@@ -58,32 +61,50 @@
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
computed
,
onMounted
,
ref
,
Ref
}
from
"vue"
;
<
script
lang=
"ts"
>
import
NavBar
from
"@/components/NavBar/index.vue"
;
import
GroupTitle
from
"@/components/GroupTitle/index.vue"
;
import
PopUp
from
"@/components/PopUp/index.vue"
;
import
LoanFilter
from
"@/components/PopUpContent/LoanFilter/index.vue"
;
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
{
defineComponent
,
ref
,
computed
,
onMounted
,
reactive
}
from
"vue"
;
import
{
queryDirectLoanReq
}
from
"@/service/LoanProductService/index"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
queryLoanProductList
,
queryLoanProductInfo
,
queryBankList
,
}
from
"@/service/LoanProductService/index"
;
import
{
List
,
Cell
,
PullRefresh
}
from
"vant"
;
import
{
simpleItemInfo
}
from
"@/views/withMenu/Loan/types"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
import
{
eLoanMode
}
from
"@/views/withMenu/Loan/types"
;
import
{
iLoanProdcutItem
}
from
"@/service/LoanProductService/type"
;
const
mode
=
ref
(
+
useRoute
().
params
.
mode
);
export
default
defineComponent
({
components
:
{
PopUp
,
NavBar
,
GroupTitle
,
LoanCard
,
LoanFilter
,
},
setup
()
{
const
mode
=
ref
(
+
useRoute
().
params
.
mode
);
onMounted
(()
=>
{
onMounted
(()
=>
{
fetchList
();
});
fetchBanks
();
});
const
current
=
ref
(
1
);
const
LIST_SIZE
:
number
=
6
;
const
offset
=
ref
(
0
);
const
loading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
total
=
ref
(
0
);
const
loanProductList
:
Ref
<
simpleItemInfo
[]
>
=
ref
([]);
const
current
=
ref
(
1
);
const
LIST_SIZE
:
number
=
7
;
const
offset
=
ref
(
0
);
const
loading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
total
=
ref
(
0
);
let
state
=
reactive
({
list
:
[]
as
simpleItemInfo
[]
});
const
onLoad
=
()
=>
{
const
onLoad
=
()
=>
{
current
.
value
++
;
offset
.
value
=
(
current
.
value
-
1
)
*
LIST_SIZE
;
if
(
offset
.
value
>=
total
.
value
)
{
...
...
@@ -93,22 +114,27 @@ const onLoad = () => {
finished
.
value
=
false
;
fetchList
();
}
};
};
const
fetchList
=
()
=>
{
const
bankList
=
computed
(()
=>
{
return
banks
;
});
let
banks
:
Array
<
{
id
:
number
;
name
:
String
}
>
=
reactive
([]);
const
fetchList
=
()
=>
{
queryLoanProductList
({
limit
:
LIST_SIZE
,
offset
:
offset
.
value
,
loan_type
:
mode
.
value
,
}).
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
loading
.
value
=
false
;
total
.
value
=
ret
.
data
.
total
;
ret
.
data
.
uuid
.
map
((
uuid
)
=>
{
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
const
{
max_amount
,
inst_name
,
uuid
,
features
,
product_name
}
=
ret
.
data
;
loanProductList
.
value
.
push
({
state
.
list
.
push
({
max_amount
,
product_name
,
features
,
...
...
@@ -119,74 +145,71 @@ const fetchList = () => {
});
}
});
}
;
</
script
>
loading
.
value
=
false
;
};
<
script
lang=
"ts"
>
import
NavBar
from
"@/components/NavBar/index.vue"
;
import
GroupTitle
from
"@/components/GroupTitle/index.vue"
;
import
PopUp
from
"@/components/PopUp/index.vue"
;
import
LoanFilter
from
"@/components/PopUpContent/LoanFilter/index.vue"
;
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
{
defineComponent
}
from
"vue"
;
export
default
defineComponent
({
components
:
{
PopUp
,
NavBar
,
GroupTitl
e
,
LoanCard
,
LoanFilter
,
const
fetchBanks
=
()
=>
{
queryBankList
().
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
ret
.
data
.
item
.
map
((
item
)
=>
{
banks
.
push
({
id
:
item
.
code
,
name
:
item
.
name
})
;
})
;
}
});
};
return
{
mode
,
stat
e
,
bankList
,
};
},
data
()
{
return
{
show
:
false
,
bankList
:
[
{
name
:
"zhongguo"
,
id
:
1
,
},
{
name
:
"df"
,
id
:
12
,
},
{
name
:
"43"
,
id
:
13
,
},
{
name
:
"zhongg3456uo"
,
id
:
14
,
},
{
name
:
"zhong345guo"
,
id
:
15
,
},
],
selectedBanks
:
[],
peridList
:
[
{
id
:
1
,
name
:
"lsdkfj"
},
{
id
:
12
,
name
:
"lsdkfj"
},
{
id
:
31
,
name
:
"lsdkfj"
},
{
id
:
14
,
name
:
"lsdkfj"
},
{
id
:
15
,
name
:
"lsdkfj"
},
{
id
:
{
min_date
:
0
,
max_date
:
3
},
name
:
"三个月内"
},
{
id
:
{
min_date
:
3
,
max_date
:
6
},
name
:
"3-6个月"
},
{
id
:
{
min_date
:
6
,
max_date
:
12
},
name
:
"6-12个月"
},
],
typeList
:
[
{
id
:
{
guarantee_type
:
1
},
name
:
"信用"
},
{
id
:
{
guarantee_type
:
2
},
name
:
"抵押"
},
{
id
:
{
guarantee_type
:
3
},
name
:
"保证"
},
{
id
:
{
guarantee_type
:
4
},
name
:
"信用"
},
{
id
:
{
guarantee_type
:
5
},
name
:
"抵押"
},
{
id
:
{
guarantee_type
:
6
},
name
:
"保证"
},
],
selectedPerids
:
[],
min
:
undefined
,
max
:
undefined
,
min2
:
undefined
,
max2
:
undefined
,
selectedBanks
:
[]
as
Array
<
number
>
,
selectedPerids
:
[]
as
Array
<
any
>
,
selectedTypes
:
[]
as
Array
<
number
>
,
min
:
undefined
as
undefined
|
number
,
max
:
undefined
as
undefined
|
number
,
min2
:
undefined
as
undefined
|
number
,
max2
:
undefined
as
undefined
|
number
,
reqParams
:
{
selectedBanks
:
[],
selectedPerids
:
[],
min
:
undefined
,
max
:
undefined
,
min2
:
undefined
,
max2
:
undefined
,
selectedBanks
:
[]
as
Array
<
number
>
,
selectedPerids
:
[]
as
Array
<
any
>
,
selectedTypes
:
[]
as
Array
<
number
>
,
min
:
undefined
as
undefined
|
number
,
max
:
undefined
as
undefined
|
number
,
min2
:
undefined
as
undefined
|
number
,
max2
:
undefined
as
undefined
|
number
,
},
list
:
[]
as
Array
<
iLoanProdcutItem
>
,
};
},
watch
:
{
loanProductList
:
{
handler
(
val
,
oldVal
)
{
console
.
log
(
"changed"
);
},
deep
:
true
,
},
},
methods
:
{
setShow
(
v
:
boolean
)
{
this
.
show
=
v
;
...
...
@@ -195,6 +218,7 @@ export default defineComponent({
this
.
show
=
true
;
this
.
selectedBanks
=
this
.
reqParams
.
selectedBanks
;
this
.
selectedPerids
=
this
.
reqParams
.
selectedPerids
;
this
.
selectedTypes
=
this
.
reqParams
.
selectedTypes
;
this
.
max
=
this
.
reqParams
.
max
;
this
.
min
=
this
.
reqParams
.
min
;
this
.
max2
=
this
.
reqParams
.
max2
;
...
...
@@ -208,18 +232,79 @@ export default defineComponent({
this
.
min2
=
undefined
;
this
.
max2
=
undefined
;
},
// 多选确认
// clickConfirm() {
// this.reqParams = {
// ...this.reqParams,
// selectedBanks: this.selectedBanks,
// selectedPerids: this.selectedPerids,
// min: this.min,
// max: this.max,
// min2: this.min2,
// max2: this.max2,
// };
// this.show = false;
// },
// 单选确认
clickConfirm
()
{
this
.
reqParams
=
{
...
this
.
reqParams
,
selectedBanks
:
this
.
selectedBanks
,
selectedPerids
:
this
.
selectedPerids
,
selectedTypes
:
this
.
selectedTypes
,
min
:
this
.
min
,
max
:
this
.
max
,
min2
:
this
.
min2
,
max2
:
this
.
max2
,
};
this
.
queryList
();
this
.
show
=
false
;
},
queryList
()
{
queryDirectLoanReq
({
rate_lower
:
this
.
reqParams
.
min
!
,
rate_upper
:
this
.
reqParams
.
max
!
,
min_amount
:
this
.
reqParams
.
min2
!
,
max_amount
:
this
.
reqParams
.
max2
!
,
bank_code
:
this
.
reqParams
.
selectedBanks
[
0
],
max_date
:
this
.
reqParams
.
selectedPerids
[
0
]
?
this
.
reqParams
.
selectedPerids
[
0
].
max_date
:
undefined
,
min_date
:
this
.
reqParams
.
selectedPerids
[
0
]
?
this
.
reqParams
.
selectedPerids
[
0
].
min_date
:
undefined
,
loan_type
:
this
.
mode
,
product_status
:
2
,
}).
then
((
ret
)
=>
{
if
(
ret
.
code
==
200
)
{
this
.
state
.
list
=
[];
const
list
=
ret
.
data
.
items
.
map
((
item
)
=>
{
const
{
max_amount
,
inst_name
,
uuid
,
features
,
product_name
}
=
item
;
console
.
log
(
item
);
// this.loanProductList.push({
// max_amount,
// product_name,
// features,
// inst_name,
// uuid,
// });
return
{
max_amount
,
product_name
,
features
,
inst_name
,
uuid
,
}
});
this
.
state
.
list
=
list
}
console
.
log
(
this
.
state
.
list
);
});
},
},
});
</
script
>
...
...
src/views/withMenu/Home/index.vue
View file @
05097a01
...
...
@@ -13,13 +13,22 @@
title=
"热门贷款"
@
click=
"$router.push(
{ name: 'Loan' })"
/>
<LoanCard
class=
"mt-5"
/>
<LoanCard
:max_amount=
"max_amount"
:product_name=
"product_name"
:features=
"features"
:inst_name=
"inst_name"
class=
"mt-5"
@
click=
"
$router.push(
{ name: 'LoanDetail', params: { uuid: uuid } })
"
/>
<group-title
class=
"mt-7"
title=
"精彩直播"
/>
<LiveCard
class=
"mt-4"
/>
<group-title
class=
"mt-7"
title=
"精彩活动"
@
click=
"
$router.push(
{name: 'ActivityList'
})"
@
click=
"
$router.push(
{ name: 'ActivityList'
})"
/>
<img
class=
"mx-5 mt-5"
...
...
@@ -32,7 +41,11 @@
})
"
/>
<group-title
class=
"mt-7"
title=
"热门资讯"
@
click=
"$router.push('News')"
/>
<group-title
class=
"mt-7"
title=
"热门资讯"
@
click=
"$router.push('News')"
/>
<HotNews
v-for=
"n in hotNews"
:key=
"n.uuid"
:info=
"n"
/>
</div>
</div>
...
...
@@ -50,12 +63,16 @@ import FnsCard from "./FnsCard/index.vue";
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
LiveCard
from
"@/components/LiveCard/index.vue"
;
import
HotNews
from
"@/components/HotNews/index.vue"
;
import
{
getNewsList
}
from
'@/service/NewsService/index'
import
{
getNewsList
}
from
"@/service/NewsService/index"
;
import
{
queryBannerList
}
from
"@/service/BannerService"
;
import
{
getImageSrcFromFileHash
}
from
"@/service/FileService"
;
import
{
queryNotifyList
}
from
"@/service/NotifyService"
;
import
{
queryActivityList
}
from
"@/service/ActivityService"
;
import
{
queryLoanProductList
,
queryLoanProductInfo
,
}
from
"@/service/LoanProductService"
;
import
{
number
}
from
"bitcoinjs-lib/types/script"
;
export
default
defineComponent
({
components
:
{
Banner
,
...
...
@@ -96,23 +113,28 @@ export default defineComponent({
constants
:
{},
hotNews
:
[],
src
:
""
,
uuid
:
""
,
uuid
:
""
,
max_amount
:
0
,
product_name
:
""
,
features
:
""
,
inst_name
:
""
,
};
},
mounted
()
{
this
.
getHotNews
()
this
.
getHotNews
()
;
this
.
fetchBannerList
();
this
.
fetchNotifyList
();
this
.
fetchActivityList
();
this
.
fetchLoanProductList
();
},
methods
:
{
getHotNews
()
{
getNewsList
({
limit
:
2
,
offset
:
0
}).
then
(
res
=>
{
this
.
hotNews
=
res
.
data
.
items
})
offset
:
0
,
}).
then
(
(
res
)
=>
{
this
.
hotNews
=
res
.
data
.
items
;
})
;
},
async
fetchBannerList
()
{
const
ret
=
await
queryBannerList
({
location
:
"1"
});
...
...
@@ -134,7 +156,27 @@ export default defineComponent({
const
ret
=
await
queryActivityList
({
limit
:
1
,
offset
:
0
});
if
(
ret
.
code
===
200
)
{
this
.
src
=
getImageSrcFromFileHash
(
ret
.
data
.
items
[
0
]?.
file_name
);
this
.
uuid
=
ret
.
data
.
items
[
0
]?.
uuid
this
.
uuid
=
ret
.
data
.
items
[
0
]?.
uuid
;
}
},
async
fetchLoanProductList
()
{
// 默认查询个人贷款的第一个贷款产品
const
ret
=
await
queryLoanProductList
({
limit
:
1
,
offset
:
0
,
loan_type
:
2
,
});
if
(
ret
.
code
===
200
)
{
this
.
uuid
=
ret
.
data
.
uuid
[
0
];
const
uuid
=
this
.
uuid
;
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
this
.
max_amount
=
ret
.
data
.
max_amount
;
this
.
inst_name
=
ret
.
data
.
inst_name
;
this
.
product_name
=
ret
.
data
.
product_name
;
this
.
features
=
ret
.
data
.
features
;
}
});
}
},
},
...
...
src/views/withMenu/Loan/index.vue
View file @
05097a01
...
...
@@ -61,10 +61,10 @@
</div>
<!-- 热门贷款 -->
<GroupTitle
title=
"热门贷款"
class=
"mt-2.5"
iconName=
""
/>
<LoanHotSwipe
class=
"mt-5"
/>
<LoanHotSwipe
:loanMode=
"mode"
class=
"mt-5"
/>
<GroupTitle
title=
"贷款精选"
@
seeMore=
"$router.push(
{ name: 'LoanList',
params:{mode:mode
} })"
@
seeMore=
"$router.push(
{ name: 'LoanList',
params: { mode: mode
} })"
/>
<LoanCard
v-for=
"item in allProductList"
...
...
@@ -73,7 +73,10 @@
:product_name=
"item.product_name"
:features=
"item.features"
:inst_name=
"item.inst_name"
@
click=
"$router.push(
{ name: 'LoanDetail', params: { uuid: item.uuid }})"
:loanMode=
"mode"
@
click=
"
$router.push(
{ name: 'LoanDetail', params: { uuid: item.uuid } })
"
class="mt-2.5"
/>
<!-- 贷款资讯 -->
...
...
@@ -83,7 +86,7 @@
class=
"mt-2.5"
iconName=
""
/>
<
HotNews
v-for=
"n in 2"
:key=
"n"
/
>
<
!--
<HotNews
v-for=
"n in 2"
:key=
"n"
/>
--
>
</div>
</div>
</
template
>
...
...
@@ -95,7 +98,7 @@ import LoanHotSwipe from "@/components/Loan/LoanHotSwipe/index.vue";
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
GroupTitle
from
"@/components/GroupTitle/index.vue"
;
import
HotNews
from
"@/components/HotNews/index.vue"
;
import
{
onMounted
,
PropType
,
reactive
}
from
"@vue/runtime-core"
;
import
{
onMounted
,
PropType
,
reactive
,
watch
}
from
"@vue/runtime-core"
;
import
{
simpleItemInfo
}
from
"./types"
;
import
{
...
...
@@ -103,13 +106,18 @@ import {
queryLoanProductInfo
,
}
from
"@/service/LoanProductService"
;
const
mode
=
ref
(
eLoanMode
.
personal
);
const
mode
=
ref
(
eLoanMode
.
personal
);
const
setMode
=
(
v
:
eLoanMode
)
=>
{
mode
.
value
=
v
;
};
let
allProductList
:
Array
<
simpleItemInfo
>
=
reactive
([]);
onMounted
(()
=>
{
watch
(
mode
,
()
=>
{
allProductList
=
[]
fetchList
()
});
const
fetchList
=
()
=>
{
queryLoanProductList
({
limit
:
5
,
loan_type
:
mode
.
value
,
...
...
@@ -130,8 +138,10 @@ onMounted(() => {
});
});
}
console
.
log
(
allProductList
);
});
};
onMounted
(()
=>
{
fetchList
()
});
</
script
>
<
style
lang=
"less"
scoped
>
...
...
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