From babaf030331de2c77104a511e563b4794a4a05e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cgrape=E2=80=9D?= <18746553572@163.com>
Date: Fri, 12 Aug 2022 15:57:31 +0800
Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E8=A7=A3=E5=AF=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/PicketAcced.vue | 8 +-
src/constants/api/login/login-mgt.api.ts | 7 +-
src/public/ts/SMEncryt.ts | 4 +-
src/router/workbench.routing.ts | 7 +
src/services/api.service.ts | 33 ++--
src/views/MyView/MyPage.vue | 6 +-
src/views/authentication/LoginView.vue | 13 +-
src/views/login/Register.vue | 3 +
src/views/workbench/AccommodMain.vue | 187 +++++++++++++++++++++++
9 files changed, 239 insertions(+), 29 deletions(-)
create mode 100644 src/views/workbench/AccommodMain.vue
diff --git a/src/components/common/PicketAcced.vue b/src/components/common/PicketAcced.vue
index 6170b6d..9130501 100644
--- a/src/components/common/PicketAcced.vue
+++ b/src/components/common/PicketAcced.vue
@@ -13,7 +13,13 @@
- {{ item.productname }}
+
+
+ 合同编号:
+ {{ item.productname }}
+
+
+
申请金额:万元
diff --git a/src/constants/api/login/login-mgt.api.ts b/src/constants/api/login/login-mgt.api.ts
index c7e1cd2..395f34e 100644
--- a/src/constants/api/login/login-mgt.api.ts
+++ b/src/constants/api/login/login-mgt.api.ts
@@ -9,15 +9,16 @@
import { MethodType } from "@/constants/enum/general/method-type.enum";
import { HeaderType } from "@/constants/enum/general/header-type.enum";
-const prefix = "http://10.2.3.118:9165/online-financial-service/api/v1/cust-info/permit_endpoint"
+const prefix = "http://10.0.0.118:9130/ms-system/api/v1/sysCustInfo/permit_endpoint"
+
const loginApi = {
updatePicCode: {
- url: prefix + "/kaptcha",
+ url: prefix + "/getVerifyCode",
method: MethodType.POST.code,
header: HeaderType.AUTH.code,
},
loginSystem: {
- url: prefix + "/login",
+ url: prefix + "/onlineLogin",
method: MethodType.POST.code,
header: HeaderType.AUTH.code,
},
diff --git a/src/public/ts/SMEncryt.ts b/src/public/ts/SMEncryt.ts
index cff30a1..3eb0e52 100644
--- a/src/public/ts/SMEncryt.ts
+++ b/src/public/ts/SMEncryt.ts
@@ -11,6 +11,7 @@ export default {
* @return {Object} jsonstr 返回加密后的json数据
*/
encryptData(jsonstr: any) {
+ debugger
let encryData = {};
try {
// SM2 加密秘钥
@@ -56,10 +57,11 @@ export default {
jsonData = JSON.parse(jsonData);
}
try {
+ debugger
let sm2 = require('sm-crypto').sm2,
sm3 = require('sm-crypto').sm3,
sm4 = require('sm-crypto').sm4,
- privateKey = '7666A8CA12A27CF6C440A1CFECB4B1BB7055F2FB3435E957EB35142FAB881EFB', //SM2公钥
+ privateKey = '0494FEF4897CF4E9C9CB994B66B29E9B3EAF2C5C59EBEDB703B0F980199CEA7BDBF177AB3E65A17F3E96227977C55423929975CE535B715AC21E0AB23B9858AB4F', //SM2公钥
sm4Key = '',
orSm4Key = jsonData.sm4key;
orSm4Key = orSm4Key.substr(2, orSm4Key.length - 2);
diff --git a/src/router/workbench.routing.ts b/src/router/workbench.routing.ts
index 329335d..f02d9c4 100644
--- a/src/router/workbench.routing.ts
+++ b/src/router/workbench.routing.ts
@@ -18,6 +18,13 @@ const workbenchRoutes = [
props: propsConvert,
meta: { keepAlive: false, requiresAuth: true, name: "主页" },
},
+ {
+ path: `/AccommodMain`,
+ name: 'AccommodMain',
+ component: () => import(/* webpackChunkName: "customer-mgt" */ "@/views/workbench/AccommodMain.vue"),
+ props: propsConvert,
+ meta: { keepAlive: false, requiresAuth: true, name: "贷款主页" },
+ },
{
path: `/Accommodation`,
name: 'Accommodation',
diff --git a/src/services/api.service.ts b/src/services/api.service.ts
index ee66e28..266e155 100644
--- a/src/services/api.service.ts
+++ b/src/services/api.service.ts
@@ -172,12 +172,10 @@ class ApiService {
}
post(path: string, params: any, query: Query | undefined, requestConfig: AxiosRequestConfig): any {
+
path = query != null ? this.urlQueryConvert(path, query) : path;
console.log("服务调用--" + path);
- return Vue.axios.post(`${path}`, params, requestConfig).then(res=>{
- //TODO
- return res.data
- });
+ return Vue.axios.post(`${path}`, params, requestConfig).then(this.createBusCodeHandler(query)).catch(this.createErrorHandler())
}
/**
* POST请求 文件上传
@@ -211,7 +209,7 @@ class ApiService {
general(api: any, query?: Query | undefined, params?: any | undefined, requestConfig?: AxiosRequestConfig | any): any {
if (!!api.url && !!api.method) {
if (requestConfig == null) {
-
+
switch (api.header) {
case HeaderType.BASE.code:
requestConfig = this.createBasicHeaders();
@@ -268,27 +266,31 @@ class ApiService {
* 服务返回统一解密处理
*/
createBusCodeHandler(params?: any) {
-
return function(response: any) {
+
if (response.status === 200) {
let data = response.data;
+
console.log("返回统一解密处理",params)
if (params.tc === 'MCEP') {
let encryData = data.data || {};
+ console.log('返回原数据:', data);
//移动后台
if (typeof encryData != 'object') {
encryData = JSON.parse(encryData);
}
- //三方数据
- encryData.sm4key ? (data.data = SMUtil.decodeData(encryData)) : data;
- if (data.data && typeof data.data != 'object') {
- if (data.data.indexOf('{') > -1) {
- data.data = JSON.parse(data.data);
- }
- }
- // if (['local', 'production'].indexOf(process.env.NODE_ENV) == -1) {
- console.log('返回数据:', data);
+
+ // //三方数据
+ // encryData.sm4key ? (data.data = SMUtil.decodeData(encryData)) : data;
+ // if (data.data && typeof data.data != 'object') {
+ // if (data.data.indexOf('{') > -1) {
+ // data.data = JSON.parse(data.data);
+ // }
// }
+ if (['local', 'production'].indexOf(process.env.NODE_ENV) == -1) {
+ }
+ console.log('返回数据:', data);
+
if (data.code == '40902') {
//token 失效,退出登录
NativeUI.confirm('', "登录超时,请退出重新登录").then(() => {
@@ -316,6 +318,7 @@ class ApiService {
console.log(data);
//成功
// data = data.data;
+ debugger
if (typeof data != 'object') data = JSON.parse(data);
data = data.sm4key ? SMUtil.decodeData(data) : data;
if (typeof data != 'object') {
diff --git a/src/views/MyView/MyPage.vue b/src/views/MyView/MyPage.vue
index 6776b8e..14c592c 100644
--- a/src/views/MyView/MyPage.vue
+++ b/src/views/MyView/MyPage.vue
@@ -61,7 +61,7 @@ export default class MyPage extends Vue {
productname: "我的贷款",
//图片信息
img: "#icon-a-wodedaikuan16x16px",
- flag: "Accommodation"
+ flag: "AccommodMain"
},
{
productname: "兑换记录",
@@ -84,9 +84,9 @@ export default class MyPage extends Vue {
name: "PersonLod"
//参数
})
- } else if (item.flag === "Accommodation") {
+ } else if (item.flag === "AccommodMain") {
this.$router.push({
- name: "Accommodation"
+ name: "AccommodMain"
//参数
})
} else if ( item.flag === "ExchangeRecord") {
diff --git a/src/views/authentication/LoginView.vue b/src/views/authentication/LoginView.vue
index 5cf588a..815a533 100644
--- a/src/views/authentication/LoginView.vue
+++ b/src/views/authentication/LoginView.vue
@@ -84,6 +84,7 @@ import { Code } from "@/constants/enum/general/code.enum";
import { RestfulResponse } from "@/model/domain/RestfulResponse";
import commonApi from "@/constants/api/login/common.api";
import { sys } from "typescript";
+import { log } from "mathjs";
@Component({
@@ -104,8 +105,10 @@ export default class LoginView extends Vue {
//获取图形验证码
_updatePicCode() {
//请求图形验证码
+ debugger
apiService.general(loginApi.updatePicCode, undefined, undefined, undefined).then((response: RestfulResponse) => {
-
+ //console.log(response);
+
if (response.code == Code.SUCCESS.code) {
this.imageSrc = 'data:image/png;base64,' + response.data.imageVerifyCodeStr.replace(/[\r\n]/g, "");
this.imageVerifyKey = response.data.imageVerifyKey
@@ -147,16 +150,14 @@ export default class LoginView extends Vue {
//this._updatePicCode();
let param = {
phone: this.phone,
- //图形Key
- imageVerifyKey: this.imageVerifyKey,
//图形验证码
- imgVerifyCode: this.imageSrcValue,
+ imageVerifyKey: this.imageSrcValue,
//渠道
loginType: "3",
//手机验证码
- phoneVerifyCode: this.sms,
+ messCode: this.sms,
//密码
- credential: this.password
+ passWord: this.password
}
apiService.general(loginApi.loginSystem, undefined, param, undefined).then((response: RestfulResponse) => {
console.log(response);
diff --git a/src/views/login/Register.vue b/src/views/login/Register.vue
index 7f3fc59..a1de9f3 100644
--- a/src/views/login/Register.vue
+++ b/src/views/login/Register.vue
@@ -25,6 +25,9 @@
手机号码
+ 身份证号
+
+
短信验证码
diff --git a/src/views/workbench/AccommodMain.vue b/src/views/workbench/AccommodMain.vue
new file mode 100644
index 0000000..3048061
--- /dev/null
+++ b/src/views/workbench/AccommodMain.vue
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合同编号:{{ item.contractNo }}
+
+
+ 合同类型:
+ {{ item.contractType }}
+
+
+
+ 合同金额:
+ {{ item.contractAmount }}
+
+
+
+ 合同利率:
+ {{ item.contractRate }}
+
+
+ 还款方式:
+ {{ item.paymentMethod }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看借据
+
+
+
+
+
+
+
+
+
+
--
2.22.0