Commit 335d94aa by luyt

fix:线索分页类型

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