Comparing version 1.1.0 to 1.1.2
@@ -29,10 +29,25 @@ 'use strict'; | ||
} else if (messageList[0].type === 2) { | ||
v.$notify.error({ | ||
title: '提示', | ||
message: messageList[0].message | ||
}); | ||
(function () { | ||
var time = 0; | ||
messageList[0].message.forEach(function (item) { | ||
setTimeout(function () { | ||
v.$notify.error({ | ||
title: '提示', | ||
message: item | ||
}); | ||
}, time); | ||
time = time + 500; | ||
}); | ||
/* v.$notify.error({ | ||
title: '提示', | ||
message: messageList[0].message | ||
}); */ | ||
})(); | ||
} else if (messageList[0].type === 3) { | ||
v.$message.error(messageList[0].message); | ||
} | ||
v.$message.error(messageList[0].message); | ||
} | ||
messageList.splice(0, 1); | ||
if (messageList.length > 0) { | ||
pushMessage(); | ||
}; | ||
}, 300); | ||
@@ -168,45 +183,36 @@ | ||
// let time = 0 | ||
result.data.data.length > 0 && result.data.data.forEach(function (item) { | ||
messageList.push({ | ||
type: 2, | ||
message: result.data.data | ||
}); | ||
pushMessage(); | ||
} else if (result.data.code === 200 && result.data.msg.trim() !== '') { | ||
messageList.push({ | ||
type: 1, | ||
message: result.data.msg | ||
}); | ||
pushMessage(); | ||
// v.$message() | ||
} else if (result.data.code === 302) { | ||
messageList.push({ | ||
type: 2, | ||
message: item | ||
type: 3, | ||
message: result.data.msg | ||
}); | ||
pushMessage(); | ||
/* setTimeout(() => { | ||
v.$notify.error({ | ||
title: '提示', | ||
message: item | ||
}) | ||
}, time) */ | ||
/* time = time + 500 */ | ||
}); | ||
} else if (result.data.code === 200 && result.data.msg.trim() !== '') { | ||
// v.$message.error(result.data.msg) | ||
sessionStorage.clear(); | ||
store.commit('setName', ''); | ||
store.commit('setUserName', ''); | ||
store.commit('setUserId', ''); | ||
store.commit('setAuthority', []); | ||
v.$router.push('/'); | ||
messageList = []; | ||
} else if (result.data.msg && result.data.msg.trim() !== '') { | ||
messageList.push({ | ||
type: 1, | ||
type: 3, | ||
message: result.data.msg | ||
}); | ||
pushMessage(); | ||
// v.$message() | ||
} else if (result.data.code === 302) { | ||
messageList.push({ | ||
type: 3, | ||
message: result.data.msg | ||
}); | ||
pushMessage(); | ||
// v.$message.error(result.data.msg) | ||
sessionStorage.clear(); | ||
store.commit('setName', ''); | ||
store.commit('setUserName', ''); | ||
store.commit('setUserId', ''); | ||
store.commit('setAuthority', []); | ||
v.$router.push('/'); | ||
messageList = []; | ||
} else if (result.data.msg && result.data.msg.trim() !== '') { | ||
messageList.push({ | ||
type: 3, | ||
message: result.data.msg | ||
}); | ||
pushMessage(); | ||
// v.$message.error(result.data.msg) | ||
} | ||
// v.$message.error(result.data.msg) | ||
} | ||
return result; | ||
@@ -213,0 +219,0 @@ }, function (err) { |
{ | ||
"name": "one-sport", | ||
"version": "1.1.0", | ||
"version": "1.1.2", | ||
"description": "use for one-sport company", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9789
237