Commit 2a1c2aeee445445a8c25e3285d06a40c4f5ecf5d

Authored by wangfan
1 parent b0628020

C端调整

// components/tips/add-to-lite.js
import util from '../../utils/util'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
hidden:false,
},
attached(){
this.show();
},
/**
* 组件的方法列表
*/
methods: {
show(){
this.triggerEvent("show");
//导航栏自适应
let systemInfo = wx.getSystemInfoSync();
let reg = /ios/i;
let pt = 20;//导航状态栏上内边距
let h = 44;//导航状态栏高度
if(reg.test(systemInfo.system)){
pt = systemInfo.statusBarHeight;
h = 44;
}else{
pt = systemInfo.statusBarHeight;
h = 48;
}
this.setData({
hidden:false,
statusBarHeightFull:pt+h,
})
},
hide(){
this.setData({
hidden:true,
})
},
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/tips/add-to-lite.wxml-->
<cover-view class="discount" style="top:{{statusBarHeightFull+40}}px;" bindtap="gotoDiscount">
<cover-view style="position: relative;height: 100%;">
<cover-image class="discount-img" src="http://qn.colorcun.com/reserve/images/%E6%83%A0-%E5%85%A5%E5%8F%A3.png"></cover-image>
<cover-view style="position: relative;" wx:if="{{!hidden}}">
<cover-image src="http://qn.colorcun.com/reserve/images/%E4%BC%98%E6%83%A0.png"></cover-image>
<cover-view class="discount-view">
<cover-view class="text">平台预订即可享受超值优惠</cover-view>
<cover-view class="close" catchtap="hide"></cover-view>
</cover-view>
</cover-view>
</cover-view>
</cover-view>
\ No newline at end of file
... ...
/* components/tips/discount.wxss */
@import "../../app.wxss";
.discount{
position: fixed;
width: 720rpx;
height: 122rpx;
left:20rpx;
top:200rpx;
font-size: 32rpx;
color:#FFFFFF;
z-index: 99;
}
.discount .text{
position: absolute;
font-size: 32rpx;
color: #F8E6C4;
left: 120rpx;
top: 50rpx;
height: 44rpx;
line-height: 44rpx;
}
.discount .close{
position: absolute;
min-width: 100rpx;
width: 100rpx;
height: 122rpx;
right:0;
top: 0;
}
.discount-view{
position: absolute;
top:0;
left:0;
width: 720rpx;
height: 122rpx;
}
.discount-img{
position: absolute;
top:28rpx;
left:0;
width: 88rpx;
height: 88rpx;
}
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"nav":"/components/nav/nav",
"getpos":"/components/userinfo/getpos",
"sb-tr":"/components/reserve/seller-box-transverse/seller-box",
"a2l":"/components/tips/add-to-lite"
"a2l":"/components/tips/add-to-lite",
"ds":"/components/tips/discount"
}
}
\ No newline at end of file
... ...
... ... @@ -68,3 +68,4 @@
<seller-box id="seller-box" bindevent="sellerBoxEvent"></seller-box>
<cover-view class="tab-patch"></cover-view>
<a2l bindshow="a2lshow" bindhide="a2lhide"></a2l>
<ds></ds>
... ...