Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
0365afdc
提交
0365afdc
authored
10月 12, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
云仓官网单独适配pc和移动端10%
上级
a5ae1cb2
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
92 行增加
和
41 行删除
+92
-41
newyuncang.vue
src/views/entry/newyuncang.vue
+92
-41
没有找到文件。
src/views/entry/newyuncang.vue
浏览文件 @
0365afdc
<
template
>
<div
class=
"content"
>
<div
class=
"
p
c-content"
ref=
"searchBar"
>
<div
class=
"
y
c-content"
ref=
"searchBar"
>
<!-- 头部 -->
<header
:class=
"
{ 'head-scroll': isScroll }">
<div
class=
"header-con"
>
<div
class=
"header-con
pc-hide
"
>
<ul
class=
"nav"
>
<li
v-if=
"settitle && settitle.topLogo"
>
<img
style=
"width:114px;height:35px;"
:src=
"settitle.topLogo"
alt=
""
>
...
...
@@ -203,27 +203,29 @@
</div>
<!-- 移动端 -->
<div
class=
"mobile-content"
>
<div
class=
"m-header"
>
<ul
class=
"m-nav"
>
<li
v-if=
"settitle && settitle.topLogo"
>
<img
style=
"width:114px;height:35px;"
:src=
"settitle.topLogo"
alt=
""
>
</li>
<li>
<a
href=
"/"
>
首页
</a>
</li>
<li
v-if=
"navigationObj.open"
>
<a
:href=
" '//' + navigationObj.open"
target=
"_blank"
>
开放平台
</a>
</li>
<li
v-if=
"navigationObj.shop"
>
<a
:href=
" '//' + navigationObj.shop"
>
云仓
</a>
</li>
<li>
<a
:href=
" '//' + navigationObj.aboutUs + '/user' "
target=
"_blank"
>
关于我们
</a>
</li>
</ul>
</div>
</div>
<!--
<div
class=
"mobile-content"
>
-->
<!--
<div
class=
"m-header"
>
-->
<!--
<ul
class=
"m-nav"
>
-->
<!--<!–
<li
v-if=
"settitle && settitle.topLogo"
>
–>
-->
<!--<!–
<img
style=
"width:114px;height:35px;"
:src=
"settitle.topLogo"
alt=
""
>
–>
-->
<!--<!–
</li>
–>
-->
<!--
<li>
-->
<!--
<a
href=
"/"
>
首页
</a>
-->
<!--
</li>
-->
<!--
<li
v-if=
"navigationObj.open"
>
-->
<!--
<a
:href=
" '//' + navigationObj.open"
target=
"_blank"
>
开放平台
</a>
-->
<!--
</li>
-->
<!--
<li
v-if=
"navigationObj.shop"
>
-->
<!--
<a
:href=
" '//' + navigationObj.shop"
>
云仓
</a>
-->
<!--
</li>
-->
<!--
<li>
-->
<!--
<a
:href=
" '//' + navigationObj.aboutUs + '/user' "
target=
"_blank"
>
关于我们
</a>
-->
<!--
</li>
-->
<!--
</ul>
-->
<!--
</div>
-->
<!-- <!– 右上角 菜单图标 –>-->
<!--
<div>
menu
</div>
-->
<!--
</div>
-->
</div>
</
template
>
...
...
@@ -237,6 +239,32 @@
import
Swiper2
,{
Autoplay
}
from
'swiper'
;
Swiper2
.
use
([
Autoplay
]);
/** 仅对官网进行 所有适配
* 当 可视区域 小于 960 时,进行 移动端适配
* 对 html 根目录 的font-size 进行设置
* */
//是否是移动端
;(
function
()
{
// 获取屏幕区域的宽度
let
w
=
document
.
documentElement
.
clientWidth
if
(
w
<
961
)
{
// console.log(24,w);
// 获取html根元素
let
htmlNode
=
document
.
querySelector
(
'html'
)
// 设置根字体大小
// let htmlFSType = 1;
if
(
w
/
375
<
1.5
)
{
htmlNode
.
style
.
fontSize
=
16
+
'px'
}
else
if
(
1.5
<=
w
/
375
<
2
)
{
htmlNode
.
style
.
fontSize
=
24
+
'px'
}
else
if
(
2
<=
w
/
375
<=
2.56
)
{
htmlNode
.
style
.
fontSize
=
32
+
'px'
}
// htmlNode.style.fontSize = w / 375 + 'px'
console
.
log
(
"根html字体大小:"
,
htmlNode
.
style
.
fontSize
);
}
})();
export
default
{
name
:
"newyuncang"
,
data
()
{
...
...
@@ -346,6 +374,11 @@
]
}
},
created
()
{
let
isPc
=
this
.
IsPc
()
console
.
log
(
111
,
isPc
);
console
.
log
(
222
,
navigator
.
userAgent
);
},
mounted
()
{
this
.
getIndexInfo
()
window
.
addEventListener
(
'scroll'
,
this
.
handleScroll
,
true
);
...
...
@@ -356,6 +389,14 @@
},
methods
:
{
IsPc
()
{
let
userAgent
=
navigator
.
userAgent
let
Agents
=
[
"Android"
,
"iPhone"
,
"SymbianOS"
,
"Windows Phone"
,
"iPad"
,
"iPod"
];
console
.
log
(
'userAgent:'
,
userAgent
)
return
Agents
.
some
((
i
)
=>
{
return
userAgent
.
includes
(
i
)
})
},
// 获取渠道id
getIndexInfo
()
{
let
op
=
'open'
...
...
@@ -483,27 +524,37 @@
list-style
:
none
;
}
@media
screen
and
(
max-width
:
480px
)
{
.pc-content
{
width
:
100%
;
height
:
100%
;
display
:
none
;
}
.mobile-content
{
.yc-content
{
width
:
100%
;
height
:
100%
;
}
}
/* 手机竖屏时,可视区域的最大宽度为 480 */
//@media screen and (max-width: 480px) and (orientation: portrait) {
// .pc-hide {
// display: none!important;
// }
// .mobile-show {
// display: none!important;
// }
//}
@media
screen
and
(
min-width
:
481px
)
{
.pc-content
{
width
:
100%
;
height
:
100%
;
/* 手机横屏和pc最小宽度为 812px */
/* 手机横屏 812px 为iphoneX 横屏的设备独立像素*/
//@media screen and (max-width: 811px) and (orientation: landscape) {
// .pc-hide {
// display: none!important;
// }
// .mobile-show {
// display: none!important;
// }
//}
@media
screen
and
(
max-width
:
961px
)
{
.pc-hide
{
display
:
none
!
important
;
}
.mobile-content
{
width
:
100%
;
height
:
100%
;
display
:
none
;
.mobile-show
{
display
:
none
!
important
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论