xinyan 7 сар өмнө
parent
commit
a7ad0201c5

+ 2 - 2
.env.development

@@ -4,8 +4,8 @@ ENV='development'
 
 # 本地环境接口地址
 # VITE_API_URL = 'http://127.0.0.1:8000'
-#VITE_API_URL='http://192.168.1.225/'
- VITE_API_URL='http://192.168.1.25:8080/'
+VITE_API_URL='http://192.168.1.225/'
+#VITE_API_URL='http://192.168.1.25:8080/'
 # VITE_API_URL = 'http://amzads.zositechc.cn'
 
 # 是否启用按钮权限

+ 14 - 25
package-lock.json

@@ -20,6 +20,7 @@
 				"@wecom/jssdk": "^1.4.5",
 				"autoprefixer": "^10.4.14",
 				"axios": "^1.2.1",
+				"caniuse-lite": "^1.0.30001605",
 				"countup.js": "^2.3.2",
 				"cropperjs": "^2.0.0-beta.4",
 				"dayjs": "^1.11.11",
@@ -53,7 +54,7 @@
 				"vue-grid-layout": "^3.0.0-beta1",
 				"vue-i18n": "^9.5.0",
 				"vue-router": "^4.3.0",
-				"vxe-table": "^4.5.20",
+				"vxe-table": "4.5.20",
 				"xe-utils": "^3.5.7"
 			},
 			"devDependencies": {
@@ -6097,9 +6098,9 @@
 			}
 		},
 		"node_modules/dom-zindex": {
-			"version": "1.0.1",
-			"resolved": "https://registry.npmmirror.com/dom-zindex/-/dom-zindex-1.0.1.tgz",
-			"integrity": "sha512-M/MERVDZ8hguvjl6MAlLWSLYLS7PzEyXaTb5gEeJ+SF+e9iUC0sdvlzqe91MMDHBoy+nqw7wKcUOrDSyvMCrRg=="
+			"version": "1.0.6",
+			"resolved": "https://registry.npmmirror.com/dom-zindex/-/dom-zindex-1.0.6.tgz",
+			"integrity": "sha512-FKWIhiU96bi3xpP9ewRMgANsoVmMUBnMnmpCT6dPMZOunVYJQmJhSRruoI0XSPoHeIif3kyEuiHbFrOJwEJaEA=="
 		},
 		"node_modules/dom7": {
 			"version": "3.0.0",
@@ -10345,11 +10346,6 @@
 				"xe-utils": "^3.5.0"
 			}
 		},
-		"node_modules/vxe-table/node_modules/xe-utils": {
-			"version": "3.5.20",
-			"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.20.tgz",
-			"integrity": "sha512-dZewCp04O0xQ4JnUxlvRfxsBlV1vxrA9LCazGAFFeRWoTj0DU70OpqUNd8is1GnJXUL4ineZ4nywrEq/3Mbybg=="
-		},
 		"node_modules/webpack-sources": {
 			"version": "3.2.3",
 			"resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz",
@@ -10536,9 +10532,9 @@
 			}
 		},
 		"node_modules/xe-utils": {
-			"version": "3.5.13",
-			"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.13.tgz",
-			"integrity": "sha512-ORT6ghCRk0mUVavMBxetcPzUPskS6NGfntzpWazJ86e+XU0uK4HwHfDhN/jKATiyInrOH5RwQo9SO/+DB8XeBw=="
+			"version": "3.5.31",
+			"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.31.tgz",
+			"integrity": "sha512-oS4yv8qktvlE0wc9yYkitDidEmThc5qN0UTRvKCvrWnejxbTyIxbwfrdZmPKdKGZtB+/U8cEAMFywLJjHtD11A=="
 		},
 		"node_modules/xlsx": {
 			"version": "0.18.5",
@@ -15420,9 +15416,9 @@
 			}
 		},
 		"dom-zindex": {
-			"version": "1.0.1",
-			"resolved": "https://registry.npmmirror.com/dom-zindex/-/dom-zindex-1.0.1.tgz",
-			"integrity": "sha512-M/MERVDZ8hguvjl6MAlLWSLYLS7PzEyXaTb5gEeJ+SF+e9iUC0sdvlzqe91MMDHBoy+nqw7wKcUOrDSyvMCrRg=="
+			"version": "1.0.6",
+			"resolved": "https://registry.npmmirror.com/dom-zindex/-/dom-zindex-1.0.6.tgz",
+			"integrity": "sha512-FKWIhiU96bi3xpP9ewRMgANsoVmMUBnMnmpCT6dPMZOunVYJQmJhSRruoI0XSPoHeIif3kyEuiHbFrOJwEJaEA=="
 		},
 		"dom7": {
 			"version": "3.0.0",
@@ -18755,13 +18751,6 @@
 			"requires": {
 				"dom-zindex": "^1.0.1",
 				"xe-utils": "^3.5.20"
-			},
-			"dependencies": {
-				"xe-utils": {
-					"version": "3.5.20",
-					"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.20.tgz",
-					"integrity": "sha512-dZewCp04O0xQ4JnUxlvRfxsBlV1vxrA9LCazGAFFeRWoTj0DU70OpqUNd8is1GnJXUL4ineZ4nywrEq/3Mbybg=="
-				}
 			}
 		},
 		"webpack-sources": {
@@ -18899,9 +18888,9 @@
 			"requires": {}
 		},
 		"xe-utils": {
-			"version": "3.5.13",
-			"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.13.tgz",
-			"integrity": "sha512-ORT6ghCRk0mUVavMBxetcPzUPskS6NGfntzpWazJ86e+XU0uK4HwHfDhN/jKATiyInrOH5RwQo9SO/+DB8XeBw=="
+			"version": "3.5.31",
+			"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.31.tgz",
+			"integrity": "sha512-oS4yv8qktvlE0wc9yYkitDidEmThc5qN0UTRvKCvrWnejxbTyIxbwfrdZmPKdKGZtB+/U8cEAMFywLJjHtD11A=="
 		},
 		"xlsx": {
 			"version": "0.18.5",

+ 2 - 1
package.json

@@ -20,6 +20,7 @@
 		"@wecom/jssdk": "^1.4.5",
 		"autoprefixer": "^10.4.14",
 		"axios": "^1.2.1",
+		"caniuse-lite": "^1.0.30001605",
 		"countup.js": "^2.3.2",
 		"cropperjs": "^2.0.0-beta.4",
 		"dayjs": "^1.11.11",
@@ -53,7 +54,7 @@
 		"vue-grid-layout": "^3.0.0-beta1",
 		"vue-i18n": "^9.5.0",
 		"vue-router": "^4.3.0",
-		"vxe-table": "^4.5.20",
+		"vxe-table": "4.5.20",
 		"xe-utils": "^3.5.7"
 	},
 	"devDependencies": {

+ 16 - 12
src/views/efTools/automation/components/adActivityDialog.vue

@@ -26,13 +26,15 @@ const props = defineProps({
     required: true,
   },
 });
-const emits = defineEmits(['update:modelValue', 'confirmSuccess']);
+const emits = defineEmits([ 'confirmSuccess']);
 const shopInfo = useShopInfo();
 const { profile } = storeToRefs(shopInfo);
 const { templateId } = toRefs(props);
 const { activeModel } = toRefs(props);
 
-const dialogVisible = ref(false);
+// const dialogVisible = ref(false);
+const dialogVisible = defineModel({ default: false });
+
 const targetRuleDialogVisible = ref(false);
 
 // 定向规则
@@ -154,6 +156,7 @@ async function fetchAdCampaign() {
   try {
     loading.value = true;
     const cachedSelectedAds = [...selectedAds.value];
+    if (profile.value.profile_id && templateId.value){
     const resp = await getRelationCampaign({
       profileId: profile.value.profile_id,
       templateId: templateId.value,
@@ -167,6 +170,7 @@ async function fetchAdCampaign() {
     gridOptions.data = resp.data;
     total.value = resp.total;
     currentPage.value = resp.page;
+    }
   } catch (error) {
     ElMessage.error('请求广告活动数据失败');
   } finally {
@@ -472,18 +476,18 @@ watch(selectedStatus, () => {
   fetchAdCampaign();
 });
 
-watch(templateId, () => {
-  fetchAdCampaign();
-  fetchAdGroupList();
-});
+// watch(templateId, () => {
+//   fetchAdCampaign();
+//   fetchAdGroupList();
+// });
 
-watch(() => props.modelValue, (newValue) => {
-  dialogVisible.value = newValue;
-});
+// watch(() => props.modelValue, (newValue) => {
+//   dialogVisible.value = newValue;
+// });
 
-watch(dialogVisible, (newValue) => {
-  emits('update:modelValue', newValue);
-});
+// watch(dialogVisible, (newValue) => {
+//   // emits('update:modelValue', newValue);
+// });
 
 onMounted(() => {
   fetchAdGroupList();

+ 1 - 1
src/views/efTools/automation/index.vue

@@ -290,7 +290,7 @@ onMounted(() => {
           @refresh="refreshTable"></component>
     </div>
   </el-drawer>
-  <AdActivityDialog v-model="isDialogVisible" :activeModel="activeModel" :templateId="templateId" @confirmSuccess="getList"/>
+  <AdActivityDialog v-if="isDialogVisible" v-model="isDialogVisible" :activeModel="activeModel" :templateId="templateId" @confirmSuccess="getList"/>
   <AutomatedRuleTips v-model="autoInfo"></AutomatedRuleTips>
 </template>