mail_detail.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {{.Header}}
  2. <div id="app" style="width:100%">
  3. <template>
  4. <el-container v-loading.fullscreen.lock="fullscreenLoading">
  5. <el-aside>
  6. {{.Left}}
  7. </el-aside>
  8. <el-main class="mainMain">
  9. <el-row :gutter="10">
  10. <el-col :span="2">
  11. 发件人:
  12. </el-col>
  13. <el-col :span="22">
  14. <{from}>
  15. </el-col>
  16. </el-row>
  17. <el-row :gutter="10">
  18. <el-col :span="2">
  19. 收件人:
  20. </el-col>
  21. <el-col :span="22">
  22. <{to}>
  23. </el-col>
  24. </el-row>
  25. <el-row :gutter="10">
  26. <el-col :span="2">
  27. 时间:
  28. </el-col>
  29. <el-col :span="22">
  30. <{date}>
  31. </el-col>
  32. </el-row>
  33. <el-row :gutter="10">
  34. <el-col :span="2">
  35. 标题:
  36. </el-col>
  37. <el-col :span="22">
  38. <{subject}>
  39. </el-col>
  40. </el-row>
  41. <el-row :gutter="10">
  42. <el-col :span="2">
  43. 内容:
  44. </el-col>
  45. <el-col :span="22" v-html="html">
  46. </el-col>
  47. </el-row>
  48. </el-main>
  49. </el-container>
  50. </template>
  51. </div>
  52. </body>
  53. <script>
  54. new Vue({
  55. el: '#app',
  56. delimiters:["<{","}>"],
  57. data: {
  58. fullscreenLoading:true,
  59. folders:[],
  60. mailTotal:0,
  61. fid:"INBOX",
  62. from:"",
  63. to:"",
  64. date:"",
  65. subject:"",
  66. html:"",
  67. },
  68. methods: {
  69. //获取邮件夹
  70. getMail: function (fid,id) {
  71. this.fullscreenLoading=true;
  72. var data={};
  73. if(fid!=""){
  74. data.fid=fid;
  75. this.fid=fid;
  76. }
  77. if(id!=""){
  78. data.id=id;
  79. }
  80. let _this = this;
  81. $.get('/mail',data, function (rs) {
  82. _this.folders=rs.result.folders;
  83. _this.fid=rs.result.fid;
  84. _this.mailTotal=rs.result.total;
  85. _this.from=rs.result.from;
  86. _this.to=rs.result.to;
  87. _this.date=rs.result.date;
  88. _this.subject=rs.result.subject;
  89. _this.html=rs.result.html;
  90. _this.fullscreenLoading=false;
  91. }).then(()=>{
  92. _this.fullscreenLoading=false;
  93. });
  94. },
  95. //跳转
  96. openUrl(url){
  97. window.location.href=url;
  98. },
  99. },
  100. created: function () {
  101. this.getMail({{.Fid}},{{.Id}});
  102. }
  103. })
  104. </script>
  105. </html>