register-vip.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>注册会员</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
  10. <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
  11. <link rel="stylesheet" type="text/css" href="css/main.css" />
  12. <link rel="stylesheet" type="text/css" href="css/mui.picker.min.css" />
  13. <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
  14. <script>
  15. //屏蔽分享
  16. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  17. WeixinJSBridge.call('hideOptionMenu');
  18. });
  19. </script>
  20. </head>
  21. <body>
  22. <div class="mui-content">
  23. <h6 style="text-align: center;margin-top: 10px;display: none;" id="addOneTooth">尊敬的会员,您已经添加过 <em class="cl-red">1</em> 支牙刷了,添加后无法撤销。</h6>
  24. <div style="margin: 20px 0;text-align: center;">
  25. <div style="padding: 10px 0;">
  26. <span class="iconfont icon-chenggong" style="color: #3bbf64;font-size: 40px;"></span>
  27. </div>
  28. <h4> 已成功扫描唯一码 </h4>
  29. <p id="barCodeId"></p>
  30. <p>别忘了完善下方的会员信息</p>
  31. <p style="width: 60%;margin-left: 20%;">成功注册会员,您将获得延保服务,以及免费积分和刷头福利</p>
  32. <p style="width: 60%;margin-left: 20%;">“刷头兑换券”请移至上朵公众号【朵粉特供】→【福利社】领取</p>
  33. </div>
  34. <img width="100%" src="images/youhuiquan.jpg" />
  35. <div style="padding: 15px 10px;font-weight: bold;font-size: 15px;">
  36. 完善信息
  37. </div>
  38. <form class="mui-input-group">
  39. <div class="mui-input-row line-bottom">
  40. <label>您的姓名</label>
  41. <input type="text" maxlength="10" id="ipt-name" placeholder="填写您的姓名">
  42. </div>
  43. <div class="mui-input-row line-bottom" id="js-userBirthDate">
  44. <label>出生日期</label>
  45. <input type="text" id="newDate" readonly="readonly" placeholder="选择您的出生日期">
  46. </div>
  47. <div class="mui-input-row line-bottom">
  48. <label>手机号码</label>
  49. <input type="tel" id="ipt-phone" maxlength="11" placeholder="填写您的手机号码">
  50. </div>
  51. <div class="mui-input-row line-bottom" id="js-phone" style="display:none;">
  52. <label>验&nbsp;&nbsp;证&nbsp;&nbsp;码</label>
  53. <input style="width: 50% !important;float: left;" type="tel" placeholder="请输入验证码" maxlength="4" id="code"><button type="button" class="pull-code" disabled="disabled">获取验证码</button>
  54. </div>
  55. <div class="mui-table my-table" style="padding:15px 10px 0px 10px;">
  56. <div class="mui-table-cell mui-col-xs-2">
  57. <label>您的性别</label>
  58. </div>
  59. <div class="mui-table-cell mui-col-xs-3">
  60. <div class="mui-input-row mui-radio mui-left">
  61. <label>男</label>
  62. <input id="maleId" class="iconfont icon-boy" name="radio0" type="radio" checked="" value="1">
  63. </div>
  64. </div>
  65. <div class="mui-table-cell mui-col-xs-5">
  66. <div class="mui-input-row mui-radio mui-left">
  67. <label>女</label>
  68. <input id="femaleId" class="iconfont icon-girl" name="radio0" type="radio" value="2">
  69. </div>
  70. </div>
  71. </div>
  72. <!--<div class="mui-table my-table">
  73. <div class="mui-table-cell mui-col-xs-2">
  74. <label style="display: block;width: 60px;">您的年龄</label>
  75. </div>
  76. <div class="mui-table-cell mui-col-xs-3">
  77. <div class="mui-input-row mui-radio mui-left">
  78. <label class="my-label">80后</label>
  79. <input name="radio1" class="radio1" type="radio" checked="" value="1">
  80. </div>
  81. </div>
  82. <div class="mui-table-cell mui-col-xs-3">
  83. <div class="mui-input-row mui-radio mui-left">
  84. <label class="my-label">85后</label>
  85. <input name="radio1" class="radio1" type="radio" value="2">
  86. </div>
  87. </div>
  88. <div class="mui-table-cell mui-col-xs-3">
  89. <div class="mui-input-row mui-radio mui-left">
  90. <label class="my-label">90后</label>
  91. <input name="radio1" class="radio1" type="radio" value="3">
  92. </div>
  93. </div>
  94. </div>
  95. <div class="mui-table my-table" style="padding-bottom: 12px;">
  96. <div class="mui-table-cell mui-col-xs-2">
  97. <label></label>
  98. </div>
  99. <div class="mui-table-cell mui-col-xs-3">
  100. <div class="mui-input-row mui-radio mui-left">
  101. <label class="my-label">95后</label>
  102. <input name="radio1" class="radio1" type="radio" value="4">
  103. </div>
  104. </div>
  105. <div class="mui-table-cell mui-col-xs-3">
  106. <div class="mui-input-row mui-radio mui-left">
  107. <label class="my-label">00后</label>
  108. <input name="radio1" class="radio1" type="radio" value="5">
  109. </div>
  110. </div>
  111. <div class="mui-table-cell mui-col-xs-3">
  112. <div class="mui-input-row mui-radio mui-left">
  113. <label class="my-label">其他</label>
  114. <input name="radio1" class="radio1" type="radio" value="6">
  115. </div>
  116. </div>
  117. </div>-->
  118. <div class="mui-table my-table">
  119. <div class="mui-table-cell mui-col-xs-2">
  120. <label style="display: block;width: 60px;">购买渠道</label>
  121. </div>
  122. <div class="mui-table-cell mui-col-xs-3">
  123. <div class="mui-input-row mui-radio mui-left">
  124. <label class="my-label">天猫</label>
  125. <input name="radio2" class="radio2" type="radio" checked="" value="1">
  126. </div>
  127. </div>
  128. <div class="mui-table-cell mui-col-xs-3">
  129. <div class="mui-input-row mui-radio mui-left">
  130. <label class="my-label">微信</label>
  131. <input name="radio2" class="radio2" type="radio" value="4">
  132. </div>
  133. </div>
  134. <div class="mui-table-cell mui-col-xs-3">
  135. <div class="mui-input-row mui-radio mui-left">
  136. <label class="my-label">京东</label>
  137. <input name="radio2" class="radio2" type="radio" value="3">
  138. </div>
  139. </div>
  140. </div>
  141. <div class="mui-table my-table">
  142. <div class="mui-table-cell mui-col-xs-2">
  143. <label style="display: block;width: 60px;">&nbsp;</label>
  144. </div>
  145. <div class="mui-table-cell mui-col-xs-3">
  146. <div class="mui-input-row mui-radio mui-left">
  147. <label class="my-label">一条</label>
  148. <input name="radio2" class="radio2" type="radio" value="6">
  149. </div>
  150. </div>
  151. <div class="mui-table-cell mui-col-xs-3">
  152. <div class="mui-input-row mui-radio mui-left">
  153. <label class="my-label">小红书</label>
  154. <input name="radio2" class="radio2" type="radio" value="7">
  155. </div>
  156. </div>
  157. <div class="mui-table-cell mui-col-xs-3">
  158. <div class="mui-input-row mui-radio mui-left">
  159. <label class="my-label">其他</label>
  160. <input name="radio2" class="radio2" type="radio" value="5">
  161. </div>
  162. </div>
  163. </div>
  164. <div class="mui-input-row line-top">
  165. <label>购买日期</label>
  166. <input type="text" id="buyDate" readonly="readonly" placeholder="选择您的购买日期">
  167. </div>
  168. </form>
  169. <br />
  170. <div class="mui-content-padded mui-text-center">
  171. <button type="button" class="my-btn-black" id="my-btn-submit" style="width: 50%;">提交注册</button>
  172. </div>
  173. </div>
  174. <!-- 加载ing begin-->
  175. <div class="loading covers">
  176. <div class="loading-bj"></div>
  177. <p>正在加载...</p>
  178. </div>
  179. <!-- 加载ing end -->
  180. <script type="text/javascript" src="js/mui.min.js"></script>
  181. <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
  182. <script type="text/javascript" src="js/main.js"></script>
  183. <script src="js/mui.picker.min.js"></script>
  184. <script type="text/javascript">
  185. /*以前的电话号码*/
  186. var oldPhone;
  187. /*是否需要填写验证码 1:需要 2:不需要*/
  188. var isNeedPhone = 1;
  189. /*1需要填写,2不需要*/
  190. var isNeedBirthday = 1;
  191. window.addEventListener('pageshow', function(e) {
  192. // 通过persisted属性判断是否存在 BF Cache
  193. if(e.persisted) {
  194. location.reload();
  195. }
  196. });
  197. //实时监听文本框字数
  198. document.getElementById("ipt-phone").addEventListener("input", function() {
  199. var phone = this.value;
  200. if(phone == oldPhone){
  201. $("#js-phone").hide();
  202. isNeedPhone = 2;
  203. return false;
  204. }else{
  205. isNeedPhone = 1;
  206. $("#js-phone").show();
  207. }
  208. var mobile = /^(13|14|15|17|18)[0-9]{9}$/; //手机号码
  209. if(phone.length == 11) {
  210. if(mobile.test(phone) && countdown == 60) {
  211. $(".pull-code").removeAttr("disabled").addClass("active");
  212. } else {
  213. $(".pull-code").attr("disabled", "disabled").removeClass("active");
  214. }
  215. } else {
  216. $(".pull-code").attr("disabled", "disabled").removeClass("active");
  217. }
  218. });
  219. //发送验证码
  220. var validate_flag = false,
  221. show_msg = '';
  222. $(document).on('tap', '.pull-code', function() {
  223. var th = $(this);
  224. var mobile = /^(13|14|15|17|18)[0-9]{9}$/; //手机号码
  225. var phone = $("#ipt-phone").val();
  226. if(mobile.test(phone)) {
  227. settime(th);
  228. if(!window.sessionStorage) {
  229. mui.alert("您的浏览器不支持sessionStorage");
  230. } else {
  231. //自定义json数据
  232. var obj = {};
  233. obj["phone"] = phone;
  234. obj["codetime"] = new Date().getTime();
  235. //json格式化插入
  236. sessionStorage.setItem('code_data', JSON.stringify(obj));
  237. }
  238. //ajax
  239. $.ajax(base_path + '/wechat/apparatus/send_phone?dates=' + new Date().getTime(), {
  240. data: {
  241. "phone": phone
  242. },
  243. dataType: 'json',
  244. xhrFields: {
  245. withCredentials: true
  246. },
  247. crossDomain: true,
  248. type: 'get',
  249. timeout: 15000,
  250. success: function(dt) {
  251. //console.log(dt);
  252. if(dt.isRedirect) {
  253. location.href = dt.redirectURL;
  254. } else {
  255. if(dt.status) {
  256. console.log("获取短信成功!");
  257. } else {
  258. mui.alert("获取短信失败!请稍后重试");
  259. }
  260. }
  261. },
  262. error: function(xhr, type, errorThrown) {
  263. console.log(xhr);
  264. mui.alert("获取短信失败!网络错误");
  265. }
  266. });
  267. } else {
  268. if(phone != '') {
  269. show_msg = '手机号码格式不正确';
  270. } else {
  271. show_msg = '请填写手机号码';
  272. }
  273. mui.alert(show_msg);
  274. }
  275. });
  276. var countdown = 60;
  277. function settime(obj) {
  278. if(countdown <= 0) {
  279. obj.addClass("active").removeAttr("disabled");
  280. obj.text("获取验证码");
  281. countdown = 60;
  282. return;
  283. } else {
  284. obj.attr("disabled", true).removeClass("active");
  285. obj.text("重新发送" + countdown + "");
  286. countdown--;
  287. }
  288. setTimeout(function() {
  289. settime(obj)
  290. }, 1000)
  291. }
  292. //选择购买日期
  293. mui('body').on('tap', '#buyDate', function(event) {
  294. var date = new Date();
  295. var y = date.getFullYear();
  296. var m = date.getMonth(); //获取当前月份的日期
  297. var d = date.getDate();
  298. var picker = new mui.DtPicker({
  299. type: "date", //设置日历初始视图模式
  300. beginDate: new Date(2018, 00, 08), //设置开始日期
  301. endDate: new Date(y, m, d) //设置结束日期
  302. });
  303. picker.show(function(rs) {
  304. $("#buyDate").val(rs.text);
  305. picker.dispose();
  306. picker = null;
  307. });
  308. });
  309. //选择出生日期
  310. mui('body').on('tap', '#newDate', function(event) {
  311. var date = new Date();
  312. var y = date.getFullYear();
  313. var m = date.getMonth(); //获取当前月份的日期
  314. var d = date.getDate();
  315. var picker = new mui.DtPicker({
  316. type: "date", //设置日历初始视图模式
  317. beginDate: new Date(1949, 9, 01), //设置开始日期
  318. endDate: new Date((y - 8), 00, 01) //设置结束日期
  319. });
  320. picker.show(function(rs) {
  321. $("#newDate").val(rs.text);
  322. picker.dispose();
  323. picker = null;
  324. });
  325. });
  326. var qrCode = null;
  327. var isFocusOn = null;
  328. var userIdentity = null;
  329. mui.ready(function() {
  330. console.log("页面加载完毕");
  331. $(".loading").hide().css("opacity", "0"); //隐藏(正在加载...)
  332. //获取机器条码 barcode
  333. qrCode = getParam("qrCode");
  334. var code_data = JSON.parse(sessionStorage.getItem('code_data'));
  335. if(code_data != null) {
  336. $("#ipt-phone").val(code_data.phone);
  337. if((new Date().getTime() - code_data.codetime) > 59000) {
  338. $(".pull-code").addClass("active").removeAttr("disabled");
  339. } else {
  340. countdown = parseInt(60 - ((new Date().getTime() - code_data.codetime) / 1000));
  341. console.log(countdown)
  342. settime($(".pull-code"));
  343. }
  344. }
  345. if(qrCode != null) {
  346. $("#barCodeId").html("(" + qrCode + ")");
  347. $.ajax(base_path + '/wechat/getActivationAndMember?dates=' + new Date().getTime(), {
  348. data: {
  349. "qrCode": qrCode //产品类型id
  350. },
  351. dataType: 'json',
  352. xhrFields: {
  353. withCredentials: true
  354. },
  355. crossDomain: true,
  356. type: 'get',
  357. timeout: 15000,
  358. success: function(dt) {
  359. if(dt.isRedirect) {
  360. location.href = dt.redirectURL;
  361. } else {
  362. if(dt.status) { //判断接口返回状态status
  363. if(dt.data.isActivation) {
  364. //已激活
  365. mui.alert('该产品已被激活!', '提醒', function() {
  366. location.href = "my-center.html";
  367. });
  368. }
  369. if(dt.data.memberInfo.userStatus != 2) {
  370. //未关注
  371. mui.alert('请先关注公众号再激活!', '提醒', function() {
  372. location.href = "follow-me-tooth.html";
  373. });
  374. }
  375. //填充用户数据
  376. $("#ipt-name").val(dt.data.memberInfo.userName);
  377. if(dt.data.memberInfo.userSex != null) {
  378. if(dt.data.memberInfo.userSex == 1) {
  379. $("#maleId").attr("checked", true);
  380. }
  381. if(dt.data.memberInfo.userSex == 2) {
  382. $("#femaleId").attr("checked", true);
  383. }
  384. }
  385. if(dt.data.memberInfo.userIdentity == 1){
  386. if(dt.data.memberInfo.userBirthDate != null && typeof(dt.data.memberInfo.userBirthDate) != "undefined"){
  387. $("#js-userBirthDate").hide();
  388. isNeedBirthday = 2;
  389. }else{
  390. isNeedBirthday = 1;
  391. }
  392. }else{
  393. isNeedBirthday = 1;
  394. }
  395. if(dt.data.memberToothNumber > 0){
  396. $("#addOneTooth em").html(dt.data.memberToothNumber)
  397. $("#addOneTooth").show();
  398. }
  399. oldPhone = dt.data.memberInfo.userTel;
  400. if(oldPhone != null && oldPhone != "" && typeof(oldPhone) != "undefined"){
  401. $("#ipt-phone").val(oldPhone);
  402. isNeedPhone = 2;
  403. }else{
  404. $("#js-phone").show();
  405. isNeedPhone = 1;
  406. }
  407. var radios = $(".radio1");
  408. switch(dt.data.memberInfo.userAgeStage) {
  409. case(1):
  410. radios.eq(0).attr("checked", true);
  411. break;
  412. case(2):
  413. radios.eq(1).attr("checked", true);
  414. break;
  415. case(3):
  416. radios.eq(2).attr("checked", true);
  417. break;
  418. case(4):
  419. radios.eq(3).attr("checked", true);
  420. break;
  421. case(5):
  422. radios.eq(4).attr("checked", true);
  423. break;
  424. case(6):
  425. radios.eq(5).attr("checked", true);
  426. }
  427. isFocusOn = dt.data.memberInfo.userStatus;
  428. userIdentity = dt.data.memberInfo.userIdentity;
  429. } else {
  430. mui.alert("查询失败!");
  431. } }
  432. },
  433. error: function(xhr, type, errorThrown) {
  434. console.log(xhr);
  435. mui.alert("网络错误!");
  436. }
  437. });
  438. }
  439. });
  440. $(document).on('tap', '#my-btn-submit', function() {
  441. validate(); //验证文本框
  442. var userName = $("#ipt-name").val();
  443. var userSex = $('input[name="radio0"]:checked ').val();
  444. var userBirthDate = $('#newDate').val();
  445. var apparatusStore = $('input[name="radio2"]:checked').val();
  446. var buyDate = $("#buyDate").val();
  447. var tel = $("#ipt-phone").val();
  448. var code = $("#code").val();
  449. var  selectDate =  new  Date(Date.parse(buyDate));
  450. var  nowDate =  new  Date(Date.parse(new Date().toLocaleDateString()));
  451. //if(selectDate>nowDate){
  452. //mui.alert("购买日期不能大于当前日期");
  453. //return false;
  454. //}
  455. if(validate_flag) {
  456. //验证通过
  457. $.ajax(base_path + '/wechat/apparatus/add_apparatus?dates=' + new Date().getTime(), {
  458. data: {
  459. "barCode": qrCode, //条码
  460. "userName": userName, //用户姓名
  461. "userSex": userSex, //用户姓名
  462. "userTel": tel, //手机
  463. "code": code, //验证码
  464. "userBirthDateString": userBirthDate, //出生日期
  465. "apparatusStore": apparatusStore, //渠道id 1:天猫 2:淘宝 3:京东 4:微信 5:其他 6:一条 7:小红书
  466. "buyDate": buyDate //购买日期
  467. },
  468. dataType: 'json',
  469. xhrFields: {
  470. withCredentials: true
  471. },
  472. crossDomain: true,
  473. type: 'get',
  474. timeout: 15000,
  475. success: function(dt) {
  476. if(dt.isRedirect) {
  477. location.href = dt.redirectURL;
  478. } else {
  479. if(dt.status) { //判断接口返回状态status
  480. mui.alert('注册成功!', '温馨提示', function() {
  481. if(userIdentity == 1) { //会员
  482. if(isFocusOn == 1 || isFocusOn == 0) { //未关注
  483. location.href = "member-follow-me.html";
  484. } else { //已关注
  485. $.ajax(base_path + '/wechat/coupon/getIsReceive?dates=' + new Date().getTime(), {
  486. data: {},
  487. dataType: 'json',
  488. xhrFields: {
  489. withCredentials: true
  490. },
  491. crossDomain: true,
  492. type: 'get',
  493. timeout: 15000,
  494. success: function(dt) {
  495. //console.log(dt);
  496. if(dt.isRedirect) {
  497. location.href = dt.redirectURL;
  498. } else {
  499. if(dt.status) {
  500. console.log("未领取!");
  501. location.href = "welfare-service.html";
  502. } else {
  503. console.log("已领取!");
  504. location.href = "my-center.html";
  505. }
  506. }
  507. },
  508. error: function(xhr, type, errorThrown) {
  509. console.log(xhr);
  510. }
  511. });
  512. }
  513. } else { //非会员
  514. if(isFocusOn == 1 || isFocusOn == 0) { //未关注
  515. location.href = "follow-me.html";
  516. } else { //已关注
  517. location.href = "welfare-service.html";
  518. }
  519. }
  520. });
  521. } else {
  522. mui.alert(dt.message, '温馨提示', function() {
  523. location.href = "my-center.html";
  524. });
  525. }
  526. }
  527. },
  528. error: function(xhr, type, errorThrown) {
  529. console.log(xhr);
  530. mui.alert("网络错误");
  531. }
  532. });
  533. } else {
  534. mui.alert(dalog_msg); //弹窗提示
  535. }
  536. });
  537. //正则表达式示例
  538. var dalog_msg = '',
  539. validate_flag = false;
  540. function validate() {
  541. var ch_en_num = /^[A-Za-z_\-\u4e00-\u9fa5]{2,10}$/; //简体中文英文(2-10位)
  542. var positive_int = /^[0-9]\d*$/; //正整数0-9
  543. var code_int = /^[0-9]{4}$/; //正整数0-9,4位数字
  544. var mobile = /^(13|14|15|17|18)[0-9]{9}$/; //手机号码
  545. var full_date = /^\d{4}(\-|\/|.)\d{1,2}\1\d{1,2}$/; //日期格式 (2016\12\12,2016-12-12,2016.12.12)
  546. var name = $("#ipt-name").val().trim(),
  547. tel = $("#ipt-phone").val(),
  548. code = $("#code").val();
  549. validate_flag = false;
  550. if(!ch_en_num.test(name)) {
  551. //未通过验证
  552. if(name != '') {
  553. dalog_msg = '名字格式不正确';
  554. } else {
  555. dalog_msg = '请填写名字';
  556. }
  557. return dalog_msg;
  558. }
  559. //验证通过
  560. if($("#newDate").val() == null || $("#newDate").val() == "" ) {
  561. if(isNeedBirthday == 1){
  562. dalog_msg = '请选择出生日期';
  563. return dalog_msg;
  564. }
  565. }
  566. if(!mobile.test(tel)) {
  567. if(tel != '') {
  568. dalog_msg = '手机格式不正确';
  569. } else {
  570. dalog_msg = '请填写手机号码';
  571. }
  572. return dalog_msg;
  573. }
  574. if(isNeedPhone == 1){ //需要验证手机号码
  575. if(!code_int.test(code)) {
  576. if(code != '') {
  577. dalog_msg = '验证码格式不正确';
  578. } else {
  579. dalog_msg = '请填写验证码';
  580. }
  581. return dalog_msg;
  582. }
  583. }
  584. if($("#buyDate").val() == null || $("#buyDate").val() == "") {
  585. dalog_msg = '请选择购买日期';
  586. return dalog_msg;
  587. }
  588. validate_flag = true;
  589. return dalog_msg; //返回提示信息
  590. }
  591. </script>
  592. </body>
  593. </html>