上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页
摘要: 修改用户不能修改Id及用户名所以创建视图模型时需要去除,新增用户跟修改用户基本视图一直,所以不再做演示 一、新建UpdateUserViewModel视图模型 using System.ComponentModel; using System.ComponentModel.DataAnnotatio 阅读全文
posted @ 2020-06-29 14:09 liessay 阅读(843) 评论(0) 推荐(1) 编辑
摘要: 用户注册主要有2个方法,1、密码加密 2、用户注册 3、ASP.NET Core Identity 使用密码策略、锁定和 cookie 配置等设置的默认值。 可以在类中重写这些设置 Startup(官方详情点这里) 首先创建CreateUserViewModel视图模型 using System.C 阅读全文
posted @ 2020-06-29 13:45 liessay 阅读(864) 评论(0) 推荐(0) 编辑
摘要: 在Controllers中新建AccountController,并在构造方法(函数)中注入SignInManager,UserManager UserManager 用户管理(注册,查找,修改,删除用户等) SignInManager 用户登录管理(登录,注销等) private readonly 阅读全文
posted @ 2020-06-29 13:36 liessay 阅读(1087) 评论(0) 推荐(0) 编辑
摘要: 理论知识微软官方文档最完整,最详细,这里只一步步的介绍如何使用,地址:https://docs.microsoft.com/zh-cn/aspnet/core/security/authentication/?view=aspnetcore-3.1 一、新建Mvc项目 二、加入EF依赖 浏览输入en 阅读全文
posted @ 2020-06-29 13:10 liessay 阅读(1089) 评论(1) 推荐(1) 编辑
摘要: 状态管理保存在store\index.js中,简单说明如下 import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ //存放状态 state: { //单个值 Name: 阅读全文
posted @ 2020-06-28 17:11 liessay 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 在router文件夹下的index.js中加入红色字体代码即可解决 import Vue from 'vue' import VueRouter from 'vue-router' Vue.use(VueRouter) const routes = [ { path: '/', name: 'Log 阅读全文
posted @ 2020-06-28 16:56 liessay 阅读(3715) 评论(0) 推荐(0) 编辑
摘要: 解决方式一 添加按键修饰符@keyup.enter.native 解决方式二 把事件绑定到父元素(外框),需注意多个input问题 <div @keyup.enter="login"> <input type="text"> </div> 阅读全文
posted @ 2020-06-25 11:03 liessay 阅读(4263) 评论(0) 推荐(0) 编辑
摘要: 系统默认提供了获取当前用户的api方法 https://localhost:44364/api/identity/my-profile 手工实现方法:abp后台获取当前用户需要在AppService应用层注入CurrentUser currentUser,如本例 using System; usin 阅读全文
posted @ 2020-06-23 13:18 liessay 阅读(3233) 评论(0) 推荐(0) 编辑
摘要: 因为Abp vNext没找到Vue的模板,网上也没找到相关vNext的例子,只能自己试着写写,asp.net core abp vue都是刚学不久,所以很粗糙也可能有错误的地方,如果您看到请指正,谢谢 一、新建Vue项目,为了方便我是用vue ui方式建的,增加了element(样式),axios( 阅读全文
posted @ 2020-06-23 12:56 liessay 阅读(3411) 评论(1) 推荐(1) 编辑
摘要: 在Shop.Application.Contracts项目中Permissions目录下ShopPermissions定义权限名 namespace Shop.Permissions { public static class ShopPermissions { public const strin 阅读全文
posted @ 2020-06-21 17:27 liessay 阅读(1468) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页