From 05c78c8b29b66c1d7870db94513dac9eccd44956 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 12 Sep 2024 11:23:24 +0800 Subject: [PATCH 01/10] fix --- src/views/HomeView/HomeView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/HomeView/HomeView.vue b/src/views/HomeView/HomeView.vue index f053f578..56497bae 100644 --- a/src/views/HomeView/HomeView.vue +++ b/src/views/HomeView/HomeView.vue @@ -588,7 +588,7 @@ export default defineComponent({ //recollection recollection() { let collectionModal: any = this.$refs.collectionModal; - this.store.commit("clearAllData"); + // this.store.commit("clearAllData"); collectionModal.changeCollectionModal(true); collectionModal.recollection(); }, From 32e5ff694569c0d0ba4e0ca48c4548af27788e3a Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 12 Sep 2024 11:30:01 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/uploadFile/uploadFile.ts | 4 +++- src/views/HomeView/HomeView.vue | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/store/uploadFile/uploadFile.ts b/src/store/uploadFile/uploadFile.ts index e901aee3..63b4480b 100644 --- a/src/store/uploadFile/uploadFile.ts +++ b/src/store/uploadFile/uploadFile.ts @@ -208,6 +208,9 @@ const UploadFilesModule : Module = { }, setAllBoardDataChoose(state,data){ state.allBoardData = data + if(Object.keys(data).length === 0){ + state.chooseIsDesign.value = true + } }, setChooseIsDesign(state,data){ state.chooseIsDesign.value = data @@ -229,7 +232,6 @@ const UploadFilesModule : Module = { state.marketingSketchFiles = [] state.moodTemplateId = '' state.disposeMoodboard = [] - state.chooseIsDesign.value = true // state.showSketchboard = [] }, clearAllId(state){ diff --git a/src/views/HomeView/HomeView.vue b/src/views/HomeView/HomeView.vue index 56497bae..f053f578 100644 --- a/src/views/HomeView/HomeView.vue +++ b/src/views/HomeView/HomeView.vue @@ -588,7 +588,7 @@ export default defineComponent({ //recollection recollection() { let collectionModal: any = this.$refs.collectionModal; - // this.store.commit("clearAllData"); + this.store.commit("clearAllData"); collectionModal.changeCollectionModal(true); collectionModal.recollection(); }, From b9c2710caa1b7f04dbd3a7753869e37b3da4cce5 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 12 Sep 2024 17:08:31 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 5c64c305..e96fcf52 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -232,20 +232,20 @@ if (vuex_setSystemUser == 0 || vuex_setSystemUser == 1) { } router.beforeEach((to, from, next) => { + let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN']//指定页面系统维护也可以访问 // 系统维护 - // let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN']//指定页面系统维护也可以访问 - // const toName = to.name === 'upgrade'; - // if(upgradeList.indexOf(to.path) > -1){ - // next(); - // }else{ - // if (toName) { - // next(); - // } else { - // next({ name: 'upgrade' }); - // } - // } - // return + const toName = to.name === 'upgrade'; + if(upgradeList.indexOf(to.path) > -1){ + next(); + }else{ + if (toName) { + next(); + } else { + next({ name: 'upgrade' }); + } + } + return // 检查路由是否存在 // 机房用户 let userInfo = JSON.parse(getCookie("userInfo") as any); @@ -256,8 +256,6 @@ router.beforeEach((to, from, next) => { let routeList = ['/testClickData','/trialApproval']//指定页面需要指定id才能进入 let userIdList = [88,6,46,31,73,83,87,4] let isSystemUserRouteList = ['/login','/Square']//游客用户只能进入这两个页面 - let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN']//指定页面系统维护也可以访问 - let systemUser = state.UserHabit.systemUser const routeExists = router.getRoutes().some(({ name }) =>{ From 254f50960406679922e8bd9a246dc08d6f0d3b4d Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 12 Sep 2024 17:27:41 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index e96fcf52..98b32347 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -235,17 +235,17 @@ router.beforeEach((to, from, next) => { let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN']//指定页面系统维护也可以访问 // 系统维护 - const toName = to.name === 'upgrade'; - if(upgradeList.indexOf(to.path) > -1){ - next(); - }else{ - if (toName) { - next(); - } else { - next({ name: 'upgrade' }); - } - } - return + // const toName = to.name === 'upgrade'; + // if(upgradeList.indexOf(to.path) > -1){ + // next(); + // }else{ + // if (toName) { + // next(); + // } else { + // next({ name: 'upgrade' }); + // } + // } + // return // 检查路由是否存在 // 机房用户 let userInfo = JSON.parse(getCookie("userInfo") as any); From 0d398baf6e689b53d970627d5e5ca2bb26e7109a Mon Sep 17 00:00:00 2001 From: wxd <1627315083@qq.com> Date: Thu, 12 Sep 2024 20:28:52 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AFipad=E6=97=A0=E6=B3=95=E6=94=AF=E4=BB=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/HomePage/UpgradePlan.vue | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/component/HomePage/UpgradePlan.vue b/src/component/HomePage/UpgradePlan.vue index 15b5e879..9b34a2ad 100644 --- a/src/component/HomePage/UpgradePlan.vue +++ b/src/component/HomePage/UpgradePlan.vue @@ -254,7 +254,6 @@ export default defineComponent({ }else{ httpsUrl = Https.httpUrls.payAlipayHK+`/${this.modeOfPaymentDetail}/${this.price.num}` } - Https.axiosPost(httpsUrl).then( (rv: any) => { var width = 800; @@ -262,18 +261,27 @@ export default defineComponent({ var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; this.newWindow = window.open("", "_blank", "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top); + let herf if(this.modeOfPayment == 'paypal'){ // 在新窗口中写入内容 - this.newWindow.location.href = rv.approve; + herf = rv.approve; + // this.newWindow.location.href = rv.approve; }else if(this.modeOfPayment == 'stripe'){ - this.newWindow.location.href = rv + herf = rv + // this.newWindow.location.href = rv }else{ let data = JSON.parse(rv) - let herf = `${data.url}?${data.alipay_order_string}` - this.newWindow.location.href = herf; - // this.newWindow.document.write(herf); + herf = `${data.url}?${data.alipay_order_string}` + // this.newWindow.location.href = herf; + } + console.log(herf); + + if(this.newWindow){ + this.newWindow.location.href = herf + }else{ + // window.open(herf, '_blank'); + window.location.href=herf; } - this.isShowMark = true // this.isShowMark = true } ).catch(res=>{ From beaed40f1508e3b6d55e2fc993b563ddb8f1fa58 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 13 Sep 2024 10:07:00 +0800 Subject: [PATCH 06/10] fix --- src/component/HomePage/UpgradePlan.vue | 2 -- src/main.ts | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/component/HomePage/UpgradePlan.vue b/src/component/HomePage/UpgradePlan.vue index 9b34a2ad..1d3f3cf2 100644 --- a/src/component/HomePage/UpgradePlan.vue +++ b/src/component/HomePage/UpgradePlan.vue @@ -274,8 +274,6 @@ export default defineComponent({ herf = `${data.url}?${data.alipay_order_string}` // this.newWindow.location.href = herf; } - console.log(herf); - if(this.newWindow){ this.newWindow.location.href = herf }else{ diff --git a/src/main.ts b/src/main.ts index 17a51eaf..ea2a4f34 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,10 +25,8 @@ flexible() import { getCookie, setCookie } from "@/tool/cookie"; router.beforeEach((to, from, next) => { - if(to.name == "login"){ - if(window.location.search.substring(1) != 'oldHis'){ - isMurmur() - } + if((to.name == "login" && !from.name) || (to.name == 'SquareWorks' && !from.name) || (to.name == 'works' && !from.name)){ + isMurmur() } next(); }); From 2bb2bae3fcf6a22e91199b27e6f6273976297597 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 13 Sep 2024 11:28:09 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=9C=BA=E6=88=BF=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=9B=B4=E6=96=B0ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tool/https.js | 1 + src/views/setIdentification.vue | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tool/https.js b/src/tool/https.js index d7c6be83..9b964e5b 100644 --- a/src/tool/https.js +++ b/src/tool/https.js @@ -135,6 +135,7 @@ export const Https = { deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销 addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册 + updateNoLoginRequiredNew:`api/third/party/updateNoLoginRequiredNew`, //机房用户更新 endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在 diff --git a/src/views/setIdentification.vue b/src/views/setIdentification.vue index d3b01fe8..2c47c36b 100644 --- a/src/views/setIdentification.vue +++ b/src/views/setIdentification.vue @@ -3,6 +3,7 @@
序号:
密钥:
记录浏览器标识
+
更新浏览器标识
注销浏览器标识
@@ -76,9 +77,11 @@ export default defineComponent({ // console.log(data); // return - if(str == 'set'){ + if(str == 'set' || str == 'put'){ + let url = Https.httpUrls.addNoLoginRequiredNew + if(str == 'put')url = Https.httpUrls.updateNoLoginRequiredNew // return - Https.axiosPost(Https.httpUrls.addNoLoginRequiredNew, data) + Https.axiosPost(url, data) .then((rv) => { localStorage.setItem('murmurStr',murmur) const htmlContent = rv From 2972b6129f4183bbb90313ca097f3ee523424114 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 13 Sep 2024 12:41:18 +0800 Subject: [PATCH 08/10] fix --- src/component/HomePage/Header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/HomePage/Header.vue b/src/component/HomePage/Header.vue index 55feabff..451a2d37 100644 --- a/src/component/HomePage/Header.vue +++ b/src/component/HomePage/Header.vue @@ -258,7 +258,7 @@ export default defineComponent({ this.isMurmur =JSON.parse(isMurmur) this.userInfo = JSON.parse(getCookie("userInfo")); if (!this.userInfo) { - this.$router.replace("/login"); + this.$router.replace("/"); } else { this.accountIsLogin(this.userInfo); } From 5fa1c7b9d149c2ca75303d42a598f160acea9e59 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 13 Sep 2024 12:43:51 +0800 Subject: [PATCH 09/10] fix --- src/component/HomePage/Header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/HomePage/Header.vue b/src/component/HomePage/Header.vue index 451a2d37..97a9ca61 100644 --- a/src/component/HomePage/Header.vue +++ b/src/component/HomePage/Header.vue @@ -437,7 +437,7 @@ export default defineComponent({ }; Https.axiosPost(Https.httpUrls.accountIsLogin, data).then((rv) => { if (!rv) { - this.$router.replace("/login"); + this.$router.replace("/"); } }); }, From 01b0fa0b7e1808d1355e2583a5b0d63694e1b8a5 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 13 Sep 2024 14:36:38 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9C=BA=E6=88=BF?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.ts | 62 +-------------------------------- src/router/index.ts | 43 +++++++++++++++++++++-- src/views/setIdentification.vue | 2 +- 3 files changed, 43 insertions(+), 64 deletions(-) diff --git a/src/main.ts b/src/main.ts index ea2a4f34..d10e7f3d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,7 +13,7 @@ import VueLazyload from "vue-lazyload"; import i18n from './lang/index' import { getBrowserInfo, murmur } from './tool/util' import "../node_modules/@flaticon/flaticon-uicons/css/all/all.css" -import { Https } from "@/tool/https"; +// import { Https } from "@/tool/https"; import 'swiper/css'; import 'swiper/css/pagination'; @@ -24,66 +24,6 @@ const app = createApp(App); flexible() import { getCookie, setCookie } from "@/tool/cookie"; -router.beforeEach((to, from, next) => { - if((to.name == "login" && !from.name) || (to.name == 'SquareWorks' && !from.name) || (to.name == 'works' && !from.name)){ - isMurmur() - } - next(); - }); -async function isMurmur() { - let murmurStr: any = localStorage.getItem('murmurStr') - let id: any = localStorage.getItem('id') - // let isSxis = false - let data = { - browserIdentifiers: murmurStr, - id:id?id:window.location.search.substring(1) - } - // await Https.axiosPost(Https.httpUrls.existNoLoginRequired, data) - // .then((rv) => { - // isSxis = rv - // }) - // .catch((res) => { - // }); - if(data.id){ - Https.axiosPost(Https.httpUrls.noLoginRequired, data) - .then((rv) => { - let isTest = rv.systemUser == 3 ? true : false - let isBeginner = rv.isBeginner == 1 ? true : false - setCookie("isMurmur", true); - setCookie("token", rv.token); - setCookie("isTest", isTest); - setCookie("isBeginner", isBeginner); - setCookie("isBeginnerNum", 0);//从第一步开始,机器人开始的话就是从第二部开始 - setCookie("userInfo", JSON.stringify(rv)); - sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗 - let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000; - sessionStorage.setItem('sessionId', randomNum); - router.push("/home"); - if(window.location.search.substring(1)){ - localStorage.setItem('id',window.location.search.substring(1)) - } - }) - .catch((res) => { - }); - } - -} - -// app.directive('cliAdmin', { -// mounted(el, binding) { -// el.style.cursor = 'pointer' -// }, -// updated (el,binding) { -// // let value = binding.value -// // if(value.state){ -// // el.firstElementChild.classList.add(`cliAdmin_${value.type}`) -// // setTimeout(()=>{ -// // el.firstElementChild.classList.remove(`cliAdmin_${value.type}`) -// // },500) -// // } -// } -// }); - let loadingParam = { loading: require('./assets/images/homePage/loading.gif'), attempt: 1 diff --git a/src/router/index.ts b/src/router/index.ts index 98b32347..2e4258f0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,6 +1,7 @@ import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory } from 'vue-router' import { defineAsyncComponent } from 'vue' import store from "@/store" +import { Https } from "@/tool/https"; import { getCookie, setCookie } from "@/tool/cookie"; const _import = (path: string) => () => import(`../views/${path}.vue`); const _import_component = (path : string) => () => import(`../component/${path}`); @@ -231,7 +232,38 @@ if (vuex_setSystemUser == 0 || vuex_setSystemUser == 1) { sessionStorage.removeItem("vuex_setSystemUser"); } -router.beforeEach((to, from, next) => { +let setMurmur = (id:any)=> { + let murmurStr: any = localStorage.getItem('murmurStr') + // let isSxis = false + let data = { + browserIdentifiers: murmurStr, + id:id + } + if(data.id){ + Https.axiosPost(Https.httpUrls.noLoginRequired, data) + .then((rv) => { + let isTest = rv.systemUser == 3 ? true : false + let isBeginner = rv.isBeginner == 1 ? true : false + setCookie("isMurmur", true); + setCookie("token", rv.token); + setCookie("isTest", isTest); + setCookie("isBeginner", isBeginner); + setCookie("isBeginnerNum", 0);//从第一步开始,机器人开始的话就是从第二部开始 + setCookie("userInfo", JSON.stringify(rv)); + sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗 + let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000; + sessionStorage.setItem('sessionId', randomNum); + router.push("/home"); + + }) + .catch((res) => { + // router.push('/Square') + }); + } + +} + +router.beforeEach((to:any, from, next) => { let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN']//指定页面系统维护也可以访问 // 系统维护 @@ -248,6 +280,12 @@ router.beforeEach((to, from, next) => { // return // 检查路由是否存在 // 机房用户 + let herfData = window.location.search.substring(1) + if(herfData.split('=')[0] == 'noLogin' && to.name != 'homePage'){ + setMurmur(herfData.split('=')[1]) + return + } + let userInfo = JSON.parse(getCookie("userInfo") as any); let murmurStr: any = localStorage.getItem('murmurStr') let getIsMurmur: any = getCookie("isMurmur") @@ -260,7 +298,7 @@ router.beforeEach((to, from, next) => { let systemUser = state.UserHabit.systemUser const routeExists = router.getRoutes().some(({ name }) =>{ if(name){ - return name === to.name + return (name === to.name || to.path == '/') }else{ return false } @@ -311,4 +349,5 @@ router.beforeEach((to, from, next) => { }); + export default router diff --git a/src/views/setIdentification.vue b/src/views/setIdentification.vue index 2c47c36b..f7c0e6d5 100644 --- a/src/views/setIdentification.vue +++ b/src/views/setIdentification.vue @@ -90,7 +90,7 @@ export default defineComponent({ downloadLink.href = URL.createObjectURL(blob); downloadLink.download = "AiDA.html"; downloadLink.click(); - localStorage.setItem('id',this.setId) + // localStorage.setItem('id',this.setId) message.success('Created successfully'); }) .catch((res) => {