|
@@ -19,7 +19,7 @@ const index = props => {
|
19
|
19
|
const [labelState, setLabelState] = useState(false);
|
20
|
20
|
const [list, setList] = useState({});
|
21
|
21
|
const [labelList, setLabelList] = useState([]);
|
22
|
|
- const [data, setData] = useState({});
|
|
22
|
+ const [data, setData] = useState([]);
|
23
|
23
|
const [tagList, setTagList] = useState([]);
|
24
|
24
|
|
25
|
25
|
let [arrList, setArrList] = useState({});
|
|
@@ -58,7 +58,7 @@ const index = props => {
|
58
|
58
|
newImage: res[0].imageId,
|
59
|
59
|
newTags: data.map(x => x.tagId)
|
60
|
60
|
};
|
61
|
|
- updatainfo(newInfo);
|
|
61
|
+ updatainfo(newInfo,'image');
|
62
|
62
|
});
|
63
|
63
|
}
|
64
|
64
|
});
|
|
@@ -71,10 +71,10 @@ const index = props => {
|
71
|
71
|
newImage: data[0].imageId,
|
72
|
72
|
newTags: labelList.map(x => x.tagId)
|
73
|
73
|
};
|
74
|
|
- updatainfo(newInfo);
|
|
74
|
+ updatainfo(newInfo,'tag');
|
75
|
75
|
};
|
76
|
76
|
|
77
|
|
- const updatainfo = newInfo => {
|
|
77
|
+ const updatainfo = (newInfo,type) => {
|
78
|
78
|
const oldinfo = {
|
79
|
79
|
originImage: data[0].imageId,
|
80
|
80
|
originTags: data.map(x => x.tagId)
|
|
@@ -86,7 +86,7 @@ const index = props => {
|
86
|
86
|
}).then(() => {
|
87
|
87
|
Taro.showModal({
|
88
|
88
|
title: "修改成功",
|
89
|
|
- content: "如果修改是标签请重新查询",
|
|
89
|
+ content:type==='tag'? "修改标签请重新查询":'',
|
90
|
90
|
showCancel: false,
|
91
|
91
|
success: function(res) {
|
92
|
92
|
if (res.confirm) {
|
|
@@ -243,8 +243,8 @@ const index = props => {
|
243
|
243
|
style={{ zIndex: "1000" }}
|
244
|
244
|
>
|
245
|
245
|
<View className="floatmodel">
|
246
|
|
- <View onClick={() => updateLabel()}>更改标签</View>
|
247
|
|
- <View onClick={() => updateImage()}>更换图片</View>
|
|
246
|
+ <View onClick={() => updateLabel('tag')}>更改标签</View>
|
|
247
|
+ <View onClick={() => updateImage('image')}>更换图片</View>
|
248
|
248
|
<View onClick={() => deleteImage()}>删除</View>
|
249
|
249
|
<View
|
250
|
250
|
style={{ color: "#d2d2d2" }}
|