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
1a86080f
Commit
1a86080f
authored
Dec 28, 2022
by
肖健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序首页悬浮更改为动态、首页商品更改为动态、首页增加视频播放、新增小程序广告
parent
5c3d38ea
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
288 additions
and
195 deletions
+288
-195
api.js
common/api/api.js
+1
-0
requestConfig.js
common/request/requestConfig.js
+2
-1
main.js
main.js
+2
-0
home-new.vue
pages/home-new.vue
+147
-104
main.vue
pages/main.vue
+4
-12
moveCar.vue
pages/moveCar.vue
+3
-24
personal.vue
pages/personal.vue
+3
-24
shop.vue
pages/shop.vue
+6
-26
oneMoveCar.vue
pagesB/pages/move-car/oneMoveCar.vue
+43
-2
scan.vue
pagesB/pages/move-car/scan.vue
+42
-1
search.vue
pagesC/pages/shop/search.vue
+1
-1
utils.js
utils/utils.js
+34
-0
No files found.
common/api/api.js
View file @
1a86080f
// const baseUrl = 'https://r.ucaret.cn/test-api'; // 开发地/址
// const baseUrl = 'http://5thcg5.natappfree.cc'; // 开发地址
const
baseUrl
=
'https://movecar.jd.com'
;
// 线上地址
// const baseUrl = 'http://192.168.0.107:8080'; // 线上地址
const
httpRequest
=
(
opts
,
data
)
=>
{
let
httpDefaultOpts
=
{
url
:
baseUrl
+
opts
.
url
,
...
...
common/request/requestConfig.js
View file @
1a86080f
...
...
@@ -3,8 +3,9 @@ import request from "./request";
// let baseUrl = 'https://jdorder.uzosp.com/'; // 正式服务域名接口
// let baseUrl = 'https://r.ucaret.cn/test-api'; // 开发地/址
let
baseUrl
=
'https://movecar.jd.com'
;
// 测试服务域名接口
// let baseUrl = 'http://192.168.0.107:8080'; // 测试服务域名接口
//可以new多个request来支持多个域名请求
...
...
main.js
View file @
1a86080f
...
...
@@ -6,6 +6,7 @@ Vue.prototype.$store = store;
import
http
from
"./common/api/api.js"
import
$http
from
'@/common/request/requestConfig'
;
import
{
goToLocation
}
from
'@/utils/utils.js'
Vue
.
config
.
productionTip
=
false
import
ActiveForm
from
"@/common/active-form/active-form"
;
...
...
@@ -13,6 +14,7 @@ import scrollList from "@/common/scroll-list/scroll-list";
Vue
.
use
(
uView
);
Vue
.
prototype
.
http
=
http
Vue
.
prototype
.
$http
=
$http
Vue
.
prototype
.
$goToLocation
=
goToLocation
// 订阅消息模板id
Vue
.
prototype
.
nc_templateid
=
'59-hfHg3CnDvgVEnjqxiHRFwpABehc5lZxHQeUctlrg'
...
...
pages/home-new.vue
View file @
1a86080f
...
...
@@ -18,27 +18,44 @@
</view>
<view
class=
"banner"
>
<view
class=
"banner-img"
>
<image
src=
"http://jdnc-oss.uzosp.com/2022/06/23/d868a11f485448efb960d436a2159d78.png"
></image>
<view
class=
"left"
@
click=
"goJdShop(1)"
>
<view
class=
"banner-btn"
>
<image
src=
"../static/index/ban-btn.png"
></image>
<text>
立即购买
</text>
</view>
</view>
<view
class=
"right"
@
click=
"goJdShop(2)"
>
<view
class=
"banner-btn"
>
<image
src=
"../static/index/ban-btn.png"
></image>
<text>
立即购买
</text>
</view>
<view
:class=
"indexCommodityList.length == 2 ? 'banner-bg' : 'banner-bg banner-bg-1'"
v-if=
"indexCommodityList && indexCommodityList.length
<
=
2
"
>
<image
src=
"http://jdnc-oss.uzosp.com/2022/12/28/b1679b5da1b84fa1827039fe4fadd91c.png"
></image>
<view
class=
"item"
@
click=
"goJdShop(item)"
v-for=
"(item, i) in indexCommodityList"
:key=
"i"
>
<image
:src=
"item.mainImgUrl"
></image>
<view
class=
"banner-btn-bg"
>
<view
class=
"banner-btn"
>
<image
src=
"../static/index/ban-btn.png"
></image>
<text>
立即购买
</text>
</view>
</view>
</view>
</view>
<view
class=
"banner-other"
>
<view
@
click=
"goShopH5(2)"
>
<image
src=
"https://nuoche.s3.cn-north-1.jdcloud-oss.com/2022/10/14/eb67b0d88bd24f71a04b6a939ef3bf74.png"
></image>
<view
v-else
>
<view
scroll-x=
"true"
class=
"banner-bg"
>
<image
src=
"http://jdnc-oss.uzosp.com/2022/12/28/b1679b5da1b84fa1827039fe4fadd91c.png"
></image>
<scroll-view
:scroll-x=
"true"
:enable-flex=
"true"
:show-scrollbar=
"false"
:scroll-with-animation=
"true"
style=
"width:100%;white-space: nowrap;"
>
<view
class=
"item"
style=
"display: inline-flex;margin-right: 15rpx;"
@
click=
"goJdShop(item)"
v-for=
"(item, i) in indexCommodityList"
:key=
"i"
>
<image
:src=
"item.mainImgUrl"
></image>
<view
class=
"banner-btn-bg"
>
<view
class=
"banner-btn"
>
<image
src=
"../static/index/ban-btn.png"
></image>
<text>
立即购买
</text>
</view>
</view>
</view>
</scroll-view>
</view>
<view
@
click=
"goShopH5(1)"
>
<image
src=
"https://nuoche.s3.cn-north-1.jdcloud-oss.com/2022/10/14/672f38dadb0f4eacb486af28fe4fe762.png"
></image>
</view>
<view
class=
"banner-other"
v-if=
"levitationList && levitationList.length > 0"
>
<view
v-for=
"(item, i) in levitationList"
:key=
"i"
@
click=
"$goToLocation(item)"
>
<view
v-if=
"i !== 0"
style=
"margin-top: 50rpx;"
>
<u--image
:src=
"item.imageUrl"
width=
"160rpx"
height=
"120rpx"
></u--image>
</view>
<view
v-else
>
<u--image
:src=
"item.imageUrl"
width=
"160rpx"
height=
"120rpx"
></u--image>
</view>
</view>
</view>
<u-gap
bgColor=
"transparent"
height=
"20"
></u-gap>
...
...
@@ -47,9 +64,14 @@
</view>
<view
class=
"bg-img"
>
<!-- bg-img2为视频播放 -->
<view
class=
"bg-img2"
v-if=
"videoObj"
>
<image
src=
"http://jdnc-oss.uzosp.com/2022/12/27/6a1ef562576f4e86a98118c9e343b9da.png"
></image>
<video
id=
"myvideo"
@
fullscreenchange=
"screenChange"
:src=
"videoObj.videoLink"
:poster=
"videoObj.thumbnail"
controls
>
</video>
</view>
<!-- bg-img没有视频播放,纯图片 -->
<view
class=
"bg-img"
v-else
>
<image
src=
"http://jdnc-oss.uzosp.com/2022/06/15/079440f5eea541bba67ea3d5f8097162.png"
></image>
</view>
...
...
@@ -95,39 +117,23 @@
timerNum
:
3
,
timer
:
null
,
clickState
:
false
,
// 立即领取 防抖
videoObj
:
null
,
//视频对象
videoContext
:
null
,
levitationList
:
[],
//悬浮数组对象
indexCommodityList
:
[],
};
},
methods
:
{
goShopH5
(
index
){
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
)
{
uni
.
setStorageSync
(
'jdNavto'
,
index
)
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
})
return
;
}
let
url
;
if
(
index
==
1
){
url
=
'https://pro.m.jd.com/mall/active/3L2hs3R3aibYmosCRzA2Rp5z8pTR/index.html?babelChannel=ttt1'
}
else
{
url
=
'https://jarvis.m.jd.com/start?source=2'
screenChange
(
e
)
{
if
(
!
e
.
detail
.
fullScreen
)
{
this
.
videoContext
.
stop
()
}
// uni.setStorageSync('h5url',url)
util
.
navigateToH5
({
page
:
url
})
},
// 跳转 其他小程序页面
goJdShop
(
index
){
let
sku
;
if
(
index
==
1
){
sku
=
100025676633
}
else
{
sku
=
100025676611
}
console
.
log
(
sku
,
777777777
)
goJdShop
(
d
){
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku='
+
sku
,
// 目标小程序的页面路径
path
:
d
.
link
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
...
...
@@ -288,31 +294,55 @@
}
})
},
async
getVideoList
()
{
await
this
.
$http
.
request
({
url
:
'/app/index/video/1'
,
method
:
'get'
,
data
:{
},
}).
then
(
res
=>
{
if
(
res
&&
res
.
length
>
0
)
{
this
.
videoObj
=
res
[
0
]
}
})
},
getVideoList
()
{
this
.
$http
.
request
({
url
:
'/app/index/levitation/1'
,
method
:
'get'
,
data
:{
},
}).
then
(
res
=>
{
if
(
res
&&
res
.
length
>
0
)
{
this
.
levitationList
=
res
}
else
{
this
.
levitationList
=
[]
}
})
},
//获取首页商品
getIndexCommodityList
()
{
this
.
$http
.
request
({
url
:
'/app/index/mall/index'
,
method
:
'get'
,
data
:{
},
}).
then
(
res
=>
{
if
(
res
&&
res
.
length
>
0
)
{
this
.
indexCommodityList
=
res
}
else
{
this
.
indexCommodityList
=
[]
}
})
},
// 轮播跳转其他页面
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
})
}
this
.
$goToLocation
(
item
)
},
// 获取爱车列表
getCarList
(){
...
...
@@ -351,6 +381,8 @@
created
()
{
this
.
getMoveCode
()
this
.
getRotationList
()
this
.
getVideoList
()
this
.
getIndexCommodityList
()
},
mounted
()
{
setTimeout
(()
=>
{
...
...
@@ -361,6 +393,11 @@
uni
.
setNavigationBarTitle
({
title
:
'京东汽车挪车牌'
});
// 获取 video 上下文 videoContext 对象
this
.
videoContext
=
uni
.
createVideoContext
(
'myvideo'
)
// 进入全屏状态
this
.
videoContext
.
requestFullScreen
()
}
};
</
script
>
...
...
@@ -435,10 +472,8 @@
width
:
100%
;
margin-top
:
70rpx
;
position
:
relative
;
.banner-
im
g
,
.banner-
b
g
,
.banner-btn
{
margin
:
0
auto
;
position
:
relative
;
image
{
position
:
absolute
;
top
:
0
;
left
:
0
;
...
...
@@ -448,58 +483,66 @@
position
:
relative
;
}
}
.banner-img
{
.banner-btn-bg
{
display
:
flex
;
justify-content
:
center
;
width
:
100%
;
}
.banner-bg
{
width
:
710rpx
;
height
:
542rpx
;
box-sizing
:
border-box
;
padding
:
100rpx
80rpx
0
;
display
:flex
;
justify-content
:
space-between
;
.left
{
width
:
260rpx
;
height
:
360rpx
;
}
.right
{
width
:
260rpx
;
height
:
360rpx
;
}
>
view
{
.banner-btn
{
width
:
200rpx
;
height
:
66rpx
;
font-weight
:
bold
;
color
:
#674600
;
top
:
280rpx
;
left
:
-2rpx
;
font-size
:
30rpx
;
text-align
:
center
;
line-height
:
66rpx
;
}
}
.item
{
width
:
268rpx
;
height
:
366rpx
;
}
.banner-btn
{
width
:
200rpx
;
height
:
66rpx
;
font-weight
:
bold
;
color
:
#674600
;
top
:
280rpx
;
left
:
-2rpx
;
font-size
:
30rpx
;
text-align
:
center
;
line-height
:
66rpx
;
}
}
.banner-bg-1
{
justify-content
:
center
;
}
.banner-other
{
position
:
absolute
;
right
:
-22rpx
;
top
:
-80rpx
;
z-index
:
100
;
>
view
{
&
:first-child
{
margin-left
:
34rpx
;
width
:
120rpx
;
height
:
112rpx
;
}
&
:last-child
{
margin-top
:
100rpx
;
width
:
172rpx
;
height
:
140rpx
;
}
image
{
width
:
100%
;
height
:
100%
;
}
}
}
}
.bg-img
{
width
:
100%
;
width
:
750rpx
;
image
{
width
:
100%
;
height
:
4420rpx
;
width
:
750rpx
;
height
:
4420rpx
;
}
}
.bg-img2
{
width
:
750rpx
;
position
:
relative
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
image
{
width
:
750rpx
;
height
:
4959rpx
;
}
video
{
position
:
absolute
;
top
:
660rpx
;
width
:
620rpx
;
height
:
310rpx
;
}
}
// 弹框
.pooup-get-coupon
{
...
...
pages/main.vue
View file @
1a86080f
...
...
@@ -364,19 +364,11 @@
})
}
// 判断是否有京东跳转
let
jdNav
to
=
uni
.
getStorageSync
(
'jdNavto
'
)
let
jdNav
ToObj
=
uni
.
getStorageSync
(
'jdNavToObj
'
)
if
(
jdNavto
){
let
url
;
if
(
jdNavto
==
1
){
url
=
'https://pro.m.jd.com/mall/active/3L2hs3R3aibYmosCRzA2Rp5z8pTR/index.html?babelChannel=ttt1'
}
else
{
url
=
'https://jarvis.m.jd.com/start?source=2'
}
// uni.setStorageSync('h5url',url)
util
.
navigateToH5
({
page
:
url
})
uni
.
removeStorageSync
(
'jdNavto'
)
if
(
jdNavToObj
){
uni
.
removeStorageSync
(
'jdNavToObj'
)
this
.
$goToLocation
(
item
)
}
}
...
...
pages/moveCar.vue
View file @
1a86080f
...
...
@@ -73,11 +73,11 @@
},
getRotationList
()
{
let
opts
=
{
url
:
'/app/index/
carouse/3
'
,
url
:
'/app/index/
adv/1
'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
let
data
=
[]
data
=
res
.
data
.
data
let
imgList
=
[]
...
...
@@ -92,28 +92,7 @@
// 轮播跳转其他页面
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
})
}
this
.
$goToLocation
(
item
)
},
goUrl
(
vo
)
{
uni
.
removeStorageSync
(
'routerLogin'
)
...
...
pages/personal.vue
View file @
1a86080f
...
...
@@ -146,11 +146,11 @@
},
getRotationList
()
{
let
opts
=
{
url
:
'/app/index/
carouse/4
'
,
url
:
'/app/index/
adv/2
'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
let
data
=
[]
data
=
res
.
data
.
data
let
imgList
=
[]
...
...
@@ -165,28 +165,7 @@
// 轮播跳转其他页面
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
})
}
this
.
$goToLocation
(
item
)
},
loginOut
()
{
this
.
$http
.
request
({
...
...
pages/shop.vue
View file @
1a86080f
...
...
@@ -19,7 +19,7 @@
<image
:src=
"getImage(vo.mainImgUrl)"
/>
</view>
<view
class=
"item2__title"
>
{{
vo
.
title
}}
</view>
<view
class=
"item2__price"
>
¥
{{
vo
.
currentPrice
/
100
}}
<text
style=
"font-size: 22rpx;"
>
起
</text></view>
<view
class=
"item2__price"
>
¥
{{
vo
.
currentPrice
/
100
}}
<text
v-if=
"vo.priceSuffixFlag"
style=
"font-size: 22rpx;"
>
起
</text></view>
</view>
</view>
</view>
...
...
@@ -34,8 +34,8 @@
{{
vo
.
title
}}
</view>
<view
class=
"one_item_price"
>
¥
{{
vo
.
currentPrice
/
100
}}
<text
style=
"font-size: 22rpx;margin-right:4rpx;"
>
起
</text>
<span
class=
"num__two"
>
¥
{{
vo
.
originalPrice
/
100
}}
</span>
¥
{{
vo
.
currentPrice
/
100
}}
<text
v-if=
"vo.priceSuffixFlag"
style=
"font-size: 22rpx;margin-right:4rpx;"
>
起
</text>
<span
class=
"num__two"
v-if=
"vo.originalPrice && vo.originalPrice > 0"
>
¥
{{
vo
.
originalPrice
/
100
}}
</span>
</view>
</view>
</view>
...
...
@@ -191,27 +191,7 @@ export default {
// 轮播跳转其他页面
goOtherLink
(
index
){
let
item
=
this
.
list3
[
index
]
let
link
=
item
.
link
;
if
(
link
)
{
if
(
item
.
remark
==
'jdh5'
)
{
// uni.navigateTo({
// url: '/pages/webview/webview?url=' + link
// })
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
})
}
this
.
$goToLocation
(
item
)
}
},
onReady
:
function
()
{
...
...
@@ -281,7 +261,7 @@ export default {
}
.one_item_price
{
font-size
:
2
4
rpx
;
font-size
:
2
6
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#E1251B
;
...
...
@@ -374,7 +354,7 @@ export default {
}
.item2__price
{
font-size
:
2
4
rpx
;
font-size
:
2
6
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#E1251B
;
...
...
pagesB/pages/move-car/oneMoveCar.vue
View file @
1a86080f
...
...
@@ -66,7 +66,18 @@
<u-action-sheet
:actions=
"list"
@
close=
'close'
@
select=
"selectClick"
closeOnClickOverlay
round=
'6'
:show=
"show"
></u-action-sheet>
</div>
</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>
</
template
>
<
script
>
...
...
@@ -120,10 +131,39 @@
notAllowPhoneReason
:
''
,
notAllowWechatReason
:
''
,
},
wxMaxNum
:
""
wxMaxNum
:
""
,
list5
:
[],
current
:
0
,
carouselFlag
:
false
,
}
},
methods
:
{
closeCarouselFlag
()
{
this
.
carouselFlag
=
false
},
// 轮播跳转其他页面
goOtherLink
(
index
)
{
let
item
=
this
.
list5
[
index
]
this
.
$goToLocation
(
item
)
},
getRotationList
()
{
let
opts
=
{
url
:
'/app/index/adv/4'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
let
data
=
[]
data
=
res
.
data
.
data
let
imgList
=
[]
data
.
forEach
(
e
=>
{
imgList
.
push
(
e
)
})
this
.
list5
=
imgList
this
.
carouselFlag
=
true
}
})
},
goToIndex
()
{
uni
.
navigateTo
({
url
:
'/pages/main'
...
...
@@ -399,6 +439,7 @@
this
.
moveCode
=
e
.
scene
//console.log('scene: ' + scene);
}
this
.
getRotationList
()
},
onShow
()
{
this
.
getCarNumber
()
...
...
pagesB/pages/move-car/scan.vue
View file @
1a86080f
...
...
@@ -95,6 +95,17 @@
</view>
<!--
<view
class=
"use__text"
@
click=
"gotoExplanation"
>
使用说明
</view>
-->
<view
class=
"use__text"
@
click=
"goArticle(2)"
>
挪车牌使用安全说明
</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>
<!-- 爱车选择弹框 -->
<u-popup
:show=
"selectCar"
mode=
"bottom"
round=
"10"
@
close=
"selectCar = false"
>
...
...
@@ -171,10 +182,39 @@ export default {
},
// 验证码
clickStatus
:
false
,
// 节流
key
:
null
,
// 加密key
iv
:
null
// 加密iv
iv
:
null
,
// 加密iv
list5
:
[],
current
:
0
,
carouselFlag
:
false
,
}
},
methods
:
{
closeCarouselFlag
()
{
this
.
carouselFlag
=
false
},
// 轮播跳转其他页面
goOtherLink
(
index
)
{
let
item
=
this
.
list5
[
index
]
this
.
$goToLocation
(
item
)
},
getRotationList
()
{
let
opts
=
{
url
:
'/app/index/adv/3'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
let
data
=
[]
data
=
res
.
data
.
data
let
imgList
=
[]
data
.
forEach
(
e
=>
{
imgList
.
push
(
e
)
})
this
.
list5
=
imgList
this
.
carouselFlag
=
true
}
})
},
changeBtn
()
{
this
.
checked
=
!
this
.
checked
;
},
...
...
@@ -424,6 +464,7 @@ export default {
onLoad
(
option
)
{
this
.
moveCode
=
option
.
moveCode
this
.
getKey
()
this
.
getRotationList
()
}
}
</
script
>
...
...
pagesC/pages/shop/search.vue
View file @
1a86080f
...
...
@@ -24,7 +24,7 @@
</div>
<div
class=
"money__num"
>
<text
class=
"num__one"
>
¥
{{
vo
.
currentPrice
/
100
}}
</text>
<text
class=
"num__two"
>
¥
{{
vo
.
originalPrice
/
100
}}
</text>
<text
class=
"num__two"
v-if=
"vo.originalPrice && vo.originalPrice > 0"
>
¥
{{
vo
.
originalPrice
/
100
}}
</text>
</div>
</div>
</div>
...
...
utils/utils.js
0 → 100644
View file @
1a86080f
import
util
from
'@/pages/login/util.js'
export
function
goToLocation
(
item
)
{
let
token
=
uni
.
getStorageSync
(
'userToken'
)
if
(
!
token
)
{
uni
.
setStorageSync
(
'jdNavToObj'
,
item
)
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
})
return
}
let
url
//H5链接,判断链接是否设置
if
(
item
.
busType
==
1
&&
item
.
link
){
util
.
navigateToH5
({
page
:
url
})
}
//小程序链接,需要判断链接和appId是否都设置
if
(
item
.
busType
==
2
&&
item
.
appId
!=
null
&&
item
.
link
){
uni
.
navigateToMiniProgram
({
appId
:
item
.
appId
,
// 跳转目标小程序的id
path
:
item
.
link
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
:(
res
)
=>
{
// 打开成功
},
fail
:()
=>
{
}
})
}
}
\ No newline at end of file
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