|
@@ -27,15 +27,15 @@ const PicModal = React.createClass({
|
|
|
},
|
|
|
downImg() {
|
|
|
let num = 0;
|
|
|
- for (let i = 0; i < this.props.pictureUrl.length; i++) {
|
|
|
- if (this.props.pictureUrl[i].url == this.state.previewImage) {
|
|
|
+ for (let i = 0; i < this.props.picUrl.length; i++) {
|
|
|
+ if (globalConfig.avatarHost + "/upload" + this.props.picUrl[i] == this.state.previewImage) {
|
|
|
num = i;
|
|
|
}
|
|
|
}
|
|
|
- if (num == this.props.pictureUrl.length - 1) {
|
|
|
+ if (num == this.props.picUrl.length - 1) {
|
|
|
return message.warning("已经是最后一张了哦");
|
|
|
}
|
|
|
- this.state.previewImage = this.props.pictureUrl[num + 1].url;
|
|
|
+ this.state.previewImage = globalConfig.avatarHost + "/upload" + this.props.picUrl[num + 1];
|
|
|
this.setState({
|
|
|
previewImage: this.state.previewImage,
|
|
|
rotateDeg: 0
|
|
@@ -43,15 +43,15 @@ const PicModal = React.createClass({
|
|
|
},
|
|
|
upImg() {
|
|
|
let num = 0;
|
|
|
- for (let i = 0; i < this.props.pictureUrl.length; i++) {
|
|
|
- if (this.props.pictureUrl[i].url == this.state.previewImage) {
|
|
|
+ for (let i = 0; i < this.props.picUrl.length; i++) {
|
|
|
+ if (globalConfig.avatarHost + "/upload" + this.props.picUrl[i] == this.state.previewImage) {
|
|
|
num = i;
|
|
|
}
|
|
|
}
|
|
|
if (num == 0) {
|
|
|
return message.warning("已经是第一张了哦");
|
|
|
}
|
|
|
- this.state.previewImage = this.props.pictureUrl[num - 1].url;
|
|
|
+ this.state.previewImage = globalConfig.avatarHost + "/upload" + this.props.picUrl[num - 1];
|
|
|
this.setState({
|
|
|
previewImage: this.state.previewImage,
|
|
|
rotateDeg: 0
|