Bladeren bron

连灵锡

zhangtao 2 maanden geleden
bovenliggende
commit
ff694be2c0
4 gewijzigde bestanden met toevoegingen van 11 en 6 verwijderingen
  1. 4 2
      src/common/js/constant.js
  2. 3 1
      src/pages/citySafeNotic/index.vue
  3. 2 2
      src/router/index.js
  4. 2 1
      vue.config.js

+ 4 - 2
src/common/js/constant.js

@@ -1,9 +1,11 @@
 // 系统常量
 // h5Server
 // const BASE_URI = '/h5Server'
-const BASE_URI = 'http://lifeline.idea-sf.com/lifelineApi'
-// const BASE_URI = 'http://2.22.195.139:8080/api'
+// const BASE_URI = 'https://lifeline.idea-sf.com/lifelineApi' // 测试
+// const BASE_URI = 'http://2.22.195.139:8080/api' // 正式(测试)
+const BASE_URI = 'http://2.22.195.139:8781/apiForProd' // 跳转到正式
 
+// const BASE_URI = 'https://2.21.138.147:8080/api' // 正式
 
 export default {
     /* 系统常量*/

+ 3 - 1
src/pages/citySafeNotic/index.vue

@@ -66,12 +66,14 @@ export default {
         // console.log('this.$route.params',this.$route.params,this.$route.params.openId)
         // this.search.createdBy=this.$route.params.openId
         // this.getList()
+        console.log('mounted')
         this.getInitCode()
     },
     methods: {
         async getInitCode() {
+            console.log('获取code')
             getInitialCode().then((res) => {
-                // alert('getInitialCode==>' + JSON.stringify(res))
+                console.log('getInitialCode==>' + JSON.stringify(res))
                 this.initCode = res.data.initCode
                 // alert('initCode==>' + this.initCode)
                 this.handleAuthorization()

+ 2 - 2
src/router/index.js

@@ -6,8 +6,8 @@ import auth from '../service/auth'
 Vue.use(Router)
 
 const router = new Router({
-    mode: 'history',
-    // mode: 'hash',
+    mode: 'history', // 地址会不需要增加/#
+    // mode: 'hash', // 地址会需要增加/#
     base: process.env.BASE_URL,
     routes: [
         {

+ 2 - 1
vue.config.js

@@ -31,7 +31,8 @@ module.exports = {
         proxy: {
             // 配置跨域
             "/h5Server": {
-                // target: `http://localhost:9001`,
+
+                // target: `http://2.22.195.139:8080/apiForProd`,
                 target: `http://lifeline.idea-sf.com/lifelineApi`,
                 ws: true,
                 changOrigin: true, // 允许跨域