|
|
@@ -183,23 +183,23 @@ export default {
|
|
|
this.pageParams.page = 1
|
|
|
this.pageCommodity(this.pageParams, this.ids, keyword)
|
|
|
},
|
|
|
-// async pageCommodity (pageParams, kindId, keyword) {
|
|
|
- pageCommodity (pageParams, kindId, keyword) {
|
|
|
+ async pageCommodity (pageParams, kindId, keyword) {
|
|
|
+// pageCommodity (pageParams, kindId, keyword) {
|
|
|
let params = { storeid: this.$route.params.uuid, origin: 'store', kindUuid: kindId, code: keyword }
|
|
|
params.page = pageParams.page
|
|
|
params.count = pageParams.count
|
|
|
|
|
|
-// try {
|
|
|
-// let { data } = await this.$http.get('/api/commodity/commodities', { params })
|
|
|
-// this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', data)
|
|
|
-// } catch (err) {
|
|
|
-// this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
|
|
|
-// }
|
|
|
- this.$http.get('/api/commodity/commodities', { params }).then(response => {
|
|
|
- this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', response)
|
|
|
- }, err => {
|
|
|
+ try {
|
|
|
+ let { data } = await this.$http.get('/api/commodity/commodities', { params })
|
|
|
+ this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', data)
|
|
|
+ } catch (err) {
|
|
|
this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
|
|
|
- })
|
|
|
+ }
|
|
|
+// this.$http.get('/api/commodity/commodities', { params }).then(response => {
|
|
|
+// this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', response)
|
|
|
+// }, err => {
|
|
|
+// this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
|
|
|
+// })
|
|
|
},
|
|
|
handleCurrentChange (page) {
|
|
|
this.pageParams.page = page
|