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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
359 additions
and
240 deletions
+359
-240
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
+14
-5
index.vue
src/components/PopUpContent/LoanFilter/index.vue
+10
-0
index.vue
src/components/SelectList/index.vue
+12
-3
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
+190
-105
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 @@
...
@@ -6103,15 +6103,9 @@
"integrity"
:
"sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
"integrity"
:
"sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
},
},
"fastq"
:
{
"fastq"
:
{
<<<<<<<
HEAD
"version"
:
"1.13.0"
,
"version"
:
"1.13.0"
,
"resolved"
:
"https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz"
,
"integrity"
:
"sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw=="
,
"integrity"
:
"sha1-YWdg+Ip1Jr38WWt8q4wYk4w2uYw="
,
=======
"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
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"reusify"
:
"^1.0.4"
"reusify"
:
"^1.0.4"
...
@@ -8629,6 +8623,12 @@
...
@@ -8629,6 +8623,12 @@
"resolved"
:
"https://registry.npmjs.org/nan/-/nan-2.15.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/nan/-/nan-2.15.0.tgz"
,
"integrity"
:
"sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
"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"
:
{
"nanoid"
:
{
"version"
:
"3.1.25"
,
"version"
:
"3.1.25"
,
"resolved"
:
"https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz"
,
"resolved"
:
"https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz"
,
...
@@ -9781,7 +9781,7 @@
...
@@ -9781,7 +9781,7 @@
"dependencies"
:
{
"dependencies"
:
{
"postcss"
:
{
"postcss"
:
{
"version"
:
"6.0.23"
,
"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="
,
"integrity"
:
"sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
...
@@ -10716,18 +10716,18 @@
...
@@ -10716,18 +10716,18 @@
"dependencies"
:
{
"dependencies"
:
{
"commander"
:
{
"commander"
:
{
"version"
:
"6.2.1"
,
"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="
,
"integrity"
:
"sha1-B5LraC37wyWZm7K4T93duhEKxzw="
,
"dev"
:
true
"dev"
:
true
},
},
"postcss"
:
{
"postcss"
:
{
"version"
:
"8.3.
6
"
,
"version"
:
"8.3.
7
"
,
"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"
,
"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-
JzDddql5afN/U7mmCWGXvjEcxO
o="
,
"integrity"
:
"sha1-
7IhWNYjI2o5Y5yJvdjO1GuIh7t
o="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"
colorette"
:
"^1.2.2
"
,
"
nanocolors"
:
"^0.1.5
"
,
"nanoid"
:
"^3.1.2
3
"
,
"nanoid"
:
"^3.1.2
5
"
,
"source-map-js"
:
"^0.6.2"
"source-map-js"
:
"^0.6.2"
}
}
}
}
...
@@ -12548,8 +12548,8 @@
...
@@ -12548,8 +12548,8 @@
},
},
"tailwindcss"
:
{
"tailwindcss"
:
{
"version"
:
"npm:@tailwindcss/postcss7-compat@2.2.14"
,
"version"
:
"npm:@tailwindcss/postcss7-compat@2.2.14"
,
"resolved"
:
"https://registry.n
pmjs.org/@tailwindcss/postcss7-compat/-
/postcss7-compat-2.2.14.tgz"
,
"resolved"
:
"https://registry.n
lark.com/@tailwindcss/postcss7-compat/download/@tailwindcss
/postcss7-compat-2.2.14.tgz"
,
"integrity"
:
"sha
512-vtzYILqywIY1GWELwHVF7goPhaJpm/1P5kJZ0Kx8lNlarALTFEWwIWCM6MxQ7pXzDWa1eUeozVJVeqfOBXKwXg=
="
,
"integrity"
:
"sha
1-vdgtdcvGtZZRnyvVTBBHphXgY2Y
="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"arg"
:
"^5.0.1"
,
"arg"
:
"^5.0.1"
,
...
@@ -13805,90 +13805,6 @@
...
@@ -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"
:
{
"vue-router"
:
{
"version"
:
"4.0.11"
,
"version"
:
"4.0.11"
,
"resolved"
:
"https://registry.npmjs.org/vue-router/-/vue-router-4.0.11.tgz"
,
"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 @@
...
@@ -17,6 +17,7 @@
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
Icon
from
"@/components/common/Icon.vue"
;
import
Icon
from
"@/components/common/Icon.vue"
;
import
{
eLoanMode
}
from
"@/views/withMenu/Loan/types"
;
const
props
=
defineProps
({
const
props
=
defineProps
({
max_amount
:{
max_amount
:{
...
@@ -35,6 +36,10 @@ const props = defineProps({
...
@@ -35,6 +36,10 @@ const props = defineProps({
type
:
String
,
type
:
String
,
required
:
true
required
:
true
},
},
loanMode
:
{
type
:
Number
as
PropType
<
eLoanMode
>
,
requried
:
true
,
},
})
})
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/components/Loan/LoanHotSwipe/index.vue
View file @
05097a01
...
@@ -23,7 +23,7 @@ import {
...
@@ -23,7 +23,7 @@ import {
queryLoanProductList
,
queryLoanProductList
,
queryLoanProductInfo
,
queryLoanProductInfo
,
}
from
"@/service/LoanProductService"
;
}
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
{
eLoanMode
}
from
"@/views/withMenu/Loan/types"
;
import
{
hotProduct
}
from
"./type"
;
import
{
hotProduct
}
from
"./type"
;
...
@@ -31,16 +31,25 @@ const props = defineProps({
...
@@ -31,16 +31,25 @@ const props = defineProps({
loanMode
:
{
loanMode
:
{
type
:
Number
as
PropType
<
eLoanMode
>
,
type
:
Number
as
PropType
<
eLoanMode
>
,
requried
:
true
,
requried
:
true
,
default
:
eLoanMode
.
personal
,
},
},
});
});
let
hotProductList
:
Array
<
hotProduct
>
=
reactive
([]);
let
hotProductList
:
Array
<
hotProduct
>
=
reactive
([]);
watch
(
props
,(
newV
,
oldV
)
=>
{
console
.
log
(
props
.
loanMode
);
hotProductList
=
[]
fetchList
()
})
onMounted
(()
=>
{
onMounted
(()
=>
{
queryLoanProductList
({
fetchList
()
});
const
fetchList
=
()
=>
{
queryLoanProductList
({
limit
:
3
,
limit
:
3
,
loan_type
:
props
.
loanMode
,
loan_type
:
props
.
loanMode
!
,
offset
:
0
,
offset
:
0
,
}).
then
((
ret
)
=>
{
}).
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
...
@@ -60,7 +69,7 @@ onMounted(() => {
...
@@ -60,7 +69,7 @@ onMounted(() => {
});
});
}
}
});
});
}
);
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
src/components/PopUpContent/LoanFilter/index.vue
View file @
05097a01
...
@@ -65,6 +65,13 @@
...
@@ -65,6 +65,13 @@
</div>
</div>
</div>
</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>
<div
class=
"group-title mt-8"
>
期限
</div>
<SelectList
<SelectList
class=
"mt-5"
class=
"mt-5"
...
@@ -89,6 +96,9 @@ export default defineComponent({
...
@@ -89,6 +96,9 @@ export default defineComponent({
peridList
:
Array
,
peridList
:
Array
,
selectedPerids
:
Array
,
selectedPerids
:
Array
,
setSelectedPerids
:
Function
,
setSelectedPerids
:
Function
,
typeList
:
Array
,
selectedTypes
:
Array
,
setSelectedTypes
:
Function
,
min
:
[
Number
,
String
],
min
:
[
Number
,
String
],
max
:
[
Number
,
String
],
max
:
[
Number
,
String
],
setMin
:
{
setMin
:
{
...
...
src/components/SelectList/index.vue
View file @
05097a01
...
@@ -19,13 +19,21 @@ export default defineComponent({
...
@@ -19,13 +19,21 @@ export default defineComponent({
props
:
[
"list"
,
"selecteds"
,
"setSelecteds"
],
props
:
[
"list"
,
"selecteds"
,
"setSelecteds"
],
components
:
{
SelectItem
},
components
:
{
SelectItem
},
methods
:
{
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
))
{
if
(
this
.
selecteds
.
includes
(
id
))
{
this
.
setSelecteds
(
this
.
selecteds
.
filter
((
i
:
any
)
=>
i
!==
id
));
this
.
setSelecteds
(
this
.
selecteds
.
filter
((
i
:
any
)
=>
i
!==
id
));
}
else
{
}
else
{
this
.
setSelecteds
([
...
this
.
selecteds
,
id
]);
this
.
setSelecteds
([
id
]);
}
}
}
,
}
},
},
});
});
</
script
>
</
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 }) {
...
@@ -25,3 +25,40 @@ export function queryLoanProductInfo(data: { uuid: string }) {
params
:
data
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{
...
@@ -11,7 +11,7 @@ export interface iLoanProdcutItem{
min_date
:
number
,
min_date
:
number
,
product_name
:
string
,
product_name
:
string
,
product_status
:
number
,
product_status
:
number
,
product
_type
:
number
,
loan
_type
:
number
,
products
:
string
,
products
:
string
,
rate_lower
:
number
,
rate_lower
:
number
,
rate_upper
:
number
,
rate_upper
:
number
,
...
...
src/views/LoanDetail/components/LoanDetailDescribe/index.vue
View file @
05097a01
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<div
class=
"ml-3"
>
<div
class=
"ml-3"
>
<div
class=
"title"
>
提交条件
</div>
<div
class=
"title"
>
提交条件
</div>
<div
class=
"content whitespace-pre-wrap mt-2.5"
>
<div
class=
"content whitespace-pre-wrap mt-2.5"
>
{{
submit_cond
.
value
}}
{{
submit_cond
}}
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -74,10 +74,6 @@ const props = defineProps({
...
@@ -74,10 +74,6 @@ const props = defineProps({
},
},
})
})
onMounted
(()
=>
{
console
.
log
(
props
.
products
);
})
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.describe {
.describe {
...
...
src/views/LoanList/index.vue
View file @
05097a01
This diff is collapsed.
Click to expand it.
src/views/withMenu/Home/index.vue
View file @
05097a01
...
@@ -13,13 +13,22 @@
...
@@ -13,13 +13,22 @@
title=
"热门贷款"
title=
"热门贷款"
@
click=
"$router.push(
{ name: 'Loan' })"
@
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=
"精彩直播"
/>
<group-title
class=
"mt-7"
title=
"精彩直播"
/>
<LiveCard
class=
"mt-4"
/>
<LiveCard
class=
"mt-4"
/>
<group-title
<group-title
class=
"mt-7"
class=
"mt-7"
title=
"精彩活动"
title=
"精彩活动"
@
click=
"
$router.push(
{name: 'ActivityList'
})"
@
click=
"
$router.push(
{ name: 'ActivityList'
})"
/>
/>
<img
<img
class=
"mx-5 mt-5"
class=
"mx-5 mt-5"
...
@@ -32,7 +41,11 @@
...
@@ -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"
/>
<HotNews
v-for=
"n in hotNews"
:key=
"n.uuid"
:info=
"n"
/>
</div>
</div>
</div>
</div>
...
@@ -50,12 +63,16 @@ import FnsCard from "./FnsCard/index.vue";
...
@@ -50,12 +63,16 @@ import FnsCard from "./FnsCard/index.vue";
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
LiveCard
from
"@/components/LiveCard/index.vue"
;
import
LiveCard
from
"@/components/LiveCard/index.vue"
;
import
HotNews
from
"@/components/HotNews/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
{
queryBannerList
}
from
"@/service/BannerService"
;
import
{
getImageSrcFromFileHash
}
from
"@/service/FileService"
;
import
{
getImageSrcFromFileHash
}
from
"@/service/FileService"
;
import
{
queryNotifyList
}
from
"@/service/NotifyService"
;
import
{
queryNotifyList
}
from
"@/service/NotifyService"
;
import
{
queryActivityList
}
from
"@/service/ActivityService"
;
import
{
queryActivityList
}
from
"@/service/ActivityService"
;
import
{
queryLoanProductList
,
queryLoanProductInfo
,
}
from
"@/service/LoanProductService"
;
import
{
number
}
from
"bitcoinjs-lib/types/script"
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
Banner
,
Banner
,
...
@@ -96,23 +113,28 @@ export default defineComponent({
...
@@ -96,23 +113,28 @@ export default defineComponent({
constants
:
{},
constants
:
{},
hotNews
:
[],
hotNews
:
[],
src
:
""
,
src
:
""
,
uuid
:
""
,
uuid
:
""
,
max_amount
:
0
,
product_name
:
""
,
features
:
""
,
inst_name
:
""
,
};
};
},
},
mounted
()
{
mounted
()
{
this
.
getHotNews
()
this
.
getHotNews
()
;
this
.
fetchBannerList
();
this
.
fetchBannerList
();
this
.
fetchNotifyList
();
this
.
fetchNotifyList
();
this
.
fetchActivityList
();
this
.
fetchActivityList
();
this
.
fetchLoanProductList
();
},
},
methods
:
{
methods
:
{
getHotNews
()
{
getHotNews
()
{
getNewsList
({
getNewsList
({
limit
:
2
,
limit
:
2
,
offset
:
0
offset
:
0
,
}).
then
(
res
=>
{
}).
then
(
(
res
)
=>
{
this
.
hotNews
=
res
.
data
.
items
this
.
hotNews
=
res
.
data
.
items
;
})
})
;
},
},
async
fetchBannerList
()
{
async
fetchBannerList
()
{
const
ret
=
await
queryBannerList
({
location
:
"1"
});
const
ret
=
await
queryBannerList
({
location
:
"1"
});
...
@@ -134,7 +156,27 @@ export default defineComponent({
...
@@ -134,7 +156,27 @@ export default defineComponent({
const
ret
=
await
queryActivityList
({
limit
:
1
,
offset
:
0
});
const
ret
=
await
queryActivityList
({
limit
:
1
,
offset
:
0
});
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
this
.
src
=
getImageSrcFromFileHash
(
ret
.
data
.
items
[
0
]?.
file_name
);
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 @@
...
@@ -61,10 +61,10 @@
</div>
</div>
<!-- 热门贷款 -->
<!-- 热门贷款 -->
<GroupTitle
title=
"热门贷款"
class=
"mt-2.5"
iconName=
""
/>
<GroupTitle
title=
"热门贷款"
class=
"mt-2.5"
iconName=
""
/>
<LoanHotSwipe
class=
"mt-5"
/>
<LoanHotSwipe
:loanMode=
"mode"
class=
"mt-5"
/>
<GroupTitle
<GroupTitle
title=
"贷款精选"
title=
"贷款精选"
@
seeMore=
"$router.push(
{ name: 'LoanList',
params:{mode:mode
} })"
@
seeMore=
"$router.push(
{ name: 'LoanList',
params: { mode: mode
} })"
/>
/>
<LoanCard
<LoanCard
v-for=
"item in allProductList"
v-for=
"item in allProductList"
...
@@ -73,7 +73,10 @@
...
@@ -73,7 +73,10 @@
:product_name=
"item.product_name"
:product_name=
"item.product_name"
:features=
"item.features"
:features=
"item.features"
:inst_name=
"item.inst_name"
: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"
class="mt-2.5"
/>
/>
<!-- 贷款资讯 -->
<!-- 贷款资讯 -->
...
@@ -83,7 +86,7 @@
...
@@ -83,7 +86,7 @@
class=
"mt-2.5"
class=
"mt-2.5"
iconName=
""
iconName=
""
/>
/>
<
HotNews
v-for=
"n in 2"
:key=
"n"
/
>
<
!--
<HotNews
v-for=
"n in 2"
:key=
"n"
/>
--
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -95,7 +98,7 @@ import LoanHotSwipe from "@/components/Loan/LoanHotSwipe/index.vue";
...
@@ -95,7 +98,7 @@ import LoanHotSwipe from "@/components/Loan/LoanHotSwipe/index.vue";
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
LoanCard
from
"@/components/Loan/LoanCard/index.vue"
;
import
GroupTitle
from
"@/components/GroupTitle/index.vue"
;
import
GroupTitle
from
"@/components/GroupTitle/index.vue"
;
import
HotNews
from
"@/components/HotNews/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
{
simpleItemInfo
}
from
"./types"
;
import
{
import
{
...
@@ -103,13 +106,18 @@ import {
...
@@ -103,13 +106,18 @@ import {
queryLoanProductInfo
,
queryLoanProductInfo
,
}
from
"@/service/LoanProductService"
;
}
from
"@/service/LoanProductService"
;
const
mode
=
ref
(
eLoanMode
.
personal
);
const
mode
=
ref
(
eLoanMode
.
personal
);
const
setMode
=
(
v
:
eLoanMode
)
=>
{
const
setMode
=
(
v
:
eLoanMode
)
=>
{
mode
.
value
=
v
;
mode
.
value
=
v
;
};
};
let
allProductList
:
Array
<
simpleItemInfo
>
=
reactive
([]);
let
allProductList
:
Array
<
simpleItemInfo
>
=
reactive
([]);
onMounted
(()
=>
{
watch
(
mode
,
()
=>
{
allProductList
=
[]
fetchList
()
});
const
fetchList
=
()
=>
{
queryLoanProductList
({
queryLoanProductList
({
limit
:
5
,
limit
:
5
,
loan_type
:
mode
.
value
,
loan_type
:
mode
.
value
,
...
@@ -130,8 +138,10 @@ onMounted(() => {
...
@@ -130,8 +138,10 @@ onMounted(() => {
});
});
});
});
}
}
console
.
log
(
allProductList
);
});
});
};
onMounted
(()
=>
{
fetchList
()
});
});
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
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