zhaobao il y a 3 ans
Parent
commit
8d5f193322
2 fichiers modifiés avec 7 ajouts et 5 suppressions
  1. 2 2
      src/settings.js
  2. 5 3
      src/views/system/profile/userProfile.vue

+ 2 - 2
src/settings.js

@@ -36,8 +36,8 @@ module.exports = {
   /**
   * 服务API地址
   */
-  serverUrl: 'https://api.xazhyc.com/', // 正式环境
-  devServerUrl: 'https://api.xazhyc.com', // 开发环境
+  serverUrl: 'http://36.137.171.123:6001/', // 正式环境
+  devServerUrl: 'http://36.137.171.123:6001', // 开发环境
   // serverUrl: 'http://114.116.19.14:8080/', // 正式环境
   // devServerUrl: 'http://192.168.3.5:8080',
   /**

+ 5 - 3
src/views/system/profile/userProfile.vue

@@ -99,7 +99,7 @@
                   </div>
                 </el-tab-pane>
                 <el-tab-pane label="微信绑定" name="wx">
-                  <div id="qrcodetemplate" ref="qrcodetemplate" />
+                  <div id="qrcodetemplate" ref="qrcodetemplate" style="margin: 5px 0;" />
                 </el-tab-pane>
               </el-tabs>
             </vuescroll>
@@ -110,7 +110,7 @@
   </div>
 </template>
 <script>
-
+import { serverUrl, devServerUrl } from '@/settings'
 import { getUserProfile, updateUserProfile } from '@/api/index'
 import { updatePassword } from '@/api/system/userApi'
 import { mapGetters } from 'vuex'
@@ -217,7 +217,9 @@ export default {
     drawQrcode() {
       const ocId = this.userData.ocId
       const userId = this.userData.userId
-      const url = 'http://192.168.3.253:8001/wx/auth/' + ocId + '/' + userId
+
+      const baseURL = process.env.NODE_ENV === 'development' ? devServerUrl : serverUrl
+      const url = baseURL + '/wx/auth/' + ocId + '/' + userId
       if (!url) {
         this.$message.error('没有生产二维码的参数')
         return