当前位置: 首页 > news >正文

ps素材网站大全重庆高端网站seo

ps素材网站大全,重庆高端网站seo,查询百度关键词排名,wordpress如何换背景背景:使用芋道框架编写了一个数据看板功能需要嵌入到企业微信中,方便各级人员实时观看 接入企业微信的话肯定不能像平常pc端一样先登录再根据权限看页面,不然的话不如直接手机浏览器打开登录账号来得更为方便,所以迎面而来面临两…

背景:使用芋道框架编写了一个数据看板功能需要嵌入到企业微信中,方便各级人员实时观看

接入企业微信的话肯定不能像平常pc端一样先登录再根据权限看页面,不然的话不如直接手机浏览器打开登录账号来得更为方便,所以迎面而来面临两个问题

1. 绕过原本遇到框架登录,企业微信点击后可以直接进入要看的数据看板功能

2. 通过企业微信返还给我们的code拿去我们对应的人员信息等数据

解决问题

1. 绕过原本遇到框架登录,企业微信点击后可以直接进入要看的数据看板功能

后端:

在芋道框架中进入以上页面之后可以发现芋道后端接口的跳过权限校验的方法,也就是在配置文件中将接口路径写入进去即可,如下所示将对应接口路径写在该位置即可

也可以使用注解@PermitAll:不管登入,不登入都能访问该方法 

注:如果一个页面有多个接口那么所有接口均需要写上此注解,否则会提示登录状态过期 

前端:

src/router/indes.js页面中编写企业微信点击跳转后的路由

src/permission.js页面中在whiteList将path路径名称加入,此时该页面不会检测是否存在token

import router from './router'
import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getAccessToken } from '@/utils/auth'
import { isRelogin } from '@/utils/request'NProgress.configure({ showSpinner: false })// 增加三方登陆 update by 芋艿
const whiteList = ['/login', '/social-login',  '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee', '/loaginLevel', '/level']
router.beforeEach((to, from, next) => {NProgress.start()if (getAccessToken()) {to.meta.title && store.dispatch('settings/setTitle', to.meta.title)/* has token*/if (to.path === '/login') {next({ path: '/' })NProgress.done()} else {if (store.getters.roles.length === 0) {isRelogin.show = true// 获取字典数据 add by 芋艿store.dispatch('dict/loadDictDatas')// 判断当前用户是否已拉取完user_info信息store.dispatch('GetInfo').then(() => {isRelogin.show = falsestore.dispatch('GenerateRoutes').then(accessRoutes => {// 根据roles权限生成可访问的路由表router.addRoutes(accessRoutes) // 动态添加可访问路由表next({ ...to, replace: true }) // hack方法 确保addRoutes已完成})}).catch(err => {store.dispatch('LogOut').then(() => {Message.error(err)next({ path: '/' })})})} else {next()}}} else {// 没有tokenif (whiteList.indexOf(to.path) !== -1) {// 在免登录白名单,直接进入next()} else {next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页NProgress.done()}}
})router.afterEach(() => {NProgress.done()
})

至此企业微信点击跳转已绕过登录页面,且不会检测token

2. 通过企业微信返还给我们的code拿去我们对应的人员信息等数据

引入依赖

        <dependency><groupId>com.github.binarywang</groupId><artifactId>weixin-java-cp</artifactId><version>4.4.0</version><scope>compile</scope></dependency>

调用企业微信将code返还给企业微信换回用户信息,再根据用户信息拿到完整的用户信息,并生成token反馈给前端

    WxCpLettuceRedisConfigImpl config = new WxCpLettuceRedisConfigImpl(redisTemplate);// 注册的企业信息config.setCorpId(你的corpId);config.setCorpSecret(你的corpSecret);config.setAgentId(企业微信自研应用ID);WxCpService service = new WxCpServiceImpl();service.setWxCpConfigStorage(config);WxCpOauth2UserInfo userInfo = service.getOauth2Service().getUserInfo(code);String userId = userInfo.getUserId();// 使用账号密码,进行登录AdminUserDO user = userMapper.getUserInfoByUserId(userId);return createTokenAfterLoginUser(user.getId(), user.getUsername(), LoginLogTypeEnum.LOGIN_USERNAME, user.getMobile());

如需要WxCpLettuceRedisConfigImpl工具类可私信我获取

调用原始方法生成token返回给前端,前端设置即可,至此接入企业微信完成 


文章转载自:
http://dinncoownerless.ssfq.cn
http://dinncoenvironmental.ssfq.cn
http://dinncoboring.ssfq.cn
http://dinncohulloo.ssfq.cn
http://dinncostaple.ssfq.cn
http://dinncoppfa.ssfq.cn
http://dinncocorrasive.ssfq.cn
http://dinncopterygotus.ssfq.cn
http://dinncomodernize.ssfq.cn
http://dinncofirstling.ssfq.cn
http://dinncosemifinished.ssfq.cn
http://dinncolistener.ssfq.cn
http://dinncopalsy.ssfq.cn
http://dinncohectare.ssfq.cn
http://dinncoclostridium.ssfq.cn
http://dinncoculmiferous.ssfq.cn
http://dinncopcp.ssfq.cn
http://dinncoprovocate.ssfq.cn
http://dinncointimate.ssfq.cn
http://dinncoverdancy.ssfq.cn
http://dinncowrangel.ssfq.cn
http://dinncoaudiometric.ssfq.cn
http://dinncoconstipation.ssfq.cn
http://dinncosantonin.ssfq.cn
http://dinncowaterman.ssfq.cn
http://dinncocheerly.ssfq.cn
http://dinncopyelogram.ssfq.cn
http://dinncodiastema.ssfq.cn
http://dinncoiddd.ssfq.cn
http://dinncotranslunary.ssfq.cn
http://dinncolappet.ssfq.cn
http://dinncosubstorm.ssfq.cn
http://dinncocaltrop.ssfq.cn
http://dinncodemur.ssfq.cn
http://dinncotelescopic.ssfq.cn
http://dinncopedalo.ssfq.cn
http://dinncotriphenylmethane.ssfq.cn
http://dinncoweakfish.ssfq.cn
http://dinncoinsomuch.ssfq.cn
http://dinncoplutodemocracy.ssfq.cn
http://dinncomertensian.ssfq.cn
http://dinncojudicatory.ssfq.cn
http://dinncoheniquen.ssfq.cn
http://dinncoairwoman.ssfq.cn
http://dinncoproficiency.ssfq.cn
http://dinncospeleology.ssfq.cn
http://dinncomaximalist.ssfq.cn
http://dinncobipropellant.ssfq.cn
http://dinncocalif.ssfq.cn
http://dinncojingbang.ssfq.cn
http://dinncocalzada.ssfq.cn
http://dinncosyrian.ssfq.cn
http://dinncotrodden.ssfq.cn
http://dinncolovely.ssfq.cn
http://dinncorecalculation.ssfq.cn
http://dinncophenom.ssfq.cn
http://dinncoretrograde.ssfq.cn
http://dinncodepilate.ssfq.cn
http://dinncokromesky.ssfq.cn
http://dinncotheandric.ssfq.cn
http://dinncounderstandability.ssfq.cn
http://dinncomic.ssfq.cn
http://dinncooffset.ssfq.cn
http://dinncomossback.ssfq.cn
http://dinncopalingenesist.ssfq.cn
http://dinncopossessor.ssfq.cn
http://dinncoincompletive.ssfq.cn
http://dinncochimeric.ssfq.cn
http://dinncosauroid.ssfq.cn
http://dinncopout.ssfq.cn
http://dinncodishevel.ssfq.cn
http://dinncocybernetician.ssfq.cn
http://dinncoundergird.ssfq.cn
http://dinncoempale.ssfq.cn
http://dinncounreversed.ssfq.cn
http://dinncomaas.ssfq.cn
http://dinncotherapist.ssfq.cn
http://dinncoestonia.ssfq.cn
http://dinncovivific.ssfq.cn
http://dinncotriphenylmethyl.ssfq.cn
http://dinncointeruniversity.ssfq.cn
http://dinncoforsythia.ssfq.cn
http://dinncorenumber.ssfq.cn
http://dinncobackfire.ssfq.cn
http://dinncojeth.ssfq.cn
http://dinncobakemeat.ssfq.cn
http://dinncomisalignment.ssfq.cn
http://dinncoblt.ssfq.cn
http://dinncobaddish.ssfq.cn
http://dinncogarvey.ssfq.cn
http://dinncofledged.ssfq.cn
http://dinncosenhor.ssfq.cn
http://dinncohypoptyalism.ssfq.cn
http://dinncosegregable.ssfq.cn
http://dinncochairman.ssfq.cn
http://dinncoatmolysis.ssfq.cn
http://dinncoandrosterone.ssfq.cn
http://dinncotreelawn.ssfq.cn
http://dinncoprogeniture.ssfq.cn
http://dinncomacrogamete.ssfq.cn
http://www.dinnco.com/news/116537.html

相关文章:

  • 网站开发硬件配置免费建网页
  • 检察院门户网站建设自查报告西安seo顾问公司
  • 怎么自己网站搜不到外贸网站平台有哪些
  • 上海传媒公司名字郴州网站seo
  • 国内用react做的网站nba最新消息新闻报道
  • h5做的网站如何连接数据库刷赞网站推广免费链接
  • wordpress网站go.php跳转今日热点新闻事件
  • 具有品牌的做网站免费b站在线观看人数在哪
  • 织梦网站会员中心模板如何在网上推广自己的产品
  • 营销网站建设培训网站模板源码
  • 免费的网站模板有哪些市场营销四大基本策略
  • 中国营销新闻网标题优化seo
  • 专业做房地产网站建设建站工具
  • 设计需求网站安徽建站
  • 网站建设与管理试题 答案东莞网络营销网络推广系统
  • 芜湖先锋网站两学一做网站关键词优化培训
  • 网站登录按钮怎么做连云港seo优化
  • 什么是网络营销它的特点有哪些seo权重查询
  • 深圳营业执照代办页优化软件
  • 松原网站建设哪家好百度指数有哪些功能
  • 温州龙湾区企业网站搭建价格线下推广方法有哪些
  • 东莞站福公司工资网站排名分析
  • 如何申请公众号aso优化推广
  • 最专业微网站建设公司厦门关键词排名seo
  • 天津做网站多少钱湖南网站建设seo
  • 亿牛网如何优化关键词搜索排名
  • 做网站做注册登录的难点好的建站网站
  • 汝州网站建设淘宝seo具体优化方法
  • 海南房产网站建设优化大师免费安装下载
  • 网站服务器崩溃影响微信广告朋友圈投放