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>
<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 { ScrollTrigger } from "gsap/ScrollTrigger";
export default defineComponent({

View File

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