Authored by Kennaki

接口参数加上uid和udid。

... ... @@ -41,7 +41,7 @@ export default class BrandProductMoreFilter extends React.Component {
},
],
};
this.images = {
selected: require('../../../../image/filter/brandstore_filter_selected.png'),
};
... ... @@ -93,7 +93,7 @@ export default class BrandProductMoreFilter extends React.Component {
scrollEnabled={false}
scrollsToTop={false}
/>
<TouchableOpacity
<TouchableOpacity
activeOpacity={1}
onPress={() => {
this.props.onPressCloseMoreFilter && this.props.onPressCloseMoreFilter();
... ... @@ -119,7 +119,7 @@ let styles = StyleSheet.create({
left: 0,
width: width,
height: height - 40 - 44 - 64,
},
contentContainer: {
flexDirection: 'column',
... ...
... ... @@ -88,6 +88,8 @@ class BrandStoreContainer extends Component {
this.props.actions.getFavoriteState();
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_L', {SHOP_ID: this.props.brandStore.shopId, BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId});
console.log('----------');
console.log(ReactNative.NativeModules.YH_CommonHelper.udid);
}
componentWillUnmount() {
... ...
'use strict';
import {Platform, Dimensions} from 'react-native';
import ReactNative, {Platform, Dimensions} from 'react-native';
import CONFIG from '../config/config';
import DeviceInfo from 'react-native-device-info';
import queryString from 'query-string';
... ... @@ -40,13 +40,18 @@ export default class Request {
* @return {[promise]}
*/
async get(opts) {
if (opts.body && !opts.body.hasOwnProperty('uid')) {
let uid = await ReactNative.NativeModules.RNNativeConfig.uid();
opts.body.uid = uid
}
try {
let response = await this._fetch({
method: 'GET',
url: opts.url,
body: opts.body,
timeout: opts.timeout | 0,
});
});
let data = await this._parseResponse(response);
return data;
... ... @@ -73,6 +78,10 @@ export default class Request {
* @return {[promise]}
*/
async post(opts) {
if (opts.body && !opts.body.hasOwnProperty('uid')) {
let uid = await ReactNative.NativeModules.RNNativeConfig.uid();
opts.body.uid = uid
}
try {
let response = await this._fetch({
method: 'POST',
... ... @@ -165,12 +174,13 @@ export default class Request {
let client_type = Platform.OS === 'ios' ? 'iphone' : 'android';
let {height, width} = Dimensions.get('window');
let screen_size = width + 'x' + height;
let udid = ReactNative.NativeModules.RNNativeConfig.udid;
return {
app_version,
os_version,
client_type,
screen_size,
udid,
};
}
... ...