Selaa lähdekoodia

[ 花店后台 ] 增加api接口

wangning 5 vuotta sitten
vanhempi
commit
fe5a79d62a

+ 1 - 1
hd/src/pages/layout/topbar/index.vue

@@ -120,7 +120,7 @@ export default {
 
 <style lang="stylus" scoped>
 .popper-dropdown-menu-user {
-	width: 160px;
+	min-width: 160px;
 }
 </style>
 

+ 11 - 1
hd/src/service/product/index.js

@@ -2,6 +2,16 @@ import { BaseService, Service } from '@/cool';
 
 @Service('product')
 export class ProductService extends BaseService {
-
+  // 花材详细
+	productDetail(data) {
+		return this.request({
+			url: '/product/detail',
+			params: data
+		}).then(res => {
+			return {
+				list: res
+			};
+		});
+	}
 }
 export default new ProductService();

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

@@ -332,9 +332,12 @@ export default {
     tabClick (tab, e) {
       this.app.refresh({ classId: this.classId });
     },
-    replaceBtnFn() {
+    replaceBtnFn(id) {
       this.addDialog = true
       this.getAllClass()
+      this.$service.product.productDetail(res => {
+        console.log(res)
+      })
     },
     onLoad ({ ctx, app }) {
       if (this.$route.query.classId) {