Commit 3fc4bb50 by 胡悦

tijiao

1 parent a16aad0c
...@@ -33,7 +33,8 @@ Page({ ...@@ -33,7 +33,8 @@ Page({
}, },
productList: [], productList: [],
isReset: false, isReset: false,
hasPhoneNumber: false hasPhoneNumber: false,
userInfo: {}
}, },
// tab切换 // tab切换
...@@ -44,6 +45,7 @@ Page({ ...@@ -44,6 +45,7 @@ Page({
tabActive: index, tabActive: index,
showPlay: false showPlay: false
}) })
this.showCase()
}, },
// 提交测算 // 提交测算
submit(e) { submit(e) {
...@@ -150,9 +152,13 @@ Page({ ...@@ -150,9 +152,13 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
this.submit() this.submit()
const userInfo = Util.getUserInfo() this.setData({
console.log(userInfo) userInfo: Util.getUserInfo()
if (userInfo.phone) { })
this.showCase()
},
showCase() {
if (this.data.userInfo.phone) {
this.setData({ this.setData({
hasPhoneNumber: true, hasPhoneNumber: true,
productList: this.data.tabList[this.data.tabActive].productList productList: this.data.tabList[this.data.tabActive].productList
...@@ -163,7 +169,6 @@ Page({ ...@@ -163,7 +169,6 @@ Page({
}) })
} }
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<!-- 特色产品 --> <!-- 特色产品 -->
<view class="product-box"> <view class="product-box">
<view class="product-title">特色产品</view> <view class="product-title">特色产品</view>
<view class="product-tips">预估收益根据您的新车销量 100台 测算所得</view> <view class="product-tips">预估收益根据您的新车销量 {{formData.sales}}台 测算所得</view>
<view class="product-list"> <view class="product-list">
<block wx:for="{{productList}}" wx:key="ind"> <block wx:for="{{productList}}" wx:key="ind">
<view class="product-item"> <view class="product-item">
...@@ -82,13 +82,13 @@ ...@@ -82,13 +82,13 @@
<view class="dialog-form"> <view class="dialog-form">
<view class="form-item"> <view class="form-item">
<view class="form-label">门店月平均新车销量</view> <view class="form-label">门店月平均新车销量</view>
<input class="form-input" bindfocus="focus" name="sales" value="{{formData.sales}}" type="number" /> <input class="form-input" bindfocus="focus" maxlength="8" name="sales" value="{{formData.sales}}" type="number" />
<view class="form-unit">台</view> <!-- <view class="form-unit">台</view> -->
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-label">3年内售后存量用户</view> <view class="form-label">3年内售后存量用户</view>
<input class="form-input" bindfocus="focus" name="flow" type="number" value="{{formData.flow}}" /> <input class="form-input" bindfocus="focus" maxlength="8" name="flow" type="number" value="{{formData.flow}}" />
<view class="form-unit">人</view> <!-- <view class="form-unit">人</view> -->
</view> </view>
<button class="dialog-btn" form-type="submit">提交测算</button> <button class="dialog-btn" form-type="submit">提交测算</button>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!