Skip to content

Commit

Permalink
用户注册失败消息回显
Browse files Browse the repository at this point in the history
  • Loading branch information
lzj7618937 committed Mar 29, 2020
1 parent ca42d0d commit 5d40ae0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 11 additions & 2 deletions client/web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,17 @@ export default {
this.axios.post('/api/signup', postData)
.then( result => {
$("#signup-modal").modal('hide');
$("#login-modal").modal('show');
if(result.data.code===200){
this.username = '';
this.signusername = '';
this.password = '';
this.password2 = '';
$("#signup-modal").modal('hide');
$("#login-modal").modal('show');
}else{
this.message = result.data.message;
return;
}
});
},
/** 登录 */
Expand Down
3 changes: 3 additions & 0 deletions product-service/api/scripts/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ CREATE TABLE user
email VARCHAR(50) NULL DEFAULT NULL COMMENT '邮箱',
PRIMARY KEY (id)
);
ALTER TABLE `BoatHouse`.`user`
ADD UNIQUE INDEX `account_UNIQUE` (`account` ASC);

DROP TABLE IF EXISTS shop_cart;
CREATE TABLE shop_cart (
`id` VARCHAR(100) NOT NULL,
Expand Down

0 comments on commit 5d40ae0

Please sign in to comment.