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
7996255f
Commit
7996255f
authored
Oct 15, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab.33.cn:chenqikuai/fns_front_2 into dev
parents
38ba0bc4
686a29d4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
61 deletions
+98
-61
note.md
note.md
+3
-1
App.vue
src/App.vue
+1
-1
index.vue
src/components/Loan/LoanCard2/index.vue
+17
-9
authCheck.ts
src/utils/authCheck.ts
+4
-1
index.vue
src/views/LoanDetail/index.vue
+11
-2
Banner.vue
src/views/withMenu/Home/Banner/Banner.vue
+14
-7
setting.vue
src/views/withMenu/Mine/setting.vue
+40
-40
vue.config.js
vue.config.js
+8
-0
No files found.
note.md
View file @
7996255f
地址 对应的 用户信息会变吗? 是否会变将影响着前端是否存储相关数据以及存储有效期长度
-
后台将平台管理员和其他用户分隔开
-
图片剪切和展示
\ No newline at end of file
src/App.vue
View file @
7996255f
...
@@ -37,7 +37,7 @@ export default defineComponent({
...
@@ -37,7 +37,7 @@ export default defineComponent({
connectionState
.
error
=
false
;
connectionState
.
error
=
false
;
initError
.
value
=
false
;
initError
.
value
=
false
;
const
fmp
=
new
FzmMessageProtocol
(
"ws://172.16.101.107:8888/sub"
);
const
fmp
=
new
FzmMessageProtocol
(
`ws://
${
window
.
location
.
host
}
/proxyWs/sub`
);
const
UserMsg
=
getUserMsg
();
const
UserMsg
=
getUserMsg
();
if
(
!
UserMsg
)
{
if
(
!
UserMsg
)
{
...
...
src/components/Loan/LoanCard2/index.vue
View file @
7996255f
<
script
lang=
"tsx"
>
<
script
lang=
"tsx"
>
import
router
from
"@/router"
;
import
{
goToChatWithOutletRoboot
}
from
"@/router/navigate"
;
import
{
goToChatWithOutletRoboot
}
from
"@/router/navigate"
;
import
AddressService
from
"@/service/AddressService"
;
import
AddressService
from
"@/service/AddressService"
;
import
{
chatAuthCheck
}
from
"@/utils/authCheck"
;
import
{
defineComponent
,
ref
}
from
"vue"
;
import
{
defineComponent
,
ref
}
from
"vue"
;
export
default
defineComponent
({
export
default
defineComponent
({
props
:
[
"setRef"
,
"min_amount"
,
"max_amount"
,
"rate_lower"
,
"rate_upper"
],
props
:
[
"setRef"
,
"min_amount"
,
"max_amount"
,
"rate_lower"
,
"rate_upper"
],
setup
(
props
)
{
setup
(
props
)
{
const
handleClick
=
async
()
=>
{
const
handleClick
=
async
()
=>
{
console
.
log
(
1
);
chatAuthCheck
(
async
()
=>
{
const
ret
=
await
AddressService
.
getInstance
().
getNearby
({
const
ret
=
await
AddressService
.
getInstance
().
getNearby
({
bank_code
:
Number
(
process
.
env
.
VUE_APP_BANK_CODE
),
bank_code
:
Number
(
process
.
env
.
VUE_APP_BANK_CODE
),
number
:
1
,
number
:
1
,
})
if
(
ret
.
code
===
200
)
{
goToChatWithOutletRoboot
({
outletId
:
ret
.
data
[
0
].
outlet_id
})
})
}
if
(
ret
.
code
===
200
)
{
goToChatWithOutletRoboot
({
outletId
:
ret
.
data
[
0
].
outlet_id
})
}
},
()
=>
{
router
.
push
({
name
:
'Login'
})
})
}
}
return
()
=>
(
return
()
=>
(
...
...
src/utils/authCheck.ts
View file @
7996255f
...
@@ -14,10 +14,13 @@ export function authCheck(cb: Function) {
...
@@ -14,10 +14,13 @@ export function authCheck(cb: Function) {
export
async
function
chatAuthCheck
(
cb
:
Function
,
cb2
?:
Function
)
{
export
async
function
chatAuthCheck
(
cb
:
Function
,
cb2
?:
Function
)
{
const
msg
=
getUserMsg
()
const
msg
=
getUserMsg
()
if
(
msg
?.
role
===
eRole
.
user
)
return
true
if
(
msg
?.
role
===
eRole
.
user
)
{
cb
();
}
else
if
(
msg
?.
role
===
eRole
.
staff
)
{
else
if
(
msg
?.
role
===
eRole
.
staff
)
{
const
ret
=
await
getStaffOnDutyStatus
()
const
ret
=
await
getStaffOnDutyStatus
()
if
(
ret
.
code
===
200
&&
ret
.
data
)
{
if
(
ret
.
code
===
200
&&
ret
.
data
)
{
console
.
log
(
'cb'
);
cb
()
cb
()
}
else
{
}
else
{
cb2
&&
cb2
()
cb2
&&
cb2
()
...
...
src/views/LoanDetail/index.vue
View file @
7996255f
...
@@ -17,6 +17,7 @@ import AddressService from "@/service/AddressService"
...
@@ -17,6 +17,7 @@ import AddressService from "@/service/AddressService"
import
router
from
"@/router"
;
import
router
from
"@/router"
;
import
UserService
from
"@/service/UserService"
;
import
UserService
from
"@/service/UserService"
;
import
{
goToChatWithOutletRoboot
}
from
"@/router/navigate"
;
import
{
goToChatWithOutletRoboot
}
from
"@/router/navigate"
;
import
{
chatAuthCheck
}
from
"@/utils/authCheck"
;
function
isInViewPort
(
element
:
HTMLElement
,
barHeight
:
number
)
{
function
isInViewPort
(
element
:
HTMLElement
,
barHeight
:
number
)
{
const
viewWidth
=
window
.
innerWidth
||
document
.
documentElement
.
clientWidth
;
const
viewWidth
=
window
.
innerWidth
||
document
.
documentElement
.
clientWidth
;
...
@@ -113,11 +114,19 @@ export default defineComponent({
...
@@ -113,11 +114,19 @@ export default defineComponent({
});
});
const
handleClickApply
=
async
()
=>
{
const
handleClickApply
=
async
()
=>
{
getOutletAndNavigateToChat
();
chatAuthCheck
(
getOutletAndNavigateToChat
,
()
=>
{
router
.
push
({
name
:
'Login'
})
})
}
}
const
clickChatIcon
=
async
()
=>
{
const
clickChatIcon
=
async
()
=>
{
getOutletAndNavigateToChat
()
chatAuthCheck
(
getOutletAndNavigateToChat
,
()
=>
{
router
.
push
({
name
:
'Login'
})
})
}
}
const
getOutletAndNavigateToChat
=
async
()
=>
{
const
getOutletAndNavigateToChat
=
async
()
=>
{
...
...
src/views/withMenu/Home/Banner/Banner.vue
View file @
7996255f
<
template
>
<
template
>
<van-swipe
class=
"my-swipe"
:autoplay=
"3000"
indicator-color=
"white"
>
<div
class=
"container relative"
>
<van-swipe-item
v-for=
"(image, index) in bannerUrls"
:key=
"index"
>
<div
class=
"absolute w-full h-full"
>
<vantImage
fit=
"cover"
class=
" h-36 w-full"
:src=
"image"
/>
<van-swipe
class=
"my-swipe"
:autoplay=
"3000"
indicator-color=
"white"
>
</van-swipe-item>
<van-swipe-item
v-for=
"(image, index) in bannerUrls"
:key=
"index"
>
</van-swipe>
<vantImage
fit=
"cover"
class=
"h-full w-full"
:src=
"image"
/>
</van-swipe-item>
</van-swipe>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
}
from
"vue"
;
import
{
defineComponent
,
PropType
}
from
"vue"
;
...
@@ -28,13 +32,16 @@ export default defineComponent({
...
@@ -28,13 +32,16 @@ export default defineComponent({
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.container {
padding-bottom: 40%;
}
.my-swipe {
.my-swipe {
height: 1
44px
;
height: 1
00%
;
}
}
.my-swipe .van-swipe-item {
.my-swipe .van-swipe-item {
color: #fff;
color: #fff;
font-size: 20px;
font-size: 20px;
// line-height: 100px;
text-align: center;
text-align: center;
background-color: #e8edf0;
background-color: #e8edf0;
}
}
...
...
src/views/withMenu/Mine/setting.vue
View file @
7996255f
<
template
>
<
template
>
<div>
<div>
<nav-bar
title=
"个人中心"
:style=
"
{ 'background-color':'#F7F7FA'}"/>
<nav-bar
title=
"个人中心"
:style=
"
{ 'background-color': '#F7F7FA' }" />
<!-- 头像 -->
<!-- 头像 -->
<div
class=
"px-5 py-3 flex justify-between items-center border-b border-gray-200"
>
<div
class=
"px-5 py-3 flex justify-between items-center border-b border-gray-200"
>
<span
class=
" text-sm font-semibold"
>
头像
</span>
<span
class=
"text-sm font-semibold"
>
头像
</span>
<img
src=
"../../../assets/icons/avatar.png"
class=
" w-12 h-12 rounded-full"
>
<img
src=
"../../../assets/icons/avatar.png"
class=
"w-12 h-12 rounded-full"
/>
</div>
</div>
<!-- 手机号码 -->
<!-- 手机号码 -->
<div
class=
"px-5 py-5 flex justify-between items-center border-b border-gray-200"
>
<div
class=
"px-5 py-5 flex justify-between items-center border-b border-gray-200"
>
<span
class=
" text-sm font-semibold"
>
手机号码
</span>
<span
class=
"text-sm font-semibold"
>
手机号码
</span>
<span
class=
" text-sm"
>
{{
getPhone
}}
</span>
<span
class=
"text-sm"
>
{{
getPhone
}}
</span>
</div>
</div>
<!-- 登陆密码 -->
<!-- 登陆密码 -->
<div
class=
"px-5 py-2 items-center border-b border-gray-200"
>
<div
class=
"px-5 py-2 items-center border-b border-gray-200"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex justify-between items-center"
>
<div>
<div>
<div
class=
" text-sm font-semibold"
>
设置密码
</div>
<div
class=
"text-sm font-semibold"
>
设置密码
</div>
<div
class=
" text-xs text-gray-400 pt-1"
>
保障账户登录安全
</div>
<div
class=
"text-xs text-gray-400 pt-1"
>
保障账户登录安全
</div>
</div>
<div
class=
"flex items-center text-xs h-1 text-right"
>
<span
@
click=
"pushRouter"
>
设置
</span>
<icon
name=
"icon-gengduo"
color=
"#8E92A3"
size=
"12"
class=
" inline-block align-text-bottom"
/>
</div>
</div>
</div>
<div
class=
"flex items-center text-xs h-1 text-right"
@
click=
"pushRouter"
>
<span>
设置
</span>
<icon
name=
"icon-gengduo"
color=
"#8E92A3"
size=
"12"
class=
"inline-block align-text-bottom"
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div
@
click=
"clickLogout"
class=
"logout-btn flex items-center justify-center fixed"
>
退出登录
</div>
<div
@
click=
"clickLogout"
class=
"logout-btn flex items-center justify-center fixed"
>
退出登录
</div>
...
@@ -44,18 +44,18 @@ import router from '@/router'
...
@@ -44,18 +44,18 @@ import router from '@/router'
import
{
userLogout
}
from
'@/service/UserManagementService'
import
{
userLogout
}
from
'@/service/UserManagementService'
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
NavBar
,
Icon
},
components
:
{
NavBar
,
Icon
},
data
(){
data
()
{
return
{
return
{
role
:
''
role
:
''
}
}
},
},
computed
:
{
computed
:
{
hasPassword
():
eAccountType
{
hasPassword
():
eAccountType
{
return
eAccountType
.
REG_NOPD
return
eAccountType
.
REG_NOPD
},
},
getPhone
(){
getPhone
()
{
const
phone
=
getUserMsg
()?.
userInfo
.
phone
+
''
const
phone
=
getUserMsg
()?.
userInfo
.
phone
+
''
var
newphone
=
phone
.
replace
(
phone
.
substr
(
3
,
5
),
"*****"
)
var
newphone
=
phone
.
replace
(
phone
.
substr
(
3
,
5
),
"*****"
)
return
newphone
return
newphone
}
}
},
},
...
@@ -73,14 +73,14 @@ export default defineComponent({
...
@@ -73,14 +73,14 @@ export default defineComponent({
clickLogout
clickLogout
}
}
},
},
methods
:{
methods
:
{
pushRouter
(){
pushRouter
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'PwdSetting'
,
name
:
'PwdSetting'
,
query
:
{
query
:
{
phone
:
this
.
getP
hone
phone
:
this
.
userMsg
?.
userInfo
.
p
hone
}
}
})
})
},
},
}
}
})
})
...
...
vue.config.js
View file @
7996255f
...
@@ -7,6 +7,14 @@ module.exports = {
...
@@ -7,6 +7,14 @@ module.exports = {
pathRewrite
:
{
pathRewrite
:
{
'^/proxyApi'
:
''
,
'^/proxyApi'
:
''
,
},
},
},
'/proxyWs'
:
{
target
:
'ws://172.16.101.107:8888'
,
changeOrigin
:
true
,
ws
:
true
,
pathRewrite
:
{
'^/proxyWs'
:
''
}
}
}
},
},
},
},
...
...
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