Ver código fonte

花材接口更换

shish 5 anos atrás
pai
commit
785119c0a5

+ 3 - 1
ghs/src/cool/request/index.js

@@ -30,6 +30,7 @@ import itemClass from '@/service/item-class/index';
 import item from '@/service/item/index';
 import ptItem from '@/service/pt-item/index';
 import custom from '@/service/custom/index';
+import product from '@/service/product/index';
 
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
@@ -65,7 +66,8 @@ export function SET_SERVICE({ store }) {
 		itemClass,
 		item,
 		ptItem,
-		custom
+		custom,
+		product
 	};
 
 	Vue.prototype.$service = modules;

+ 7 - 0
ghs/src/service/product/index.js

@@ -0,0 +1,7 @@
+import { BaseService, Service } from '@/cool';
+
+@Service('product')
+export class ProductService extends BaseService {
+
+}
+export default new ProductService();

+ 2 - 2
ghs/src/views/item/list.vue

@@ -140,7 +140,7 @@ export default {
       this.app = app
 
       let getItem = () => {
-        return this.$service.item.list({ classId: this.classId })
+        return this.$service.product.list({ classId: this.classId, showPage:1})
       }
       ctx.service({
         page: getItem
@@ -159,7 +159,7 @@ export default {
 							'min-width': 100,
 						},
             {
-              prop: 'itemName',
+              prop: 'name',
               label: '名称',
               align: 'center',
               'min-width': 180

+ 3 - 1
hd/src/cool/request/index.js

@@ -29,6 +29,7 @@ import chat from '@/service/chat/index';
 import itemClass from '@/service/item-class/index';
 import item from '@/service/item/index';
 import ptItem from '@/service/pt-item/index';
+import product from '@/service/product/index';
 
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
@@ -63,7 +64,8 @@ export function SET_SERVICE({ store }) {
 		chat,
 		itemClass,
 		item,
-		ptItem
+		ptItem,
+		product
 	};
 
 	Vue.prototype.$service = modules;

+ 7 - 0
hd/src/service/product/index.js

@@ -0,0 +1,7 @@
+import { BaseService, Service } from '@/cool';
+
+@Service('product')
+export class ProductService extends BaseService {
+
+}
+export default new ProductService();

+ 2 - 2
hd/src/views/item/list.vue

@@ -166,7 +166,7 @@ export default {
       this.app = app
 
       let getItem = () => {
-        return this.$service.item.list({ classId: this.classId })
+        return this.$service.product.list({ classId: this.classId,showPage:1 })
       }
       ctx.service({
         page: getItem
@@ -185,7 +185,7 @@ export default {
 							'min-width': 100,
 						},
             {
-              prop: 'itemName',
+              prop: 'name',
               label: '名称',
               align: 'center',
               'min-width': 180