wangxy пре 20 часа
родитељ
комит
da6450e152
2 измењених фајлова са 28 додато и 3 уклоњено
  1. 25 0
      api/chaojidanci.js
  2. 3 3
      pages/chanpinXuanze/cp4/banben.vue

+ 25 - 0
api/chaojidanci.js

@@ -59,4 +59,29 @@ export function getWordZhangwo(data = {}) {
     data,
     timeout: 20000
   })
+}
+
+
+export function getDanciChanpinBanbenList(data = {}) {
+  return request({
+    'url': '/app/danci/chanpin/banben/list',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getDanciChanpinBanbenSave(data = {}) {
+  return request({
+    'url': '/app/danci/chanpin/banben/save',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
 }

+ 3 - 3
pages/chanpinXuanze/cp4/banben.vue

@@ -31,7 +31,7 @@
 <script setup>
 import {reactive} from "vue";
 import {onLoad} from "@dcloudio/uni-app"
-import * as shuxueHttp from "@/api/chanpinShuxue.js"
+import * as danciHttp from "@/api/chaojidanci.js"
 import cacheManager from "@/utils/cacheManager.js";
 import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
 
@@ -41,7 +41,7 @@ const data = reactive({
 })
 
 function getBanbenList() {
-  shuxueHttp.getShuxueChanpinBanbenList({dengjiId: data.dengjiId}).then(res => {
+  danciHttp.getDanciChanpinBanbenList({dengjiId: data.dengjiId}).then(res => {
     data.banbenList = res.data;
   })
 }
@@ -56,7 +56,7 @@ function handleSelect(item) {
   const opt = {
     banbenId: item.id,
   }
-  shuxueHttp.getShuxueChanpinBanbenSave(opt).then(res => {
+  danciHttp.getDanciChanpinBanbenSave(opt).then(res => {
     if (!res.data) { return;}
     cacheManager.get('contentInfo') && cacheManager.remove('contentInfo');
     // 跳转