Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
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
pseer
gxpt_wechat
Commits
af5ed6ad
Commit
af5ed6ad
authored
Jan 06, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理wifi连接相关
parent
a69592a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
20 deletions
+47
-20
myInfo.vue
pages/my/myInfo.vue
+47
-20
No files found.
pages/my/myInfo.vue
View file @
af5ed6ad
...
...
@@ -120,7 +120,7 @@
<
script
>
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
{
getUserInfo
,
loginOut
}
from
"@/api/index.js"
import
{
getUserInfo
,
loginOut
,
systemConfig
}
from
"@/api/index.js"
import
config
from
"@/config/index.config"
import
LoginPop
from
"@/components/login/login"
...
...
@@ -178,8 +178,8 @@
}
},
onShow
()
{
this
.
onGetSysConfig
();
this
.
onCheckUserLogin
();
this
.
onGetSysConfig
();
},
onLoad
()
{
// 隐藏原生的tabbar
...
...
@@ -188,6 +188,21 @@
methods
:
{
onGetSysConfig
(){
let
sysConfigList
=
uni
.
getStorageSync
(
'sysConfig'
)
if
(
!
sysConfigList
){
systemConfig
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
setStorage
({
key
:
'sysConfig'
,
data
:
res
.
data
.
rows
,
success
:
()
=>
{
this
.
onGetSysConfig
();
}
})
}
})
return
;
}
let
wifi
=
sysConfigList
.
find
(
item
=>
item
.
configKey
===
'wechat.wifi'
)
if
(
wifi
){
let
w
=
wifi
.
configValue
.
split
(
';'
)
...
...
@@ -254,7 +269,15 @@
phoneNumber
:
this
.
servicePhone
})
}
else
if
(
val
==
2
){
this
.
$refs
.
popup
.
open
()
if
(
this
.
wifiData
.
name
&&
this
.
wifiData
.
password
){
this
.
$refs
.
popup
.
open
()
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"无法进行WIFI连接"
})
}
}
else
if
(
val
===
3
){
uni
.
navigateTo
({
url
:
'/pages/storeList/storeList'
...
...
@@ -274,24 +297,28 @@
})
},
onConnectWifi
(){
uni
.
connectWifi
({
SSID
:
this
.
wifiData
.
name
,
BSSID
:
this
.
wifiData
.
name
,
password
:
this
.
wifiData
.
password
,
success
:
()
=>
{
uni
.
showToast
({
icon
:
"none"
,
title
:
'连接成功'
})
},
fail
:
(
err
)
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
err
.
errMsg
uni
.
startWifi
({
success
:()
=>
{
uni
.
connectWifi
({
SSID
:
this
.
wifiData
.
name
,
BSSID
:
this
.
wifiData
.
name
,
password
:
this
.
wifiData
.
password
,
success
:
()
=>
{
uni
.
showToast
({
icon
:
"none"
,
title
:
'连接成功'
})
},
fail
:
(
err
)
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
"WIFI连接失败"
})
},
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
}
})
},
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
}
})
},
...
...
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