| | |
| | | <div>
|
| | | 朋友圈发单
|
| | | </div>
|
| | | <img src="img/icon_off.png">
|
| | | <img v-if="circle" src="img/icon_on.png" @click="switchCircleState(false)">
|
| | | <img v-else src="img/icon_off.png" @click="switchCircleState(true)">
|
| | | </div>
|
| | |
|
| | | <div class="div_cloudPushOrderManage_login_content3">
|
| | |
| | | <div>
|
| | | 微信群发单
|
| | | </div>
|
| | | <img src="img/icon_refresh.png">
|
| | | <img src="img/icon_refresh.png" @click="searchGroup">
|
| | | </div>
|
| | | <div class="" style="margin-top: 0.2rem; background-color: #FFF3D3; display: -webkit-flex;align-items: center;justify-content: center;margin-left: 0.15rem;margin-right: 0.1rem;">
|
| | | <p style="font-size: 0.24rem;color: #666666; padding-top: 0.25rem;padding-left: 0.25rem;padding-bottom: 0.25rem;padding-right: 0.05rem;">
|
| | |
| | | var h5Url = "http://192.168.1.114:8848";
|
| | |
|
| | | var check = null;
|
| | | var wId = null; |
| | | var wId = null;
|
| | | var isLoadProgress = true;
|
| | |
|
| | | $(function() {
|
| | |
| | | clearInterval(check);
|
| | | },
|
| | | // 云发单开通信息
|
| | | fetcCloudInfo: function() { |
| | | if (isLoadProgress) { |
| | | yesApp.showLoading(); |
| | | fetcCloudInfo: function() {
|
| | | if (isLoadProgress) {
|
| | | yesApp.showLoading();
|
| | | isLoadProgress = true;
|
| | | }
|
| | | var uid = yesApp.getUid();
|
| | | var params = {
|
| | |
| | | }
|
| | | });
|
| | | },
|
| | | // 云发单群搜索
|
| | | searchGroup: function() {
|
| | | yesApp.showLoading();
|
| | | var uid = yesApp.getUid();
|
| | | var params = {
|
| | | uid: uid,
|
| | | };
|
| | | params = yesApp.getRequestBaseParams(params);
|
| | | $.ajax({
|
| | | type: "GET",
|
| | | data: JSON.parse(params),
|
| | | url: host + "/fanli/api/v2/user/cloud/searchGroup",
|
| | | dataType: "jsonp",
|
| | | async: false,
|
| | | success: function(result) {
|
| | | yesApp.hideLoading();
|
| | | if (result.code == 0) {
|
| | | app.listGroup = result.data.listGroup;
|
| | |
|
| | | } else {
|
| | | yesApp.toast(result.msg);
|
| | | }
|
| | | },
|
| | | error: function(XMLHttpRequest, textStatus, errorThrown) {
|
| | | yesApp.hideLoading();
|
| | | if (textStatus === 'timeout') {
|
| | | setTimeout(function() {}, 2000);
|
| | | }
|
| | | }
|
| | | });
|
| | | },
|
| | | // 改变群发单状态
|
| | | switchCircleState: function(state) {
|
| | | var states = null;
|
| | | if (state == true) {
|
| | | states = 1;
|
| | |
|
| | | } else {
|
| | | states = 0;
|
| | | }
|
| | | yesApp.showLoading();
|
| | | var uid = yesApp.getUid();
|
| | | var params = {
|
| | | uid: uid,
|
| | | state: states
|
| | | };
|
| | | params = yesApp.getRequestBaseParams(params);
|
| | | $.ajax({
|
| | | type: "GET",
|
| | | data: JSON.parse(params),
|
| | | url: host + "/fanli/api/v2/user/cloud/switchCircleState",
|
| | | dataType: "jsonp",
|
| | | async: false,
|
| | | success: function(result) {
|
| | | if (result.code == 0) {
|
| | | isLoadProgress = false;
|
| | | app.fetcCloudInfo();
|
| | |
|
| | | } else {
|
| | | yesApp.hideLoading();
|
| | | yesApp.toast(result.msg);
|
| | | }
|
| | | },
|
| | | error: function(XMLHttpRequest, textStatus, errorThrown) {
|
| | | yesApp.hideLoading();
|
| | | if (textStatus === 'timeout') {
|
| | | setTimeout(function() {}, 2000);
|
| | | }
|
| | | }
|
| | | });
|
| | | },
|
| | | // 改变群状态
|
| | | switchGroupState: function(mId, state) {
|
| | | var states = null;
|
| | | if (state == true) {
|
| | | states = 1;
|
| | |
|
| | | } else {
|
| | | states = 0;
|
| | | }
|
| | | yesApp.showLoading();
|
| | | var uid = yesApp.getUid();
|
| | | var params = {
|
| | | uid: uid,
|
| | | id: mId,
|
| | | state: state
|
| | | state: states
|
| | | };
|
| | | params = yesApp.getRequestBaseParams(params);
|
| | | $.ajax({
|
| | |
| | | dataType: "jsonp",
|
| | | async: false,
|
| | | success: function(result) {
|
| | | yesApp.hideLoading();
|
| | | if (result.code == 0) {
|
| | | isLoadProgress = false;
|
| | | app.fetcCloudInfo();
|
| | |
|
| | | } else {
|
| | | yesApp.hideLoading();
|
| | | yesApp.toast(result.msg);
|
| | | }
|
| | | },
|
New file |
| | |
| | | @keyframes rotate { |
| | | from { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | to { |
| | | transform: rotate(360deg); |
| | | transition: all 2s; |
| | | } |
| | | } |
| | | |
| | | .loading{ |
| | | display: inline; |
| | | height: 0.21rem; |
| | | width: 0.21rem; |
| | | margin-top: 0.15rem; |
| | | position: relative; |
| | | } |
| | | |
| | | .loading div{ |
| | | position: absolute; |
| | | height: 0.05rem; |
| | | transform-origin: left; |
| | | border-radius: 0.5rem; |
| | | display: flex; |
| | | } |
| | | |
| | | .loading div .k { |
| | | width: 0.08rem; |
| | | height: 0.04rem; |
| | | } |
| | | |
| | | .loading div .s{ |
| | | width: 0.13rem; |
| | | height: 0.04rem; |
| | | background: #BBBBBB; |
| | | border-radius: 0.5rem; |
| | | } |
| | | |
| | | .loading div:nth-child(2) {-webkit-transform: rotate(30deg);} |
| | | .loading div:nth-child(3) {-webkit-transform: rotate(60deg);} |
| | | .loading div:nth-child(4) {-webkit-transform: rotate(90deg);} |
| | | .loading div:nth-child(5) {-webkit-transform: rotate(120deg);} |
| | | .loading div:nth-child(6) {-webkit-transform: rotate(150deg);} |
| | | .loading div:nth-child(7) {-webkit-transform: rotate(180deg);} |
| | | .loading div:nth-child(8) {-webkit-transform: rotate(210deg);} |
| | | .loading div:nth-child(9) {-webkit-transform: rotate(240deg);} |
| | | .loading div:nth-child(10) {-webkit-transform: rotate(270deg);} |
| | | .loading div:nth-child(11) {-webkit-transform: rotate(300deg);} |
| | | .loading div:nth-child(12) {-webkit-transform: rotate(330deg);} |
| | | |
| | | |
| | | @-webkit-keyframes load{ |
| | | 0%{opacity:1;} |
| | | 100%{opacity:0;} |
| | | } |
| | | |
| | | .loading div:nth-child(1){-webkit-animation:load 1.2s linear 0s infinite;} |
| | | .loading div:nth-child(2){-webkit-animation:load 1.2s linear 0.1s infinite;} |
| | | .loading div:nth-child(3){-webkit-animation:load 1.2s linear 0.2s infinite;} |
| | | .loading div:nth-child(4){-webkit-animation:load 1.2s linear 0.3s infinite;} |
| | | .loading div:nth-child(5){-webkit-animation:load 1.2s linear 0.4s infinite;} |
| | | .loading div:nth-child(6){-webkit-animation:load 1.2s linear 0.5s infinite;} |
| | | |
| | | .loading div:nth-child(7){-webkit-animation:load 1.2s linear 0.6s infinite;} |
| | | .loading div:nth-child(8){-webkit-animation:load 1.2s linear 0.7s infinite;} |
| | | .loading div:nth-child(9){-webkit-animation:load 1.2s linear 0.8s infinite;} |
| | | .loading div:nth-child(10){-webkit-animation:load 1.2s linear 0.9s infinite;} |
| | | .loading div:nth-child(11){-webkit-animation:load 1.2s linear 1s infinite;} |
| | | .loading div:nth-child(12){-webkit-animation:load 1.2s linear 1.1s infinite;} |
New file |
| | |
| | | var load = { |
| | | init: function() { |
| | | if ($(".loading-more").length <= 0) { |
| | | return; |
| | | } |
| | | $(".loading-more").css("visibility", "hidden"); |
| | | $(".loading-more").empty(); |
| | | $(".loading-more").css("display", "flex"); |
| | | $(".loading-more").css("justify-content", "center"); |
| | | $(".loading-more").css("align-items", "center"); |
| | | $(".loading-more").css("height", "0.8rem"); |
| | | $(".loading-more").css("font-size", "0"); |
| | | $(".loading-more").append("<div class='loading'>"); |
| | | for (var i = 1; i < 13; i++) { |
| | | // alert('2'); |
| | | $(".loading").append("<div><span class='k'></span><span class='s'></span></div>"); |
| | | } |
| | | $(".loading-more").append( |
| | | "<div class='notifyContent' style='display:inline;font-size:0.3rem;margin-left:0.2rem;color:#999999'>正在加载更多数据</div>" |
| | | ) |
| | | }, |
| | | show: function(msg) { |
| | | if (msg != null && msg.length > 0) |
| | | $(".loading-more").find("div").eq(1).html(msg); |
| | | $(".loading-more").css("visibility", "visible"); |
| | | }, |
| | | hidden: function() { |
| | | $(".loading-more").css("visibility", "hidden"); |
| | | }, |
| | | isLoading: function() { |
| | | var visibility = $(".loading-more").css("visibility"); |
| | | if ("hidden" == visibility) |
| | | return false; |
| | | else |
| | | return true; |
| | | }, |
| | | noMore: function() { |
| | | $(".loading-more .notifyContent").html("没有更多了"); |
| | | $(".loading-more").find(".loading").css("display", "none"); |
| | | $(".loading-more").css("visibility", "visible"); |
| | | }, |
| | | showMore: function(element, callBack) { |
| | | if (Math.abs(load.getScrollHeight() - load.getDocumentTop() - load.getWindowHeight()) < 10) { |
| | | if (load.isLoading()) |
| | | return; |
| | | load.show(); |
| | | setTimeout(function() { |
| | | callBack(); |
| | | }, 300); |
| | | } |
| | | }, |
| | | getDocumentTop: function() { |
| | | 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; |
| | | }, |
| | | getWindowHeight: function() { |
| | | var windowHeight = 0; |
| | | if (document.compatMode == "CSS1Compat") { |
| | | windowHeight = document.documentElement.clientHeight; |
| | | } else { |
| | | windowHeight = document.body.clientHeight; |
| | | } |
| | | console.log("windowHeight:" + windowHeight); |
| | | return windowHeight; |
| | | }, |
| | | getScrollHeight: function() { |
| | | 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; |
| | | } |
| | | }; |
| | | load.init(); |
| | |
| | | var host = "http://api.flqapp.com"; |
| | | // "http://apph5.banliapp.com" || "http://192.168.1.114:8848/flqFront/"
|
| | | var h5host = "http://apph5.banliapp.com/";
|
| | |
|
| | | |
| | | $(function() {
|
| | | var app = new Vue({
|
| | | el: '#root',
|
| | |
| | | };
|
| | | window.onresize();
|
| | | </script>
|
| | |
|
| | | <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 rel="stylesheet" type="text/css" href="css/load.css" />
|
| | | <style type="text/css">
|
| | | [v-cloak] {
|
| | | display: none !important;
|
| | |
| | | </div>
|
| | | <div style="height: 0.3rem;"></div>
|
| | | </div>
|
| | |
|
| | | </div>
|
| | |
|
| | | <div class="loading-more"></div>
|
| | | </div>
|
| | | </body>
|
| | |
|
| | |
| | | };
|
| | | </script>
|
| | |
|
| | | <script src="js/load.js"></script>
|
| | |
|
| | | <script>
|
| | | var host = "http://api.flqapp.com";
|
| | |
|
| | | var key = getQueryString('key');
|
| | | $('#input_key').val(key);
|
| | | var app = null;
|
| | |
| | | el: '#root',
|
| | | data: {
|
| | | buttonName: '提交预览',
|
| | | dataList: null,
|
| | | page: 1,
|
| | | count: 0,
|
| | | dataList: [],
|
| | | },
|
| | | watch: {
|
| | |
|
| | |
| | | }
|
| | | },
|
| | |
|
| | | fetchFansSearch: function() {
|
| | | fetchOrderSearch: function() {
|
| | | yesApp.showLoading();
|
| | | var uid = yesApp.getUid();
|
| | | var params = {
|
| | |
| | | info.orderTime = info.orderTime.replace(reg, "<br/>");
|
| | | result.data.list[i] = info;
|
| | | }
|
| | | app.dataList = result.data.list;
|
| | |
|
| | | if (app.page == 1) {
|
| | | app.dataList = new Array();
|
| | | }
|
| | | app.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);
|
| | |
| | | }
|
| | | }
|
| | | });
|
| | | app.fetchFansSearch();
|
| | | app.fetchOrderSearch();
|
| | |
|
| | | $("#input_key").keypress(function(e) {
|
| | | var key = $.trim($(this).val());
|
| | |
| | | return;
|
| | | }
|
| | | document.activeElement.blur();
|
| | | app.fetchFansSearch();
|
| | | app.fetchOrderSearch();
|
| | | }
|
| | | })
|
| | | });
|
| | |
|
| | | window.onscroll = function() {
|
| | |
|
| | | if (Math.abs(getScrollHeight() - getDocumentTop() - getWindowHeight()) < 10) {
|
| | | if (load.isLoading() || (app.page > 1 && app.count <= app.dataList.length))
|
| | | return;
|
| | |
|
| | | load.show();
|
| | | setTimeout(function() {
|
| | | app.fetchOrderSearch();
|
| | | }, 300);
|
| | | }
|
| | | };
|
| | | });
|
| | |
|
| | | function touchSearch() {
|
| | | key = $('#input_key').val();
|
| | | app.fetchFansSearch();
|
| | | };
|
| | |
|
| | | //(浏览器窗口上边界内容高度)
|
| | | 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> |