修复身份证显示bug
diff --git a/backend/src/main/java/com/supwisdom/dlpay/framework/util/DataUtil.java b/backend/src/main/java/com/supwisdom/dlpay/framework/util/DataUtil.java
index 5d8546c..ad2368d 100644
--- a/backend/src/main/java/com/supwisdom/dlpay/framework/util/DataUtil.java
+++ b/backend/src/main/java/com/supwisdom/dlpay/framework/util/DataUtil.java
@@ -10,7 +10,7 @@
return "";
}
String prefix = str.substring(0, start);
- String suffix = str.substring(length - end - 1, length - 1);
+ String suffix = str.substring(length - end, length);
return prefix + repeat("*", length - start - end) + suffix;
}
diff --git a/backend/src/main/java/com/supwisdom/dlpay/portal/util/PortalConstant.java b/backend/src/main/java/com/supwisdom/dlpay/portal/util/PortalConstant.java
index 2c4d18f..8f0f157 100644
--- a/backend/src/main/java/com/supwisdom/dlpay/portal/util/PortalConstant.java
+++ b/backend/src/main/java/com/supwisdom/dlpay/portal/util/PortalConstant.java
@@ -14,6 +14,7 @@
public static final String SYSPARA_PORTAL_APPID = "portal.appid";
public static final String SYSPARA_PORTAL_SECRET = "portal.secret";
public static final String SYSPARA_PORTAL_AMAPKEY = "portal.amapkey";
+ public static final String SYSPARA_PORTAL_AMAPURL = "portal.amapurl";
public static final String ARTICLE_STATUS_SAVE = "save";
public static final String ARTICLE_STATUS_PASS = "pass";
diff --git a/backend/src/main/kotlin/com/supwisdom/dlpay/portal/PortalApi.kt b/backend/src/main/kotlin/com/supwisdom/dlpay/portal/PortalApi.kt
index 26ddab6..5e10bf5 100644
--- a/backend/src/main/kotlin/com/supwisdom/dlpay/portal/PortalApi.kt
+++ b/backend/src/main/kotlin/com/supwisdom/dlpay/portal/PortalApi.kt
@@ -75,10 +75,12 @@
val data = HashMap<String, String>()
val url = systemUtilService.getBusinessValue(PortalConstant.SYSPARA_IMAGE_URLPUSH)
val mapKey = systemUtilService.getBusinessValue(PortalConstant.SYSPARA_PORTAL_AMAPKEY)
+ val mapUrl = systemUtilService.getBusinessValue(PortalConstant.SYSPARA_PORTAL_AMAPURL)
data["name"] = oper.opername
data["roles"] = "admin"
data["url"] = url
data["mapkey"] = mapKey
+ data["mapurl"] = mapUrl
JsonResult.ok().put("data", data)
} catch (e: Exception) {
logger.error { e.message }
diff --git a/backend/src/main/resources/data-postgresql.sql b/backend/src/main/resources/data-postgresql.sql
index 397d46f..8b708c6 100644
--- a/backend/src/main/resources/data-postgresql.sql
+++ b/backend/src/main/resources/data-postgresql.sql
@@ -21,6 +21,8 @@
INSERT INTO "tb_businesspara"("parakey", "paraval", "tenantid") VALUES ('aes.cfb.rootkey', 'Vbb1syh8U1+CdLmTVGdtDiVvKBQ81n4GmgBEO/ohSbU=', '{tenantid}');
INSERT INTO "tb_businesspara"("parakey", "paraval", "tenantid") VALUES ('aes.cfb.iv', '55b6f5b3287c535f8274b99354676d0e', '{tenantid}');
INSERT INTO "tb_businesspara"("parakey", "paraval", "tenantid") VALUES ('portal.amapkey', 'd69cdfdc1711fc7c318eb7e1a0664976', '{tenantid}');
+INSERT INTO "tb_businesspara"("parakey", "paraval", "tenantid") VALUES ('portal.amapurl', 'https://webapi.amap.com/maps?v=1.4.15&key=', '{tenentid}');
+
INSERT INTO "tb_column"("columnid", "isleaf", "name", "needreview", "parentid", "code", "ispublic", "publishable", "ordernum") VALUES ('2c9cab947451988c017451a737b10000', '0', '线上活动', '0', '', 'OnlineActivities', '1', '1', 12);
INSERT INTO "tb_column"("columnid", "isleaf", "name", "needreview", "parentid", "code", "ispublic", "publishable", "ordernum") VALUES ('2c9cab947451988c017451b280870001', '0', '线下活动', '0', '', 'OfflineActivities', '1', '1', 13);
@@ -34,6 +36,7 @@
INSERT INTO "tb_resource"("resid", "isleaf", "ordernum", "parentid", "resname", "respath", "showflag", "icon") VALUES ('99604b8d18b34417befe051a3720cbed', '1', 6, 'f066939ecbf64da3a54fa93d56e4391b', '创建文章', '/article/create', '1', NULL);
INSERT INTO "tb_resource"("resid", "isleaf", "ordernum", "parentid", "resname", "respath", "showflag", "icon") VALUES ('4665765bf07d455486f2a5215dd97380', '1', 5, 'f066939ecbf64da3a54fa93d56e4391b', '文章管理', '/article/list', '1', NULL);
INSERT INTO "tb_resource"("resid", "isleaf", "ordernum", "parentid", "resname", "respath", "showflag", "icon") VALUES ('80e0326446a643069bc8d26c132d45ea', '1', 7, 'f066939ecbf64da3a54fa93d56e4391b', '咨询问答管理', '/advisory/index', '1', NULL);
+INSERT INTO "tb_resource"("resid", "isleaf", "ordernum", "parentid", "resname", "respath", "showflag", "icon") VALUES ('7e60ec8e741441fe9a2f351b5ab8c965', '1', 8, 'f066939ecbf64da3a54fa93d56e4391b', '网点管理', '/outlets/index', '1', NULL);
INSERT INTO "tb_operator"("operid", "closedate", "email", "mobile", "opendate", "opercode", "opername", "operpwd", "opertype", "sex", "status", "tenantid", "thirdadmin", "jti", "roleid") VALUES ('LOR2IwRkbOjp+sVG9KR2BpHZbwGKepS4', '20500101', NULL, NULL, '20190101', 'system', '系统管理员', '$2a$10$Ex9xp11.vCaD8D0a7ahiUOKqDij1TcCUBwRAmrqXeDvAkmzLibn4.', 'oper', NULL, 'normal', '{tenantid}', 'no', 'QwC1ln7rReYmBOhq57op6Q', '20497f2fa27a44f7841492288ab75d88');
@@ -48,6 +51,8 @@
INSERT INTO "tb_role_resource"("id", "addtime", "resid", "roleid") VALUES ('fc8f90bb3b6d41f8b7e1b840b1a0d590', '20200827110834', '4665765bf07d455486f2a5215dd97380', '20497f2fa27a44f7841492288ab75d88');
INSERT INTO "tb_role_resource"("id", "addtime", "resid", "roleid") VALUES ('460d7f0b57eb4dcfb73fb1b51ad37f4f', '20200827142245', '99604b8d18b34417befe051a3720cbed', '20497f2fa27a44f7841492288ab75d88');
INSERT INTO "tb_role_resource"("id", "addtime", "resid", "roleid") VALUES ('49cb562956534d7dbf54b762b2b6af0d', '20200921162433', '80e0326446a643069bc8d26c132d45ea', '20497f2fa27a44f7841492288ab75d88');
+INSERT INTO "tb_role_resource"("id", "addtime", "resid", "roleid") VALUES ('5f78e1eea840497c8b991323fab4541d', '20200923170348', '7e60ec8e741441fe9a2f351b5ab8c965', '20497f2fa27a44f7841492288ab75d88');
+
diff --git a/frontend/src/components/AMap/index.vue b/frontend/src/components/AMap/index.vue
index be98a89..80b22ce 100644
--- a/frontend/src/components/AMap/index.vue
+++ b/frontend/src/components/AMap/index.vue
@@ -22,7 +22,8 @@
dragStatus: false,
AMapUI: null,
AMap: null,
- mapkey: ''
+ mapkey: '',
+ mapurl: ''
}
},
watch: {
@@ -35,12 +36,13 @@
async created() {
// 已载入高德地图API,则直接初始化地图
this.mapkey = user.state.mapkey
+ this.mapurl = user.state.mapurl
if (window.AMap && window.AMapUI) {
this.initMap()
// 未载入高德地图API,则先载入API再初始化
} else {
- await remoteLoad('http://webapi.amap.com/maps?v=1.4.15&key=' + this.mapkey)
- await remoteLoad('http://webapi.amap.com/ui/1.0/main.js')
+ await remoteLoad(this.mapurl + this.mapkey)
+ await remoteLoad('https://webapi.amap.com/ui/1.0/main.js')
this.initMap()
}
},
diff --git a/frontend/src/store/modules/user.js b/frontend/src/store/modules/user.js
index 6e7c117..736df15 100644
--- a/frontend/src/store/modules/user.js
+++ b/frontend/src/store/modules/user.js
@@ -32,6 +32,9 @@
},
SET_MAPKEY: (state, mapkey) => {
state.mapkey = mapkey
+ },
+ SET_MAPURL: (state, mapurl) => {
+ state.mapurl = mapurl
}
}
@@ -60,11 +63,12 @@
reject('认证失败,请稍后重试')
}
- const { name, roles, url, mapkey } = data
+ const { name, roles, url, mapkey, mapurl } = data
commit('SET_ROLES', roles)
commit('SET_NAME', name)
commit('SET_URL', url + '/')
commit('SET_MAPKEY', mapkey)
+ commit('SET_MAPURL', mapurl)
resolve(data)
}).catch(error => {
reject(error)
@@ -80,6 +84,7 @@
commit('SET_ROLES', [])
commit('SET_URL', '')
commit('SET_MAPKEY', '')
+ commit('SET_MAPURL', '')
removeToken()
resetRouter()
@@ -101,6 +106,7 @@
commit('SET_ROLES', [])
commit('SET_URL', '')
commit('SET_MAPKEY', '')
+ commit('SET_MAPURL', '')
removeToken()
resolve()
})
diff --git a/frontend/src/views/column/index.vue b/frontend/src/views/column/index.vue
index 599b4c4..68b4e95 100644
--- a/frontend/src/views/column/index.vue
+++ b/frontend/src/views/column/index.vue
@@ -207,7 +207,7 @@
highlight-current-row
style="width: 100%;margin-top:10px"
>
- <el-table-column label="轮播图片">
+ <el-table-column label="轮播图片" align="center" width="300px">
<template slot-scope="{row}">
<el-image :src="imageUrl+row.picid">
<div slot="error">
@@ -216,7 +216,7 @@
</el-image>
</template>
</el-table-column>
- <el-table-column label="文章标题" width="300" align="center">
+ <el-table-column label="文章标题" align="center">
<template slot-scope="{row}">
<span>{{ row.title }}</span>
</template>
@@ -231,7 +231,7 @@
<span>{{ row.ordernum }}</span>
</template>
</el-table-column>
- <el-table-column label="操作" align="center" width="200">
+ <el-table-column label="操作" align="center" width="180">
<template slot-scope="{row}">
<el-tooltip class="item" effect="dark" content="修改" placement="bottom">
<el-button type="primary" icon="el-icon-edit" circle size="mini" @click="updateBanner(row)" />