作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

手动输入就职公司

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">
<link rel="stylesheet" href="css/weui.min.css">
<link rel="stylesheet" href="css/jquery-weui.css">
</head>
<body>
<div class="weui-cell">
<div class="weui-cell__hd"><label for="name" class="weui-label">发出地</label></div>
<div class="weui-cell__bd">
<input class="weui-input" id="start" type="text" value="湖北省 武汉市 武昌区">
</div>
</div>
<script src="js/jquery-2.1.4.js"></script>
<script src="js/fastclick.js"></script>
<!--<script>-->
<!-- $(function() {-->
<!-- FastClick.attach(document.body);-->
<!-- });-->
<!--</script>-->
<script src="js/jquery-weui.js"></script>
<script src="js/city-picker.js"></script>
<script>
$("#start").cityPicker({
title: "选择出发地",
onChange: function (picker, values, displayValues) {
console.log(values, displayValues);
}
});
// $("#end").cityPicker({
// title: "选择目的地"
// });
// $("#home-city").cityPicker({
// title: "选择目的地",
// showDistrict: false,
// onChange: function (picker, values, displayValues) {
// console.log(values, displayValues);
// }
// });
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -3,35 +3,95 @@
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_970727_pul0ncci0v.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/style.css">
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/fontsize.js"></script>
<!--<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>-->
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/jquery-weui.css">
<title>{$title}</title>
</head>
<body>
<div class="weui-cells weui-cells_form">
<div class="weui-cell">
<div class="weui-cell__hd"><label for="name" class="weui-label">发出地</label></div>
<div class="weui-cell__bd">
<input class="weui-input" id="start" type="text" value="湖北省 武汉市 武昌区">
</div>
<div class="survey_item supple_top">
<div class="survey_itemtxt supple_itemtxt">姓名:</div>
<div class="survey_input supple_iteminput">
<input type="text" placeholder="请输入" id="name">
</div>
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">手机号:</div>
<div class="survey_input supple_iteminput">
<input type="number" placeholder="请输入" id="tel">
</div>
<div class="weui-cell">
<div class="weui-cell__hd"><label for="date" class="weui-label">目的地</label></div>
<div class="weui-cell__bd">
<input class="weui-input" id="end" type="text" value="">
</div>
<div class="sex_itemtxt sexsupple_itemtxt color_txt" >获取验证码</div>
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">验证码:</div>
<div class="survey_input supple_iteminput">
<input type="number" placeholder="请输入" id="code">
</div>
</div>
<h2 class="demos-second-title">只选择城市</h2>
<div class="weui-cells weui-cells_form">
<div class="weui-cell">
<div class="weui-cell__hd"><label for="home-city" class="weui-label">城市</label></div>
<div class="weui-cell__bd">
<input class="weui-input" id="home-city" type="text">
</div>
<div class="survey_item date_choose">
<div class="survey_itemtxt supple_itemtxt">出生日期:</div>
<div class="survey_input supple_iteminput" id="date">
<div class="tishitxt">请选择</div>
<!--<input type="text" placeholder="请输入" >-->
</div>
<!--<div class="sex_itemtxt sexsupple_itemtxt date_choose">请选择</div>-->
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">就职公司:</div>
<div class="survey_input supple_iteminput">
<input type="text" placeholder="请输入" id="company">
</div>
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">所在地:</div>
<!--<div class="survey_input city-picker">-->
<!--<input type="text" id='start' placeholder="请选择"/>-->
<!--</div>-->
<div class="weui-cell__bd">
<input class="weui-input" id="start" type="text" value="湖北省 武汉市 武昌区">
</div>
</div>
<!--<div class="survey_item companychoose">-->
<!--<div class="survey_itemtxt supple_itemtxt">就职公司:</div>-->
<!--<div class="survey_input supple_iteminput " id="company">-->
<!--<div class="tishitxt">请选择</div>-->
<!--</div>-->
<!--&lt;!&ndash;<div class="sex_itemtxt sexsupple_itemtxt companychoose">请选择</div>&ndash;&gt;-->
<!--</div>-->
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">身份证号:</div>
<div class="survey_input supple_iteminput">
<input type="text" placeholder="请输入" id="sfid">
</div>
</div>
<!--<div class="survey_item ">-->
<!--<div class="survey_itemtxt supple_itemtxt">展业证号:</div>-->
<!--<div class="survey_input supple_iteminput">-->
<!--<input type="text" placeholder="请输入" id="stand">-->
<!--</div>-->
<!--</div>-->
<!--<div class="trust_box supple_box">-->
<!--<div class="trust_title">请上传展业证照片</div>-->
<!--<div class="trust_imgs">-->
<!--<div class="trust_img">-->
<!--<div class="iconfont icon-close-b"></div>-->
<!--<img src="../assets/imgs/dfsdgffdgsga@2x.png" alt="">-->
<!--</div>-->
<!--<div class="trust_img add_img" style="position:relative;">-->
<!--<input type="file" id="doc" name="pic" class="upload_img" style="opacity: 0;position:absolute;width: 100%;height: 100%;" >-->
<!--<div class="iconfont icon-jia"></div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="reg_box actiidvetxt <if condition='$is_select eq 1'>activetxt</if>"><div class="iconfont icon-xuanzhong1"></div>
同意<a href="{:url('agreement/index2')}">《协议》</a></div>
<div class="regbtn survey_btn">提交</div>
... ... @@ -43,16 +103,13 @@
</div>
</div>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/weui.min.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/Augly_Verification.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/common.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/fastclick.js"></script>
<script>
$(function() {
FastClick.attach(document.body);
});
</script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-weui.js" charset="utf-8"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/city-picker.js" charset="utf-8"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-weui.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/city-picker.js"></script>
<script>
$("#start").cityPicker({
... ... @@ -61,16 +118,193 @@
console.log(values, displayValues);
}
});
$("#end").cityPicker({
title: "选择目的地"
});
$("#home-city").cityPicker({
title: "选择目的地",
showDistrict: false,
onChange: function (picker, values, displayValues) {
console.log(values, displayValues);
$('.regbtn').click(function () {
var name=$('#name').val();
var tel=$('#tel').val();
var code=$('#code').val();
var date=$('#date').text();
var company=$('#company').val();
var sfid=$('#sfid').val();
if(name==''){
toast("姓名不能为空");
} else if(tel==''){
toast("电话号码不能为空")
}else if(! AuglyTest_phone.test(tel)){
toast("电话号码输入不正确")
}else if(code == ''){
toast("验证码不能为空")
}else if(date==''){
toast("出生日期不能为空")
}else if(company==''){
toast("就职公司不能为空")
}else if(sfid==''){
toast("身份证号不能为空")
}else if(!AuglyTest_ID.test(sfid)){
toast("身份证号输入有误")
} else if(!$('.reg_box').hasClass('activetxt')){
toast("请同意用户协议")
}
});
else{
$.ajax({
url:"{:url('agent_register_mobile/register_mobile')}",
type:"POST",
data:{'phone':tel,'name':name,'code':code,'date':date,'company':company,'card_id':sfid,'consent':1},
success:function(data){
var result = eval("(" + data + ")");
if(result.code == 40001){
toast("缺少必要参数");
}else if(result.code == 40004){
toast("请同意用户协议");
}else if(result.code == 40002){
toast("验证码错误");
}else if(result.code == 40003){
toast("验证码已过期请重新获取");
}else if(result.code == 20000){
toast("已发送申请请耐心等待审核");
}else{
toast("与服务器断开连接");
}
}
})
}
})
$('.reg_box').click(function () {
if($(this).hasClass('activetxt')){
$(this).removeClass('activetxt')
}else{
$(this).addClass('activetxt')
}
})
$('.color_txt').click(function () {
var tel=$('#tel').val();
if(tel==''){
toast("电话号码不能为空")
}else if(! AuglyTest_phone.test(tel)){
toast("电话号码输入不正确")
}else{
$.ajax({
url:"{:url('agent_register_mobile/getCode')}",
type:"POST",
data:{'phone':tel},
success:function(data){
var result = eval("(" + data + ")");
if(result.code == 20000){
toast("短信已发送至您的手机请注意查看");
settime($(this))
}else if(result.code == 40000){
toast("短信发送失败");
}
}
})
}
})
//倒计时
var countdown=60;
function settime(val) {
if (countdown == 0) {
$('.color_txt').html('获取验证码');
$('.color_txt').attr('onclick','settime(this)');
countdown = 60;
} else {
$('.color_txt').html(countdown +"s");
$('.color_txt').attr('onclick','');
countdown--;
setTimeout(function() {
settime(val)
},1000)
}
}
// $("#start").cityPicker({
// title: "选择出发地",
// onChange: function (picker, values, displayValues) {
// console.log(values, displayValues);
// }
// });
$('.companychoose').click(function () {
weui.picker([{
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}], {
onChange: function(result) {
},
onConfirm: function(result) {
$('#company').html(result[0].label);
$(this).find('.tishitxt').hide();
}
});
})
$('.date_choose').click(function () {
weui.datePicker({
start:new Date().getFullYear() - 90,
end: new Date(),
defaultValue: [new Date().getFullYear(), new Date().getMonth()+1, new Date().getDate()],
onConfirm: function(result){
console.log(result);
let date='';
for(var i=0;i<result.length;i++){
if(i==(result.length-1)){
date += result[i].value
}else{
date += result[i].value+'-'
}
}
$('#date').html(date+1);
$(this).find('.tishitxt').hide();
},
id: 'ma_expect_date',
className: 'ma_expect_date_picker'
});
})
$('.add_img').click(function () {
let i=0;
$("input[name='pic']").on('change',function(){
i++;
if(i==1){
var file = $(this).val();
var imgurl = setImagePreview(file);
var html=' <div class="trust_img">\n' +
' <div class="iconfont icon-close-b"></div>\n' +
' <img src="'+imgurl+'" alt="">\n' +
' </div>';
$('.trust_imgs').prepend(html);
}else{
}
});
})
//选择图片上传
function setImagePreview(avalue,obj) {
var docObj = document.getElementById("doc");
var imgurl='';
if (docObj.files && docObj.files[0]) {
imgurl = window.URL.createObjectURL(docObj.files[0]);
} else {
//IE下,使用滤镜
docObj.select();
imgurl = document.selection.createRange().text;
}
return imgurl;
}
$('.trust_imgs').on('click','.icon-close-b',function (e) {
$(this).parents('.trust_img').remove();
})
</script>
</body>
</html>
\ No newline at end of file
... ...
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_970727_pul0ncci0v.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/style.css">
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/fontsize.js"></script>
<!--<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>-->
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/jquery-weui.css">
<title>{$title}</title>
</head>
<body>
<div class="survey_item supple_top">
<div class="survey_itemtxt supple_itemtxt">姓名:</div>
<div class="survey_input supple_iteminput">
<input type="text" placeholder="请输入" id="name">
</div>
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">手机号:</div>
<div class="survey_input supple_iteminput">
<input type="number" placeholder="请输入" id="tel">
</div>
<div class="sex_itemtxt sexsupple_itemtxt color_txt" >获取验证码</div>
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">验证码:</div>
<div class="survey_input supple_iteminput">
<input type="number" placeholder="请输入" id="code">
</div>
</div>
<div class="survey_item date_choose">
<div class="survey_itemtxt supple_itemtxt">出生日期:</div>
<div class="survey_input supple_iteminput" id="date">
<div class="tishitxt">请选择</div>
<!--<input type="text" placeholder="请输入" >-->
</div>
<!--<div class="sex_itemtxt sexsupple_itemtxt date_choose">请选择</div>-->
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">就职公司:</div>
<div class="survey_input supple_iteminput">
<input type="text" placeholder="请输入" id="company">
</div>
</div>
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">所在地:</div>
<!--<div class="survey_input city-picker">-->
<!--<input type="text" id='start' placeholder="请选择"/>-->
<!--</div>-->
<div class="weui-cell__bd">
<input class="weui-input" id="start" type="text" value="湖北省 武汉市 武昌区">
</div>
</div>
<!--<div class="survey_item companychoose">-->
<!--<div class="survey_itemtxt supple_itemtxt">就职公司:</div>-->
<!--<div class="survey_input supple_iteminput " id="company">-->
<!--<div class="tishitxt">请选择</div>-->
<!--</div>-->
<!--&lt;!&ndash;<div class="sex_itemtxt sexsupple_itemtxt companychoose">请选择</div>&ndash;&gt;-->
<!--</div>-->
<div class="survey_item">
<div class="survey_itemtxt supple_itemtxt">身份证号:</div>
<div class="survey_input supple_iteminput">
<input type="text" placeholder="请输入" id="sfid">
</div>
</div>
<!--<div class="survey_item ">-->
<!--<div class="survey_itemtxt supple_itemtxt">展业证号:</div>-->
<!--<div class="survey_input supple_iteminput">-->
<!--<input type="text" placeholder="请输入" id="stand">-->
<!--</div>-->
<!--</div>-->
<!--<div class="trust_box supple_box">-->
<!--<div class="trust_title">请上传展业证照片</div>-->
<!--<div class="trust_imgs">-->
<!--<div class="trust_img">-->
<!--<div class="iconfont icon-close-b"></div>-->
<!--<img src="../assets/imgs/dfsdgffdgsga@2x.png" alt="">-->
<!--</div>-->
<!--<div class="trust_img add_img" style="position:relative;">-->
<!--<input type="file" id="doc" name="pic" class="upload_img" style="opacity: 0;position:absolute;width: 100%;height: 100%;" >-->
<!--<div class="iconfont icon-jia"></div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="reg_box actiidvetxt <if condition='$is_select eq 1'>activetxt</if>"><div class="iconfont icon-xuanzhong1"></div>
同意<a href="{:url('agreement/index2')}">《协议》</a></div>
<div class="regbtn survey_btn">提交</div>
<!--toast-->
<div id="toast" style="display: none;">
<div class="weui-mask_transparent"></div>
<div class="weui-toast">
<p class="weui-toast__content">已完成</p>
</div>
</div>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/weui.min.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/Augly_Verification.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/common.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/fastclick.js"></script>
<script>
$(function() {
FastClick.attach(document.body);
});
</script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-weui.js" charset="utf-8"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/city-picker.js" charset="utf-8"></script>
<script>
$("#start").cityPicker({
title: "选择出发地",
onChange: function (picker, values, displayValues) {
console.log(values, displayValues);
}
});
$("#end").cityPicker({
title: "选择目的地"
});
$("#home-city").cityPicker({
title: "选择目的地",
showDistrict: false,
onChange: function (picker, values, displayValues) {
console.log(values, displayValues);
}
});
$('.regbtn').click(function () {
var name=$('#name').val();
var tel=$('#tel').val();
var code=$('#code').val();
var date=$('#date').text();
var company=$('#company').val();
var sfid=$('#sfid').val();
if(name==''){
toast("姓名不能为空");
} else if(tel==''){
toast("电话号码不能为空")
}else if(! AuglyTest_phone.test(tel)){
toast("电话号码输入不正确")
}else if(code == ''){
toast("验证码不能为空")
}else if(date==''){
toast("出生日期不能为空")
}else if(company==''){
toast("就职公司不能为空")
}else if(sfid==''){
toast("身份证号不能为空")
}else if(!AuglyTest_ID.test(sfid)){
toast("身份证号输入有误")
} else if(!$('.reg_box').hasClass('activetxt')){
toast("请同意用户协议")
}
else{
$.ajax({
url:"{:url('agent_register_mobile/register_mobile')}",
type:"POST",
data:{'phone':tel,'name':name,'code':code,'date':date,'company':company,'card_id':sfid,'consent':1},
success:function(data){
var result = eval("(" + data + ")");
if(result.code == 40001){
toast("缺少必要参数");
}else if(result.code == 40004){
toast("请同意用户协议");
}else if(result.code == 40002){
toast("验证码错误");
}else if(result.code == 40003){
toast("验证码已过期请重新获取");
}else if(result.code == 20000){
toast("已发送申请请耐心等待审核");
}else{
toast("与服务器断开连接");
}
}
})
}
})
$('.reg_box').click(function () {
if($(this).hasClass('activetxt')){
$(this).removeClass('activetxt')
}else{
$(this).addClass('activetxt')
}
})
$('.color_txt').click(function () {
var tel=$('#tel').val();
if(tel==''){
toast("电话号码不能为空")
}else if(! AuglyTest_phone.test(tel)){
toast("电话号码输入不正确")
}else{
$.ajax({
url:"{:url('agent_register_mobile/getCode')}",
type:"POST",
data:{'phone':tel},
success:function(data){
var result = eval("(" + data + ")");
if(result.code == 20000){
toast("短信已发送至您的手机请注意查看");
settime($(this))
}else if(result.code == 40000){
toast("短信发送失败");
}
}
})
}
})
//倒计时
var countdown=60;
function settime(val) {
if (countdown == 0) {
$('.color_txt').html('获取验证码');
$('.color_txt').attr('onclick','settime(this)');
countdown = 60;
} else {
$('.color_txt').html(countdown +"s");
$('.color_txt').attr('onclick','');
countdown--;
setTimeout(function() {
settime(val)
},1000)
}
}
// $("#start").cityPicker({
// title: "选择出发地",
// onChange: function (picker, values, displayValues) {
// console.log(values, displayValues);
// }
// });
$('.companychoose').click(function () {
weui.picker([{
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}, {
label: '中银三星人寿保险有限公司',
value: '中银三星人寿保险有限公司'
}], {
onChange: function(result) {
},
onConfirm: function(result) {
$('#company').html(result[0].label);
$(this).find('.tishitxt').hide();
}
});
})
$('.date_choose').click(function () {
weui.datePicker({
start:new Date().getFullYear() - 90,
end: new Date(),
defaultValue: [new Date().getFullYear(), new Date().getMonth()+1, new Date().getDate()],
onConfirm: function(result){
console.log(result);
let date='';
for(var i=0;i<result.length;i++){
if(i==(result.length-1)){
date += result[i].value
}else{
date += result[i].value+'-'
}
}
$('#date').html(date+1);
$(this).find('.tishitxt').hide();
},
id: 'ma_expect_date',
className: 'ma_expect_date_picker'
});
})
$('.add_img').click(function () {
let i=0;
$("input[name='pic']").on('change',function(){
i++;
if(i==1){
var file = $(this).val();
var imgurl = setImagePreview(file);
var html=' <div class="trust_img">\n' +
' <div class="iconfont icon-close-b"></div>\n' +
' <img src="'+imgurl+'" alt="">\n' +
' </div>';
$('.trust_imgs').prepend(html);
}else{
}
});
})
//选择图片上传
function setImagePreview(avalue,obj) {
var docObj = document.getElementById("doc");
var imgurl='';
if (docObj.files && docObj.files[0]) {
imgurl = window.URL.createObjectURL(docObj.files[0]);
} else {
//IE下,使用滤镜
docObj.select();
imgurl = document.selection.createRange().text;
}
return imgurl;
}
$('.trust_imgs').on('click','.icon-close-b',function (e) {
$(this).parents('.trust_img').remove();
})
</script>
</body>
</html>
\ No newline at end of file