admin
2020-06-11 3bc16a1d3afee0d1ba5c39b1415309e1fe2c63a1
AppInside/cloudPushOrder/openRecord.html
@@ -15,9 +15,15 @@
      <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
      <script src="http://img.flqapp.com/resource/js/app2019112217.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
      <link href="css/load.css" rel="stylesheet" />
      <style type="text/css">
         [v-cloak] {
            display: none !important;
         }
      </style>
   </head>
   <body>
      <div id="root">
      <div id="root" style="display: none;">
         <div class="div_header">
            <div class="div_header_title">
               <div class="div_header_1" @click="selectTab(1)">
@@ -36,7 +42,6 @@
               <div class="div_header_line_2"></div>
            </div>
         </div>
         <div class="div_openRecord">开通记录</div>
         <!-- 云发单管理 -->
@@ -44,42 +49,49 @@
            <div class="div_list">
               <div class="div_item" v-for="(item, index) in dataList">
                  <div class="div_item_left">
                        <img src="img/icon_record.png" style="width: 0.7rem;height: 0.7rem;margin-left: 0.16rem;margin-top: 0.39rem;">
                        <div >
                           <div style="color: #333333;font-size: 0.28rem;height: 0.28rem;display: -webkit-flex;align-items: center;margin-top: 0.3rem;margin-left: 0.24rem;">
                              成功开通 1个月
                           </div>
                           <div style="color: #E5005C;font-size: 0.36rem;height: 0.28rem;font-weight: bold; display: -webkit-flex;align-items: center;margin-top: 0.28rem;margin-left: 0.22rem;">
                              ¥20.00
                           </div>
                     <img src="img/icon_record.png" style="width: 0.7rem;height: 0.7rem;margin-left: 0.16rem;margin-top: 0.39rem;">
                     <div>
                        <div style="color: #333333;font-size: 0.28rem;height: 0.28rem;display: -webkit-flex;align-items: center;margin-top: 0.3rem;margin-left: 0.24rem;">
                           {{item.desc}}
                        </div>
                        <div style="color: #E5005C;font-size: 0.36rem;height: 0.28rem;font-weight: bold; display: -webkit-flex;align-items: center;margin-top: 0.28rem;margin-left: 0.22rem;">
                           ¥{{item.money}}
                        </div>
                     </div>
                  </div>
                  <div style="color: #666666;font-size: 0.24rem;height: 0.18rem;display: -webkit-flex;align-items: center;margin-top: 0.35rem;margin-right: 0.2rem;">
                     2020.02.02 20:00
                  </div>
                     {{item.createTime}}
                  </div>
                  <div class="line"></div>
               </div>
            </div>
         </div>
         <div class="loading-more"></div>
      </div>
   </body>
   <script src="js/load.js"></script>
   <script>
      // "http://api.flqapp.com";
      var host = "http://api.flqapp.com";
      var host1 = "http://192.168.1.114:8848";
      var page = 1;
      $(function() {
         var app = new Vue({
            el: '#root',
            data: {
               selectTabType: 1,
               isOpenCloud: false, //是否了开通云发单权限
               isWxLogin: false, //是否登录了微信
               userInfo: {},
               dataList: [{}, {}]
               dataList: [{}, {}],
               count: 0
            },
            watch: {
               dataList: function(val) {
                  $('#root').css('display', 'block');
               }
            },
            methods: {
               selectTab: function(type) {
@@ -92,9 +104,98 @@
                  app.selectTabType = type
               },
               fetchOrderRecord: function() {
                  yesApp.showLoading();
                  var uid = yesApp.getUid();
                  var params = {
                     uid: uid,
                     page: page,
                  };
                  params = yesApp.getRequestBaseParams(params);
                  $.ajax({
                     type: "GET",
                     data: JSON.parse(params),
                     url: host + "/fanli/api/v2/user/cloud/getOrderRecord",
                     dataType: "jsonp",
                     async: false,
                     success: function(result) {
                        load.hidden();
                        yesApp.hideLoading();
                        if (result.code == 0) {
                           if (page == 1) {
                              app.dataList = new Array();
                           }
                           page += 1;
                           app.count = result.data.count;
                           var list = app.dataList.concat(result.data.list);
                           app.dataList = list;
                           if (app.count <= app.dataList.length) {
                              load.noMore();
                           }
                        } else {
                           yesApp.toast(result.msg);
                        }
                     },
                     error: function(XMLHttpRequest, textStatus, errorThrown) {
                        load.hidden();
                        yesApp.hideLoading();
                        if (textStatus === 'timeout') {
                           setTimeout(function() {}, 2000);
                        }
                     }
                  });
               },
            }
         });
         app.fetchOrderRecord();
      });
      //(浏览器窗口上边界内容高度)
      function getDocumentTop() {
         var scrollTop = 0,
            bodyScrollTop = 0,
            documentScrollTop = 0;
         if (document.body) {
            bodyScrollTop = document.body.scrollTop;
         }
         if (document.documentElement) {
            documentScrollTop = document.documentElement.scrollTop;
         }
         scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop;
         console.log("scrollTop:" + scrollTop);
         return scrollTop;
      }
      //可视窗口高度(屏幕可以看见的高度)
      function getWindowHeight() {
         var windowHeight = 0;
         if (document.compatMode == "CSS1Compat") {
            windowHeight = document.documentElement.clientHeight;
         } else {
            windowHeight = document.body.clientHeight;
         }
         console.log("windowHeight:" + windowHeight);
         return windowHeight;
      }
      //滚动条滚动高度(即整个网页的高度)
      function getScrollHeight() {
         var scrollHeight = 0,
            bodyScrollHeight = 0,
            documentScrollHeight = 0;
         if (document.body) {
            bodyScrollHeight = document.body.scrollHeight;
         }
         if (document.documentElement) {
            documentScrollHeight = document.documentElement.scrollHeight;
         }
         scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ? bodyScrollHeight : documentScrollHeight;
         console.log("scrollHeight:" + scrollHeight);
         return scrollHeight;
      }
   </script>
</html>