Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thinkApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
游洁
thinkApp
Commits
b2047a44
Commit
b2047a44
authored
May 25, 2022
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/youjie/thinkapp
# Conflicts: # src/pages/index/index.vue
parents
efceaef5
1cfb0f4f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
612 deletions
+44
-612
index.vue
src/pages/index/index.vue
+38
-502
accountLogin.vue
src/pages/login/accountLogin.vue
+5
-108
login.vue
src/pages/login/login.vue
+1
-2
No files found.
src/pages/index/index.vue
View file @
b2047a44
This diff is collapsed.
Click to expand it.
src/pages/login/accountLogin.vue
View file @
b2047a44
...
...
@@ -26,7 +26,7 @@
</view>
<view
class=
"login-bottom"
>
<view
class=
"login-bottom-text"
@
click=
"back"
>
返回
</view>
<
view
class=
"login-bottom-text"
>
忘记密码
</view
>
<
!--
<view
class=
"login-bottom-text"
>
忘记密码
</view>
--
>
</view>
</view>
</view>
...
...
@@ -65,15 +65,12 @@
let
msg
=
reactive
({
Account
:
""
,
Password
:
""
,
// openId:"",
// uniunId:"",
});
let
data
=
reactive
({
phoneNum
:
""
,
openid
:
""
,
code
:
""
,
show
:
false
,
showVisitor
:
false
,
});
let
methods
=
{
...
...
@@ -94,8 +91,6 @@
});
clearTimeout
();
},
async
login
()
{
if
(
msg
.
Account
==
""
||
!
msg
.
Account
)
{
Toast
.
fail
(
"请输入账号"
);
...
...
@@ -119,102 +114,6 @@
}
})
},
login2
()
{
uni
.
login
({
provider
:
'weixin'
,
success
:
async
(
loginRes
)
=>
{
let
code
=
loginRes
.
code
data
.
code
=
code
}
});
},
//获取手机号
getphonenumber
(
e
)
{
if
(
e
.
detail
.
encryptedData
&&
e
.
detail
.
iv
)
{
let
encryptedData
=
e
.
detail
.
encryptedData
;
let
iv
=
e
.
detail
.
iv
;
that
.
parsePhoneNum
(
encryptedData
,
iv
,
data
.
code
)
}
else
{
Toast
.
fail
(
"授权失败,请重新授权"
)
}
},
//解密手机号
async
parsePhoneNum
(
encryptedData
,
iv
,
code
)
{
let
res
=
await
parsePhone
({
encryptedData
,
iv
,
code
})
if
(
res
&&
res
.
Data
.
phoneNumber
)
{
data
.
phoneNum
=
res
.
Data
.
phoneNumber
data
.
openid
=
res
.
Data
.
openid
that
.
phoneNumLogin
()
}
else
{
Toast
.
fail
(
"授权失败,请重新授权"
)
}
},
//手机号授权登录
async
phoneNumLogin
()
{
let
res
=
await
phoneLogin
({
Account
:
data
.
phoneNum
,
OpenId
:
data
.
openid
})
if
(
res
)
{
res
.
Data
.
Account
=
data
.
phoneNum
;
uni
.
setStorageSync
(
"userInfo"
,
res
.
Data
);
Toast
.
success
(
"登录成功"
);
setTimeout
(()
=>
{
let
data
=
uni
.
getStorageSync
(
"userInfo"
);
if
(
data
)
{
that
.
jumpPage
();
}
},
1000
);
}
},
async
login3
()
{
//游客登录
data
.
show
=
false
let
temporarydh
=
uni
.
getStorageSync
(
"temporarydh"
)
if
(
temporarydh
)
{
let
msg
=
{
Account
:
temporarydh
.
Account
,
OpenId
:
temporarydh
.
OpenId
,
unionid
:
temporarydh
.
unionid
,
WeChatName
:
temporarydh
.
WeChatName
,
WeChatPhoto
:
temporarydh
.
WeChatPhoto
,
IsVisitor
:
1
,
}
let
res
=
await
phoneLogin
(
msg
)
if
(
res
)
{
res
.
Data
.
Account
=
data
.
phoneNum
;
uni
.
setStorageSync
(
"userInfo"
,
res
.
Data
);
Toast
.
success
(
"登录成功"
);
setTimeout
(()
=>
{
let
data
=
uni
.
getStorageSync
(
"userInfo"
);
if
(
data
)
{
that
.
jumpPage
();
}
},
1000
);
}
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"未授权电话,请先点击授权按钮"
,
duration
:
2000
,
})
// setTimeout(()=>{
// uni.reLaunch({
// url: '/pages/index/index' //没有授权登录
// });
// },1500)
}
},
againdata
()
{
uni
.
reLaunch
({
url
:
'/pages/index/index'
});
},
};
onMounted
(()
=>
{});
let
that
=
methods
;
...
...
@@ -225,8 +124,7 @@
};
},
onLoad
()
{
//审核用
this
.
showVisitor
=
new
Date
().
getTime
()
>
new
Date
(
'2022-03-16'
).
getTime
()
}
};
</
script
>
...
...
@@ -234,7 +132,6 @@
<
style
scoped
>
.login-Welcome-title
{
font-size
:
50
rpx
;
font-family
:
PingFang
SC
;
color
:
#FFFFFF
;
margin-bottom
:
33
rpx
;
font-weight
:
300
;
...
...
@@ -259,8 +156,9 @@
top
:
-261
rpx
;
}
.login-bottom
.login-bottom-text
:first-child
{
border-right
:
1
rpx
solid
#E1E1E1
;
padding
:
0
110
rpx
0
0
;
/* border-right: 1rpx solid #E1E1E1;
padding: 0 110rpx 0 0; */
padding
:
0
110
rpx
;
}
.login-bottom-text
{
padding
:
0
0
0
110
rpx
;
...
...
@@ -322,7 +220,6 @@
margin-bottom
:
110
rpx
;
background-color
:
#C91727
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#FFFFFF
;
text-align
:
center
;
...
...
src/pages/login/login.vue
View file @
b2047a44
...
...
@@ -3,7 +3,7 @@
<view
class=
"login-background"
></view>
<view
class=
"login-content"
>
<view
class=
"login-image"
>
<van-image
width=
"398rpx"
height=
"398rpx"
fit=
"cover"
class=
"yuqi"
<van-image
width=
"398rpx"
height=
"398rpx"
fit=
"cover"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653448851000_616.png"
/>
</view>
<view
class=
"btnBox"
@
click=
"login"
>
...
...
@@ -84,7 +84,6 @@
margin-bottom
:
53
rpx
;
background-color
:
#C91727
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#FFFFFF
;
text-align
:
center
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment