Merge remote-tracking branch 'origin/StableVersion' into develop

This commit is contained in:
X1627315083
2024-09-13 14:39:20 +08:00
7 changed files with 68 additions and 85 deletions

View File

@@ -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);
}
@@ -437,7 +437,7 @@ export default defineComponent({
};
Https.axiosPost(Https.httpUrls.accountIsLogin, data).then((rv) => {
if (!rv) {
this.$router.replace("/login");
this.$router.replace("/");
}
});
},

View File

@@ -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,25 @@ 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;
}
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=>{

View File

@@ -13,8 +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 { useStore } from "vuex";
// import { Https } from "@/tool/https";
import 'swiper/css';
import 'swiper/css/pagination';
@@ -25,71 +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)){
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) => {
if(rv.systemUser == 4){
rv.systemUser = 1
}
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));
useStore().commit("setSystemUser", rv.systemUser)
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

View File

@@ -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}`);
@@ -275,10 +276,41 @@ if (vuex_setUserInfo) {
localStorage.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']//指定页面系统维护也可以访问
// 系统维护
// let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN']//指定页面系统维护也可以访问
// const toName = to.name === 'upgrade';
// if(upgradeList.indexOf(to.path) > -1){
// next();
@@ -292,6 +324,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")
@@ -300,13 +338,11 @@ 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 }) =>{
if(name){
return name === to.name
return (name === to.name || to.path == '/')
}else{
return false
}
@@ -357,4 +393,5 @@ router.beforeEach((to, from, next) => {
});
export default router

View File

@@ -214,6 +214,9 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
},
setAllBoardDataChoose(state,data){
state.allBoardData = data
if(Object.keys(data).length === 0){
state.chooseIsDesign.value = true
}
},
setChooseIsDesign(state,data){
state.chooseIsDesign.value = data
@@ -235,7 +238,6 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
state.marketingSketchFiles = []
state.moodTemplateId = ''
state.disposeMoodboard = []
state.moodboardPosition = {}
// state.showSketchboard = []
state.chooseIsDesign.value = true
},

View File

@@ -136,6 +136,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`, //获取唯一标识是否存在

View File

@@ -3,6 +3,7 @@
<div>序号<input v-model="setId" type="text" autofocus /></div>
<div>密钥<input type="text" /></div>
<div class="button" @click="setFingerprint2('set')">记录浏览器标识</div>
<div class="button" @click="setFingerprint2('put')">更新浏览器标识</div>
<div class="button" @click="setFingerprint2('delete')">注销浏览器标识</div>
</div>
</template>
@@ -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
@@ -87,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) => {