Forráskód Böngészése

修改微信绑定

zs 8 hónapja
szülő
commit
d033202e7c
4 módosított fájl, 40 hozzáadás és 2 törlés
  1. 15 0
      package-lock.json
  2. 1 0
      package.json
  3. 24 1
      src/layout/index.vue
  4. 0 1
      src/views/center/basic.vue

+ 15 - 0
package-lock.json

@@ -28,6 +28,7 @@
         "path-to-regexp": "^6.2.1",
         "pinia": "^2.1.7",
         "postcss-px2rem": "^0.3.0",
+        "qrcode.vue": "^3.4.1",
         "relation-graph-vue3": "^2.2.1",
         "universal-cookie": "^7.1.0",
         "vue": "^3.4.15",
@@ -5502,6 +5503,14 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/qrcode.vue": {
+      "version": "3.4.1",
+      "resolved": "https://registry.npmmirror.com/qrcode.vue/-/qrcode.vue-3.4.1.tgz",
+      "integrity": "sha512-wq/zHsifH4FJ1GXQi8/wNxD1KfQkckIpjK1KPTc/qwYU5/Bkd4me0w4xZSg6EXk6xLBkVDE0zxVagewv5EMAVA==",
+      "peerDependencies": {
+        "vue": "^3.0.0"
+      }
+    },
     "node_modules/query-string": {
       "version": "4.3.4",
       "resolved": "https://registry.npmmirror.com/query-string/-/query-string-4.3.4.tgz",
@@ -11386,6 +11395,12 @@
         }
       }
     },
+    "qrcode.vue": {
+      "version": "3.4.1",
+      "resolved": "https://registry.npmmirror.com/qrcode.vue/-/qrcode.vue-3.4.1.tgz",
+      "integrity": "sha512-wq/zHsifH4FJ1GXQi8/wNxD1KfQkckIpjK1KPTc/qwYU5/Bkd4me0w4xZSg6EXk6xLBkVDE0zxVagewv5EMAVA==",
+      "requires": {}
+    },
     "query-string": {
       "version": "4.3.4",
       "resolved": "https://registry.npmmirror.com/query-string/-/query-string-4.3.4.tgz",

+ 1 - 0
package.json

@@ -31,6 +31,7 @@
     "path-to-regexp": "^6.2.1",
     "pinia": "^2.1.7",
     "postcss-px2rem": "^0.3.0",
+    "qrcode.vue": "^3.4.1",
     "relation-graph-vue3": "^2.2.1",
     "universal-cookie": "^7.1.0",
     "vue": "^3.4.15",

+ 24 - 1
src/layout/index.vue

@@ -19,6 +19,7 @@
         </div>
         <div class="right">
           <div class="right_1">
+            <el-button type="primary" @click="dialog = true">微信绑定</el-button>
             <div class="name">{{ user.nick_name || '暂无昵称' }}</div>
             <div class="layout" @click="toOut">
               <LoginOutlined />
@@ -31,10 +32,17 @@
         </div>
       </el-col>
     </el-row>
+    <el-dialog v-model="dialog" title="微信绑定" :destroy-on-close="true" width="30%">
+      <div class="code">
+        <div class="title">*使用双创活动小程序扫码绑定微信</div>
+        <QRCodeVue :value="qrCanvas" :size="200"></QRCodeVue>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script setup>
+import QRCodeVue from 'qrcode.vue'
 import { get } from 'lodash-es'
 import { LoginOutlined } from '@ant-design/icons-vue'
 import { siteInfo, menuList3 } from '@/layout/site'
@@ -56,6 +64,10 @@ const acitveKey = ref(route.name)
 
 const $checkRes = inject('$checkRes')
 const configInfo = ref({})
+
+const dialog = ref(false)
+const qrCanvas = ref('https://www.example.com')
+
 // 检查是否有注册到路由中,注册的显示,没注册的不显示
 const checkHasComponent = (menu) => {
   const routes = router.getRoutes()
@@ -174,11 +186,15 @@ watch(
     .right_1 {
       display: flex;
       justify-content: flex-end;
+      align-items: center;
       height: 80px;
       line-height: 80px;
       font-size: $global-font-size-20;
+      .name {
+        margin: 0 20px;
+      }
       .layout {
-        padding: 0 10px 0 20px;
+        padding: 0 10px 0 0;
         color: #8a8b8c;
         cursor: pointer;
         span {
@@ -195,4 +211,11 @@ watch(
     }
   }
 }
+.code {
+  text-align: center;
+  .title {
+    margin: 0 0 10px 0;
+    color: red;
+  }
+}
 </style>

+ 0 - 1
src/views/center/basic.vue

@@ -74,7 +74,6 @@ const dictDataStore = DictDataStore()
 const sectorStore = SectorStore()
 const $checkRes = inject('$checkRes')
 const form = ref({ industry: [] })
-console.log(document.title)
 // 表单验证
 const ruleFormRef = ref()
 const validatePhoneNumber = (rule, value, callback) => {