Skip to content

Commit bcfafdb

Browse files
committed
Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/1.8.0-uniapp
# Conflicts: # yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java # yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java # yudao-ui-admin/src/views/mall/trade/order/index.vue
2 parents 2df7342 + ca1e013 commit bcfafdb

File tree

16 files changed

+123
-135
lines changed

16 files changed

+123
-135
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yudao-ui-admin",
3-
"version": "1.6.4-snapshot",
3+
"version": "1.6.5-snapshot",
44
"description": "芋道管理系统",
55
"author": "芋道",
66
"license": "MIT",
@@ -60,7 +60,7 @@
6060
"screenfull": "5.0.2",
6161
"sortablejs": "1.10.2",
6262
"throttle-debounce": "2.1.0",
63-
"vue": "2.7.0",
63+
"vue": "2.7.14",
6464
"vue-count-to": "1.0.13",
6565
"vue-cropper": "0.5.8",
6666
"vue-meta": "^2.4.0",

src/api/login.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,23 @@ export function authorize(responseType, clientId, redirectUri, state,
126126
})
127127
}
128128

129+
// 获取验证图片 以及token
130+
export function reqGet(data) {
131+
return request({
132+
url: 'system/captcha/get',
133+
method: 'post',
134+
data
135+
})
136+
}
137+
138+
// 滑动或者点选验证
139+
export function reqCheck(data) {
140+
return request({
141+
url: '/system/captcha/check',
142+
method: 'post',
143+
data
144+
})
145+
}
146+
129147
export class socialBindLogin {
130148
}

src/components/RightToolbar/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ export default {
9292
};
9393
</script>
9494
<style lang="scss" scoped>
95-
::v-deep .el-transfer__button {
95+
:deep(.el-transfer__button) {
9696
border-radius: 50%;
9797
padding: 12px;
9898
display: block;
9999
margin-left: 0px;
100100
}
101-
::v-deep .el-transfer__button:first-child {
101+
:deep(.el-transfer__button:first-child) {
102102
margin-bottom: 10px;
103103
}
104104
</style>

src/components/Verifition/Verify/VerifyPoints.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* */
6161
import { resetSize } from './../utils/util'
6262
import { aesEncrypt } from '@/utils/ase'
63-
import { reqGet, reqCheck } from './../api/index'
63+
import { reqGet, reqCheck } from '@/api/login'
6464
6565
export default {
6666
name: 'VerifyPoints',
@@ -223,7 +223,6 @@ export default {
223223
this.checkPosArr.splice(0, this.checkPosArr.length)
224224
this.num = 1
225225
this.getPictrue()
226-
this.text = '验证失败'
227226
this.showRefresh = true
228227
},
229228

src/components/Verifition/Verify/VerifySlide.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* */
6565
import { aesEncrypt } from '@/utils/ase'
6666
import { resetSize } from './../utils/util'
67-
import { reqGet, reqCheck } from './../api/index'
67+
import { reqGet, reqCheck } from '@/api/login'
6868
6969
// "captchaType":"blockPuzzle",
7070
export default {

src/components/Verifition/api/index.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/components/Verifition/utils/axios.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/store/modules/permission.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { constantRoutes } from '@/router'
2-
import { getRouters } from '@/api/menu'
1+
import {constantRoutes} from '@/router'
2+
import {getRouters} from '@/api/menu'
33
import Layout from '@/layout/index'
44
import ParentView from '@/components/ParentView';
5-
import { toCamelCase } from "@/utils";
5+
import {toCamelCase} from "@/utils";
66

77
const permission = {
88
state: {
@@ -28,15 +28,15 @@ const permission = {
2828
},
2929
actions: {
3030
// 生成路由
31-
GenerateRoutes({ commit }) {
31+
GenerateRoutes({commit}) {
3232
return new Promise(resolve => {
3333
// 向后端请求路由数据(菜单)
3434
getRouters().then(res => {
3535
const sdata = JSON.parse(JSON.stringify(res.data)) // 【重要】用于菜单中的数据
3636
const rdata = JSON.parse(JSON.stringify(res.data)) // 用于最后添加到 Router 中的数据
3737
const sidebarRoutes = filterAsyncRouter(sdata)
3838
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
39-
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
39+
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
4040
commit('SET_ROUTES', rewriteRoutes)
4141
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
4242
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
@@ -60,6 +60,11 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
6060
}
6161
// 路由地址转首字母大写驼峰,作为路由名称,适配 keepAlive
6262
route.name = toCamelCase(route.path, true)
63+
// 处理三级及以上菜单路由缓存问题,将path名字赋值给name
64+
if (route.path.indexOf("/") !== -1) {
65+
const pathArr = route.path.split("/");
66+
route.name = toCamelCase(pathArr[pathArr.length - 1], true)
67+
}
6368
route.hidden = !route.visible
6469
// 处理 component 属性
6570
if (route.children) { // 父节点
@@ -86,10 +91,10 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
8691
}
8792

8893
function filterChildren(childrenMap, lastRouter = false) {
89-
let children = []
94+
let children = [];
9095
childrenMap.forEach((el, index) => {
9196
if (el.children && el.children.length) {
92-
if (el.component === 'ParentView' && !lastRouter) {
97+
if (!el.component && !lastRouter) {
9398
el.children.forEach(c => {
9499
c.path = el.path + '/' + c.path
95100
if (c.children && c.children.length) {

src/views/infra/codegen/editTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<el-option label="Integer" value="Integer" />
3232
<el-option label="Double" value="Double" />
3333
<el-option label="BigDecimal" value="BigDecimal" />
34-
<el-option label="Date" value="Date" />
34+
<el-option label="LocalDateTime" value="LocalDateTime" />
3535
<el-option label="Boolean" value="Boolean" />
3636
</el-select>
3737
</template>

src/views/login.vue

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
<el-form-item prop="mobileCode">
5454
<el-input v-model="loginForm.mobileCode" type="text" auto-complete="off" placeholder="短信验证码"
5555
@keyup.enter.native="handleLogin">
56-
<template slot="icon">
56+
<template v-slot="icon">
5757
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
5858
</template>
59-
<template slot="append">
59+
<template v-slot="append">
6060
<span v-if="mobileCodeTimer <= 0" class="getMobileCode" @click="getSmsCode" style="cursor: pointer;">获取验证码</span>
6161
<span v-if="mobileCodeTimer > 0" class="getMobileCode">{{ mobileCodeTimer }}秒后可重新获取</span>
6262
</template>
@@ -115,6 +115,7 @@ import {
115115
} from "@/utils/auth";
116116
117117
import Verify from '@/components/Verifition/Verify';
118+
import {resetUserPwd} from "@/api/system/user";
118119
119120
export default {
120121
name: "Login",
@@ -254,19 +255,40 @@ export default {
254255
}
255256
});
256257
},
257-
doSocialLogin(socialTypeEnum) {
258+
async doSocialLogin(socialTypeEnum) {
258259
// 设置登录中
259260
this.loading = true;
260-
// 计算 redirectUri
261-
const redirectUri = location.origin + '/social-login?'
262-
+ encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
263-
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
264-
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
265-
// 进行跳转
266-
socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
267-
// console.log(res.url);
268-
window.location.href = res.data;
269-
});
261+
let tenant = false;
262+
if (this.tenantEnable) {
263+
await this.$prompt('请输入租户名称', "提示", {
264+
confirmButtonText: "确定",
265+
cancelButtonText: "取消"
266+
}).then(({value}) => {
267+
getTenantIdByName(value).then(res => {
268+
const tenantId = res.data;
269+
tenant = true
270+
if (tenantId && tenantId >= 0) {
271+
setTenantId(tenantId)
272+
}
273+
});
274+
}).catch(() => {
275+
return false
276+
});
277+
} else {
278+
tenant = true
279+
}
280+
if(tenant){
281+
// 计算 redirectUri
282+
const redirectUri = location.origin + '/social-login?'
283+
+ encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
284+
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
285+
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
286+
// 进行跳转
287+
socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
288+
// console.log(res.url);
289+
window.location.href = res.data;
290+
});
291+
}
270292
},
271293
/** ========== 以下为升级短信登录 ========== */
272294
getSmsCode() {

0 commit comments

Comments
 (0)