Authored by 孙凯
Committed by 王海元

update 请求 加上fromPage review by daiqiang

... ... @@ -92,9 +92,10 @@ export function getProductList(reload=false) {
let page = productList.page + 1;
let limit = productList.pageSize;
let fromPage = Platform.OS === 'android' ? 'aFP_GroupPurchaseList' : 'iFP_GroupPurchaseList';
dispatch(productListRequest());
return new GroupPurchaseService(app.host).fetchProductList(activityId, page, limit)
return new GroupPurchaseService(app.host).fetchProductList(activityId, page, limit,fromPage)
.then(json => {
json.endReached = json.page == json.page_total;
if (json.page > 1) {
... ...
... ... @@ -132,9 +132,10 @@ export function getProductList(reload=false) {
let page = productList.page + 1;
let limit = productList.pageSize;
let fromPage = Platform.OS === 'android' ? 'aFP_GroupPurchaseDetail' : 'iFP_GroupPurchaseDetail';
dispatch(productListRequest());
return new GroupPurchaseService(app.host).fetchProductList(activityId, page, limit)
return new GroupPurchaseService(app.host).fetchProductList(activityId, page, limit,fromPage)
.then(json => {
json.endReached = json.page == json.page_total;
if (json.page > 1) {
... ...
... ... @@ -13,7 +13,7 @@ export default class groupPurchaseService {
this.api = new Request(baseURL);
}
async fetchProductList(activityId,page=1, limit=20) {
async fetchProductList(activityId,page=1, limit=20,fromPage) {
return await this.api.get({
url: '',
body: {
... ... @@ -21,6 +21,7 @@ export default class groupPurchaseService {
page,
limit,
activityId,
fromPage,
}
})
.then((json) => {
... ... @@ -32,12 +33,14 @@ export default class groupPurchaseService {
}
async fetchActivityGroupDetail(groupNo,uid) {
let fromPage = Platform.OS === 'android' ? 'aFP_GroupPurchaseDetail' : 'iFP_GroupPurchaseDetail';
return await this.api.get({
url: '',
body: {
method: 'app.activity.groupDetail',
groupNo,//: '20354618709',//'19649975637', //'19809359189',
uid,
fromPage,
}
})
.then((json) => {
... ... @@ -49,11 +52,12 @@ export default class groupPurchaseService {
}
async fetchResourceInfo(content_code) {
let fromPage = Platform.OS === 'android' ? 'aFP_GroupPurchaseList' : 'iFP_GroupPurchaseList';
return await this.api.get({
url: '/operations/api/v5/resource/get',
body: {
content_code,
fromPage: ''
fromPage,
}
})
.then((json) => {
... ...