lihongxiao hace 1 año
padre
commit
3143a957a5
Se han modificado 2 ficheros con 12 adiciones y 5 borrados
  1. 1 1
      pages/coupon/activity.vue
  2. 11 4
      pages/product/creatStandard.vue

+ 1 - 1
pages/coupon/activity.vue

@@ -244,7 +244,7 @@ export default {
         submitDistribution() {
             this.$http.post('/merchant/localConsumerUserInfo/addStoreProductOut', { ...this.rowDetail, productIds: this.selectedIds, merchantId: uni.getStorageSync(USER_INFO).merchantId, }).then(res => {
                 if (res.data.success) {
-                    this.$tip.error(res.data.message || '发放成功');
+                    this.$tip.success(res.data.message || '发放成功');
                     uni.navigateBack({
                         delta: 1
                     });

+ 11 - 4
pages/product/creatStandard.vue

@@ -96,15 +96,20 @@ import configService from '../../common/service/config.service'
 
 			},
 			add(){
-				this.productList.forEach((item => {
-					this.productHandleList.push(item.productId)
-				}))
+				// this.productList.forEach((item => {
+				// 	this.productHandleList.push(item.productId)
+				// }))
 				let ids = this.productHandleList.join(',')
+				console.log(ids,8888888888);
+				
 				this.$http.get("/app/product/addPurveyorProduct?ids="+ ids)
 					.then(res => {
 						if (res.data.code == 200) {
-							this.$tip.error(res.data.message ||'添加成功');
+							this.$tip.success(res.data.message ||'添加成功');
 							this.back()
+						}
+						else{
+							this.$tip.error(res.data.message);
 						}	
 					})
 			},
@@ -133,6 +138,8 @@ import configService from '../../common/service/config.service'
 						if (res.data.code == 200) {
 							res.data.result.records.forEach((item) => {
 								item.select = false;
+								item.saleEndDate= item.saleEndDate.includes('00:00:00')?item.saleEndDate.slice(0,10): item.saleEndDate
+								item.saleStartDate= item.saleStartDate.includes('00:00:00')?item.saleStartDate.slice(0,10): item.saleStartDate
 								item.productImage=configService.apiUrl +'/'+ item.productImage
 							})
 							this.productList = res.data.result.records