提交 85cea1e0 编写于 作者: yma16's avatar yma16

perf:添加小程序的跳转

上级 8cf24e8b
......@@ -20,47 +20,47 @@ const env =
let externalModules = {}
//cdn 配置
let externalConfig = []
// if (process.env.NODE_ENV === 'production') {
// //生产环境
// externalModules = {
// vue: 'Vue',
// 'vue-router': 'VueRouter',
// vuex: 'Vuex',
// axios: 'axios',
// 'element-ui': 'element-ui',
// echarts: 'echarts',
// highlight: 'hljs',
// }
// externalConfig = [
// {js: 'https://cdn.jsdelivr.net/npm/vue@2.5.2/dist/vue.js', css: ''},
// {
// js: 'https://cdn.bootcdn.net/ajax/libs/vue-router/3.0.1/vue-router.min.js',
// css: '',
// },
// {js: 'https://unpkg.com/axios/dist/axios.min.js', css: ''},
// {js: 'https://cdn.bootcss.com/vuex/3.6.2/vuex.min.js', css: ''},
// {
// js: 'https://unpkg.com/element-ui/lib/index.js',
// css: 'https://unpkg.com/element-ui/lib/theme-chalk/index.css',
// },
// {
// js: 'https://cdn.jsdelivr.net/npm/echarts@5.3.3/dist/echarts.min.js',
// css: '',
// },
// {
// js: 'https://cdn.bootcdn.net/ajax/libs/highlight.js/11.6.0/highlight.min.js',
// css: '',
// },
// {
// js: '',
// css: 'https://cdn.bootcdn.net/ajax/libs/github-markdown-css/5.1.0/github-markdown-light.min.css',
// },
// {
// js: '',
// css: 'https://cdn.bootcdn.net/ajax/libs/nprogress/0.2.0/nprogress.css',
// },
// ]
// }
if (process.env.NODE_ENV === 'production') {
//生产环境
externalModules = {
vue: 'Vue',
'vue-router': 'VueRouter',
vuex: 'Vuex',
axios: 'axios',
'element-ui': 'element-ui',
echarts: 'echarts',
highlight: 'hljs',
}
externalConfig = [
{js: 'https://cdn.jsdelivr.net/npm/vue@2.5.2/dist/vue.js', css: ''},
{
js: 'https://cdn.bootcdn.net/ajax/libs/vue-router/3.0.1/vue-router.min.js',
css: '',
},
{js: 'https://unpkg.com/axios/dist/axios.min.js', css: ''},
{js: 'https://cdn.bootcss.com/vuex/3.6.2/vuex.min.js', css: ''},
{
js: 'https://unpkg.com/element-ui/lib/index.js',
css: 'https://unpkg.com/element-ui/lib/theme-chalk/index.css',
},
{
js: 'https://cdn.jsdelivr.net/npm/echarts@5.3.3/dist/echarts.min.js',
css: '',
},
{
js: 'https://cdn.bootcdn.net/ajax/libs/highlight.js/11.6.0/highlight.min.js',
css: '',
},
{
js: '',
css: 'https://cdn.bootcdn.net/ajax/libs/github-markdown-css/5.1.0/github-markdown-light.min.css',
},
{
js: '',
css: 'https://cdn.bootcdn.net/ajax/libs/nprogress/0.2.0/nprogress.css',
},
]
}
const webpackConfig = merge(baseWebpackConfig, {
externals: externalModules, //打包忽略
......
......@@ -82,8 +82,9 @@
class="weather_class1"
cellpadding="1px"
shadow="always"
style="position: static; margin-top: 2%"
style="position: static; margin-top: 2%;text-align: center"
>
<span style="line-height: 30px;" class="uni-font">爬取天气预报</span>
<div style="positon: relative; width: 100%; height: 100%">
<EchartWeather> </EchartWeather>
</div>
......@@ -98,7 +99,23 @@
line-height: 10px;
text-align: center;
"
><a href="https://blog.csdn.net/qq_38870145">
>
<span style="line-height: 30px;" class="uni-font">小程序</span>
<img class="image" src="https://yongma16.xyz/staticFile/common/logo/wxProgram.jpg"
/>
</el-card>
<el-card
class="user_img1"
style="
position: static;
margin: 2% auto auto auto;
line-height: 10px;
text-align: center;
"
>
<span style="line-height: 30px;" class="uni-font">点击图片前往csdn</span>
<a href="https://blog.csdn.net/qq_38870145">
<img class="image" src="@/assets/img/csdn.jpg"
/></a>
</el-card>
......@@ -154,6 +171,18 @@
>
</el-card> -->
<el-card
class="user_img2"
style="
position: static;
margin: 2% auto auto auto;
line-height: 10px;
text-align: center;
"
> <span style="line-height: 30px;" class="uni-font">小程序</span>
<img class="image" src="https://yongma16.xyz/staticFile/common/logo/wxProgram.jpg"
/>
</el-card>
<!-- csdn头像 -->
<el-card
class="user_img2"
......@@ -163,10 +192,14 @@
line-height: 10px;
text-align: center;
"
><a href="https://blog.csdn.net/qq_38870145">
>
<span style="line-height: 30px;" class="uni-font">点击图片前往csdn</span>
<a href="https://blog.csdn.net/qq_38870145">
<img class="image" src="@/assets/img/csdn.jpg"
/></a>
</el-card>
</div>
<!-- 上滑滚动图标 -->
<div class="rightclass">
......@@ -246,6 +279,7 @@ export default {
'websocket聊天',
'echarts地图配置',
'vue3测试平台',
'数据可视化平台',
'更新中'
],
md_data: [],
......@@ -435,6 +469,9 @@ export default {
case 'vue3测试平台':
window.open('http://yongma16.xyz/emoji_api/')
break
case '数据可视化平台':
window.open('https://yongma16.xyz/fund-web')
break
default:
break
}
......@@ -648,6 +685,11 @@ el-col::-webkit-scrollbar {
border-radius: 2px;
/* display: none; */
}
.uni-font{
color: #ff995e;
font-weight: bolder;
}
.midclass::-webkit-scrollbar-thumb {
background: #ff995e;
height: 2px;
......
......@@ -6,7 +6,9 @@
</template>
<script>
import * as echarts from 'echarts'
// import * as echarts from 'echarts'
export default {
name: 'Bilicom',
data () {
......
......@@ -27,7 +27,8 @@
</template>
<script>
import * as echarts from 'echarts'
// import * as echarts from 'echarts'
export default {
name: 'Map',
data () {
......
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
//vue cdn
import Vue from 'vue'
import VueRouter from 'vue-router'
import axios from 'axios'
import hljs from 'highlight.js'
import * as echarts from 'echarts'
import importElementComponents from './importElement'
import importEchartsComponents from './importEchartsComponents'
// import Vue from 'vue'
// import VueRouter from 'vue-router'
// import axios from 'axios'
// import hljs from 'highlight.js'
// import * as echarts from 'echarts'
// import importElementComponents from './importElement'
// import importEchartsComponents from './importEchartsComponents'
// 样式cnd
import 'github-markdown-css/github-markdown.css'
import 'nprogress/nprogress.css'
// import 'github-markdown-css/github-markdown.css'
// import 'nprogress/nprogress.css'
// 无需cdn
import useRouter from './router'
import cookies from 'vue-cookies'
......@@ -57,11 +57,11 @@ if (env === 'production') {
// 路由
const router = useRouter(Vue, VueRouter)
// 按需引入elementui
importElementComponents(Vue)
// 按需引入echarts
importEchartsComponents(Vue)
// // 按需引入elementui
// importElementComponents(Vue)
//
// // 按需引入echarts
// importEchartsComponents(Vue)
Vue.config.productionTip = false
Vue.use(cookies)
......
import Vue from 'vue'
import Vuex from 'vuex'
import persistedstate from 'vuex-persistedstate'
// import Vue from 'vue'
// import Vuex from 'vuex'
// import createLogger from '../../../src/plugins/logger'
......@@ -15,11 +14,6 @@ files.keys().map((key) => {
})
export default new Vuex.Store({
plugins: [
persistedstate({
key: 'VBI'
})
],
modules,
strict: debug
// plugins: debug ? [createLogger()] : []
......
......@@ -15,7 +15,7 @@
</template>
<script>
import * as echarts from 'echarts'
// import * as echarts from 'echarts'
export default {
name: 'EchartWeather',
data () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册