Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

把批量删除加上去就更完美了,表格一般都会有批量删除 #320

Closed
yanghong1105 opened this issue Jun 1, 2017 · 7 comments

Comments

@yanghong1105
Copy link

No description provided.

@zuiidea
Copy link
Owner

zuiidea commented Jun 1, 2017

b83c5e7 ,加上了

@yanghong1105
Copy link
Author

批量删除的时候如果选中2,3请求地址是/delelt/2,3,这种地址应该怎么匹配

@zuiidea
Copy link
Owner

zuiidea commented Jun 5, 2017

我有封装这种restful风格啊

request({
    url: `/delelte/:id`,
    method: 'delelte',
    data: {
       id:'2,3'
    },
  })

@yanghong1105
Copy link
Author

url:'/delete/:id'
GET /o/organ/delelte/:id?ids[]=nmnmnmnmn&ids[]=tytytytyt
用get请求的时候怎么是这种情况,而不是我想要的delete/nmnmnmnmn,tytytytyt 这种形式,这是哪的问题请教一下 您

@zuiidea
Copy link
Owner

zuiidea commented Jun 6, 2017

:id 就代表 data 里的id属性,只是一个变量而已,你既然叫ids那就可以改成

request({
    url: `/delelte/:ids`,
    method: 'delelte',
    data: {
       ids:'nmnmnmnmn,tytytytyt '
    },
  })

url中的多个中括号代表的是数组,你传的ids是数组不是字符串吧

@yanghong1105
Copy link
Author

我这边传的是数组,但是删除的时候不对,地址GET /o/organ/delelte/:id?id[]=nmnmnmnmn&id[]=tytytytyt

url:'"/o/organ/delelte/:id"'
id:Array[2]
0:"nmnmnmnmn"
1:"tytytytyt"
length:2

@yanghong1105
Copy link
Author

解决了,谢谢楼主

@zuiidea zuiidea closed this as completed Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants