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.
117 lines
3.5 KiB
117 lines
3.5 KiB
{{.Header}}
|
|
<body class="text-center">
|
|
<div id="app" style="width:100%">
|
|
<template>
|
|
{{.Nav}}
|
|
<el-container v-loading.fullscreen.lock="fullscreenLoading">
|
|
<el-aside>
|
|
<el-menu
|
|
:default-active="fid">
|
|
<el-menu-item :index="v" v-for="(f,v) in folderlist.folders" v-bind:key="v" v-on:click="openUrl('/list?fid='+v)">
|
|
<i class="el-icon-menu"></i>
|
|
<span slot="title"><{v}></span>
|
|
</el-menu-item>
|
|
</el-menu>
|
|
</el-aside>
|
|
|
|
<el-main class="mainMain">
|
|
<el-row :gutter="10">
|
|
<el-col :span="2">
|
|
发件人:
|
|
</el-col>
|
|
<el-col :span="22">
|
|
<{from}>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="10">
|
|
<el-col :span="2">
|
|
收件人:
|
|
</el-col>
|
|
<el-col :span="22">
|
|
<{to}>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="10">
|
|
<el-col :span="2">
|
|
时间:
|
|
</el-col>
|
|
<el-col :span="22">
|
|
<{date}>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="10">
|
|
<el-col :span="2">
|
|
标题:
|
|
</el-col>
|
|
<el-col :span="22">
|
|
<{subject}>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="10">
|
|
<el-col :span="2">
|
|
内容:
|
|
</el-col>
|
|
<el-col :span="22" v-html="html">
|
|
</el-col>
|
|
</el-row>
|
|
</el-main>
|
|
|
|
</el-container>
|
|
</template>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
new Vue({
|
|
el: '#app',
|
|
delimiters:["<{","}>"],
|
|
data: {
|
|
fullscreenLoading:true,
|
|
folderlist:[],
|
|
mailTotal:0,
|
|
fid:"INBOX",
|
|
from:"",
|
|
to:"",
|
|
date:"",
|
|
subject:"",
|
|
html:"",
|
|
},
|
|
methods: {
|
|
//获取邮件夹
|
|
getMail: function (fid,id) {
|
|
this.fullscreenLoading=true;
|
|
var data={};
|
|
if(fid!=""){
|
|
data.fid=fid;
|
|
this.fid=fid;
|
|
}
|
|
if(id!=""){
|
|
data.id=id;
|
|
}
|
|
let _this = this;
|
|
$.get('/mail',data, function (rs) {
|
|
_this.folderlist=rs.result;
|
|
_this.fid=rs.result.fid;
|
|
_this.mailTotal=rs.result.total;
|
|
_this.from=rs.result.from;
|
|
_this.to=rs.result.to;
|
|
_this.date=rs.result.date;
|
|
_this.subject=rs.result.subject;
|
|
_this.html=rs.result.html;
|
|
_this.fullscreenLoading=false;
|
|
}).then(()=>{
|
|
_this.fullscreenLoading=false;
|
|
});
|
|
},
|
|
//跳转
|
|
openUrl(url){
|
|
window.location.href=url;
|
|
},
|
|
},
|
|
created: function () {
|
|
this.getMail({{.Fid}},{{.Id}});
|
|
}
|
|
})
|
|
|
|
</script>
|
|
</html>
|