var strUrl= "^((https|http|ftp|rtsp|mms)?://)" +
               "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" //ftp 的 user@ +
               "(([0-9]{1,3}\.){3}[0-9]{1,3}" // IP 形式的 URL- 199.194.52.184 +
               "|" // 允许 IP 和 DOMAIN(域名) +
               "([0-9a-z_!~*'()-]+\.)*" // 域名 - www. +
               "([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\." // 二级域名 +
               "[a-z]{2,6})" // first level domain- .com or .museum +
               "(:[0-9]{1,4})?" // 端口 - :80 +
               "((/?)|" // a slash isn't required if there is no file name +
               "(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$";
var urlDemo = new RegExp(strUrl); 
if(!urlDemo.test('www.baidu.com')) { 
    this.$toast("请输入正确的url!"); 
    return; 
}