全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
@@ -55,7 +55,7 @@ export function getBargainList(data) {
|
||||
* @param object data
|
||||
*/
|
||||
export function getBargainUserList(data){
|
||||
return request.get('bargain/user/list',data);
|
||||
return request.get('bargain/record',data);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,12 +76,13 @@ export function getBargainDetail(id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 开启砍价用户信息
|
||||
* 用户砍价信息,注意自己的活动和别人的活动的区别
|
||||
*/
|
||||
export function postBargainStartUser(data) {
|
||||
return request.get("bargain/start/user", data);
|
||||
export function getBargainUser(data) {
|
||||
return request.get("bargain/user", data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 砍价开启
|
||||
*/
|
||||
@@ -110,20 +111,6 @@ export function postBargainHelpList(params,data) {
|
||||
return request.get("bargain/help/list?limit="+params.limit+"&page="+params.page, data,{});
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
|
||||
*/
|
||||
export function postBargainHelpCount(data) {
|
||||
return request.get("bargain/help/count", data,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 观看/分享/参与次数
|
||||
*/
|
||||
export function postBargainShare(bargainId) {
|
||||
return request.get("bargain/share/" + bargainId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀产品时间区间
|
||||
*
|
||||
@@ -193,5 +180,41 @@ export function scombinationCode(id) {
|
||||
* @param int id
|
||||
*/
|
||||
export function getSeckillHeaderApi(){
|
||||
return request.get('seckill/header',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页秒杀产品列表
|
||||
*/
|
||||
export function getSeckillIndexApi(){
|
||||
return request.get('seckill/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 首页拼团产品列表
|
||||
*/
|
||||
export function getCombinationIndexApi(){
|
||||
return request.get('combination/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页砍价产品列表
|
||||
*/
|
||||
export function getBargainIndexApi(){
|
||||
return request.get('bargain/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页砍价产品列表
|
||||
*/
|
||||
export function bargainHeaderApi(){
|
||||
return request.get('bargain/header');
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼图列表头部
|
||||
*/
|
||||
export function combinationHeaderApi(){
|
||||
return request.get('combination/header');
|
||||
}
|
||||
@@ -120,9 +120,6 @@ export function verifyCode(){
|
||||
export function registerVerify(phone){
|
||||
return request.post('sendCode', { phone: phone },{noAuth:true},1)
|
||||
}
|
||||
// export function registerVerify(phone, reset, key, code){
|
||||
// return request.post('register/verify', { phone: phone, type: reset === undefined ? 'reset' : reset, key: key, code: code },{noAuth:true})
|
||||
// }
|
||||
|
||||
/**
|
||||
* 手机号注册
|
||||
|
||||
@@ -4,10 +4,8 @@ import request from "@/utils/request.js";
|
||||
* 获取购物车列表
|
||||
* @param numType boolean true 购物车数量,false=购物车产品数量
|
||||
*/
|
||||
export function getCartCounts(numType) {
|
||||
return request.get("cart/count", {
|
||||
numType: numType === undefined ? true : numType
|
||||
});
|
||||
export function getCartCounts(numType,type) {
|
||||
return request.get("cart/count?numType=" + numType + "&type=" + type);
|
||||
}
|
||||
/**
|
||||
* 获取购物车列表
|
||||
@@ -184,8 +182,8 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain
|
||||
* @param string price
|
||||
*
|
||||
*/
|
||||
export function getCouponsOrderPrice(data) {
|
||||
return request.get('coupons/order', data)
|
||||
export function getCouponsOrderPrice(preOrderNo) {
|
||||
return request.get(`coupons/order/${preOrderNo}`)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,8 +192,8 @@ export function getCouponsOrderPrice(data) {
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function orderCreate(key, data) {
|
||||
return request.post('order/create/' + key, data);
|
||||
export function orderCreate(data) {
|
||||
return request.post('order/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -204,8 +202,8 @@ export function orderCreate(key, data) {
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export function postOrderComputed(key, data) {
|
||||
return request.post("order/computed/" + key, data);
|
||||
export function postOrderComputed(data) {
|
||||
return request.post("order/computed/price", data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,5 +227,29 @@ export function wechatOrderPay(data) {
|
||||
* @param object data
|
||||
*/
|
||||
export function wechatQueryPayResult(data) {
|
||||
return request.get('pay/queryPayResult', data);
|
||||
return request.get('pay/queryPayResult?orderNo=' + data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请退款商品详情
|
||||
* @param object data
|
||||
*/
|
||||
export function applyRefund(orderId) {
|
||||
return request.get(`order/apply/refund/${orderId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预下单
|
||||
* @param object data
|
||||
*/
|
||||
export function preOrderApi(data) {
|
||||
return request.post(`order/pre/order`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载预下单
|
||||
* @param object preOrderNo
|
||||
*/
|
||||
export function loadPreOrderApi(preOrderNo) {
|
||||
return request.get(`order/load/pre/${preOrderNo}`);
|
||||
}
|
||||
@@ -12,22 +12,15 @@ export function getWechatConfig() {
|
||||
return request.get("wechat/config",{ url: encodeURIComponent(wechat.signLink()) },{ noAuth: true });
|
||||
}
|
||||
|
||||
// export function getWechatConfig() {
|
||||
// return request.get(
|
||||
// "wechat/config",
|
||||
// { url: encodeURIComponent(location.href.split('#')[0]) },
|
||||
// { noAuth: true }
|
||||
// );
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取微信sdk配置
|
||||
* @returns {*}
|
||||
*/
|
||||
export function wechatAuth(code, spread, login_type) {
|
||||
export function wechatAuth(code, spread) {
|
||||
var reg=/^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 ,判断正整数用/^[1-9]+[0-9]*]*$/
|
||||
spread = reg.test(spread) ? spread : 0;
|
||||
return request.get(
|
||||
"wechat/authorize/login",
|
||||
{ code, spread_spid:spread, login_type },
|
||||
"wechat/authorize/login?code=" + code + "&spread_spid=" + spread, {},
|
||||
{ noAuth: true }
|
||||
);
|
||||
}
|
||||
@@ -98,14 +91,26 @@ export function getUserPhone(data){
|
||||
}
|
||||
|
||||
/**
|
||||
* 静默授权
|
||||
* APP微信登录
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function silenceAuth(data) {
|
||||
//#ifdef MP
|
||||
return request.get("wechat/authorize/program/login", data, { noAuth : true });
|
||||
//#endif
|
||||
//#ifdef H5
|
||||
return request.get("wechat/authorize/login", data, { noAuth : true });
|
||||
//#endif
|
||||
export function appAuth(data) {
|
||||
return request.post("wechat/authorize/app/login", data, { noAuth : true });
|
||||
}
|
||||
|
||||
/**
|
||||
* 苹果登录
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function appleLogin(data) {
|
||||
return request.post("ios/login", data, { noAuth : true });
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 苹果绑定手机号
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function iosBinding(data) {
|
||||
return request.post("ios/binding/phone", data, { noAuth : true });
|
||||
}
|
||||
@@ -5,8 +5,8 @@ import request from "@/utils/request.js";
|
||||
* @param int id
|
||||
*
|
||||
*/
|
||||
export function getProductDetail(id) {
|
||||
return request.get('product/detail/' + id, {}, {
|
||||
export function getProductDetail(id, type) {
|
||||
return request.get('product/detail/' + id + '?type=' + type, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
@@ -41,15 +41,20 @@ export function collectAdd(id, category) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收藏产品
|
||||
* 取消收藏产品
|
||||
* @param int id
|
||||
* @param string category product=普通产品,product_seckill=秒杀产品
|
||||
*/
|
||||
export function collectDel(id, category) {
|
||||
return request.post('collect/del', {
|
||||
id: id,
|
||||
'category': category === undefined ? 'product' : category
|
||||
});
|
||||
export function collectDel(proId) {
|
||||
return request.post(`collect/cancel/${proId}`);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除收藏产品
|
||||
* @param string id
|
||||
*/
|
||||
export function collectDelete(ids) {
|
||||
return request.post(`collect/delete`,ids);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +116,7 @@ export function collectAll(id, category) {
|
||||
*
|
||||
*/
|
||||
export function getGroomList(type, data) {
|
||||
return request.get('groom/list/' + type, data, {
|
||||
return request.get('index/product/' + type, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
@@ -163,3 +168,24 @@ export function getSearchKeyword() {
|
||||
export function storeListApi(data) {
|
||||
return request.post("store/list", data, {}, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 优品推荐
|
||||
* @param object data
|
||||
*/
|
||||
export function getProductGood() {
|
||||
return request.get('product/good');
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页产品评论
|
||||
* @param int id
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function getReplyProduct(id) {
|
||||
return request.get('reply/product/' + id, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
@@ -46,9 +46,6 @@ export function getCodeApi() {
|
||||
export function registerVerify(phone){
|
||||
return request.post('sendCode', { phone: phone },{noAuth:true},1)
|
||||
}
|
||||
// export function registerVerify(data) {
|
||||
// return request.post("register/verify", data, { noAuth : true });
|
||||
// }
|
||||
|
||||
/**
|
||||
* h5用户手机号注册
|
||||
@@ -176,7 +173,7 @@ export function spreadCount(type){
|
||||
}
|
||||
|
||||
/*
|
||||
* 推广数据
|
||||
* 推广数据 当前佣金 提现总金额
|
||||
* */
|
||||
export function getSpreadInfo() {
|
||||
return request.get("commission");
|
||||
@@ -316,6 +313,13 @@ export function rechargeWechat(data) {
|
||||
return request.post("recharge/wechat", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* app微信充值
|
||||
* */
|
||||
export function appWechat(data) {
|
||||
return request.post("recharge/wechat/app", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 余额充值
|
||||
* */
|
||||
@@ -365,7 +369,7 @@ export function getChatRecord(to_uid, data) {
|
||||
*/
|
||||
export function spread(puid)
|
||||
{
|
||||
return request.get("user/bindSpread?spreadPid=" + puid);
|
||||
return request.get("user/bindSpread?spreadPid="+ puid);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -414,5 +418,23 @@ export function getBillList(data)
|
||||
return request.get("recharge/bill/record",data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 积分中心详情
|
||||
* */
|
||||
export function postIntegralUser() {
|
||||
return request.get("integral/user");
|
||||
}
|
||||
|
||||
/*
|
||||
* 立即提现 冻结期、冻结佣金、可提现佣金、最低可提现金额
|
||||
* */
|
||||
export function extractUser() {
|
||||
return request.get("extract/user");
|
||||
}
|
||||
|
||||
/*
|
||||
* 推广人统计页 推广人数(一级+二级)、一级人数、二级人数
|
||||
* */
|
||||
export function spreadPeoCount() {
|
||||
return request.get("spread/people/count");
|
||||
}
|
||||
Reference in New Issue
Block a user