Commit 193c4b5b by 胡悦

修改

1 parent b82699c8
......@@ -26,7 +26,7 @@ Component({
) {
return;
} else {
wx.$util.showLoading('正在授权...')
// wx.$util.showLoading('正在授权...')
}
// this.triggerEvent("updatePhoneNumber", '18873336682');
getApp()
......@@ -34,7 +34,7 @@ Component({
.then(({ data }) => {
delete detail.errMsg;
if (detail.iv && detail.encryptedData) {
// wx.$util.showLoading('正在授权...')
wx.$util.showLoading('正在授权...')
ssoApi.authUserPhone(detail).then(({ data, code, message }) => {
wx.hideLoading()
if (code==0) {
......
......@@ -34,7 +34,11 @@ Page({
productList: [],
isReset: false,
hasPhoneNumber: false,
userInfo: {}
userInfo: {},
lastFormData: {
sales: 100,
flow: 100,
}
},
// tab切换
......@@ -52,6 +56,28 @@ Page({
console.log(e);
let sales = e ? +e.detail.value.sales : this.data.formData.sales
let flow = e ? +e.detail.value.flow : this.data.formData.flow
const reg = /^[1-9]\d*$/
console.log(reg.test(sales), flow, '---')
if (!reg.test(sales)) {
wx.showToast({
title: '门店月平均新车销量应为正整数',
icon: 'none',
duration: 2000
})
return
}
if (!reg.test(flow)) {
wx.showToast({
title: '3年内售后存量用户应为正整数',
icon: 'none',
duration: 2000
})
return
}
this.setData({
'lastFormData.sales': sales,
'lastFormData.flow': flow
})
const _this = this;
this.data.tabList.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => {
......@@ -138,6 +164,7 @@ Page({
showCalculate() {
this.setData({
visible: !this.data.visible,
isReset: false
});
},
clickDialog(e) {
......@@ -145,6 +172,8 @@ Page({
if (e.changedTouches[0].clientY < 352) {
this.setData({
visible: false,
isReset: false,
formData: this.data.lastFormData
});
}
},
......
......@@ -46,10 +46,11 @@
</view>
</block>
</view>
<view wx:if="{{!hasPhoneNumber}}" class="understand-more">
<phone-number class="more-btn" bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</view>
</view>
<view wx:if="{{!hasPhoneNumber}}" class="understand-more">
<phone-number class="more-btn" bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</view>
<!-- 案例视频 -->
<block wx:if="{{hasPhoneNumber}}">
<view class="video-bg" wx:if="{{tabList[tabActive].videoList.length}}">
......
......@@ -98,6 +98,7 @@
}
/* 特色产品 */
.product-box {
position: relative;
width: 100%;
background-color: #fff;
/* height: 500rpx; */
......@@ -397,7 +398,7 @@
}
/* 了解更多 */
.understand-more {
position: fixed;
position: absolute;
bottom: 0;
width: 100%;
height: 700rpx;
......@@ -406,6 +407,6 @@
}
.understand-more .more-btn {
width: 100%;
position: fixed;
position: absolute;
bottom: 104rpx;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!