msgDetails.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="../css/api.css" />
  12. <link rel="stylesheet" type="text/css" href="../css/aui-win.css" />
  13. <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
  14. <link rel="stylesheet" type="text/css" href="css/iconfont.css">
  15. <link rel="stylesheet" type="text/css" href="css/main.css" />
  16. <script type="text/javascript" src="../script/aui-tab.js"></script>
  17. <script src="js/vue.js"></script>
  18. <script src="js/vant-ui.js"></script>
  19. <script src="js/main.js"></script>
  20. <title></title>
  21. </head>
  22. <style>
  23. .card-list {
  24. display: flex;
  25. justify-content: center;
  26. margin-bottom: .5rem
  27. }
  28. .card {
  29. width: 7rem;
  30. border-radius: .3rem;
  31. background-color: #fff;
  32. padding: .15rem .2rem;
  33. margin: .2rem 0 .2rem 0;
  34. }
  35. .card-head {
  36. border-bottom: 1px solid #EDEDED;
  37. padding-bottom: .1rem;
  38. display: flex;
  39. flex-direction: row;
  40. justify-content: space-between;
  41. align-items: flex-end;
  42. }
  43. .card-main {
  44. color: #AEAEAE;
  45. padding: .1rem 0;
  46. }
  47. .card-title {
  48. margin-bottom: .2rem;
  49. font-size: .28rem;
  50. }
  51. .card-text {
  52. font-size: .25rem
  53. }
  54. .card-foot {
  55. border-top: 1px solid #EDEDED;
  56. padding-top: .1rem;
  57. display: flex;
  58. flex-direction: row;
  59. align-items: center;
  60. justify-content: space-between;
  61. font-size: .32rem;
  62. }
  63. .card-arrow img {
  64. height: .4rem;
  65. }
  66. </style>
  67. <body>
  68. <div id="app" style="background-color:#EDEDED">
  69. <header class="aui-bar aui-bar-nav aui-bar-info" id="aui-header">
  70. <div>
  71. <a class="aui-btn aui-btn-info aui-pull-left" tapmode onclick="closeWin()"> <span
  72. class="aui-iconfont aui-icon-left"></span> </a>
  73. <div class="aui-title" id="aui-title">
  74. {{sendUserName}}
  75. </div>
  76. </div>
  77. </header>
  78. <div class="card-list mescroll-touch-y mescroll" id="mescroll" style="position: relative;">
  79. <div>
  80. <div class="card" v-for="(item,index) in lists" :key="index">
  81. <div v-on:click="openWin(item.detailPage,item.sendUserId)">
  82. <div class="card-head">
  83. <div style="font-size:.32rem;">
  84. {{item.msgTitle}}
  85. </div>
  86. <div style="color: #AEAEAE;font-size:.25rem;">
  87. {{item.gatTime|formatDate}}
  88. </div>
  89. </div>
  90. <div class="card-main">
  91. <!-- <div class="card-title">
  92. </div> -->
  93. <div class="card-text" v-html="item.msgContent">
  94. </div>
  95. </div>
  96. <div class="card-foot" v-if="item.sendUserId==19||item.sendUserId==17">
  97. <div>
  98. 查看详情
  99. </div>
  100. <div class="card-arrow">
  101. <img src="./img/images/rightArrow.png" alt="">
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </body>
  110. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  111. <script type="text/javascript" src="./js/qrcode.min.js"></script>
  112. <script type="text/javascript" src="../script/aui-scroll.js"></script>
  113. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  114. <script type="text/javascript" src="../script/api.js"></script>
  115. <script type="text/javascript" src="../script/httpRequest.js"></script>
  116. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  117. <script type="text/javascript">
  118. function closeWin() {
  119. api.sendEvent({
  120. name: 'refushMsg',
  121. extra: {}
  122. });
  123. api.closeWin({});
  124. }
  125. apiready = function () {
  126. // api.addEventListener({
  127. // name: 'keyback'
  128. // }, function (ret, err) {
  129. // api.sendEvent({
  130. // name: 'refushMsg',
  131. // extra: {}
  132. // });
  133. // api.closeWin({});
  134. // });
  135. var sendUserId = api.pageParam.sendUserId;
  136. api.parseTapmode();
  137. var header = $api.byId('aui-header');
  138. $api.fixStatusBar(header);
  139. new Vue({
  140. el: '#app',
  141. data: {
  142. sendUserId: sendUserId,
  143. lists: [],
  144. sendUserName: ""
  145. },
  146. filters: {
  147. formatDate: function (time) {
  148. var now = new Date()
  149. var year = now.getFullYear(); //年
  150. var month = now.getMonth() + 1; //月
  151. var day = now.getDate();
  152. if (month < 10) {
  153. month = "0" + month;
  154. }
  155. if (day < 10) {
  156. day = "0" + day;
  157. }
  158. nowDay = year + "-" + month + "-" + day
  159. if (nowDay != time.substring(0, 10)) {
  160. return time.substring(0, 10)
  161. } else {
  162. return time.substring(11, 19)
  163. }
  164. }
  165. },
  166. methods: {
  167. init: function () {
  168. this.storeId = $api.getStorage('userid');
  169. this.getMsgdetails();
  170. this.updateMessage();
  171. },
  172. getMsgdetails: function () {
  173. var _this = this,
  174. url = "getMsgdetails",
  175. data = {
  176. "acceptUserId": this.storeId,
  177. "sendUserId": this.sendUserId,
  178. "type": 'body',
  179. "url": 'json'
  180. }
  181. this.$post(url, data, function (ret) {
  182. if (ret.code == 0) {
  183. _this.lists = ret.list;
  184. _this.sendUserName = ret.list[0].sendUserName;
  185. api.sendEvent({
  186. name: 'refushMsg',
  187. extra: {}
  188. });
  189. }
  190. });
  191. },
  192. updateMessage: function () {
  193. url = "updateMessage",
  194. data = {
  195. "acceptUserId": this.storeId,
  196. "sendUserId": this.sendUserId,
  197. "type": 'body',
  198. "url": 'json'
  199. }
  200. this.$post(url, data, function (ret) {
  201. });
  202. },
  203. openWin: function (val, typeId) {
  204. if (typeId == 19) {
  205. this.goWin('orderInfo_win', 'orderInfo_win.html', {
  206. id: val
  207. });
  208. } else if (typeId == 17) {
  209. this.goWin('backMoneyinfo_win', 'backMoneyinfo_win.html', {
  210. id: val
  211. });
  212. }
  213. }
  214. },
  215. mounted: function () {
  216. this.init();
  217. }
  218. })
  219. }
  220. </script>
  221. </html>