修改分类获取入参
This commit is contained in:
parent
2d1f0f79e0
commit
4173ba1ec2
|
@ -3,12 +3,13 @@ let prototype = Vue.prototype;
|
|||
|
||||
export default {
|
||||
/**
|
||||
* 安装分类
|
||||
* 服务分类
|
||||
*/
|
||||
getInstallCate() {
|
||||
getCate(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
prototype.$request({
|
||||
api: "service.cate",
|
||||
data: data
|
||||
}).then((response) => {
|
||||
if (response.code == 1) {
|
||||
let list = [];
|
||||
|
|
|
@ -251,7 +251,11 @@ export default {
|
|||
});
|
||||
// #endif
|
||||
this.$store.dispatch("service/insurancePrice");
|
||||
this.$models.service.getInstallCate().then((list) => {
|
||||
this.$models.service
|
||||
.getCate({
|
||||
type: 0,
|
||||
})
|
||||
.then((list) => {
|
||||
this.cateList = list;
|
||||
if (e.id && e.id > 0) {
|
||||
list.forEach((item) => {
|
||||
|
|
|
@ -126,31 +126,15 @@ export default {
|
|||
* 分类
|
||||
*/
|
||||
loadCate() {
|
||||
this.$request({
|
||||
api: "service.cate",
|
||||
data: {
|
||||
let that = this;
|
||||
this.$models.service
|
||||
.getCate({
|
||||
keys: this.keywords,
|
||||
},
|
||||
type: 1,
|
||||
})
|
||||
.then((response) => {
|
||||
response.data.forEach((item) => {
|
||||
let child = [];
|
||||
item.child.forEach((v) => {
|
||||
child.push({
|
||||
id: v.id,
|
||||
name: v.name,
|
||||
cover: v.more,
|
||||
.then((list) => {
|
||||
that.data = this.data.concat(list);
|
||||
});
|
||||
});
|
||||
this.data.push({
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
cover: item.more,
|
||||
child: child,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {});
|
||||
},
|
||||
onScroll(id) {
|
||||
this.newId = id;
|
||||
|
|
Loading…
Reference in New Issue