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
223f0b2d
Commit
223f0b2d
authored
Mar 10, 2020
by
郑秀明
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
aa51d0aa
' into develop
parents
3e892000
aa51d0aa
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
29 deletions
+56
-29
uni-countdown.vue
components/uni-countdown/uni-countdown.vue
+2
-2
manifest.json
manifest.json
+1
-1
goodslist.vue
pages/home/components/goodslist.vue
+6
-5
hotrecommd.vue
pages/home/components/hotrecommd.vue
+35
-14
maintitle.vue
pages/home/components/maintitle.vue
+1
-1
promotion.vue
pages/home/components/promotion.vue
+7
-6
home.vue
pages/home/home.vue
+4
-0
No files found.
components/uni-countdown/uni-countdown.vue
View file @
223f0b2d
<
template
>
<view>
<view
class=
"uni-countdown"
v-if=
"s > 0"
>
<view
class=
"uni-countdown"
v-if=
"s
econds
> 0"
>
<text
v-if=
"showDay"
:style=
"
{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">
{{
d
}}
</text>
<text
v-if=
"showDay"
:style=
"
{ color: splitorColor }" class="uni-countdown__splitor">天
</text>
<text
:style=
"
{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">
{{
h
}}
</text>
...
...
@@ -11,7 +11,7 @@
<text
v-if=
"!showColon"
:style=
"
{ color: splitorColor }" class="uni-countdown__splitor">秒
</text>
</view>
<view
v-else
>
<text
class=
"uni-countdown__number"
>
</text>
<text
class=
"uni-countdown__number"
:style=
"
{backgroundColor: backgroundColor,color:color}">活动已结束
</text>
</view>
</view>
</
template
>
...
...
manifest.json
View file @
223f0b2d
...
...
@@ -62,7 +62,7 @@
"disableHostCheck"
:
true
,
"proxy"
:
{
"/uni/api"
:
{
"target"
:
"http://192.168.
1.2:9093
/"
,
"target"
:
"http://192.168.
50.133:6564
/"
,
"changeOrigin"
:
true
,
"secure"
:
false
,
"pathRewrite"
:
{
...
...
pages/home/components/goodslist.vue
View file @
223f0b2d
...
...
@@ -66,14 +66,12 @@
}
},
mounted
()
{
const
{
listType
,
arrange
,
goods_data_type
}
=
this
.
style_setting
;
const
{
listType
,
arrange
,
goods_data_type
,
width
}
=
this
.
style_setting
;
const
{
goods_list
,
cate_goods_list
}
=
this
.
wrapper_props
;
if
(
listType
==
2
)
{
this
.
width
=
'320rpx'
;
}
else
if
(
listType
==
3
)
{
this
.
width
=
'210rpx'
;
}
else
{
this
.
width
=
'150
rpx'
;
this
.
width
=
width
*
2
+
'
rpx'
;
}
let
list
=
[];
if
(
goods_data_type
===
3
)
{
...
...
@@ -107,6 +105,9 @@
box-sizing: border-box;
background: #fff;
}
.goods_content, .swiper_content {
border-radius: 0 0 16rpx 16rpx;
}
.goods_box, .goods_box2 {
display: flex;
justify-content: space-between;
...
...
@@ -123,7 +124,7 @@
}
}
.unshow_price {
font-size: 2
8
rpx;
font-size: 2
0
rpx;
width: 90%;
text-align: left;
}
...
...
pages/home/components/hotrecommd.vue
View file @
223f0b2d
...
...
@@ -11,24 +11,27 @@
</view>
</view>
<view
class=
"hot_cate_list"
>
<text
class=
"hot_cate_item"
v-for=
"(item, key) in cate_list"
:key=
"key"
@
click=
"changeCate(key)"
>
{{
item
.
cate_name
}}
</text>
<text
class=
"hot_cate_item"
v-for=
"(item, key) in cate_list"
:key=
"key"
@
click=
"changeCate(key)"
:class=
"key === hotIndex ? 'act' : ''"
>
{{
item
.
cate_name
}}
</text>
</view>
</view>
<view
class=
"flex_goods"
v-for=
"(val, key) in cate_list"
:key=
"key"
v-if=
"key === hotIndex"
>
<view
class=
"hot_goods_item"
v-for=
"(item, index) in val.goods_list"
:key=
"index"
>
<image
class=
"hot_goods_icon"
:src=
"style_setting.angle_sign_url"
></image>
<image
class=
"hot_goods_img"
:src=
"item.default_image || $noGoodsImg"
@
click=
"$jumpGoodDetail(item.goods_id)"
></image>
<text
class=
"hot_goods_name"
v-if=
"style_setting.title_show"
>
{{
item
.
title
}}
</text>
<text
class=
"hot_goods_subname"
v-if=
"style_setting.sub_title_show"
>
{{
item
.
sub_title
}}
</text>
<view
class=
"between_price"
>
<view
class=
"between_left"
v-if=
"style_setting.price_show"
>
<text
class=
"hot_pro_price"
v-if=
"isLogin"
>
¥
{{
item
.
price
}}
</text>
<!--
<text
class=
"hot_price"
>
¥
{{
item
.
price
}}
</text>
-->
<text
class=
"hot_pro_price"
v-else
>
登录显示价格
</text>
<view
v-for=
"(val, key) in cate_list"
:key=
"key"
v-if=
"key === hotIndex"
>
<view
v-if=
"val.goods_list"
class=
"flex_goods"
>
<view
class=
"hot_goods_item"
v-for=
"(item, index) in val.goods_list"
:key=
"index"
>
<image
class=
"hot_goods_icon"
:src=
"style_setting.angle_sign_url"
></image>
<image
class=
"hot_goods_img"
:src=
"item.default_image || $noGoodsImg"
@
click=
"$jumpGoodDetail(item.goods_id)"
></image>
<text
class=
"hot_goods_name"
v-if=
"style_setting.title_show"
>
{{
item
.
goods_name
}}
</text>
<text
class=
"hot_goods_subname"
v-if=
"style_setting.sub_title_show"
>
{{
item
.
goods_subname
||
' '
}}
</text>
<view
class=
"between_price"
>
<view
class=
"between_left"
v-if=
"style_setting.price_show"
>
<text
class=
"hot_pro_price"
v-if=
"isLogin"
>
¥
{{
item
.
price
}}
</text>
<!--
<text
class=
"hot_price"
>
¥
{{
item
.
price
}}
</text>
-->
<text
class=
"hot_pro_price"
v-else
>
登录显示价格
</text>
</view>
<i
class=
"hot_cart_icon"
v-if=
"style_setting.cart_show"
@
click=
"$addCart(item.spec_id, 1,isLogin)"
></i>
</view>
<i
class=
"hot_cart_icon"
v-if=
"style_setting.cart_show"
@
click=
"$addCart(item.spec_id, 1,isLogin)"
></i>
</view>
</view>
<view
v-else
class=
"nogoods"
>
暂无此类商品
</view>
</view>
</view>
</
template
>
...
...
@@ -100,7 +103,8 @@
white-space: nowrap;
overflow: scroll;
position: relative;
top: 10rpx;
top: -22rpx;
left: 20rpx;
}
.hot_cate_list::-webkit-scrollbar {
display: none;
...
...
@@ -115,6 +119,22 @@
color: #464646;
font-size: 32rpx;
text-align: center;
position: relative;
}
.hot_cate_item.act::after {
content: '';
width: 40rpx;
height: 2px;
border-radius: 1px;
background: #000;
position: absolute;
left: 50%;
margin-left: -20rpx;
bottom: 0;
}
.nogoods {
padding: 40rpx;
text-align: center;
}
.flex_goods {
display: flex;
...
...
@@ -127,6 +147,7 @@
margin-top: 20rpx;
background: #fff;
padding-bottom: 12rpx;
border-radius: 16rpx;
.hot_goods_icon {
position: absolute;
left: 0;
...
...
pages/home/components/maintitle.vue
View file @
223f0b2d
...
...
@@ -6,7 +6,7 @@
<text
class=
"main_title"
:style=
"
{'font-size':style_setting.title_font_size*2+'rpx','color':style_setting.title_color}">
{{
style_setting
.
title
}}
</text>
<text
class=
"main_sub_title"
:style=
"
{'font-size': style_setting.sub_title_font_size*2+'rpx','color':style_setting.sub_title_color}">
{{
style_setting
.
sub_title
}}
</text>
</view>
<text
v-if=
"style_setting.view_more_show"
:style=
"
{'font-size':style_setting.view_more_font_size*2+'rpx','color': style_setting.view_more_color}" @click="
jumpPage
(style_setting.view_more_link)">
{{
style_setting
.
view_more_font_title
}}
<text
v-if=
"style_setting.view_more_show"
:style=
"
{'font-size':style_setting.view_more_font_size*2+'rpx','color': style_setting.view_more_color}" @click="
$jump
(style_setting.view_more_link)">
{{
style_setting
.
view_more_font_title
}}
<svg
viewBox=
"64 64 896 896"
class=
""
data-icon=
"right"
width=
"1em"
height=
"1em"
fill=
"currentColor"
aria-hidden=
"true"
focusable=
"false"
><path
d=
"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"
></path></svg>
</text>
</view>
...
...
pages/home/components/promotion.vue
View file @
223f0b2d
...
...
@@ -4,11 +4,11 @@
<view>
<i
v-if=
"style_setting.icon_show"
class=
"promo_icon"
:style=
"
{'background-image': 'url('+style_setting.icon_url+')'}">
</i>
<text
class=
"promo_title"
:style=
"
{'color': style_setting.title_color, 'font-size': style_setting.title_font*2+'rpx'}">
{{
style_setting
.
title
}}
</text>
<text
class=
"countdown"
>
<text
class=
"countdown"
v-if=
"style_setting.count_down_show"
>
<uni-countdown
:hour=
"hour"
:minute=
"minute"
:second=
"second"
:showDay=
"false"
backgroundColor=
"#000"
color=
"#fff"
></uni-countdown>
</text>
</view>
<text
class=
"check_more"
@
click=
"
jumpPage
(style_setting.more_link)"
>
{{
style_setting
.
more_title
}}
<text
class=
"check_more"
@
click=
"
$jump
(style_setting.more_link)"
>
{{
style_setting
.
more_title
}}
<svg
viewBox=
"64 64 896 896"
class=
""
data-icon=
"right"
width=
"1em"
height=
"1em"
fill=
"currentColor"
aria-hidden=
"true"
focusable=
"false"
><path
d=
"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"
></path></svg>
</text>
</view>
...
...
@@ -51,12 +51,12 @@
},
mounted
()
{
const
t
=
this
.
style_setting
.
count_down_type
===
1
?
this
.
wrapper_props
.
first_end_time
:
this
.
style_setting
.
count_down_time
;
const
now
=
moment
(
new
Date
()).
format
(
'x'
)
-
0
,
end
=
moment
(
t
).
format
(
'x'
)
-
0
,
const
now
=
moment
(
new
Date
()
,
'YYYY-MM-DD HH:mm:ss'
).
format
(
'x'
)
-
0
,
end
=
moment
(
t
,
'YYYY-MM-DD HH:mm:ss'
).
format
(
'x'
)
-
0
,
du
=
moment
.
duration
(
end
-
now
);
this
.
hour
=
du
.
days
()
*
24
+
du
.
hours
();
this
.
minute
=
du
.
hour
s
();
this
.
second
s
=
du
.
seconds
();
this
.
minute
=
du
.
minute
s
();
this
.
second
=
du
.
seconds
();
const
space
=
4
-
this
.
list
.
length
%
4
;
if
(
space
!==
4
)
{
this
.
spaceArray
=
new
Array
(
space
)
...
...
@@ -77,6 +77,7 @@
margin: 0 auto;
padding: 0 24rpx 0 28rpx;
box-sizing: border-box;
border-radius: 0 0 16rpx 16rpx;
}
.flex {
display: flex;
...
...
pages/home/home.vue
View file @
223f0b2d
...
...
@@ -26,6 +26,9 @@
},
onLoad
()
{
this
.
getData
();
uni
.
showLoading
({
title
:
'加载中'
});
},
methods
:
{
getData
()
{
...
...
@@ -36,6 +39,7 @@
success
:
(
res
)
=>
{
this
.
data
=
res
.
data
.
data
;
this
.
isLogin
=
res
.
data
.
login_flg
;
uni
.
hideLoading
();
}
});
}
...
...
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