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
3158e4e5
Commit
3158e4e5
authored
Jan 23, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
760bfb9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
store.js
api/store.js
+6
-2
myInfo.vue
pages/my/myInfo.vue
+9
-2
No files found.
api/store.js
View file @
3158e4e5
...
...
@@ -30,4 +30,9 @@ export const getList=(data)=>{
export
const
deviceRun
=
(
data
)
=>
{
let
url
=
`/device/openOrClose`
return
http
.
post
(
url
,
data
)
}
\ No newline at end of file
}
export
const
deviceCtrlAuth
=
()
=>
{
let
url
=
`/store/storeListByConsumer`
return
http
.
get
(
url
)
}
pages/my/myInfo.vue
View file @
3158e4e5
...
...
@@ -82,7 +82,7 @@
<text
class=
"text-title"
>
联系我们
</text>
</view>
</view>
<view
v-if=
"
userInfo.roleType >= 2
"
class=
"cu-item arrow"
@
tap=
"onHandle(5)"
>
<view
v-if=
"
deviceRole
"
class=
"cu-item arrow"
@
tap=
"onHandle(5)"
>
<view
class=
"content"
>
<image
:src=
"assetsPath+'/my_list_4.png'"
class=
"png"
mode=
"aspectFit"
></image>
<text
class=
"text-title"
>
设备控制
</text>
...
...
@@ -129,6 +129,7 @@
import
{
getUserInfo
,
loginOut
,
systemConfig
}
from
"@/api/index.js"
import
config
from
"@/config/index.config"
import
LoginPop
from
"@/components/login/login"
import
{
deviceCtrlAuth
}
from
'@/api/store.js'
export
default
{
components
:
{
...
...
@@ -180,7 +181,8 @@
password
:
''
},
servicePhone
:
''
,
userName
:
''
userName
:
''
,
deviceRole
:
false
}
},
onShow
()
{
...
...
@@ -240,6 +242,11 @@
this
.
userName
=
this
.
userInfo
.
phone
.
slice
(
-
4
);
uni
.
setStorageSync
(
'userInfo'
,
this
.
userInfo
)
this
.
loginStatus
=
true
;
deviceCtrlAuth
().
then
(
result
=>
{
if
(
result
.
data
.
code
==
200
&&
result
.
data
.
data
.
length
){
this
.
deviceRole
=
true
}
})
}
})
},
...
...
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