#1906 fixed search multi keys (ajax query params miswrited qs.stringify arrayFormat)
This commit is contained in:
@@ -135,7 +135,7 @@ export default {
|
||||
},
|
||||
getResults ({ dispatch, commit, state }) {
|
||||
const params = {
|
||||
keys: state.keys,
|
||||
keys: state.keys.join(', '),
|
||||
terms: JSON.stringify(state.terms),
|
||||
offset: state.offset,
|
||||
limit: state.limit
|
||||
@@ -147,6 +147,9 @@ export default {
|
||||
}
|
||||
// console.log('Search getResults params', params)
|
||||
const q = qs.stringify(params)
|
||||
// * Qs.Stringify () Arrayformat: 'Repeat' : https://programmerall.com/article/31901061156/
|
||||
// const q = qs.stringify(params, { arrayFormat: 'comma', encode: false })
|
||||
// * arrayFormat is not working, made state.keys.join(', ') instead
|
||||
return MA.get('/materio_sapi/getresults?' + q)
|
||||
.then(({ data }) => {
|
||||
console.log('search MA getresults data', data, state.terms)
|
||||
|
Reference in New Issue
Block a user