|
|
@ -3,8 +3,10 @@ |
|
|
|
<view class="park-top"> |
|
|
|
<view class="park-top"> |
|
|
|
<view class="park-navbar"> |
|
|
|
<view class="park-navbar"> |
|
|
|
<!-- :is-fixed='false' --> |
|
|
|
<!-- :is-fixed='false' --> |
|
|
|
<u-navbar title="开通商城" :border-bottom="false" :background="scrollTop?background:backgroundNone"> |
|
|
|
<view class="navbarHeight"> |
|
|
|
</u-navbar> |
|
|
|
<u-navbar title="开通商城" :border-bottom="false" :background="scrollTop?background:backgroundNone"> |
|
|
|
|
|
|
|
</u-navbar> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="box_1"> |
|
|
|
<view class="box_1"> |
|
|
|
<image :src="$picUrl+'/static/default-logo.png'" class="image_2" |
|
|
|
<image :src="$picUrl+'/static/default-logo.png'" class="image_2" |
|
|
|
@click="goJump('/pages/news1/setting')"></image> |
|
|
|
@click="goJump('/pages/news1/setting')"></image> |
|
|
@ -20,7 +22,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-sticky offset-top="142"> |
|
|
|
<u-sticky :offset-top="heightTop"> |
|
|
|
<view class="tab_fix" :style="{ 'border-radius': radius}"> |
|
|
|
<view class="tab_fix" :style="{ 'border-radius': radius}"> |
|
|
|
<view class="tab_pos"> |
|
|
|
<view class="tab_pos"> |
|
|
|
<view class="tab_bg"> |
|
|
|
<view class="tab_bg"> |
|
|
@ -267,9 +269,11 @@ |
|
|
|
retail: '', |
|
|
|
retail: '', |
|
|
|
wholesale: '', |
|
|
|
wholesale: '', |
|
|
|
scrollTop: 0, |
|
|
|
scrollTop: 0, |
|
|
|
|
|
|
|
heightTop:136, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
|
|
|
|
this.retail = uni.getStorageSync('userInfo').retail |
|
|
|
this.retail = uni.getStorageSync('userInfo').retail |
|
|
|
this.getRetailList() |
|
|
|
this.getRetailList() |
|
|
|
this.getDescribe() |
|
|
|
this.getDescribe() |
|
|
@ -279,7 +283,8 @@ |
|
|
|
uni.$off('appShow', this.solveShowMsg); |
|
|
|
uni.$off('appShow', this.solveShowMsg); |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.checkIfElementIsAtTop() |
|
|
|
let that = this |
|
|
|
|
|
|
|
that.checkIfElementIsAtTop() |
|
|
|
}, |
|
|
|
}, |
|
|
|
onPageScroll(e) { |
|
|
|
onPageScroll(e) { |
|
|
|
this.scrollTop = e.scrollTop > 120 ? true : false |
|
|
|
this.scrollTop = e.scrollTop > 120 ? true : false |
|
|
@ -290,11 +295,16 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
pxToRpx(px) { |
|
|
|
|
|
|
|
const screenWidth = uni.getSystemInfoSync().screenWidth //窗口宽度 |
|
|
|
|
|
|
|
let rpx = (750 * Number.parseInt(px)) / screenWidth //转换单位为rpx |
|
|
|
|
|
|
|
return Number(rpx) |
|
|
|
|
|
|
|
}, |
|
|
|
checkIfElementIsAtTop() { |
|
|
|
checkIfElementIsAtTop() { |
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
query.select('u-navbar ').boundingClientRect(data => { |
|
|
|
query.select('.navbarHeight ').boundingClientRect(data => { |
|
|
|
if (data) { |
|
|
|
if (data) { |
|
|
|
console.log(data, 'kkkkkkkkkkkkkkkkk') |
|
|
|
this.heightTop=this.pxToRpx(data.height) |
|
|
|
} |
|
|
|
} |
|
|
|
}).exec(); |
|
|
|
}).exec(); |
|
|
|
}, |
|
|
|
}, |
|
|
|