Browse Source

Merge branch 'master' of git.dev.advichcloud.com:wangfan/adweb3-web

zq940222 3 months ago
parent
commit
d267fc0ab2

+ 12 - 12
src/views/adweb/enquiry/AdwebEnquiry.api.ts

@@ -1,14 +1,14 @@
 import { defHttp } from '/@/utils/http/axios';
-import { useMessage } from "/@/hooks/web/useMessage";
+import { useMessage } from '/@/hooks/web/useMessage';
 
 const { createConfirm } = useMessage();
 
 enum Api {
   list = '/adweb/adwebEnquiry/list',
-  save='/adweb/adwebEnquiry/add',
-  edit='/adweb/adwebEnquiry/edit',
+  save = '/adweb/adwebEnquiry/add',
+  edit = '/adweb/adwebEnquiry/edit',
   deleteOne = '/adweb/adwebEnquiry/delete',
-  deleteBatch = '/adweb/adwebEnquiry/deleteBatch',
+  deleteBatch = '/adweb/adwebEnquiry/delBatch',
   importExcel = '/adweb/adwebEnquiry/importExcel',
   exportXls = '/adweb/adwebEnquiry/exportXls',
 }
@@ -35,11 +35,11 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * @param params
  * @param handleSuccess
  */
-export const deleteOne = (params,handleSuccess) => {
-  return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
+export const deleteOne = (params, handleSuccess) => {
+  return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
-}
+};
 
 /**
  * 批量删除
@@ -54,12 +54,12 @@ export const batchDelete = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.get({ url: Api.deleteBatch, params }).then(() => {
         handleSuccess();
       });
-    }
+    },
   });
-}
+};
 
 /**
  * 保存或者更新
@@ -67,6 +67,6 @@ export const batchDelete = (params, handleSuccess) => {
  * @param isUpdate
  */
 export const saveOrUpdate = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params }, { isTransformResponse: false });
-}
+};

+ 1 - 1
src/views/adweb/enquiry/AdwebEnquiryList.vue

@@ -786,7 +786,7 @@
    * 批量删除事件
    */
   async function batchHandleDelete() {
-    await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
+    await batchDelete({ id: selectedRowKeys.value.join(',') }, handleSuccess);
   }
 
   /**

+ 2 - 2
src/views/adweb/enquiry/AdwebWasteEnquiryList.vue

@@ -659,7 +659,7 @@
     await nextTick();
 
     if (XpRecycleBinModalRef.value && XpRecycleBinModalRef.value.init) {
-      XpRecycleBinModalRef.value.init(queryParam.siteId, '1,2');
+      XpRecycleBinModalRef.value.init(queryParam.siteId, '0');
     }
   }
 
@@ -729,7 +729,7 @@
    * 批量删除事件
    */
   async function batchHandleDelete() {
-    await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
+    await batchDelete({ id: selectedRowKeys.value.join(',') }, handleSuccess);
   }
 
   /**

+ 1 - 1
src/views/adweb/seo/SeoKeywordsRankList.vue

@@ -707,7 +707,7 @@
 
       //表格内的去查询按钮
       gotoSearch(word) {
-        window.open('https://www.google.com/search?q=' + word, '_blank');
+        window.open('http://google-proxy.adwebcloud.com/search?q=' + word, '_blank');
       },
 
       handleExportXlsLU(fileName, keywordType) {

+ 5 - 5
src/views/adweb/site/components/GoogleAdsModal.vue

@@ -29,8 +29,8 @@ const formSchema = [
     required: true,
   },
   {
-    field: 'apiAccessToken',
-    label: 'API Access Token',
+    field: 'apiRefreshToken',
+    label: 'API Refresh Token',
     component: 'Input',
   },
   {
@@ -57,8 +57,8 @@ async function handleSubmit() {
       customerId: values.googleAdsAccount,
       siteCode: values.siteCode,
     };
-    if (values.apiAccessToken) {
-      params.refreshToken = values.apiAccessToken;
+    if (values.apiRefreshToken) {
+      params.refreshToken = values.apiRefreshToken;
     }
     await bindGoogleAdsAccount(params);
     createMessage.success('Google Ads账号绑定成功');
@@ -84,7 +84,7 @@ const init = async (data: { record: Recordable }) => {
     if (res) {
       setFieldsValue({
         googleAdsAccount: res.customerId,
-        apiAccessToken: res.refreshToken,
+        apiRefreshToken: res.refreshToken,
         siteCode: data.record.code,
       });
     }