Skip to content

Commit

Permalink
Merge 7e70abf into 7dd1603
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo-Li committed May 29, 2018
2 parents 7dd1603 + 7e70abf commit b4e1890
Show file tree
Hide file tree
Showing 8 changed files with 233 additions and 2 deletions.
26 changes: 26 additions & 0 deletions cases/289.html
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html mip>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://c.mipcdn.com/static/v1/mip.css">
<link rel="canonical" href="https://www.mipengine.org/test_xxx.html">
<script async src="https://mipcache.bdstatic.com/static/V1/mip-hIstory.js"></script>
<title>MIP页Demo效果</title>
<style mip-custom>
</style>
</head>
<body>
<script type="application/json"></script>
<script type="application/mip-script">
window.addEventListener('ready-to-watch', function () {
MIP.watch('num', function () {
MIP.setData({
title: 'ckkkk changing num'
});
});
});
</script>
<script src="https://c.mipcdn.com/static/v1/mip.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions cases/289.json
@@ -0,0 +1 @@
[]
25 changes: 25 additions & 0 deletions cases/290.html
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html mip>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://c.mipcdn.com/static/v1/mip.css">
<link rel="canonical" href="https://www.mipengine.org/test_xxx.html">
<title>MIP页Demo效果</title>
<style mip-custom>
</style>
</head>
<body>
<script type="application/json" src="https://mipcache.bdstatic.com/a"></script>
<script type="application/mip-script" src="https://mipcache.bdstatic.com/a">
window.addEventListener('ready-to-watch', function () {
MIP.watch('num', function () {
MIP.setData({
title: 'ckkkk changing num'
});
});
});
</script>
<script src="https://c.mipcdn.com/static/v1/mip.js"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions cases/290.json
@@ -0,0 +1,18 @@
[
{
"message": "标签 'script' 中的属性 'type' 的属性值 'application/json' 无效",
"code": "06200301",
"line": 13,
"col": 9,
"offset": 442,
"input": " <script type=\"application/json\" src=\"https://mipcache.bdstatic.com/a\"></script>"
},
{
"message": "标签 'script' 中的属性 'type' 的属性值 'application/mip-script' 无效",
"code": "06200301",
"line": 14,
"col": 9,
"offset": 530,
"input": " <script type=\"application/mip-script\" src=\"https://mipcache.bdstatic.com/a\">"
}
]
143 changes: 143 additions & 0 deletions cases/291.html
@@ -0,0 +1,143 @@
<!DOCTYPE html>
<html mip>
<head>
<meta charset="utf-8">
<title>MIP Index Page</title>
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://c.mipcdn.com/static/v2/mip.css">
<link rel="canonical" href="https://www.mipengine.org/test_xxx.html">
<style mip-custom>
p {
font-size: 1.5em;
margin: 0 30px;
}
.main-image {
text-align: center;
}
.link {
text-align: center;
margin-top: 20px;
display: block;
}
</style>
</head>
<body>
<div class="main-image">
<mip-img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3010417400,2137373730&fm=27&gp=0.jpg" width="300" height="300"></mip-img>
</div>
<br><br>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>

<a class="link" href="./tree.html" mip-link>Go to Tree</a>
<a class="link" href="./data.html" mip-link>Go to Data</a>
<a class="link" href="./not-mip.html">Go to Not MIP</a>
<a class="link" href="/not/exists" mip-link>Go to Not Exists</a>

<br><br>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>

<mip-shell>
<script type="application/json">
{
"header": {
"title": "Mip Index",
"logo": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3010417400,2137373730&fm=27&gp=0.jpg",
"buttonGroup": [
{
"type": "button",
"name": "subscribe",
"text": "关注",
"link": "/examples/page/tree.html"
},
{
"type": "button",
"name": "chat",
"text": "发消息",
"outline": true
},
{
"type": "icon",
"name": "search",
"text": "search",
"link": "/examples/page/tree.html"
},
{
"type": "dropdown",
"items": [
{
"name": "subscribe",
"text": "关注",
"link": "/examples/page/tree.html"
},
{
"name": "chat",
"text": "发消息"
}
]
}
]
},
"view": {
"isIndex": true,
"transition": {
"mode": "slide"
}
},
"footer": {}
}
</script>
</mip-shell>
<mip-data>
<script type="application/json">
{
"#group": {
"info": {
"name": "sfe"
}
}
}
</script>
</mip-data>
<mip-shell>
<script type="application/json">
{
"header": {},
"view": {
"isIndex": true,
"transition": {
"mode": "slide"
}
},
"footer": {}
}
</script>
</mip-shell>
<span m-text="group.info.name"></span>
<script src="https://c.mipcdn.com/static/v2/mip.js"></script>
</body>
10 changes: 10 additions & 0 deletions cases/291.json
@@ -0,0 +1,10 @@
[
{
"message": "标签 '<mip-shell>' 只能出现一次",
"code": "06200701",
"line": 127,
"col": 5,
"offset": 4999,
"input": " <mip-shell>"
}
]
7 changes: 6 additions & 1 deletion cases/README.md
Expand Up @@ -110,7 +110,9 @@
213|标签'script'在head中使用时应该家'async'属性

# 新增规则

页面编码|说明|状态
---|---
214|不存在 mip.css 标签|不通过
215|存在 2 个 rel="canonical" 的标签|不通过
216|存在 2 个 rel="miphtml" 的标签|不通过
Expand Down Expand Up @@ -178,4 +180,7 @@
278|initial-scale为其他|不通过
279|内部以逗号分隔|通过
280|内部以分号分隔|通过
281|内部以其他分隔|不通过
281|内部以其他分隔|不通过
289|src 不存在,type 为 application/mip-script | 通过
290|src 存在,type 为 application/mip-script | 不通过
291|标签 mip-shell 只能出现一次 | 不通过
5 changes: 4 additions & 1 deletion rules.json
Expand Up @@ -105,7 +105,7 @@
}, {
"disallow": true,
"match": {
"type": "/^(?!application\/(ld\\+)?json$)/",
"type": "/^(?!(application\/(ld\\+)?json$)|(application\/mip-script$))/",
"src":"/^(?!((https:)?\/\/((mipcache\\.bdstatic\\.com)|(c\\.mipcdn\\.com))(\/([\\s\\S]*))?$))/"
}
}, {
Expand Down Expand Up @@ -363,5 +363,8 @@
"value": "/^\\S+$/"
}
}
},
"mip-shell": {
"duplicate": true
}
}

0 comments on commit b4e1890

Please sign in to comment.