wjx 2 years ago
parent
commit
236621400c

+ 2 - 2
src/Hook/useAjax.tsx

@@ -46,8 +46,8 @@ export function useAjax(fnc: CombineService<any, any>, options?: Options) {
         manual: options?.manual || true,
         cacheKey: options?.cacheKey,
         pollingInterval: options?.pollingInterval || undefined,
-        debounceInterval: options?.debounceInterval || undefined,
-        // throttleInterval:500,
+        debounceInterval: options?.debounceInterval || 0,
+        throttleInterval: options?.throttleInterval || 0,
         formatResult: (res) => {
             let reqTime = moment().format('YYYY-MM-DD HH:mm:ss')
             res['reqTime'] = reqTime

+ 1 - 1
src/models/useAdMonitor/useMonitor.ts

@@ -23,7 +23,7 @@ export default function useMonitor() {
     /** 获取组员 */
     const getUserGroup = useAjax(() => getUserGroupApi(), { formatResult: true })
     /** 计划列表 */
-    const getAllPlanList = useAjax((params: allPlanProps) => getAllPlanListApi(params), { formatResult: true })
+    const getAllPlanList = useAjax((params: allPlanProps) => getAllPlanListApi(params), { formatResult: true, debounceInterval: 500 })
     const getBookListAll = useAjax(() => getBookListAllApi(), { formatResult: true })
     /** 下载 */
     const downLoadUpAd = useAjax((params: ListType) => downLoadUpAdApi(params), { formatResult: true })

+ 1 - 1
src/pages/adMonitor/adMonitorList/components/planDetail.tsx

@@ -134,7 +134,7 @@ function PlanDetail(props: Props) {
                         </div>
                         <div>
                             <div>点击率</div>
-                            <Statistic value={(speedData?.clickRate ? Number(speedData?.clickRate) * 100 : 0).toFixed(2)} precision={2} valueStyle={{ color: '#3f8600', fontSize: 16 }} suffix="%" />
+                            <Statistic value={(speedData?.clickRate ? Number(speedData?.clickRate) : 0).toFixed(2)} precision={2} valueStyle={{ color: '#3f8600', fontSize: 16 }} suffix="%" />
                         </div>
                         <div>
                             <div>所选时间内平均消耗速度</div>

+ 1 - 1
src/pages/adMonitor/adMonitorList/planList.tsx

@@ -138,7 +138,7 @@ const PlanList: React.FC = () => {
                             value={item.accountId}
                             key={item.id}
                         >
-                            {item.accountId + "_" + item.wechatAccountName}
+                            {item.accountId}
                         </Select.Option>)}
                     </Select>
                     {/* <Select style={{ minWidth: 150 }} placeholder="请选择主投书" allowClear value={queryForm?.mainBookList} onChange={(e) => { setQueryForm({ ...queryForm, pageNum: 1, mainBookList: e }) }} mode="multiple" maxTagCount={1}>