脚手架搭建
This commit is contained in:
50
src/page/Home/Home.vue
Normal file
50
src/page/Home/Home.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="homePage">
|
||||
<Index />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, onBeforeMount, watch, ref, reactive } from "vue";
|
||||
import { wxShare } from "@/utils/wxshare.js";
|
||||
import h5plugin from "@/utils/plugin.js";
|
||||
import gsap from "gsap";
|
||||
import Index from "@/components/Index"
|
||||
|
||||
// 变量定义
|
||||
|
||||
|
||||
// 页面未挂载
|
||||
onBeforeMount(() => { });
|
||||
|
||||
// 页面挂载
|
||||
onMounted(() => {
|
||||
|
||||
// 微信分享
|
||||
const optionShare = {
|
||||
title: '2022中国中产女性财富管理及幸福指数报告', // 分享标题
|
||||
desc: ' ', // 分享描述
|
||||
link: process.env.VUE_APP_BASE_URL + 'index.html', // 分享链接
|
||||
imgUrl: process.env.VUE_APP_CDN + 'share.jpg', // 分享图标
|
||||
}
|
||||
wxShare(optionShare)
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
div {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.homePage {
|
||||
font-size: 24px;
|
||||
width: 750px;
|
||||
max-width: 750px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgb(255, 255, 255);
|
||||
}
|
||||
</style>
|
||||
24
src/page/Home/main.js
Normal file
24
src/page/Home/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
import "babel-polyfill"
|
||||
import { createApp } from 'vue'
|
||||
import App from './Home.vue'
|
||||
import Vue from 'vue'
|
||||
import store from '@/store'
|
||||
import "amfe-flexible"
|
||||
|
||||
|
||||
import VConsole from 'vconsole'
|
||||
const vConsole = new VConsole();
|
||||
|
||||
|
||||
// 注册全局方法
|
||||
const app = createApp(App);
|
||||
|
||||
// app.use(router)
|
||||
app.use(store)
|
||||
app.mount('#app')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
34
src/page/Share/Share.vue
Normal file
34
src/page/Share/Share.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<div class="sharePage">
|
||||
<div class="share_container">分享页</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import gsap from "gsap";
|
||||
import { Toast } from "vant";
|
||||
import h5plugin from "@/utils/plugin.js";
|
||||
|
||||
// 挂载后
|
||||
onMounted(() => { });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sharePage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.share_container {
|
||||
// text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
30
src/page/Share/main.js
Normal file
30
src/page/Share/main.js
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
import { createApp } from 'vue'
|
||||
import App from './Share.vue'
|
||||
import Vue from 'vue'
|
||||
import store from '@/store'
|
||||
import "amfe-flexible"
|
||||
import h5plugin from "../../utils/plugin"
|
||||
import VConsole from 'vconsole'
|
||||
const vConsole = new VConsole();
|
||||
|
||||
|
||||
|
||||
// if (process.env.NODE_ENV != 'production') {
|
||||
// // 非正式环境都打开debug模式
|
||||
// const vConsole = new VConsole();
|
||||
// }
|
||||
|
||||
|
||||
// 注册全局方法
|
||||
const app = createApp(App);
|
||||
// app.config.globalProperties.$h5plugin = h5plugin;
|
||||
|
||||
// app.use(router)
|
||||
app.use(store)
|
||||
app.mount('#share')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user