From c17311ba1351cd5e64654c3fc7b2fe765b1e7382 Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Thu, 09 Oct 2025 11:53:12 +0800
Subject: [PATCH] 1

---
 src/store/modules/user.js |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index bb2feb0..49a5010 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -2,6 +2,7 @@
 import { _register, _userInfo } from '@/service/user.api'
 import { SET_USERINFO, GET_USERINFO, SET_OUT, CONNECT_WALLET, SET_STATUS } from "@/store/const.store";
 import { _getBalance } from '@/service/user.api.js'
+import { _customer } from "@/service/user.api.js";
 export default {
   namespaced: true,
   state: {
@@ -11,7 +12,8 @@
       usercode: '', // 
       token: '', // 登录token
       username: ''
-    }
+    },
+    customer_service_url: null, // 客服地址
   },
   getters: {
     mingStatus: state => state.status,
@@ -31,6 +33,10 @@
     },
     [SET_OUT](state) { // 退出
       state.userInfo = {}
+    },
+    // 设置客服链接
+    'SET_CUSTOMER_SERVICE_URL'(state, url) {
+      state.customer_service_url = url || null
     }
   },
   actions: {
@@ -47,5 +53,9 @@
       data = await _getBalance()
       commit(SET_USERINFO, { balance: data.money }) // 余额
     },
+    async 'GET_CUSTOMER_SERVICE_URL'({ commit }) { // 获取客服地址
+      let data = await _customer()
+      commit('SET_CUSTOMER_SERVICE_URL', data.url) // 客服地址
+    }
   },
 };

--
Gitblit v1.9.3