爱尚家接口合并到cms-api.websoft.top

This commit is contained in:
2025-03-05 17:21:00 +08:00
parent 5a030d5a30
commit 2c77a45e5d
23 changed files with 202 additions and 94 deletions

39
api/config.js Executable file
View File

@@ -0,0 +1,39 @@
module.exports = {
// 系统名称
name: "爱尚家",
// 应用ID
appId: 10100,
// 租户ID
tenantId: 10058,
// 应用秘钥
appSecret: '1f1d186d98ea4620ac65afbf34940051',
// 开发环境
// apiUrl: "http://127.0.0.1:9095/api",
// socketUrl: 'ws://localhost:9190',
// fileUrl: 'https://file.wsdns.cn',
// apiUrl: "http://47.119.165.234:5483/api",
// 测试环境
// apiUrl: 'https://server.gxwebsoft.com/api',
// socketUrl: 'wss://server.gxwebsoft.com',
fileUrl: 'https://file.wsdns.cn',
// 生产环境
serverUrl: 'https://server.gxwebsoft.com/api',
apiUrl: 'https://cms-api.websoft.top/api',
socketUrl: 'wss://server.gxwebsoft.com',
// fileUrl: 'https://oss.jimeigroup.cn',
// 游客 userId
userId: 3373,
// 用户ID前缀
userIdPrefix: 6675,
// AccessKeyID
accessKey: 'AI4TyZKCjOUwfq2qtZ',
// AccessSecret
accessSecret: 'rITq2UmCZ3FVEfMBbzVQoqlfjedFREwh'
}

View File

@@ -1,9 +1,12 @@
import http from './index.js';
import {
serverUrl
} from '@/config.js';
// 读取字典数据
export const getDictionaryOptions = (params) => http.get('/system/dict-data', {params})
export const getDictionaryOptions = (params) => http.get(serverUrl + '/system/dict-data', {params})
export const listDictionary = (params) => http.get('/system/dict/tree', {params})
export const listDictionary = (params) => http.get(serverUrl + '/system/dict/tree', {params})
export default {

View File

@@ -1,31 +1,31 @@
import http from './index.js';
// 分页查询房源信息
export const pageHouseInfo = (params) => http.get('/house/info/page', {params})
export const pageHouseInfo = (params) => http.get('/house/house-info/page', {params})
// 查询全部房源信息
export const listHouseInfo = (params) => http.get('/house/info', {params})
export const listHouseInfo = (params) => http.get('/house/house-info', {params})
// 查询房源信息(当期登录用户)
export const getHouseInfo = (userId) => http.get('/house/info/' + userId)
export const getHouseInfo = (userId) => http.get('/house/house-info/' + userId)
// 查询会员资料
export const getUserDetail = (userId) => http.get('/house/info/detail/' + userId)
export const getUserDetail = (userId) => http.get('/house/house-info/detail/' + userId)
// 新增房源信息
export const addHouseInfo = (data) => http.post('/house/info', data)
export const addHouseInfo = (data) => http.post('/house/house-info', data)
// 编辑房源信息
export const updateHouseInfo = (data) => http.put('/house/info', data)
export const updateHouseInfo = (data) => http.put('/house/house-info', data)
// 删除房源信息
export const removeHouseInfo = (id) => http.delete('/house/info/' + id)
export const removeHouseInfo = (id) => http.delete('/house/house-info/' + id)
// 收藏房源
export const likeHouse = (data) => http.post('/house/like-log', data)
export const getLikeHouseList = () => http.get('/house/like-log')
export const getViewsHouseList = () => http.get('/house/views-log')
export const likeHouse = (data) => http.post('/house/house-like-log', data)
export const getLikeHouseList = () => http.get('/house/house-like-log')
export const getViewsHouseList = () => http.get('/house/house-views-log')
export default {
pageHouseInfo,

View File

@@ -1,19 +1,19 @@
import http from './index.js';
// 分页查询房源信息
export const pageHouseReservation = (params) => http.get('/house/reservation/page', {params})
export const pageHouseReservation = (params) => http.get('/house/house-reservation/page', {params})
// 查询全部房源信息
export const listHouseReservation = (params) => http.get('/house/reservation', {params})
export const listHouseReservation = (params) => http.get('/house/house-reservation', {params})
// 查询房源信息(当期登录用户)
export const getHouseReservation = (userId) => http.get('/house/reservation/' + userId)
export const getHouseReservation = (userId) => http.get('/house/house-reservation/' + userId)
// 新增房源信息
export const addHouseReservation = (data) => http.post('/house/reservation', data)
export const addHouseReservation = (data) => http.post('/house/house-reservation', data)
// 删除房源信息
export const removeHouseReservation = (id) => http.get('/house/reservation/remove/' + id)
export const removeHouseReservation = (id) => http.get('/house/house-reservation/remove/' + id)
export default {
pageHouseReservation,

View File

@@ -1,5 +1,6 @@
import http from './index.js';
import {
serverUrl,
apiUrl,
fileUrl,
accessKey,
@@ -37,18 +38,18 @@ export const getCaptcha = (params) => http.get('/captcha', {
})
// 发送短信验证码
export const sendSmsCaptcha = (params) => http.post('/open/sendSmsCaptcha', {
export const sendSmsCaptcha = (params) => http.post(serverUrl + '/open/sendSmsCaptcha', {
params
})
// 获取微信openId
export const getWxOpenId = (data) => http.post('/wx-login/getWxOpenId', data)
export const getWxOpenId = (data) => http.post(serverUrl + '/wx-login/getWxOpenId', data)
// 支付宝授权码换取userId
export const getAuthCode = (data) => http.post('/open/login-alipay/getAuthCode', data)
// 微信手机号码登录
export const loginMpWxMobile = (data) => http.post('/wx-login/loginByMpWxPhone', data)
export const loginMpWxMobile = (data) => http.post(serverUrl + '/wx-login/loginByMpWxPhone', data)
// 获取支付宝手机号码
export const getPhoneNumber = (data, config) => http.post('/shop/payment/getPhoneNumber', data, config)

View File

@@ -1,5 +1,7 @@
import http from './index.js';
import {
serverUrl
} from '@/config.js';
/**
* 缓存工具包
* @author 科技小王子
@@ -7,9 +9,9 @@ import http from './index.js';
*/
// 获取配置信息
export const getConfig = () => http.get('/system/cache/config')
export const getConfig = () => http.get(serverUrl + '/system/cache/config')
// 添加关注
export const addFocus = (data) => http.post('/shop/user-follow', data)
export const addFocus = (data) => http.post(serverUrl + '/shop/user-follow', data)
export default {
getConfig,

View File

@@ -1,16 +1,16 @@
import http from './index.js';
// 分页查询推荐关系
export const pageUserReferee = (params) => http.get('/shop/user-referee/page', {params})
export const pageUserReferee = (params) => http.get('/shop/shop-user-referee/page', {params})
// 查询全部推荐关系
export const listUserReferee = (params) => http.get('/shop/user-referee', {params})
export const listUserReferee = (params) => http.get('/shop/shop-user-referee', {params})
// 修改推荐关系
export const addUserReferee = (data) => http.post('/shop/user-referee', data)
export const addUserReferee = (data) => http.post('/shop/shop-user-referee', data)
// 删除推荐关系
export const removeUserReferee = (id) => http.delete('/shop/user-referee/' + id)
export const removeUserReferee = (id) => http.delete('/shop/shop-user-referee/' + id)
export default {
pageUserReferee,

View File

@@ -1,7 +1,7 @@
import http from './index.js';
// 获取用户资料
export const getUser = (params) => http.get('/auth/user', {params})
export const getUser = (params) => http.get('https://server.gxwebsoft.com/api/auth/user', {params})
// 修改用户资料
export const updateUser = (data) => http.put('/system/user', data)