浏览代码

企业服务

海涛 8 年之前
父节点
当前提交
25948f27e8

+ 0 - 25
www/protected/modules/common/views/activity/SinglesDay.php

@@ -73,17 +73,8 @@
           <label class="radio-inline">
             <input type="radio" name="sex" value="女" ng-model="sex">女
           </label>
-          <label class="radio-inline">
-            <input type="radio" name="sex" value="保密" ng-model="sex">保密
-          </label>
         </div>
-
       </div>
-      <!--地址-->
-<!--      <div class="form-group">-->
-<!--        <label>地址:</label>-->
-<!--        <input type="text" name="address" class="form-control" ng-model="address" placeholder="请输入您的详细地址">-->
-<!--      </div>-->
       <!--按钮-->
       <div class="form-group">
         <button
@@ -129,7 +120,6 @@
     </div>
   </div>
 </div>
-
 <!--模态框-->
 <div class="model" style="width: 100%;position: fixed;top: 0;background: rgba(0,0,0,0.4)">
   <!--错误提示容器-->
@@ -142,20 +132,16 @@
   </div>
 </div>
 </body>
-
 </html>
 <script>
   var myapp = angular.module('myapp', []);
   myapp.controller('myctrl', ['$scope', function ($scope) {
-
     $('.model-content').on('click', function () {
       $('.model').css('height', '0');
       $('.model-box').css('display', 'none');
     });
-
     /*表单提交进行判断*/
     $('button').on('click', function () {
-
         /*姓名是否为空*/
         if ($scope.username == undefined) {
           model('请重填', '确认您的姓名');
@@ -171,17 +157,6 @@
           model('请重新选择', '确认');
           return false;
         }
-        /*验证服务范围内*/
-//        if ($scope.Area != 6) {
-//          model('抱歉', '您所在区域不再服务范围之内');
-//          return false;
-//        }
-
-        /*验证地址*/
-//        if ($('input[name="address"]').val().length < 7) {
-//          model('地址错误', '确认您的的地址');
-//          return false;
-//        }
         /*model*/
         function model(title, content) {
           $('.model-box').css('display', 'inline');

+ 79 - 0
www/webapp/o2o/css/homeenterprise.css

@@ -0,0 +1,79 @@
+#homestayScroll .prevent-scroll {
+    width: 100%;
+    position: fixed;
+    bottom: 0;
+    background-color: #2a2400;
+}
+#homestayScroll .prevent-scroll .width-percent-33 .title-container-square {
+    padding: 20%;
+    position: relative;
+    text-align: center;
+}
+#homestayScroll .prevent-scroll .width-percent-33 .title-container-square a {
+    position: absolute;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+}
+#homestayScroll .prevent-scroll .width-percent-33 .title-container-square a .logo {
+    background-size: 65% 65%;
+    background-position: center center;
+    padding: 10%;
+    margin-top: 5px;
+    display: inline-block;
+    border-radius: 50%;
+}
+#homestayScroll .prevent-scroll .width-percent-33 .title-container-square a .name {
+    display: block;
+    margin-top: -5px;
+    font-size: 12px;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(1) a:active .logo {
+    border-radius: inherit;
+    background: url("http://odulvej8l.bkt.clouddn.com/tab_home.png") no-repeat;
+    background-size: 100%;
+    background-position: center center;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(1) a:active .name {
+    color: #fff;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(1) a .logo {
+    border-radius: inherit;
+    background: url("http://odulvej8l.bkt.clouddn.com/tab_home_pre.png") no-repeat;
+    background-size: 90%;
+    background-position: center center;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(1) a .name {
+    color: #b89400;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(2) a .logo {
+    border-radius: 50%;
+    display: inline-block;
+    padding: 25%;
+    background-size: 100%;
+    margin-top: -15px;
+    background: url("http://odulvej8l.bkt.clouddn.com/tab_butler.png") 0 0 no-repeat #2a2400;
+    background-size: 65% 65%;
+    background-position: center;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(3) a .logo {
+    border-radius: inherit;
+    background: url("http://odulvej8l.bkt.clouddn.com/tab_me_pre.png");
+    background-repeat: no-repeat;
+    background-size: 90%;
+    background-position: center center;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(3) a .name {
+    color: #b89400;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(3) a:active .logo {
+    border-radius: inherit;
+    background: url("http://odulvej8l.bkt.clouddn.com/tab_me.png");
+    background-repeat: no-repeat;
+    background-size: 100%;
+    background-position: center center;
+}
+#homestayScroll .prevent-scroll .width-percent-33:nth-child(3) a:active .name {
+    color: #fff;
+}

文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/css/main.css


文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/js/build/template.js


文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/js/build/template/template.js


文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/js/main.js


文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/js/page/home.js


+ 1 - 1
www/webapp/o2o/dist/js/page/homeenterprise.js

@@ -1 +1 @@
-;
+define(["$","template","IScroll","user","product","native","config","address"],function(e,t,n,r,i,s,o,u){function a(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"",pushData:{dontNeedReload:!0}})}return{title:"企业服务",body:"",init:function(t,n){var i=this,s=e(document);i.on("swipeRight",function(e){a.call(this,e)}),e.newTouch(".back-button",function(e){a.call(this,e)},i),i.on("tapBackButton",function(e){a.call(this,e)}),e.newTouch(".o2o-btn-homestay",function(e){e.preventDefault(),window.location.href="/index.php?r=common/activity/ScanCoupon"},i),e.newTouch(".btn-action-my-order",function(){event.preventDefault(),s.trigger("spa:navigate",{hash:"",pushData:{needReset:!0}})},i),e.newTouch(".btn-action-coupon",function(e){e.preventDefault(),r.checkLogin(function(){s.trigger("spa:navigate",{hash:"mine",pushData:{needReset:!0}})})},i),n.resolve()},beforeopen:function(e,t){t.resolve()},afteropen:function(r,i){var s=this,u=e(document);if(r.pushData&&r.pushData.needReset){var a=t("homeenterprise/index",{showNavBar:!o.isWX});e(".spa-page-body",s).html(a),setTimeout(function(){r.scroll=new n("#homeenterpriseScroll")},500)}i.resolve()},beforeclose:function(e,t){t.resolve()}}});

文件差异内容过多而无法显示
+ 0 - 1
www/webapp/o2o/js/build/template.js


文件差异内容过多而无法显示
+ 0 - 380
www/webapp/o2o/js/build/template/template.js


+ 10 - 0
www/webapp/o2o/js/page/home.js

@@ -153,6 +153,16 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config', 'addr
 					}
 				});
 			}, $view);
+			// 企业服务
+			$.newTouch('.btn-homeenterprise', function (event) {
+				event.preventDefault();
+				$doc.trigger('spa:navigate', {
+					hash: 'homeenterprise',
+					pushData: {
+						needReset: true
+					}
+				});
+			}, $view);
 
 			// 个人中心
 			$.newTouch('.btn-action-coupon', function (event) {

+ 99 - 3
www/webapp/o2o/js/page/homeenterprise.js

@@ -1,3 +1,99 @@
-/**
- * Created by Jinguo on 2016/11/8.
- */
+define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'address'], function ($, template, IScroll, user, product, native, config, address) {
+
+    function back(event) {
+        event.preventDefault();
+        $(document).trigger('spa:navigate', {
+            hash: '',
+            pushData: {
+                dontNeedReload: true
+            }
+        });
+    }
+
+    /*
+     * 模块结构:5部分。
+     * title:题目。
+     * content:不知道是什么,似乎从没用过。
+     * 以下可以当作生命周期回调,虽然并不清楚是什么时候回调的……
+     * init:根据上一个页面传来的pageData初始化本页数据,生成页面,绑定事件。
+     * beforeopen:接收上一个页面传来的数据、有需要的话重置数据
+     * afteropen:做一些网络请求。
+     * beforeclose:
+     */
+    return {
+        title: '企业服务',
+        body: '',
+        init: function (pageData, dtd) {
+            /* this是什么? */
+            var $view = this;
+            var $doc = $(document);
+
+            /* 定义按钮事件。
+             * 为什么不是$(selector).onclick(function)呢?
+             */
+
+            // 返回
+            $view.on('swipeRight', function (event) {
+                back.call(this, event);
+            });
+
+            $.newTouch('.back-button', function (event) {
+                back.call(this, event);
+            }, $view);
+
+            $view.on('tapBackButton', function (event) {
+                back.call(this, event);
+            });
+            $.newTouch('.o2o-btn-homestay',function (event) {
+                event.preventDefault();
+                window.location.href='/index.php?r=common/activity/ScanCoupon';
+                // console.log('测试')
+            },$view);
+            /*首页*/
+            $.newTouch('.btn-action-my-order', function () {
+                event.preventDefault();
+                $doc.trigger('spa:navigate', {
+                    hash: '',
+                    pushData: {
+                        needReset: true
+                    }
+                });
+            },$view);
+            /*个人中心*/
+            $.newTouch('.btn-action-coupon', function (event) {
+                event.preventDefault();
+                user.checkLogin(function () {
+                    $doc.trigger('spa:navigate', {
+                        hash: 'mine',
+                        pushData: {
+                            needReset: true
+                        }
+                    });
+                });
+            }, $view);
+            /* 不知道什么意思。*/
+            dtd.resolve();
+        },
+        beforeopen: function (pageData, dtd) {
+            dtd.resolve();
+        },
+        afteropen: function (pageData, dtd) {
+            var $view = this;
+            var $doc = $(document);
+
+            if (pageData.pushData && pageData.pushData.needReset) {
+                var tpl = template('homeenterprise/index', {showNavBar: !config.isWX});
+                $('.spa-page-body', $view).html(tpl);
+                setTimeout(function () {
+                    pageData.scroll = new IScroll('#homeenterpriseScroll');
+                }, 500);
+            }
+
+            /* 又是这个。不知道什么玩意…… */
+            dtd.resolve();
+        },
+        beforeclose: function (pageData, dtd) {
+            dtd.resolve();
+        }
+    }
+})

+ 1 - 1
www/webapp/o2o/tpl/home/index.html

@@ -45,7 +45,7 @@
 								<img class="btn-homestay" src="http://odulvej8l.bkt.clouddn.com/4-3-01.png" alt="">
 							</div>
 							<div class="width-percent-50 box-align-center">
-								<img src="http://odulvej8l.bkt.clouddn.com/4-4-01.png" alt="">
+								<img class="btn-homeenterprise" src="http://odulvej8l.bkt.clouddn.com/4-4-01.png" alt="">
 							</div>
 						</div>
 

文件差异内容过多而无法显示
+ 1 - 3
www/webapp/o2o/tpl/homeEnterprise/index.html


部分文件因为文件数量过多而无法显示