Ver código fonte

测试打开微信

hwb0 3 anos atrás
pai
commit
dece3bb971
2 arquivos alterados com 77 adições e 0 exclusões
  1. 5 0
      src/router/index.js
  2. 72 0
      src/views/skip.vue

+ 5 - 0
src/router/index.js

@@ -58,6 +58,11 @@ export const constantRoutes = [
     component: (resolve) => require(['@/views/error/401'], resolve),
     hidden: true
   },
+  {
+    path: '/skip',
+    component: (resolve) => require(['@/views/skip'], resolve),
+    hidden: true
+  },
   {
     path: '',
     component: Layout,

+ 72 - 0
src/views/skip.vue

@@ -0,0 +1,72 @@
+<template>
+  <div>
+    <div class="skip-wrap">
+      <div class="skip-theme">
+        <div class="skip-theme-iamge">logo</div>
+        <div class="skip-theme-txt">小程序</div>
+      </div>
+      <div class="skip-btn">
+        <p @click="showWechat()">打开微信</p>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {};
+  },
+  methods: {
+    showWechat() {
+      window.location.href = "weixin://";
+    },
+  },
+  components: {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style lang="scss">
+.skip-wrap {
+  height: 100vh;
+  width: 100%;
+  position: relative;
+}
+.skip-theme {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+  padding: 200px 0 0;
+}
+.skip-theme-iamge {
+  width: 60px;
+  height: 60px;
+  line-height: 60px;
+  text-align: center;
+  color: #fff;
+  background-color: #e96737;
+  border-radius: 50%;
+  margin-bottom: 10px;
+}
+.skip-theme-txt {
+  color: rgb(194, 184, 184);
+  text-align: center;
+}
+.skip-btn {
+  position: absolute;
+  bottom: 50px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.skip-btn p {
+  height: 30px;
+  width: 200px;
+  background-color: rgb(7, 192, 88);
+  border-radius: 8px;
+  line-height: 30px;
+  color: #fff;
+  text-align: center;
+}
+</style>