fuxubing 3 years ago
parent
commit
2a2c66539d
2 changed files with 524 additions and 347 deletions
  1. 59 52
      src/api/goods.js
  2. 465 295
      src/views/goods/create.vue

+ 59 - 52
src/api/goods.js

@@ -2,88 +2,95 @@ import request from '@/utils/request'
 import Qs from 'qs'
 
 export function listGoods(query) {
-  return request({
-    url: '/goods/list',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/goods/list',
+        method: 'get',
+        params: query
+    })
 }
 
 export function listGoods3() {
-  return request({
-    url: '/goods/list23',
-    method: 'get'
-  })
+    return request({
+        url: '/goods/list23',
+        method: 'get'
+    })
 }
 
 export function deleteGoods(data) {
-  return request({
-    url: '/goods/delete',
-    method: 'post',
-    data
-  })
+    return request({
+        url: '/goods/delete',
+        method: 'post',
+        data
+    })
 }
 
 export function publishGoods(data) {
-  return request({
-    url: '/goods/create',
-    method: 'post',
-    data
-  })
+    return request({
+        url: '/goods/create',
+        method: 'post',
+        data
+    })
 }
 
 // 商品上架按钮
 export function onsale(data) {
-  return request({
-    url: '/goods/onsale',
-    method: 'post',
-    data
-  })
+    return request({
+        url: '/goods/onsale',
+        method: 'post',
+        data
+    })
 }
 // 商品热卖
 export function onhot(data) {
-  return request({
-    url: '/goods/onhot',
-    method: 'post',
-    data
-  })
+    return request({
+        url: '/goods/onhot',
+        method: 'post',
+        data
+    })
 }
 // 商品新品
 export function onnew(data) {
-  return request({
-    url: '/goods/onnew',
-    method: 'post',
-    data
-  })
+    return request({
+        url: '/goods/onnew',
+        method: 'post',
+        data
+    })
 }
 
 export function detailGoods(id) {
-  return request({
-    url: '/goods/detail',
-    method: 'get',
-    params: { id }
-  })
+    return request({
+        url: '/goods/detail',
+        method: 'get',
+        params: { id }
+    })
 }
 
 export function editGoods(data) {
-  return request({
-    url: '/goods/update',
-    method: 'post',
-    data
-  })
+    return request({
+        url: '/goods/update',
+        method: 'post',
+        data
+    })
 }
 
 export function listCatAndBrand() {
-  return request({
-    url: '/goods/catAndBrand',
-    method: 'get'
-  })
+    return request({
+        url: '/goods/catAndBrand',
+        method: 'get'
+    })
 }
 
 
 export function getSkills() {
-  return request({
-    url: '/goods/skills',
-    method: 'get'
-  })
+    return request({
+        url: '/goods/skills',
+        method: 'get'
+    })
 }
+
+export function getShop() {
+    return request({
+        url: '/goods/shop',
+        method: 'get'
+    })
+}

File diff suppressed because it is too large
+ 465 - 295
src/views/goods/create.vue