付晓文。 hai 2 meses
pai
achega
d82859babf

+ 17 - 13
pages/store/addHours.vue

@@ -249,19 +249,23 @@ export default {
             let interfaceData = data.id ? "/merchant/localMerchantTime/edit" : "/merchant/localMerchantTime/add"
             
             this.$http.post(interfaceData, data).then(res => {
-                if (res.data.success) {
-                    this.$tip.success(res.data.result || '成功')
-                    uni.navigateBack({
-                        delta: 1, // 返回的页面数,默认为1
-                        success: () => {
-                            const pages = getCurrentPages();
-                            pages[pages.length-1].$vm.$forceUpdate();
-                        }
-                    })
-                }
-                else {
-                    this.$tip.error(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
+					})
+					
+				}
             })
         },
 

+ 16 - 11
pages/store/advertising.vue

@@ -244,20 +244,22 @@
 				console.log(this.form.photo)
 				if (this.form.videoStatus == null) {
 					this.$http.post('/merchant/LocalMerchantOperate/add', data).then(res => {
-						if (res.data.success) {
+						if (res.data.code == 200) {
 							uni.showToast({
 								icon:'none',
-								title:res.data.result || '成功'
-							})
-							
-							uni.navigateBack({
-								delta: 1 // 返回的页面数,默认为1
+								title:res.data.message || '成功'
 							})
+							setTimeout(()=>{
+								uni.navigateBack({
+									delta: 1 // 返回的页面数,默认为1
+								})
+							},1000)
 						} else {
 							uni.showToast({
 								icon:'none',
 								title:res.data.message
 							})
+							
 						}
 					})
 				} else {
@@ -265,19 +267,22 @@
 						...data,
 						id: this.form.videoId
 					}).then(res => {
-						if (res.data.success) {
+						if (res.data.code == 200) {
 							uni.showToast({
 								icon:'none',
-								title:res.data.result || '成功'
-							})
-							uni.navigateBack({
-								delta: 1 // 返回的页面数,默认为1
+								title:res.data.message || '成功'
 							})
+							setTimeout(()=>{
+								uni.navigateBack({
+									delta: 1 // 返回的页面数,默认为1
+								})
+							},1000)
 						} else {
 							uni.showToast({
 								icon:'none',
 								title:res.data.message
 							})
+							
 						}
 					})
 				}

+ 32 - 28
pages/store/brandMessage.vue

@@ -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
+                    	})
+                    	
                     }
                 })
             }

+ 12 - 10
pages/store/businessQua.vue

@@ -329,14 +329,13 @@
 				} else {
 					if (this.form.specialStatus == null) {
 						this.$http.post('/merchant/localMerchantSpecial/add', data).then(res => {
-							if (res.data.success) {
+							if (res.data.code == 200) {
 								uni.showToast({
 									icon:'none',
-									title:res.data.result || '成功'
-								})
-								uni.navigateBack({
-									delta: 1 // 返回的页面数,默认为1
+									title:res.data.message || '成功'
 								})
+								
+								
 							} else {
 								uni.showToast({
 									icon:'none',
@@ -350,19 +349,22 @@
 							...data,
 							id: this.form.specialId
 						}).then(res => {
-							if (res.data.success) {
+							if (res.data.code == 200) {
 								uni.showToast({
 									icon:'none',
-									title:res.data.result || '成功'
-								})
-								uni.navigateBack({
-									delta: 1 // 返回的页面数,默认为1
+									title:res.data.message || '成功'
 								})
+								setTimeout(()=>{
+									uni.navigateBack({
+										delta: 1 // 返回的页面数,默认为1
+									})
+								},1000)
 							} else {
 								uni.showToast({
 									icon:'none',
 									title:res.data.message
 								})
+								
 							}
 						})
 					}

+ 13 - 8
pages/store/editStore.vue

@@ -238,17 +238,22 @@
 					...this.form,
 					headPhoto: this.form.headPhoto.join(',')
 				}).then(res => {
-					if (res.data.success) {
-						// this.$tip.success(res.data.result || '成功')
+					if (res.data.code == 200) {
 						uni.showToast({
-							title: '提交成功',
-							icon: 'none'
-						});
-						uni.navigateTo({
-							url: '/pages/index/shop'
+							icon:'none',
+							title:res.data.message || '成功'
 						})
+						setTimeout(()=>{
+							uni.navigateBack({
+								delta: 1 // 返回的页面数,默认为1
+							})
+						},1000)
 					} else {
-						this.$tip.error(res.data.message);
+						uni.showToast({
+							icon:'none',
+							title:res.data.message
+						})
+						
 					}
 				})
 			},

+ 16 - 10
pages/store/headPhoto.vue

@@ -177,36 +177,42 @@
 				}
 				if (this.form.headPhotoStatus == null) {
 					this.$http.post('merchant/localMerchantHeadPhoto/add', data).then(res => {
-						if (res.data.success) {
+						if (res.data.code == 200) {
 							uni.showToast({
 								icon:'none',
-								title:'提交成功'
-							})
-							uni.navigateBack({
-								delta: 1 // 返回的页面数,默认为1
+								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/localMerchantHeadPhoto/edit',data).then(res => {
-						if (res.data.success) {
+						if (res.data.code == 200) {
 							uni.showToast({
 								icon:'none',
-								title:'提交成功'
-							})
-							uni.navigateBack({
-								delta: 1 // 返回的页面数,默认为1
+								title:res.data.message || '成功'
 							})
+							setTimeout(()=>{
+								uni.navigateBack({
+									delta: 1 // 返回的页面数,默认为1
+								})
+							},1000)
 						} else {
 							uni.showToast({
 								icon:'none',
 								title:res.data.message
 							})
+							
 						}
 					})
 				}

+ 1 - 1
pages/store/selectTdMap.vue

@@ -321,7 +321,7 @@
 				uni.request({
 					url: `https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify(postStr))}&type=query&tk=${this.tk}`,
 					success: (res) => {
-						if (res.statusCode === 200 && res.data) {
+						if (res.data.code == 200 && res.data) {
 							this.searchResults = res.data.pois.map(item => ({
 								...item,
 								location: item.lonlat

+ 7 - 7
pages/store/settings.vue

@@ -43,9 +43,7 @@
 						{{ tag }}
 					</text>
 				</view>
-				<view v-if="val.label == '其他'" style="padding-left: 42upx;" @click="jumpOther">
-					
-				</view>
+				<!-- <view v-if="val.label == '其他'" style="padding-left: 42upx;" @click="jumpOther"></view> -->
 			</view>
 			
 		</view>
@@ -123,10 +121,12 @@
 						}, {
 							label: '服务设施',
 							status: ' '
-						},  {
-							label: '其他',
-							status: ' '
-						},],
+						},  
+						// {
+						// 	label: '其他',
+						// 	status: ' '
+						// },
+						],
 					}
 
 				],