jifenGet1_body.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <title>AUI快速完成布局</title>
  8. <link rel="stylesheet" type="text/css" href="../../css/api.css" />
  9. <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  10. <link rel="stylesheet" type="text/css" href="../../css/html.css" />
  11. <link href="../../css/style2.css" rel="stylesheet" type="text/css" />
  12. <style type="text/css">
  13. .text-white {
  14. color: #ffffff !important;
  15. }
  16. .aui-grid [class*=aui-col-] {
  17. padding: 0.75rem 0;
  18. }
  19. .aui-order-number {
  20. padding: 0.75rem;
  21. }
  22. .aui-card-list-user-avatar {
  23. width: 4rem;
  24. height: 3rem;
  25. }
  26. .aui-card-list-user-name {
  27. overflow: hidden;
  28. text-overflow: ellipsis;
  29. -webkit-box-orient: vertical;
  30. -webkit-line-clamp: 3;
  31. }
  32. .aui-card-list-user-info {
  33. text-align: right;
  34. color: #f00;
  35. margin-top: 10px;
  36. }
  37. .aui-top {
  38. padding: 7px 2px;
  39. border-bottom: 1px solid #ddd;
  40. width: 96%;
  41. margin-left: 2%;
  42. }
  43. .aui-state {
  44. float: right;
  45. }
  46. .aui-top .aui-state {
  47. color: #f00;
  48. }
  49. .aui-top .aui-state, .aui-top .aui-time {
  50. font-size: 0.6rem;
  51. }
  52. #user-info {
  53. position: fixed;
  54. top: 0;
  55. left: 0;
  56. width: 100%;
  57. height: 100%;
  58. z-index: 2;
  59. }
  60. .top {
  61. padding-bottom: 1rem;
  62. }
  63. .aui-bottom {
  64. border-top: 1px solid #ddd;
  65. border-bottom: 0px solid #fff;
  66. text-align: right;
  67. }
  68. .aui-float-right {
  69. float: right;
  70. margin-top: 10px;
  71. }
  72. .aui-card-list-user-name {
  73. width: 96%;
  74. }
  75. #tab {
  76. position: fixed;
  77. top: 0;
  78. left: 0;
  79. width: 100%;
  80. z-index: 2;
  81. }
  82. .aui-state-success {
  83. color: #8ec31f !important;
  84. }
  85. .aui-card-list {
  86. margin-bottom: 0px;
  87. }
  88. [v-cloak] {
  89. display: none
  90. }
  91. .aui-list-theme-one .aui-list-theme-item {
  92. width: 100%;
  93. }
  94. .aui-list-img {
  95. width: 35%;
  96. height: 6rem;
  97. }
  98. .aui-list-img img {
  99. width: 100%;
  100. height: 100%;
  101. }
  102. </style>
  103. </head>
  104. <body>
  105. <div id="app">
  106. <section class="aui-content top" v-cloak>
  107. <div class="aui-card-list aui-border-t aui-border-b zmq-width-90 zmq-margin-top-10 zmq-radius-10" v-show="type == '1'" v-for="(d,i) in list">
  108. <div class="aui-top">
  109. <span class="aui-time zmq-text-msg" style="padding-left : 1.1rem;"><img class="zmq-orderCode-img" style="position:absolute;margin-left: -1rem" src="../../image/drawable-xhdpi/wj.png" />{{d.logName}}</span>
  110. <span class="aui-state zmq-btn-border zmq-text-msg zmq-padding-status" class="">{{type == '1' ? '获取单' : '消费单'}}</span>
  111. </div>
  112. <div class="aui-card-list-header aui-card-list-user">
  113. <!--<i class="aui-iconfont aui-icon-right aui-font-size-12 aui-float-right zmq-position-absolute"></i>-->
  114. <div class="aui-card-list-user-name zmq-flex">
  115. <div class="aui-font-size-14">
  116. 积分数:<em class="zmq-text-msg">{{d.amomt}}</em>
  117. </div>
  118. <!--<div class="aui-font-size-14 zmq-text-msg">
  119. 银行卡
  120. </div>-->
  121. </div>
  122. <div class="aui-card-list-user-name zmq-flex">
  123. <div class="aui-font-size-14 zmq-text-explain">
  124. {{type == '1' ? '获取' : '消费'}}时间:{{d.createTime}}
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <div class="aui-card-list aui-border-t aui-border-b zmq-width-90 zmq-margin-top-10 zmq-radius-10" v-show="type == '2'" v-for="(s,i) in list">
  130. <div class="aui-top">
  131. <span class="aui-time zmq-text-msg" style="padding-left : 1.1rem;"><img class="zmq-orderCode-img" style="position:absolute;margin-left: -1rem" src="../../image/drawable-xhdpi/wj.png" />订单号:{{s.orderNum}}</span>
  132. <span class="aui-state zmq-btn-border zmq-text-msg zmq-padding-status" class="">{{type == '1' ? '获取单' : '消费单'}}</span>
  133. </div>
  134. <div class="aui-card-list-header aui-card-list-user">
  135. <!--<i class="aui-iconfont aui-icon-right aui-font-size-12 aui-float-right zmq-position-absolute"></i>-->
  136. <div class="aui-card-list-user-name zmq-flex">
  137. <div class="aui-font-size-14">
  138. 积分:<em class="zmq-text-msg">{{s.payAmunt}} 积分</em>
  139. </div>
  140. <div class="aui-font-size-14 zmq-text-msg">
  141. 兑换: {{s.totalAmount}} 个
  142. </div>
  143. </div>
  144. <div class="aui-card-list-user-name zmq-flex">
  145. <div class="aui-font-size-14 zmq-text-explain">
  146. {{type == '1' ? '获取' : '消费'}}时间:{{s.createTime}}
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </section>
  152. <img class="zmq-img-nodata" v-show="hasData == false" src="../../image/nodata.png" />
  153. <div v-show="upLock == false" class="zmq-text-explain zmq-textAlign-center zmq-margin-bottom-10 zmq-block-text">
  154. 已无更多数据
  155. </div>
  156. </div>
  157. </body>
  158. <script type="text/javascript" src="../../script/api.js"></script>
  159. <!--<script type="text/javascript" src="../../script/aui-tab.js" ></script>-->
  160. <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  161. <script type="text/javascript" src="../../script/vue.js"></script>
  162. <script type="text/javascript" src="../../script/httpRequest.js"></script>
  163. <script type="text/javascript" src="../../script/vue_plugins.js"></script>
  164. <script type="text/javascript">
  165. apiready = function() {
  166. var type = api.pageParam.type;
  167. new Vue({
  168. el : '#app',
  169. data : {
  170. type : type,
  171. list : [],
  172. // 获取订单列表
  173. getJFlistUrl : 'getJFlistUrl',
  174. // 分页组件
  175. current : 1,
  176. total : 1,
  177. // 是否可以上啦
  178. upLock : true,
  179. // 判断动作 -- 上啦还是下拉
  180. downData : 'down',
  181. // 是否有数据
  182. hasData : false,
  183. // 获取消费记录
  184. getBuyListUrl : 'exchangeListUrl',
  185. },
  186. methods : {
  187. init : function() {
  188. var _this = this;
  189. this.retariler_id = $api.getStorage("retailerid");
  190. this.getListOrder();
  191. this.configHeaderRefush(function() {
  192. _this.downData = 'down';
  193. _this.upLock = true;
  194. _this.current = 1;
  195. _this.getListOrder();
  196. })
  197. this.configBottomRefush(function(status) {
  198. if (_this.hasData == true) {
  199. // 开启上拉加载
  200. if (_this.total > _this.current) {
  201. _this.downData = 'up';
  202. _this.current = _this.current + 1;
  203. _this.getListOrder();
  204. } else {
  205. // 上啦没有数据了
  206. _this.upLock = false;
  207. }
  208. }
  209. })
  210. },
  211. // 根据传来的方式获取列表
  212. getListOrder : function() {
  213. if (type == 1) {// 获取
  214. this.getList();
  215. } else {// 消费
  216. this.getBuyList();
  217. }
  218. },
  219. // 获取消费记录
  220. getBuyList : function() {
  221. var data = {
  222. retailerId : this.retariler_id,
  223. current : this.current,
  224. logType : type
  225. }, _this = this;
  226. this.$post(this.getBuyListUrl, data, function(ret) {
  227. if (ret.code == 0 || ret.code == '0') {
  228. _this.total = ret.page.pages;
  229. if (_this.downData == 'up') {
  230. _this.list = _this.list.concat(ret.page.records);
  231. } else {
  232. _this.list = ret.page.records;
  233. if (_this.list.length > 0) {
  234. _this.hasData = true;
  235. }else{
  236. _this.hasData = false;
  237. }
  238. }
  239. }
  240. })
  241. },
  242. // 获取积分列表
  243. getList : function() {
  244. var data = {
  245. retailerId : this.retariler_id,
  246. current : this.current,
  247. logType : type
  248. }, _this = this;
  249. this.$post(this.getJFlistUrl, data, function(ret) {
  250. if (ret.code == 0 || ret.code == '0') {
  251. _this.total = ret.page.pages;
  252. if (_this.downData == 'up') {
  253. _this.list = _this.list.concat(ret.page.records);
  254. } else {
  255. _this.list = ret.page.records;
  256. if (_this.list.length > 0) {
  257. _this.hasData = true;
  258. }
  259. }
  260. }
  261. })
  262. },
  263. },
  264. mounted : function() {
  265. this.init();
  266. }
  267. })
  268. }
  269. </script>
  270. </html>