|
@@ -87,15 +87,21 @@ export default {
|
|
|
}
|
|
}
|
|
|
return description.slice(0, 160)
|
|
return description.slice(0, 160)
|
|
|
},
|
|
},
|
|
|
- async pageCommodity (pageParams) {
|
|
|
|
|
|
|
+// async pageCommodity (pageParams) {
|
|
|
|
|
+ pageCommodity (pageParams) {
|
|
|
pageParams.op = 'pageByType'
|
|
pageParams.op = 'pageByType'
|
|
|
|
|
|
|
|
- try {
|
|
|
|
|
- let { data } = await this.$http.get('/api/store-service/stores', { params: pageParams })
|
|
|
|
|
- this.$store.commit('provider/stores/GET_STORE_LIST_SUCCESS', data)
|
|
|
|
|
- } catch (err) {
|
|
|
|
|
|
|
+// try {
|
|
|
|
|
+// let { data } = await this.$http.get('/api/store-service/stores', { params: pageParams })
|
|
|
|
|
+// this.$store.commit('provider/stores/GET_STORE_LIST_SUCCESS', data)
|
|
|
|
|
+// } catch (err) {
|
|
|
|
|
+// this.$store.commit('provider/stores/GET_STORE_LIST_FAILURE', err)
|
|
|
|
|
+// }
|
|
|
|
|
+ this.$http.get('/api/store-service/stores', { params: pageParams }).then(response => {
|
|
|
|
|
+ this.$store.commit('provider/stores/GET_STORE_LIST_SUCCESS', response)
|
|
|
|
|
+ }, err => {
|
|
|
this.$store.commit('provider/stores/GET_STORE_LIST_FAILURE', err)
|
|
this.$store.commit('provider/stores/GET_STORE_LIST_FAILURE', err)
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
handleCurrentChange (page) {
|
|
handleCurrentChange (page) {
|
|
|
this.pageParams.page = page
|
|
this.pageParams.page = page
|