|
@@ -16,24 +16,56 @@
|
|
|
|
|
|
<div id="buy_nav2" style="display: none"><#--我的团购信息-->
|
|
|
<div class="weui-form-preview">
|
|
|
- <div class="weui-form-preview__label">
|
|
|
- <label class="weui-form-preview__label">我的订单    提交时间    订单状态</label>
|
|
|
+ <div style="display: flex; flex-direction: row; color: grey; font-size: medium;">
|
|
|
+ <div style="width: 33%; text-align: center;color: #0a001f">我的订单</div>
|
|
|
+ <div style="width: 33%; text-align: center;color: #0a001f">提交时间</div>
|
|
|
+ <div style="width: 33%; text-align: center;color: #0a001f">订单状态</div>
|
|
|
</div>
|
|
|
- <div id="MyBuyAll"></div>
|
|
|
+ </div>
|
|
|
+ <div id="MyBuyAll">
|
|
|
+ <a href="javascript:void(0);" style="color: grey;font-size: large">
|
|
|
+ <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">
|
|
|
+ <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">
|
|
|
+ 蔬菜套餐,猪肉牛肉金针菇等
|
|
|
+ </div>
|
|
|
+ <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">
|
|
|
+ 02/02 14:30
|
|
|
+ </div>
|
|
|
+ <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">
|
|
|
+ 在团
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="weui-form-preview"
|
|
|
id="buyListGroup">
|
|
|
- <div class="weui-form-preview__label"
|
|
|
- style="display:flex; flex-direction: row; justify-content: space-between">
|
|
|
- <label onclick="a()"
|
|
|
- style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">标题</label>
|
|
|
- <label style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">已团</label>
|
|
|
- <label style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">截止时间</label>
|
|
|
- <label style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">状态</label>
|
|
|
+ <div style="display: flex; flex-direction: row; color: grey; font-size: medium;">
|
|
|
+ <div style="width: 40%; text-align: center;color: #0a001f">标题</div>
|
|
|
+ <div style="width: 15%; text-align: center;color: #0a001f">已团</div>
|
|
|
+ <div style="width: 30%; text-align: center;color: #0a001f">截止时间</div>
|
|
|
+ <div style="width: 15%; text-align: center;color: #0a001f">状态</div>
|
|
|
</div>
|
|
|
- <div id="buyAll"></div>
|
|
|
+ </div>
|
|
|
+ <div id="buyAll" class="weui-panel__bd">
|
|
|
+ <#-- <a href="javascript:void(0);" style="color: grey;font-size: large">
|
|
|
+ <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;"
|
|
|
+ onclick=" myBuyClick()">
|
|
|
+ <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">
|
|
|
+ 蔬菜套餐,猪肉牛肉金针菇等
|
|
|
+ </div>
|
|
|
+ <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">
|
|
|
+ 24/100
|
|
|
+ </div>
|
|
|
+ <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">
|
|
|
+ 02/02 14:30
|
|
|
+ </div>
|
|
|
+ <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">
|
|
|
+ 在团
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -43,27 +75,46 @@
|
|
|
$('#buy_nav1')[0].style.display = '';
|
|
|
$('#buyListGroup')[0].style.display = '';
|
|
|
$('#buy_nav2')[0].style.display = 'none';
|
|
|
- /* $.ajax({
|
|
|
- url: '',
|
|
|
- type: 'get',
|
|
|
- data: {},
|
|
|
- success: function (data) {
|
|
|
- if (data.success) {
|
|
|
- if (data.data.length > 0) {
|
|
|
- hasData = true;
|
|
|
- data.data.forEach(function (v) {
|
|
|
- buyList(v);
|
|
|
- });
|
|
|
- }
|
|
|
- else {
|
|
|
- }
|
|
|
+ $('#buyAll')[0].style.display = '';
|
|
|
+ $('#buyAll').empty();//清除节点
|
|
|
+ $.ajax({
|
|
|
+ url: '/home/buy/group',
|
|
|
+ type: 'get',
|
|
|
+ data: {},
|
|
|
+ success: function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ if (data.data.length > 0) {
|
|
|
+ hasData = true;
|
|
|
+ data.data.forEach(function (v) {
|
|
|
+ buyList(v);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
- },
|
|
|
- });*/
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function buyList(v) {
|
|
|
+ $('#buyAll').append(' <a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form"\n' +
|
|
|
+ ' onclick=\'myBuyClick(' + JSON.stringify(v) + ')\'>\n' +
|
|
|
+ ' <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">\n' +
|
|
|
+ ' <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">\n' +
|
|
|
+ ' 蔬菜套餐,猪肉牛肉金针菇等\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">\n' +
|
|
|
+ ' 24/100\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">\n' +
|
|
|
+ ' 02/02 14:30\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">\n' +
|
|
|
+ ' 在团\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' </a>');
|
|
|
}
|
|
|
|
|
|
|
|
@@ -71,14 +122,54 @@
|
|
|
function buyGroup2() {
|
|
|
$('#buy_nav1')[0].style.display = 'none';
|
|
|
$('#buyListGroup')[0].style.display = 'none';
|
|
|
- //$('#details')[0].style.display = 'none';
|
|
|
+ $('#buyAll')[0].style.display = 'none';
|
|
|
$('#buy_nav2')[0].style.display = '';
|
|
|
+ $('#MyBuyAll').empty();
|
|
|
+ $.ajax({
|
|
|
+ url: '',
|
|
|
+ type: 'get',
|
|
|
+ data: {},
|
|
|
+ success: function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ if (data.data.length > 0) {
|
|
|
+ hasData = true;
|
|
|
+ data.data.forEach(function (v) {
|
|
|
+ MybuyList(v);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function MybuyList(v) {
|
|
|
+ $('#MyBuyAll').append('<a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form" onclick=\'myBuyClick2(' + JSON.stringify(v) + ')\'>\n' +
|
|
|
+ ' <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">\n' +
|
|
|
+ ' <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">\n' +
|
|
|
+ ' 蔬菜套餐,猪肉牛肉金针菇等\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">\n' +
|
|
|
+ ' 02/02 14:30\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">\n' +
|
|
|
+ ' 在团\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' </a>')
|
|
|
}
|
|
|
|
|
|
+ function myBuyClick2(v) {
|
|
|
+ window.location.href = "/home/buytc.html?userId=" + $('#userId').val();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/*居民求助信息*/
|
|
|
- function a() {
|
|
|
- window.location.href = "/home/buytc.html?userId="+$('#userId').val();
|
|
|
+ function myBuyClick(v) {
|
|
|
+ window.location.href = "/home/buytc.html?userId=" + $('#userId').val();
|
|
|
}
|
|
|
|
|
|
</script>
|