更新
This commit is contained in:
parent
3d660454a1
commit
93a1329ad0
@ -183,4 +183,11 @@ public class EbuyController {
|
||||
return result;
|
||||
}
|
||||
|
||||
//查询各状态订单数量
|
||||
@RequestMapping("/orderNumber")
|
||||
@ResponseBody
|
||||
public List<Map<String,Object>> orderNumber(@RequestParam("userId")String userId) {
|
||||
List<Map<String,Object>> result = ebuyService.orderNumber(userId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -43,4 +43,9 @@ public interface EbuyMapper {
|
||||
* 获取商品列表
|
||||
*/
|
||||
List<Map<String,Object>> commodityInfo(String keyword);
|
||||
|
||||
/**
|
||||
* 查询各状态订单数量
|
||||
*/
|
||||
List<Map<String,Object>> orderNumber(String userId);
|
||||
}
|
||||
|
@ -130,4 +130,9 @@ inner join ebuy_commodity_attribute ca on c.commodity_id = ca.commodity_id
|
||||
ORDER BY
|
||||
c.commodity_type ,c.commodity_type_details
|
||||
</select>
|
||||
|
||||
<!--查询状态订单数量-->
|
||||
<select id="orderNumber" resultType="map" parameterType="string">
|
||||
select order_status,count(*) number from ebuy_order _status where user_id = #{userId} GROUP BY order_status
|
||||
</select>
|
||||
</mapper>
|
@ -34,4 +34,9 @@ public interface EbuyService {
|
||||
* 获取商品列表
|
||||
*/
|
||||
List<Map<String, Object>> commodityInfo(String keyword);
|
||||
|
||||
/**
|
||||
* 查询各状态订单数量
|
||||
*/
|
||||
List<Map<String,Object>> orderNumber(String userId);
|
||||
}
|
@ -89,4 +89,10 @@ public class EbuyServiceImpl implements EbuyService {
|
||||
List<Map<String, Object>> result = ebuyMapper.commodityInfo(keyword);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> orderNumber(String userId) {
|
||||
List<Map<String,Object>> result = ebuyMapper.orderNumber(userId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
19
src/main/java/com/phy/ebuy/util/Listw.java
Normal file
19
src/main/java/com/phy/ebuy/util/Listw.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.phy.ebuy.util;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Listw {
|
||||
public static void main(String[] args) {
|
||||
List<String> list1=new ArrayList<String>();
|
||||
|
||||
list1.add("xxx");
|
||||
|
||||
List<String> list2=new ArrayList<String>();
|
||||
list2.add("yyy");
|
||||
list2.add("yyy");
|
||||
list1.addAll(list2);
|
||||
System.out.println(list1);
|
||||
}
|
||||
}
|
@ -6,11 +6,47 @@
|
||||
<link rel="stylesheet" href="../../static/css/accountSettings.css">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../static/img/favicon.ico" rel="external nofollow" />
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../../static/css/public.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="">
|
||||
<h1>账户设置</h1>
|
||||
<div class="content">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
||||
<legend>账号管理</legend>
|
||||
</fieldset>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>安全设置</li>
|
||||
<li>个人资料</li>
|
||||
<li>收货地址</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="security-settig select-content">
|
||||
<p>您的安全设置</p>
|
||||
<div>
|
||||
<div class="one">
|
||||
<div class="left">会员名</div>
|
||||
<div class="right">帅气的布里茨</div>
|
||||
</div>
|
||||
<div class="one">
|
||||
<div class="left">登 录 邮 箱:</div>
|
||||
<div class="right">您尚未设置登录邮箱</div>
|
||||
<div class="add selection-text">添加邮箱</div>
|
||||
<div class="modify selection-text">修改邮箱</div>
|
||||
</div>
|
||||
<div class="one">
|
||||
<div class="left">绑 定 手 机:</div>
|
||||
<div class="right">15006732580</div>
|
||||
<div class="modify selection-text">修改手机</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="personal-data select-content">
|
||||
|
||||
</div>
|
||||
<div class="receiving-address select-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../static/layui/layui.js"></script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<link rel="stylesheet" href="../../../../static/css/allOrder.css">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../static/img/favicon.ico" rel="external nofollow" />
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../../static/css/noSuchCommodity.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<link rel="stylesheet" href="../../../../static/css/pendingPayment.css">
|
||||
<link rel="stylesheet" href="../../../../static/css/allOrder.css">
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../../static/css/noSuchCommodity.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
<link rel="stylesheet" href="../../../../static/css/toBeEvaluated.css">
|
||||
<link rel="stylesheet" href="../../../../static/css/allOrder.css">
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../../static/css/noSuchCommodity.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
|
||||
</head>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<link rel="stylesheet" href="../../../../static/css/toBeReceived.css">
|
||||
<link rel="stylesheet" href="../../../../static/css/allOrder.css">
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../../static/css/noSuchCommodity.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
<link rel="stylesheet" href="../../../../static/css/toBeShipped.css">
|
||||
<link rel="stylesheet" href="../../../../static/css/allOrder.css">
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../../static/css/noSuchCommodity.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
|
||||
</head>
|
||||
|
@ -6,8 +6,9 @@
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../static/img/favicon.ico" rel="external nofollow" />
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../static/css/cart.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
<link rel="stylesheet" href="../../../static/css/noSuchCommodity.css">
|
||||
<link rel="stylesheet" href="../../static/css/public.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<link rel="stylesheet" href="../../static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../static/css/commodity.css">
|
||||
<link rel="stylesheet" href="../../static/css/public.css">
|
||||
<link rel="stylesheet" href="../../../static/css/noSuchCommodity.css">
|
||||
<script src="../../static/layui/layui.all.js"></script>
|
||||
|
||||
</head>
|
||||
@ -28,6 +29,10 @@
|
||||
</div>
|
||||
<div class="strip"></div>
|
||||
<div class="commodity-list">
|
||||
<!-- <div>
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>-->
|
||||
<!--<div class="commodity">
|
||||
<div class="business-name">
|
||||
<input type="checkbox" class="checkbox">
|
||||
|
@ -237,19 +237,19 @@
|
||||
</div>
|
||||
<div class="order">
|
||||
<div class="receiving">
|
||||
<div class="receiving-num">5</div>
|
||||
<div class="receiving-num">0</div>
|
||||
<span>待收货</span>
|
||||
</div>
|
||||
<div class="deliver">
|
||||
<div class="deliver-num">8</div>
|
||||
<div class="deliver-num">0</div>
|
||||
<span>待发货</span>
|
||||
</div>
|
||||
<div class="payment">
|
||||
<div class="payment-num">45</div>
|
||||
<div class="payment-num">0</div>
|
||||
<span>待付款</span>
|
||||
</div>
|
||||
<div class="evaluate">
|
||||
<div class="evaluate-num">12</div>
|
||||
<div class="evaluate-num">0</div>
|
||||
<span>待评价</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -9,5 +9,38 @@ html{
|
||||
}
|
||||
body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.content{
|
||||
margin: 0 auto;
|
||||
width: 85%;
|
||||
}
|
||||
nav{
|
||||
width: 8.5rem;
|
||||
float: left;
|
||||
}
|
||||
nav ul li{
|
||||
height: 3rem;
|
||||
line-height: 3rem;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
nav ul li:hover{
|
||||
color: #17b5fe;
|
||||
}
|
||||
.select-content{
|
||||
width: 52.4rem;
|
||||
height: 42rem;
|
||||
float: left;
|
||||
margin: 0 2rem;
|
||||
border: 2px solid rgb(196,213,224);
|
||||
padding: 2rem 3rem;
|
||||
}
|
||||
.security-settig{
|
||||
|
||||
}
|
||||
.personal-data{
|
||||
display: none;
|
||||
}
|
||||
.receiving-address{
|
||||
display: none;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
p,span{
|
||||
text-decoration: none;
|
||||
user-select: none;
|
||||
}
|
||||
.middle .box{
|
||||
height: fit-content;
|
||||
@ -77,6 +77,9 @@ p,span{
|
||||
padding: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.commodity-price p{
|
||||
font-weight: normal;
|
||||
}
|
||||
.commodity-price span:nth-child(3){
|
||||
font-weight: normal;
|
||||
|
||||
@ -85,6 +88,7 @@ p,span{
|
||||
text-align: center;
|
||||
padding:1em;
|
||||
}
|
||||
|
||||
.commodity-amount .amount-box{
|
||||
width: 5rem;
|
||||
display: flex;
|
||||
|
14
src/main/webapp/static/css/noSuchCommodity.css
Normal file
14
src/main/webapp/static/css/noSuchCommodity.css
Normal file
@ -0,0 +1,14 @@
|
||||
.no{
|
||||
margin: 2rem auto;
|
||||
width: 22.7rem;
|
||||
height: 8rem;
|
||||
}
|
||||
.no img{
|
||||
float: left;
|
||||
height: 8rem;
|
||||
}
|
||||
.no p{
|
||||
float: left;
|
||||
height: 8rem;
|
||||
line-height: 8rem;
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
.hand-shape{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*选中小手*/
|
||||
.selection-text{
|
||||
cursor: pointer;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
/*选中变色*/
|
||||
.selection-text:hover{
|
||||
color: #17b5fe;
|
||||
text-decoration: underline;
|
||||
color: #17b5fe !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
/*灰色字体*/
|
||||
.gray-font{
|
||||
color:rgb(136,136,136);
|
||||
color:rgb(136,136,136) !important;
|
||||
}
|
||||
|
BIN
src/main/webapp/static/img/noLogo.png
Normal file
BIN
src/main/webapp/static/img/noLogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
@ -1,3 +1,14 @@
|
||||
|
||||
|
||||
layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
const layer = layui.layer
|
||||
,$ = layui.jquery
|
||||
,element = layui.element
|
||||
,carousel = layui.carousel;
|
||||
|
||||
let index = layer.load(0, {shade: [0.5,'#000']});
|
||||
setTimeout("layer.closeAll()",5000)
|
||||
|
||||
//选择Tab页内容
|
||||
let accountTab = sessionStorage.getItem("accountTab");
|
||||
//个人首页
|
||||
@ -35,12 +46,4 @@ $(".my-logo").on("click",function () {
|
||||
$(".layui-tab-item:eq(1)").removeClass("layui-show");
|
||||
$(".layui-tab-item:eq(2)").removeClass("layui-show");
|
||||
});
|
||||
|
||||
layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
const layer = layui.layer
|
||||
,$ = layui.jquery
|
||||
,element = layui.element
|
||||
,carousel = layui.carousel;
|
||||
|
||||
|
||||
})
|
@ -15,9 +15,18 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderStatus:"05",
|
||||
},
|
||||
success:function (data) {
|
||||
if (data.length == 0) {
|
||||
let no = `
|
||||
<div class="no">
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>`;
|
||||
$(".table-body").html(no);
|
||||
} else {
|
||||
orderInfo = data;
|
||||
let orderTable = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
|
||||
let orderOne = "";
|
||||
//待付款
|
||||
if (data[i].order_status == "01") {
|
||||
@ -195,6 +204,7 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderTable += orderOne;
|
||||
}
|
||||
$(".table-body").html(orderTable);
|
||||
}
|
||||
},
|
||||
error:function () {
|
||||
}
|
||||
|
@ -8,9 +8,18 @@ $.ajax({
|
||||
userId:userId,
|
||||
},
|
||||
success:function (data) {
|
||||
if (data.length == 0) {
|
||||
let no = `
|
||||
<div class="no">
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>`;
|
||||
$(".cart-info").html(no);
|
||||
} else {
|
||||
console.log(data);
|
||||
let cartInfo = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
|
||||
let attribute = data[i].commodity_attribute;
|
||||
let attributes = attribute.split(",");
|
||||
let attributesInfo = "";
|
||||
@ -63,7 +72,7 @@ $.ajax({
|
||||
cartInfo += oneInfo;
|
||||
}
|
||||
$(".cart-info").html(cartInfo);
|
||||
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
//监听数量
|
||||
let $input = $(".amount:eq("+i+")");
|
||||
|
@ -33,7 +33,14 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
dataType:"json",
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
|
||||
if (data.length == 0) {
|
||||
let no = `
|
||||
<div class="no">
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>`;
|
||||
$(".commodity-list").html(no);
|
||||
} else {
|
||||
let commodityList = '';
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
//商品属性
|
||||
@ -44,12 +51,12 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
let attributeText = attributeName[1].split(",");
|
||||
let texts = '';
|
||||
for (let k = 0; k < attributeText.length; k++) {
|
||||
let text = `<option value="0">${attributeText[k]}</option>`;
|
||||
let text = `<option value="${attributeText[k]}">${attributeText[k]}</option>`;
|
||||
texts += text;
|
||||
}
|
||||
let attr = `<span>${attributeName[0]}:</span>
|
||||
<div class="attribute">
|
||||
<select name="">
|
||||
<select name="" id="${j}">
|
||||
<option value="" selected="">请选择</option>
|
||||
`+texts+`
|
||||
</select>
|
||||
@ -91,7 +98,7 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
<div class="commodity-amount">
|
||||
<div class="amount-box">
|
||||
<div class="subtraction arithmetic hand-shape">-</div>
|
||||
<input type="text" class="amount" value="1">
|
||||
<input type="text" class="amount" value="1" readonly="readonly">
|
||||
<div class="addition arithmetic hand-shape">+</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -101,7 +108,7 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
`+describes+`
|
||||
</div>
|
||||
<div class="operation">
|
||||
<p class="selection-text">加入购物车</p>
|
||||
<p class="selection-text add-to-cart">加入购物车</p>
|
||||
<p class="selection-text">立即购买</p>
|
||||
<p class="selection-text">收藏宝贝</p>
|
||||
<p class="selection-text">举报</p>
|
||||
@ -112,6 +119,7 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
commodityList += commodity;
|
||||
}
|
||||
$(".commodity-list").html(commodityList);
|
||||
}
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
//监听数量
|
||||
@ -205,20 +213,30 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
|
||||
}
|
||||
|
||||
//加入购物车
|
||||
$(".add-to-cart").on("click",function () {
|
||||
//获取属性
|
||||
let first = $(".commodity-attribute span:eq(0)").text()+""+$("#0").val();
|
||||
let second = $(".commodity-attribute span:eq(1)").text()+""+$("#1").val();
|
||||
if ($("#0").val() == "" || $("#0").val() == null) {
|
||||
layer.msg("请选择第一商品属性")
|
||||
} else if ($("#1").val() == "" || $("#0").val() == null) {
|
||||
layer.msg("请选择第二商品属性")
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
error:function () {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
//加入购物车
|
||||
$(".operation .selection-text").on("click",function () {
|
||||
alert(1)
|
||||
})
|
||||
|
||||
//商品浏览
|
||||
$(".middle .box .search .search-box .search-box-box .search-text").on("click",function () {
|
||||
$(".iframe-middle",window.parent.document).attr("src","/ebuy/commodity");
|
||||
sessionStorage.setItem("keyword",$(".search-box-input").val());
|
||||
})
|
||||
|
||||
//保留搜索框的内容
|
||||
$(".search-box-input").val(sessionStorage.getItem("keyword"));
|
||||
})
|
@ -28,7 +28,7 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
let typeNum = i.split(",")[1];
|
||||
let type = "";
|
||||
for (let j = 0; j < data[i].length; j++) {
|
||||
let o = `<span>${data[i][j]}</span>`;
|
||||
let o = `<span class="type">${data[i][j]}</span>`;
|
||||
type += o;
|
||||
}
|
||||
let one = `
|
||||
@ -57,4 +57,37 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
$(".iframe-middle",window.parent.document).attr("src","/ebuy/commodity");
|
||||
sessionStorage.setItem("keyword",$(".search-box-input").val());
|
||||
})
|
||||
|
||||
//单击类型搜索
|
||||
$(".type").on("click",function () {
|
||||
$(".iframe-middle",window.parent.document).attr("src","/ebuy/commodity");
|
||||
sessionStorage.setItem("keyword",$(this).text());
|
||||
})
|
||||
|
||||
//各状态订单数量
|
||||
let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
|
||||
$.ajax({
|
||||
url:"/ebuy/orderNumber",
|
||||
type:"post",
|
||||
dataType: "json",
|
||||
data:{
|
||||
userId: userInfo.user_id
|
||||
},
|
||||
success:function (data) {
|
||||
$(".receiving-num").text(data[2].number)
|
||||
$(".deliver-num").text(data[1].number)
|
||||
$(".payment-num").text(data[0].number)
|
||||
$(".evaluate-num").text(data[3].number)
|
||||
},
|
||||
error:function () {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
//订单去个人首页
|
||||
$(".order div").on("click",function () {
|
||||
$(".iframe-middle", window.parent.document).attr("src","/ebuy/account");
|
||||
sessionStorage.setItem("accountTab","personalHomepage");
|
||||
sessionStorage.setItem("orderStatus",$(this).find("span").text());
|
||||
})
|
||||
})
|
@ -15,9 +15,18 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderStatus:"01",
|
||||
},
|
||||
success:function (data) {
|
||||
if (data.length == 0) {
|
||||
let no = `
|
||||
<div class="no">
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>`;
|
||||
$(".table-body").html(no);
|
||||
} else {
|
||||
orderInfo = data;
|
||||
let orderTable = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
|
||||
let orderOne = "";
|
||||
//待付款
|
||||
orderOne = `<div class="oneOrder">
|
||||
@ -64,6 +73,7 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderTable += orderOne;
|
||||
}
|
||||
$(".table-body").html(orderTable);
|
||||
}
|
||||
},
|
||||
error:function () {
|
||||
}
|
||||
|
@ -5,4 +5,28 @@ layui.use(['layer',"jquery","element","carousel"], function() {
|
||||
, element = layui.element
|
||||
, carousel = layui.carousel;
|
||||
|
||||
//获取订单类型
|
||||
let orderStatus = sessionStorage.getItem("orderStatus");
|
||||
if (orderStatus == '待付款') {
|
||||
$(".layui-tab-item").removeClass("layui-show");
|
||||
$(".layui-tab-content div:eq(1)").addClass("layui-show");
|
||||
$(".layui-tab-title li").removeClass("layui-this");
|
||||
$(".layui-tab-title li:eq(1)").addClass("layui-this");
|
||||
} else if (orderStatus == '待发货') {
|
||||
$(".layui-tab-item").removeClass("layui-show");
|
||||
$(".layui-tab-content div:eq(2)").addClass("layui-show")
|
||||
$(".layui-tab-title li").removeClass("layui-this");
|
||||
$(".layui-tab-title li:eq(2)").addClass("layui-this");
|
||||
} else if (orderStatus == '待收货') {
|
||||
$(".layui-tab-item").removeClass("layui-show");
|
||||
$(".layui-tab-content div:eq(3)").addClass("layui-show")
|
||||
$(".layui-tab-title li").removeClass("layui-this");
|
||||
$(".layui-tab-title li:eq(3)").addClass("layui-this");
|
||||
} else if (orderStatus == '待评价') {
|
||||
$(".layui-tab-item").removeClass("layui-show");
|
||||
$(".layui-tab-content div:eq(4)").addClass("layui-show")
|
||||
$(".layui-tab-title li").removeClass("layui-this");
|
||||
$(".layui-tab-title li:eq(4)").addClass("layui-this");
|
||||
}
|
||||
|
||||
})
|
@ -15,6 +15,14 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderStatus:"04",
|
||||
},
|
||||
success:function (data) {
|
||||
if (data.length == 0) {
|
||||
let no = `
|
||||
<div class="no">
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>`;
|
||||
$(".table-body").html(no);
|
||||
} else {
|
||||
orderInfo = data;
|
||||
let orderTable = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
@ -64,6 +72,7 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderTable += orderOne;
|
||||
}
|
||||
$(".table-body").html(orderTable);
|
||||
}
|
||||
},
|
||||
error:function () {
|
||||
}
|
||||
|
@ -15,9 +15,18 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderStatus:"03",
|
||||
},
|
||||
success:function (data) {
|
||||
if (data.length == 0) {
|
||||
let no = `
|
||||
<div class="no">
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>`;
|
||||
$(".table-body").html(no);
|
||||
} else {
|
||||
orderInfo = data;
|
||||
let orderTable = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
|
||||
let orderOne = "";
|
||||
//待收货
|
||||
orderOne = `<div class="oneOrder">
|
||||
@ -66,6 +75,7 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderTable += orderOne;
|
||||
}
|
||||
$(".table-body").html(orderTable);
|
||||
}
|
||||
},
|
||||
error:function () {
|
||||
}
|
||||
|
@ -15,9 +15,18 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderStatus:"02",
|
||||
},
|
||||
success:function (data) {
|
||||
if (data.length == 0) {
|
||||
let no = `
|
||||
<div class="no">
|
||||
<img src="../../static/img/noLogo.png"/>
|
||||
<p>没有符合条件的宝贝,请尝试其他搜索条件。</p>
|
||||
</div>`;
|
||||
$(".table-body").html(no);
|
||||
} else {
|
||||
orderInfo = data;
|
||||
let orderTable = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
|
||||
let orderOne = "";
|
||||
//待发货
|
||||
orderOne = `<div class="oneOrder">
|
||||
@ -61,6 +70,7 @@ layui.use(["layer","jquery","element","carousel","table"], function() {
|
||||
orderTable += orderOne;
|
||||
}
|
||||
$(".table-body").html(orderTable);
|
||||
}
|
||||
},
|
||||
error:function () {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user