Browse Source

新加点击灰色按钮弹出提示~

hotfix/210830_二组需求分支
王饶冀 3 years ago
parent
commit
1dd84a35ec
2 changed files with 21 additions and 1 deletions
  1. 20
    0
      pages/releaseModule/index.js
  2. 1
    1
      pages/releaseModule/index.wxml

+ 20
- 0
pages/releaseModule/index.js View File

setTags: true setTags: true
}) })
}, },
notReleaseDemands(){
let { selectedTag, detailValue } = this.data;
if(!detailValue){
wx.showToast({
title: '需求详情不得为空~',
icon: 'none',
duration: 2000
})
return
}
if(selectedTag.length < 1){
wx.showToast({
title: '请至少选择需求一个类型~',
icon: 'none',
duration: 2000
})
return
}
},
// 发布需求 // 发布需求
releaseDemands() { releaseDemands() {
this.setData({ this.setData({
type: selectedTag.join(','), type: selectedTag.join(','),
businessCommunicationDemandId, businessCommunicationDemandId,
}; };
$request.post('/businessCommunicationDemand/saveDemand.action', param).then(res => { $request.post('/businessCommunicationDemand/saveDemand.action', param).then(res => {
this.setData({ this.setData({
saveLoading: false saveLoading: false

+ 1
- 1
pages/releaseModule/index.wxml View File

<van-button block color="#5e73e5" round wx:if="{{ (!!detailValue && selectedTag.length > 0) }}" bind:click="releaseDemands" loading="{{ saveLoading }}"> <van-button block color="#5e73e5" round wx:if="{{ (!!detailValue && selectedTag.length > 0) }}" bind:click="releaseDemands" loading="{{ saveLoading }}">
{{ businessCommunicationDemandId ? '确认修改':'发布需求'}} {{ businessCommunicationDemandId ? '确认修改':'发布需求'}}
</van-button> </van-button>
<view wx:else class="btn-span">
<view wx:else class="btn-span" bindtap="notReleaseDemands">
{{ businessCommunicationDemandId ? '确认修改':'发布需求'}} {{ businessCommunicationDemandId ? '确认修改':'发布需求'}}
</view> </view>
</view> </view>

Loading…
Cancel
Save