完成适配移动端
This commit is contained in:
@@ -128,7 +128,7 @@ export async function getPrevious(params?: CmsArticleParam) {
|
||||
if (res.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
return Promise.reject();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,7 +145,7 @@ export async function getNext(params?: CmsArticleParam) {
|
||||
if (res.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
return Promise.reject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,6 +112,8 @@ export interface CmsArticle {
|
||||
*/
|
||||
export interface CmsArticleParam extends PageParam {
|
||||
articleId?: number;
|
||||
websiteId?: number;
|
||||
websiteUserId?: number;
|
||||
articleIds?: string;
|
||||
parentId?: number;
|
||||
status?: number;
|
||||
|
||||
@@ -28,6 +28,8 @@ export interface CmsOrder {
|
||||
address?: string;
|
||||
// 订单内容
|
||||
content?: string;
|
||||
// 参考网址
|
||||
reference?: string;
|
||||
// 订单总额
|
||||
totalPrice?: string;
|
||||
// 实际付款
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
|
||||
import type {CmsWebsiteSetting} from "~/api/cms/cmsWebsiteSetting/model";
|
||||
|
||||
/**
|
||||
* 网站信息记录表
|
||||
@@ -123,10 +124,12 @@ export interface CmsWebsite {
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 网站配置
|
||||
// 网站配置参数
|
||||
config?: any;
|
||||
topNavs?: CmsNavigation[];
|
||||
bottomNavs?: CmsNavigation[];
|
||||
// 网站设置
|
||||
setting?: CmsWebsiteSetting;
|
||||
loginUser?: any;
|
||||
}
|
||||
|
||||
@@ -143,5 +146,6 @@ export interface CmsWebsiteParam extends PageParam {
|
||||
search?: boolean;
|
||||
websiteType?: string;
|
||||
userId?: number;
|
||||
limit?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { ApiResult } from '@/api';
|
||||
import type { User } from '@/api/system/user/model';
|
||||
import type { UpdatePasswordParam } from './model';
|
||||
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
||||
import {SERVER_API_URL} from "~/config";
|
||||
import {COMMON_API_URL, SERVER_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 获取网站信息
|
||||
@@ -26,7 +26,7 @@ export async function getSiteInfo(params: CmsWebsiteParam) {
|
||||
*/
|
||||
export async function getUserInfo(): Promise<User> {
|
||||
const config = useRuntimeConfig();
|
||||
const res = await request.get<ApiResult<User>>(SERVER_API_URL + '/auth/user',{
|
||||
const res = await request.get<ApiResult<User>>(COMMON_API_URL + '/auth/user',{
|
||||
headers: {
|
||||
TenantId: `${localStorage.getItem('ServerTenantId')}`
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopMerchant, ShopMerchantParam } from './model';
|
||||
import {SERVER_API_URL} from "~/config";
|
||||
import {COMMON_API_URL, SERVER_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 分页查询商户
|
||||
@@ -124,7 +124,7 @@ export async function getShopMerchantByUserId(id: number) {
|
||||
*/
|
||||
export async function getShopMerchantByPhone() {
|
||||
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||
SERVER_API_URL + '/shop/shop-merchant/getByPhone'
|
||||
COMMON_API_URL + '/shop/shop-merchant/getByPhone'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopMerchantApply, ShopMerchantApplyParam } from './model';
|
||||
import {SERVER_API_URL} from "~/config";
|
||||
import {COMMON_API_URL, SERVER_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 分页查询商户入驻申请
|
||||
@@ -123,7 +123,7 @@ export async function getShopMerchantApplyByUserId() {
|
||||
*/
|
||||
export async function getShopMerchantApplyByPhone() {
|
||||
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||
SERVER_API_URL + '/shop/shop-merchant-apply/getByPhone'
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply/getByPhone'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
|
||||
Reference in New Issue
Block a user