|
|
@ -31,7 +31,8 @@ Component({ |
|
|
|
//选择后获取的街道的I,
|
|
|
|
streetID:'', |
|
|
|
typeCode:'', |
|
|
|
textareaValue:'' |
|
|
|
textareaValue:'', |
|
|
|
error:'' |
|
|
|
}, |
|
|
|
// lifetimes: {
|
|
|
|
// attached: function () {
|
|
|
@ -82,7 +83,6 @@ Component({ |
|
|
|
}) |
|
|
|
//把streett添加第一项设为空
|
|
|
|
typeList.unshift('') |
|
|
|
console.log(111111111) |
|
|
|
console.log(typeList) |
|
|
|
|
|
|
|
this.setData({ |
|
|
@ -96,23 +96,34 @@ Component({ |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
bindPickerStreetsChange: function(e) { |
|
|
|
// console.log("1"+e.detail.value)
|
|
|
|
this.setData({ |
|
|
|
streetsIndex: e.detail.value |
|
|
|
}) |
|
|
|
// console.log("2"+this.data.streetsIndex)
|
|
|
|
this.setData({ |
|
|
|
streetID: this.data.results[this.data.streetsIndex-1].id |
|
|
|
}) |
|
|
|
// console.log(this.data.streetID)
|
|
|
|
if(e.detail.value == '0'){ |
|
|
|
this.setData({ |
|
|
|
streetID: '' |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.setData({ |
|
|
|
streetID: this.data.results[this.data.streetsIndex-1].id |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
bindPickerTypeChange:function(e){ |
|
|
|
this.setData({ |
|
|
|
typeListIndex: e.detail.value |
|
|
|
}) |
|
|
|
this.setData({ |
|
|
|
typeCode: this.data.list[this.data.typeListIndex-1].typeCode |
|
|
|
}) |
|
|
|
if(e.detail.value == '0'){ |
|
|
|
this.setData({ |
|
|
|
typeCode: '' |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.setData({ |
|
|
|
typeCode: this.data.list[this.data.typeListIndex-1].typeCode |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
bindTextInput(e) { |
|
|
|
this.setData({ |
|
|
@ -124,11 +135,15 @@ Component({ |
|
|
|
this.setData({ |
|
|
|
messageDetail: e.detail.value, |
|
|
|
}) |
|
|
|
if(e.detail.value.length>200){ |
|
|
|
wx.showToast({ |
|
|
|
title: '超过字数', |
|
|
|
duration: 2000, |
|
|
|
icon: 'none' |
|
|
|
console.log(e.detail.value.length) |
|
|
|
if(e.detail.value.length >= 200){ |
|
|
|
// wx.showToast({
|
|
|
|
// title: '超过字数',
|
|
|
|
// duration: 2000,
|
|
|
|
// icon: 'none'
|
|
|
|
// })
|
|
|
|
this.setData({ |
|
|
|
error: '已达最大字数' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
@ -203,7 +218,7 @@ Component({ |
|
|
|
if (this.data.typeCode === ''){ |
|
|
|
wx.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '请选择赋能类型', |
|
|
|
content: '请选择需求类型', |
|
|
|
showCancel:false |
|
|
|
}) |
|
|
|
return |
|
|
|