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
Expand all
Show 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
This diff is collapsed.
Click to expand it.
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,6 +66,17 @@
<u-action-sheet
:actions=
"list"
@
close=
'close'
@
select=
"selectClick"
closeOnClickOverlay
round=
'6'
:show=
"show"
></u-action-sheet>
</div>
<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
>
...
...
@@ -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
...
...
@@ -96,6 +96,17 @@
<!--
<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"
>
<view
class=
"love_car_list"
>
...
...
@@ -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