<html>
|
<head>
|
<meta charset="utf-8">
|
<title>订单搜索</title>
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
<link rel="stylesheet" type="text/css" href="css/orderSearchResult.css" />
|
<script>
|
window.onresize = function() {
|
document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
|
};
|
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;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="div_search">
|
<div class="div_search_gary">
|
<img src="img/icon_search.png">
|
<form action="javascript:;" id="searchFrom" onsubmit="searchList">
|
<input id="input_key" class="inputc" type="search" placeholder="输入快省ID/订单号" />
|
</form>
|
</div>
|
<div class="div_search_button" onclick="touchSearch()">
|
搜索
|
</div>
|
</div>
|
|
<div id="root" v-cloak>
|
<div class="div_item_bg">
|
<div class="items" v-for="(item, index) in dataList" style="margin-top: 0.2rem; padding-top: 0.2rem;">
|
<div class="div_topBg">
|
<div class="div_image">
|
<img class="image_goods">
|
<img src="img/icon_suo.png" class="image_suo">
|
</div>
|
|
<div class="div_goodsInfo_BG">
|
<div class="div_goodsInfo1">
|
<img :src="item.portrait">
|
<div class="nickName">{{item.nickName}}</div>
|
<img v-if="item.userRank=='daRen'" src="img/icon_daren.png">
|
<img v-else-if="item.userRank=='highVIP'" src="img/icon_highvip.png">
|
<img v-else-if="item.userRank=='superVIP'" src="img/icon_supvip.png">
|
<img v-else src="img/icon_tearch.png">
|
</div>
|
<div class="div_goodsInfo2">
|
ID:{{item.uid}}
|
</div>
|
<div class="div_goodsInfo3">
|
粉丝代数:NO.{{item.teamGrade}}
|
</div>
|
<div class="div_goodsInfo4">
|
|
<img v-if="item.sourceType==1" style="width: 0.63rem;" src="img/icon_tb.png">
|
<img v-else-if="item.sourceType==2" style="width: 0.63rem;" src="img/icon_jd.png">
|
<img v-else-if="item.sourceType==3" src="img/icon_pdd.png">
|
|
<div>团队订单</div>
|
</div>
|
</div>
|
</div>
|
|
<div class="content_fk">实付款:¥{{item.payment}}</div>
|
<div class="content_orderinfo">
|
<div class="orderinfo">订单信息:{{item.orderNo}}</div>
|
<div class="copyButton" @click="copyOrder(item.orderNo)">复制</div>
|
</div>
|
<div class="content_orderDate">
|
<div class="oderdateDesc">
|
订单时间:
|
</div>
|
<div class="oderdateContent" v-html="item.orderTime"></div>
|
</div>
|
<div style="margin-left: 0.25rem;margin-right: 0.25rem;margin-top: 0.15rem;height: 1px;background-color: #E0E0E0;"></div>
|
<!-- 团队分红 -->
|
<div class="teambonusBG">
|
<div>预估团队分红 ¥{{item.divMoney}}</div>
|
<div v-if="item.divState==1">未收货 </div>
|
<div v-else-if="item.divState==2">已收货</div>
|
<div v-else-if="item.divState==3">已到帐</div>
|
<div v-else>失效</div>
|
</div>
|
<div v-if="item.accountTime" class="bouns_date">
|
分红到账{{item.accountTime}}
|
</div>
|
<div style="height: 0.3rem;"></div>
|
</div>
|
</div>
|
|
<div class="loading-more"></div>
|
</div>
|
</body>
|
|
<script type="text/javascript">
|
function getQueryString(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
var r = window.location.search.substr(1).match(reg);
|
if (r != null) return unescape(r[2]);
|
return null;
|
};
|
</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;
|
|
$(function() {
|
app = new Vue({
|
el: '#root',
|
data: {
|
buttonName: '提交预览',
|
page: 1,
|
count: 0,
|
dataList: [],
|
},
|
watch: {
|
|
},
|
methods: {
|
copyOrder: function(order) {
|
yesApp.copyText(order)
|
if (yesApp.getPlatform == 1) {
|
yesApp.toast('复制成功')
|
}
|
},
|
|
fetchOrderSearch: function() {
|
yesApp.showLoading();
|
var uid = yesApp.getUid();
|
var params = {
|
uid: uid,
|
key: key
|
};
|
params = yesApp.getRequestBaseParams(params);
|
$.ajax({
|
type: "GET",
|
data: JSON.parse(params),
|
url: host + "/fanli/api/v2/user/order/teamOrderSearch",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
yesApp.hideLoading();
|
if (result.code == 0) {
|
|
for (i = 0; i < result.data.list.length; i++) {
|
var info = result.data.list[i];
|
var reg = new RegExp("\n", "g");
|
info.orderTime = info.orderTime.replace(reg, "<br/>");
|
result.data.list[i] = info;
|
}
|
|
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);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
setTimeout(function() {}, 2000);
|
}
|
}
|
});
|
}
|
}
|
});
|
app.fetchOrderSearch();
|
|
$("#input_key").keypress(function(e) {
|
var key = $.trim($(this).val());
|
if (e.keyCode === 13) {
|
if (key == null || key.length == 0 || key == '') {
|
return;
|
}
|
document.activeElement.blur();
|
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>
|