Authored by chenl

删除了一些测试代码和IOS下拉刷新报错的问题。review by 庄佳佳。

... ... @@ -10,10 +10,6 @@ import ReactNative from 'react-native';
export default class YH_PtrRefresh extends React.Component {
static propTypes = {
...View.propTypes // 包含默认的View的属性
};
constructor(props) {
super(props);
}
... ...
... ... @@ -40,7 +40,7 @@ export default class Birth extends Component {
this.props.onPressComplete && this.props.onPressComplete();}}>
<Text style={styles.completeButton}>完善生日信息</Text>
</TouchableOpacity>
<HeadTitleCell title={"你可能喜欢"} />
<HeadTitleCell title={"新品推荐"} />
</View>
);
}
... ...
... ... @@ -36,11 +36,7 @@ export default class FastExpress extends Component {
let desc1 = "白金会员可享受快速送达服务。订单将采用最快速度进行配送(比如航空快件),保证您可以尽快获得心仪的商品。";
let desc2 = "※ 如果您的收件区域位于可提供快速送达服务的快递范围外或订单内的商品包含航空禁运品,我们仍将统一采用可送达快递进行配送,敬请谅解。";
return(
<View style={styles.headerContainer}>
... ...
... ... @@ -32,12 +32,12 @@ export function getBirthProductList() {
return;
}
let userLevel = app.userLevel;
let channel = app.channel;
let page = birth.get('currentPage') + 1;
dispatch(getBirthProductRequest());
return new BirthService(app.host).getBirthProductList(userLevel, page)
return new BirthService(app.host).getBirthProductList(channel, page)
.then(json => {
let payload = parseUtils.parsePageInfoList(json);
... ...
... ... @@ -54,12 +54,12 @@ export function getFastProductList() {
return;
}
let userLevel = app.userLevel;
let channel = app.channel;
let page = fastExpress.get('currentPage') + 1;
dispatch(getFastProductRequest());
return new FastExpressService(app.host).getFastExpressProduct(userLevel, page)
return new FastExpressService(app.host).getFastExpressProduct(channel, page)
.then(json => {
let payload = parseUtils.parsePageInfoList(json);
... ...
... ... @@ -35,12 +35,13 @@ export function getYearActivityProductList() {
return;
}
let userLevel = app.userLevel;
let channel = app.channel;
let page = yearActivity.get('currentPage') + 1;
let pageSize = yearActivity.get('pageSize');
dispatch(getYearProductRequest());
return new yearActivityService(app.host).getYearProductList(userLevel, page)
return new yearActivityService(app.host).getYearProductList(channel, pageSize, page)
.then(json => {
let payload = parseUtils.parsePageInfoList(json);
... ...
... ... @@ -9,7 +9,7 @@ let InitialState = Record({
endReached: false,
similarIndex: -1,
total: 0,
pageSize: 50,
pageSize: 12,
pageCount: 0,
});
... ...
... ... @@ -12,12 +12,12 @@ export default class birthService {
this.api = new Request(baseURL);
}
async getBirthProductList(userLevel, page){
async getBirthProductList(channel, page){
return await this.api.get({
url: '',
body: {
method: 'app.product.vip',
user_vip_level: userLevel,
method: 'app.firstpage.recproduct',
yh_channel: channel,
page,
}
})
... ...
... ... @@ -9,7 +9,7 @@ export default class fastExpressService {
if(host){
baseURL = host;
}
this.api = new Request("http://192.168.103.59:8080/gateway/");
this.api = new Request(baseURL);
}
async getFastExpressInfo(){
... ... @@ -27,12 +27,12 @@ export default class fastExpressService {
});
}
async getFastExpressProduct(userLevel, page){
async getFastExpressProduct(channel, page){
return await this.api.get({
url: '',
body: {
method: 'app.product.vip',
user_vip_level: userLevel,
method: 'app.firstpage.recproduct',
yh_channel: channel,
page,
}
})
... ...