提交 977bb08c 编写于 作者: D DCloud_LXH

update: 1. 修复侧边栏遮挡导航下边线 2. 添加底部footer

上级 01d10610
...@@ -65,4 +65,12 @@ const config = { ...@@ -65,4 +65,12 @@ const config = {
} }
} }
module.exports = config module.exports = config
\ No newline at end of file
/**
* 1. 路由映射:由于文档文件变动,将之前的链接重定向到新的链接
* 2. 修复文档渲染错误的 Bug
* 3. 搜索 配置更新
* 4. 更新 slugify 配置规则
* 5. 合并文档
*/
\ No newline at end of file
<template>
<div ref="container" id="footNavBox">
<div class="footNav">
<div id="footNavClassify">
<footNavItem :list="footNavList" />
</div>
<div id="aboutusBox">
<footNavItem :list="aboutusList" />
</div>
</div>
<div class="hbLogo"></div>
<div class="companyBox">
<span class="companyInfo">DCloud 即数字天堂(北京)网络技术有限公司是</span>
<div style="display: inline; margin-left: 5px" class="companyInfo">
<a href="//www.w3.org/" target="_blank" class="w3c">W3C</a>
成员及
<a href="//www.html5plus.org/" target="_blank" class="html5">HTML5中国产业联盟</a>
发起单位
</div>
</div>
<div class="beianBox">
<a
id="domain"
class="beian"
href="https://beian.miit.gov.cn/#/Integrated/index"
target="_blank"
>
{{ domain }}
</a>
<div class="domainImgBox">
<img
class="domainImg"
src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f184e7c3-1912-41b2-b81f-435d1b37c7b4/769929a3-65eb-4d11-815d-84f88197a152.png"
/>
<a
class="beian"
href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802035340"
target="_blank"
>
京公网安备:11010802035340号
</a>
</div>
<span class="anbaoInfo">国家信息安全等级保护三级,证书编号:11010813802-20001</span>
</div>
</div>
</template>
<script>
export default {
components: {
footNavItem: {
functional: true,
props: {
list: {
type: Array,
default: () => [],
},
},
render: (h, { props }) => {
return props.list.map((footNavListItem, _index) =>
h('div', { class: 'footNavItem', key: footNavListItem.title || _index }, [
h('div', { class: 'navItemTitle' }, footNavListItem.title),
h('div', { class: 'navLine' }),
h(
'div',
{ class: 'navItemDetailBox' },
footNavListItem.content.map((item, index) =>
h(
'a',
{
class: 'navItemDetail',
target: '_blank',
key: item.url || index,
href: item.url,
},
item.subTitle
)
)
),
])
);
},
},
},
data: () => ({
footNavList: [
{
title: '开发产品',
content: [
{
subTitle: 'HBuilderX',
url: 'https://www.dcloud.io/hbuilderx.html',
},
{
subTitle: 'uni-app',
url: 'https://uniapp.dcloud.net.cn/',
},
{
subTitle: 'uniCloud',
url: 'https://uniapp.dcloud.net.cn/uniCloud/README',
},
{
subTitle: 'uniMPsdk',
url: 'https://nativesupport.dcloud.net.cn/',
},
{
subTitle: '5+Runtime',
url: 'https://www.dcloud.io/runtime.html',
},
{
subTitle: 'wap2app',
url: 'https://www.dcloud.io/wap2app.html?platform=wap2app',
},
{
subTitle: 'MUI',
url: 'https://www.dcloud.io/mui.html',
},
{
subTitle: 'uni-id',
url: 'https://uniapp.dcloud.net.cn/uniCloud/uni-id',
},
{
subTitle: 'uniPay',
url: 'https://uniapp.dcloud.net.cn/uniCloud/unipay',
},
{
subTitle: 'uniPush',
url: 'https://uniapp.dcloud.net.cn/unipush',
},
{
subTitle: 'uni-verify',
url: 'https://uniapp.dcloud.io/univerify',
},
{
subTitle: 'sms',
url: 'https://uniapp.dcloud.net.cn/uniCloud/send-sms',
},
{
subTitle: 'uni-starter',
url: 'https://ext.dcloud.net.cn/plugin?id=5057',
},
{
subTitle: 'uni-admin',
url: 'https://uniapp.dcloud.net.cn/uniCloud/admin',
},
{
subTitle: 'uni-upgrade-center',
url: 'https://uniapp.dcloud.io/uniCloud/upgrade-center',
},
],
},
],
aboutusList: [
{
title: '运营产品',
content: [
{
subTitle: 'uni-AD',
url: 'https://uniad.dcloud.net.cn/login',
},
{
subTitle: 'uni统计',
url: 'https://tongji.dcloud.net.cn/',
},
{
subTitle: 'uni发行',
url: 'https://www.dcloud.io/dportal.html',
},
{
subTitle: '',
url: '',
},
{
subTitle: '',
url: '',
},
{
subTitle: '',
url: '',
},
],
},
/* {
'title': '',
'content': []
}, */
{
title: '开发者服务',
content: [
{
subTitle: '问答社区',
url: 'https://ask.dcloud.net.cn/explore/',
},
{
subTitle: '开发者后台',
url: 'https://dev.dcloud.net.cn/',
},
],
},
{
title: '技术文档',
content: [
{
subTitle: 'uni-app文档',
url: 'https://uniapp.dcloud.io/',
},
{
subTitle: 'uniCloud文档',
url: 'https://uniapp.dcloud.io/uniCloud/README',
},
{
subTitle: '原生开发者支持文档',
url: 'https://nativesupport.dcloud.net.cn/',
},
{
subTitle: 'HBuilder文档',
url: 'https://hx.dcloud.net.cn/',
},
],
},
{
title: '生态服务',
content: [
{
subTitle: '插件市场',
url: 'https://ext.dcloud.net.cn/',
},
{
subTitle: 'OAuth用户开放平台',
url: 'https://open.dcloud.net.cn/pages/login/login',
},
],
},
{
title: '关于我们',
content: [
{
subTitle: 'DCloud官网',
url: 'https://dcloud.io/',
},
{
subTitle: '案例',
url: 'https://uniapp.dcloud.io/case',
},
{
subTitle: '需求墙',
url: 'https://dev.dcloud.net.cn/wish/?channel=uniapp',
},
{
subTitle: '许可协议',
url: 'https://ask.dcloud.net.cn/article/35623',
},
{
subTitle: '加入我们',
url: 'https://www.dcloud.io/hr/',
},
{
subTitle: '赞助我们',
url: 'https://dev.dcloud.net.cn/sponsor/',
},
],
},
{
title: '联系我们',
content: [
{
subTitle: '商务合作:bd@dcloud.io',
url: 'mailto:bd@dcloud.io',
},
{
subTitle: '广告合作:uniad@dcloud.io',
url: 'mailto:uniad@dcloud.io',
},
],
},
],
domain: '',
}),
mounted() {
if (document.domain === 'uniapp.dcloud.net.cn') {
this.domain = '京ICP备12046007号-4';
} else {
this.domain = '蒙ICP备14002744号-1';
}
this.fixBottom();
},
methods: {
fixBottom() {
this.$nextTick(() => {
this.$refs.container.style.bottom = `0px`;
const bottom =
document.documentElement.clientHeight -
this.$refs.container.getBoundingClientRect().bottom;
if (bottom > 0) {
const preBottom = parseFloat(this.$refs.container.style.bottom);
console.log('🚀 ~ file: Footer.vue ~ line 296 ~ this.$nextTick ~ preBottom', preBottom);
this.$refs.container.style.position = 'relative';
this.$refs.container.style.bottom = `-${bottom}px`;
} else {
this.$refs.container.removeAttribute('style');
}
});
},
},
watch: {
$route() {
this.fixBottom();
},
},
};
</script>
<style lang="stylus">
@import '../styles/footer.styl'
</style>
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
{ {
let sideTop = this.navbarHeight - scrollTop let sideTop = this.navbarHeight - scrollTop
sideTop <= this.subNavBarHeight && (sideTop = this.subNavBarHeight) sideTop <= this.subNavBarHeight && (sideTop = this.subNavBarHeight)
this.sideBar && (this.sideBar.style.top = `${sideTop}px`) this.sideBar && (this.sideBar.style.top = `${sideTop + 1}px`)
} }
if (scrollTop >= this.mainNavBarHeight) { if (scrollTop >= this.mainNavBarHeight) {
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
if(!os.pc) return if(!os.pc) return
this.navbarHeight = this.navbar.clientHeight this.navbarHeight = this.navbar.clientHeight
this.subNavBarHeight = this.subNavBar.clientHeight this.subNavBarHeight = this.subNavBar.clientHeight
this.sideBar.style.top = `${this.navbarHeight}px` this.sideBar.style.top = `${this.navbarHeight + 1}px`
}) })
} }
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
</template> </template>
<template #bottom> <template #bottom>
<slot name="page-bottom" /> <slot name="page-bottom" />
<Footer />
</template> </template>
</Page> </Page>
</div> </div>
...@@ -48,6 +49,7 @@ import Home from '@theme/components/Home.vue' ...@@ -48,6 +49,7 @@ import Home from '@theme/components/Home.vue'
import Navbar from '@theme/components/Navbar.vue' import Navbar from '@theme/components/Navbar.vue'
import Page from '@theme/components/Page.vue' import Page from '@theme/components/Page.vue'
import Sidebar from '@theme/components/Sidebar.vue' import Sidebar from '@theme/components/Sidebar.vue'
import Footer from '@theme/components/Footer.vue';
import { resolveSidebarItems, forbidScroll } from '../util' import { resolveSidebarItems, forbidScroll } from '../util'
import navProvider from '../mixin/navProvider'; import navProvider from '../mixin/navProvider';
...@@ -58,7 +60,8 @@ export default { ...@@ -58,7 +60,8 @@ export default {
Home, Home,
Page, Page,
Sidebar, Sidebar,
Navbar Navbar,
Footer
}, },
data () { data () {
return { return {
......
$w3cColor = #007aff
$html5Color = #fb6f18
.footNav
width 90%
display flex
justify-content center
/* 通用底部导航栏---移动端 */
@media screen and (max-width $MQMobile)
#aboutusBox
max-height 650px
.footNavItem
margin-right 10px
.navLine
width 90%
.companyBox
flex-direction column
align-items center
.anbaoInfo
width 330px
text-align center
padding-bottom 30px
.companyInfo, .anbaoInfo
margin-left 0px
.beianBox
flex-direction column
.beian
margin 5px 0
.domainImgBox
display flex
flex-direction row
align-items center
.hbLogo
margin 40px 0 20px 0
.navItemDetail
width 100px
margin-right 0px
.navItemDetailBox
display flex
flex-direction row
flex-wrap wrap
align-items flex-start
justify-content flex-start
#moreInfo
flex-direction column
margin 20px 20px 0 20px
/* 通用底部导航栏---ipad */
@media screen and (min-width $MQMobile) and (max-width 1190px)
#footNavClassify
min-width 145px
.footNav
margin 30px 10px
#aboutusBox
flex-direction row
max-height 465px
.footNavItem
width 20%
.footNavItem
margin-right 5%
.navLine
width 70%
.beianBox
flex-direction column
.beian
margin 10px 0
.domainImgBox
display flex
flex-direction row
align-items center
.companyInfo, .anbaoInfo
margin-left 0px
.anbaoInfo
text-align center
padding-bottom 30px
.footNav
margin 0 20px
.navItemDetail
width 140px
margin-right 25px
.footNavItem
width 100%
.hbLogo
margin 50px 0 30px 0
#moreInfo
flex-direction column
margin 20px 20px 0 20px
/* 小屏笔记本---pc */
@media only screen and (min-width 1191px) and (max-width 1500px)
#footNavClassify
min-width 280px
margin-right 2%
#footNavBox
padding-bottom 45px
.footNav
margin 30px 10px
justify-content space-around
.footNavItem
margin-right 5%
.navLine
width 90%
.navItemDetailBox
max-height 285px
#aboutusBox
flex-direction row
width 70%
.footNavItem
width 20%
.companyInfo, .anbaoInfo
margin-left 20px
.beianBox
flex-direction row
.beian
margin 10px 0
.hbLogo
margin 50px 0 30px 0
.navItemDetail
width 140px
#moreInfo
flex-direction row
margin 5px 20px 0 20px
/* 通用底部导航栏---pc */
@media screen and (min-width 1501px)
#footNavClassify
width 20%
margin-right 20px
min-width 350px
#footNavBox
padding-bottom 45px
.footNav
margin 30px 10px
.footNavItem
margin-right 50px
.navLine
width 100%
.navItemDetailBox
max-height 285px
#aboutusBox
flex-direction column
width 80%
max-height 370px
.companyInfo, .anbaoInfo
margin-left 20px
.beianBox
flex-direction row
.beian
margin 10px 0
.hbLogo
margin 50px 0 30px 0
.navItemDetail
width 140px
#moreInfo
flex-direction row
margin 5px 20px 0 20px
/* 通用底部导航栏---公共 */
#footNavBox
display flex
flex-direction column
width 100%
flex-wrap wrap
/* justify-content left */
justify-content center
align-items center
margin-top 30px
background #fbfbfb
box-shadow #00000021 0px -20px 15px -15px
.w3c
text-decoration none
color $w3cColor !important
font-weight 800 !important
.html5
text-decoration none
color $html5Color !important
font-weight 800 !important
.hbLogo
display inline-block
width 160px
height 25px
background url('https//bjetxgzv.cdn.bspapp.com/VKCEYUGU-dc-site/d141de00-607f-11eb-8a36-ebb87efcf8c0.svg')
no-repeat center
.beianBox
display flex
align-items center
.domainImgBox
display flex
flex-direction row
align-items center
.domainImg
width 20px
height 20px
margin-left 20px
margin-right 5px
.beian
font-size 14px
text-decoration none
color $w3cColor !important
cursor pointer
&:hover
color #333333 !important
transition all 0.3s
.footNavItem
display flex
flex-direction column
align-items flex-start
margin-top 20px
.navLine
height 1px
background #e1e1e1
margin-bottom 15px
.navItemTitle
display flex
width 100px
height 35px
line-height 35px
font-size 16px
font-weight bold
font-family SourceHanSansCN-Regular serif
color #414141
.navItemDetail
display inline-block
cursor pointer
text-decoration none
color #3c3c3c !important
text-align left
margin-bottom 12px
font-size 14px
/* font-family CambayDevanagari arial,sans-serif */
font-family SourceHanSansCN-Regular serif
font-weight 400
line-height 22px
.navItemDetail:hover
color $accentColor !important
transition all 0.2s
.companyBox
display flex
justify-content center
.companyInfo, .anbaoInfo
font-size 14px
color #565656 !important
font-family SourceHanSansCN-Regular serif
.navItemDetailBox
width 100%
display flex
flex-direction column
flex-wrap wrap
#aboutusBox
display flex
flex-wrap wrap
$w3cColor = #007aff
$html5Color = #fb6f18
.footNav
width 90%
display flex
justify-content center
/* 通用底部导航栏---公共 */
#footNavBox
width 100%
margin-top 30px
padding-bottom 30px
display flex
flex-direction column
flex-wrap wrap
justify-content center
align-items center
background #fbfbfb
box-shadow #00000021 0px -20px 15px -15px
.w3c
text-decoration none
color $w3cColor !important
font-weight 800 !important
.html5
text-decoration none
color $html5Color !important
font-weight 800 !important
.hbLogo
display inline-block
width 160px
height 25px
margin-top 30px
background url('https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-dc-site/d141de00-607f-11eb-8a36-ebb87efcf8c0.svg') no-repeat center
.beianBox
display flex
align-items center
.domainImgBox
display flex
flex-direction row
align-items center
.domainImg
width 20px
height 20px
margin-left 20px
margin-right 5px
.beian
font-size 14px
text-decoration none
color $w3cColor !important
cursor pointer
&:hover
color #333333 !important
transition all 0.3s
.footNavItem
display flex
flex-direction column
align-items flex-start
margin 20px 50px 0 0
.navLine
width 100%
height 1px
background #e1e1e1
margin-bottom 15px
.navItemTitle
display flex
width 100px
height 35px
line-height 35px
font-size 16px
font-weight bold
font-family SourceHanSansCN-Regular serif
color #414141
.navItemDetail
display inline-block
cursor pointer
text-decoration none
color #3c3c3c !important
text-align left
margin-bottom 12px
font-size 14px
/* font-family CambayDevanagari arial,sans-serif */
font-family SourceHanSansCN-Regular serif
font-weight 400
line-height 22px
.navItemDetail:hover
color $accentColor !important
transition all 0.2s
.companyBox
display flex
justify-content center
margin 20px 0 20px 0
.companyInfo, .anbaoInfo
font-size 14px
color #565656 !important
font-family SourceHanSansCN-Regular serif
.navItemDetailBox
width 100%
display flex
flex-direction column
flex-wrap wrap
#aboutusBox
display flex
flex-direction column
flex-wrap wrap
@media screen and (max-width $MQMobile)
#footNavBox
#footNavClassify
width 20%
#aboutusBox
width 70%
.footNavItem
margin-right 20px
@media screen and (max-width 880px)
#footNavBox
.companyBox
height 50px
flex-direction column
justify-content space-around
.footNav
#aboutusBox
height 655px !important
@media screen and (max-width 1150px)
#footNavBox
.beianBox
height 80px
flex-direction column
justify-content space-around
/* 通用底部导航栏---移动端 */
@media screen and (max-width 1050px)
#footNavBox
.footNav
justify-content flex-start
#footNavClassify
width 30%
#aboutusBox
height 555px
.footNavItem
max-width 100px
margin-right 10px
@media screen and (max-width 1400px)
#footNavBox
#footNavClassify
width 20%
.footNavItem
min-width 150px
.navItemDetailBox
height 550px
.navItemDetail
margin-right 0px
#aboutusBox
height 420px
.footNavItem
margin-right 20px
@media screen and (min-width $MQMobile)
#footNavClassify
width 30%
.footNavItem
min-width 290px
.navItemDetailBox
height 300px
display flex
justify-content center
flex-direction column
.navItemDetail
margin-right 70px
#aboutusBox
width 70%
height 400px
.footNavItem:last-child
margin-right 0
...@@ -78,6 +78,9 @@ body.forbid_scroll ...@@ -78,6 +78,9 @@ body.forbid_scroll
height 100% height 100%
overflow hidden overflow hidden
main.page
padding-bottom 0px
{$contentClass}:not(.custom) {$contentClass}:not(.custom)
> *:first-child > *:first-child
margin-top 0 margin-top 0
......
#### 跨域 # 什么是跨域
\ No newline at end of file 跨域是浏览器的专用概念,指js代码访问自己来源站点之外的站点。比如A站点网页中的js代码,请求了B站点的数据,就是跨域。
A和B要想被认为是同域,则必须有相同的协议(比如http和https就不行)、相同域名、和相同端口号(port)。
如果你是做App、小程序等非H5平台,是不涉及跨域问题的。
稍微例外的是iOS的wkWebview,在5+App,或uni-app的web-view组件及renderjs中,由于WKWebview限制也会产生跨域,这方面另见专题文章:[https://ask.dcloud.net.cn/article/36348](https://ask.dcloud.net.cn/article/36348)。uni-app在App的普通js代码不运行在Webview下,不存在跨域问题。
由于uni-app是标准的前后端分离模式,开发h5应用时如果前端代码和后端接口没有部署在同域服务器,就会被浏览器报跨域。
# 如果前端要callfunction连接unicloud云函数
在h5页面里callfunction会跨域,此时需在unicloud的web控制台配置域名白名单,被加白的域名可以跨域callfunction。详见:[https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=useinh5](https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=useinh5)
另外运行期间在HBuilderX的内置浏览器里是不存在跨域的。
# 如果前端要连接传统后台服务器
分部署时的跨域方案和调试时的跨域方案,具体见下:
## 部署时的跨域解决方案
- 方案1:最利索的,当然还是将前端代码和后端接口部署在同域的web服务器上
- 方案2:由后台服务器配置策略,设为允许跨域访问。
例如:前端页面部署在uniCloud的前端页面托管里,但是需要访问自己服务器的接口,这时候需要在服务端允许前端页面托管的域名跨域访问。不同的服务端框架允许跨域的配置不一样,这里不再一一列举仅以eggjs为例。
(1)安装egg-cors包
```shell
npm i egg-cors --save
```
(2)在plugin.js中设置开启cors
```js
exports.cors = {
enable: true,
package: 'egg-cors',
};
```
(3)在config.default.js中配置
```js
config.security = {
domainWhiteList: [ '前端网页托管的域名' ],
};
```
## 调试时的跨域解决方案
前端工程师调试时,运行起来的前端代码在uni-app自带的web服务器中,而不是部署在后台业务服务器上,此时就会遇到跨域。
除了协调后端配置允许跨域,其实也可以自己解决跨域问题。共3种方案可选。
### 方案1 使用HBuilderX内置浏览器
这个内置浏览器经过官方处理,不存在跨域问题,简单易用,推荐使用。(需HBuilderX 2.6以上)
在打开页面后,点HBuilderX右上角的预览,即可打开内部浏览器。或者在运行菜单里选择运行到内置浏览器也可以。
[attach]38169[/attach]
### 方案2 配置webpack-dev-server代理
下面是一篇比uni官网文档更详细的配置指南,这里就直接贴地址了:[https://juejin.im/post/5e43b2645188254902765766](https://juejin.im/post/5e43b2645188254902765766)
### 方案3 给浏览器安装跨域插件,禁止浏览器报跨域
> 本插件并非万能,请仔细阅读与学习浏览器安全策略相关知识,不懂这些知识在评论里瞎喷的,官方不会回复。
当我们使用谷歌浏览器调试ajax请求的时候可能会遇到这两个问题:
* 跨域资源共享 详见:[CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
* 跨源读取阻塞 详见:[CORB](https://www.chromestatus.com/feature/5629709824032768)
最常见的就是关于**跨域资源共享**的问题,也就是我们通常说的跨域。当我们本地服务器预览页面,使用ajax访问远程服务器的内容时就会请求失败,比如:本地预览的地址是:http://localhost:8080/,访问的接口地址是http://dcloud.io/api。
如果仅仅是为了本地预览,可以使用Chrome浏览器插件来协助调试。
**!!!** 本插件只能解决**简单请求**的跨域调试([点击搜索什么是简单请求](https://www.baidu.com/s?wd=%E7%AE%80%E5%8D%95%E8%AF%B7%E6%B1%82&tn=84053098_3_dg&ie=utf-8))。对于非简单请求的OPTION预检([点击搜索什么是预检请求](https://www.baidu.com/s?ie=utf-8&f=3&rsv_bp=1&tn=84053098_3_dg&wd=%E9%A2%84%E6%A3%80%E8%AF%B7%E6%B1%82&oq=OPTION%25E9%25A2%2584%25E6%25A3%2580&rsv_pq=a0831c7c0000a93c&rsv_t=0313nBZdJJqdOJUR7zNSs%2BMXe8O6I0B9hizxu4eiVIV%2BBy5DUc%2FsouJj%2BQH2dyTBn%2BfLQg&rqlang=cn&rsv_enter=1&inputT=2653&rsv_sug3=3&rsv_sug1=2&rsv_sug7=100&rsv_sug2=1&prefixsug=%25E9%25A2%2584%25E6%25A3%2580&rsp=1&rsv_sug4=2654))以及线上服务器也有跨域需求的用户,可以[服务端配合解决](https://www.baidu.com/s?wd=%E6%9C%8D%E5%8A%A1%E7%AB%AF%E8%B7%A8%E5%9F%9F&tn=84053098_3_dg&ie=utf-8)
#### Chrome插件名称:Allow-Control-Allow-Origin: *
#### 安装方式:
- 在线安装
使用谷歌浏览器直接打开插件地址[https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi)安装即可
- 离线安装
国内用户如果无法在线安装,可在本页面底部下载附件,离线安装
1. 下载得到:Allow-Control-Allow-Origin.crx
2. 点击浏览器右上角的菜单按钮打开谷歌浏览器的扩展管理页面
[attach]27247[/attach]
[attach]27248[/attach]
3. 将下载的扩展插件拖入扩展管理页面
[attach]27257[/attach]
[attach]27258[/attach]
#### 使用方式
1. 打开待调试的页面
2. 在扩展栏目找到安装的插件,点击打开插件配置
3. 输入想要进行跨域调试的接口的地址,点击添加即可
[attach]27250[/attach]
#### 注意事项
* 此插件适合本地调试使用,线上部署如果和接口不同域还需要服务端配合。
* 如果实际响应的内容与浏览器预期的内容有差异还可能被[CORB](https://www.chromestatus.com/feature/5629709824032768)策略所阻止。
#### firefox跨域插件
[firefox跨域插件(注意firefox的css兼容问题)](https://addons.mozilla.org/zh-CN/firefox/addon/access-control-allow-origin/)
## 其他历史问题
HBuilderX 2.3.0版在某些情况下会报跨域,请升级2.3.1+解决
\ No newline at end of file
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册