Browse Source

调用接口

yangming 5 years ago
parent
commit
0700564c73
1 changed files with 4 additions and 3 deletions
  1. 4 3
      hd/src/views/item/list.vue

+ 4 - 3
hd/src/views/item/list.vue

@@ -76,7 +76,7 @@
        <template #slot-modify="{ scope }">
        <template #slot-modify="{ scope }">
 				<el-button
 				<el-button
 					type="text"
 					type="text"
-					@click.native.stop="replaceBtnFn"
+					@click.native.stop="replaceBtnFn(scope.row.id)"
 					>修改</el-button
 					>修改</el-button
 				>
 				>
 			</template>
 			</template>
@@ -221,6 +221,7 @@ export default {
       sort: {
       sort: {
         status: false
         status: false
       },
       },
+      itemClassList: [],
       classId: 0,
       classId: 0,
       className:'',
       className:'',
       showItemModal: false,
       showItemModal: false,
@@ -335,8 +336,8 @@ export default {
     replaceBtnFn(id) {
     replaceBtnFn(id) {
       this.addDialog = true
       this.addDialog = true
       this.getAllClass()
       this.getAllClass()
-      this.$service.product.productDetail(res => {
-        console.log(res)
+      this.$service.product.productDetail({id}).then(res => {
+        console.log('res', res)
       })
       })
     },
     },
     onLoad ({ ctx, app }) {
     onLoad ({ ctx, app }) {