提交 1ac70cf7 编写于 作者: G gongfuxiang

小程序优化

上级 7a526da9
......@@ -269,8 +269,51 @@ button[disabled].bg-primary {
}
/*
滚动标签高度
滚动标签高度
*/
.scroll-box {
height: 100vh;
}
/*
分享组建样式
*/
.share-popup {
padding: 20rpx 10rpx 0 10rpx;
position: relative;
}
.share-popup .close {
position: absolute;
top: 20rpx;
right: 20rpx;
z-index: 2;
}
.share-popup-content {
padding: 0 20rpx;
margin-top: 40rpx;
text-align: left;
}
.share-popup-content .share-items {
padding: 30rpx 0;
height: 85rpx;
}
.share-popup-content .share-items:not(:first-child) {
border-top: 1px solid #f0f0f0;
}
.share-popup-content .share-items button {
background: transparent;
padding: 0;
width: 100%;
text-align: left;
margin: 0;
}
.share-popup-content .share-items image {
width: 80rpx;
height: 80rpx;
vertical-align: middle;
margin-right: 20rpx;
}
.share-popup-content .share-items .single-text {
width: calc(100% - 100rpx);
line-height: 85rpx;
}
\ No newline at end of file
.am-popup-content {
position: fixed;
background:#fff;
z-index: 101;
}
.am-popup-mask {
......@@ -12,6 +13,7 @@
background-color: rgba(0, 0, 0, 0.75);
opacity: 0;
pointer-events: none;
z-index: 100;
}
.am-popup-left {
......
......@@ -33,10 +33,12 @@ Page({
goods_video_is_autoplay: false,
is_use_mobile_detail: 1,
popup_share_status: false,
},
onLoad(params) {
//params['goods_id']=2;
params['goods_id']=2;
this.setData({params: params});
this.init();
},
......@@ -188,7 +190,7 @@ Page({
});
},
// 弹层关闭
// 购买弹层关闭
popup_close_event(e) {
this.setData({popup_status: false});
},
......@@ -609,6 +611,16 @@ Page({
this.setData({ goods_video_is_autoplay: false });
},
// 分享开启弹层
popup_share_event(e) {
this.setData({ popup_share_status: true });
},
// 分享弹层关闭
popup_share_close_event(e) {
this.setData({ popup_share_status: false });
},
// 自定义分享
onShareAppMessage() {
return {
......
......@@ -30,11 +30,9 @@
<view class="goods-base bg-white">
<view class="oh">
<view class="goods-title fl multi-text" style="color:{{goods.title_color}}">{{goods.title}}</view>
<view class="goods-share fr tc">
<button type="default" size="mini" open-type="share" hover-class="none">
<image src="/images/goods-detail-share-icon.png" mode="scaleToFill" class="dis-block" />
<text class="dis-block cr-888">分享</text>
</button>
<view class="goods-share fr tc" bindtap="popup_share_event">
<image src="/images/goods-detail-share-icon.png" mode="scaleToFill" class="dis-block" />
<text class="dis-block cr-888">分享</text>
</view>
</view>
<view class="goods-price single-text">
......@@ -95,7 +93,7 @@
</view>
</view>
<!-- 弹层 -->
<!-- 购买弹层 -->
<component-popup prop-show="{{popup_status}}" prop-position="bottom" bindonclose="popup_close_event">
<view class="goods-popup bg-white">
<view class="close fr oh">
......@@ -148,6 +146,33 @@
<button class="goods-popup-submit bg-main" type="default" catchtap="goods_buy_confirm_event" hover-class="none">确定</button>
</view>
</component-popup>
<!-- 分享弹层 -->
<component-popup prop-show="{{popup_share_status}}" prop-position="bottom" bindonclose="popup_share_close_event">
<view class="share-popup bg-white">
<view class="close fr oh">
<view class="fr" catchtap="popup_share_close_event">
<icon type="clear" size="20" />
</view>
</view>
<view class="share-popup-content">
<view class="share-items oh">
<image class="fl" src="/images/share-recomend-icon.png" mode="scaleToFill" />
<view class="cr-888 single-text fl">好物推荐、和大家一起分享你发现的宝贝</view>
</view>
<view class="share-items oh">
<button class="dis-block" type="default" size="mini" open-type="share" hover-class="none">
<image src="/images/share-weixin-icon.png" mode="scaleToFill" />
<text class="cr-888 single-text">一键分享给好友、群聊</text>
</button>
</view>
<view class="share-items oh">
<image src="/images/share-friend-icon.png" mode="scaleToFill" />
<text class="cr-888 single-text">生成海报,分享到朋友圈、好友及群聊</text>
</view>
</view>
</view>
</component-popup>
</view>
<view wx:if="{{goods == null}}">
......
......@@ -180,21 +180,19 @@
right: 0;
}
.goods-base .goods-title {
width: calc(100% - 130rpx);
width: calc(100% - 100rpx);
font-size: 32rpx;
line-height: 44rpx;
font-weight: 500;
}
.goods-base .goods-share {
padding: 0 20rpx;
margin-bottom: 10rpx;
}
.goods-base .goods-share image {
width: 50rpx;
height: 50rpx;
}
.goods-base .goods-share button {
height: auto;
font-size: 26rpx;
border: 0;
min-width: initial;
}
.goods-base .goods-price {
margin-top: 10rpx;
padding-right: 160rpx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册