123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta content="black" name="apple-mobile-web-app-status-bar-style">
- <meta content="telephone=no" name="format-detection">
- <title>注册</title>
- <link rel="stylesheet" type="text/css" href="images/style.css"/>
- <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
- <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
- <style>
- .weui-cells::before {
- display: none;
- }
- </style>
- </head>
- <body>
- <div class="warp" style="background: #fff">
- <div class="weui-cells weui-cells_form" style="margin-top: 0px;">
- <form id="registerForm">
- <div class="weui-cell ">
- <div class="weui-cell__hd">
- <label class="weui-label">手机号</label>
- </div>
- <div class="weui-cell__bd">
- <input name="phone" class="weui-input" type="tel">
- </div>
- <!--<div class="weui-cell__ft">-->
- <!--<button class="weui-vcode-btn">获取验证码</button>-->
- <!--</div>-->
- </div>
- <div class="weui-cell">
- <div class="weui-cell__hd"><label for="birthDate" class="weui-label">生日</label></div>
- <div class="weui-cell__bd">
- <input id="birthDate" name="birthDate" type="text">
- </div>
- </div>
- <div class="weui-cell">
- <div class="weui-cell__hd"><label class="weui-label">昵称</label></div>
- <div class="weui-cell__bd">
- <input name="nickName" class="weui-input" type="text">
- </div>
- </div>
- <div class="weui-cell">
- <div class="weui-cell__hd"><label class="weui-label">性别</label></div>
- <label class="weui-cell" style="padding: 0px;position: static;">
- <div class="weui-cell__bd weui-cells_checkbox">
- <input type="radio" class="weui-check" name="sex" value="1">
- <i class="weui-icon-checked"></i>
- </div>
- <div class="weui-cell__bd">
- <p>男</p>
- </div>
- </label>
- <label class="weui-cell" style="padding: 0px 0px 0px 15px;position: static;">
- <div class="weui-cell__bd weui-cells_checkbox">
- <input type="radio" class="weui-check" name="sex" value="2">
- <i class="weui-icon-checked"></i>
- </div>
- <div class="weui-cell__bd">
- <p>女</p>
- </div>
- </label>
- </div>
- </form>
- <div class="weui-btn-area">
- <a class="weui-btn weui-btn_primary" href="javascript:" onclick="submit();">提交</a>
- </div>
- </div>
- </div>
- <script src="js/jquery-3.2.1.js"></script>
- <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
- <script src="js/global.js"></script>
- <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
- <script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
- <script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/swiper.min.js"></script>
- <script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/city-picker.min.js"></script>
- <script type="text/javascript">
- $("#birthDate").calendar();
- function submit() {
- $.showLoading('数据提交中');
- //获取js-sdk签名
- createJsapiSignature(currentUrl);
- //config信息验证成功后会执行ready方法
- wx.ready(function() {
- getLocation(
- function (latitude,longitude) {
- var arr = $("#registerForm").serializeArray();
- arr.push({name:"openId",value:getUrlParam("openid")},{name:"latitude",value:latitude},{name:"longitude",value:longitude});
- var json = {};
- $.each(arr, function () {
- json[this.name] = this.value;
- });
- $.ajax({
- url: api+"marketing/weixin/terminalUser",
- type: "PUT",
- data: {
- abbreviationName:abbreviationName,
- json:JSON.stringify(json)
- },
- success: function (data) {
- $.hideLoading();
- if (data.code == 0) {
- $.toast(data.msg);
- hrefIndex();
- }
- },
- error: function (data) {
- $.hideLoading();
- $.toast("请求失败", "cancel");
- }
- });
- }
- );
- });
- //config信息验证失败后会执行error方法
- wx.error(function(res){
- alert("获取凭据失败:"+res);
- });
- }
- </script>
- </body>
- </html>
|