Skip to content

Commit e8a1148

Browse files
author
anthinkingcoder
committed
update readme.md
1 parent 15eb507 commit e8a1148

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const api = {
2323
errorCb(error)
2424
})
2525
},
26-
productDetail () {
27-
return fetch('/api/productDetail')
26+
productDetail (id) {
27+
return fetch(`/api/productDetail?id=${id}`)
2828
}
2929
}
3030
const state = {
@@ -49,8 +49,8 @@ const actions = {
4949
})
5050
},
5151
productDetail ({{commit}}) {
52-
vxl.aopLoading(commit, 'productDetail', api.productDetail,true)
53-
.then((result) => {
52+
let request = vxl.aopLoading(commit, 'productDetail', api.productDetail,true)
53+
request(1).then((result) => {
5454
commit('setProducts', result)
5555
}).catch(error => {
5656
console.info(error)

0 commit comments

Comments
 (0)