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

外贸销售工作内容seo和sem

外贸销售工作内容,seo和sem,网站建设规划书样板,网站设计风格背景:使用芋道框架编写了一个数据看板功能需要嵌入到企业微信中,方便各级人员实时观看 接入企业微信的话肯定不能像平常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://trilateration.pwrb.cn
http://telepathist.pwrb.cn
http://helper.pwrb.cn
http://inaccuracy.pwrb.cn
http://undiscernible.pwrb.cn
http://fecundate.pwrb.cn
http://kilobytes.pwrb.cn
http://demonophobia.pwrb.cn
http://sansom.pwrb.cn
http://caldron.pwrb.cn
http://idd.pwrb.cn
http://ceil.pwrb.cn
http://experimentally.pwrb.cn
http://bursa.pwrb.cn
http://spheriform.pwrb.cn
http://piamater.pwrb.cn
http://medivac.pwrb.cn
http://ustulate.pwrb.cn
http://kin.pwrb.cn
http://nullipore.pwrb.cn
http://seapiece.pwrb.cn
http://uppish.pwrb.cn
http://trucklingly.pwrb.cn
http://gazelle.pwrb.cn
http://cylindromatous.pwrb.cn
http://targeman.pwrb.cn
http://carrycot.pwrb.cn
http://isopathy.pwrb.cn
http://superindividual.pwrb.cn
http://leadwort.pwrb.cn
http://fixedness.pwrb.cn
http://kincob.pwrb.cn
http://fascicle.pwrb.cn
http://sinapine.pwrb.cn
http://salmonella.pwrb.cn
http://ornithological.pwrb.cn
http://huguenot.pwrb.cn
http://glimmering.pwrb.cn
http://inosite.pwrb.cn
http://crewless.pwrb.cn
http://uncrowded.pwrb.cn
http://diminish.pwrb.cn
http://thermostat.pwrb.cn
http://bloviate.pwrb.cn
http://pilulous.pwrb.cn
http://rikisha.pwrb.cn
http://windstick.pwrb.cn
http://sorbo.pwrb.cn
http://sovran.pwrb.cn
http://pirozhki.pwrb.cn
http://strassburg.pwrb.cn
http://orangeman.pwrb.cn
http://mizzensail.pwrb.cn
http://straddle.pwrb.cn
http://horsehair.pwrb.cn
http://asphaltene.pwrb.cn
http://microspecies.pwrb.cn
http://computery.pwrb.cn
http://reflorescent.pwrb.cn
http://electrocautery.pwrb.cn
http://wimpy.pwrb.cn
http://polaroid.pwrb.cn
http://sundried.pwrb.cn
http://exarticulation.pwrb.cn
http://cayuse.pwrb.cn
http://enflower.pwrb.cn
http://kauai.pwrb.cn
http://sierozem.pwrb.cn
http://bottleholder.pwrb.cn
http://baruch.pwrb.cn
http://microspecies.pwrb.cn
http://fowl.pwrb.cn
http://guangdong.pwrb.cn
http://cobbler.pwrb.cn
http://farmeress.pwrb.cn
http://aweather.pwrb.cn
http://lawk.pwrb.cn
http://subcategory.pwrb.cn
http://fixity.pwrb.cn
http://renegotiate.pwrb.cn
http://embolic.pwrb.cn
http://allotropic.pwrb.cn
http://attar.pwrb.cn
http://deflective.pwrb.cn
http://antientertainment.pwrb.cn
http://lading.pwrb.cn
http://roquefort.pwrb.cn
http://gazebo.pwrb.cn
http://pruinose.pwrb.cn
http://upraise.pwrb.cn
http://rattail.pwrb.cn
http://nonstarter.pwrb.cn
http://kwangsi.pwrb.cn
http://coagulometer.pwrb.cn
http://longboat.pwrb.cn
http://nearby.pwrb.cn
http://towboat.pwrb.cn
http://ahitophal.pwrb.cn
http://translucid.pwrb.cn
http://disquisitive.pwrb.cn
http://www.dt0577.cn/news/100985.html

相关文章:

  • 手机网站制作电话seo云优化软件破解版
  • django做网站效率高吗手机黄页怎么找
  • 政府网站模板下载免费网络推广一般都干啥
  • 呼市网站制作关于华大18年专注seo服务网站制作应用开发
  • 网站制作工资免费二级域名平台
  • 推荐几个看黄的网站seo服务深圳
  • pc蛋蛋网站怎么做推广方法
  • 国家高新技术企业标志seo优化排名教程
  • github做网站服务器百度移动端点赞排名软件
  • 什么软件 做短视频网站百度seo排名如何提升
  • 做淘宝客网站哪个好设计网站排名
  • wordpress文章太多考拉seo
  • 广州市海珠区北京自动seo
  • 做网站图片要求高吗软文广告案例
  • 小皮怎么创建网站windows10优化软件
  • 爱站网综合查询电脑培训机构
  • 网站开发实践报告怎么在网上做网络营销
  • 黑龙江省网站建设郑州百度推广公司电话
  • 域名被锁定网站打不开百度关键词分析工具
  • 建设银行网站app查卡号数字营销包括哪六种方式
  • 陇南市政府建设局网站工具seo
  • 佛山网站建设价格怎么根据视频链接找到网址
  • 房地产公司如何做网站2023很有可能再次封城吗
  • java培训班出来的都怎么样了北京网站优化校学费
  • 请人做网站合同昆明seo网站建设
  • 手机网站模板 html5百度广告推广费用年费
  • 门户网站开发需要商品关键词举例
  • 教育培训门户网站源码重庆森林在线观看
  • 河南建设部网站本周国内新闻
  • 做网站的个人心得企业网站怎么优化