Browse Source

提交代码~

release/210823_需求对对碰
王饶冀 3 years ago
parent
commit
573b9329b4
2 changed files with 12 additions and 9 deletions
  1. 11
    8
      pages/myModule/components/myRelease/myRelease.js
  2. 1
    1
      utils/request.js

+ 11
- 8
pages/myModule/components/myRelease/myRelease.js View File

that.productReleasePost(item); that.productReleasePost(item);
} }
}, },
// 上架/下架需求 Fn
productReleasePost(item) { productReleasePost(item) {
wx.showLoading({
title: '加载中',
mask:true
})
this.showLoading();
let { businessCommunicationDemandId, state } = item; let { businessCommunicationDemandId, state } = item;
$request.post(`/businessCommunicationDemand/outDemand.action`, $request.post(`/businessCommunicationDemand/outDemand.action`,
{ businessCommunicationDemandId, state } { businessCommunicationDemandId, state }
} }
}) })
}, },
// 删除需求 Fn
productDelPost(item) { productDelPost(item) {
let { businessCommunicationDemandId } = item; let { businessCommunicationDemandId } = item;
wx.showLoading({
title: '加载中',
mask:true
})
this.showLoading();
$request.post(`/businessCommunicationDemand/deleteDemand.action`, $request.post(`/businessCommunicationDemand/deleteDemand.action`,
{ businessCommunicationDemandId } { businessCommunicationDemandId }
).then(res => { ).then(res => {
wx.hideLoading() wx.hideLoading()
}) })
}, },
// 数据加载提示
showLoading(title) {
wx.showLoading({
title: title ? title : '加载中',
mask: true
})
},
getListData() { getListData() {
let { page, size, customerId, keyword, currentTab } = this.data; let { page, size, customerId, keyword, currentTab } = this.data;
$request.get('/businessCommunicationDemand/getDemandByStateAndCustomerId.action', $request.get('/businessCommunicationDemand/getDemandByStateAndCustomerId.action',

+ 1
- 1
utils/request.js View File

} }
}, 500); }, 500);
}) })
!!contentType?contentType:contentType="application/x-www-form-urlencoded'"
!!contentType?contentType:contentType="application/json"
return new Promise( (resolve, reject) => { return new Promise( (resolve, reject) => {
wx.request({ wx.request({
url: `${app.mangerUrl}${url}?openId=${openId}`,//获取域名接口地址 url: `${app.mangerUrl}${url}?openId=${openId}`,//获取域名接口地址

Loading…
Cancel
Save