diff --git a/src/pages/service/cart.vue b/src/pages/service/cart.vue index b4358a6..1bbb6c4 100644 --- a/src/pages/service/cart.vue +++ b/src/pages/service/cart.vue @@ -54,38 +54,7 @@ export default { name: "order-cart", data() { return { - list: [ - { - id: 1, - name: "空调安装", - list: [ - { - id: 1, - name: "格力空调安装", - icon: require("@/static/temp/cate/1.png"), - buyNumber: 1, - }, - { - id: 2, - name: "美的空调安装", - icon: require("@/static/temp/cate/1.png"), - buyNumber: 1, - }, - ], - }, - { - id: 2, - name: "管道疏通", - list: [ - { - id: 3, - name: "厨房下水道", - icon: require("@/static/temp/cate/1.png"), - buyNumber: 10, - }, - ], - }, - ], + list: [], }; }, components: { @@ -97,7 +66,38 @@ export default { ServicePreviewItem, }, onLoad() { - this.list = this.parseList(this.list); + this.list = this.parseList([ + { + id: 1, + name: "空调安装", + list: [ + { + id: 1, + name: "格力空调安装", + icon: require("@/static/temp/cate/1.png"), + buyNumber: 1, + }, + { + id: 2, + name: "美的空调安装", + icon: require("@/static/temp/cate/1.png"), + buyNumber: 1, + }, + ], + }, + { + id: 2, + name: "管道疏通", + list: [ + { + id: 3, + name: "厨房下水道", + icon: require("@/static/temp/cate/1.png"), + buyNumber: 10, + }, + ], + }, + ]); }, onShow() {}, onReady() {}, @@ -137,7 +137,7 @@ export default { } }); this.list[parentIndex].checked = allChecked; - this.$forceUpdate(); + // this.$forceUpdate(); }, changeNumber(e, d) { console.log(e);