修改登入传参

This commit is contained in:
Dragon
2023-07-17 14:32:06 +08:00
parent 47864dabdb
commit be4a1e09b2
5 changed files with 90 additions and 87 deletions

View File

@@ -100,15 +100,18 @@ function oauthToken () {
showLoading()
networkRequest({
type: 'POST',
url: urlPrefix + '/oauth/token',
url: urlPrefix + '/oauth/h5/token',
data: idOrPhone ? {
"grant_type": "password", phone, password, client_id: "erban-client", "client_secret": "uyzjdhds"
"grant_type": "password", phone, password,
} :
{ grant_type: 'verify_code', phoneAreaCode, phone:`${phoneAreaCode}${phone}`, code, client_id: "erban-client", "client_secret": "uyzjdhds" },
{ grant_type: 'verify_code', phoneAreaCode, phone:`${phoneAreaCode}${phone}`, code,},
success (res) {
if (res.code === 200) {
token = res.data.access_token;
ticket();
// ticket();
sessionStorage.setItem("uid", res.data.uid);
sessionStorage.setItem("ticket", token);
window.location.href = './index.html'
} else {
toastMsg(res.message)
}