我是opencart的新手。我必须从联系页面发送邮件。我在管理面板中设置参数。
邮件协议: SMTP
邮件参数: -femailid@gmail.com
SMTP主机名: smtp.gmail.com
SMTP用户名: emailid@gmail.com
SMTP密码:密码
search(term: string) {
// emit systematically. The observable chain will just return
// 0 result if the term is too short
this.searchTerms.next(term);
}
ngOnInit() {
this.users = this.searchTerms
.debounceTime(400)
.distinctUntilChanged()
.switchMap(term => {
if (term.length < 3) {
return Observable.of([]);
}
else {
this.loading = true;
return this.getUserService.getUser(term)
// catch here to make sure that an http error doesn't break the chain
.catch(() => return Observable.of([])
.finally(() => this.loading = false);
}
});
}
我不明白为什么它不起作用。我做错了什么?