修复:完善数据迁移;修改logo及课程首页接口文件覆盖问题;
This commit is contained in:
@@ -7,8 +7,8 @@ export const ENV = process.env.NODE_ENV || 'development';
|
||||
*/
|
||||
const BASE_URL_MAP = {
|
||||
development: {
|
||||
//MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||
MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||
MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||
// MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
|
||||
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
|
||||
},
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
// api/modules/course.ts
|
||||
import { createRequestClient } from '../request'
|
||||
import { SERVICE_MAP } from '../config'
|
||||
import { mainClient, skeletonClient } from '@/api/clients'
|
||||
import type {
|
||||
ICourseCategoryResponse,
|
||||
IUserLateCourseListResponse,
|
||||
IMarketCourseListResponse,
|
||||
ICourseMedicalLabelsResponse
|
||||
} from '@/types/course'
|
||||
|
||||
|
||||
const client = createRequestClient({ baseURL: SERVICE_MAP.MAIN })
|
||||
|
||||
/**
|
||||
* 课程分类及分类下课程相关API
|
||||
*/
|
||||
@@ -21,7 +15,7 @@ export const courseSubjectClassificationApi = {
|
||||
* @returns 分类数据
|
||||
*/
|
||||
getCourseMedicalTree() {
|
||||
return client.request<ICourseCategoryResponse>({
|
||||
return mainClient.request<ICourseCategoryResponse>({
|
||||
url: uni.getStorageSync('token') ? 'medical/home/getCourseMedicalTree' : '/visitor/getCourseMedicalTree',
|
||||
method: 'POST',
|
||||
data: {}
|
||||
@@ -60,7 +54,7 @@ export const courseSubjectClassificationApi = {
|
||||
* @returns 分类数据
|
||||
*/
|
||||
getCourseMedicalLabels(id: number) {
|
||||
return client.request<ICourseCategoryResponse>({
|
||||
return mainClient.request<ICourseCategoryResponse>({
|
||||
url: 'medical/home/getMedicalLabels',
|
||||
method: 'POST',
|
||||
data: { id }
|
||||
@@ -73,7 +67,7 @@ export const courseSubjectClassificationApi = {
|
||||
* @returns 分类数据
|
||||
*/
|
||||
getCourseMedicalChildLabels(id: number) {
|
||||
return client.request<ICourseCategoryResponse>({
|
||||
return mainClient.request<ICourseCategoryResponse>({
|
||||
url: 'medical/home/getChildCourseMedicalTree',
|
||||
method: 'POST',
|
||||
data: { id }
|
||||
@@ -91,7 +85,7 @@ export const courseSubjectClassificationApi = {
|
||||
page: number, // 页码
|
||||
limit: number // 每页数量
|
||||
}) {
|
||||
return client.request<IMarketCourseListResponse>({
|
||||
return mainClient.request<IMarketCourseListResponse>({
|
||||
url: 'medical/home/getMedicalCourseList',
|
||||
method: 'POST',
|
||||
data
|
||||
@@ -104,7 +98,7 @@ export const courseSubjectClassificationApi = {
|
||||
* @returns 分类数据
|
||||
*/
|
||||
getCourseSoulChildLabels(id: number) {
|
||||
return client.request<ICourseCategoryResponse>({
|
||||
return mainClient.request<ICourseCategoryResponse>({
|
||||
url: 'psyche/home/getChildCoursePsycheTree',
|
||||
method: 'POST',
|
||||
data: { id }
|
||||
@@ -122,7 +116,7 @@ export const courseSubjectClassificationApi = {
|
||||
page: number, // 页码
|
||||
limit: number // 每页数量
|
||||
}) {
|
||||
return client.request<IMarketCourseListResponse>({
|
||||
return mainClient.request<IMarketCourseListResponse>({
|
||||
url: 'psyche/home/getPsycheCourseList',
|
||||
method: 'POST',
|
||||
data
|
||||
@@ -140,7 +134,7 @@ export const courseSubjectClassificationApi = {
|
||||
page: number, // 页码
|
||||
limit: number // 每页数量
|
||||
}) {
|
||||
return client.request<IMarketCourseListResponse>({
|
||||
return mainClient.request<IMarketCourseListResponse>({
|
||||
url: 'sociology/course/getSociologyCourseList',
|
||||
method: 'POST',
|
||||
data
|
||||
|
||||
@@ -324,7 +324,7 @@ export async function migrateUserData(data: { tel: string, code: string, type: s
|
||||
* }
|
||||
*/
|
||||
export async function getUserMigrateInfo() {
|
||||
const res = await mainClient.request<IApiResponse>({
|
||||
const res = await skeletonClient.request<IApiResponse>({
|
||||
url: 'common/user/getMigrationList',
|
||||
method: 'POST',
|
||||
})
|
||||
@@ -336,7 +336,7 @@ export async function getUserMigrateInfo() {
|
||||
* @return
|
||||
*/
|
||||
export async function getUserContributionData() {
|
||||
const res = await mainClient.request<IApiResponse>({
|
||||
const res = await skeletonClient.request<IApiResponse>({
|
||||
url: 'common/userContribution/getUserContribution',
|
||||
method: 'POST'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user