Explorar o código

团购页面tab切换

Longlin %!s(int64=5) %!d(string=hai) anos
pai
achega
32beaa654b

+ 24 - 0
whepi-doc/group.sql

@@ -18,4 +18,28 @@ create table jm_buy (
 ENGINE = InnoDB
 DEFAULT CHARSET = utf8
 COMMENT = '居民团购表'
+;
+
+drop table if exists jm_tuangou;
+create table jm_tuangou (
+    jm_id           bigint(20)      NOT NULL DEFAULT 0          COMMENT '团购id',
+    user_id         bigint(20)      NOT NULL DEFAULT 0          COMMENT '用户id',
+    uptown_id       bigint(20)      NOT NULL DEFAULT 0          COMMENT '小区ID',
+    tg_title        varchar(20)     NOT NULL DEFAULT ''         COMMENT '团购标题',
+    tg_supplier     varchar(20)     NOT NULL DEFAULT ''         COMMENT '团购供应商',
+    tg_goods        varchar(50)     NOT NULL DEFAULT ''         COMMENT '团购物资(套餐)',
+    tg_price        varchar(20)     NOT NULL DEFAULT ''         COMMENT '价格',
+    tg_min_num      int(11)         NOT NULL DEFAULT 0          COMMENT '最小起订量',
+    tg_end_time     datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '团购截止时间',
+    tg_deliver_time datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '预计送货时间',
+    tg_phone_number varchar(20)     NOT NULL DEFAULT ''         COMMENT '联系人电话',
+    remark          varchar(100)    NOT NULL DEFAULT ''         COMMENT '增补修订',
+    tg_status       int(11)         NOT NULL DEFAULT 0          COMMENT '团购状态:1在团,2发货,3完成,4取消',
+    PRIMARY KEY (jm_id) USING BTREE,
+    INDEX user_id(user_id) USING BTREE,
+    INDEX uptown_id(uptown_id) USING BTREE
+)
+ENGINE = InnoDB
+DEFAULT CHARSET = utf8
+COMMENT = '家庭求助表'
 ;

+ 3 - 0
whepi-ui/templates/home/frag.head.ftl

@@ -79,6 +79,9 @@
         .qiu_zhu_weui_tab_bd_item_active {
             display: block !important;
         }
+        .tuan_gou_weui_tab_bd_item_active {
+            display: block !important;
+        }
     </style>
 </head>
 <span hidden="hidden" id="id"></span>

+ 10 - 2
whepi-ui/templates/yeweihui/home.ftl

@@ -10,6 +10,9 @@
         </div>
         <div id="tab2" class="weui-tab__bd-item">
             <#include "/yeweihui/qiuzhu.ftl" /></div>
+        <div id="tab3" class="weui-tab__bd-item">
+            <#include "/yeweihui/tuangou.ftl" />
+        </div>
     <#--<div id="tab3" class="weui-tab__bd-item">-->
     <#--<h1>页面三</h1> </div>-->
     <#--<div id="tab4" class="weui-tab__bd-item">-->
@@ -24,6 +27,10 @@
             <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
             <p class="weui-tabbar__label">求助</p>
         </a>
+        <a id="tab2a" href="#tab3" class="weui-tabbar__item">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
+            <p class="weui-tabbar__label">团购</p>
+        </a>
     <#--<a href="#tab3" class="weui-tabbar__item">-->
     <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_article.png" alt=""> </div>-->
     <#--<p class="weui-tabbar__label">发现</p>-->
@@ -41,7 +48,8 @@
 <#include "/home/frag.foot.ftl" />
 <script>
     <#include "/yeweihui/ribao.js" />
-<#include "/yeweihui/qiuzhu.js" />
+    <#include "/yeweihui/qiuzhu.js" />
+    <#include "/yeweihui/tuangou.js" />
 
     var taskList = ${taskList!'[]'};
     var statisticsOrderList =${rbList!'[]'};
@@ -73,7 +81,7 @@
 
         ribao_init();
         qiuzhu_init();
-
+        tuangou_init();
 
         $("#ribaohuiz").calendar({
             dateFormat: 'yyyy-mm-dd',

+ 87 - 0
whepi-ui/templates/yeweihui/tuangou.ftl

@@ -0,0 +1,87 @@
+<div class="page__bd">
+    <header class="demos-header">
+        <h1 class="demos-title">团购</h1>
+    </header>
+    <div class="weui-tab">
+        <div class="weui-navbar">
+            <a class="weui-navbar__item weui-bar__item_on" target="#tg_nav1" module="tuan_gou">
+                组织团购
+            </a>
+            <a class="weui-navbar__item" target="#tg_nav2" module="tuan_gou">
+                我的发布
+            </a>
+        </div>
+        <div class="weui-tab__panel content">
+            <div id="tg_nav1" class="weui-tab__bd-item tuan_gou_weui_tab_bd_item_active">
+
+                <div class="weui-btn-area"  style="display: flex; flex-direction: row; justify-content: space-between;">
+                    <div style="display: flex; flex-direction: row; align-items: center; justify-content: space-between;width: 70vw;">
+                        <input id="tg_searchNum1" class="weui-input" placeholder="请输入团购标题" style="background-color: #d1d1d1; height: 5vh;" />
+                    </div>
+                    <a id="tg_btnQZ1" class="weui-btn_primary" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 10px;" href="javascript:">
+                        <div style="width: 20vw; height: 5vh;line-height:5vh; text-align: center; color: white">查询</div>
+                    </a>
+                </div>
+
+                <div class="weui-panel weui-panel_access">
+                    <div style="display: flex; flex-direction: row; color: grey; font-size: medium;">
+                        <div style="width: 40%; text-align: center;">标题</div>
+                        <div style="width: 15%; text-align: center;">已团</div>
+                        <div style="width: 30%; text-align: center;">截止时间</div>
+                        <div style="width: 15%; text-align: center;">状态</div>
+                    </div>
+                    <div id="tg_list1" class="weui-panel__bd">
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                    </div>
+                    <div class="weui-cell">
+                        <br>
+                    </div>
+                </div>
+            </div>
+            <div id="tg_nav2" class="weui-tab__bd-item">
+
+                <div class="weui-btn-area"  style="display: flex; flex-direction: row; justify-content: space-between;">
+                    <div style="display: flex; flex-direction: row; align-items: center; justify-content: space-between;width: 70vw;">
+                        <input id="tg_searchNum2" class="weui-input" placeholder="请输入团购标题" style="background-color: #d1d1d1; height: 5vh;" />
+                    </div>
+                    <a id="tg_btnQZ2" class="weui-btn_primary" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 10px;" href="javascript:">
+                        <div style="width: 20vw; height: 5vh;line-height:5vh; text-align: center; color: white">查询</div>
+                    </a>
+                </div>
+
+                <div class="weui-panel weui-panel_access">
+                    <div id="tg_list2" class="weui-panel__bd">
+                        <a href="javascript:void(0);">
+                            <div>
+                                第2.1行
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);">
+                            <div>
+                                第2.2行
+                            </div>
+                        </a>
+                    </div>
+                    <div class="weui-cell">
+                        <br>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 3 - 0
whepi-ui/templates/yeweihui/tuangou.js

@@ -0,0 +1,3 @@
+function tuangou_init(tt) {
+
+};