浏览代码

更新pc二维码页面

aamin 1 年之前
父节点
当前提交
a145cbf3cc
共有 4 个文件被更改,包括 45 次插入5 次删除
  1. 二进制
      public/code.png
  2. 8 1
      src/main.js
  3. 6 4
      src/router/index.js
  4. 31 0
      src/views/PCHome.vue

二进制
public/code.png


+ 8 - 1
src/main.js

@@ -54,8 +54,15 @@ if (uaInfo.browser && uaInfo.browser.name === 'Safari') {
 if (uaInfo.device.type === 'mobile') {
   app.provide('$isMobile', true)
 } else if (process.env.NODE_ENV === 'production') {
-  window.location.href = '/mobile.html'
+  // window.location.href = './mobile.html'
+  const appDom = document.getElementById('app')
+  appDom.style.maxWidth = '100%'
+  window.location.href = './index.html#/pc'
+
 }
+// } else {
+//   window.location.href = './mobile.html'
+// }
 
 // 处理resize事件
 let windowWidthLast = window.innerWidth

+ 6 - 4
src/router/index.js

@@ -13,14 +13,16 @@ import BambooHotView from '../views/BambooHotView3/index.vue'
 import ShuanggouDetail from '../views/ShuangGouSheSeDetail.vue'
 import ShuanggouPaintingDetail from '../views/ShuanggouPaintingDetail.vue'
 import OnlineSceneView from '../views/OnlineSceneView.vue'
+import PCHome from '../views/PCHome.vue'
 
 // import store from '@/store/index.js'
 
 const routes = [
-  // {
-  //   path: '/',
-  //   redirect: '/home',
-  // },
+  {
+    path: '/pc',
+    name: 'PCHome',
+    component: PCHome,
+  },
   {
     path: '/',
     name: 'HomeView',

+ 31 - 0
src/views/PCHome.vue

@@ -0,0 +1,31 @@
+<script setup>
+import { inject } from "vue"
+const $env = inject("$env")
+
+</script>
+
+<template>
+  <div class="pc-home">
+    <img
+      :src="`${$env.BASE_URL}code.png`"
+      alt=""
+    >
+  </div>
+</template>
+
+<style lang='less' scoped>
+.pc-home{
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  background: rgba(60,89,71,.65);
+  backdrop-filter:blur(20px);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  img{
+    width: 30%;
+    height: 30%;
+  }
+}
+</style>