...
|
...
|
@@ -119,5 +119,155 @@ |
|
|
background-size: cover;
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
$(document).ready(function () {
|
|
|
$('.mask_box').hide()
|
|
|
$('.form_popup_box').hide()
|
|
|
|
|
|
$(function () {
|
|
|
//获取短信验证码
|
|
|
var validCode = true;
|
|
|
$(".getCode").click(function () {
|
|
|
var time = 60;
|
|
|
var $code = $(this);
|
|
|
if (validCode) {
|
|
|
validCode = false;
|
|
|
var t = setInterval(function () {
|
|
|
time--;
|
|
|
$code.html(time + "秒");
|
|
|
if (time == 0) {
|
|
|
clearInterval(t);
|
|
|
$code.html("重新获取");
|
|
|
validCode = true;
|
|
|
}
|
|
|
}, 1000)
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
$('.platform_item').click(function () {
|
|
|
weui.picker([
|
|
|
{label: '平台1', value: 0},
|
|
|
{label: '平台2', value: 1},
|
|
|
{label: '平台3', value: 2},
|
|
|
], {
|
|
|
onChange: function (res) {
|
|
|
console.log(res)
|
|
|
},
|
|
|
onConfirm: function (res) {
|
|
|
$('#platform').val(res[0].label)
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
$('.hospital_item').click(function () {
|
|
|
weui.picker([
|
|
|
{label: '医院1', value: 0},
|
|
|
{label: '医院2', value: 1},
|
|
|
{label: '医院3', value: 2},
|
|
|
], {
|
|
|
onChange: function (res) {
|
|
|
console.log(res)
|
|
|
},
|
|
|
onConfirm: function (res) {
|
|
|
$('#hospital').val(res[0].label)
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
$('.department_item').click(function () {
|
|
|
weui.picker([
|
|
|
{label: '科室1', value: 0},
|
|
|
{label: '科室2', value: 1},
|
|
|
{label: '科室3', value: 2},
|
|
|
], {
|
|
|
onChange: function (res) {
|
|
|
console.log(res)
|
|
|
},
|
|
|
onConfirm: function (res) {
|
|
|
$('#department').val(res[0].label)
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
$('.position_item').click(function () {
|
|
|
weui.picker([
|
|
|
{label: '职务1', value: 0},
|
|
|
{label: '职务2', value: 1},
|
|
|
{label: '职务3', value: 2},
|
|
|
], {
|
|
|
onChange: function (res) {
|
|
|
console.log(res)
|
|
|
},
|
|
|
onConfirm: function (res) {
|
|
|
$('#position').val(res[0].label)
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
|
|
|
$('.register_btn').click(function () {
|
|
|
var user_name = $('#user_name').val()
|
|
|
var phone_num = $('#phone_num').val()
|
|
|
var verify_code = $('#verify_code').val()
|
|
|
var platform = $('#platform').val()
|
|
|
var hospital = $('#hospital').val()
|
|
|
var department = $('#department').val()
|
|
|
var position = $('#position').val()
|
|
|
var province = $('#province').val()
|
|
|
var city = $('#city').val()
|
|
|
var town = $('#town').val()
|
|
|
if (user_name == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('用户名不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (phone_num == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('手机号不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (verify_code == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('密码不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (platform == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('平台不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (hospital == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('医院不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (department == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('科室不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (position == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('职务不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (province == '请选择') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('省份不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (city == '请选择') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('城市不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (town == '请选择') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('区县不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else {
|
|
|
$('.success').show().delay(2000).hide(2)
|
|
|
// $('.first').show().delay(2000).hide(2)
|
|
|
// setTimeout(function () {
|
|
|
// $('.success').show().delay(2000).hide(2)
|
|
|
// },2000);
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|