12345678910111213141516171819202122232425262728293031323334353637383940 |
- /**
- * 账号相关js
- *
- * @author CaiAoLin
- * @date 2018/1/26
- * @version
- */
- $(document).ready(function() {
- try {
- if (user !== '') {
- $(".title-bar h2").text(user);
- }
- const options = {
- rules: '',
- errorPlacement: function(error, element) {
- $(element).addClass('is-invalid');
- $(element).after(error);
- },
- errorClass: "invalid-feedback",
- errorElement: "div",
- highlight: false,
- success: function(element) {
- $(element).prev('input').removeClass('is-invalid');
- $(element).remove();
- },
- };
- options.rules = baseRule;
- $("#base-form").validate(options);
- // 基础信息提交
- $("#base-submit").click(function() {
- $("#base-form").valid();
- });
- } catch (error) {
- console.log(error);
- }
- });
|