a1300399510@qq.com 提交于 2023/04/03 -12:00:02
This commit is contained in:
parent
5a4bbd7df2
commit
c64091d9c0
@ -184,7 +184,8 @@ export default {
|
||||
|
||||
// 获取用户信息
|
||||
getUserInfoData() {
|
||||
this.$http.post("/widget/getUser").then((res) => {
|
||||
// this.$http.post("/widget/getUser").then((res) => {
|
||||
this.$http.post("/api",).then((res) => {
|
||||
if (res.code != 200) return;
|
||||
this.userInfo = res.data;
|
||||
this.islogin = res.data.uid > 0 ? true : false;
|
||||
@ -194,6 +195,7 @@ export default {
|
||||
},
|
||||
|
||||
getMenu() {
|
||||
return
|
||||
this.$http.get("/widget", {
|
||||
type: "menu",
|
||||
}).then((res) => {
|
||||
|
@ -11,16 +11,19 @@ axios.defaults.withCredentials = true
|
||||
axios.defaults.emulateJSON = true
|
||||
// baseURL = "https://offer.gter.net/api"
|
||||
baseURL = "https://forum.gter.net"
|
||||
console.log("baseURL",baseURL);
|
||||
const service = axios.create({
|
||||
baseURL,
|
||||
timeout: 5000
|
||||
})
|
||||
|
||||
// service.header.authorization = "qj2q1qk1on0curclipghjtv5ja1g9eq2"
|
||||
|
||||
// 2.请求拦截器
|
||||
service.interceptors.request.use(config => {
|
||||
//发请求前做的一些处理,数据转化,配置请求头,设置token,设置loading等,根据需求去添加
|
||||
//注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie
|
||||
// console.log(config, "config");
|
||||
config['headers']['authorization'] = "qj2q1qk1on0curclipghjtv5ja1g9eq2"
|
||||
return config
|
||||
}, error => {
|
||||
Promise.reject(error)
|
||||
|
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<!-- 右选项 -->
|
||||
<div class="allSections-right">
|
||||
<div class="allSections-right-item" v-for="(i, k) in showList" :key="k">
|
||||
<div class="allSections-right-item" v-for="(i, k) in list[allActive].data" :key="k">
|
||||
<div class="item-content">
|
||||
<div class="item-title">{{ i.name }}</div>
|
||||
<div v-if="i.description" class="item-text" v-html="i.description"></div>
|
||||
@ -65,6 +65,8 @@ export default {
|
||||
this.$http.post("/api/home/allForum").then((res) => {
|
||||
if (res.code != 200) return;
|
||||
this.list = res.data
|
||||
|
||||
console.log(this.list, "list");
|
||||
}).catch(err => {
|
||||
this.$message.error(err.message)
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user