|
@@ -85,10 +85,10 @@ function detailUpdate(id, status) {
|
|
|
book.result.data.is_on_user_shelf = status;
|
|
|
}
|
|
|
}
|
|
|
-export function getDetail(id, s = "",pos='') {
|
|
|
+export function getDetail(id, s = "", pos = "") {
|
|
|
return detail
|
|
|
.getAsync(id, function() {
|
|
|
- return axios("/book/" + id + "?s=" + s + '&pos=' + pos).then(r => {
|
|
|
+ return axios("/book/" + id + "?s=" + s + "&pos=" + pos).then(r => {
|
|
|
return {
|
|
|
id,
|
|
|
data: r
|
|
@@ -362,19 +362,20 @@ export function recharge({ product_id, bid, cid, use_coupon }) {
|
|
|
host: location.origin,
|
|
|
pathname: "/recent"
|
|
|
};
|
|
|
+ const token = localStorage.getItem("token");
|
|
|
+
|
|
|
const href = {
|
|
|
host: window.options.pay_url,
|
|
|
query: {
|
|
|
product_id: product_id,
|
|
|
- uid: window.options.uid,
|
|
|
+ token: token ? `${token}` : '',
|
|
|
use_coupon,
|
|
|
distribution_channel_id: window.options.distribution_channel_id,
|
|
|
send_order_id: window.options.send_order_id,
|
|
|
from: window.options.from,
|
|
|
bid,
|
|
|
cid,
|
|
|
- pay_redirect_url: encodeURIComponent(urlFormat(redirect)),
|
|
|
- crm: window.options.crm || ""
|
|
|
+ pay_redirect_url: encodeURIComponent(urlFormat(redirect))
|
|
|
}
|
|
|
};
|
|
|
a.href = urlFormat(href);
|
|
@@ -552,6 +553,11 @@ export function phoneBind(data) {
|
|
|
return axios.post("/bindphone/bind", data);
|
|
|
}
|
|
|
|
|
|
+// 获取验证码
|
|
|
+export function getCode(data) {
|
|
|
+ return axios.post("/bindphone/sendcode", data);
|
|
|
+}
|
|
|
+
|
|
|
// 获取fakebook详情
|
|
|
export function getBookDetail(id) {
|
|
|
return axios("/red_book/getBookDetail?id=" + id);
|
|
@@ -604,3 +610,13 @@ export function getUserCoupon() {
|
|
|
export function getOrderCoupon() {
|
|
|
return axios("/order/effectiveCoupon");
|
|
|
}
|
|
|
+
|
|
|
+//登录平台
|
|
|
+export function userLogin(data) {
|
|
|
+ return axios("/login", { params: data });
|
|
|
+}
|
|
|
+
|
|
|
+//绑定手机号新版
|
|
|
+export function bindUserPhone(data) {
|
|
|
+ return axios.post("/bindphone/bind", data);
|
|
|
+}
|