|
|
@@ -102,39 +102,43 @@ export default {
|
|
|
if(this.form.logoStatus==null){
|
|
|
// this.$http.post('/merchant/localMerchantBrand/add',data).then(res => {
|
|
|
this.$http.post('/merchant/localMerchantBrand/addNew',data).then(res => {
|
|
|
- if (res.data.success) {
|
|
|
- uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title:'成功'
|
|
|
- })
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1 // 返回的页面数,默认为1
|
|
|
- })
|
|
|
- }
|
|
|
- else {
|
|
|
- uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title:res.data.message
|
|
|
- })
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:res.data.message || '成功'
|
|
|
+ })
|
|
|
+ setTimeout(()=>{
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1 // 返回的页面数,默认为1
|
|
|
+ })
|
|
|
+ },1000)
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:res.data.message
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
else{
|
|
|
this.$http.post('/merchant/localMerchantBrand/edit',{...data,id:this.form.logoId}).then(res => {
|
|
|
- if (res.data.success) {
|
|
|
- uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title:res.data.result || '成功'
|
|
|
- })
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1 // 返回的页面数,默认为1
|
|
|
- })
|
|
|
- }
|
|
|
- else {
|
|
|
- uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title:res.data.message
|
|
|
- })
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:res.data.message || '成功'
|
|
|
+ })
|
|
|
+ setTimeout(()=>{
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1 // 返回的页面数,默认为1
|
|
|
+ })
|
|
|
+ },1000)
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:res.data.message
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
}
|