Commit 335d94aa by luyt

fix:线索分页类型

1 parent 8db91880
......@@ -35,7 +35,7 @@ Page({
console.log('name: ', name)
if (!name) {
wx.pro.showToast({
title: '请输入店名',
title: '请输入开店名称',
icon: 'error'
})
return
......
......@@ -27,11 +27,11 @@
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
<input class="inp" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
<input class="inp" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
<input class="inp" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
......
......@@ -510,6 +510,7 @@ Page({
filterTypeFn(e) {
let { typeList } = this.data
let index = e.currentTarget.dataset.index
// console.log('index: ', index);
// let itemList = []
// let params = {
// clueSource: '',
......@@ -536,12 +537,20 @@ Page({
success(res) {
// 选中全部
let selectIndex = res.tapIndex
// console.log('selectIndex: ', selectIndex);
typeList[index].selectIndex = selectIndex
let params = typeList.reduce((obj, item, index) => {
console.log(' item: ', item);
if (item['key']) {
selectIndex = index == 2 ? selectIndex + 1 : selectIndex
// selectIndex = index == 2 ? selectIndex + 1 : selectIndex
// console.log('selectIndex: ', selectIndex);
let itemIndx = item.selectIndex
obj[item['key']] = itemIndx == 2 ? '' : itemIndx
// console.log('itemIndx: ', itemIndx);
if(index == 2){
itemIndx += 1
}
obj[item['key']] = (itemIndx == 2 || itemIndx == 3)? '' : itemIndx
}
return obj
}, {})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!