Commit ca26721c by 张立顺

bugfix

1 parent 5dfc6255
<wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}">
<scroll-view
class="tab-box {{align}} {{outClassName}}"
scroll-x
enable-flex
scroll-with-animation
scroll-into-view="{{to}}"
enhanced="{{true}}"
show-scrollbar="{{false}}"
>
class="tab-box {{align}} {{outClassName}}"
scroll-x
enable-flex
scroll-with-animation
scroll-into-view="{{to}}"
enhanced="{{true}}"
show-scrollbar="{{false}}">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
bindtap="click"
data-count="{{index}}"
id="to-{{index}}"
>
class="tab {{index==count?'active':''}}"
bindtap="click"
data-count="{{index}}"
id="to-{{index}}">
<view class="text">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" />
......@@ -27,16 +25,13 @@
<view class="tab-box flex">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}"
bindtap="click"
data-count="{{index}}"
>
<view class="text text-center">
{{item}}
</view>
class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}"
bindtap="click"
data-count="{{index}}">
<view class="text text-center">{{item}}</view>
<view class="line" style="lineStyle" />
<!-- -->
<!-- -->
<view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" />
</view>
</block>
......
......@@ -66,7 +66,10 @@ Page({
if (result) {
wx.$api.showToast('申请成功')
setTimeout(() => {
wx.$router.back()
wx.$router.back(page => {
page.getClueInit && page.getClueInit()
// this.getClueInit()
})
}, 1000)
}
})
......
......@@ -169,8 +169,8 @@ Page({
wx.$router.go('packageOutput.openBusiness', params)
} else {
//申请门店
let { type, item } = e.currentTarget.dataset
wx.$router.go('apply', item.clueId)
// let { type, item } = e.currentTarget.dataset
wx.$router.go('apply', item?.clueId || '')
}
// wx.$router.go('apply',1235)
},
......@@ -213,20 +213,12 @@ Page({
},
// 提交测算
submit(e) {
<<<<<<< HEAD
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
console.log('flow', sales, flow)
const reg = /^[1-9]\d*$/
console.log(reg.test(sales), flow, '---')
=======
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;
console.log('flow',sales,flow)
const reg = /^[1-9]\d*$/;
console.log(reg.test(sales), flow, "---");
>>>>>>> 79abc4b9c737b04214efde25436bd78cadbc6b51
if (!reg.test(sales)) {
wx.showToast({
title: '门店月平均新车销量应为正整数',
......@@ -264,27 +256,16 @@ Page({
this.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => {
if (i.profit) {
<<<<<<< HEAD
let sale = `senceData[${index}].productList[${lastIndex}].sale`
let name = `senceData[${index}].productList[${lastIndex}].profit`
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`
let profit = _this.formula(i.productType, sales, flow)
console.log(name, profit)
this.setData({
[name]: profit,
[sale]: sales
})
=======
let sale = `senceData[${index}].productList[${lastIndex}].sale`;
let name = `senceData[${index}].productList[${lastIndex}].profit`;
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`;
let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit);
this.setData({
[name]: profit,
[sale]: sales,
[flowKey]: flow,
});
>>>>>>> 79abc4b9c737b04214efde25436bd78cadbc6b51
[flowKey]: flow
})
}
})
})
......@@ -569,6 +550,7 @@ Page({
wx.$api.setCopyData(phone)
},
getClueInit(param) {
// console.log(22222)
this.getUnreadApi(param)
this.getPageApi(param)
},
......
......@@ -149,7 +149,7 @@ Component({
this.setData({
list: []
})
return wx.$api.showTips(result.message)
return wx.$api.showToast(result.message)
}
let { dataList, yqMerchantIds } = data
const list = yqMerchantIds.reduce((list, item, index) => {
......
......@@ -116,7 +116,9 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
onReady() {
// console.log(getTextWidth('随后获取dom元素的clientWidth 随后获取dom元素的clientWidth随后获取dom元素的clientWidth随后获取dom元素的clientWidth', '12px'))
},
/**
* 生命周期函数--监听页面显示
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!