Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shop_mobile_uni
Project
Project
Details
Activity
Releases
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
郑秀明
shop_mobile_uni
Commits
015f4f4c
Commit
015f4f4c
authored
Sep 11, 2020
by
zhengxiuming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页优化
parent
447e663d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
13 deletions
+53
-13
goodslist.vue
pages/home/components/goodslist.vue
+1
-0
hotrecommd.vue
pages/home/components/hotrecommd.vue
+46
-12
promotion.vue
pages/home/components/promotion.vue
+5
-1
monthlyJoin.vue
pages/monthlyJoin/monthlyJoin.vue
+1
-0
No files found.
pages/home/components/goodslist.vue
View file @
015f4f4c
...
@@ -83,6 +83,7 @@
...
@@ -83,6 +83,7 @@
let
bgl
=
buy_goods_list
||
[];
let
bgl
=
buy_goods_list
||
[];
list
=
additional_goods_show
?
bgl
.
concat
(
goods_list
||
[]).
slice
(
0
,
goods_num
)
:
bgl
list
=
additional_goods_show
?
bgl
.
concat
(
goods_list
||
[]).
slice
(
0
,
goods_num
)
:
bgl
}
}
list
=
list
.
filter
((
item
)
=>
item
.
if_show
==
1
&&
item
.
closed
==
0
);
const
space
=
listType
-
list
.
length
%
listType
;
const
space
=
listType
-
list
.
length
%
listType
;
if
(
space
!==
listType
)
{
if
(
space
!==
listType
)
{
this
.
spaceArray
=
new
Array
(
space
);
this
.
spaceArray
=
new
Array
(
space
);
...
...
pages/home/components/hotrecommd.vue
View file @
015f4f4c
...
@@ -11,14 +11,14 @@
...
@@ -11,14 +11,14 @@
</view>
</view>
</view>
</view>
<view
class=
"hot_cate_list"
:style=
"[fixFlag ?
{'padding-right': '60rpx'} : null]">
<view
class=
"hot_cate_list"
:style=
"[fixFlag ?
{'padding-right': '60rpx'} : null]">
<text
class=
"hot_cate_item"
v-for=
"(item, key) in cate_list"
:key=
"key"
@
click=
"changeCate(
key)"
:class=
"key === hotIndex ? 'act' : ''"
v-if=
"item.goods_list.length
"
>
<text
class=
"hot_cate_item"
v-for=
"(item, key) in cate_list"
:key=
"key"
@
click=
"changeCate(
item, key)"
:class=
"key === hotIndex ? 'act' : ''
"
>
<text>
{{
item
.
cate_name
}}
</text>
<text>
{{
item
.
cate_name
}}
</text>
<text>
{{
item
.
sub_title
}}
</text>
<text>
{{
item
.
sub_title
}}
</text>
</text>
</text>
</view>
</view>
</view>
</view>
<view
v-for=
"(val, key) in cate_list"
:key=
"key"
v-if=
"key === hotIndex"
>
<view
v-for=
"(val, key) in cate_list"
:key=
"key"
v-if=
"key === hotIndex"
>
<view
v-if=
"val.goods_list"
class=
"flex_goods"
>
<view
v-if=
"val.goods_list
&& val.goods_list.length > 0
"
class=
"flex_goods"
>
<view
class=
"hot_goods_item"
v-for=
"(item, index) in val.goods_list"
:key=
"index"
>
<view
class=
"hot_goods_item"
v-for=
"(item, index) in val.goods_list"
:key=
"index"
>
<image
class=
"hot_goods_icon"
v-if=
"style_setting.angle_sign"
:src=
"style_setting.angle_sign_url"
></image>
<image
class=
"hot_goods_icon"
v-if=
"style_setting.angle_sign"
:src=
"style_setting.angle_sign_url"
></image>
<image
class=
"hot_goods_img"
:src=
"item.default_image || $noGoodsImg"
@
click=
"$jumpGoodDetail(item.goods_id)"
></image>
<image
class=
"hot_goods_img"
:src=
"item.default_image || $noGoodsImg"
@
click=
"$jumpGoodDetail(item.goods_id)"
></image>
...
@@ -58,18 +58,46 @@
...
@@ -58,18 +58,46 @@
fixFlag
:
false
fixFlag
:
false
}
}
},
},
mounted
()
{
mounted
(){
var
flag
=
true
;
if
(
this
.
wrapper_props
.
cate_list
){
this
.
cate_list
.
map
((
item
,
index
)
=>
{
this
.
cate_list
.
map
((
item
,
index
)
=>
{
if
(
item
.
goods_list
.
length
&&
flag
)
{
if
(
item
.
goods_list
&&
item
.
goods_list
.
length
>
0
)
{
this
.
hotIndex
=
index
;
let
temp
=
item
.
goods_list
.
filter
((
item
)
=>
item
.
if_show
==
1
&&
item
.
closed
==
0
)
;
flag
=
false
;
item
.
goods_list
=
temp
;
}
}
});
});
}
},
},
methods
:
{
methods
:
{
changeCate
(
index
)
{
changeCate
(
item
,
index
)
{
this
.
hotIndex
=
index
const
{
cate_id
}
=
item
;
const
{
sortType
}
=
this
.
wrapper_props
.
style_setting
;
this
.
hotIndex
=
index
;
let
_this
=
this
;
if
(
this
.
cate_list
[
index
].
goods_list
&&
this
.
cate_list
[
index
].
goods_list
.
length
>
0
){
return
;
}
uni
.
showLoading
({
title
:
'商品加载中~'
});
uni
.
request
({
url
:
'/uni/api/index/get_hot_recommd'
,
method
:
'POST'
,
dataType
:
'json'
,
data
:
{
cate_id
:
cate_id
,
goods_num
:
"10"
,
sort_type
:
sortType
?
sortType
.
toString
()
:
"2"
},
success
:
function
(
res
){
uni
.
hideLoading
();
const
{
code
,
data
}
=
res
.
data
;
let
goods
=
data
&&
data
.
filter
((
item
)
=>
item
.
if_show
==
1
&&
item
.
closed
==
0
)
if
(
code
===
0
){
_this
.
$set
(
_this
.
cate_list
[
index
],
'goods_list'
,
goods
||
[]);
return
;
}
_this
.
$set
(
_this
.
cate_list
[
index
],
'goods_list'
,
[]);
}
})
}
}
}
}
}
}
...
@@ -169,7 +197,13 @@
...
@@ -169,7 +197,13 @@
}
}
.nogoods {
.nogoods {
padding: 40rpx;
padding: 40rpx;
height: 400rpx;
line-height: 650rpx;
font-size: 30rpx;
color: #808080;
text-align: center;
text-align: center;
background: url(data:image;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAAC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4T06teghyAtchv4iv3IN4mcv0LEAISvEGHO/fk9exdxjryINmmAlSEZTVbEWLjDGpIiZoYHZkNOBAsHeBJCJO63ENO0RLbeYx8n3GTG1eUkKYmYq4bQP1pVVxVDR2SCBa4z7SaGisg1rlT+hGykIaLn7W4wG3UnCtVB15pJUOWGDgoiDh6GH0VHAiIKDrpKtAcY2hdxGFil4HLNi4RFRB92dITmRexeBDBByGeJbV1E4zeeBVPoDXSNi8g91UfwuvBC2bjImiLbX6r0MU3jImK/nYsQSh9TNC4S97EEE8uhKIkIEJRFxH5nISBSDi1M9qnwXWHbF8Hpl3nPMmgC06/DvYhzpWZ53bjIEjUYU4SXKCyUVvHY0RmbFxmPW04jiWU8S5B9T0yj1P7G6pruVrPS3AuSgAhTueDCfycKhw9bS78q7HO9flrklDuxqHpA57PH1Tph9fUzIm7RZxlqH5nOuUcbgHpaRBVeVf8QGwZ5rzHAhnpSxBRnwqrXCmdYsZfxNhItLHCbMcmLaAHlCaLqRQ+HG3YYBotFMBpNDkTm4QrkmMd6Ioi08AAfGbuZjJPUZZFjFEM+eBmq3M9rOfOfIqGuCKKN4rDC44TDaKJKIvwIpRnyKwUDMhMcFaqY6pZwBEAT0iITIIqyiANA1O+L+FdFWDwysR8V4S+LMHVgAh8VSQAzq2Iy1ljtliefqYJJpdVuOWdPuoKJwV3LZ4i47XinyQXeV2Soh8IPA0ixEWHBihc53ZnIjYuFNz62PRSackaoC3pUE/EYwXXhb/AoPTrH4DFJRXz6WJ7L9xEesoQRBQN1YrQJe6smdQQsnEdGHqk4D6R/TKrT6XQ6nU6n0+l0Op1Op9PpdDqdP8Y/VKwZFJ8Wj3oAAAAASUVORK5CYII=) no-repeat center;
background-size: 200rpx;
}
}
.flex_goods {
.flex_goods {
display: flex;
display: flex;
...
...
pages/home/components/promotion.vue
View file @
015f4f4c
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
data
()
{
data
()
{
return
{
return
{
style_setting
:
this
.
wrapper_props
.
style_setting
,
style_setting
:
this
.
wrapper_props
.
style_setting
,
list
:
this
.
wrapper_props
.
goods_list
!==
null
?
this
.
wrapper_props
.
goods_list
:
[],
list
:
[],
day
:
0
,
day
:
0
,
hour
:
0
,
hour
:
0
,
minute
:
0
,
minute
:
0
,
...
@@ -55,6 +55,10 @@
...
@@ -55,6 +55,10 @@
}
}
},
},
mounted
()
{
mounted
()
{
// 处理商品
let
goods
=
this
.
wrapper_props
.
goods_list
!==
null
?
this
.
wrapper_props
.
goods_list
:
[];
this
.
list
=
goods
.
length
>
0
&&
goods
.
filter
((
item
)
=>
item
.
if_show
==
1
&&
item
.
closed
==
0
);
const
t
=
this
.
style_setting
.
is_not_start
?
this
.
style_setting
.
count_down_time
:
(
this
.
style_setting
.
count_down_type
===
1
?
this
.
wrapper_props
.
first_end_time
:
this
.
style_setting
.
count_down_time
);
const
t
=
this
.
style_setting
.
is_not_start
?
this
.
style_setting
.
count_down_time
:
(
this
.
style_setting
.
count_down_type
===
1
?
this
.
wrapper_props
.
first_end_time
:
this
.
style_setting
.
count_down_time
);
const
now
=
moment
(
new
Date
(),
'YYYY-MM-DD HH:mm:ss'
),
const
now
=
moment
(
new
Date
(),
'YYYY-MM-DD HH:mm:ss'
),
end
=
moment
(
t
,
'YYYY-MM-DD HH:mm:ss'
),
end
=
moment
(
t
,
'YYYY-MM-DD HH:mm:ss'
),
...
...
pages/monthlyJoin/monthlyJoin.vue
View file @
015f4f4c
...
@@ -199,6 +199,7 @@
...
@@ -199,6 +199,7 @@
}
}
},
},
previewContract
()
{
previewContract
()
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'获取合同中'
title
:
'获取合同中'
});
});
...
...
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