Authored by zzzzzzz

各种低级bug

... ... @@ -31,7 +31,7 @@ const orderDetailData = (req, res, next) => {
// 删除订单
const delOrder = (req, res, next) => {
let orderCode = req.query.order_code;
let orderCode = req.query.id;
let uid = req.user.uid;
orderDetailModel.delOrder(orderCode, uid).then((result) => {
... ...
... ... @@ -147,6 +147,7 @@ const myDetails = (uid) => {
}).then((result) => {
result = camelCase(result);
if (result.data) {
result.data.gender = (result.data.gender === '1' ? '男' : '女');
return result.data;
// {
... ...
... ... @@ -299,7 +299,7 @@ const getOrders = (params) => {
sumCost: value.amount,
goods: _formatOrderGoods(value.order_goods, count, false, isTickets),
detailUrl: helpers.urlFormat('/home/orderdetail', {order_code: value.order_code}),
count: count,
count: value.buy_total,
isVirtual: isTickets
});
... ...
... ... @@ -16,7 +16,7 @@
<div class="reason-mask">
<div class="reason-box" >
<div class="box-head"><span class="box-cmp">完成111</span></div>
<div class="box-head"><span class="box-cmp">完成</span></div>
<div class="swiper-container box-main">
<ul class="swiper-wrapper">
... ...
... ... @@ -121,8 +121,8 @@ function getOrders(option) {
data: opt,
success: function(data) {
var num;
console.log($orderContainer);
if (data !== ' ') {
if (data) {
order.page = opt.page;
if (opt.page === 1) {
... ... @@ -142,6 +142,10 @@ function getOrders(option) {
window.rePosFooter(); // 重新计算底部位置
} else {
if (opt.page > 1) {
return;
}
$curContainer.html('<div class="no-order"><div class="icon"></div><span>你还没有订单!</span><a class="walk-way" href="//m.yohobuy.com/product/new">随便逛逛</a></div>');
order.end = true;
}
... ... @@ -245,7 +249,7 @@ orderHammer.on('tap', function(e) {
});
function scrollHandler() {
if (order.end === false && $(window).scrollTop() + winH >
if (!order.end && $(window).scrollTop() + winH >
$(document).height() - 0.25 * $orderContainer.height()) {
// 下拉请求时不显示mask
... ...
... ... @@ -169,7 +169,7 @@
}
.no-order {
position: absolute;
position: fixed;
background: #fff;
text-align: center;
top: 50%;
... ...