restapi.js
1.16 KB
const restapi = require('../../../utils/restapi.js');
module.exports = {
//获取云防盗列表
getCloudSecurity: function (userId, success, fail) {
restapi.req('/web-dj-weapp/cloudSecurity/getCloudSecurityList', { protocolId: userId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
//修改云防盗数据
updateCloudSecurity: function (obj, success, fail) {
restapi.req('/web-dj-weapp/cloudSecurity/updateCloudSecurity', obj, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
//删除云防盗设置
deleteCloudSecurity: function (userId, group, success, fail) {
restapi.req('/web-dj-weapp/cloudSecurity/deleteCloudSecurity', { userId: userId, group: group }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
//更新云防盗开关
updateCloudSecurityEnable: function (obj, success, fail) {
restapi.req('/web-dj-weapp/cloudSecurity/updateCloudSecurityEnable', obj, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
}
}