浏览代码

25 feb

main
Suyash Srivastava 3 年前
父节点
当前提交
e60e555d86
共有 2 个文件被更改,包括 7 次插入4 次删除
  1. +4
    -2
      src/views/Prescription.js
  2. +3
    -2
      src/views/ViewPrescription.js

+ 4
- 2
src/views/Prescription.js 查看文件

@@ -21,6 +21,8 @@ class Prescription extends Component<Props> {
result:[], result:[],
api_status:0, api_status:0,
activee:true, activee:true,
dataExist:false
}; };
} }
@@ -50,7 +52,7 @@ class Prescription extends Component<Props> {
headers: { Authorization: `Bearer ${global.fcm_token}` }, headers: { Authorization: `Bearer ${global.fcm_token}` },
}) })
.then((res) => { .then((res) => {
this.setState({ result: res.data })
this.setState({ result: res.data,dataExist:true })
console.log(res); console.log(res);
}) })
.catch((res) => { .catch((res) => {
@@ -126,7 +128,7 @@ class Prescription extends Component<Props> {
</ListItem> </ListItem>
))} ))}
</List> </List>
{this.state.activee &&
{!this.state.dataExist &&
<View> <View>
<View style={styles.pre_style16}> <View style={styles.pre_style16}>
<LottieView source={no_prescription_lottie} autoPlay loop /> <LottieView source={no_prescription_lottie} autoPlay loop />


+ 3
- 2
src/views/ViewPrescription.js 查看文件

@@ -25,7 +25,8 @@ class ViewPrescription extends Component<Props> {
data:this.props.route.params.data, data:this.props.route.params.data,
image:[], image:[],
isImageViewVisible:false, isImageViewVisible:false,
imageURI:''
imageURI:'',
dataExist:false
} }
} }


@@ -54,7 +55,7 @@ class ViewPrescription extends Component<Props> {
(uri) => { (uri) => {
this.setState({imageUri:uri}); this.setState({imageUri:uri});
console.log(uri) console.log(uri)
alert('Success');
alert('Successfully Saved',uri);
// setSavedImagePath(uri); // setSavedImagePath(uri);
// setImageURI(uri); // setImageURI(uri);
}, },


正在加载...
取消
保存