month.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!DOCTYPE html>
  2. <!--HTML5 doctype-->
  3. <html ng-app="myapp">
  4. <head>
  5. <title>壹管家</title>
  6. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  7. <meta name="viewport"
  8. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
  11. <meta http-equiv="Pragma" content="no-cache">
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  13. <!--css-->
  14. <style>
  15. .gradient {
  16. color: #ffffff;
  17. font-size: 2rem;
  18. width: 100%;
  19. line-height: 40px;
  20. background: -webkit-linear-gradient(#4e1a42, #4e1a42, #4e1a42, #4e1a42); /* Safari 5.1 - 6.0 */
  21. background: -o-linear-gradient(#4e1a42, #4e1a42, #4e1a42, #4e1a42); /* Opera 11.1 - 12.0 */
  22. background: -moz-linear-gradient(#4e1a42, #4e1a42, #4e1a42, #4e1a42); /* Firefox 3.6 - 15 */
  23. background: linear-gradient(#4e1a42, #4e1a42, #4e1a42, #4e1a42); /* 标准的语法 */
  24. }
  25. </style>
  26. <!--引入css文件-->
  27. <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/webapp/common/css/common.css">
  28. <link rel="stylesheet" href=" <?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap-3.3.7.min.css">
  29. <link rel="stylesheet" href=" <?php echo Yii::app()->request->baseUrl; ?>/css/common_o2o/LCalendar.css">
  30. <!--引入js文件-->
  31. <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-3.1.1.min.js"></script>
  32. <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/AngularJS v1.4.3.min.js"></script>
  33. <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap-3.3.7.min.js"></script>
  34. <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/o2o/LCalendar.js"></script>
  35. <!--修改title-->
  36. <script>
  37. $(function () {
  38. document.title = "壹管家";
  39. })
  40. </script>
  41. </head>
  42. <body ng-controller="myctrl">
  43. <div class="gradient" style="font-size: 12px;padding-left: 10px;">返回</div>
  44. <h1 style="text-align: center">咨询</h1>
  45. <div class="">
  46. <form action="" method='post'
  47. class="container form-horizontal ng-valid ng-dirty ng-valid-parse" id='singlesDay'
  48. style="margin-bottom: 15%; ">
  49. <div class="container">
  50. <!--姓名-->
  51. <div class="form-group">
  52. <label>姓名:</label>
  53. <input type="text" name='user_name' class="form-control username" placeholder="请输入您的姓名" ng-model="username">
  54. </div>
  55. <!--手机号码-->
  56. <div class="form-group">
  57. <label>手机号码:</label>
  58. <input type="text" name="mobile" class="form-control"
  59. placeholder="请输入您的手机号码" ng-model="phone"/>
  60. </div>
  61. <!--房型-->
  62. <div class="form-group">
  63. <label>咨询套餐:</label>
  64. <select name="homeType" onchange="theforever(this.value)" class="form-control" ng-model="Type"
  65. ng-init="Type=TypeList[0].id"
  66. ng-options="type.name as type.name for type in TypeList" id="">
  67. <option value="">--请选择--</option>
  68. </select>
  69. </div>
  70. <!--数据-->
  71. <input type="text" name="area" value="享月会" style="position: absolute;top:1000px;">
  72. <!--预产期-->
  73. <div class="form-group">
  74. <input name="num" class="form-control" style="background-color: #fff;" id="demo1" type="text" readonly=""
  75. placeholder="请选择日期"/>
  76. </div>
  77. <!--按钮-->
  78. <div class="form-group">
  79. <a id="SinglesDayBtn"
  80. style="background: #2f004e;color:rgb(255,255,255);border: 0"
  81. class="btn btn-success col-xs-12"
  82. data-container="body"
  83. data-toggle="popover"
  84. data-placement="top"
  85. data-content="{{btnContent}}">
  86. 提交
  87. </a>
  88. </div>
  89. </div>
  90. </form>
  91. </div>
  92. <!--模态框-->
  93. <div class="model" style="width: 100%;position: fixed;top: 0;background: rgba(0,0,0,0.4)">
  94. <!--错误提示容器-->
  95. <div class="model-box"
  96. style="border-radius: 10px;height:130px;display:none;width: 70%;background: #fff;margin: 0 auto;top:25%;left:15%;position: fixed;">
  97. <div class="model-title"
  98. style="font-family: '微软雅黑', 'Microsoft YaHei', 'STHeiti Light';width: 100%;text-align: center;font-size: 1.1rem;margin-top: 5%;"></div>
  99. <div class="model-content"
  100. style="font-family: '微软雅黑', 'Microsoft YaHei', 'STHeiti Light';margin: 0 auto;width: 80%;background: #2f004e;color:rgb(255, 255, 255);font-size: 1.3rem;margin-top: 30px;text-align: center;padding: 5px 0 5px 0"></div>
  101. </div>
  102. </div>
  103. </body>
  104. </html>
  105. <script>
  106. var myapp = angular.module('myapp', []);
  107. myapp.controller('myctrl', ['$scope', function ($scope) {
  108. $('.model-content').on('click', function () {
  109. if ($('.model-content').html() == '返回首页') {
  110. window.location.href = '/index.php?r=o2o/web/index';
  111. } else {
  112. $('.model').css('height', '0');
  113. $('.model-box').css('display', 'none');
  114. }
  115. });
  116. $('.gradient').on('click',function () {
  117. window.location.href = '/index.php?r=o2o/web/index';
  118. })
  119. /*表单提交进行判断*/
  120. $('#SinglesDayBtn').on('click', function () {
  121. /*姓名是否为空*/
  122. if ($scope.username == undefined) {
  123. model('请重填', '确认您的姓名');
  124. return false;
  125. }
  126. /*验证手机号码*/
  127. if (!(/^1[34578]\d{9}$/.test($scope.phone)) || $scope.phone == 0) {
  128. model('请重填', '手机号码有误');
  129. return false;
  130. }
  131. /*model*/
  132. $.ajax({
  133. url: 'index.php?r=o2o/Advisory/SinglesDay',
  134. type: 'POST',
  135. dataType: 'html',
  136. data: $('#singlesDay').serialize(),
  137. success: function (message) {
  138. model(message, '返回首页');
  139. },
  140. error: function (message) {
  141. model('标题', '咨询失败');
  142. }
  143. });
  144. function model(title, content) {
  145. $('.model-box').css('display', 'inline');
  146. $('.model').height(window.screen.height);
  147. $('.model-title').html(title);
  148. $('.model-content').html(content);
  149. }
  150. }
  151. );
  152. $scope.TypeList = [
  153. {'id': 1, 'name': '至惠套餐', 'parent': 1, type: '3'},
  154. {'id': 2, 'name': '至悦套餐', 'parent': 1, type: '3'},
  155. {'id': 3, 'name': '至享套餐', 'parent': 1, type: '3'},
  156. {'id': 4, 'name': '至尊套餐', 'parent': 1, type: '3'}
  157. ];
  158. }])
  159. </script>
  160. <script>
  161. var calendar = new LCalendar();
  162. calendar.init({
  163. 'trigger': '#demo1', //标签id
  164. 'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
  165. 'minDate': '1900-1-1', //最小日期
  166. 'maxDate': (new Date().getFullYear() + 10) + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate() //最大日期
  167. });
  168. </script>