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
5c07fe67
Commit
5c07fe67
authored
May 11, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
精选商城修改
parent
8699eade
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
77 deletions
+111
-77
main.vue
pages/main.vue
+10
-1
shop.vue
pages/shop.vue
+101
-76
No files found.
pages/main.vue
View file @
5c07fe67
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view
class=
"main_content"
>
<view
class=
"main_content"
>
<index
v-if=
"tab=='index'"
></index>
<index
v-if=
"tab=='index'"
></index>
<moveCar
v-if=
"tab=='moveCar'"
></moveCar>
<moveCar
v-if=
"tab=='moveCar'"
></moveCar>
<shop
v-if=
"tab=='shop'"
></shop>
<shop
v-if=
"tab=='shop'"
ref=
"shop"
:page=
"page"
></shop>
<personal
v-if=
"tab=='personal'"
ref=
"personal"
></personal>
<personal
v-if=
"tab=='personal'"
ref=
"personal"
></personal>
<u-gap
bgColor=
"transparent"
height=
"055"
></u-gap>
<u-gap
bgColor=
"transparent"
height=
"055"
></u-gap>
<view
class=
"tabbar"
>
<view
class=
"tabbar"
>
...
@@ -32,6 +32,7 @@ export default {
...
@@ -32,6 +32,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
tab
:
"index"
,
tab
:
"index"
,
page
:
1
}
}
},
},
computed
:
{
computed
:
{
...
@@ -47,6 +48,14 @@ export default {
...
@@ -47,6 +48,14 @@ export default {
this
.
$refs
.
personal
.
getUserInfo
();
this
.
$refs
.
personal
.
getUserInfo
();
}
}
},
},
onReachBottom
(){
let
refresh
=
uni
.
getStorageSync
(
"refresh"
)
if
(
refresh
==
0
){
if
(
this
.
tab
==
'shop'
){
this
.
page
++
;
}
}
},
methods
:
{
methods
:
{
tabChange
(
index
)
{
tabChange
(
index
)
{
let
that
=
this
let
that
=
this
...
...
pages/shop.vue
View file @
5c07fe67
...
@@ -25,21 +25,21 @@
...
@@ -25,21 +25,21 @@
</div>
</div>
<div
class=
"shop__list__one"
>
<div
class=
"shop__list__one"
>
<div
class=
"view__title"
>
车主精选 养车必备
</div>
<div
class=
"view__title"
>
车主精选 养车必备
</div>
<scroll-list
ref=
"list"
:option=
"option"
@
load=
"load"
@
refresh=
"refresh
"
>
<view
class=
"owner-select"
v-if=
"boutiqueMallList.length > 0
"
>
<div
class=
"list__one__items"
v-if=
"boutiqueMallList.length>0
"
>
<view
class=
"one_item"
v-for=
"(vo,inx) in boutiqueMallList"
:key=
"inx"
@
click=
"goDetail(vo.id)
"
>
<div
class=
"one__item"
v-for=
"(vo,inx) in boutiqueMallList"
:key=
"inx"
@
click=
"goDetail(vo.id)
"
>
<view
class=
"one_item_img
"
>
<div
class=
"one__item__img"
>
<image
:src=
"getImage(vo.mainImgUrl)"
/
>
<image
:src=
"getImage(vo.mainImgUrl)"
/
>
</view
>
</div
>
<view
class=
"one_item_title"
>
<div
class=
"one__item__title"
>
{{
vo
.
title
}}
{{
vo
.
title
}}
</view>
</div
>
<view
class=
"one_item_price"
>
<div
class=
"one__item__price"
>
¥
{{
vo
.
currentPrice
/
100
}}
¥
{{
vo
.
currentPrice
/
100
}}
<span
class=
"num__two"
>
¥
{{
vo
.
originalPrice
/
100
}}
</span>
<span
class=
"num__two"
>
¥
{{
vo
.
originalPrice
/
100
}}
</span>
</div
>
</view
>
</div
>
</view
>
</div
>
</view
>
</scroll-list
>
<u-loadmore
:status=
"loading"
v-if=
"boutiqueMallList.length > 0"
/
>
</div>
</div>
</view>
</view>
<u-gap
bgColor=
"transparent"
height=
"60"
></u-gap>
<u-gap
bgColor=
"transparent"
height=
"60"
></u-gap>
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:[
"page"
],
data
()
{
data
()
{
return
{
return
{
isShow
:
false
,
isShow
:
false
,
...
@@ -71,8 +72,19 @@ export default {
...
@@ -71,8 +72,19 @@ export default {
mallList
:
[],
mallList
:
[],
//精品商品
//精品商品
boutiqueMallList
:
[],
boutiqueMallList
:
[],
loading
:
"loadmore"
}
}
},
},
watch
:{
page
(
newVal
,
oldVal
){
if
(
newVal
>
oldVal
){
this
.
loading
=
"loading"
setTimeout
(()
=>
{
this
.
getBoutiqueMallList
()
},
1000
)
}
}
},
methods
:
{
methods
:
{
scroll
:
function
(
e
)
{
scroll
:
function
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
...
@@ -166,10 +178,22 @@ export default {
...
@@ -166,10 +178,22 @@ export default {
method
:
'get'
method
:
'get'
};
};
this
.
http
.
httpTokenRequest
(
opts
,
{
this
.
http
.
httpTokenRequest
(
opts
,
{
classification
:
"2"
classification
:
"2"
,
pageSize
:
10
,
pageNum
:
this
.
page
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
boutiqueMallList
=
res
.
data
.
data
.
rows
let
data
=
res
.
data
.
data
.
rows
;
data
.
forEach
(
elem
=>
{
this
.
boutiqueMallList
.
push
(
elem
)
})
if
(
data
.
length
<
10
){
uni
.
setStorageSync
(
'refresh'
,
1
)
this
.
loading
=
"nomore"
}
else
{
uni
.
setStorageSync
(
'refresh'
,
0
)
this
.
loading
=
"loadmore"
}
}
}
})
})
},
},
...
@@ -209,7 +233,7 @@ export default {
...
@@ -209,7 +233,7 @@ export default {
},
200
);
},
200
);
this
.
getMallList
()
this
.
getMallList
()
this
.
getRotationList
()
this
.
getRotationList
()
//
this.getBoutiqueMallList()
this
.
getBoutiqueMallList
()
}
}
};
};
</
script
>
</
script
>
...
@@ -219,73 +243,74 @@ export default {
...
@@ -219,73 +243,74 @@ export default {
height
:
100%
;
height
:
100%
;
.shop__list__one
{
.shop__list__one
{
padding
:
0
30rpx
;
padding
:
0
30rpx
40rpx
;
background
:
#f9f9f9
;
background
:
#f9f9f9
;
.list__one__items
{
.owner-select
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
.one_
_item
{
.one
_item
{
width
:
48%
;
width
:
48%
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
box-shadow
:
0rpx
0rpx
28rpx
1rpx
rgba
(
232
,
232
,
232
,
0
.2
);
box-shadow
:
0rpx
0rpx
28rpx
1rpx
rgba
(
232
,
232
,
232
,
0
.2
);
border-radius
:
20rpx
;
border-radius
:
20rpx
;
margin-bottom
:
30rpx
;
margin-bottom
:
30rpx
;
.one__item_
_img
{
.one_item
_img
{
width
:
100%
;
width
:
100%
;
height
:
320rpx
;
height
:
320rpx
;
background
:
#FFD4D4
;
background
:
#FFD4D4
;
border-radius
:
20rpx
;
border-radius
:
20rpx
;
image
{
image
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
border-radius
:
20rpx
;
border-radius
:
20rpx
;
}
}
}
}
.one__item_
_title
{
.one_item
_title
{
font-size
:
32rpx
;
font-size
:
32rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
margin
:
20rpx
0
;
margin
:
20rpx
0
;
text-indent
:
20rpx
;
text-indent
:
20rpx
;
margin-bottom
:
10rpx
;
margin-bottom
:
10rpx
;
white-space
:
nowrap
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.one__item_
_price
{
.one_item
_price
{
font-size
:
24rpx
;
font-size
:
24rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#E1251B
;
color
:
#E1251B
;
text-indent
:
20rpx
;
text-indent
:
20rpx
;
padding-bottom
:
20rpx
;
padding-bottom
:
20rpx
;
span
{
span
{
font-size
:
20rpx
;
font-size
:
20rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#999999
;
color
:
#999999
;
}
}
}
}
}
}
}
}
}
}
.my__search
{
.my__search
{
padding
:
30rpx
;
padding
:
30rpx
;
}
}
.view__title
{
.view__title
{
font-size
:
38rpx
;
font-size
:
38rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
...
...
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