Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
3c7742cb
Commit
3c7742cb
authored
Aug 11, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉授权登录
parent
f1a8b15d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
106 deletions
+89
-106
index.vue
src/pages/index/index.vue
+68
-72
login.vue
src/pages/login/login.vue
+19
-29
request.js
src/utils/request.js
+1
-3
requestMall.js
src/utils/requestMall.js
+1
-2
No files found.
src/pages/index/index.vue
View file @
3c7742cb
This diff is collapsed.
Click to expand it.
src/pages/login/login.vue
View file @
3c7742cb
...
...
@@ -5,8 +5,7 @@
</van-nav-bar>
<view
class=
"top"
>
登录
<van-image
width=
"193rpx"
height=
"242rpx"
fit=
"cover"
class=
"yuqi"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/yuqi.png"
/>
<van-image
width=
"193rpx"
height=
"242rpx"
fit=
"cover"
class=
"yuqi"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/yuqi.png"
/>
</view>
<view
class=
"main"
>
<van-cell-group>
...
...
@@ -21,9 +20,9 @@
<view
class=
"btnBox"
@
click=
"login"
>
账号登录
</view>
<view
class=
"flex_center_center"
v-if=
"showVisitor"
>
<indexassembly
width=
"440rpx"
height=
"90rpx"
@
success=
'againdata'
>
<view
class=
"btnBox authBtn"
>
<
!--
<
view
class=
"flex_center_center"
v-if=
"showVisitor"
>
<indexassembly
width=
"440rpx"
height=
"90rpx"
@
success=
'againdata'
>
<view
class=
"btnBox authBtn"
>
授权登录
</view>
</indexassembly>
...
...
@@ -32,9 +31,8 @@
游客登录
</view>
<van-toast
id=
"van-toast"
/>
<van-dialog
:show=
'show'
title=
"提示"
message=
'游客登录,不能使用全部功能!'
show-cancel-button
@
cancel=
'show = false'
@
confirm=
'login3'
>
</van-dialog>
<van-dialog
:show=
'show'
title=
"提示"
message=
'游客登录,不能使用全部功能!'
show-cancel-button
@
cancel=
'show = false'
@
confirm=
'login3'
>
</van-dialog>
-->
</view>
</
template
>
...
...
@@ -60,7 +58,7 @@
}
from
'../../wxcomponents/vant/dialog/index'
;
import
indexassembly
from
'../index/components/indexassembly.vue'
export
default
{
components
:{
components
:
{
indexassembly
},
setup
(
props
,
context
)
{
...
...
@@ -79,7 +77,7 @@
openid
:
""
,
code
:
""
,
show
:
false
,
showVisitor
:
false
,
showVisitor
:
false
,
});
let
methods
=
{
...
...
@@ -94,13 +92,10 @@
},
jumpPage
()
{
uni
.
reLaunch
({
url
:
"/pages/index/index"
,
// url: "/pages/index/index2",//跳转查看考试
url
:
"/pages/index/index"
,
});
clearTimeout
();
},
async
login
()
{
if
(
msg
.
Account
==
""
||
!
msg
.
Account
)
{
Toast
.
fail
(
"请输入账号"
);
...
...
@@ -110,8 +105,8 @@
Toast
.
fail
(
"请输入密码"
);
return
;
}
let
res
=
await
this
.
$request
(
'/AppletLogin/Login'
,
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
let
res
=
await
this
.
$request
(
'/AppletLogin/Login'
,
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
res
.
Data
.
Account
=
msg
.
Account
;
uni
.
setStorageSync
(
"userInfo"
,
res
.
Data
);
Toast
.
success
(
"登录成功"
);
...
...
@@ -203,21 +198,14 @@
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"未授权电话,请先点击授权按钮"
,
duration
:
2000
,
title
:
"未授权电话,请先点击授权按钮"
,
duration
:
2000
,
})
// setTimeout(()=>{
// uni.reLaunch({
// url: '/pages/index/index' //没有授权登录
// });
// },1500)
}
},
againdata
()
{
uni
.
reLaunch
({
url
:
'/pages/index/index'
url
:
'/pages/index/index'
});
},
};
...
...
@@ -231,7 +219,7 @@
},
onLoad
()
{
//审核用
this
.
showVisitor
=
new
Date
().
getTime
()
>
new
Date
(
'2022-03-16'
).
getTime
()
this
.
showVisitor
=
new
Date
().
getTime
()
>
new
Date
(
'2022-03-16'
).
getTime
()
}
};
</
script
>
...
...
@@ -321,11 +309,13 @@
text-align
:
center
;
line-height
:
88
rpx
;
}
.authBtn
{
.authBtn
{
background-color
:
#EDEDFD
!important
;
color
:
#4C50E8
!important
;
}
.visitor
{
.visitor
{
text-align
:
center
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
src/utils/request.js
View file @
3c7742cb
//请求教育接口
let
host
=
''
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
host
=
'http://192.168.10.46:8300/api'
// host = 'http://192.168.10.65:8085/api'
// host = 'https://eduapi.oytour.com/api'
host
=
'http://192.168.10.128:8300/api'
}
else
{
host
=
'https://eduapi.oytour.com/api'
}
...
...
src/utils/requestMall.js
View file @
3c7742cb
//请求电商接口
let
host
=
''
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
host
=
'http://192.168.10.46:8200/api'
//host = "https://mallapi.oytour.com/api"
host
=
'http://192.168.10.128:8200/api'
}
else
{
host
=
"https://mallapi.oytour.com/api"
}
...
...
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