|
|
@ -4,7 +4,9 @@ import request from "@/utils/request"; |
|
|
|
* 省市区 |
|
|
|
* 省市区 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export function district(data) { |
|
|
|
export function district(data) { |
|
|
|
return request.get("/citys", data, { login: false }); |
|
|
|
return request.get("/citys", data, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -12,7 +14,9 @@ export function district(data) { |
|
|
|
* @param data object 用户账号密码 |
|
|
|
* @param data object 用户账号密码 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export function login(data) { |
|
|
|
export function login(data) { |
|
|
|
return request.post("/login", data, { login: false }); |
|
|
|
return request.post("/login", data, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -20,7 +24,9 @@ export function login(data) { |
|
|
|
* @param data object 用户手机号 也只能 |
|
|
|
* @param data object 用户手机号 也只能 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export function loginMobile(data) { |
|
|
|
export function loginMobile(data) { |
|
|
|
return request.post("/login/mobile", data, { login: false }); |
|
|
|
return request.post("/login/mobile", data, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -28,7 +34,9 @@ export function loginMobile(data) { |
|
|
|
* @param data object 用户手机号 |
|
|
|
* @param data object 用户手机号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export function registerVerify(data) { |
|
|
|
export function registerVerify(data) { |
|
|
|
return request.post("/register/verify", data, { login: false }); |
|
|
|
return request.post("/register/verify", data, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -36,7 +44,9 @@ export function registerVerify(data) { |
|
|
|
* @param data object 用户手机号 验证码 密码 |
|
|
|
* @param data object 用户手机号 验证码 密码 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export function register(data) { |
|
|
|
export function register(data) { |
|
|
|
return request.post("/register", data, { login: false }); |
|
|
|
return request.post("/register", data, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -44,28 +54,38 @@ export function register(data) { |
|
|
|
* @param data object 用户手机号 验证码 密码 |
|
|
|
* @param data object 用户手机号 验证码 密码 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export function registerReset(data) { |
|
|
|
export function registerReset(data) { |
|
|
|
return request.post("/register/reset", data, { login: false }); |
|
|
|
return request.post("/register/reset", data, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* 领取优惠券列表 |
|
|
|
* 领取优惠券列表 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getCoupon(q) { |
|
|
|
export function getCoupon(q) { |
|
|
|
return request.get("/coupons", q, { login: true }); |
|
|
|
return request.get("/coupons", q, { |
|
|
|
|
|
|
|
login: true |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* 点击领取优惠券 |
|
|
|
* 点击领取优惠券 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getCouponReceive(id) { |
|
|
|
export function getCouponReceive(id) { |
|
|
|
return request.post("/coupon/receive", { couponId: id }, { login: true }); |
|
|
|
return request.post("/coupon/receive", { |
|
|
|
|
|
|
|
couponId: id |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
login: true |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* 批量领取优惠券 |
|
|
|
* 批量领取优惠券 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function couponReceiveBatch(couponId) { |
|
|
|
export function couponReceiveBatch(couponId) { |
|
|
|
return request.post("/coupon/receive/batch", { couponId }); |
|
|
|
return request.post("/coupon/receive/batch", { |
|
|
|
|
|
|
|
couponId |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -87,7 +107,9 @@ export function getUser() { |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getUserInfo() { |
|
|
|
export function getUserInfo() { |
|
|
|
|
|
|
|
|
|
|
|
return request.get("/userinfo", { login: true }); |
|
|
|
return request.get("/userinfo", { |
|
|
|
|
|
|
|
login: true |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -95,7 +117,9 @@ export function getUserInfo() { |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function wxappAuth(data) { |
|
|
|
export function wxappAuth(data) { |
|
|
|
|
|
|
|
|
|
|
|
return request.post("/wxapp/auth", data, { login: false }); |
|
|
|
return request.post("/wxapp/auth", data, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -116,14 +140,18 @@ export function getAddressList(data) { |
|
|
|
* 删除地址 |
|
|
|
* 删除地址 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getAddressRemove(id) { |
|
|
|
export function getAddressRemove(id) { |
|
|
|
return request.post("/address/del", { id: id }); |
|
|
|
return request.post("/address/del", { |
|
|
|
|
|
|
|
id: id |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* 设置默认地址 |
|
|
|
* 设置默认地址 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getAddressDefaultSet(id) { |
|
|
|
export function getAddressDefaultSet(id) { |
|
|
|
return request.post("/address/default/set", { id: id }); |
|
|
|
return request.post("/address/default/set", { |
|
|
|
|
|
|
|
id: id |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -151,14 +179,20 @@ export function postAddress(data) { |
|
|
|
* 获取收藏产品 |
|
|
|
* 获取收藏产品 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getCollectUser(page, limit) { |
|
|
|
export function getCollectUser(page, limit) { |
|
|
|
return request.get("/collect/user", { page: page, limit: limit }); |
|
|
|
return request.get("/collect/user", { |
|
|
|
|
|
|
|
page: page, |
|
|
|
|
|
|
|
limit: limit |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* 删除收藏产品 |
|
|
|
* 删除收藏产品 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getCollectDel(id, category) { |
|
|
|
export function getCollectDel(id, category) { |
|
|
|
return request.post("/collect/del", { id: id, category: category }); |
|
|
|
return request.post("/collect/del", { |
|
|
|
|
|
|
|
id: id, |
|
|
|
|
|
|
|
category: category |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -172,7 +206,10 @@ export function postCollectAll(data) { |
|
|
|
* 添加收藏产品 |
|
|
|
* 添加收藏产品 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getCollectAdd(id, category) { |
|
|
|
export function getCollectAdd(id, category) { |
|
|
|
return request.post("collect/add", { id: id, category: category }); |
|
|
|
return request.post("collect/add", { |
|
|
|
|
|
|
|
id: id, |
|
|
|
|
|
|
|
category: category |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -186,14 +223,20 @@ export function getSignConfig() { |
|
|
|
* 签到里的签到列表 |
|
|
|
* 签到里的签到列表 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getSignList(page, limit) { |
|
|
|
export function getSignList(page, limit) { |
|
|
|
return request.get("/sign/list", { page: page, limit: limit }); |
|
|
|
return request.get("/sign/list", { |
|
|
|
|
|
|
|
page: page, |
|
|
|
|
|
|
|
limit: limit |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* 签到列表 |
|
|
|
* 签到列表 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getSignMonth(page, limit) { |
|
|
|
export function getSignMonth(page, limit) { |
|
|
|
return request.get("/sign/month", { page: page, limit: limit }); |
|
|
|
return request.get("/sign/month", { |
|
|
|
|
|
|
|
page: page, |
|
|
|
|
|
|
|
limit: limit |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -284,14 +327,17 @@ export function getBalance() { |
|
|
|
* 活动状态 |
|
|
|
* 活动状态 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getActivityStatus() { |
|
|
|
export function getActivityStatus() { |
|
|
|
return request.get("/user/activity", {}, { login: false }); |
|
|
|
return request.get("/user/activity", {}, { |
|
|
|
|
|
|
|
login: false |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* 活动状态 |
|
|
|
* 活动状态 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function getSpreadImg() { |
|
|
|
export function getSpreadImg(data) { |
|
|
|
return request.get("/spread/banner"); |
|
|
|
|
|
|
|
|
|
|
|
return request.get("/spread/banner", data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -340,7 +386,9 @@ export function bindingPhone(data) { |
|
|
|
* h5切换公众号登陆 |
|
|
|
* h5切换公众号登陆 |
|
|
|
* */ |
|
|
|
* */ |
|
|
|
export function switchH5Login() { |
|
|
|
export function switchH5Login() { |
|
|
|
return request.post("switch_h5", { from: "wechat" }); |
|
|
|
return request.post("switch_h5", { |
|
|
|
|
|
|
|
from: "wechat" |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
/* |
|
|
|
/* |
|
|
|
* 获取推广人排行 |
|
|
|
* 获取推广人排行 |
|
|
|