Просмотр исходного кода

fix(frontend): 修正7个小程序API路径错误(article/supplier/messages/upload/families)

Xiaogang Liao 3 месяцев назад
Родитель
Сommit
262a1ce48f

+ 1 - 1
cfc-frontend/pages/activity/create.vue

@@ -254,7 +254,7 @@ export default {
     uploadCover(filePath) {
     uploadCover(filePath) {
       var self = this
       var self = this
       uni.uploadFile({
       uni.uploadFile({
-        url: BASE_URL + '/api/admin/article/upload/image',
+        url: BASE_URL + '/api/admin/articles/upload/image',
         filePath: filePath,
         filePath: filePath,
         name: 'file',
         name: 'file',
         header: { 'Authorization': 'Bearer ' + (uni.getStorageSync('token') || '') },
         header: { 'Authorization': 'Bearer ' + (uni.getStorageSync('token') || '') },

+ 1 - 1
cfc-frontend/pages/article-center/article-edit.vue

@@ -134,7 +134,7 @@ export default {
           // 上传图片
           // 上传图片
           var token = uni.getStorageSync('token')
           var token = uni.getStorageSync('token')
           uni.uploadFile({
           uni.uploadFile({
-            url: (config.default && config.default.API_BASE_URL) || config.API_BASE_URL || '' + '/api/upload/image',
+            url: (config.default && config.default.API_BASE_URL) || config.API_BASE_URL || '' + '/api/media/upload',
             filePath: tempPath,
             filePath: tempPath,
             name: 'file',
             name: 'file',
             header: {
             header: {

+ 1 - 1
cfc-frontend/pages/discover/product-detail/product-detail.vue

@@ -220,7 +220,7 @@ export default {
     loadSuppliers(productId) {
     loadSuppliers(productId) {
       var that = this
       var that = this
       uni.request({
       uni.request({
-        url: config.api('/api/admin/product/supplier/list'),
+        url: config.api('/api/admin/supplier/product/list'),
         method: 'POST',
         method: 'POST',
         data: { productId: productId },
         data: { productId: productId },
         header: {
         header: {

+ 1 - 1
cfc-frontend/pages/guide/bind/invite.vue

@@ -123,7 +123,7 @@ export default {
     loadFamilies() {
     loadFamilies() {
       // 获取家庭列表
       // 获取家庭列表
       uni.request({
       uni.request({
-        url: `${getApp().globalData.baseUrl}/api/user/families`,
+        url: `${getApp().globalData.baseUrl}/api/family/user/family-members`,
         header: { Authorization: `Bearer ${uni.getStorageSync('token')}` },
         header: { Authorization: `Bearer ${uni.getStorageSync('token')}` },
         success: (res) => {
         success: (res) => {
           if (res.data.code === 200) {
           if (res.data.code === 200) {

+ 1 - 1
cfc-frontend/pages/mind-detail/emotion-checkin.vue

@@ -719,7 +719,7 @@ export default {
       var mediaPath = this.photoPath || this.videoPath
       var mediaPath = this.photoPath || this.videoPath
       if (mediaPath) {
       if (mediaPath) {
         uni.uploadFile({
         uni.uploadFile({
-          url: config.API_BASE_URL + '/api/upload',
+          url: config.API_BASE_URL + '/api/media/upload',
           filePath: mediaPath,
           filePath: mediaPath,
           name: 'file',
           name: 'file',
           success: (uploadRes) => {
           success: (uploadRes) => {

+ 1 - 1
cfc-frontend/pages/mind/emotion-checkin.vue

@@ -529,7 +529,7 @@ export default {
 
 
       if (this.photoPath) {
       if (this.photoPath) {
         uni.uploadFile({
         uni.uploadFile({
-          url: config.API_BASE_URL + '/api/upload',
+          url: config.API_BASE_URL + '/api/media/upload',
           filePath: this.photoPath,
           filePath: this.photoPath,
           name: 'file',
           name: 'file',
           success: (uploadRes) => {
           success: (uploadRes) => {

+ 2 - 2
cfc-frontend/pages/teacher/chat.vue

@@ -53,7 +53,7 @@ export default {
     async loadMessages() {
     async loadMessages() {
       try {
       try {
         const res = await uni.request({
         const res = await uni.request({
-          url: `${getApp().globalData.baseUrl}/api/guide/messages/${this.conversationId}`,
+          url: `${getApp().globalData.baseUrl}/api/guide/messages/${this.conversationId}/reply`,
           method: 'GET',
           method: 'GET',
           header: { Authorization: `Bearer ${uni.getStorageSync('token')}` }
           header: { Authorization: `Bearer ${uni.getStorageSync('token')}` }
         })
         })
@@ -89,7 +89,7 @@ export default {
 
 
       try {
       try {
         await uni.request({
         await uni.request({
-          url: `${getApp().globalData.baseUrl}/api/guide/messages`,
+          url: `${getApp().globalData.baseUrl}/api/guide/messages/list`,
           method: 'POST',
           method: 'POST',
           header: { Authorization: `Bearer ${uni.getStorageSync('token')}` },
           header: { Authorization: `Bearer ${uni.getStorageSync('token')}` },
           data: {
           data: {