'!'
This commit is contained in:
21
src/api/config.ts
Normal file
21
src/api/config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* model: 配置文件
|
||||
* 作者:zhang-shu-wei
|
||||
* 日期:2022年8月10日
|
||||
* 邮箱:2966211270@qq.com
|
||||
*/
|
||||
let url_config = '' // 用户登录
|
||||
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 开发环境 配置域名
|
||||
console.log('~开发环境~')
|
||||
url_config = "https://wx.jxc4.com"
|
||||
} else {
|
||||
// 生产环境
|
||||
console.log('~生产环境~')
|
||||
url_config = "https://wx.jxc4.com"
|
||||
}
|
||||
|
||||
|
||||
export default url_config
|
||||
120
src/api/https/login.ts
Normal file
120
src/api/https/login.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
/*************************************************
|
||||
*@description: 登录模块
|
||||
*@return {*}
|
||||
*@param {}-
|
||||
*/
|
||||
|
||||
import { setLoading } from '@/utils/tools'
|
||||
import request from '../request'
|
||||
|
||||
|
||||
const login = {
|
||||
/*************************************************
|
||||
* 获取微信登录code
|
||||
*/
|
||||
get_jx_code: (isLoading?:boolean): Promise<AnyObject> => new Promise((resolve, reject) => {
|
||||
if(!isLoading) setLoading('登录中...')
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res) => {
|
||||
resolve(res)
|
||||
},
|
||||
fail: (error) => {
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
}),
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取用户信息
|
||||
*/
|
||||
applets_login: (params: AnyObject,isLoading?:boolean): Promise<AnyObject> => {
|
||||
if(!isLoading) setLoading('登录中...')
|
||||
return request.api('/v2/auth2/Login', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 用户绑定手机号
|
||||
*/
|
||||
add_auth_bind: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/auth2/AddAuthBindWithMobile', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取用户手机号
|
||||
*/
|
||||
getUser_by_mini_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/auth2/GetUserByMiniInfo', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 刷新token
|
||||
*/
|
||||
get_token_info: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/auth2/GetTokenInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取手机登录验证码
|
||||
*/
|
||||
send_verify_code: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/auth2/SendVerifyCode', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 注册用户
|
||||
*/
|
||||
register_user: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/user2/RegisterUser', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 选择门店
|
||||
*/
|
||||
get_my_store_list: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
|
||||
return await request.api('/v2/user2/GetMyStoreList', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取系统数据
|
||||
*/
|
||||
get_service_info: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/cms/GetServiceInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 查询用户其他信息,比如角色等
|
||||
*/
|
||||
get_self_info: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/user2/GetSelfInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 修改密码
|
||||
*/
|
||||
change_password: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/auth2/ChangePassword', 'PUT', params)
|
||||
},
|
||||
|
||||
/*************************************************
|
||||
* 测试推送消息
|
||||
* @param vendorOrderID 订单id
|
||||
*/
|
||||
test_uni_app_push: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/event/TestUniAppPush', 'GET', params)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default login
|
||||
267
src/api/https/merchant.ts
Normal file
267
src/api/https/merchant.ts
Normal file
@@ -0,0 +1,267 @@
|
||||
/**
|
||||
* @description: 商家中心
|
||||
* @return {*}
|
||||
* @param {}-
|
||||
*/
|
||||
import request from "../request";
|
||||
|
||||
|
||||
const merchant = {
|
||||
/**
|
||||
* 获取门店营业状态
|
||||
*/
|
||||
get_stores: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/GetStores', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @desc 多用型接口
|
||||
* 设置门店营业 休息
|
||||
* 切换未拣货提醒方式
|
||||
* 修改印业资质
|
||||
*/
|
||||
update_store: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/UpdateStore', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 修改线上淘鲜达时间
|
||||
*/
|
||||
update_txd_store: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/UpdateTxdStore', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 更新平台营业状态 线上
|
||||
*/
|
||||
update_vendors_store_states: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/UpdateVendorStoreBussinessStatus', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @desc 修改门店映射信息
|
||||
* @param {object} params 请求参数 storeID int 门店ID vendorID int 厂商ID
|
||||
*/
|
||||
update_store_vendor_map: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('v2/store/UpdateStoreVendorMap','PUT',params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 查询是否有新账单
|
||||
*/
|
||||
get_store_bills: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/financial/GetStoreBills', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取门店今日完成实时数据
|
||||
*/
|
||||
get_store_order_sale_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetStoresOrderSaleInfo', 'GET', params, 30000)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户注册时间
|
||||
*/
|
||||
get_self_info: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/user2/GetSelfInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取调价包
|
||||
*/
|
||||
query_configs: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/cms/QueryConfigs', "GET", params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 修改调价包
|
||||
*/
|
||||
update_store_price_pack: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/UpdateStorePricePack', "PUT", params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取差评数量
|
||||
*/
|
||||
tmp_get_jx_bad_comments_no: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/TmpGetJxBadCommentsNo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取评论
|
||||
*/
|
||||
Tmp_get_jx_bad_comments_by_storeId: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/TmpGetJxBadCommentsByStoreId', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取店铺评分
|
||||
*/
|
||||
get_weekly_store_score: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/GetWeeklyStoreScore', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取待配商品
|
||||
*/
|
||||
get_order_ders_accept: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetOrdersAccept', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 通过skuID skuName 获取商品
|
||||
*/
|
||||
get_stores_skus: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/sku/GetStoresSkus', "GET", params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取信息通知
|
||||
*/
|
||||
Get_store_message_statuses: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/msg/GetStoreMessageStatuses', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取信息详情
|
||||
*/
|
||||
get_store_messages: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/msg/GetStoreMessages', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 修改信息为已读
|
||||
*/
|
||||
read_store_message: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/msg/ReadStoreMessage', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取门店活动信息
|
||||
*/
|
||||
query_acts: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/act/QueryActs', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取打印机能识别的数据
|
||||
*/
|
||||
get_order_sku_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetOrderSkuInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 判断蓝牙打印机是否需要打印标题
|
||||
*/
|
||||
get_brands: async (prams: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/GetBrands', 'GET', prams)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 修改打印状态为 true
|
||||
*/
|
||||
set_order_print_status: async (prams: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/SetOrderPrintStatus', 'PUT', prams)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 清空打印队列
|
||||
*/
|
||||
delete_printer_seq: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/DeletePrinterSeq', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 扫码绑定易联云
|
||||
*/
|
||||
bind_net_printer: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/BindPrinter', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取七牛云TOKEN
|
||||
*/
|
||||
get_qiniu_upload_token: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/cms/GetQiniuUploadToken', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 扫码进店,获取当前门店的二维码
|
||||
*/
|
||||
get_weixin_unlimited: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/event/GetWeixinUnlimited', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取app版本号
|
||||
*/
|
||||
get_app_varsion: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/version/GetVersionController', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取门店信息
|
||||
*/
|
||||
get_store_vendor_maps: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/GetStoreVendorMaps', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 查询美团门店IM单聊开关状态
|
||||
* @return {string} appPoiCode:美团门店id
|
||||
*/
|
||||
get_mt_store_im_status: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/GetPoiIMStatus', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 设置美团门店IM线上状态
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} appPoiCode:美团门店id imStatus:状态 0-关闭 1-开启
|
||||
*/
|
||||
set_mt_store_im_status: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/SetPoiIMStatus', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 查询远端门店的营业状态
|
||||
* @param {object} params 请求参数
|
||||
*/
|
||||
get_vendor_store:async(params:AnyObject): Promise<AnyObject> =>{
|
||||
return request.api('/v2/store/GetVendorStore', 'GET', params)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default merchant
|
||||
48
src/api/https/message.ts
Normal file
48
src/api/https/message.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @description: IM消息管理
|
||||
* @return {*}
|
||||
* @param {}-
|
||||
*/
|
||||
import request from "../request";
|
||||
|
||||
|
||||
const message = {
|
||||
/*************************************************
|
||||
* 获取消息用户列表
|
||||
*/
|
||||
get_IM_user_list: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/GetIMUserList', 'GET', params)
|
||||
},
|
||||
|
||||
/*************************************************
|
||||
* 解析饿了么消息中的mediaID
|
||||
*/
|
||||
get_url_by_mediaID: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/GetElmMedia', 'GET', params)
|
||||
},
|
||||
|
||||
/*************************************************
|
||||
* 获取聊天详情
|
||||
*/
|
||||
get_IM_chat_detail: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/GetImChatDetail', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 设置消息为已读
|
||||
*/
|
||||
set_IM_msg_read: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/SetImMsgRead', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 发送消息接口
|
||||
*/
|
||||
send_to_vendor: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/SendToVendorV2', 'POST', params)
|
||||
},
|
||||
}
|
||||
|
||||
export default message
|
||||
519
src/api/https/order.ts
Normal file
519
src/api/https/order.ts
Normal file
@@ -0,0 +1,519 @@
|
||||
import request from '../request'
|
||||
|
||||
|
||||
/**
|
||||
* 订单类接口
|
||||
* @param *
|
||||
* @return *
|
||||
*/
|
||||
const order = {
|
||||
/***********************************************************
|
||||
* 获取商户订单数量(统计)
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
Get_store_rder_count_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetStoreOrderCountInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/***********************************************************
|
||||
* 获取售后单(统计)
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
Get_store_afs_order_countinfo: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetStoreAfsOrderCountInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/***********************************************************
|
||||
* 获取对应状态的订单数据
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:{totalCount:总条数,data:分页数据} desc:错误信息
|
||||
*/
|
||||
get_orders: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetOrders', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 确认接单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据,desc:错误信息
|
||||
*/
|
||||
accept_or_refuse_order: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/AcceptOrRefuseOrder', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取打印机状态
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_printer_status: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetPrinterStatus', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 网络打印机打印订单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
print_order: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/PrintOrder', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 拣货完成
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
finished_pickup: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/FinishedPickup', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 自提订单 京西订单不用自提 id
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
confirm_self_take: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/ConfirmSelfTake', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 确认送送达
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
self_delivered: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/SelfDelivered', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取售后订单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_afs_orders: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetAfsOrders', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 非饿百订单 退货退款
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
agree_orRefuse_refund: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/AgreeOrRefuseRefund', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* @description 扫码枪 到店扫码支付订单退款 收获退款 post jxorder/RefundOnlineOrder
|
||||
* @Param token header string true "认证token"
|
||||
* @Param vendorOrderID formData string true "订单ID"
|
||||
* @Param skuIds formData string true "[key:value]退款商品 skuId:count,int" Map类型
|
||||
* @Param Reason formData string true "退单原因"
|
||||
*/
|
||||
refund_online_order: async(params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/jxorder/RefundOnlineOrder','POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 饿百订单 京东的异常单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
agree_or_refuse_cancel: async (params: AnyObject): Promise<AnyObject> => {
|
||||
// 原来饿百订单退款或者驳回的接口有问题,更换成原来的退款
|
||||
return await request.api('/v2/order/AgreeOrRefuseCancel', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 退货待确认
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
confirm_received_return_goods: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/ConfirmReceivedReturnGoods', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 退货待确认
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_order_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetOrderInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 查询取消订单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
getafs_orders: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/getafsOrders', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 取消订单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
cancel_order: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/CancelOrder', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取条形码
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
create_qrOr_bar_code: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/cms/CreateQrOrBarCode', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 查询是否是京西新用户
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_order_user_buy_first: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetOrderUserBuyFirst', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取运单状态
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_order_status_list: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetOrderStatusList', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取商品列表
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_order_sku_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetOrderSkuInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取订单差评骑手列表
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
complaint_rider_list: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/ComplaintRiderList', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 差评骑手
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
complaint_rider: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/ComplaintRider', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 商品部分退款
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
part_refund_order: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/PartRefundOrder', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 商品全额退款并创建售后单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
refund_order: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/RefundOrder', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 直接部分退款
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
adjust_order: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/AdjustOrder', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 售后商品
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_afs_order_sku_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetAfsOrderSkuInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取运单费用
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
query_order_waybill_fee_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/QueryOrderWaybillFeeInfo', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取品牌账号余额
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_brands: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/GetBrands', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取门店账号余额
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_store_acct_balance: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/GetStoreAcctBalance', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 创建订单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
create_store_acct_order: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/jxorder/CreateStoreAcctOrder', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 支付订单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
pay4_user: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/jxorder/Pay4User', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 非抖音订单转自送
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
self_delivering: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/SelfDelivering', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 添加小费
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
update_order_waybill_tip: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/UpdateOrderWaybillTip', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 切换发单方式
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
update_store_courier_map: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/store/UpdateStoreCourierMap', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 创建三方配送
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
create_waybill_on_providers: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/CreateWaybillOnProviders', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 取消订单
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
cancel_waybill: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/CancelWaybill', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 骑手
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
accept_or_refuse_failed_get_order: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/AcceptOrRefuseFailedGetOrder', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 重新召唤骑手
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
callP_m_courier: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/CallPMCourier', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 退回货物
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
confirm_receive_goods: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/ConfirmReceiveGoods', 'PUT', params)
|
||||
},
|
||||
|
||||
/*************************************************************
|
||||
* 查看客户距离
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_ST_o_U_riding_distance: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/cms/GetSToURidingDistance', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 获取骑手位置
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_rider_lng: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetRiderLng', 'POST', params)
|
||||
},
|
||||
|
||||
/*************************************************************
|
||||
* 获取骑手位置(实时)
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
get_s_to_u_riding_distance: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/cms/GetSToURidingDistance2', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* 取消所有三方运单(取消所有配送)
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} code:状态 data:数据 desc:错误信息
|
||||
*/
|
||||
cancel_all_3rd_waybills: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/CancelAll3rdWaybills', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* 查询发票信息,美团
|
||||
* @Param storeId formData int false "门店id"
|
||||
* @Param startTime formData string true "开始时间"
|
||||
* @Param endTime formData string true "结束时间"
|
||||
* @Param status formData string false "发票回复状态[1未回复/2回复]"
|
||||
* @Param offset query int false "结果起始序号(以0开始,缺省为0)"
|
||||
* @Param pageSize query int false "结果页大小(缺省为50,-1表示全部)"
|
||||
*/
|
||||
query_mt_invoice: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/GetInvoiceRecord', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 上传发票图片
|
||||
* @Param token header string true "认证token"
|
||||
* @Param orderId formData string true "订单ID"
|
||||
* @Param invoiceUrl formData string true "发票地址[10M内pdf/png/jpeg/jpg]"
|
||||
* @Param invoiceId formData string true "发票号码"
|
||||
*/
|
||||
upload_invoice_img: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/UploadOrderInvoice', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 发票设置 饿百
|
||||
* @Title 批量更新门店发票设置
|
||||
* @Description 批量更新门店发票设置
|
||||
* @Param token header string true "认证token"
|
||||
* @Param vendorId formData string true "平台ID"
|
||||
* @Param vendorStoreID formData string true "平台门店ID"
|
||||
* @Param payload formData string true "json数据,格式为 ebaiapi.StoreInvoiceSetting",见JXC4-BACKSTAGE
|
||||
*/
|
||||
bath_update_invoice_setting: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/BathUpdateInvoiceSetting', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @Title 查询门店发票设置
|
||||
* @Description 查询门店发票设置
|
||||
* @Param token header string true "认证token"
|
||||
*
|
||||
* @Param vendorId formData string true "平台ID"
|
||||
* @Param vendorStoreID formData string true "平台门店ID"
|
||||
*/
|
||||
query_invoice_setting: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/QueryInvoiceSetting', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @Title 查询门店开票申请 饿百
|
||||
* @Description 批量更新店铺开票申请
|
||||
* @Param token header string true "认证token"
|
||||
* @Param vendorId formData string true "平台ID"
|
||||
* @Param vendorStoreID formData string true "平台门店ID"
|
||||
* @Param storeID formData int true "京西门店ID"
|
||||
*/
|
||||
get_invoice_info: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return await request.api('/v2/order/QueryUnansweredInvoice', 'GET', params)
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
export default order
|
||||
98
src/api/https/shopping.ts
Normal file
98
src/api/https/shopping.ts
Normal file
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* @description: 商品管理
|
||||
* @return {*}
|
||||
* @param {}-
|
||||
*/
|
||||
import request from "../request";
|
||||
|
||||
|
||||
const shopping = {
|
||||
/*************************************************
|
||||
* 修改商品价格
|
||||
*/
|
||||
update_stores_skus: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/sku/UpdateStoresSkus', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 修改商品为临时不可售
|
||||
*/
|
||||
update_stores_skus_sale: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/sku/UpdateStoresSkusSale', 'PUT', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取商品分类
|
||||
*/
|
||||
getStore_category_map: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/GetStoreCategoryMap', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 备用获取分类列表
|
||||
*/
|
||||
get_categories: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/sku/GetCategories', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取商品
|
||||
*/
|
||||
get_stores_skus_for_store: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/sku/GetStoresSkusForStore', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取商品
|
||||
*/
|
||||
get_top_skus_by_city_code: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/sku/GetTopSkusByCityCode', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取待审核列表
|
||||
*/
|
||||
get_store_sku_audit: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/sku/GetStoreSkuAudit', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 获取待审核列表
|
||||
*/
|
||||
get_sku_names_new: async (params?: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/sku/GetSkuNamesNew', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 审核商品
|
||||
*/
|
||||
store_sku_price_audit: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/sku/StoreSkuPriceAudit', 'POST', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 请求京东商品库
|
||||
*/
|
||||
get_jd_upc_code_by_name: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/sku/GetJdUpcCodeByName', 'GET', params)
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 微信扫码创建商品
|
||||
*/
|
||||
create_skus_and_focus_from_wx: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/store/sku/CreateSkusAndFocusFromWx', 'POST', params)
|
||||
},
|
||||
}
|
||||
|
||||
export default shopping
|
||||
135
src/api/mockData/index.ts
Normal file
135
src/api/mockData/index.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* 模拟后端返回的数据
|
||||
*/
|
||||
|
||||
// 聊天消息
|
||||
export const msgInfo = {
|
||||
// 用户列表
|
||||
userList: {
|
||||
code: '0',
|
||||
data: {
|
||||
// '5873:18003191:1': ['{"vendorID":1,"userID":"11555094096","orderID":"","NewMessageNum":0,"latestMsg":"eAcvT+OGsaVYx/Avh6VagA==","latestTime":1695691485}'],
|
||||
'34665:1157916361:3': ['{\"vendorID\":3,\"userID\":\"$2$13205337818$PNM\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"{\\\"extensions\\\":{\\\"appName\\\":\\\"ELEME\\\",\\\"industryType\\\":\\\"NEW_RETAIL\\\",\\\"current_msg_source\\\":\\\"ELEME\\\",\\\"imsdk_role_name\\\":\\\"顾客\\\",\\\"imsdk_self_show_name\\\":\\\"45d46975e\\\",\\\"imsdk_other_show_name\\\":\\\"45d46975e\\\"},\\\"text\\\":\\\"[微笑]\\\"}\", "latestTime": 1695691485}'],
|
||||
},
|
||||
desc: ''
|
||||
|
||||
// code: "0",
|
||||
// data: {
|
||||
// '34665:1157916361:3': ['{"vendorID":3,"userID":"$2$13205337818$PNM","orderID":"","NewMessageNum":1,"latestMsg":"{"extensions":{"appName":"ELEME","industryType":"NEW_RETAIL","current_msg_source":"ELEME","imsdk_role_name":"顾客","imsdk_self_show_name":"45d46975e","imsdk_other_show_name":"45d46975e"},"text":"[微笑]"}","latestTime":1698303946914}'],
|
||||
// '5873:18003191:1': ['{"vendorID":1,"userID":"9533643193","orderID":"","NewMessageNum":0,"latestMsg":"dTZiwxiOJI5b5zwb1/uCwcCxh3F9MrZtyR+ojZoql4wtzgMh/gzuGRffhgWQd4Sz","latestTime":1698295674}", "{"vendorID":1,"userID":"12169240445","orderID":"1100782041270894459","NewMessageNum":0,"latestMsg":"ZiiFa7hQp0BV60OuBKPExiN6IN7fRkjzmcVpaA+kQoQ=","latestTime":1698295257}', '{"vendorID":1,"userID":"10892282642","orderID":"1100782384203287879","NewMessageNum":0,"latestMsg":"K/qIurzlbi2B7zv65/mCQg==","latestTime":1698295422}', '{"vendorID":1,"userID":"11009807262","orderID":"","NewMessageNum":0,"latestMsg":"+tFz6s6u+O8Ndpc2dwP4HA==","latestTime":1698297046}', '{"vendorID":1,"userID":"11436731575","orderID":"","NewMessageNum":0,"latestMsg":"iMqYgHLYMjKY3JoSMG9YLQ==","latestTime":1698295279}', '{"vendorID":1,"userID":"9167982931","orderID":"","NewMessageNum":0,"latestMsg":"R4cR7u9LPax/LDKqVHWVLw==","latestTime":1698300481}', '{"vendorID":1,"userID":"11432640354","orderID":"","NewMessageNum":0,"latestMsg":"QY5plA6VHEKS7GqXV4jJElsh0x90ftjPFGGoZjX4M/84LQn7ucu0ZeruelSd/VmmZ0OD966b6g5+0ZrgsLBIZiDo2sEOk8a02UUwNt60FPKZEhaCURWvYjCBqDJA8laH","latestTime":1698304171}', '{"vendorID":1,"userID":"10946780381","orderID":"1100782881905266609","NewMessageNum":1,"latestMsg":"dtj7qIlXCPm1ZWUjwfEPc65cnsG57UYatDG6g/kYjYU+CSzeFNPE1THgv2cHUB0QhpNo6jEnCDc0Vte2V5h14J7NJ5Zbaprfysx+gLRua68o2Pp4pF0LDSMLQ+7pGh/GRDjdfYYS4qFqU17eBbT82x1LjsuY1HWe8Z2znWyo43nEcLbtPFU09HwXFgxOQLBhF4As08Inc7bvN6BPR8F46QtQR52+PvxiWdsDRV54/F2CqxuoFR3up6wKmxvyzDWyEAgFI8Ym7zqItVBfG8HtEXTezY3gCjtpK0qRoYJqJ+dIuQewnDXbbxyqu/JvXSdiLYVRdrZgY9UI1hBDQU4zN6XI2u/w8tzk3a6mSrTCfUyaB0xr5/bwLYfgwV4WDw0EaLQEr2R0OmMerlRMheR3A+GMYVxl+BcYx0fUrKuH7Fs1TNSRCS4ug4iMr/GoTv76J8jl1b2ihrFDPiVQRxPdSw==","latestTime":1698308642}']
|
||||
// },
|
||||
// desc: ""
|
||||
},
|
||||
// 聊天详情
|
||||
chatDetail: {
|
||||
// code: '0',
|
||||
// data: {
|
||||
// '5873:18003191:1:11555094096': [
|
||||
// // '{"sendType":"mt","msgContent":{"app_id":5873,"app_poi_code":"18003191","msg_id":1400636412362739712,"msg_content":"eAcvT+OGsaVYx/Avh6VagA==","msg_source":2,"msg_type":1,"cts":1695691485,"open_user_id":11555094096,"order_id":1100738343654371431,"group_id":0,"app_spu_codes":""}}'
|
||||
// '{"sendType":"mt","msgContent":{"app_id":5873,"app_poi_code":"18003191","msg_id":1400636412362739712,"msg_content":"kJhw2zGHISMeeNatcB62eoctFxbqneVDKiP75531PhYMisp7wJN44Yk/JpwHwbcg","msg_source":2,"msg_type":1,"cts":1695691485,"open_user_id":11555094096,"order_id":1100738343654371431,"group_id":0,"app_spu_codes":""}}'
|
||||
// ]
|
||||
// },
|
||||
// desc: ''
|
||||
code: "0",
|
||||
// data: {
|
||||
// "34665:1157916361:3": [
|
||||
// // "{"sendType":"mt","msgContent":{"app_id":589,"app_poi_code":"12704348","msg_id":1439524935878283264,"msg_content":"","msg_source":2,"msg_type":4,"cts":1704963231,"open_user_id":11555078706,"order_id":0,"group_id":0,"app_spu_codes":"23163"}}" // 聊天详情 商品卡片 待优化
|
||||
// "{\"vendorID\":3,\"userID\":\"$2$13205337818$PNM\",\"orderID\":\"\",\"NewMessageNum\":1,\"latestMsg\":\"{\\\"extensions\\\":{\\\"appName\\\":\\\"ELEME\\\",\\\"industryType\\\":\\\"NEW_RETAIL\\\",\\\"current_msg_source\\\":\\\"ELEME\\\",\\\"imsdk_role_name\\\":\\\"顾客\\\",\\\"imsdk_self_show_name\\\":\\\"45d46975e\\\",\\\"imsdk_other_show_name\\\":\\\"45d46975e\\\"},\\\"text\\\":\\\"[微笑]\\\"}\",\"latestTime\":1698303946914}"], "5873:18003191:1": ["{\"vendorID\":1,\"userID\":\"9533643193\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"dTZiwxiOJI5b5zwb1/uCwcCxh3F9MrZtyR+ojZoql4wtzgMh/gzuGRffhgWQd4Sz\",\"latestTime\":1698295674}", "{\"vendorID\":1,\"userID\":\"12169240445\",\"orderID\":\"1100782041270894459\",\"NewMessageNum\":0,\"latestMsg\":\"ZiiFa7hQp0BV60OuBKPExiN6IN7fRkjzmcVpaA+kQoQ=\",\"latestTime\":1698295257}", "{\"vendorID\":1,\"userID\":\"10892282642\",\"orderID\":\"1100782384203287879\",\"NewMessageNum\":0,\"latestMsg\":\"K/qIurzlbi2B7zv65/mCQg==\",\"latestTime\":1698295422}", "{\"vendorID\":1,\"userID\":\"11009807262\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"+tFz6s6u+O8Ndpc2dwP4HA==\",\"latestTime\":1698297046}", "{\"vendorID\":1,\"userID\":\"11436731575\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"iMqYgHLYMjKY3JoSMG9YLQ==\",\"latestTime\":1698295279}", "{\"vendorID\":1,\"userID\":\"9167982931\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"R4cR7u9LPax/LDKqVHWVLw==\",\"latestTime\":1698300481}", "{\"vendorID\":1,\"userID\":\"11432640354\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"QY5plA6VHEKS7GqXV4jJElsh0x90ftjPFGGoZjX4M/84LQn7ucu0ZeruelSd/VmmZ0OD966b6g5+0ZrgsLBIZiDo2sEOk8a02UUwNt60FPKZEhaCURWvYjCBqDJA8laH\",\"latestTime\":1698304171}", "{\"vendorID\":1,\"userID\":\"10946780381\",\"orderID\":\"1100782881905266609\",\"NewMessageNum\":1,\"latestMsg\":\"dtj7qIlXCPm1ZWUjwfEPc65cnsG57UYatDG6g/kYjYU+CSzeFNPE1THgv2cHUB0QhpNo6jEnCDc0Vte2V5h14J7NJ5Zbaprfysx+gLRua68o2Pp4pF0LDSMLQ+7pGh/GRDjdfYYS4qFqU17eBbT82x1LjsuY1HWe8Z2znWyo43nEcLbtPFU09HwXFgxOQLBhF4As08Inc7bvN6BPR8F46QtQR52+PvxiWdsDRV54/F2CqxuoFR3up6wKmxvyzDWyEAgFI8Ym7zqItVBfG8HtEXTezY3gCjtpK0qRoYJqJ+dIuQewnDXbbxyqu/JvXSdiLYVRdrZgY9UI1hBDQU4zN6XI2u/w8tzk3a6mSrTCfUyaB0xr5/bwLYfgwV4WDw0EaLQEr2R0OmMerlRMheR3A+GMYVxl+BcYx0fUrKuH7Fs1TNSRCS4ug4iMr/GoTv76J8jl1b2ihrFDPiVQRxPdSw==\",\"latestTime\":1698308642}"]
|
||||
// },
|
||||
data: {
|
||||
"34665:1157916361:3:$2$13205337818$PNM": [
|
||||
// "{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"10154538612\",\"receiverIds\":[\"301157916361\",\"10154538612\",\"321921188187760\"],\"createTime\":1698303833173,\"groupId\":\"$2$13205337818$PNM\",\"msgId\":\"1997094742949.PNM\",\"contentType\":2,\"content\":\"{\\\"elements\\\":[{\\\"elementContent\\\":\\\"{\\\\\\\"atAll\\\\\\\":false,\\\\\\\"defaultNick\\\\\\\":\\\\\\\"商家\\\\\\\",\\\\\\\"uid\\\\\\\":{\\\\\\\"appUid\\\\\\\":\\\\\\\"301157916361\\\\\\\",\\\\\\\"domain\\\\\\\":\\\\\\\"eleme\\\\\\\"}}\\\",\\\"elementType\\\":3},{\\\"elementContent\\\":\\\"{\\\\\\\"extensions\\\\\\\":{\\\\\\\"imsdk_self_show_name\\\\\\\":\\\\\\\"45d46975e\\\\\\\",\\\\\\\"appName\\\\\\\":\\\\\\\"ELEME\\\\\\\",\\\\\\\"imsdk_role_name\\\\\\\":\\\\\\\"顾客\\\\\\\",\\\\\\\"imsdk_other_show_name\\\\\\\":\\\\\\\"45d46975e\\\\\\\",\\\\\\\"industryType\\\\\\\":\\\\\\\"NEW_RETAIL\\\\\\\",\\\\\\\"current_msg_source\\\\\\\":\\\\\\\"ELEME\\\\\\\"},\\\\\\\"text\\\\\\\":\\\\\\\"您好,请问我的订单还要多久送达?\\\\\\\"}\\\",\\\"elementType\\\":1}]}\"},\"platformShopId\":\"1157916361\"}}", "{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"10154538612\",\"receiverIds\":[\"301157916361\",\"10154538612\",\"321921188187760\"],\"createTime\":1698303918483,\"groupId\":\"$2$13205337818$PNM\",\"msgId\":\"1996910978679.PNM\",\"contentType\":1,\"content\":\"{\\\"extensions\\\":{\\\"industryType\\\":\\\"NEW_RETAIL\\\",\\\"imsdk_other_show_name\\\":\\\"45d46975e\\\",\\\"imsdk_role_name\\\":\\\"顾客\\\",\\\"imsdk_self_show_name\\\":\\\"45d46975e\\\",\\\"appName\\\":\\\"ELEME\\\",\\\"current_msg_source\\\":\\\"ELEME\\\"},\\\"text\\\":\\\"您好\\\"}\"},\"platformShopId\":\"1157916361\"}}", "{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"10154538612\",\"receiverIds\":[\"301157916361\",\"10154538612\",\"321921188187760\"],\"createTime\":1698303946914,\"groupId\":\"$2$13205337818$PNM\",\"msgId\":\"1991934371357.PNM\",\"contentType\":1,\"content\":\"{\\\"extensions\\\":{\\\"appName\\\":\\\"ELEME\\\",\\\"industryType\\\":\\\"NEW_RETAIL\\\",\\\"current_msg_source\\\":\\\"ELEME\\\",\\\"imsdk_role_name\\\":\\\"顾客\\\",\\\"imsdk_self_show_name\\\":\\\"45d46975e\\\",\\\"imsdk_other_show_name\\\":\\\"45d46975e\\\"},\\\"text\\\":\\\"[微笑]\\\"}\"},\"platformShopId\":\"1157916361\"}}"
|
||||
|
||||
"{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"101000124198002\",\"receiverIds\":[\"321921188187760\",\"101000124198002\",\"301157916361\"],\"createTime\":1699000572978,\"groupId\":\"$2$13315405121$PNM\",\"msgId\":\"2011596619981.PNM\",\"contentType\":\"2\",\"content\":\"{\\\"fileType\\\":3,\\\"mediaId\\\":\\\"$igHNA-kCpGpwZWcDAQTNAc4FzQPoBtoAI4QBpCFQvEYCqrkXr-dN527mZcwDzwAAAYuUU1obBM4Al-xzB88AAFvb7IZscggACgQLzgAB9EQ\\\",\\\"orientation\\\":0,\\\"size\\\":128068}\"},\"platformShopId\":\"1157916361\"}}",
|
||||
"{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"101000124198002\",\"receiverIds\":[\"321921188187760\",\"101000124198002\",\"301157916361\"],\"createTime\":1699000587153,\"groupId\":\"$2$13315405121$PNM\",\"msgId\":\"2019467437200.PNM\",\"contentType\":\"1\",\"content\":\"{\\\"extensions\\\":{},\\\"text\\\":\\\"是现杀的新鲜鸡\\\"}\"},\"platformShopId\":\"1157916361\"}}",
|
||||
"{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"101000124198002\",\"receiverIds\":[\"321921188187760\",\"101000124198002\",\"301157916361\"],\"createTime\":1699000598697,\"groupId\":\"$2$13315405121$PNM\",\"msgId\":\"2019605209369.PNM\",\"contentType\":\"8\",\"content\":\"{\\\"elements\\\":[{\\\"elementContent\\\":\\\"{\\\\\\\"atAll\\\\\\\":false,\\\\\\\"defaultNick\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"uid\\\\\\\":{\\\\\\\"appUid\\\\\\\":\\\\\\\"301157916361\\\\\\\",\\\\\\\"domain\\\\\\\":\\\\\\\"eleme\\\\\\\"}}\\\",\\\"elementType\\\":3},{\\\"elementContent\\\":\\\"{\\\\\\\"extensions\\\\\\\":{},\\\\\\\"text\\\\\\\":\\\\\\\"还是冻的?@商家 \\\\\\\"}\\\",\\\"elementType\\\":1}]}\"},\"platformShopId\":\"1157916361\"}}"
|
||||
]
|
||||
},
|
||||
desc: ""
|
||||
}
|
||||
|
||||
// // 美团音频数据
|
||||
// code: "0"
|
||||
// data: "{"5873:18003191:1:11555094096":["{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1411251415327150080,\"msg_content\":\"QYYLNKWSeCO+c2Sw/K73hBtYPD54B+AT5Vndt26ynS0VQW/QJ87hZGwwBVBaM8GB3edmiLPqLzAwR4tzvZjGBO2VmlOjNb6+vYiAWjGY1ACbPdlAq3bLvwlyCe/Kx68Sf2kKF+jWTWFF/bON2VQI/O8C6xBTh2GY4B5jpfEKWllJvqwQXqWc5ietgLEWmuTP7/NcCFZGt8JJfdA7yFQqqb/AS130qAv0/JIvgv9c+ZgAuJmmInjxnEyij7vKntDF5/fDozT+H7zApPunkK+QrE+ewCmErQkk2oWK8m+I1gqLWdYr31sBN72Og81l3u4W8E/hV+sO50U7sQbuHWEASQ==\",\"msg_source\":2,\"msg_type\":3,\"cts\":1698222298,\"open_user_id\":11555094096,\"order_id\":0,\"group_id\":0,\"app_spu_codes\":\"\"}}"]}"
|
||||
// desc: ""
|
||||
|
||||
// 美团音频数据
|
||||
// QYYLNKWSeCO+c2Sw/K73hBtYPD54B+AT5Vndt26ynS0VQW/QJ87hZGwwBVBaM8GB3edmiLPqLzAwR4tzvZjGBO2VmlOjNb6+vYiAWjGY1ACbPdlAq3bLvwlyCe/Kx68Sf2kKF+jWTWFF/bON2VQI/O8C6xBTh2GY4B5jpfEKWllJvqwQXqWc5ietgLEWmuTP7/NcCFZGt8JJfdA7yFQqqb/AS130qAv0/JIvgv9c+ZgAuJmmInjxnEyij7vKntDF5/fDozT+H7zApPunkK+QrE+ewCmErQkk2oWK8m+I1gqLWdYr31sBN72Og81l3u4W8E/hV+sO50U7sQbuHWEASQ==
|
||||
// https://file.neixin.cn/proxy/0/s3/afc/698bce4c-ddc6-4b10-a24b-3790120a0fa6_1698222298877?AWSAccessKeyId=115479efca564d62820d47f9153702f9&Expires=1698308699&Signature=dOhRnfq0udZFrVPz5sK8j4tj9uo%3D>m=1698222299573&filename=2023-10-25+16%3A24%3A58+907.amr
|
||||
|
||||
|
||||
// 用户列表
|
||||
// code: "0"
|
||||
// data: "{"5873:18003191:1":["{\"vendorID\":1,\"userID\":\"9099662511\",\"orderID\":\"1100756014203287879\",\"NewMessageNum\":0,\"latestMsg\":\"sgfc6Fw3EEC+N4h7mR8iLTTIuu6o2eMXVL6JqmAx9LHWroiRUNZXQNLzwrd9bG6I\",\"latestTime\":1696737412}","{\"vendorID\":1,\"userID\":\"11161356777\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"ML73Il8Yl/02TZ7hYx39/Q==\",\"latestTime\":1696748470}","{\"vendorID\":1,\"userID\":\"10492988799\",\"orderID\":\"1100756704146983163\",\"NewMessageNum\":0,\"latestMsg\":\"HFi0BcKs2zyQwwgwk6kUDQ==\",\"latestTime\":1696743753}","{\"vendorID\":1,\"userID\":\"11555094096\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"FskpgyfRcmbvR3Ut0sPVgvRKwIrjZ+uXRjW1HK9k7mQ=\",\"latestTime\":1696752752}","{\"vendorID\":1,\"userID\":\"11121583583\",\"orderID\":\"1100756913067981796\",\"NewMessageNum\":0,\"latestMsg\":\"wXP3NiYAF1hhFM+CD/P3HOzbADez/9KCNvD6L+R0uD0=\",\"latestTime\":1696752253}"]}"
|
||||
// desc: ""
|
||||
|
||||
// 聊天详情
|
||||
// code: "0"
|
||||
// data: "{"5873:18003191:1:11161356777":["{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1405065885751885824,\"msg_content\":\"dtj7qIlXCPm1ZWUjwfEPc65cnsG57UYatDG6g/kYjYU+CSzeFNPE1THgv2cHUB0QhpNo6jEnCDc0Vte2V5h14J7NJ5Zbaprfysx+gLRua68o2Pp4pF0LDSMLQ+7pGh/GRDjdfYYS4qFqU17eBbT82x1LjsuY1HWe8Z2znWyo43lQ6CpTqmwcGYGriWDe92cWJ9eptuKRkZFmirAkYmuHKyKi3ce9lJ9MH3JogKczw+tmb4ooRd8z9ZiFIMTQ9pG11peV45qLmcZXgMo9Q7t3cZEgX4fU2RGdT2gpGXOTl48599Y79ic49DQU9szebnLslUwZekawLCwt99laGfhPfSZhR5CmeuzfYe/VFlTbQG++BxrK2ZSPrJtqStLVN7gGfnR/cHwmIfSDL3JZwymQ1cA641E8P3BmTQPzboOMNqrbWXYMdiiCbpLfEmYz7i+KoT4CsrBZEmPFuK3C8RynGBUDz9ZTGq+tB1sWC6kFDFN+BbeZz6gzrPFw6ydCHIDh\",\"msg_source\":2,\"msg_type\":5,\"cts\":1696747553,\"open_user_id\":11161356777,\"order_id\":1100756844146983163,\"group_id\":0,\"app_spu_codes\":\"\"}}","{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1405065906828263424,\"msg_content\":\"cCwNlL9ukNzOfS/A76CWnA==\",\"msg_source\":2,\"msg_type\":1,\"cts\":1696747558,\"open_user_id\":11161356777,\"order_id\":1100756844146983163,\"group_id\":0,\"app_spu_codes\":\"\"}}","{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1405065937144692736,\"msg_content\":\"Cx7e5k07X34v9MXn/dPKX3t9cKUo2RTKFegWCoFIg7s=\",\"msg_source\":2,\"msg_type\":1,\"cts\":1696747565,\"open_user_id\":11161356777,\"order_id\":1100756844146983163,\"group_id\":0,\"app_spu_codes\":\"\"}}","{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1405066156422905856,\"msg_content\":\"51kZuOfsFBtHME6GxxkY9SzIP7XDBD1QVKPY/G+RVucUSI32PuK3+5yRI2j2UboLPh8dXFsrLKzbXxwV9P8B6QGlHyiE8V19v4cwFo6hxt0=\",\"msg_source\":2,\"msg_type\":1,\"cts\":1696747618,\"open_user_id\":11161356777,\"order_id\":1100756844146983163,\"group_id\":0,\"app_spu_codes\":\"\"}}","{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1405066372173709312,\"msg_content\":\"TsXJ4usAgosTFgs1ar9DcusMZ5cK5ZfLxBuIjtu3d7k=\",\"msg_source\":2,\"msg_type\":1,\"cts\":1696747669,\"open_user_id\":11161356777,\"order_id\":1100756844146983163,\"group_id\":0,\"app_spu_codes\":\"\"}}","{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1405069732759126016,\"msg_content\":\"ML73Il8Yl/02TZ7hYx39/Q==\",\"msg_source\":2,\"msg_type\":1,\"cts\":1696748470,\"open_user_id\":11161356777,\"order_id\":0,\"group_id\":0,\"app_spu_codes\":\"\"}}"]}"
|
||||
// desc: ""
|
||||
|
||||
// 加密内容
|
||||
// "kJhw2zGHISMeeNatcB62eoctFxbqneVDKiP75531PhYMisp7wJN44Yk/JpwHwbcg"
|
||||
// 译文:啦啦啦[大哭][睡]忆往昔[嘘]哈哈
|
||||
|
||||
// 表情
|
||||
// code: "0"
|
||||
// data: "{"5873:18003191:1:11555094096":["{\"sendType\":\"mt\",\"msgContent\":{\"app_id\":5873,\"app_poi_code\":\"18003191\",\"msg_id\":1401396902286315520,\"msg_content\":\"rq+Y2WYA/UjW7inVLzG3IQ==\",\"msg_source\":2,\"msg_type\":1,\"cts\":1695872799,\"open_user_id\":11555094096,\"order_id\":0,\"group_id\":0,\"app_spu_codes\":\"\"}}"]}"
|
||||
// desc: ""
|
||||
|
||||
// rq+Y2WYA/UjW7inVLzG3IQ==\
|
||||
// M/whRohCtpsVTviiMAK8hQ==
|
||||
}
|
||||
|
||||
// 饿百用户列表
|
||||
// code: "0"
|
||||
// data: "{"34665:1157916361:3":["{\"vendorID\":3,\"userID\":\"$2$13205337818$PNM\",\"orderID\":\"\",\"NewMessageNum\":1,\"latestMsg\":\"{\\\"extensions\\\":{\\\"appName\\\":\\\"ELEME\\\",\\\"industryType\\\":\\\"NEW_RETAIL\\\",\\\"current_msg_source\\\":\\\"ELEME\\\",\\\"imsdk_role_name\\\":\\\"顾客\\\",\\\"imsdk_self_show_name\\\":\\\"45d46975e\\\",\\\"imsdk_other_show_name\\\":\\\"45d46975e\\\"},\\\"text\\\":\\\"[微笑]\\\"}\",\"latestTime\":1698303946914}"],"5873:18003191:1":["{\"vendorID\":1,\"userID\":\"9533643193\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"dTZiwxiOJI5b5zwb1/uCwcCxh3F9MrZtyR+ojZoql4wtzgMh/gzuGRffhgWQd4Sz\",\"latestTime\":1698295674}","{\"vendorID\":1,\"userID\":\"12169240445\",\"orderID\":\"1100782041270894459\",\"NewMessageNum\":0,\"latestMsg\":\"ZiiFa7hQp0BV60OuBKPExiN6IN7fRkjzmcVpaA+kQoQ=\",\"latestTime\":1698295257}","{\"vendorID\":1,\"userID\":\"10892282642\",\"orderID\":\"1100782384203287879\",\"NewMessageNum\":0,\"latestMsg\":\"K/qIurzlbi2B7zv65/mCQg==\",\"latestTime\":1698295422}","{\"vendorID\":1,\"userID\":\"11009807262\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"+tFz6s6u+O8Ndpc2dwP4HA==\",\"latestTime\":1698297046}","{\"vendorID\":1,\"userID\":\"11436731575\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"iMqYgHLYMjKY3JoSMG9YLQ==\",\"latestTime\":1698295279}","{\"vendorID\":1,\"userID\":\"9167982931\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"R4cR7u9LPax/LDKqVHWVLw==\",\"latestTime\":1698300481}","{\"vendorID\":1,\"userID\":\"11432640354\",\"orderID\":\"\",\"NewMessageNum\":0,\"latestMsg\":\"QY5plA6VHEKS7GqXV4jJElsh0x90ftjPFGGoZjX4M/84LQn7ucu0ZeruelSd/VmmZ0OD966b6g5+0ZrgsLBIZiDo2sEOk8a02UUwNt60FPKZEhaCURWvYjCBqDJA8laH\",\"latestTime\":1698304171}","{\"vendorID\":1,\"userID\":\"10946780381\",\"orderID\":\"1100782881905266609\",\"NewMessageNum\":1,\"latestMsg\":\"dtj7qIlXCPm1ZWUjwfEPc65cnsG57UYatDG6g/kYjYU+CSzeFNPE1THgv2cHUB0QhpNo6jEnCDc0Vte2V5h14J7NJ5Zbaprfysx+gLRua68o2Pp4pF0LDSMLQ+7pGh/GRDjdfYYS4qFqU17eBbT82x1LjsuY1HWe8Z2znWyo43nEcLbtPFU09HwXFgxOQLBhF4As08Inc7bvN6BPR8F46QtQR52+PvxiWdsDRV54/F2CqxuoFR3up6wKmxvyzDWyEAgFI8Ym7zqItVBfG8HtEXTezY3gCjtpK0qRoYJqJ+dIuQewnDXbbxyqu/JvXSdiLYVRdrZgY9UI1hBDQU4zN6XI2u/w8tzk3a6mSrTCfUyaB0xr5/bwLYfgwV4WDw0EaLQEr2R0OmMerlRMheR3A+GMYVxl+BcYx0fUrKuH7Fs1TNSRCS4ug4iMr/GoTv76J8jl1b2ihrFDPiVQRxPdSw==\",\"latestTime\":1698308642}"]}"
|
||||
// desc: ""
|
||||
|
||||
// $2$13205337818$PNM
|
||||
// 饿百聊天详情
|
||||
// code: "0"
|
||||
// data: "{"34665:1157916361:3:$2$13205337818$PNM":["{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"10154538612\",\"receiverIds\":[\"301157916361\",\"10154538612\",\"321921188187760\"],\"createTime\":1698303833173,\"groupId\":\"$2$13205337818$PNM\",\"msgId\":\"1997094742949.PNM\",\"contentType\":8,\"content\":\"{\\\"elements\\\":[{\\\"elementContent\\\":\\\"{\\\\\\\"atAll\\\\\\\":false,\\\\\\\"defaultNick\\\\\\\":\\\\\\\"商家\\\\\\\",\\\\\\\"uid\\\\\\\":{\\\\\\\"appUid\\\\\\\":\\\\\\\"301157916361\\\\\\\",\\\\\\\"domain\\\\\\\":\\\\\\\"eleme\\\\\\\"}}\\\",\\\"elementType\\\":3},{\\\"elementContent\\\":\\\"{\\\\\\\"extensions\\\\\\\":{\\\\\\\"imsdk_self_show_name\\\\\\\":\\\\\\\"45d46975e\\\\\\\",\\\\\\\"appName\\\\\\\":\\\\\\\"ELEME\\\\\\\",\\\\\\\"imsdk_role_name\\\\\\\":\\\\\\\"顾客\\\\\\\",\\\\\\\"imsdk_other_show_name\\\\\\\":\\\\\\\"45d46975e\\\\\\\",\\\\\\\"industryType\\\\\\\":\\\\\\\"NEW_RETAIL\\\\\\\",\\\\\\\"current_msg_source\\\\\\\":\\\\\\\"ELEME\\\\\\\"},\\\\\\\"text\\\\\\\":\\\\\\\"您好,请问我的订单还要多久送达?\\\\\\\"}\\\",\\\"elementType\\\":1}]}\"},\"platformShopId\":\"1157916361\"}}","{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"10154538612\",\"receiverIds\":[\"301157916361\",\"10154538612\",\"321921188187760\"],\"createTime\":1698303918483,\"groupId\":\"$2$13205337818$PNM\",\"msgId\":\"1996910978679.PNM\",\"contentType\":1,\"content\":\"{\\\"extensions\\\":{\\\"industryType\\\":\\\"NEW_RETAIL\\\",\\\"imsdk_other_show_name\\\":\\\"45d46975e\\\",\\\"imsdk_role_name\\\":\\\"顾客\\\",\\\"imsdk_self_show_name\\\":\\\"45d46975e\\\",\\\"appName\\\":\\\"ELEME\\\",\\\"current_msg_source\\\":\\\"ELEME\\\"},\\\"text\\\":\\\"您好\\\"}\"},\"platformShopId\":\"1157916361\"}}","{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"10154538612\",\"receiverIds\":[\"301157916361\",\"10154538612\",\"321921188187760\"],\"createTime\":1698303946914,\"groupId\":\"$2$13205337818$PNM\",\"msgId\":\"1991934371357.PNM\",\"contentType\":1,\"content\":\"{\\\"extensions\\\":{\\\"appName\\\":\\\"ELEME\\\",\\\"industryType\\\":\\\"NEW_RETAIL\\\",\\\"current_msg_source\\\":\\\"ELEME\\\",\\\"imsdk_role_name\\\":\\\"顾客\\\",\\\"imsdk_self_show_name\\\":\\\"45d46975e\\\",\\\"imsdk_other_show_name\\\":\\\"45d46975e\\\"},\\\"text\\\":\\\"[微笑]\\\"}\"},\"platformShopId\":\"1157916361\"}}"]}"
|
||||
// desc: ""
|
||||
|
||||
// 饿百用户发送消息时
|
||||
// 模拟客户发消息
|
||||
// let msg1 = JSON.stringify({
|
||||
// sendType: 'elm',
|
||||
// msgContent: {
|
||||
// subBizType: 'SEND_MESSAGE',
|
||||
// bizType: 'IM',
|
||||
// payLoad: {
|
||||
// senderId: "10154538612",
|
||||
// receiverIds: ["301157916361", "10154538612", "321921188187760"],
|
||||
// createTime: 1698303946914,
|
||||
// groupId: "$2$13205337818$PNM",
|
||||
// msgId: new Date().getTime() + '',
|
||||
// contentType: 1,
|
||||
// content: JSON.stringify({
|
||||
// extensions: {
|
||||
// appName: "ELEME",
|
||||
// industryType: "NEW_RETAIL",
|
||||
// current_msg_source: "ELEME",
|
||||
// imsdk_role_name: "顾客",
|
||||
// imsdk_self_show_name: "45d46975e",
|
||||
// imsdk_other_show_name: "45d46975e"
|
||||
// },
|
||||
// text: "11问问"
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
|
||||
// 饿百,需测试优化
|
||||
// 聊天列表
|
||||
// code: "0"
|
||||
// data: "{"34665:32267630646:3:$2$21107997212$PNM":["{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"20115813777\",\"receiverIds\":[\"10494269706\",\"20115813777\",\"302036272194\",\"322233065879\"],\"createTime\":1715677161257,\"groupId\":\"$2$21107997212$PNM\",\"msgId\":\"2902868590187.PNM\",\"contentType\":\"101\",\"content\":\"{\\\"data\\\":\\\"{\\\\\\\"mistTemplate\\\\\\\":{\\\\\\\"error\\\\\\\":\\\\\\\"[当前消息不支持,请升级版本]\\\\\\\",\\\\\\\"layoutId\\\\\\\":\\\\\\\"10007\\\\\\\",\\\\\\\"layoutVersion\\\\\\\":\\\\\\\"20240320171418\\\\\\\",\\\\\\\"placeHolder\\\\\\\":{\\\\\\\"hight\\\\\\\":600,\\\\\\\"width\\\\\\\":300}},\\\\\\\"shortTitle\\\\\\\":\\\\\\\"[卡片消息]\\\\\\\"}\\\",\\\"degradeText\\\":\\\"\\\",\\\"summary\\\":\\\"\\\",\\\"title\\\":\\\"\\\",\\\"type\\\":10007}\"},\"platformShopId\":\"32267630646\"}}"]}"
|
||||
// desc: ""
|
||||
|
||||
|
||||
// 聊天详情
|
||||
// code: "0"
|
||||
// data: "{"34665:32267630646:3:$2$21107997212$PNM":["{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"20115813777\",\"receiverIds\":[\"10494269706\",\"20115813777\",\"302036272194\",\"322233065879\"],\"createTime\":1715677161257,\"groupId\":\"$2$21107997212$PNM\",\"msgId\":\"2902868590187.PNM\",\"contentType\":\"101\",\"content\":\"{\\\"data\\\":\\\"{\\\\\\\"mistTemplate\\\\\\\":{\\\\\\\"error\\\\\\\":\\\\\\\"[当前消息不支持,请升级版本]\\\\\\\",\\\\\\\"layoutId\\\\\\\":\\\\\\\"10007\\\\\\\",\\\\\\\"layoutVersion\\\\\\\":\\\\\\\"20240320171418\\\\\\\",\\\\\\\"placeHolder\\\\\\\":{\\\\\\\"hight\\\\\\\":600,\\\\\\\"width\\\\\\\":300}},\\\\\\\"shortTitle\\\\\\\":\\\\\\\"[卡片消息]\\\\\\\"}\\\",\\\"degradeText\\\":\\\"\\\",\\\"summary\\\":\\\"\\\",\\\"title\\\":\\\"\\\",\\\"type\\\":10007}\"},\"platformShopId\":\"32267630646\"}}","{\"sendType\":\"elm\",\"msgContent\":{\"subBizType\":\"SEND_MESSAGE\",\"bizType\":\"IM\",\"payLoad\":{\"senderId\":\"302036272194\",\"receiverIds\":null,\"createTime\":1715680290254,\"groupId\":\"$2$21107997212$PNM\",\"msgId\":\"2902644397115.PNM\",\"contentType\":\"1\",\"content\":\"{\\\"extensions\\\":{},\\\"text\\\":\\\"1\\\"}\"},\"platformShopId\":\"32267630646\"}}"]}"
|
||||
// desc: ""
|
||||
234
src/api/request.ts
Normal file
234
src/api/request.ts
Normal file
@@ -0,0 +1,234 @@
|
||||
/**
|
||||
*@description: 请求接口配置文件
|
||||
*@return {*}
|
||||
*@param
|
||||
*/
|
||||
import urlConfig from "./config";
|
||||
import toast from "@/utils/toast";
|
||||
import { cleatStorage, getStorage } from "@/utils/storage";
|
||||
import { store } from "@/store";
|
||||
import { addTask, jx_trembling } from "@/utils/tools";
|
||||
import configCms from "@/utils/configCms";
|
||||
import log from '@/utils/log'
|
||||
|
||||
|
||||
// 定义请求类型
|
||||
type methodsType = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "DELETE" | "TRACE" | "CONNECT" | undefined
|
||||
// 定义方法中的类型
|
||||
type FnApiType = {
|
||||
(url: string, methods: methodsType, data?: AnyObject | string, timeout?: number, baseURL?: string, contentType?: string): Promise<AnyObject>
|
||||
}
|
||||
// 定义方法类型
|
||||
interface Api {
|
||||
api: FnApiType
|
||||
}
|
||||
// 请求类型请求头
|
||||
let cType = 'application/x-www-form-urlencoded'
|
||||
// 最大超时时间默认15秒
|
||||
let timeouts: any = 0
|
||||
// 清空定时器,在800毫秒内数据请求回来了就清空定时器
|
||||
let timer: any
|
||||
// 最大请求加载图层时间
|
||||
let timer1: any
|
||||
// 保存请求中断
|
||||
let requestTask: any = null
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 封装请求方法
|
||||
* @param {string} [url] 请求地址
|
||||
* @param {methodsType} [method] 请求方法默认GET
|
||||
* @param {object} [data] 请求参数默认""
|
||||
* @param {number} [timeout] 请求超时时间
|
||||
* @param {string} [baseURL] 请求根路径默认https://wx.jxc4.com
|
||||
* @param {string} [contentType] 请求头类型默认'application/x-www-form-urlencoded'
|
||||
* @return {promist} [resolve, reject] promist成功与失败
|
||||
*/
|
||||
|
||||
const request: Api = {
|
||||
api: (url, method = 'GET', data = "", timeout = 1000 * 20, baseURL = urlConfig, contentType = cType) => {
|
||||
if (requestGuard(url)) {
|
||||
return new Promise((resolve, reject) => { })
|
||||
}
|
||||
timeouts = timeout
|
||||
// store.commit('storeInfo/jxLoadingFn', false) // 关闭自定义加载图(vuex)
|
||||
clearTimeout(timer)
|
||||
timer = setTimeout(() => {
|
||||
// 显示自定义加载图(vuex)
|
||||
// store.commit('storeInfo/jxLoadingFn', true)
|
||||
// uni.showNavigationBarLoading()
|
||||
// 最大时间加载图
|
||||
tremblingJxLoadingFn()
|
||||
}, 600)
|
||||
if (url == '/v2/cms/GetNewOrderMsg') store.commit('storeInfo/jxLoadingFn', false)
|
||||
return new Promise((resolve, reject) => {
|
||||
requestTask = uni.request({
|
||||
url: baseURL + url,
|
||||
method: method,
|
||||
data: data,
|
||||
timeout: timeout,
|
||||
header: {
|
||||
'content-type': contentType,
|
||||
'token': getStorage('token') ? getStorage('token') : 'jxcs'
|
||||
},
|
||||
success: (res) => {
|
||||
//#region
|
||||
let logData = {
|
||||
'日志记录时间': Date(),
|
||||
'调用接口': url,
|
||||
'请求方法': method,
|
||||
'请求参数': data,
|
||||
'请求超时时间': timeout,
|
||||
'请求域名': baseURL,
|
||||
'登录类型': getStorage('loginType') ? getStorage('loginType') : '未获取到用户登录类型',
|
||||
'用户TOKEN': getStorage('token') ? getStorage('token') : '未获取到用户TOKEN',
|
||||
'权限ID': getStorage('userType') ? getStorage('userType') : '未获取到用户权限ID',
|
||||
'用户ID': getStorage('userID') ? getStorage('userID') : '未获取到用户ID',
|
||||
'用户ID2': getStorage('userID2') ? getStorage('userID2') : '未获取到用户ID2',
|
||||
'用户手机号': getStorage('mobile') ? getStorage('mobile') : '未获取到用户手机号',
|
||||
'店铺ID': getStorage('storeID') ? getStorage('storeID') : '未获取到店铺ID',
|
||||
'店铺名字': getStorage('storeName') ? getStorage('storeName') : '未获取到店铺名字',
|
||||
'网络状态码': res.statusCode,
|
||||
'服务端数据': res.data
|
||||
}
|
||||
//#endregion
|
||||
// store.commit('storeInfo/jxLoadingFn', false) // 关闭自定义加载图(vuex)
|
||||
if (res.statusCode >= 200 && res.statusCode < 300) {
|
||||
log.info(JSON.stringify(logData))
|
||||
// 通过token 验证 通过store 验证
|
||||
if ((res.data as AnyObject).code == '-2') {
|
||||
uni.jxAlert({
|
||||
title: '提示',
|
||||
content: '登录信息已过期',
|
||||
confirmText: '重新登录',
|
||||
success: () => {
|
||||
cleatStorage()
|
||||
uni.reLaunch({ url: '/subPages/login/wxLogin/wxLogin' })
|
||||
}
|
||||
})
|
||||
return false
|
||||
} else {
|
||||
// 验证通过
|
||||
try {
|
||||
const jsonData = JSON.parse((res.data as AnyObject).data)
|
||||
resolve({
|
||||
code: (res.data as AnyObject).code,
|
||||
data: jsonData,
|
||||
desc: (res.data as AnyObject).desc
|
||||
})
|
||||
} catch (error) {
|
||||
resolve(res.data as AnyObject)
|
||||
}
|
||||
}
|
||||
} else if (res.statusCode >= 400 && res.statusCode < 500) {
|
||||
log.warn(JSON.stringify(logData))
|
||||
toast('客户端出错', 2)
|
||||
reject('客户端出错')
|
||||
} else if (res.statusCode >= 500) {
|
||||
log.warn(JSON.stringify(logData))
|
||||
toast('服务端出错', 2)
|
||||
reject('服务端出错')
|
||||
} else {
|
||||
log.warn(JSON.stringify(logData))
|
||||
toast('网络请求出错', 2)
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
if (error.errMsg == 'request:fail abort') {
|
||||
// 中断请求
|
||||
return false
|
||||
}
|
||||
toast('网络请求超时', 2)
|
||||
console.log('jx-网络请求超时', error);
|
||||
reject(`网络请求超时 -- request.ts, ${error}`)
|
||||
//#region
|
||||
let logData = {
|
||||
'日志记录时间': Date(),
|
||||
'调用接口': url,
|
||||
'请求方法': method,
|
||||
'请求参数': data,
|
||||
'请求超时时间': timeout,
|
||||
'请求域名': baseURL,
|
||||
'登录类型': getStorage('loginType') ? getStorage('loginType') : '未获取到用户登录类型',
|
||||
'用户TOKEN': getStorage('token') ? getStorage('token') : '未获取到用户TOKEN',
|
||||
'权限ID': getStorage('userType') ? getStorage('userType') : '未获取到用户权限ID',
|
||||
'用户ID': getStorage('userID') ? getStorage('userID') : '未获取到用户ID',
|
||||
'用户ID2': getStorage('userID2') ? getStorage('userID2') : '未获取到用户ID2',
|
||||
'用户手机号': getStorage('mobile') ? getStorage('mobile') : '未获取到用户手机号',
|
||||
'店铺ID': getStorage('storeID') ? getStorage('storeID') : '未获取到店铺ID',
|
||||
'店铺名字': getStorage('storeName') ? getStorage('storeName') : '未获取到店铺名字',
|
||||
'请求错误信息': error
|
||||
}
|
||||
log.error(JSON.stringify(logData)) // 普通请求日志
|
||||
//#endregion
|
||||
},
|
||||
complete: () => {
|
||||
uni.stopPullDownRefresh()
|
||||
// uni.hideNavigationBarLoading()
|
||||
// store.commit('storeInfo/jxLoadingFn', false) // 关闭自定义加载图(vuex)
|
||||
uni.hideLoading()
|
||||
clearTimeout(timer) // 清空定时器
|
||||
}
|
||||
})
|
||||
|
||||
// 添加请求记录到缓存
|
||||
if (url == '/v2/cms/GetNewOrderMsg') return
|
||||
addTask(requestTask)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* 防抖超时加载图层
|
||||
*/
|
||||
const tremblingJxLoadingFn = jx_trembling(() => {
|
||||
clearTimeout(timer1)
|
||||
timer1 = setTimeout(() => {
|
||||
store.commit('storeInfo/jxLoadingFn', false) // 关闭自定义加载图(vuex)
|
||||
clearTimeout(timer1)
|
||||
}, timeouts)
|
||||
}, 500)
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 登录守卫
|
||||
*/
|
||||
function requestGuard(url: string) {
|
||||
// 获取网络状态
|
||||
uni.getNetworkType({
|
||||
success: (res) => {
|
||||
if (res.networkType == 'none') {
|
||||
store.commit('serveInfo/setIsNetWorkS', false)
|
||||
} else {
|
||||
store.commit('serveInfo/setIsNetWorkS', true)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 验证token
|
||||
if (!getStorage('token') && !configCms.whiteListUrl.includes(url)) {
|
||||
// store.commit('serveInfo/setIsFirestLogin', true)
|
||||
return true
|
||||
}
|
||||
|
||||
// 验证storeID
|
||||
if (!getStorage('storeID') && !configCms.whiteListUrl.includes(url)) {
|
||||
rulerStoreID()
|
||||
return true
|
||||
}
|
||||
|
||||
// 验证网络状态
|
||||
if (!store.state.serveInfo.isNetWork) {
|
||||
return true
|
||||
}
|
||||
|
||||
store.commit('serveInfo/setIsFirestLogin', getStorage('token') ? false : true)
|
||||
return false
|
||||
}
|
||||
// 门店防抖节流
|
||||
const rulerStoreID = jx_trembling(() => {
|
||||
uni.navigateTo({ url: "/subPages/switchStore/switchStore" })
|
||||
}, 1000)
|
||||
|
||||
|
||||
export default request
|
||||
Reference in New Issue
Block a user