text: // 搜索
  $('#search').on('click', function () {
      let type = $('#type').val();
      if (type == '2') {
          searchContent = encodeURIComponent($('#searchContent').val());
          if (searchContent == '') {
              layer.msg('查询条件不能为空', {
                  time: 1000
              });
              return;
          }
      } else {
          searchContent = $('#searchContent').val();
          if (searchContent == '') {
              layer.msg('查询条件不能为空', {
                  time: 1000
              });
              return;
          }
          let reg = /^(?=.*[a-z])[a-z0-9]{4,16}$/i;
          if (!reg.test(searchContent)) {
              layer.msg('用户名不符合要求', {
                  time: 1000
              });
              return;
          }
      }
      if (type == '1') {
          window.location.href = `/user/search/${searchContent}.html`;
      } else {
          window.location.href = `/article/search/${searchContent}.html`;
      }
  });
  