...
|
...
|
@@ -65,6 +65,8 @@ const { |
|
|
|
|
|
GET_MINEALLICON_SUCCESS,
|
|
|
|
|
|
GET_MINERESOURCE_SUCCESS,
|
|
|
|
|
|
SET_SIMILAR_PRODUCT_INDEX,
|
|
|
SET_SHOW_SIMILAR_GUIDER,
|
|
|
|
...
|
...
|
@@ -632,3 +634,33 @@ export function onMineCenterRefresh() { |
|
|
dispatch(getGlobalOrderState());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
export function getMineResource() {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app} = getState();
|
|
|
|
|
|
ReactNative.NativeModules.YH_MineHelper.currentMineContentCode()
|
|
|
.then(content_code => {
|
|
|
return new MineService(app.serviceHost).getMineResource(content_code)
|
|
|
.then(json => {
|
|
|
console.log("chenlin", JSON.stringify(json));
|
|
|
dispatch(getMineResourceSuccess(json));
|
|
|
})
|
|
|
.catch(error => {
|
|
|
|
|
|
});
|
|
|
})
|
|
|
.catch(error => {
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
export function getMineResourceSuccess(json) {
|
|
|
return {
|
|
|
type: GET_MINERESOURCE_SUCCESS,
|
|
|
payload: json,
|
|
|
}
|
|
|
} |
...
|
...
|
|