|
|
@@ -99,19 +99,23 @@ Page({
|
|
|
if (codes && codes == 'success') {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
- title: "添加成功"
|
|
|
+ title: "编辑成功"
|
|
|
});
|
|
|
+ wx.setStorageSync("successId", this.data.pid);
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateBack();
|
|
|
+ }, 800);
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
- title: "添加失败"
|
|
|
+ title: "编辑失败"
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
fail: () => {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
- title: "添加失败"
|
|
|
+ title: "编辑失败"
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -129,11 +133,16 @@ Page({
|
|
|
},
|
|
|
success: (res) => {
|
|
|
var codes = res.data.codes;
|
|
|
+ var backPid = res.data.back.pid || "";
|
|
|
if (codes && codes == 'success') {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
title: "添加成功"
|
|
|
});
|
|
|
+ wx.setStorageSync("successId", backPid);
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateBack();
|
|
|
+ }, 800);
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|