联调拆表
This commit is contained in:
@@ -70,6 +70,6 @@ export const installMeter = async function(data) {
|
||||
}
|
||||
|
||||
// 拆表
|
||||
export const uninstallMeter = async function(sn) {
|
||||
return await DELETE(`/flow/doMeterRemoveApproval?sn=${sn}`);
|
||||
export const uninstallMeter = async function({sn, reason, images}) {
|
||||
return await DELETE(`/flow/doMeterRemoveApproval`, { sn, reason, images });
|
||||
}
|
||||
@@ -63,6 +63,26 @@ export const uploadInstallMeter = (filePath) => {
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadUninstallMeter = (filePath) => {
|
||||
const { api } = getConfigByEnv();
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
filePath: filePath,
|
||||
name: 'data',
|
||||
url: `${api}/image/meter/delete`,
|
||||
header: {
|
||||
authorization: 'Bearer ' + wx.getStorageSync("token")
|
||||
},
|
||||
success: (res) => {
|
||||
resolve(res?.data ? JSON.parse(res?.data) : res?.data);
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadPublicFile = (filePath) => {
|
||||
const { api } = getConfigByEnv();
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user