ソースを参照

接口文件迁移至@/api/mall/product

lifanagju_citu 5 ヶ月 前
コミット
f4fa098087
3 ファイル変更18 行追加9 行削除
  1. 8 8
      src/api/mall.js
  2. 9 0
      src/api/mall/product.js
  3. 1 1
      src/views/mall/components/details.vue

+ 8 - 8
src/api/mall.js

@@ -1,4 +1,4 @@
-import request from '@/config/axios'
+// import request from '@/config/axios'
 
 // // 提交积分商品兑换
 // export const redeemSubmit = async (data) => {
@@ -9,10 +9,10 @@ import request from '@/config/axios'
 //   })
 // }
 
-// 获取商品详情
-export const getProductDetail = async (params) => {
-  return request.get({
-    url: '/app-api/product/spu/get-detail',
-    params
-  })
-}
+// // 获取商品详情
+// export const getProductDetail = async (params) => {
+//   return request.get({
+//     url: '/app-api/product/spu/get-detail',
+//     params
+//   })
+// }

+ 9 - 0
src/api/mall/product.js

@@ -0,0 +1,9 @@
+import request from '@/config/axios'
+
+// 获取商品详情
+export const getProductDetail = async (params) => {
+  return request.get({
+    url: '/app-api/product/spu/get-detail',
+    params
+  })
+}

+ 1 - 1
src/views/mall/components/details.vue

@@ -68,7 +68,7 @@
 
 <script setup>
 defineOptions({name: 'goods-details'})
-import { getProductDetail } from '@/api/mall'
+import { getProductDetail } from '@/api/mall/product'
 import selectSku from './details/s-select-sku.vue'
 import describe from './details/describe.vue'
 // import comment from './details/detail-comment-card.vue'