Skip to content

Commit

Permalink
fix(cloudTest): 克隆任务多余参数删除
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jul 5, 2022
1 parent eea287d commit a26b5fd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
27 changes: 19 additions & 8 deletions src/api/Dlink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
*/
// https://docs.parseplatform.org/rest/guide/#batch-operations
// http://prod.iotn2n.com/dgiot_swagger/#/Dlink/get_topic
import {
create_object,
del_object,
get_object,
query_object,
update_object,
} from '@/api/Parse'
import request from '@/utils/request/request'
import dgiotBus from '@dgiot/dgiot-mqtt-dashboard/src/utils/bus'

/**
* @description: 获取dlink json 列表
Expand Down Expand Up @@ -44,6 +36,25 @@ export async function getTopic(Topic = '$dg/user/router/thing/111/cmd/delete') {
})
}

/**
* @description: 通知后台客户端信息
* @param UserSession
* @returns {Promise<*>}
*/
export async function postCookie(UserSession) {
/**
* @description: 客户端信息
* @type {{mapType: string}}
*/
const clientInfo = { mapType: 'baidu' }
return request({
url: `/cookie`,
method: 'post',
Headers: { 'Content-Type': 'application/json', accept: 'application/json' },
data: { UserSession: UserSession, cookie: clientInfo },
})
}

export async function postTopic(Topic = '$dg/user/router/') {
const submessage = request({
url: `topic`,
Expand Down
7 changes: 6 additions & 1 deletion src/dgiot/components/DgiotRoleTree/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
import { Permission } from '@/api/Permission'
import { getProtocol } from '@/api/Protocol'
import { queryProduct } from '@/api/Product'
import { getDlinkJson } from '@/api/Dlink'
import { getDlinkJson, postCookie } from '@/api/Dlink'
import store from '@/store'
export default {
name: 'DgiotRoleTree',
Expand Down Expand Up @@ -209,6 +210,10 @@
}
const { results: permission = [] } = await Permission()
const chart = await getDlinkJson('ChartType')
const info = await postCookie(
store.getters['user/token']
)
console.log(info)
this.setPermission(permission)
const protocol = await getProtocol()
// protocol做排序处理
Expand Down
1 change: 1 addition & 0 deletions src/views/CloudPressure/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@
delete device.objectId
delete device.endTime
delete device.startTime
delete device.loading
// delete device.ip
// delete device.basedata
// delete device.devaddr
Expand Down

0 comments on commit a26b5fd

Please sign in to comment.