This commit is contained in:
X1627315083
2025-06-19 10:07:11 +08:00
parent 47223f7e95
commit 9b15d988f0
3 changed files with 49 additions and 38 deletions

View File

@@ -62,7 +62,7 @@
</template> </template>
<script> <script>
import { defineComponent,h ,toRefs,ref,reactive,onMounted,onBeforeDestroy,nextTick,provide,computed} from 'vue' import { defineComponent,h ,toRefs,ref,reactive,onMounted,nextTick,provide,computed} from 'vue'
import { gsap, TweenMax } from "gsap"; import { gsap, TweenMax } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger"; import { ScrollTrigger } from "gsap/ScrollTrigger";
export default defineComponent({ export default defineComponent({

View File

@@ -10,10 +10,9 @@ import { useStore } from "vuex";
import { Https } from "@/tool/https"; 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) => () => const _import_component = (path: string) => () => import(`../component/${path}.vue`);
import(`../component/${path}`); const _import_custom = (path: string) => () => import(`../views/${path}.vue`);
const _import_custom = (path: string) => () => import(`../views/${path}`); // defineAsyncComponent(import(`../views/${path}`))
// defineAsyncComponent(import(`../views/${path}.vue`))
const routes: Array<RouteRecordRaw> = [ const routes: Array<RouteRecordRaw> = [
{ {
path: "/", path: "/",
@@ -74,55 +73,55 @@ const routes: Array<RouteRecordRaw> = [
path: "tools", path: "tools",
name: "tools", name: "tools",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_custom("HomeView/Tools.vue"), component: _import_custom("HomeView/Tools"),
}, },
{ {
path: "homePage", path: "homePage",
name: "homePage", name: "homePage",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_custom("HomeView/HomeView.vue"), component: _import_custom("HomeView/HomeView"),
}, },
{ {
path: "library", path: "library",
name: "library", name: "library",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_custom("HomeView/library.vue"), component: _import_custom("HomeView/library"),
}, },
{ {
path: "history", path: "history",
name: "history", name: "history",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_custom("HomeView/history.vue"), component: _import_custom("HomeView/history"),
}, },
{ {
path: "works", path: "works",
name: "works", name: "works",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_custom("HomeView/Works.vue"), component: _import_custom("HomeView/Works"),
}, },
{ {
path: "events", path: "events",
name: "events", name: "events",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_custom("HomeView/Events.vue"), component: _import_custom("HomeView/Events"),
}, },
{ {
path: "cloud", path: "cloud",
name: "cloud", name: "cloud",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_custom("HomeView/cloudGeneration.vue"), component: _import_custom("HomeView/cloudGeneration"),
}, },
{ {
path: "eventsDetail", path: "eventsDetail",
name: "eventsDetail", name: "eventsDetail",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_component("Events/eventsDetail.vue"), component: _import_component("Events/eventsDetail"),
}, },
{ {
path: "account", path: "account",
name: "account", name: "account",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_component("Account/account.vue"), component: _import_component("Account/account"),
children: [ children: [
{ {
path: "", path: "",
@@ -134,19 +133,19 @@ const routes: Array<RouteRecordRaw> = [
path: "frontPage", path: "frontPage",
name: "frontPage", name: "frontPage",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_component("Account/frontPage.vue"), component: _import_component("Account/frontPage"),
}, },
{ {
path: "accountMessage", path: "accountMessage",
name: "accountMessage", name: "accountMessage",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_component("Account/accountMessage.vue"), component: _import_component("Account/accountMessage"),
}, },
{ {
path: "accountFollowFans", path: "accountFollowFans",
name: "accountFollowFans", name: "accountFollowFans",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_component("Account/accountFollowFans.vue"), component: _import_component("Account/accountFollowFans"),
}, },
], ],
}, },
@@ -154,7 +153,7 @@ const routes: Array<RouteRecordRaw> = [
path: "otherUsers", path: "otherUsers",
name: "otherUsers", name: "otherUsers",
meta: { enter: "all" }, meta: { enter: "all" },
component: _import_component("Account/otherUsers.vue"), component: _import_component("Account/otherUsers"),
}, },
], ],
}, },
@@ -174,88 +173,88 @@ const routes: Array<RouteRecordRaw> = [
path: "allUser", path: "allUser",
name: "allUser", name: "allUser",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/allUser.vue"), component: _import_component("Administrator/allUser"),
}, },
{ {
path: "coupons", path: "coupons",
name: "coupons", name: "coupons",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/coupons/index.vue"), component: _import_component("Administrator/coupons/index"),
}, },
{ {
path: "testClickData", path: "testClickData",
name: "testClickData", name: "testClickData",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/TestClickData.vue"), component: _import_component("Administrator/TestClickData"),
}, },
{ {
path: "trialApproval", path: "trialApproval",
name: "trialApproval", name: "trialApproval",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/trialApproval.vue"), component: _import_component("Administrator/trialApproval"),
}, },
{ {
path: "questionnaire", path: "questionnaire",
name: "questionnaire", name: "questionnaire",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/questionnaire.vue"), component: _import_component("Administrator/questionnaire"),
}, },
{ {
path: "recentActiveChart", path: "recentActiveChart",
name: "recentActiveChart", name: "recentActiveChart",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/recentActiveChart.vue"), component: _import_component("Administrator/recentActiveChart"),
}, },
{ {
path: "recentActiveUser", path: "recentActiveUser",
name: "recentActiveUser", name: "recentActiveUser",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/recentActiveUser.vue"), component: _import_component("Administrator/recentActiveUser"),
}, },
{ {
path: "recentActiveUserChart", path: "recentActiveUserChart",
name: "recentActiveUserChart", name: "recentActiveUserChart",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/recentActiveUserChart.vue"), component: _import_component("Administrator/recentActiveUserChart"),
}, },
{ {
path: "recentNewUser", path: "recentNewUser",
name: "recentNewUser", name: "recentNewUser",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/recentNewUser.vue"), component: _import_component("Administrator/recentNewUser"),
}, },
{ {
path: "recentNewUserChart", path: "recentNewUserChart",
name: "recentNewUserChart", name: "recentNewUserChart",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/recentNewUserChart.vue"), component: _import_component("Administrator/recentNewUserChart"),
}, },
{ {
path: "trialUserCountry", path: "trialUserCountry",
name: "trialUserCountry", name: "trialUserCountry",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/trialUserCountry.vue"), component: _import_component("Administrator/trialUserCountry"),
}, },
{ {
path: "trialUserConversionRateChart", path: "trialUserConversionRateChart",
name: "trialUserConversionRateChart", name: "trialUserConversionRateChart",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component( component: _import_component(
"Administrator/trialUserConversionRateChart.vue" "Administrator/trialUserConversionRateChart"
), ),
}, },
{ {
path: "trialAllUser", path: "trialAllUser",
name: "trialAllUser", name: "trialAllUser",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/trialAllUser.vue"), component: _import_component("Administrator/trialAllUser"),
}, },
{ {
path: "affiliateAudit", path: "affiliateAudit",
name: "affiliateAudit", name: "affiliateAudit",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component( component: _import_component(
"Administrator/affiliate/affiliateAudit.vue" "Administrator/affiliate/affiliateAudit"
), ),
}, },
{ {
@@ -263,7 +262,7 @@ const routes: Array<RouteRecordRaw> = [
name: "TransactionTable", name: "TransactionTable",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component( component: _import_component(
"Administrator/Transaction/TransactionTable.vue" "Administrator/Transaction/TransactionTable"
), ),
}, },
{ {
@@ -271,7 +270,7 @@ const routes: Array<RouteRecordRaw> = [
name: "organization", name: "organization",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component( component: _import_component(
"Administrator/organization/organization.vue" "Administrator/organization/organization"
), ),
}, },
//企业版教育管理员页面 //企业版教育管理员页面
@@ -279,14 +278,14 @@ const routes: Array<RouteRecordRaw> = [
path: "allUserSE", path: "allUserSE",
name: "allUserSE", name: "allUserSE",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component("Administrator/SE/allUser/index.vue"), component: _import_component("Administrator/SE/allUser/index"),
}, },
{ {
path: "testClickDataSE", path: "testClickDataSE",
name: "testClickDataSE", name: "testClickDataSE",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component( component: _import_component(
"Administrator/SE/designDetailList/index.vue" "Administrator/SE/designDetailList/index"
), ),
}, },
{ {
@@ -294,7 +293,7 @@ const routes: Array<RouteRecordRaw> = [
name: "generateFrequencySE", name: "generateFrequencySE",
meta: { enter: 3 }, meta: { enter: 3 },
component: _import_component( component: _import_component(
"Administrator/SE/getGenerateFrequency/index.vue" "Administrator/SE/getGenerateFrequency/index"
), ),
}, },
], ],

View File

@@ -5,7 +5,18 @@ const isEmail = (email) => {
let result = reg.test(email) let result = reg.test(email)
return result return result
} }
function getUniversalZoomLevel() {
// 现代浏览器方案
if (window.visualViewport) {
return window.visualViewport.scale;
}
// 备用方案1
if (window.devicePixelRatio) {
return window.devicePixelRatio;
}
// 备用方案2不精确
return window.outerWidth / window.innerWidth;
}
const getUploadUrl = () => { const getUploadUrl = () => {
let url = process.env.VUE_APP_BASE_URL || '' let url = process.env.VUE_APP_BASE_URL || ''
// let url = "http://18.167.251.121:10086" // let url = "http://18.167.251.121:10086"
@@ -569,6 +580,7 @@ function segmentImage(markerImage,fullImage,size){
export { export {
isEmail, isEmail,
getUploadUrl, getUploadUrl,
getUniversalZoomLevel,
rgbaToHex, rgbaToHex,
getMinioUrl, getMinioUrl,
base64ToFile, base64ToFile,