You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
3.7 KiB

5 years ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>资讯公告</title>
<!--REM自适应布局JS-->
<link rel="stylesheet" type="text/css" href="../../../lib/css/mui.min.css">
<link rel="stylesheet" type="text/css" href="../../../lib/css/basic.css" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<script src="../../../lib/js/mui.min.js"></script>
<script src="../../../lib/js/vue.js"></script>
<script src="../../../lib/js/app.js"></script>
<script src="../../js/base/rem-layout.js"></script>
<script type="text/javascript" src="../../js/my/my_ajax.js"></script>
<script src="../../../lib/js/require2.1.11.js"></script>
</head>
<style>
body,
html {
width: 100%;
height: 100%;
margin: 0;
background-color: #fff;
}
.mui-content {
padding-top: 1rem !important;
background-color: #fff;
}
.infor-new {
border-bottom: 1px solid #EBEBEB;
}
.infor-title {
margin-top: 0.36rem;
width: 5.3rem;
font-size: 0.26rem;
color: #333333;
line-height: 0.38rem;
/*2行 溢出隐藏*/
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
line-height: 1.5em;
}
.infor-title p {
line-height: 1.5em;
color: #333333;
/*2行 溢出隐藏*/
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.infor-time {
margin-top: 0.2rem;
margin-bottom: 0.33rem;
font-size: 0.21rem;
color: #999999;
}
</style>
<body>
<div id="industry-information">
<header class="mui-bar mui-bar-nav app-header app-header-darkly">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">{{langue.title}}</h1>
</header>
<div class="mui-content">
<div class="infor-new " v-for="item in arrInfor">
<div @click="handelInfor(item.id)" class="list-info">
<div class="infor-title">
{{item.title}}
</div>
<div class="infor-time">
{{item.createTime}}
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<script>
// 国际化
var langues = {
zh_CN: {
title: "行业资讯"
},
zh_HK: {
title: "行業咨詢"
},
en_US: {
title: "Industry Advisory"
}
};
//2、页面上所有需要国际化的文字,包括提示,都通过Vue去引用,例子:
var langueKey = app.getLanguageLocalStorage(); //获取国际化语种
var langue = langues[langueKey]; // 获取国际化语种数据
//3、每个页面都需要加上以下的方法:
window.addEventListener('switchLangueData', function(e) {
//dataInfo为Vue对象的名称
dataInfo.langue = langues[e.detail];
});
var dataInfo = new Vue({
el: "#industry-information",
data: {
langue: langue,
type: '2',
arrInfor: [],
id: ''
},
methods: {
handelInfor: function(id) {
this.id = id;
test(id);
}
}
})
mui.plusReady(function() {
getInformation();
});
function getInformation() {
mui.ajax(myAjaxJs.AJAX_NEW_INFORMATION.getUrl, {
headers: {
"locale": app.getLanguageLocalStorage() // 语种头部
},
type: myAjaxJs.AJAX_NEW_INFORMATION.getType, //HTTP请求类型
data: {
type: dataInfo.type
},
dataType: 'json', //服务器返回json格式数据
timeout: 10000, //超时时间设置为10秒;
success: function(data) {
if(data.code == 200) {
dataInfo.arrInfor = data.data
}
},
})
}
function test(id) {
app.openWin('industry_information_new.html', 'industry_information_new.html', {}, {
_id: id
});
}
</script>