Commit 3fc4bb50 by 胡悦

tijiao

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