提交 88013381 编写于 作者: D Devil

小程序接口地址更新、相册铺满

上级 90b16a9f
.goods-photo .swiper-item { .goods-photo, .goods-photo .swiper-item {
height: 55vh !important; height: 55vh !important;
display: block; display: block;
} }
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
autoplay="{{autoplay}}" autoplay="{{autoplay}}"
circular="{{circular}}" circular="{{circular}}"
class="goods-photo bg-white" class="goods-photo bg-white"
a:if="{{goods_photo.length > 0}}"> a:if="{{goods_photo.length > 0}}" style="height: {{photo_height}} !important;">
<block a:for="{{goods_photo}}"> <block a:for="{{goods_photo}}">
<swiper-item> <swiper-item>
<image class="swiper-item wh-auto" onTap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="aspectFit" /> <image class="swiper-item wh-auto" onTap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="scaleToFill" style="height: {{photo_height}} !important;" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<!-- 视频 --> <!-- 视频 -->
<block a:if="{{goods.video.length > 0}}"> <block a:if="{{goods.video.length > 0}}">
<view a:if="{{goods_video_is_autoplay}}" class="goods-video"> <view a: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> <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}}" style="height: {{photo_height}} !important;"></video>
</view> </view>
<view class="goods-video-submit"> <view class="goods-video-submit" style="top: calc({{photo_height}} - 110rpx) !important;">
<image a:if="{{!goods_video_is_autoplay}}" class="goods-video-play" onTap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image> <image a:if="{{!goods_video_is_autoplay}}" class="goods-video-play" onTap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image>
<image a:if="{{goods_video_is_autoplay}}" class="goods-video-close" onTap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image> <image a:if="{{goods_video_is_autoplay}}" class="goods-video-close" onTap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image>
</view> </view>
......
...@@ -11,6 +11,8 @@ Page({ ...@@ -11,6 +11,8 @@ Page({
data_list_loding_status: 1, data_list_loding_status: 1,
data_list_loding_msg: '', data_list_loding_msg: '',
params: null, params: null,
system_info: null,
photo_height: '55vh',
goods: null, goods: null,
goods_photo: [], goods_photo: [],
...@@ -85,7 +87,12 @@ Page({ ...@@ -85,7 +87,12 @@ Page({
params = app.launch_params_handle(params); params = app.launch_params_handle(params);
//params['goods_id']=2; //params['goods_id']=2;
this.setData({params: params}); var system_info = app.get_system_info();
this.setData({
params: params,
system_info: system_info,
photo_height: ((system_info || null) == null || (system_info.screenWidth || null) == null) ? '55vh' : system_info.screenWidth+'px'
});
// 数据加载 // 数据加载
this.init(); this.init();
......
.goods-photo .swiper-item, swiper { .goods-photo, .goods-photo .swiper-item {
height: 55vh !important; height: 55vh !important;
display: block; display: block;
} }
......
...@@ -10,6 +10,8 @@ Page({ ...@@ -10,6 +10,8 @@ Page({
data_list_loding_status: 1, data_list_loding_status: 1,
data_list_loding_msg: '', data_list_loding_msg: '',
params: null, params: null,
system_info: null,
photo_height: '55vh',
goods: null, goods: null,
goods_photo: [], goods_photo: [],
...@@ -80,7 +82,12 @@ Page({ ...@@ -80,7 +82,12 @@ Page({
// 参数赋值,初始化 // 参数赋值,初始化
//params['goods_id']=12; //params['goods_id']=12;
this.setData({params: params}); var system_info = app.get_system_info();
this.setData({
params: params,
system_info: system_info,
photo_height: ((system_info || null) == null || (system_info.screenWidth || null) == null) ? '55vh' : system_info.screenWidth+'px'
});
// 数据加载 // 数据加载
this.init(); this.init();
......
<view s-if="goods != null" class="page"> <view s-if="goods != null" class="page">
<!-- 轮播图片 --> <!-- 轮播图片 -->
<swiper indicator-dots="{{indicator_dots}}" indicator-color="{{indicator_color}}" indicator-active-color="{{indicator_active_color}}" autoplay="{{autoplay}}" circular="{{circular}}" class="goods-photo bg-white" s-if="goods_photo.length > 0"> <swiper indicator-dots="{{indicator_dots}}" indicator-color="{{indicator_color}}" indicator-active-color="{{indicator_active_color}}" autoplay="{{autoplay}}" circular="{{circular}}" class="goods-photo bg-white" s-if="goods_photo.length > 0" style="height: {{photo_height}} !important;">
<block s-for="item, index in goods_photo" s-key="key"> <block s-for="item, index in goods_photo" s-key="key">
<swiper-item> <swiper-item>
<image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="aspectFit" /> <image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="scaleToFill" style="height: {{photo_height}} !important;" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
<!-- 视频 --> <!-- 视频 -->
<block s-if="goods.video.length > 0"> <block s-if="goods.video.length > 0">
<view s-if="goods_video_is_autoplay" class="goods-video"> <view s-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 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}}" style="height: {{photo_height}} !important;">
<cover-image s-if="goods_video_is_autoplay" class="cover-goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></cover-image> <cover-image s-if="goods_video_is_autoplay" class="cover-goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></cover-image>
</video> </video>
</view> </view>
<view class="goods-video-submit"> <view class="goods-video-submit" style="top: calc({{photo_height}} - 110rpx) !important;">
<image s-if="!goods_video_is_autoplay" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image> <image s-if="!goods_video_is_autoplay" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image>
</view> </view>
</block> </block>
......
...@@ -10,6 +10,8 @@ Page({ ...@@ -10,6 +10,8 @@ Page({
data_list_loding_status: 1, data_list_loding_status: 1,
data_list_loding_msg: '', data_list_loding_msg: '',
params: null, params: null,
system_info: null,
photo_height: '55vh',
goods: null, goods: null,
goods_photo: [], goods_photo: [],
...@@ -80,7 +82,12 @@ Page({ ...@@ -80,7 +82,12 @@ Page({
// 参数赋值,初始化 // 参数赋值,初始化
//params['goods_id']=2; //params['goods_id']=2;
this.setData({params: params}); var system_info = app.get_system_info();
this.setData({
params: params,
system_info: system_info,
photo_height: ((system_info || null) == null || (system_info.screenWidth || null) == null) ? '55vh' : system_info.screenWidth+'px'
});
// 数据加载 // 数据加载
this.init(); this.init();
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
autoplay="{{autoplay}}" autoplay="{{autoplay}}"
circular="{{circular}}" circular="{{circular}}"
class="goods-photo bg-white" class="goods-photo bg-white"
qq:if="{{goods_photo.length > 0}}"> qq:if="{{goods_photo.length > 0}}" style="height: {{photo_height}} !important;">
<block qq:for="{{goods_photo}}" qq:key="key"> <block qq:for="{{goods_photo}}" qq:key="key">
<swiper-item> <swiper-item>
<image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="aspectFit" /> <image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="scaleToFill" style="height: {{photo_height}} !important;" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<!-- 视频 --> <!-- 视频 -->
<block qq:if="{{goods.video.length > 0}}"> <block qq:if="{{goods.video.length > 0}}">
<view qq:if="{{goods_video_is_autoplay}}" class="goods-video"> <view qq: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> <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}}" style="height: {{photo_height}} !important;"></video>
</view> </view>
<view class="goods-video-submit"> <view class="goods-video-submit" style="top: calc({{photo_height}} - 110rpx) !important;">
<image qq:if="{{!goods_video_is_autoplay}}" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image> <image qq:if="{{!goods_video_is_autoplay}}" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image>
<image qq:if="{{goods_video_is_autoplay}}" class="goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image> <image qq:if="{{goods_video_is_autoplay}}" class="goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image>
</view> </view>
......
.goods-photo .swiper-item, swiper { .goods-photo, .goods-photo .swiper-item {
height: 55vh !important; height: 55vh !important;
display: block; display: block;
} }
......
...@@ -10,6 +10,8 @@ Page({ ...@@ -10,6 +10,8 @@ Page({
data_list_loding_status: 1, data_list_loding_status: 1,
data_list_loding_msg: '', data_list_loding_msg: '',
params: null, params: null,
system_info: null,
photo_height: '55vh',
goods: null, goods: null,
goods_photo: [], goods_photo: [],
...@@ -80,7 +82,12 @@ Page({ ...@@ -80,7 +82,12 @@ Page({
// 参数赋值,初始化 // 参数赋值,初始化
//params['goods_id']=12; //params['goods_id']=12;
this.setData({params: params}); var system_info = app.get_system_info();
this.setData({
params: params,
system_info: system_info,
photo_height: ((system_info || null) == null || (system_info.screenWidth || null) == null) ? '55vh' : system_info.screenWidth+'px'
});
// 数据加载 // 数据加载
this.init(); this.init();
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
autoplay="{{autoplay}}" autoplay="{{autoplay}}"
circular="{{circular}}" circular="{{circular}}"
class="goods-photo bg-white" class="goods-photo bg-white"
tt:if="{{goods_photo.length > 0}}"> tt:if="{{goods_photo.length > 0}}" style="height: {{photo_height}} !important;">
<block tt:for="{{goods_photo}}" tt:key="key"> <block tt:for="{{goods_photo}}" tt:key="key">
<swiper-item> <swiper-item>
<image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="aspectFit" /> <image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="scaleToFill" style="height: {{photo_height}} !important;" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<!-- 视频 --> <!-- 视频 -->
<block tt:if="{{goods.video.length > 0}}"> <block tt:if="{{goods.video.length > 0}}">
<view tt:if="{{goods_video_is_autoplay}}" class="goods-video"> <view tt: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> <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}}" style="height: {{photo_height}} !important;"></video>
</view> </view>
<view class="goods-video-submit"> <view class="goods-video-submit" style="top: calc({{photo_height}} - 110rpx) !important;">
<image tt:if="{{!goods_video_is_autoplay}}" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image> <image tt:if="{{!goods_video_is_autoplay}}" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image>
<image tt:if="{{goods_video_is_autoplay}}" class="goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image> <image tt:if="{{goods_video_is_autoplay}}" class="goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image>
</view> </view>
......
.goods-photo .swiper-item, swiper { .goods-photo, .goods-photo .swiper-item {
height: 55vh !important; height: 55vh !important;
display: block; display: block;
} }
......
...@@ -73,7 +73,7 @@ App({ ...@@ -73,7 +73,7 @@ App({
// 请求地址 // 请求地址
request_url: "{{request_url}}", request_url: "{{request_url}}",
request_url: 'http://shopxo.com/', // request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/', // request_url: 'https://dev.shopxo.net/',
// 基础信息 // 基础信息
......
...@@ -10,6 +10,8 @@ Page({ ...@@ -10,6 +10,8 @@ Page({
data_list_loding_status: 1, data_list_loding_status: 1,
data_list_loding_msg: '', data_list_loding_msg: '',
params: null, params: null,
system_info: null,
photo_height: '55vh',
goods: null, goods: null,
goods_photo: [], goods_photo: [],
...@@ -93,7 +95,12 @@ Page({ ...@@ -93,7 +95,12 @@ Page({
// 参数赋值,初始化 // 参数赋值,初始化
//params['goods_id']=12; //params['goods_id']=12;
this.setData({params: params}); var system_info = app.get_system_info();
this.setData({
params: params,
system_info: system_info,
photo_height: ((system_info || null) == null || (system_info.screenWidth || null) == null) ? '55vh' : system_info.screenWidth+'px'
});
// 数据加载 // 数据加载
this.init(); this.init();
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
autoplay="{{autoplay}}" autoplay="{{autoplay}}"
circular="{{circular}}" circular="{{circular}}"
class="goods-photo bg-white" class="goods-photo bg-white"
wx:if="{{goods_photo.length > 0}}"> wx:if="{{goods_photo.length > 0}}" style="height: {{photo_height}} !important;">
<block wx:for="{{goods_photo}}" wx:key="key"> <block wx:for="{{goods_photo}}" wx:key="key">
<swiper-item> <swiper-item>
<image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="aspectFit" /> <image class="swiper-item wh-auto" bindtap="goods_photo_view_event" data-index="{{index}}" src="{{item.images}}" mode="scaleToFill" style="height: {{photo_height}} !important;" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<!-- 视频 --> <!-- 视频 -->
<block wx:if="{{goods.video.length > 0}}"> <block wx:if="{{goods.video.length > 0}}">
<view wx:if="{{goods_video_is_autoplay}}" class="goods-video"> <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> <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}}" style="height: {{photo_height}} !important;"></video>
</view> </view>
<view class="goods-video-submit"> <view class="goods-video-submit" style="top: calc({{photo_height}} - 110rpx) !important;">
<image wx:if="{{!goods_video_is_autoplay}}" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image> <image wx:if="{{!goods_video_is_autoplay}}" class="goods-video-play" bindtap="goods_video_play_event" src="/images/goods-detail-video-play.png" mode="aspectFit"></image>
<image wx:if="{{goods_video_is_autoplay}}" class="goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image> <image wx:if="{{goods_video_is_autoplay}}" class="goods-video-close" bindtap="goods_video_close_event" src="/images/goods-detail-video-close.png" mode="aspectFit"></image>
</view> </view>
......
.goods-photo .swiper-item, swiper { .goods-photo, .goods-photo .swiper-item {
height: 55vh !important; height: 55vh !important;
display: block; display: block;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册