Commit 26f7175f by chenwq

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

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