Commit 193c4b5b by 胡悦

修改

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