2023-09-20 17:00:55 +08:00
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Author: CRMEB Team <admin@crmeb.com>
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
import request from "@/utils/request.js";
|
2023-09-26 20:41:49 +08:00
|
|
|
|
import request1 from "@/utils/requestb.js";
|
2023-09-20 17:00:55 +08:00
|
|
|
|
import Cache from '@/utils/cache'
|
2024-03-29 17:09:20 +08:00
|
|
|
|
|
|
|
|
|
|
2024-04-02 14:46:49 +08:00
|
|
|
|
/**
|
|
|
|
|
* 报错信息记录
|
|
|
|
|
*/
|
|
|
|
|
export function errorReport(data) {
|
|
|
|
|
return request.post(`api/err/report`, data);
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-30 09:33:57 +08:00
|
|
|
|
/**
|
|
|
|
|
* 新商户
|
|
|
|
|
*/
|
|
|
|
|
export function isNewMer(uid, mer_id, data) {
|
|
|
|
|
return request.post(`auth/guide/${uid}/${mer_id}`, data);
|
|
|
|
|
}
|
|
|
|
|
/**
|
2024-03-30 11:05:34 +08:00
|
|
|
|
/**
|
|
|
|
|
* 提现----查询单条信息
|
|
|
|
|
*/
|
|
|
|
|
export function getById(id) {
|
|
|
|
|
return request.get(`admin/${id}/get_one`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-03-29 17:09:20 +08:00
|
|
|
|
/**
|
|
|
|
|
* 提现----审核进度
|
|
|
|
|
*/
|
|
|
|
|
export function progressBankList(merId) {
|
|
|
|
|
return request.get(`admin/${merId}/bank_progress`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 提现----添加银行卡
|
|
|
|
|
*/
|
|
|
|
|
export function addBank(merId, data) {
|
|
|
|
|
return request.post(`admin/${merId}/add_bank`, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 提现----查询银行卡
|
|
|
|
|
*/
|
|
|
|
|
export function searchBank(merId) {
|
|
|
|
|
return request.get(`admin/${merId}/bank_list`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-09-20 17:00:55 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取版本信息
|
|
|
|
|
*/
|
|
|
|
|
export function Appversion(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`app/version`, data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 提交提现
|
|
|
|
|
*/
|
|
|
|
|
export function postCreateApplyAPI(merId, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post(`admin/${merId}/create_apply`, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 申请提现
|
|
|
|
|
*/
|
|
|
|
|
export function getAdminApplyAPI(merId, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`admin/${merId}/apply`, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 提现记录
|
|
|
|
|
*/
|
2024-04-11 18:11:28 +08:00
|
|
|
|
export function getAdminApplyListAPI(merId, data) {
|
|
|
|
|
return request.get(`admin/${merId}/lis_apply`, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取用户信息
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getUserInfo() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user');
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 头像
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function editAvatar(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/change/info', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改昵称
|
|
|
|
|
export function updateInfo(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/change/avatar', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* h5用户登录
|
|
|
|
|
* @param data object 用户账号密码
|
|
|
|
|
*/
|
|
|
|
|
export function loginH5(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("auth/login", data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* h5用户手机号登录
|
|
|
|
|
* @param data object 用户手机号 也只能
|
|
|
|
|
*/
|
|
|
|
|
export function loginMobile(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("auth/smslogin", data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* h5用户手机号登录
|
|
|
|
|
* @param data object 用户手机号 也只能
|
|
|
|
|
*/
|
|
|
|
|
export function loginMpPhone(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("auth/mp_phone", data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 验证码key
|
|
|
|
|
*/
|
|
|
|
|
export function getCodeApi() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("verify_code", {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* h5用户发送验证码
|
|
|
|
|
* @param data object 用户手机号
|
|
|
|
|
*/
|
|
|
|
|
export function registerVerify(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("auth/verify", data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* h5用户手机号注册
|
|
|
|
|
* @param data object 用户手机号 验证码 密码
|
|
|
|
|
*/
|
|
|
|
|
export function register(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("auth/register", data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 用户手机号修改密码
|
|
|
|
|
* @param data object 用户手机号 验证码 密码
|
|
|
|
|
*/
|
|
|
|
|
export function registerReset(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("/register/reset", data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 用户手机号忘记密码
|
|
|
|
|
*/
|
|
|
|
|
export function registerForget(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("user/change_pwd", data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取用户中心菜单
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getMenuList() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("common/menus", {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 签到用户信息
|
|
|
|
|
* */
|
|
|
|
|
export function getSignUser() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/sign/info");
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取签到配置
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getSignConfig() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('sign/config')
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取签到列表
|
|
|
|
|
* @param object data
|
|
|
|
|
*/
|
|
|
|
|
export function getSignList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/sign/lst', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 用户签到
|
|
|
|
|
*/
|
|
|
|
|
export function setSignIntegral() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/sign/create')
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 签到列表(年月)
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getSignMonthList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/sign/month', data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 活动状态
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function userActivity() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/activity');
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 资金明细(types|0=全部,1=消费,2=充值,3=返佣)
|
|
|
|
|
* */
|
|
|
|
|
export function getCommissionInfo(q, types) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/bill", q);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 提现列表
|
|
|
|
|
* */
|
|
|
|
|
export function extractLst(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/extract/lst", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 积分记录
|
|
|
|
|
* */
|
|
|
|
|
export function getIntegralList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/integral/lst", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取分销海报图片
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function spreadBanner() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
//#ifdef H5
|
|
|
|
|
return request.get('user/spread_image', {
|
|
|
|
|
type: 'wechat'
|
|
|
|
|
});
|
|
|
|
|
//#endif
|
|
|
|
|
//#ifdef MP
|
|
|
|
|
return request.get('user/spread_image', {
|
|
|
|
|
type: 'routine'
|
|
|
|
|
});
|
|
|
|
|
//#endif
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 获取推广用户一级和二级
|
|
|
|
|
* @param object data
|
|
|
|
|
*/
|
|
|
|
|
export function spreadPeople(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/spread_list', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 推广佣金/提现总和
|
|
|
|
|
* @param int type
|
|
|
|
|
*/
|
|
|
|
|
export function spreadCount(type) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('spread/count/' + type);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 推广数据
|
|
|
|
|
* */
|
|
|
|
|
export function getSpreadInfo() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("/commission");
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 推广订单
|
|
|
|
|
* @param object data
|
|
|
|
|
*/
|
|
|
|
|
export function spreadOrder(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/spread_order', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 获取推广人排行
|
|
|
|
|
* */
|
|
|
|
|
export function getRankList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/spread_top", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 获取佣金排名
|
|
|
|
|
* */
|
|
|
|
|
export function getBrokerageRank(q) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/brokerage_top", q);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 提现申请
|
|
|
|
|
* @param object data
|
|
|
|
|
*/
|
|
|
|
|
export function extractCash(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/extract/create', data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 提现银行/提现最低金额
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function extractBank() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/extract/banklst');
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 会员等级列表
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function userLevelGrade() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/level/grade');
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取某个等级任务
|
|
|
|
|
* @param int id 任务id
|
|
|
|
|
*/
|
|
|
|
|
export function userLevelTask(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/level/task/' + id);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 检查用户是否可以成为会员
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function userLevelDetection() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/level/detection');
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 地址列表
|
|
|
|
|
* @param object data
|
|
|
|
|
*/
|
|
|
|
|
export function getAddressList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/address/lst', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 设置默认地址
|
|
|
|
|
* @param int id
|
|
|
|
|
*/
|
|
|
|
|
export function setAddressDefault(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/address/update/' + id)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 修改 添加地址
|
|
|
|
|
* @param object data
|
|
|
|
|
*/
|
|
|
|
|
export function editAddress(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/address/create', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 删除地址
|
|
|
|
|
* @param int id
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function delAddress(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/address/delete/' + id)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取单个地址
|
|
|
|
|
* @param int id
|
|
|
|
|
*/
|
|
|
|
|
export function getAddressDetail(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/address/detail/' + id);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 修改用户信息
|
|
|
|
|
* @param object
|
|
|
|
|
*/
|
|
|
|
|
export function userEdit(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/edit', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 退出登录
|
|
|
|
|
* */
|
|
|
|
|
export function getLogout() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("logout");
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 佣金转入
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function rechargeBrokerage(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/recharge/brokerage', data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 小程序充值
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function rechargeRoutine(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('recharge/routine', data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* 公众号充值
|
|
|
|
|
* */
|
|
|
|
|
export function rechargeWechat(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("user/recharge", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取默认地址
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getAddressDefault() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('address/default');
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 充值金额选择
|
|
|
|
|
*/
|
|
|
|
|
export function getRechargeApi() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("common/recharge_quota");
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 登陆记录
|
|
|
|
|
*/
|
|
|
|
|
export function setVisit(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/set_visit', {
|
|
|
|
|
...data
|
|
|
|
|
}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 客服列表
|
|
|
|
|
*/
|
|
|
|
|
export function serviceList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("service/list", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 客服列表
|
|
|
|
|
*/
|
|
|
|
|
export function serviceLogin(key, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("service/scan_login/" + key, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 客服获取客户列表
|
|
|
|
|
*/
|
|
|
|
|
export function serviceUserList(mer_id, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("service/user_list/" + mer_id, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 用户获取聊天记录详情
|
|
|
|
|
*/
|
|
|
|
|
export function getChatRecord(to_uid, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("service/history/" + to_uid, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 客服获取聊天记录详情
|
|
|
|
|
*/
|
|
|
|
|
export function getMerHistory(userid, mer_id, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("service/mer_history/" + mer_id + '/' + userid, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 静默绑定推广人
|
|
|
|
|
* @param {Object} puid
|
|
|
|
|
*/
|
|
|
|
|
export function spread(puid) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
Cache.set("spread", puid || 0);
|
|
|
|
|
return request.post("user/spread", {
|
|
|
|
|
spread_spid: puid
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 反馈类型
|
|
|
|
|
*/
|
|
|
|
|
export function feedbackType() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("common/feedback_type");
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 提交反馈
|
|
|
|
|
*/
|
|
|
|
|
export function feedback(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("user/feedback", {
|
|
|
|
|
...data
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 反馈列表
|
|
|
|
|
*/
|
|
|
|
|
export function feedbackList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/feedback/list", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 反馈列表
|
|
|
|
|
*/
|
|
|
|
|
export function feedbackDetail(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/feedback/detail/" + id);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 浏览记录
|
|
|
|
|
*/
|
|
|
|
|
export function historyList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/history", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 删除浏览记录
|
|
|
|
|
*/
|
|
|
|
|
export function historyDelete(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("user/history/delete/" + id);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 批量删除浏览记录
|
|
|
|
|
*/
|
|
|
|
|
export function historyBatchDelete(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("user/history/batch/delete", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 批量收藏浏览记录
|
|
|
|
|
*/
|
|
|
|
|
export function historyBatchCollect(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post("user/relation/batch/create", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 佣金记录
|
|
|
|
|
*/
|
|
|
|
|
export function brokerage_list(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/brokerage_list", data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 佣金数据
|
|
|
|
|
*/
|
|
|
|
|
export function spreadInfo() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get("user/spread_info");
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 图片验证码
|
|
|
|
|
export function getCaptcha() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('captcha', {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 用户账户列表
|
|
|
|
|
export function userAcc() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/account', {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 创建发票
|
|
|
|
|
export function invoiceSave(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/receipt/create', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 编辑发票
|
|
|
|
|
export function invoiceUpdate(id, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/receipt/update/' + id, data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 获取默认发票
|
|
|
|
|
export function invoiceDefault(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/receipt/is_default/' + id);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 发票抬头--列表
|
|
|
|
|
export function invoice(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/receipt/lst', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 发票抬头--删除
|
|
|
|
|
export function invoiceDelete(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('user/receipt/delete/' + id);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 发票--详情
|
|
|
|
|
export function invoiceDetail(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/receipt/detail/' + id);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 新版分享海报信息获取
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function spreadMsg(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/v2/spread_image', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 图片链接转base64
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function imgToBase(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post('common/base64', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取协议
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getAgreementApi(key) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('agreement/' + key, {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
});
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取协议
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getIntegralInfo() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/integral/info');
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取店铺列表
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getStoreList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/services', data);
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
获取佣金说明
|
|
|
|
|
*/
|
|
|
|
|
export function commissionDescription() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('agreement/sys_extension_agree')
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
获取用户分销等级信息
|
|
|
|
|
*/
|
|
|
|
|
export function getBrokerageInfo() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/brokerage/info')
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
获取用户分销等级表格数据
|
|
|
|
|
*/
|
|
|
|
|
export function getBrokerageGrade() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/brokerage/all')
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
分销员升级提醒
|
|
|
|
|
*/
|
|
|
|
|
export function brokerageNotice(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`user/brokerage/notice`, data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
口令解析
|
|
|
|
|
*/
|
|
|
|
|
export function pwdResolution(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`command/copy?key=${data}`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
获取佣金说明
|
|
|
|
|
*/
|
|
|
|
|
export function getInstructions(key) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`agreement/${key}`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
会员信息
|
|
|
|
|
*/
|
|
|
|
|
export function memberInfo() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/member/info')
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 成长值记录
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function growthValueRecord(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('user/member/log', data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 协议规则列表
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function cacheLst() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get('agreement_lst', {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
})
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 协议规则列表对应的数据
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function cacheInfo(key) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`agreement/${key}`, {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
})
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 注销账户
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function userOut(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post(`user/cancel`, data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取聊天用户信息
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function serviceUser(merId, uid) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`service/user/${merId}/${uid}`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 保存聊天用户备注
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function serviceSaveMark(merId, uid, mark) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post(`service/mark/${merId}/${uid}`, {
|
|
|
|
|
mark
|
|
|
|
|
})
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取会员卡类型
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function memberCard() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`svip/pay_lst`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 开通付费会员--支付
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function memberCardCreate(id, data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post(`svip/pay/${id}`, data)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 付费会员权益
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function memberEquity() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`svip/user_info`, {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
})
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 付费会员优惠券
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function memberCouponLst() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`svip/coupon_lst`, {}, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
})
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 付费会员优惠券--领取
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function receiveMemberCoupon(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post(`svip/coupon_receive/${id}`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 付费会员--会员商品
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function groomList(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`svip/product_lst`, data, {
|
|
|
|
|
noAuth: true
|
|
|
|
|
})
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 客服聊天--撤回消息
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function chatReverstApi(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.post(`service/recall/${id}`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 客服聊天--判断店铺是否有在线客服
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function hasServiceApi(id) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`has_service/${id}`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 银行卡提现--银行卡信息
|
|
|
|
|
* @param object data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function getBankInfo() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`user/extract/history_bank`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
// 商户账单管理
|
|
|
|
|
export function getBillDetil() {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request.get(`mer/financial_record`)
|
2023-09-20 17:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-09-26 20:41:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取商户入驻所签署公司
|
|
|
|
|
|
|
|
|
|
export function merstreet(data) {
|
2024-03-29 17:09:20 +08:00
|
|
|
|
return request1.get(`company/street_company`, data);
|
|
|
|
|
}
|