Authored by chenl

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

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