admin
2020-06-11 3bc16a1d3afee0d1ba5c39b1415309e1fe2c63a1
AppInside/cloudPushOrder/cloudPushOrderManage.html
@@ -15,6 +15,12 @@
      <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">
@@ -37,7 +43,7 @@
         </div>
         <!-- 云发单管理 -->
         <div v-if="selectTabType==1" class="div_cloudPushOrderManage">
         <div v-if="selectTabType==1" class="div_cloudPushOrderManage" v-cloak>
            <div class="div_top_header">
               <div class="" style="display: -webkit-flex;">
                  <img :src="userInfo.portrait" class="headPortrait">
@@ -55,7 +61,7 @@
               </div>
            </div>
            <!-- 云发单管理未登录 -->
            <div v-if="!isWxLogin" class="div_cloudPushOrderManage_notLogin">
            <div v-if="!isWxLogin" class="div_cloudPushOrderManage_notLogin" v-cloak>
               <div class="div_cloudPushOrderManage_notLogin_content1">
                  <div class="login_wx" @click="loginWX()">
                     <p>登录微信</p>
@@ -113,7 +119,7 @@
               </div>
            </div>
            <!-- 云发单管理已经登录 -->
            <div v-if="isWxLogin" class="div_cloudPushOrderManage_login">
            <div v-if="isWxLogin" class="div_cloudPushOrderManage_login" v-cloak>
               <div class="div_cloudPushOrderManage_login_content1">
                  <div style="display: -webkit-flex; justify-content: space-between;">
                     <div>
@@ -170,7 +176,8 @@
            <div style="height: 0.2rem;"></div>
         </div>
         <div v-if="selectTabType==2" class="div_goodsLibrary">
         <!-- 发单商品库 -->
         <div v-if="selectTabType==2" class="div_goodsLibrary" v-cloak>
            <div class="div_goodsLibrary_content1">
               <div>
                  <div style="color: #333333;font-size: 0.34rem;height: 0.34rem; display: -webkit-flex;align-items: center;margin-left: 0.25rem;margin-top: 0.23rem;">
@@ -180,7 +187,10 @@
                     官方精选1个小时内仅发送一个商品(9:00~21:00)
                  </div>
               </div>
               <img src="img/icon_off.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;">
               <img v-if="!official" src="img/icon_off.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
                @click="openGFRecomend">
               <img v-else src="img/icon_on.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
                @click="openGFRecomend">
            </div>
            <div class="div_goodsLibrary_content2">
@@ -192,49 +202,74 @@
                     即选即发,注重质量不追求数量,避免骚扰群友
                  </div>
               </div>
               <img src="img/icon_off.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;">
               <img v-if="!custom" src="img/icon_off.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
                @click="openFSGoods">
               <img v-else src="img/icon_on.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
                @click="openFSGoods">
            </div>
            <div class="div_goodsLibraryList">
               <div class="div_item_goodsLibrary" v-for="(item, index) in goodsList">
                  <div>
                     <img v-bind:src="goodsList.img" class="goodsimg" />
                  </div>
               <div class="div_item_goodsLibrary" v-for="(item, index) in goodsList">
                  <div class="div_goodsBG">
                     <img v-bind:src="item.goods.picUrl" class="goodsimg" />
                     <img v-if="item.goods.state==2" src="img/icon_send.png" class="topleftImg">
                     <img v-else-if="item.goods.state==1" src="img/icon_ydown.png" class="topleftImg">
                  </div>
                  <div class="div_item_rightBg">
                     <div class="div_goods_title_bg">
                        <img src="img/icon_tb.png">
                        <span class="goods_title">{{item.title}}</span>
                        <img v-if="item.goods.shopType==10" src="img/icon_tb.png">
                        <img v-else-if="item.goods.shopType==11" src="img/icon_tm.png">
                        <img v-else-if="item.goods.shopType==20" src="img/icon_jd.png">
                        <img v-else-if="item.goods.shopType==30" src="img/icon_pdd.png" style="width: 0.81rem;">
                        <img v-else-if="item.goods.shopType==40" src="img/icon_wph.png" style="width: 0.9rem;">
                        <img v-else-if="item.goods.shopType==50" src="img/icon_sn.png" style="width: 1.12rem;">
                        <span v-if="item.goods.shopType==30" class="goods_title" style="text-indent: 0.93rem;">{{item.goods.title}}</span>
                        <span v-else-if="item.goods.shopType==40" class="goods_title" style="text-indent: 1.02rem;">{{item.goods.title}}</span>
                        <span v-else-if="item.goods.shopType==50" class="goods_title" style="text-indent: 1.24rem;">{{item.goods.title}}</span>
                        <span v-else class="goods_title">{{item.goods.title}}</span>
                     </div>
                     <div class="div_goods_labels_bg">
                        <div class="div_goods_label1">&nbsp;公益宝贝&nbsp;</div>
                     <div v-if="item.goods.labels" class="div_goods_labels_bg">
                        <div class="div_goods_label1">&nbsp;{{item.goods.labels[0].content}}&nbsp;</div>
                        <div class="div_goods_label2">&nbsp;夏季爆款&nbsp;</div>
                     </div>
                     </div>
                     <div class="div_store_bg">
                        <img src="img/icon_store.png">
                        <div>{{item.store}}</div>
                        <img v-if="item.goods.shopInfo" src="img/icon_store.png">
                        <div v-if="item.goods.shopInfo">{{item.goods.shopInfo.shopName}}</div>
                     </div>
                     <div class="div_coupon_bg">
                        <div v-if="item.type==1" style="color: white;font-size: 0.24rem;font-weight: bold;width: 0.41rem;height: 0.36rem;background-color: #E5005C;display: flex;align-items: center;justify-content: center;border-radius: 0.06rem 0 0 0.06rem;">
                        <div v-if="item.goods.shopType!=40&&item.goods.hasCoupon" style="color: white;font-size: 0.24rem;font-weight: bold;width: 0.41rem;height: 0.36rem;background-color: #E5005C;display: flex;align-items: center;justify-content: center;border-radius: 0.06rem 0 0 0.06rem;">
                           券
                        </div>
                        <div v-else style="color: white;font-size: 0.24rem;background-color: #E5005C;border-radius: 0.06rem;">
                           &nbsp;&nbsp;2.5折&nbsp;&nbsp;
                        <div v-else-if="item.goods.shopType==40" style="color: white;font-size: 0.24rem;background-color: #E5005C;border-radius: 0.06rem;">
                           &nbsp;&nbsp;{{item.goods.discount}}&nbsp;&nbsp;
                        </div>
                        <div v-if="item.type==1" class="coupon_money">&nbsp;¥15 &nbsp;</div>
                        <div class="fanli_title">&nbsp;&nbsp; 返¥9.9 &nbsp;&nbsp;</div>
                        <div v-if="item.goods.shopType!=40&&item.goods.hasCoupon" class="coupon_money">&nbsp;¥{{item.goods.couponInfo.amount}}
                           &nbsp;</div>
                        <div class="fanli_title">&nbsp;&nbsp; 返{{item.goods.moneyInfo.fanliMoney}} &nbsp;&nbsp;</div>
                     </div>
                     <div class="div_payment_sales_bg">
                        <div>¥</div>
                        <div>0</div>
                        <div>¥78.9</div>
                        <div v-if="item.type==1">月销 8968</div>
                        <div v-if="item.goods.couponPrice">{{item.goods.couponPrice}}</div>
                        <div v-else>{{item.goods.zkPrice}}</div>
                        <div>¥{{item.goods.zkPrice}}</div>
                        <div v-if="item.goods.shopType!=40">月销 {{item.goods.salesCount}}</div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <div class="dialogmask_notOpen">
@@ -242,7 +277,7 @@
               <img src="img/icon_close.png" @click="hiddenDialog()">
               <div class="dialog_title">未开通提醒</div>
               <div class="dialog_content">云发单首先要登录微信,且需要购买云发单服务,完成设置后,才会自动发单/发圈。</div>
               <div class="dialog_commit" @click="commitAddTxRecord">去开通</div>
               <div class="dialog_commit" @click="pushOpenVip">去开通</div>
            </div>
         </div>
@@ -272,8 +307,11 @@
            </div>
         </div>
         <div v-show="selectTabType==2" class="loading-more"></div>
      </div>
   </body>
   <script src="js/load.js"></script>
   <script>
      // "http://api.flqapp.com";
@@ -281,26 +319,32 @@
      var host1 = "http://192.168.1.114:8848";
      var check = null;
      var wId = null;
      $(function() {
         var app = new Vue({
            el: '#root',
            data: {
               selectTabType: 1,
               page: 1,
               openState: false, // 是否了开通云发单权限
               isWxLogin: false, // 是否登录了微信
               circle: false, // 朋友圈-是否开启
               qrCodeUrl: null,
               userInfo: {},
               dataList: [{}, {}],
               goodsList: [{
                  title: '牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款流行港...',
                  store: '三只松鼠官方旗舰店',
                  type: 1
               }, {
                  title: '牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款流行港...',
                  store: '三只松鼠官方旗舰店',
                  type: 2
               }, ]
               custom: false, // 优先发送自选商品库
               official: false, // 自动采集官方推荐
               count: 0,
               goodsList: [
                  //    {
                  //    goods: {
                  //       shopInfo: {
                  //          shopName: null
                  //       }
                  //    }
                  // },
               ]
            },
            watch: {
@@ -308,14 +352,20 @@
            methods: {
               selectTab: function(type) {
                  if (app.selectTabType == type) return;
                  $('.div_header_line_' + type).css('opacity', '1')
                  $('.div_header_' + type).css('color', '#E5005C')
                  $('.div_header_line_' + type).css('opacity', '1');
                  $('.div_header_' + type).css('color', '#E5005C');
                  $('.div_header_line_' + app.selectTabType).css('opacity', '0')
                  $('.div_header_' + app.selectTabType).css('color', '#000000')
                  $('.div_header_line_' + app.selectTabType).css('opacity', '0');
                  $('.div_header_' + app.selectTabType).css('color', '#000000');
                  app.selectTabType = type
                  document.body.scrollTop = document.documentElement.scrollTop = 0;
                  app.selectTabType = type;
                  app.stopMacloginCheck();
                  if (type == 2) { //切换到发单商品库
                     app.page = 1;
                     app.fetchGoodsList();
                  }
               },
               hiddenDialog: function() {
@@ -324,11 +374,11 @@
                  $('.dialogmask_wx').css('display', 'none')
                  app.stopMacloginCheck();
               },
               // 开通云发单
               openCloudPushOrder: function() {
                  yesApp.jumpWeb(host1 + '/flqFront/AppInside/cloudPushOrder/openCloudPushOrder.html', null);
               },
               // 登录微信
               loginWX: function() {
                  if (app.openState) {
                     app.fetchQrcodeMaclogin();
@@ -336,6 +386,29 @@
                  } else {
                     yesApp.jumpWeb(host1 + '/flqFront/AppInside/cloudPushOrder/openCloudPushOrder.html', null);
                  }
               },
               openGFRecomend: function() {
                  if (app.openState) {
                  } else {
                     $('.dialogmask_notOpen').css('display', 'block')
                  }
               },
               openFSGoods: function() {
                  if (app.openState) {
                  } else {
                     $('.dialogmask_notOpen').css('display', 'block')
                  }
               },
               pushOpenVip: function() {
                  $('.dialogmask_notOpen').css('display', 'none')
                  yesApp.jumpWeb(host1 + '/flqFront/AppInside/cloudPushOrder/openCloudPushOrder.html', null);
               },
               commitAddTxRecord: function() {
@@ -359,6 +432,7 @@
                        yesApp.hideLoading();
                        if (result.code == 0) {
                           wid = result.data.wId;
                           app.qrCodeUrl = result.data.qrCodeUrl;
                           $('.dialogmask_wx').css('display', 'block');
                           app.setMacloginCheck();
@@ -387,7 +461,7 @@
                  var uid = yesApp.getUid();
                  var params = {
                     uid: uid,
                     wId: wId
                     wId: wid
                  };
                  params = yesApp.getRequestBaseParams(params);
                  $.ajax({
@@ -420,7 +494,7 @@
               stopMacloginCheck: function() {
                  clearInterval(check);
               },
               // 云发单开通信息
               fetcCloudInfo: function() {
                  yesApp.showLoading();
                  var uid = yesApp.getUid();
@@ -458,10 +532,103 @@
                        }
                     }
                  });
               },
               // 发单商品库
               fetchGoodsList: function() {
                  yesApp.showLoading();
                  var uid = yesApp.getUid();
                  var params = {
                     uid: uid,
                     page: app.page
                  };
                  params = yesApp.getRequestBaseParams(params);
                  $.ajax({
                     type: "GET",
                     data: JSON.parse(params),
                     url: host + "/fanli/api/v2/user/cloud/getGoodsList",
                     dataType: "jsonp",
                     async: false,
                     success: function(result) {
                        yesApp.hideLoading();
                        if (result.code == 0) {
                           app.custom = result.data.custom;
                           app.official = result.data.official;
                           if (app.page == 1) {
                              app.goodsList = new Array();
                           }
                           app.page += 1;
                           app.count = result.data.count;
                           var list = app.goodsList.concat(result.data.list);
                           app.goodsList = list;
                           if (app.count <= app.goodsList.length) {
                              load.noMore();
                           }
                        } else {
                           yesApp.toast(result.msg);
                        }
                     },
                     error: function(XMLHttpRequest, textStatus, errorThrown) {
                        yesApp.hideLoading();
                        if (textStatus === 'timeout') {
                           setTimeout(function() {}, 2000);
                        }
                     }
                  });
               }
            }
         });
         app.fetcCloudInfo();
      });
      //(浏览器窗口上边界内容高度)
      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>