jhzh
2025-04-25 e72ae0c8201029e04141254f9c5023aef646a7c7
Merge branch 'master' of http://124.156.157.155:8060/r/gp/cakuns_st_pc
2 files modified
2 files added
31 ■■■■ changed files
.env.development 12 ●●●●● patch | view | raw | blame | history
.env.preview 7 ●●●●● patch | view | raw | blame | history
src/store/modules/user.js 8 ●●●● patch | view | raw | blame | history
src/utils/request.js 4 ●●●● patch | view | raw | blame | history
.env.development
New file
@@ -0,0 +1,12 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
# VUE_APP_API_BASE_URL=http://www.jqydl.com:8091/
# VUE_APP_API_BASE_URL=https://api.3falcon.com/
# VUE_APP_API_BASE_URL=https://api.marwadi.online/
# VUE_APP_API_BASE_URL=https://www.rksv.store:8091/
# VUE_APP_API_BASE_URL=https://api.dfddgj346.xyz/
# VUE_APP_API_BASE_URL=http://192.168.10.4:8091/
  # VUE_APP_API_BASE_URL=https://api.durocaspitall.com/
 VUE_APP_API_BASE_URL=https://api.fidelityio.com/
# VUE_APP_API_BASE_URL= https://www.prudentcapitals.net/
# VUE_APP_API_BASE_URL=https://api.guosen.org/
.env.preview
New file
@@ -0,0 +1,7 @@
NODE_ENV=production
VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=https://api.durocaspitall.com/
# VUE_APP_API_BASE_URL=http://192.168.10.4:8091/
src/store/modules/user.js
@@ -36,7 +36,7 @@
  actions: {
    // 登录
    Login ({ commit }, userInfo) {
    Login({ commit }, userInfo) {
      return new Promise((resolve, reject) => {
        login(userInfo).then(response => {
          const result = response
@@ -55,7 +55,7 @@
    },
    // 获取用户信息
    GetInfo ({ commit }) {
    GetInfo({ commit }) {
      return new Promise((resolve, reject) => {
        // 请求后端获取用户信息 /api/user/info
        getInfo().then(response => {
@@ -66,7 +66,7 @@
              const per = {
                ...permission,
                actionList: (permission.actionEntitySet || {}).map(item => item.action)
               }
              }
              return per
            })
            role.permissionList = role.permissions.map(permission => { return permission.permissionId })
@@ -89,7 +89,7 @@
    },
    // 登出
    Logout ({ commit, state }) {
    Logout({ commit, state }) {
      return new Promise((resolve) => {
        logout(state.token).then(() => {
          commit('SET_TOKEN', '')
src/utils/request.js
@@ -8,8 +8,8 @@
// 创建 axios 实例
const request = axios.create({
  // API 请求的默认前缀
  baseURL: 'https://api.fidelityio.com/',
  // baseURL: process.env.VUE_APP_API_BASE_URL,
  // baseURL: 'https://api.fidelityio.com/',
  baseURL: process.env.VUE_APP_API_BASE_URL,
  // content-type: application/x-www-form-urlencoded
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'