Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
evoxwht 2023-05-18 14:51:59 +08:00
commit 8f95aaa79c
8 changed files with 36 additions and 42 deletions

View File

@ -11,11 +11,9 @@
namespace app\adminapi\controller;
use crmeb\services\CacheService;
use crmeb\utils\Rsa;
use think\facade\App;
use crmeb\utils\Captcha;
use app\services\system\admin\SystemAdminServices;
use think\facade\Cache;
/**
* 后台登陆
@ -85,7 +83,7 @@ class Login extends AuthController
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function login(Rsa $rsa)
public function login()
{
[$account, $password, $key, $captchaVerification, $captchaType] = $this->request->postMore([
'account',
@ -103,15 +101,6 @@ class Login extends AuthController
}
}
try {
if (strlen(trim($password)) > 500) {
return app('json')->fail(400762);
}
$password = $rsa->privateDecrypt($password);
} catch (\Throwable $e) {
return app('json')->fail($e->getMessage());
}
if (strlen(trim($password)) < 6 || strlen(trim($password)) > 32) {
return app('json')->fail(400762);
}

View File

@ -23,7 +23,6 @@ use app\services\system\SystemMenusServices;
use crmeb\services\CacheService;
use crmeb\services\FormBuilder;
use crmeb\services\workerman\ChannelService;
use crmeb\utils\Rsa;
use think\facade\Config;
use think\facade\Event;
use think\Model;
@ -168,8 +167,7 @@ class SystemAdminServices extends BaseServices
'copyright' => sys_config('nncnL_crmeb_copyright', ''),
'version' => get_crmeb_version(),
'key' => $key,
'login_captcha' => 0,
'publicKey' => app()->make(Rsa::class)->getPublicKey()
'login_captcha' => 0
];
if (CacheService::get('login_captcha', 1) > 1) {
$data['login_captcha'] = 1;

View File

@ -196,7 +196,6 @@ new Vue({
}
});
}
console.log(to.name);
if (
[
'product_productAdd',

View File

@ -75,7 +75,6 @@ import '@/assets/js/canvas-nest.min';
import Verify from '@/components/verifition/Verify';
import { PrevLoading } from '@/utils/loading.js';
import { formatFlatteningRoutes, findFirstNonNullChildren } from '@/libs/system';
import { encryptWithKey } from '@/utils/ase.js';
export default {
components: {
@ -108,7 +107,6 @@ export default {
key: '',
copyright: '',
version: '',
publicKey: '',
};
},
created() {
@ -172,7 +170,6 @@ export default {
this.swiperList = data.slide.length ? data.slide : [{ slide: this.defaultSwiperList }];
this.key = data.key;
this.copyright = data.copyright;
this.publicKey = data.publicKey;
this.version = data.version;
this.login_captcha = data.login_captcha;
})
@ -196,7 +193,7 @@ export default {
this.loading = true;
AccountLogin({
account: this.formInline.username,
pwd: encryptWithKey(this.formInline.password, this.publicKey),
pwd: this.formInline.password,
key: this.key,
captchaType: 'blockPuzzle',
captchaVerification: params ? params.captchaVerification : '',

View File

@ -356,7 +356,7 @@ export default {
.then(async (res) => {
this.$Message.success(res.msg);
this.modals = false;
this.$emit('changeMenu');
this.$emit('changeMenu', this.formValidate);
this.getAddFrom();
// this.$store.dispatch('menus/getMenusNavList');
})

View File

@ -199,6 +199,7 @@ export default {
seletRouteIds: [], // 选中id
menusId: 0, // 选中分类id
nodeKey: 0, // 选中节点
openId: '',
};
},
components: { menusFrom, formCreate: formCreate.$form() },
@ -398,6 +399,7 @@ export default {
},
// 编辑
edit(row, title, index) {
this.openId = row.id;
this.formValidate = {};
this.menusDetails(row.id);
this.titleFrom = title;
@ -440,10 +442,24 @@ export default {
this.$Message.error(res.msg);
});
},
changeMenu() {
// this.getData(1);
changeMenu(data) {
console.log(data)
this.changeData(this.tableData, data);
this.getMenusUnique();
},
changeData(arr, data) {
let arrKey = Object.keys(data);
arr.map((e) => {
if (e.id == this.openId) {
arrKey.map((el) => {
e[el] = data[el];
});
console.log(e);
} else if (e.children) {
this.changeData(e.children, data);
}
});
},
getMenusUnique() {
getMenusUnique().then((res) => {
let data = res.data;
@ -483,11 +499,14 @@ export default {
> .vxe-table--header-wrapper {
background: #fff !important;
}
.icon {
font-size: 20px;
}
}
/deep/ .vxe-table--render-default .vxe-table--border-line {
z-index: 2 !important;
}
.rule {
display: flex;
flex-wrap: wrap;

View File

@ -12,18 +12,6 @@
@on-visible-change="visible"
>
<Form ref="formValidate" :model="formValidate" :label-width="110" @submit.native.prevent>
<!-- <Row type="flex" :gutter="24">
<Col span="24">
<FormItem label="类型:">
<RadioGroup v-model="formValidate.auth_type" @on-change="changeRadio">
<Radio :label="item.value" v-for="(item, i) in optionsRadio" :key="i">
<Icon type="social-apple"></Icon>
<span>{{ item.label }}</span>
</Radio>
</RadioGroup>
</FormItem>
</Col>
</Row> -->
<Row type="flex" :gutter="24">
<Col v-bind="grid">
<FormItem :label="!authType ? '接口名称:' : '按钮名称:'" prop="menu_name">
@ -95,6 +83,16 @@
</RadioGroup>
</FormItem>
</Col> -->
<Col v-bind="grid">
<FormItem label="类型:">
<RadioGroup v-model="formValidate.auth_type" @on-change="changeRadio">
<Radio :label="item.value" v-for="(item, i) in optionsRadio" :key="i">
<Icon type="social-apple"></Icon>
<span>{{ item.label }}</span>
</Radio>
</RadioGroup>
</FormItem>
</Col>
<Col v-bind="grid">
<FormItem label="状态:">
<RadioGroup v-model="formValidate.is_show">

View File

@ -98,12 +98,6 @@ module.exports = {
config.resolve.alias.set('@api', resolve('src/api'));
// node
config.node.set('__dirname', true).set('__filename', true);
// 判断是否需要加入模拟数据
const entry = config.entry('app');
if (Setting.isMock) {
entry.add('@/mock').end();
}
config.plugin('monaco').use(new MonacoWebpackPlugin());
},
// 设为false打包时不生成.map文件