Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
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
Administrator
jd-vx-app
Commits
5c3d38ea
Commit
5c3d38ea
authored
Dec 23, 2022
by
肖健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加广告
parent
1fea7c1c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
2 deletions
+128
-2
moveCar.vue
pages/moveCar.vue
+63
-0
personal.vue
pages/personal.vue
+65
-2
close.png
static/my/close.png
+0
-0
No files found.
pages/moveCar.vue
View file @
5c3d38ea
...
...
@@ -22,11 +22,22 @@
</view>
</view>
</view>
<view
v-if=
"carouselFlag"
style=
"width: 700rpx;margin: 0 auto;position: relative;"
>
<u-swiper
radius=
"12rpx"
:height=
"120"
:list=
"list5"
circular
@
change=
"e => current = e.current"
:autoplay=
"true"
keyName=
"imageUrl"
@
click=
"goOtherLink"
>
</u-swiper>
<view
style=
"position: absolute;right: 10rpx; top:10rpx;z-index: 99999;"
>
<u--image
src=
"/static/my/close.png"
width=
"12px"
height=
"12px"
@
click=
"closeCarouselFlag"
></u--image>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
util
from
'@/pages/login/util.js'
export
default
{
data
()
{
return
{
...
...
@@ -51,9 +62,59 @@
},
],
scanClick
:
true
,
//扫一扫节流
list5
:
[],
current
:
0
,
carouselFlag
:
false
,
}
},
methods
:
{
closeCarouselFlag
()
{
this
.
carouselFlag
=
false
},
getRotationList
()
{
let
opts
=
{
url
:
'/app/index/carouse/3'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
data
=
[]
data
=
res
.
data
.
data
let
imgList
=
[]
data
.
forEach
(
e
=>
{
imgList
.
push
(
e
)
})
this
.
list5
=
imgList
this
.
carouselFlag
=
true
}
})
},
// 轮播跳转其他页面
goOtherLink
(
index
)
{
let
item
=
this
.
list5
[
index
]
let
link
=
item
.
link
;
if
(
link
)
{
if
(
item
.
remark
==
'jdh5'
)
{
// uni.navigateTo({
// url: '/pages/webview/webview?url=' + link
// })
let
url
;
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
)
{
uni
.
setStorageSync
(
'jdNavto'
,
1
)
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
})
return
;
}
util
.
navigateToH5
({
page
:
link
})
return
}
uni
.
navigateTo
({
url
:
link
})
}
},
goUrl
(
vo
)
{
uni
.
removeStorageSync
(
'routerLogin'
)
uni
.
setStorageSync
(
'routerLogin'
,
vo
.
url
)
...
...
@@ -142,6 +203,8 @@
setTimeout
(()
=>
{
this
.
show
=
true
},
100
);
this
.
getRotationList
()
},
};
</
script
>
...
...
pages/personal.vue
View file @
5c3d38ea
...
...
@@ -54,14 +54,26 @@
</view>
</view>
<view
class=
"ps__btn"
v-if=
"token"
@
click=
"loginOut"
>
退出登录
</view>
<u-gap
bgColor=
"transparent"
v-if=
"carouselFlag"
height=
"20"
></u-gap>
<view
v-if=
"carouselFlag"
style=
"width: 700rpx;margin: 0 auto;position: relative;"
>
<u-swiper
radius=
"12rpx"
:height=
"120"
:list=
"list5"
circular
@
change=
"e => current = e.current"
:autoplay=
"true"
keyName=
"imageUrl"
@
click=
"goOtherLink"
>
</u-swiper>
<view
style=
"position: absolute;right: 10rpx; top:10rpx;z-index: 99999;"
>
<u--image
src=
"/static/my/close.png"
width=
"12px"
height=
"12px"
@
click=
"closeCarouselFlag"
></u--image>
</view>
</view>
</view>
<u-gap
bgColor=
"transparent"
height=
"70"
></u-gap>
</view>
</
template
>
<
script
>
import
util
from
'@/pages/login/util.js'
let
plugin
=
requirePlugin
(
'loginPlugin'
);
export
default
{
export
default
{
data
()
{
return
{
show
:
false
,
...
...
@@ -122,10 +134,60 @@ export default {
userInfo
:
null
,
//头像
avatar
:
''
,
token
:
null
token
:
null
,
list5
:
[],
current
:
0
,
carouselFlag
:
false
,
}
},
methods
:
{
closeCarouselFlag
()
{
this
.
carouselFlag
=
false
},
getRotationList
()
{
let
opts
=
{
url
:
'/app/index/carouse/4'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
data
=
[]
data
=
res
.
data
.
data
let
imgList
=
[]
data
.
forEach
(
e
=>
{
imgList
.
push
(
e
)
})
this
.
list5
=
imgList
this
.
carouselFlag
=
true
}
})
},
// 轮播跳转其他页面
goOtherLink
(
index
)
{
let
item
=
this
.
list5
[
index
]
let
link
=
item
.
link
;
if
(
link
)
{
if
(
item
.
remark
==
'jdh5'
)
{
// uni.navigateTo({
// url: '/pages/webview/webview?url=' + link
// })
let
url
;
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
)
{
uni
.
setStorageSync
(
'jdNavto'
,
1
)
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
})
return
;
}
util
.
navigateToH5
({
page
:
link
})
return
}
uni
.
navigateTo
({
url
:
link
})
}
},
loginOut
()
{
this
.
$http
.
request
({
url
:
'/logout'
,
...
...
@@ -336,6 +398,7 @@ export default {
if
(
this
.
token
){
this
.
getUserInfo
()
}
this
.
getRotationList
()
},
onReady
:
function
()
{
uni
.
setNavigationBarTitle
({
...
...
static/my/close.png
0 → 100644
View file @
5c3d38ea
205 Bytes
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