搜索没有输入关键字不保存

This commit is contained in:
luchenqun 2017-04-06 09:28:43 +08:00
parent 977233be66
commit 1e5fd345c5
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View File

@ -40,3 +40,4 @@ jspm_packages
uploads uploads
/public/images/snap/ /public/images/snap/
/public/images/favicon/ /public/images/favicon/
.tags

View File

@ -69,6 +69,8 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
$window.open('http://www.baidu.com/s?tn=mybookmark.cn&ch=3&ie=utf-8&wd=' + encodeURIComponent(searchWord), '_blank'); $window.open('http://www.baidu.com/s?tn=mybookmark.cn&ch=3&ie=utf-8&wd=' + encodeURIComponent(searchWord), '_blank');
} }
if(!searchWord){ return; }
var newItem = { var newItem = {
t: searchOption, t: searchOption,
d: searchWord, d: searchWord,