zhaobao 3 سال پیش
والد
کامیت
2db91e90d4
3فایلهای تغییر یافته به همراه24 افزوده شده و 3 حذف شده
  1. 1 1
      src/settings.js
  2. 1 1
      src/views/hos/record/components/ScoreRecord.vue
  3. 22 1
      src/views/system/profile/userProfile.vue

+ 1 - 1
src/settings.js

@@ -37,7 +37,7 @@ module.exports = {
   * 服务API地址
   */
   serverUrl: 'http://1.15.92.205:8001/', // 正式环境
-  // devServerUrl: 'http://1.15.92.205:8001/', // 开发环境
+  // devServerUrl: 'https://api.xazhyc.com', // 开发环境
   devServerUrl: 'http://192.168.3.253:8001/', // 开发环境
   // devServerUrl: 'http://127.0.0.1:8001/', // 开发环境
   /**

+ 1 - 1
src/views/hos/record/components/ScoreRecord.vue

@@ -8,7 +8,7 @@
       </el-col>
 
       <el-col :span="20" class="button-group">
-        <div class="right" style="min-width:400px;flex: 1;padding-right: 10px" />
+        <div class="right" style="min-width:400px;flex: 1;padding-right: 10px">{{ viewData.itemList }}</div>
       </el-col>
     </el-row>
 

+ 22 - 1
src/views/system/profile/userProfile.vue

@@ -98,6 +98,9 @@
                     <el-button type="primary" @click="submitForm('passForm')">更新</el-button>
                   </div>
                 </el-tab-pane>
+                <el-tab-pane label="微信绑定" name="wx">
+                  <div id="qrcodetemplate" ref="qrcodetemplate" />
+                </el-tab-pane>
               </el-tabs>
             </vuescroll>
           </div>
@@ -113,6 +116,7 @@ import { updatePassword } from '@/api/system/userApi'
 import { mapGetters } from 'vuex'
 import vuescroll from 'vuescroll'
 import ImageCropper from '@/components/ImageCropper/index'
+import QRCode from 'qrcodejs2'
 export default {
   name: 'UserProfile',
   components: {
@@ -210,13 +214,30 @@ export default {
     cropperClose() {
       this.imageCropperShow = false
     },
-
+    drawQrcode() {
+      const ocId = this.userData.ocId
+      const userId = this.userData.userId
+      const url = 'http://192.168.3.253:8001/wx/auth/' + ocId + '/' + userId
+      if (!url) {
+        this.$message.error('没有生产二维码的参数')
+        return
+      }
+      this.$nextTick(() => {
+        this.$refs.qrcodetemplate.innerHTML = ''
+        new QRCode('qrcodetemplate', {
+          width: 200,
+          height: 200,
+          text: url.toString()
+        })
+      })
+    },
     getData() {
       getUserProfile().then((resp) => {
         const { data } = resp
         this.viewData = JSON.parse(JSON.stringify(data))
         this.basicData = data
         this.passData.accountId = data.accountId
+        this.drawQrcode()
       }).catch((error) => {
         console.log(error)
       })