作者 何书鹏
1 个管道 的构建 通过 耗费 4 秒

h5

... ... @@ -5,9 +5,15 @@
<meta charset="UTF-8" />
<title>{$title}</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta http-equiv="Access-Control-Allow-Origin" content="*" />
<link rel="stylesheet" href="__CDN__/assets/share/js/jquery.min.js" />
<script src="__CDN__/assets/share/js/base.js"></script>
<style>
body,
html {
margin: 0;
}
.quesbox {
padding: 0.5rem 0.32rem;
box-sizing: border-box;
... ... @@ -15,7 +21,7 @@
background: #ffffff;
border-radius: 0.24rem;
box-shadow: 0 0.12rem 0.24rem 0.06rem rgba(0, 0, 0, 0.05);
margin: 0 auto 0;
margin: 0.4rem auto 0;
}
.questitle {
... ... @@ -67,25 +73,78 @@
margin-right: 0.12rem;
}
.goapp {
width: 3.44rem;
height: 0.84rem;
.topbox {
width: 100%;
background: rgba(255, 255, 255, 0.9);
box-shadow: 0px 0.04rem 0.08rem 0px rgba(0, 0, 0, 0.13);
display: flex;
padding: 0.25rem 0.32rem;
box-sizing: border-box;
}
.logoimg {
width: 1.28rem;
height: 1.28rem;
font-size: 0;
margin-bottom: 0.14rem;
margin-right: 0.28rem;
}
.logoimg img {
width: 100%;
height: 100%;
}
.appintro {
color: #06121f;
font-size: 0.28rem;
}
.topboxright {
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: flex-end;
}
.openapp {
width: 1.78rem;
height: 0.6rem;
background: #fd7a3e;
border-radius: 0.42rem;
box-shadow: 0px 0.08rem 0.16rem 0px rgba(253, 122, 62, 0.3);
color: #fff;
font-size: 0.28rem;
text-align: center;
line-height: 0.84rem;
margin: 2rem auto 0;
line-height: 0.6rem;
}
.logoname {
color: #06121f;
font-size: 0.24rem;
text-align: center;
width: 1.28rem;
}
</style>
</head>
<body>
<div class="questype">
<img src="__CDN__/assets/share/images/qiandao.png" alt="" class="selectimg" /> 单选题
<div class="topbox">
<div class="topboxleft">
<div class="logoimg">
<img src="__CDN__/assets/share/images/app_icon.png" alt="" />
</div>
<div class="logoname">精工筑匠</div>
</div>
<div class="topboxright">
<div class="appintro">
此处为APP简介,文案待客户确定,此处为APP简介,文案待客户确定,
</div>
<div class="openapp">打开APP</div>
</div>
</div>
<!-- <div class="questype">
<img src="images/qiandao.png" alt="" class="selectimg" /> 单选题
</div> -->
<div class="quesbox">
<div class="questitle">
下面项目目标动态控制措施中,属于管理措施的是( )
... ... @@ -109,9 +168,38 @@
</div>
</div>
</div>
<div class="goapp">去app中打开</div>
</body>
<script src="__CDN__/assets/share/js/jquery.min.js"></script>
<script></script>
<script>
var question_id = getQueryVariable("question_id");
var type = getQueryVariable("type");
function getdetail() {
var url = "/almighty/questionInfo";
var params = {
question_id: 88,
};
ajaxsend(url, params, function(res) {
/*console.log(JSON.stringify(res))*/
console.log(res);
});
}
getdetail();
// var xhr = new XMLHttpRequest();
// xhr.open(
// "GET",
// "http://enterprise.t.brotop.cn/mobile?question_id=88",
// true
// );
// xhr.withCredentials = true;
// xhr.onload = function() {
// alert(xhr.response); //reposHTML;
// };
// xhr.onerror = function() {
// alert("error making the request.");
// };
// xhr.send();
</script>
</html>
\ No newline at end of file
... ...
... ... @@ -3,3 +3,45 @@ var baseWidth = Length <= 1024 ? Length : 1024 < Length ? 750 : '';
document.documentElement.style.fontSize = baseWidth / 750 * 100 + 'px';
function ajaxsend(url, parmas, callback) {
var baseUrl = 'http://enterprise.t.brotop.cn/mobile';
$.ajax({
type: "POST",
url: baseUrl + url,
data: parmas,
dataType: "json",
success: function(data) {
funsc && funsc(data)
}
});
// $.ajax({
// type: "POST",
// timeout: 1000,
// url: baseUrl + url,
// contentType: "application/json; charset=utf-8",
// data: JSON.stringify(parmas),
// dataType: "json",
// success: function(message) {
// if (callback) {
// callback(message);
// }
// },
// error: function(XMLHttpRequest, textStatus, errorThrown) {
// /* mui.alert( "错误码:" + XMLHttpRequest.status,"网络错误", function() {
// });*/
// }
// });
}
//获取url带的参数
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) { return pair[1]; }
}
return (false);
}
function ererer() { return 21; }
\ No newline at end of file
... ...