Browse Source

信息修改

1002884655 3 years ago
parent
commit
e5db85b0a0

+ 2
- 2
project.config.json View File

2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "miniapp",
3
 	"projectname": "miniapp",
4
 	"description": "",
4
 	"description": "",
5
-	"appid": "wxe44244d1a5ea3364",
5
+	"appid": "wxc96058d57e77f373",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,
27
 			"outputPath": ""
27
 			"outputPath": ""
28
 		},
28
 		},
29
 		"useIsolateContext": true,
29
 		"useIsolateContext": true,
30
-		"useCompilerModule": true,
30
+		"useCompilerModule": false,
31
 		"userConfirmedUseCompilerModuleSwitch": false
31
 		"userConfirmedUseCompilerModuleSwitch": false
32
 	},
32
 	},
33
 	"compileType": "miniprogram",
33
 	"compileType": "miniprogram",

+ 18
- 3
src/subpackages/pages/consultant/components/FollowCustomer/index.jsx View File

26
     { name: '7天未成交', id: 7 },
26
     { name: '7天未成交', id: 7 },
27
     { name: '15天未成交', id: 15 }
27
     { name: '15天未成交', id: 15 }
28
   ])
28
   ])
29
-  const [FormData, setFormData] = useState({name: '', status: 0, day: 1})
29
+  const [TimeMenuId, setTimeMenuId] = useState(1)
30
+  const [FormData, setFormData] = useState({name: '', status: 0, startReportDate: '', endReportDate: ''})
30
 
31
 
31
   useEffect(() => {
32
   useEffect(() => {
32
     GetPageList()
33
     GetPageList()
59
     }
60
     }
60
   }
61
   }
61
 
62
 
63
+  const DateFormat = (date) => {
64
+      const Year = new Date(date).getFullYear()
65
+      const Month = new Date(date).getMonth() + 1
66
+      const Day = new Date(date).getDate()
67
+      return `${Year}-${Month > 9 ? Month : `0${Month}`}-${Day > 9 ? Day : `0${Day}`}`
68
+  }
69
+
62
   const CutTime = (item) => {
70
   const CutTime = (item) => {
63
     return () => {
71
     return () => {
64
-      setFormData({...FormData, day: item.id})
72
+      let params = {}
73
+      if(item.id - 0 !== 1) {
74
+        params = {...FormData, startReportDate: DateFormat(Date.now() - 1000 * 60 * 60 * 24 * (item.id - 0)), endReportDate: DateFormat(Date.now())}
75
+      } else {
76
+        params = {...FormData, startReportDate: '', endReportDate: ''}
77
+      }
78
+      setFormData(params)
79
+      setTimeMenuId(item.id)
65
     }
80
     }
66
   }
81
   }
67
 
82
 
120
                 <view key={`TimeItem-${index}`} onClick={CutTime(item)}>
135
                 <view key={`TimeItem-${index}`} onClick={CutTime(item)}>
121
                   <text>{item.name}</text>
136
                   <text>{item.name}</text>
122
                   {
137
                   {
123
-                    FormData.day === item.id &&
138
+                    TimeMenuId === item.id &&
124
                     <Image mode='widthFix' src={require('@/assets/findHouse-icon1.png')}></Image>
139
                     <Image mode='widthFix' src={require('@/assets/findHouse-icon1.png')}></Image>
125
                   }
140
                   }
126
                 </view>
141
                 </view>