Merge remote-tracking branch 'origin/StableVersion' into develop
This commit is contained in:
@@ -258,7 +258,7 @@ export default defineComponent({
|
|||||||
this.isMurmur =JSON.parse(isMurmur)
|
this.isMurmur =JSON.parse(isMurmur)
|
||||||
this.userInfo = JSON.parse(getCookie("userInfo"));
|
this.userInfo = JSON.parse(getCookie("userInfo"));
|
||||||
if (!this.userInfo) {
|
if (!this.userInfo) {
|
||||||
this.$router.replace("/login");
|
this.$router.replace("/");
|
||||||
} else {
|
} else {
|
||||||
this.accountIsLogin(this.userInfo);
|
this.accountIsLogin(this.userInfo);
|
||||||
}
|
}
|
||||||
@@ -437,7 +437,7 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
Https.axiosPost(Https.httpUrls.accountIsLogin, data).then((rv) => {
|
Https.axiosPost(Https.httpUrls.accountIsLogin, data).then((rv) => {
|
||||||
if (!rv) {
|
if (!rv) {
|
||||||
this.$router.replace("/login");
|
this.$router.replace("/");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -254,7 +254,6 @@ export default defineComponent({
|
|||||||
}else{
|
}else{
|
||||||
httpsUrl = Https.httpUrls.payAlipayHK+`/${this.modeOfPaymentDetail}/${this.price.num}`
|
httpsUrl = Https.httpUrls.payAlipayHK+`/${this.modeOfPaymentDetail}/${this.price.num}`
|
||||||
}
|
}
|
||||||
|
|
||||||
Https.axiosPost(httpsUrl).then(
|
Https.axiosPost(httpsUrl).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
var width = 800;
|
var width = 800;
|
||||||
@@ -262,18 +261,25 @@ export default defineComponent({
|
|||||||
var left = (screen.width - width) / 2;
|
var left = (screen.width - width) / 2;
|
||||||
var top = (screen.height - height) / 2;
|
var top = (screen.height - height) / 2;
|
||||||
this.newWindow = window.open("", "_blank", "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top);
|
this.newWindow = window.open("", "_blank", "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top);
|
||||||
|
let herf
|
||||||
if(this.modeOfPayment == 'paypal'){
|
if(this.modeOfPayment == 'paypal'){
|
||||||
// 在新窗口中写入内容
|
// 在新窗口中写入内容
|
||||||
this.newWindow.location.href = rv.approve;
|
herf = rv.approve;
|
||||||
|
// this.newWindow.location.href = rv.approve;
|
||||||
}else if(this.modeOfPayment == 'stripe'){
|
}else if(this.modeOfPayment == 'stripe'){
|
||||||
this.newWindow.location.href = rv
|
herf = rv
|
||||||
|
// this.newWindow.location.href = rv
|
||||||
}else{
|
}else{
|
||||||
let data = JSON.parse(rv)
|
let data = JSON.parse(rv)
|
||||||
let herf = `${data.url}?${data.alipay_order_string}`
|
herf = `${data.url}?${data.alipay_order_string}`
|
||||||
this.newWindow.location.href = herf;
|
// this.newWindow.location.href = herf;
|
||||||
// this.newWindow.document.write(herf);
|
}
|
||||||
|
if(this.newWindow){
|
||||||
|
this.newWindow.location.href = herf
|
||||||
|
}else{
|
||||||
|
// window.open(herf, '_blank');
|
||||||
|
window.location.href=herf;
|
||||||
}
|
}
|
||||||
this.isShowMark = true
|
|
||||||
// this.isShowMark = true
|
// this.isShowMark = true
|
||||||
}
|
}
|
||||||
).catch(res=>{
|
).catch(res=>{
|
||||||
|
|||||||
68
src/main.ts
68
src/main.ts
@@ -13,8 +13,7 @@ import VueLazyload from "vue-lazyload";
|
|||||||
import i18n from './lang/index'
|
import i18n from './lang/index'
|
||||||
import { getBrowserInfo, murmur } from './tool/util'
|
import { getBrowserInfo, murmur } from './tool/util'
|
||||||
import "../node_modules/@flaticon/flaticon-uicons/css/all/all.css"
|
import "../node_modules/@flaticon/flaticon-uicons/css/all/all.css"
|
||||||
import { Https } from "@/tool/https";
|
// import { Https } from "@/tool/https";
|
||||||
import { useStore } from "vuex";
|
|
||||||
import 'swiper/css';
|
import 'swiper/css';
|
||||||
import 'swiper/css/pagination';
|
import 'swiper/css/pagination';
|
||||||
|
|
||||||
@@ -25,71 +24,6 @@ const app = createApp(App);
|
|||||||
flexible()
|
flexible()
|
||||||
|
|
||||||
import { getCookie, setCookie } from "@/tool/cookie";
|
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 = {
|
let loadingParam = {
|
||||||
loading: require('./assets/images/homePage/loading.gif'),
|
loading: require('./assets/images/homePage/loading.gif'),
|
||||||
attempt: 1
|
attempt: 1
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory } from 'vue-router'
|
import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory } from 'vue-router'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
import store from "@/store"
|
import store from "@/store"
|
||||||
|
import { Https } from "@/tool/https";
|
||||||
import { getCookie, setCookie } from "@/tool/cookie";
|
import { getCookie, setCookie } from "@/tool/cookie";
|
||||||
const _import = (path: string) => () => import(`../views/${path}.vue`);
|
const _import = (path: string) => () => import(`../views/${path}.vue`);
|
||||||
const _import_component = (path : string) => () => import(`../component/${path}`);
|
const _import_component = (path : string) => () => import(`../component/${path}`);
|
||||||
@@ -275,10 +276,41 @@ if (vuex_setUserInfo) {
|
|||||||
localStorage.removeItem("vuex_setSystemUser");
|
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';
|
// const toName = to.name === 'upgrade';
|
||||||
// if(upgradeList.indexOf(to.path) > -1){
|
// if(upgradeList.indexOf(to.path) > -1){
|
||||||
// next();
|
// next();
|
||||||
@@ -292,6 +324,12 @@ router.beforeEach((to, from, next) => {
|
|||||||
// return
|
// 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 userInfo = JSON.parse(getCookie("userInfo") as any);
|
||||||
let murmurStr: any = localStorage.getItem('murmurStr')
|
let murmurStr: any = localStorage.getItem('murmurStr')
|
||||||
let getIsMurmur: any = getCookie("isMurmur")
|
let getIsMurmur: any = getCookie("isMurmur")
|
||||||
@@ -300,13 +338,11 @@ router.beforeEach((to, from, next) => {
|
|||||||
let routeList = ['/testClickData','/trialApproval']//指定页面需要指定id才能进入
|
let routeList = ['/testClickData','/trialApproval']//指定页面需要指定id才能进入
|
||||||
let userIdList = [88,6,46,31,73,83,87,4]
|
let userIdList = [88,6,46,31,73,83,87,4]
|
||||||
let isSystemUserRouteList = ['/login','/Square']//游客用户只能进入这两个页面
|
let isSystemUserRouteList = ['/login','/Square']//游客用户只能进入这两个页面
|
||||||
let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN']//指定页面系统维护也可以访问
|
|
||||||
|
|
||||||
|
|
||||||
let systemUser = state.UserHabit.systemUser
|
let systemUser = state.UserHabit.systemUser
|
||||||
const routeExists = router.getRoutes().some(({ name }) =>{
|
const routeExists = router.getRoutes().some(({ name }) =>{
|
||||||
if(name){
|
if(name){
|
||||||
return name === to.name
|
return (name === to.name || to.path == '/')
|
||||||
}else{
|
}else{
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -357,4 +393,5 @@ router.beforeEach((to, from, next) => {
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
@@ -214,6 +214,9 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
|
|||||||
},
|
},
|
||||||
setAllBoardDataChoose(state,data){
|
setAllBoardDataChoose(state,data){
|
||||||
state.allBoardData = data
|
state.allBoardData = data
|
||||||
|
if(Object.keys(data).length === 0){
|
||||||
|
state.chooseIsDesign.value = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setChooseIsDesign(state,data){
|
setChooseIsDesign(state,data){
|
||||||
state.chooseIsDesign.value = data
|
state.chooseIsDesign.value = data
|
||||||
@@ -235,7 +238,6 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
|
|||||||
state.marketingSketchFiles = []
|
state.marketingSketchFiles = []
|
||||||
state.moodTemplateId = ''
|
state.moodTemplateId = ''
|
||||||
state.disposeMoodboard = []
|
state.disposeMoodboard = []
|
||||||
state.moodboardPosition = {}
|
|
||||||
// state.showSketchboard = []
|
// state.showSketchboard = []
|
||||||
state.chooseIsDesign.value = true
|
state.chooseIsDesign.value = true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ export const Https = {
|
|||||||
|
|
||||||
deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
|
deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
|
||||||
addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册
|
addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册
|
||||||
|
updateNoLoginRequiredNew:`api/third/party/updateNoLoginRequiredNew`, //机房用户更新
|
||||||
|
|
||||||
endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
|
endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<div>序号:<input v-model="setId" type="text" autofocus /></div>
|
<div>序号:<input v-model="setId" type="text" autofocus /></div>
|
||||||
<div>密钥:<input type="text" /></div>
|
<div>密钥:<input type="text" /></div>
|
||||||
<div class="button" @click="setFingerprint2('set')">记录浏览器标识</div>
|
<div class="button" @click="setFingerprint2('set')">记录浏览器标识</div>
|
||||||
|
<div class="button" @click="setFingerprint2('put')">更新浏览器标识</div>
|
||||||
<div class="button" @click="setFingerprint2('delete')">注销浏览器标识</div>
|
<div class="button" @click="setFingerprint2('delete')">注销浏览器标识</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -76,9 +77,11 @@ export default defineComponent({
|
|||||||
// console.log(data);
|
// console.log(data);
|
||||||
// return
|
// return
|
||||||
|
|
||||||
if(str == 'set'){
|
if(str == 'set' || str == 'put'){
|
||||||
|
let url = Https.httpUrls.addNoLoginRequiredNew
|
||||||
|
if(str == 'put')url = Https.httpUrls.updateNoLoginRequiredNew
|
||||||
// return
|
// return
|
||||||
Https.axiosPost(Https.httpUrls.addNoLoginRequiredNew, data)
|
Https.axiosPost(url, data)
|
||||||
.then((rv) => {
|
.then((rv) => {
|
||||||
localStorage.setItem('murmurStr',murmur)
|
localStorage.setItem('murmurStr',murmur)
|
||||||
const htmlContent = rv
|
const htmlContent = rv
|
||||||
@@ -87,7 +90,7 @@ export default defineComponent({
|
|||||||
downloadLink.href = URL.createObjectURL(blob);
|
downloadLink.href = URL.createObjectURL(blob);
|
||||||
downloadLink.download = "AiDA.html";
|
downloadLink.download = "AiDA.html";
|
||||||
downloadLink.click();
|
downloadLink.click();
|
||||||
localStorage.setItem('id',this.setId)
|
// localStorage.setItem('id',this.setId)
|
||||||
message.success('Created successfully');
|
message.success('Created successfully');
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user