diff --git a/src/components/Home/Home.vue b/src/components/Home/Home.vue
index 12ba79f..b9f74d7 100644
--- a/src/components/Home/Home.vue
+++ b/src/components/Home/Home.vue
@@ -367,11 +367,12 @@ export default {
// 方法
submitForm(formName) {
+ var _this=this;
this.$refs[formName].validate((valid) => {
if (valid) {
//存入cookie
// this.setCookie(this.ruleForm.username, this.ruleForm.password, 7); //保存7天
- this.$cookie.set('username',this.ruleForm.username,7);
+
// } else {
// this.clearCookie();
@@ -396,6 +397,7 @@ export default {
// type: 'success'
// });
if (res.data.code === 200) {
+ _this.$cookie.set('username',_this.ruleForm.username,7);
Vue.prototype.$notify({
title: '成功',
message: ('i', {style: 'color: teal'}, res.data.msg),
diff --git a/src/components/Home/SearchInput.vue b/src/components/Home/SearchInput.vue
index 9587cf9..573e9c0 100644
--- a/src/components/Home/SearchInput.vue
+++ b/src/components/Home/SearchInput.vue
@@ -9,13 +9,14 @@
style="padding-top: 0"
v-model="visible"
>
-
-
+
+
搜索历史
- 清空
+ 清空
-
+
- {{ tag }}
-
+ >
+ {{ tag }}
+
+
+
+ 你还没有登录哦~
+
+
@@ -56,7 +62,7 @@ export default {
isMouseOver: false,
search: '',
tipsWord: '',
- historySearch: [],
+ historySearch: null,
items: [
]
}
@@ -114,34 +120,34 @@ export default {
});
},
handleClose(tag){
- var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/deletelabel',
// URL 中的查询参数
params: {
- tag:tag+';'
+ tag:tag
}
}).then((res)=>{
- if(res.date.code===200){
- that.$message({
- showClose: true,
- message: res.date.msg,
- type: 'success'
+ if(res.data.code===200){
+ Vue.prototype.$notify({
+ title: '成功',
+ message: ('i', {style: 'color: teal'}, res.data.msg),
+ type: 'success',
+ offset: 50
});
}else{
- that.$message({
- showClose: true,
- message: res.date.msg,
- type: 'error'
+ Vue.prototype.$notify.error({
+ title: '错误',
+ message: res.data.msg,
+ offset: 50
});
}
});
}
},
mounted() {
- this.tipsWord = "helloGithub";
+ this.tipsWord = "搜索开源项目";
this.gethistorySearch();
}
};
diff --git a/src/components/Home/UserInfo.vue b/src/components/Home/UserInfo.vue
index e37090b..301e5d2 100644
--- a/src/components/Home/UserInfo.vue
+++ b/src/components/Home/UserInfo.vue
@@ -2,7 +2,7 @@
-
+
{{this.$cookie.get('username')}}
{{this.$cookie.get('username')}}
Lv.1
@@ -14,14 +14,14 @@
贡献值
- 0/64
+ 0/100
- 我的主页
+ 我的主页
退出登录
@@ -39,6 +39,9 @@ export default {
signOut(){
this.$cookie.delete('username');
window.location.reload();
+ },
+ toUserPage(){
+ this.$router.push({path:'/UserInfoPage'})
}
}
}
diff --git a/src/components/UserInfoPage.vue b/src/components/UserInfoPage.vue
index 9a89d7f..7f01971 100644
--- a/src/components/UserInfoPage.vue
+++ b/src/components/UserInfoPage.vue
@@ -1,5 +1,5 @@
-