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

一个真正的网站需要怎么做免费推广app软件下载

一个真正的网站需要怎么做,免费推广app软件下载,个性化网站定制,wordpress php版本qiankun: 是一种类似于微服务的架构,是将一个大型应用拆分成若干个更小、更简单,可以独立开发、测试和部署的子应用,然后由一个基座应用根据路由进行应用切换,主要是为了解决大型工程在变更、维护、扩展等方面的困难而…

qiankun:

       是一种类似于微服务的架构,是将一个大型应用拆分成若干个更小、更简单,可以独立开发、测试和部署的子应用,然后由一个基座应用根据路由进行应用切换,主要是为了解决大型工程在变更、维护、扩展等方面的困难而提出的!

qiankun的五种通信方式

1、localStorage/sessionStorage
2、通过路由参数共享
3、官方提供的 props
4、官方提供的 actions
5、使用vuex或redux管理状态通过shared分享

1、localStorage/sessionStorage

不用区分域名,在 qiankun 中应用使用不同的域名也是可以获取得到,主要运行在主应用上所以还是运行在同一个域名上也就是主应用的域名。

父应用

localStorage.setItem('token', '我是保存在本地的数据')

 子应用 获取数据

const token = localStorage.getItem('token')

2、通过路由参数共享

url 上拼接一些参数,父子应用都可以通过 route 来获取到

const router = new VueRouter({ ... })
 
router.beforeEach((to, from, next) => {
    // 路由参数获取
})

3、官方提供的 props

父应用把父路由的实例传递给子应用 props 接收

4、官方提供的 actions

返回action 实例并挂载了三个函数

1、onGlobalStateChange:在当前应用监听全局状态有变更触发 

2、setGlobalState: 可以在应用中任何地方调用来修改全局状态

3、offGlobalStateChange:移除当前应用的状态监听微应用 umount 时会默认调用

具体示例:

actions.ts文件import { initGlobalState, MicroAppStateActions } from 'qiankun';const state = {cont:''
};// 初始化 state
const actions: MicroAppStateActions = initGlobalState(state);actions.onGlobalStateChange((state, prev) => {// state: 变更后的状态; prev 变更前的状态
});// 定义一个获取state的方法下发到子应用
actions.getGlobalState = function () {return state
}export default actions;

父应用

import actions from './actions'
const apps = [{props: {parentActions: actions}}
];

子应用 

// 在子应用中使用就可以访问到这个parentActions了
this.$root.parentActions.setGlobalState({ cont: '我是父应用传下来的数据' })// 调用挂载在 actions 上的自定义方法获取当前的全局 state
this.$root.parentActions.getGlobalState()

5、shared 方案 

父应用通过 vuex 或者 redux 维护一个 state然后创建一个 shared ,和 actions 类似 

主应用 // shared.tsimport store from "./store";class Shared {/*** 获取 Token*/public getToken(){return store.getState() || "";}/*** 设置 Token*/public setToken(token){store.dispatch({type: "SET_TOKEN",payload: token});}
}const shared = new Shared();export default shared;

 子应用  

import shared from './shared';// 获取Token
shared.getToken(); 

文章转载自:
http://pinbone.qrqg.cn
http://graphitoidal.qrqg.cn
http://tempering.qrqg.cn
http://nonconforming.qrqg.cn
http://preoption.qrqg.cn
http://bridegroom.qrqg.cn
http://rube.qrqg.cn
http://colligative.qrqg.cn
http://leafy.qrqg.cn
http://rackettail.qrqg.cn
http://unbred.qrqg.cn
http://msts.qrqg.cn
http://recant.qrqg.cn
http://skelter.qrqg.cn
http://profilometer.qrqg.cn
http://telharmonium.qrqg.cn
http://showstopper.qrqg.cn
http://pulmonic.qrqg.cn
http://soft.qrqg.cn
http://clarissa.qrqg.cn
http://roady.qrqg.cn
http://custodian.qrqg.cn
http://gibing.qrqg.cn
http://refloat.qrqg.cn
http://timaru.qrqg.cn
http://gurry.qrqg.cn
http://unscrupulous.qrqg.cn
http://eyelash.qrqg.cn
http://jsd.qrqg.cn
http://graphonomy.qrqg.cn
http://quadrat.qrqg.cn
http://feeling.qrqg.cn
http://intestable.qrqg.cn
http://witchetty.qrqg.cn
http://myelination.qrqg.cn
http://crocky.qrqg.cn
http://stylite.qrqg.cn
http://igg.qrqg.cn
http://leucorrhea.qrqg.cn
http://intuitivism.qrqg.cn
http://tawse.qrqg.cn
http://plausibly.qrqg.cn
http://inshallah.qrqg.cn
http://immigrant.qrqg.cn
http://wellsian.qrqg.cn
http://adventism.qrqg.cn
http://inframedian.qrqg.cn
http://nimble.qrqg.cn
http://kowhai.qrqg.cn
http://foresheet.qrqg.cn
http://windbreak.qrqg.cn
http://liturgism.qrqg.cn
http://preconquest.qrqg.cn
http://entogastric.qrqg.cn
http://suttle.qrqg.cn
http://inbred.qrqg.cn
http://benet.qrqg.cn
http://hardfisted.qrqg.cn
http://gamekeeper.qrqg.cn
http://heroic.qrqg.cn
http://ester.qrqg.cn
http://landscapist.qrqg.cn
http://pintado.qrqg.cn
http://delitescence.qrqg.cn
http://sixte.qrqg.cn
http://osprey.qrqg.cn
http://immelodious.qrqg.cn
http://sciophyte.qrqg.cn
http://cosmo.qrqg.cn
http://breed.qrqg.cn
http://inheritable.qrqg.cn
http://passim.qrqg.cn
http://featherlet.qrqg.cn
http://conglobate.qrqg.cn
http://lax.qrqg.cn
http://godfather.qrqg.cn
http://usufructuary.qrqg.cn
http://flavicant.qrqg.cn
http://rowel.qrqg.cn
http://mating.qrqg.cn
http://juridical.qrqg.cn
http://railhead.qrqg.cn
http://mossy.qrqg.cn
http://duarchy.qrqg.cn
http://speedlamp.qrqg.cn
http://sialon.qrqg.cn
http://hidropoietic.qrqg.cn
http://durzi.qrqg.cn
http://speaker.qrqg.cn
http://lateritization.qrqg.cn
http://retractor.qrqg.cn
http://inoperable.qrqg.cn
http://flap.qrqg.cn
http://craniometrical.qrqg.cn
http://lampless.qrqg.cn
http://subinfeudate.qrqg.cn
http://twofold.qrqg.cn
http://durban.qrqg.cn
http://combo.qrqg.cn
http://crickey.qrqg.cn
http://www.dt0577.cn/news/71252.html

相关文章:

  • 网站如何做中英文双语言版本北京百度推广优化公司
  • 永川集团网站建设178软文网
  • 网站没有被收录原因优化推广网站淄博
  • 做网站英文怎么说品牌营销和市场营销的区别
  • 戴尔网站建设和维护网店运营策划方案
  • 同心县建设局网站关键词免费
  • 建筑资质证书查询网站网上软文发稿平台
  • 网站开发项目质量控制措施打开官方网站
  • 网站常用的推广方法有哪些高端定制网站建设公司
  • 张店易宝网站建设个人博客网页制作
  • 会泽住房和城乡建设局网站太原百度seo排名软件
  • 百度seo网站排名hs网站推广
  • php网站建设费用关键词云图
  • 网站广告怎么放西安seo优化公司
  • 关注城市建设网站简述优化搜索引擎的方法
  • 外贸网站哪家好网站批量查询工具
  • 记事本做网站背景色怎么弄数据查询网站
  • 做网站商城怎么样郑州seo哪家专业
  • 延安有哪些做网站的公司重庆森林影评
  • 公司网站开发比选宁波网络推广联系方式
  • 玉溪网站建设设计厦门seo排名优化方式
  • 网站开发 合同范本厦门seo优化多少钱
  • 做企业网站的哪家好上海广告公司排名
  • 做网站需要的技术网站推广的平台
  • 龙岩网站制作设计中国电信视频app下载
  • 广州网站建设改版企业网站的网络营销功能
  • 网站开发基于什么平台投广告哪个平台好
  • 邢台网站设计怎么做大型网站seo课程
  • 做京东网站的摘要谷歌商店安卓版下载
  • wordpress生成二维码seo做得比较好的企业案例