Commit 26f7175f by chenwq

看产品-fixed按钮组提取成组件

1 parent 67d62d92
......@@ -33,6 +33,27 @@ Page({
// navList: ['看线索', '看产品'],
navList: ['看产品', '系统订阅'],
// 固定按钮
btnList: [{
imgSrc: 'contact',
name: '在线客服',
bindtap: 'goConsult'
}, {
imgSrc: 'bus-pro',
name: '申请业务',
bindtap: 'openBus'
}, {
imgSrc: 'bus-pro',
name: '申请产品',
bindtap: 'openPro',
isHide: false
}, {
imgSrc: 'valuation',
name: '预估产值',
bindtap: 'showCalculate',
isHide: false
}],
// 预估弹框
visible: false,
isReset: false,
......@@ -154,6 +175,7 @@ Page({
this.setData({
tabIndx: e.detail
})
this.btnIsHide()
},
//看产品下拉刷新
refresherrefresh() {
......@@ -185,6 +207,13 @@ Page({
openBus() {
wx.$router.go("/packagesList/apply/pages/apply");
},
// 开通产品
openPro() {
let obj = {
scene:3
}
wx.$router.go("/packagesList/applyProd/pages/apply",obj);
},
// 预估弹框
showCalculate() {
wx.$router.go("measure");
......@@ -346,6 +375,14 @@ Page({
return false
},
// 固定按钮
btnIsHide() {
this.setData({
['btnList[2].isHide']: this.data.tabIndx != 0,
['btnList[3].isHide']: this.data.tabIndx != 0
})
},
/**
* 生命周期函数--监听页面加载
*/
......
......@@ -112,33 +112,19 @@ page {
}
}
.chat {
.fixed-btns {
position: fixed;
right: -4px;
top: 52%;
width: 64px;
height: 64px;
border-radius: 50%;
z-index: 2;
}
.bus-pro {
position: fixed;
right: -4px;
top: 60%;
width: 128rpx;
height: 143rpx;
z-index: 2;
}
.output-value {
position: fixed;
right: -2px;
top: 70%;
.fixed-btns image {
width: 64px;
height: 64px;
// border-radius: 50%;
z-index: 2;
border-radius: 50%;
margin-top: -20rpx;
}
/* 测算弹窗 */
......
......@@ -52,25 +52,15 @@
class="guide-img"
src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png?v={{img_version}}" />
</view>
<!-- 在线客服 -->
<image
webp
class="chat"
src="{{IMG_URL}}index/contact.png"
bindtap="goConsult" />
<!-- 申请业务 -->
<image
webp
class="bus-pro"
src="{{IMG_URL}}index/bus-pro.png"
bindtap="openBus" />
<!-- 预估产值 -->
<image
webp
class="output-value"
bindtap="showCalculate"
src="{{IMG_URL}}index/valuation.png"
wx:if="{{tabIndx == 0}}" />
<view class="fixed-btns">
<view wx:for="{{btnList}}" wx:key="index">
<image
webp
wx:if="{{!item.isHide}}"
src="{{IMG_URL}}index/{{item.imgSrc}}.png"
bindtap="{{item.bindtap}}" />
</view>
</view>
<!-- 预估产值弹框 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
<view class="dialog-box">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!