Commit a16aad0c by 胡悦

提交

1 parent 91485f28
...@@ -31,6 +31,7 @@ Page({ ...@@ -31,6 +31,7 @@ Page({
sales: 100, sales: 100,
flow: 100 flow: 100
}, },
productList: [],
isReset: false, isReset: false,
hasPhoneNumber: false hasPhoneNumber: false
}, },
...@@ -153,10 +154,14 @@ Page({ ...@@ -153,10 +154,14 @@ Page({
console.log(userInfo) console.log(userInfo)
if (userInfo.phone) { if (userInfo.phone) {
this.setData({ this.setData({
hasPhoneNumber: true hasPhoneNumber: true,
productList: this.data.tabList[this.data.tabActive].productList
})
} else {
this.setData({
productList: this.data.tabList[this.data.tabActive].productList.slice(0,2)
}) })
} }
console.log(this.data.tabList[this.data.tabActive].productList.slice(0,2))
}, },
/** /**
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
<view class="product-title">特色产品</view> <view class="product-title">特色产品</view>
<view class="product-tips">预估收益根据您的新车销量 100台 测算所得</view> <view class="product-tips">预估收益根据您的新车销量 100台 测算所得</view>
<view class="product-list"> <view class="product-list">
<block wx:for="{{tabList[tabActive].productList}}" wx:key="ind"> <block wx:for="{{productList}}" wx:key="ind">
<view class="product-item"> <view class="product-item">
<image webp src="{{IMGURL}}image/dijia/{{item.img}}.png"></image> <image webp src="{{IMGURL}}image/dijia/{{item.img}}.png"></image>
<view class="product-content" hidden="{{ind > 1 && !hasPhoneNumber}}"> <view class="product-content">
<view class="product-type {{typeObj[item.type].class}}">{{typeObj[item.type].name}}</view> <view class="product-type {{typeObj[item.type].class}}">{{typeObj[item.type].name}}</view>
<view class="product-name">{{item.proName}}</view> <view class="product-name">{{item.proName}}</view>
<view class="product-price" wx:if="{{item.profit}}"> <view class="product-price" wx:if="{{item.profit}}">
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
</block> </block>
</view> </view>
</view> </view>
<view class="understand-more"> <view wx:if="{{!hasPhoneNumber}}" class="understand-more">
<phone-number bind:updatePhoneNumber="updatePhoneNumber"></phone-number> <phone-number class="more-btn" bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</view> </view>
<!-- 案例视频 --> <!-- 案例视频 -->
<block wx:if="{{hasPhoneNumber}}"> <block wx:if="{{hasPhoneNumber}}">
......
...@@ -376,11 +376,14 @@ ...@@ -376,11 +376,14 @@
/* 了解更多 */ /* 了解更多 */
.understand-more { .understand-more {
position: fixed; position: fixed;
/* display: flex;
align-items: flex-end; */
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 500rpx; height: 700rpx;
background-image: linear-gradient(180deg, rgba(255,255,255,0.00) 0%, #FFFFFF 68%); background-image: linear-gradient(180deg, rgba(255,255,255,0.00) 0%, #FFFFFF 68%);
border-radius: 0 0 12rpx 12rpx; border-radius: 0 0 12rpx 12rpx;
} }
.understand-more .more-btn {
width: 100%;
position: fixed;
bottom: 104rpx;
}
...@@ -176,6 +176,104 @@ var tabList = [ ...@@ -176,6 +176,104 @@ var tabList = [
] ]
} }
] ]
var tabList1 = [
{
name: '新车交付',
img: 'icon-car1',
active: 'icon-car11',
playImg: 'img1',
productList: [
{
img: 'product-img1',
proName: '数字无忧权益卡',
price: '1500',
// profit: '92.4万',
profit: '99999999万',
type: 'service',
productType: 'benefitCard'
},
{
img: 'product-img2',
proName: '汽车太阳膜',
price: '1500',
profit: '1008万',
type: 'membrane',
productType: 'sunMembrane'
}
]
},
{
name: '0-12个月',
img: 'icon-car2',
active: 'icon-car21',
playImg: 'img2',
productList: [
{
img: 'product-img3',
proName: '漆面保护膜',
price: '12000',
profit: '216万',
type: 'membrane',
productType: 'protectMembrane'
},
{
img: 'product-img4',
proName: '改色膜',
price: '5000',
profit: '30万',
type: 'membrane',
productType: 'colorMembrane'
}
]
},
{
name: '12-36个月',
img: 'icon-car3',
active: 'icon-car31',
playImg: 'img3',
productList: [
{
img: 'product-img5',
proName: '数字化美容',
price: '300',
profit: '36万',
type: 'beauty',
productType: 'digitBeauty'
},
{
img: 'product-img6',
proName: '座椅通风',
price: '1500',
profit: '1008万',
type: 'light',
productType: 'chair'
}
]
},
{
name: '36个月以上',
img: 'icon-car4',
active: 'icon-car41',
playImg: 'img4',
productList: [
{
img: 'product-img10',
proName: '数字化美容',
price: '300',
profit: '36万',
type: 'beauty',
productType: 'digitBeauty'
},
{
img: 'product-img11',
proName: '车险续保',
price: '2500',
profit: '',
type: 'service'
}
]
}
]
export default { export default {
tabList tabList
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!