Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
Support
提交反馈
为 GitLab 提交贡献
登录/注册
切换导航
M
mcep-h5
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
jiangzaicheng
mcep-h5
提交
050f33e5
提交
050f33e5
编写于
12月 28, 2022
作者:
“grape”
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化登录后的缓存与添加请求头与联调查询用户信息接口
上级
0e3653b4
变更
9
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
95 行增加
和
19 行删除
+95
-19
.env.dev
.env.dev
+21
-3
PicketAcced.vue
src/components/common/PicketAcced.vue
+0
-2
common.api.ts
src/constants/api/login/common.api.ts
+6
-3
login-mgt.api.ts
src/constants/api/login/login-mgt.api.ts
+2
-2
application.api.ts
src/constants/api/ms-application/application.api.ts
+2
-1
system.api.ts
src/constants/api/ms-system/system.api.ts
+11
-1
api.service.ts
src/services/api.service.ts
+2
-0
LoginView.vue
src/views/authentication/LoginView.vue
+13
-2
modifyInfo.vue
src/views/workbench/modifyInfo.vue
+38
-5
未找到文件。
.env.dev
浏览文件 @
050f33e5
...
...
@@ -10,16 +10,34 @@ VUE_APP_CLIENT_ID = web-loong
VUE_APP_CLIENT_SECRET = web-loong-secret
// 接口版本号
VUE_APP_API_PREFIX = /api/v1
// 网关服务
//////////////// local
// 网关服务
VUE_APP_MS_GATEWAY_API = http://192.168.14.1:9140
//VUE_APP_ONLINE_API = http://192.168.14.1:9155/ms-online/api/v1
VUE_APP_SYSTEM_API = ms-system/api/v1/
// 业务服务
//////////////// serve
// 网关服务
//VUE_APP_MS_GATEWAY_API = http://10.2.3.118:9140
//online
VUE_APP_ONLINE_API = /ms-online/api/v1
VUE_APP_AUTH_API = /ms-system/api/v1/sys-cust-info/permit_endpoint
VUE_APP_MS_SYSTEM_API = /ms-system/api/v1/sys-cust-info/permit_endpoint
VUE_APP_MS_AUTH_API = http://82.157.46.222:9125/ms-auth
VUE_APP_MS_NETTY_API = http://15.1.48.21:9140/ms-netty
...
...
@@ -32,7 +50,7 @@ VUE_APP_ENABLE_GATEWAY = on
VUE_APP_SYS_API = http://10.2.3.118:9165/online-financial-service/api/v1/cust-info/permit_endpoint
VUE_APP_ONLINE_API = http://192.168.14.1:9155/ms-online/api/v1
//http://10.0.3.144:9165/online-financial-service/api/v1/cust-info/permit_endpointy
//服务器http://10.2.3.118:9165/online-financial-service/api/v1/cust-info/permit_endpoint
...
...
src/components/common/PicketAcced.vue
浏览文件 @
050f33e5
...
...
@@ -32,9 +32,7 @@
<van-col
span=
"10"
class=
"lable"
><span>
到期日期
</span></van-col>
<van-col
span=
"14"
class=
"time"
>
{{
item
.
time
}}
</van-col>
</van-row>
</van-col>
</van-col>
<van-col
span=
"8"
>
<svg
class=
"icon"
aria-hidden=
"true"
v-if=
"item.status === 1"
>
...
...
src/constants/api/login/common.api.ts
浏览文件 @
050f33e5
...
...
@@ -10,10 +10,11 @@ import { MethodType } from "@/constants/enum/general/method-type.enum";
import
{
HeaderType
}
from
"
@/constants/enum/general/header-type.enum
"
;
//网关
//
const prefix = process.env.VUE_APP_MS_GATEWAY_API + process.env.VUE_APP_AUTH_API ;
const
onlinePrefix
=
process
.
env
.
VUE_APP_ONLINE_API
const
prefix
=
process
.
env
.
VUE_APP_MS_GATEWAY_API
+
process
.
env
.
VUE_APP_AUTH_API
;
const
onlinePrefix
=
process
.
env
.
VUE_APP_
MS_GATEWAY_API
+
process
.
env
.
VUE_APP_
ONLINE_API
//本地
const
prefix
=
"
http://localhost:9130
"
+
process
.
env
.
VUE_APP_AUTH_API
;
// const prefix = "http://10.2.3.118:9130"+ process.env.VUE_APP_AUTH_API ;
// const onlinePrefix = "http://localhost:9155" + process.env.VUE_APP_ONLINE_API
const
commonApi
=
{
getPicCode
:
{
url
:
prefix
+
"
/get_phone_verify_code
"
,
...
...
@@ -30,3 +31,5 @@ const commonApi = {
};
export
default
commonApi
;
src/constants/api/login/login-mgt.api.ts
浏览文件 @
050f33e5
...
...
@@ -15,8 +15,8 @@ const prefix = process.env.VUE_APP_MS_GATEWAY_API + process.env.VUE_APP_AUTH_API
// //本地
// const prefix = "http://localhost:9130"+ process.env.VUE_APP_AUTH_API ;
// const prefix = "http://10.
0.3.144:9165/online-financial-service/api/v1/cust-info/permit_endpoint"
//server
// const prefix = "http://10.
2.3.118:9130"+ process.env.VUE_APP_AUTH_API ;
// console.log(prefix+"=================");
const
loginApi
=
{
updatePicCode
:
{
...
...
src/constants/api/ms-application/application.api.ts
浏览文件 @
050f33e5
import
{
MethodType
}
from
"
@/constants/enum/general/method-type.enum
"
;
import
{
HeaderType
}
from
"
@/constants/enum/general/header-type.enum
"
;
// const prefix = process.env.VUE_APP_MS_GATEWAY_API+process.env.VUE_APP_MS_APPLICATION_API+process.env.VUE_APP_API_PREFIX;
const
prefix
=
"
http://localhost:9145
"
+
process
.
env
.
VUE_APP_MS_APPLICATION_API
+
process
.
env
.
VUE_APP_API_PREFIX
;
// const prefix = "http://localhost:9145"+process.env.VUE_APP_MS_APPLICATION_API+process.env.VUE_APP_API_PREFIX;
const
prefix
=
"
http://10.2.3.118:9145
"
+
process
.
env
.
VUE_APP_MS_APPLICATION_API
+
process
.
env
.
VUE_APP_API_PREFIX
;
console
.
log
(
prefix
+
"
============
"
)
const
applicationApi
=
{
...
...
src/constants/api/ms-system/system.api.ts
浏览文件 @
050f33e5
import
{
MethodType
}
from
"
@/constants/enum/general/method-type.enum
"
;
import
{
HeaderType
}
from
"
@/constants/enum/general/header-type.enum
"
;
const
prefix
=
`
${
process
.
env
.
VUE_APP_MS_SYSTEM_API
}${
process
.
env
.
VUE_APP_API_PREFIX
}
`
;
// const prefix = `${process.env.VUE_APP_MS_SYSTEM_API}${process.env.VUE_APP_API_PREFIX}`;
//网关
// const prefix = process.env.VUE_APP_MS_GATEWAY_API + process.env.VUE_APP_AUTH_API;
//local
const
prefix
=
"
http://192.168.14.1:9140
"
+
process
.
env
.
VUE_APP_SYSTEM_API
;
const
systemApi
=
{
// 通用请求地址
commonRq
:
{
...
...
@@ -122,5 +126,11 @@ const systemApi = {
methodType
:
MethodType
.
POST
.
code
,
headerType
:
HeaderType
.
AUTH
.
code
},
//获取个人信息
getSysCustInfoById
:
{
url
:
prefix
+
"
/sys-cust-info/getSysCustInfoById
"
,
methodType
:
MethodType
.
GET
.
code
,
headerType
:
HeaderType
.
AUTH
.
code
,
},
};
export
default
systemApi
;
src/services/api.service.ts
浏览文件 @
050f33e5
...
...
@@ -37,8 +37,10 @@ class ApiService {
config
.
headers
[
'
Content-Type
'
]
=
'
application/json; charset=utf-8
'
;
}
const
token
=
sessionStorage
.
getItem
(
'
accessToken
'
);
const
jti
=
sessionStorage
.
getItem
(
'
jti
'
);
if
(
token
&&
token
!=
''
)
{
config
.
headers
.
Authorization
=
'
bearer
'
+
token
;
config
.
headers
.
jti
=
jti
;
}
return
Promise
.
resolve
(
config
);
},
...
...
src/views/authentication/LoginView.vue
浏览文件 @
050f33e5
...
...
@@ -113,6 +113,7 @@ import { RestfulResponse } from "@/model/domain/RestfulResponse";
import
commonApi
from
"
@/constants/api/login/common.api
"
;
import
{
sys
}
from
"
typescript
"
;
import
{
log
}
from
"
mathjs
"
;
import
{
tokenStore
,
TokenStore
}
from
"
@/stores
"
;
@
Component
({
...
...
@@ -130,7 +131,7 @@ export default class LoginView extends Vue {
imageSrcValue
:
string
=
""
;
//图形验证码
sms
:
string
=
""
;
//短信验证
timer
:
any
=
""
;
//定时器
time
:
number
=
60
;
//计数
time
:
number
=
5
;
//计数
imageVerifyKey
:
string
=
""
;
//验证码Key
passwordType
=
"
password
"
;
showCode
=
false
;
...
...
@@ -222,7 +223,7 @@ export default class LoginView extends Vue {
}
//禁用 超链接并设置倒计时时间
this
.
smsCss
=
"
smsCss
"
this
.
time
=
60
;
this
.
time
=
5
;
apiService
.
general
(
commonApi
.
getPicCode
,
param
,
undefined
,
undefined
).
then
((
response
:
RestfulResponse
)
=>
{
if
(
response
.
code
==
Code
.
SUCCESS
.
code
)
{
...
...
@@ -230,6 +231,8 @@ export default class LoginView extends Vue {
Toast
(
'
短信发送成功,5分钟有效
'
);
//开始倒计时
this
.
changeCmstotal
()
//todo 暂时没有短信接口所以直接反显到页面上
this
.
sms
=
response
.
data
}
else
{
Toast
(
'
短信发送失败,请重试
'
);
//取消不可点击
...
...
@@ -260,7 +263,14 @@ export default class LoginView extends Vue {
//发送请求就保存账号 账号:18746555531 密码:123456
localStorage
.
setItem
(
'
loginNo
'
,
this
.
loginNo
);
// debugger;
if
(
response
.
code
==
Code
.
SUCCESS
.
code
)
{
//todo
// this.$store.commit("token",response.data.token);
// console.log(tokenStore.token);
sessionStorage
.
setItem
(
"
sysCustInfo
"
,
JSON
.
stringify
(
response
.
data
.
sysCustInfo
));
sessionStorage
.
setItem
(
"
accessToken
"
,
response
.
data
.
token
.
accessToken
);
sessionStorage
.
setItem
(
"
jti
"
,
response
.
data
.
token
.
jti
);
Toast
(
response
.
msg
+
""
);
this
.
$router
.
push
({
name
:
`Mianview`
,
...
...
@@ -271,6 +281,7 @@ export default class LoginView extends Vue {
//登录成功后保存账号
// localStorage.setItem('loginNo', this.loginNo);
}
else
{
// this._updatePicCode();
// Toast(response.msg + "");
}
...
...
src/views/workbench/modifyInfo.vue
浏览文件 @
050f33e5
...
...
@@ -70,7 +70,13 @@
</
template
>
<
script
lang=
"ts"
>
import
systemApi
from
"
@/constants/api/ms-system/system.api
"
;
import
{
Code
}
from
"
@/constants/enum/general/code.enum
"
;
import
{
RestfulResponse
}
from
"
@/model/domain/RestfulResponse
"
;
import
apiService
from
"
@/services/api.service
"
;
import
{
Component
,
Vue
,
Prop
,
Watch
,
Emit
}
from
"
vue-property-decorator
"
;
/*
* title
*/
...
...
@@ -87,14 +93,41 @@ export default class PersonLod extends Vue {
newPassword
:
String
=
""
//原始密码
mounted
()
{
this
.
name
=
this
.
$route
.
params
.
name
;
this
.
IdCard
=
this
.
$route
.
params
.
IdCard
;
this
.
phone
=
this
.
$route
.
params
.
phone
;
this
.
liveAdress
=
this
.
$route
.
params
.
liveAdress
;
// this.name = this.$route.params.name;
// this.IdCard = this.$route.params.IdCard;
// this.phone = this.$route.params.phone;
// this.liveAdress = this.$route.params.liveAdress;
this
.
getInfo
();
}
modifyInfo
(){
this
.
$router
.
back
();
// this.$router.back();
}
getInfo
(){
let
custInfo
:
any
=
sessionStorage
.
getItem
(
"
sysCustInfo
"
);
custInfo
=
JSON
.
parse
(
custInfo
);
let
id
=
custInfo
.
id
;
console
.
log
(
id
);
let
query
=
{
id
:
custInfo
.
id
,
}
let
param
=
{
}
apiService
.
general
(
systemApi
.
getSysCustInfoById
,
query
,
query
,
undefined
).
then
((
response
:
RestfulResponse
)
=>
{
if
(
response
.
code
==
Code
.
SUCCESS
.
code
)
{
this
.
name
=
response
.
data
.
records
.
custName
;
this
.
IdCard
=
response
.
data
.
records
.
idcard
;
this
.
phone
=
response
.
data
.
records
.
phone
;
this
.
liveAdress
=
response
.
data
.
records
.
address
;
}
});
}
}
</
script
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录