提交 ad8513d4 编写于 作者: D devil_gong

wx

上级 0b41ed9f
...@@ -57,7 +57,6 @@ App({ ...@@ -57,7 +57,6 @@ App({
// 请求地址 // 请求地址
request_url: "{{request_url}}", request_url: "{{request_url}}",
//request_url: "https://test.shopxo.net/",
//request_url: 'http://tp5-dev.com/', //request_url: 'http://tp5-dev.com/',
// 基础信息 // 基础信息
......
<template name="copyright"> <template name="copyright">
<view class="copyright"> <view class="copyright">
<view class="text">Powered by ShopXO v1.5.0</view> <view class="text">Powered by ShopXO v1.6.0</view>
</view> </view>
</template> </template>
\ No newline at end of file
...@@ -26,97 +26,64 @@ ...@@ -26,97 +26,64 @@
line-height: 70rpx; line-height: 70rpx;
} }
/** /**
* 楼层数据 * 楼层数据
*/ */
.floor-list, .floor-left { .floor-list {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
}
.floor .vice-name {
color: #fff;
margin-top: 20rpx;
padding: 0 10rpx;
font-size: 34rpx;
line-height: 48rpx;
}
.floor-left {
width: 40%;
height: 662rpx;
}
.floor-left image {
left: 0;
bottom: 0;
width: 100%;
}
.goods-list,
.goods-list .goods {
overflow: hidden;
}
.floor-left image,
.goods-list .goods:nth-child(1),
.goods-list .goods:nth-child(2),
.goods-list .goods:nth-child(1) .goods-base,
.goods-list .goods:nth-child(2) .goods-base {
position: absolute;
}
.goods-list .goods image {
width: 100%;
height: 380rpx;
}
.goods-list .goods:nth-child(1),
.goods-list .goods:nth-child(2) {
width: 60%;
height: 330rpx;
}
.goods-list .goods:nth-child(1) .goods-base,
.goods-list .goods:nth-child(2) .goods-base {
padding-left: 10rpx;
width: calc(40% - 10rpx);
bottom: 20rpx;
} }
.goods-list .goods:nth-child(1) image, .floor-list .word {
.goods-list .goods:nth-child(2) image { padding: 20rpx 20rpx 0 20rpx;
width: 60%; }
height: 330rpx; .floor-list .word .vice-name {
float: right; color: #fff;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
text-align: center;
padding: 20rpx;
} }
.goods-list .goods:nth-child(1) { .floor-list .word .word-icon {
top: 0; margin: 10rpx;
right: 0; width: calc(33% - 24rpx);
height: 64rpx;
line-height: 64rpx;
text-align: center;
color: #fff;
background-color: rgba(0, 0, 0, 0.03);
border-radius: 6rpx;
display: inline-block;
border: 1px solid #fff;
text-decoration: none;
overflow: hidden;
} }
.goods-list .goods:nth-child(2) { .floor-list .word image {
top: 330rpx; max-width: 100%;
right: 0;
} }
.floor-list .goods-list .goods {
.goods-list .goods:nth-child(2), width: calc(50% - 2rpx);
.goods-list .goods:nth-child(3), float: left;
.goods-list .goods:nth-child(4), border-bottom: 1px solid #eee;
.goods-list .goods:nth-child(5), padding-bottom: 10rpx;
.goods-list .goods:nth-child(6) {
border-top: 1px solid #eee;
} }
.goods-list .goods:nth-child(4), .floor-list .goods-list .goods:nth-of-type(2n + 1) {
.goods-list .goods:nth-child(6) { border-right: 1px solid #eee;
border-left: 1px solid #eee;
} }
.goods-list .goods:nth-child(3), .floor-list .goods-list .goods image {
.goods-list .goods:nth-child(4), width: 100%;
.goods-list .goods:nth-child(5), height: 380rpx;
.goods-list .goods:nth-child(6) {
width: calc(50% - 1rpx);
height: 480rpx;
float: left;
} }
.goods-list .goods-base { .floor-list .goods-list .goods-base {
padding: 0 10rpx; padding: 0 10rpx;
} }
.goods-base .goods-title { .floor-list .goods-list .goods-base .goods-title {
line-height: 52rpx; line-height: 52rpx;
font-size: 32rpx; font-size: 32rpx;
} }
.goods-base .sales-price { .floor-list .goods-list .goods-base .sales-price {
font-size: 30rpx; font-size: 30rpx;
} }
\ No newline at end of file
...@@ -28,13 +28,20 @@ ...@@ -28,13 +28,20 @@
<text class="line"></text> <text class="line"></text>
<text class="text-wrapper">{{floor.name}}</text> <text class="text-wrapper">{{floor.name}}</text>
</view> </view>
<view class="floor-list" style="background-color:{{floor.bg_color}}"> <view class="floor-list">
<navigator url="/pages/goods-search/goods-search?category_id={{floor.id}}" hover-class="none"> <view class="word" style="background-color:{{floor.bg_color || '#eaeaea'}}">
<view class="floor-left"> <view a:if="{{floor.items.length > 0}}">
<view class="vice-name">{{floor.describe}}</view> <block a:for="{{floor.items}}" a:for-index="icx" a:for-item="icv">
<image src="{{floor.big_images}}" mode="aspectFit" /> <navigator a:if="{{icx < 6 && icv.is_home_recommended == 1}}" class="word-icon" url="/pages/goods-search/goods-search?category_id={{icv.id}}" hover-class="none">
{{icv.name}}
</navigator>
</block>
</view> </view>
</navigator> <view a:if="{{floor.describe.length > 0}}" class="vice-name">{{floor.describe}}</view>
<navigator url="/pages/goods-search/goods-search?category_id={{floor.id}}" hover-class="none">
<image a:if="{{floor.big_images.length > 0}}" src="{{floor.big_images}}" mode="aspectFit" class="dis-block" />
</navigator>
</view>
<view class="goods-list" a:if="{{floor.goods.length > 0}}"> <view class="goods-list" a:if="{{floor.goods.length > 0}}">
<view a:for="{{floor.goods}}" a:for-item="goods" class="goods bg-white"> <view a:for="{{floor.goods}}" a:for-item="goods" class="goods bg-white">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{goods.id}}" hover-class="none"> <navigator url="/pages/goods-detail/goods-detail?goods_id={{goods.id}}" hover-class="none">
......
...@@ -59,8 +59,9 @@ App({ ...@@ -59,8 +59,9 @@ App({
}, },
// 请求地址 // 请求地址
request_url: "{{request_url}}", // request_url: "{{request_url}}",
//request_url: 'https://test.shopxo.net/', // request_url: 'http://tp5-dev.com/',
request_url: 'https://test.shopxo.net/',
// 基础信息 // 基础信息
application_title: "{{application_title}}", application_title: "{{application_title}}",
......
{ {
"pages": [ "pages": ["pages/goods-detail/goods-detail",
"pages/index/index", "pages/index/index",
"pages/goods-category/goods-category", "pages/goods-category/goods-category",
"pages/cart/cart", "pages/cart/cart",
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"pages/login/login", "pages/login/login",
"pages/paytips/paytips", "pages/paytips/paytips",
"pages/goods-search/goods-search", "pages/goods-search/goods-search",
"pages/goods-detail/goods-detail",
"pages/goods-attribute/goods-attribute", "pages/goods-attribute/goods-attribute",
"pages/buy/buy", "pages/buy/buy",
"pages/user-address/user-address", "pages/user-address/user-address",
......
<template name="copyright"> <template name="copyright">
<view class="copyright"> <view class="copyright">
<view class="text">Powered by ShopXO v1.5.0</view> <view class="text">Powered by ShopXO v1.6.0</view>
</view> </view>
</template> </template>
\ No newline at end of file
...@@ -30,10 +30,12 @@ Page({ ...@@ -30,10 +30,12 @@ Page({
goods_spec_base_images: '', goods_spec_base_images: '',
show_field_price_text: null, show_field_price_text: null,
goods_video_is_autoplay: false,
}, },
onLoad(params) { onLoad(params) {
//params['goods_id']=12; params['goods_id']=2;
this.setData({params: params}); this.setData({params: params});
this.init(); this.init();
}, },
...@@ -592,6 +594,16 @@ Page({ ...@@ -592,6 +594,16 @@ Page({
}); });
}, },
// 视频播放
goods_video_play_event(e) {
this.setData({ goods_video_is_autoplay: true});
},
// 视频关闭
goods_video_close_event(e) {
this.setData({ goods_video_is_autoplay: false });
},
// 自定义分享 // 自定义分享
onShareAppMessage() { onShareAppMessage() {
return { return {
......
...@@ -15,6 +15,15 @@ ...@@ -15,6 +15,15 @@
</block> </block>
</swiper> </swiper>
<!-- 视频 -->
<view wx:if="{{goods_video_is_autoplay}}" class="goods-video">
<video src="{{goods.video}}" autoplay="{{goods_video_is_autoplay}}" show-center-play-btn="{{true}}" controls="{{false}}" show-play-btn="{{false}}" enable-progress-gesture="{{false}}" show-fullscreen-btn="{{false}}"></video>
</view>
<cover-view class="goods-video-submit">
<text wx:if="{{!goods_video_is_autoplay}}" class="goods-video-play" bindtap="goods_video_play_event" type="primary">视频</text>
<text wx:if="{{goods_video_is_autoplay}}" class="goods-video-close" bindtap="goods_video_close_event">关闭</text>
</cover-view>
<!-- 基础信息 --> <!-- 基础信息 -->
<view class="goods-base bg-white"> <view class="goods-base bg-white">
<view class="oh"> <view class="oh">
......
...@@ -213,4 +213,42 @@ ...@@ -213,4 +213,42 @@
padding:2px 5px; padding:2px 5px;
line-height:20px; line-height:20px;
border-radius:1px; border-radius:1px;
} }
\ No newline at end of file
/**
* 视频
*/
.goods-video {
width: 100%;
position: absolute;
top: 0;
left: 0;
text-align: center;
z-index:1;
}
.goods-video video {
width: 100%;
height: 65vh;
}
.goods-video-submit {
position: absolute;
left: 30rpx;
top: calc(65vh - 80rpx);
z-index: 2;
}
.goods-video-submit text {
height: 56rpx;
line-height: 56rpx !important;
font-size: 24rpx;
padding: 5rpx 20rpx;
border-radius: 6rpx;
background: #fff;
}
.goods-video-play {
border: 1px solid #10a54a;
color: #10a54a;
}
.goods-video-close {
border: 1px solid #eee;
color: #cb5757;
}
...@@ -24,13 +24,20 @@ ...@@ -24,13 +24,20 @@
<text class="line"></text> <text class="line"></text>
<text class="text-wrapper">{{floor.name}}</text> <text class="text-wrapper">{{floor.name}}</text>
</view> </view>
<view class="floor-list" style="background-color:{{floor.bg_color}}"> <view class="floor-list">
<navigator url="/pages/goods-search/goods-search?category_id={{floor.id}}" hover-class="none"> <view class="word" style="background-color:{{floor.bg_color || '#eaeaea'}}">
<view class="floor-left"> <view wx:if="{{floor.items.length > 0}}">
<view class="vice-name">{{floor.describe}}</view> <block wx:for="{{floor.items}}" wx:key="ck" wx:for-index="icx" wx:for-item="icv">
<image src="{{floor.big_images}}" mode="aspectFit" /> <navigator wx:if="{{icx < 6 && icv.is_home_recommended == 1}}" class="word-icon" url="/pages/goods-search/goods-search?category_id={{icv.id}}" hover-class="none">
{{icv.name}}
</navigator>
</block>
</view> </view>
</navigator> <view wx:if="{{floor.describe.length > 0}}" class="vice-name">{{floor.describe}}</view>
<navigator url="/pages/goods-search/goods-search?category_id={{floor.id}}" hover-class="none">
<image wx:if="{{floor.big_images.length > 0}}" src="{{floor.big_images}}" mode="aspectFit" class="dis-block" />
</navigator>
</view>
<view class="goods-list" wx:if="{{floor.goods.length > 0}}"> <view class="goods-list" wx:if="{{floor.goods.length > 0}}">
<view wx:for="{{floor.goods}}" wx:key="keys" wx:for-item="goods" class="goods bg-white"> <view wx:for="{{floor.goods}}" wx:key="keys" wx:for-item="goods" class="goods bg-white">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{goods.id}}" hover-class="none"> <navigator url="/pages/goods-detail/goods-detail?goods_id={{goods.id}}" hover-class="none">
......
...@@ -26,97 +26,64 @@ ...@@ -26,97 +26,64 @@
line-height: 70rpx; line-height: 70rpx;
} }
/** /**
* 楼层数据 * 楼层数据
*/ */
.floor-list, .floor-left { .floor-list {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
}
.floor .vice-name {
color: #fff;
margin-top: 20rpx;
padding: 0 10rpx;
font-size: 34rpx;
line-height: 48rpx;
}
.floor-left {
width: 40%;
height: 660rpx;
}
.floor-left image {
left: 0;
bottom: 0;
width: 100%;
}
.goods-list,
.goods-list .goods {
overflow: hidden;
}
.floor-left image,
.goods-list .goods:nth-child(1),
.goods-list .goods:nth-child(2),
.goods-list .goods:nth-child(1) .goods-base,
.goods-list .goods:nth-child(2) .goods-base {
position: absolute;
}
.goods-list .goods image {
width: 100%;
height: 380rpx;
}
.goods-list .goods:nth-child(1),
.goods-list .goods:nth-child(2) {
width: 60%;
height: 330rpx;
}
.goods-list .goods:nth-child(1) .goods-base,
.goods-list .goods:nth-child(2) .goods-base {
padding-left: 10rpx;
width: calc(40% - 10rpx);
bottom: 20rpx;
} }
.goods-list .goods:nth-child(1) image, .floor-list .word {
.goods-list .goods:nth-child(2) image { padding: 20rpx 20rpx 0 20rpx;
width: 60%; }
height: 330rpx; .floor-list .word .vice-name {
float: right; color: #fff;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
text-align: center;
padding: 20rpx;
} }
.goods-list .goods:nth-child(1) { .floor-list .word .word-icon {
top: 0; margin: 10rpx;
right: 0; width: calc(33% - 24rpx);
height: 64rpx;
line-height: 64rpx;
text-align: center;
color: #fff;
background-color: rgba(0, 0, 0, 0.03);
border-radius: 6rpx;
display: inline-block;
border: 1px solid #fff;
text-decoration: none;
overflow: hidden;
} }
.goods-list .goods:nth-child(2) { .floor-list .word image {
top: 330rpx; max-width: 100%;
right: 0;
} }
.floor-list .goods-list .goods {
.goods-list .goods:nth-child(2), width: calc(50% - 2rpx);
.goods-list .goods:nth-child(3), float: left;
.goods-list .goods:nth-child(4), border-bottom: 1px solid #eee;
.goods-list .goods:nth-child(5), padding-bottom: 10rpx;
.goods-list .goods:nth-child(6) {
border-top: 1px solid #eee;
} }
.goods-list .goods:nth-child(4), .floor-list .goods-list .goods:nth-of-type(2n + 1) {
.goods-list .goods:nth-child(6) { border-right: 1px solid #eee;
border-left: 1px solid #eee;
} }
.goods-list .goods:nth-child(3), .floor-list .goods-list .goods image {
.goods-list .goods:nth-child(4), width: 100%;
.goods-list .goods:nth-child(5), height: 380rpx;
.goods-list .goods:nth-child(6) {
width: calc(50% - 1rpx);
height: 490rpx;
float: left;
} }
.goods-list .goods-base { .floor-list .goods-list .goods-base {
padding: 0 10rpx; padding: 0 10rpx;
} }
.goods-base .goods-title { .floor-list .goods-list .goods-base .goods-title {
line-height: 52rpx; line-height: 52rpx;
font-size: 32rpx; font-size: 32rpx;
} }
.goods-base .sales-price { .floor-list .goods-list .goods-base .sales-price {
font-size: 30rpx; font-size: 30rpx;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册