明天专门搞详情
BIN
public/img/defaultAvatar.jpg
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
public/img/user/avatarsetting.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
public/img/user/bindemail.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
0
src/assets/img/user/bindingthird-party .png → public/img/user/bindingthird-party.png
Executable file → Normal file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
public/img/user/bindmobile.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/img/user/changepassword.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
public/img/user/collect.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
public/img/user/information.png
Normal file
After Width: | Height: | Size: 1011 B |
BIN
public/img/user/mystatus.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/img/user/personaldata.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/img/user/postmessage.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/img/user/replymessage.png
Normal file
After Width: | Height: | Size: 968 B |
BIN
public/img/user/visithomepage.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/assets/img/user/bindingthird-party.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
@ -72,6 +72,9 @@ export default {
|
||||
handlePopCancel() {
|
||||
this.$parent.twoCommentData = null
|
||||
this.$parent.popState = ""
|
||||
this.$parent.commentContent = ""
|
||||
|
||||
|
||||
},
|
||||
|
||||
// 清空
|
||||
|
@ -13,7 +13,7 @@
|
||||
<search-box slot="search" :hot-searchkeywords="hotSearchkeywords" :issearch="issearch"></search-box>
|
||||
|
||||
<div class="head-more flexcenter" @click="headMorePopState = !headMorePopState">
|
||||
<div class="red-dot" v-if="false"></div>
|
||||
<div class="red-dot" v-if="userInfo && userInfo.messagenum"></div>
|
||||
<svg-icon icon-class="threeAcross" class-name="head-more-icon"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
@ -22,9 +22,12 @@
|
||||
<div class="head-more-pop" :class="{ animation: headMorePopState }">
|
||||
<div class="head-more-userinfo flex1 flexacenter">
|
||||
<div class="head-more-left flexacenter">
|
||||
<img class="head-more-userinfo-avatar" :src="userInfo.avatar" alt="" />
|
||||
<router-link to="/user">
|
||||
<img class="head-more-userinfo-avatar" :src="userInfo.avatar || './img/defaultAvatar.jpg'" />
|
||||
</router-link>
|
||||
|
||||
<div class="head-more-userinfo-username">
|
||||
{{ userInfo.nickname }}
|
||||
{{ userInfo.nickname || '未登录' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="head-more-right">
|
||||
@ -41,7 +44,7 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-list">
|
||||
<a class="tab-item flexacenter" :href="item.url" target="_blank" :class="{ pitch: tab == item.name }"
|
||||
<a class="tab-item flexacenter" :href="item.url" target="_blank" :class="{ pitch: item.current == 1 }"
|
||||
v-for="(item, index) in menu" :key="index">{{ item.name }}</a>
|
||||
</div>
|
||||
|
||||
@ -73,7 +76,6 @@ export default {
|
||||
return {
|
||||
collapseShow: false, //显示折叠弹窗
|
||||
a: 0,
|
||||
tab: "Offer榜",
|
||||
headMorePopState: false, // 弹窗的状态
|
||||
islogin: false,
|
||||
userInfo: {}, // 注意 userInfo 写I 是否是大写 ,, 因为 user 已经改为全局,后面要删除传值的 user
|
||||
@ -83,18 +85,6 @@ export default {
|
||||
},
|
||||
props: ["issearch", "needgetuser", "userinfo"],
|
||||
watch: {
|
||||
// needgetuser: {
|
||||
// handler(newValue, oldValue) {
|
||||
// // if (newValue) this.getUserInfoData();
|
||||
// },
|
||||
// immediate: true,
|
||||
// },
|
||||
|
||||
// userinfo(newValue, oldValue) {
|
||||
// this.userInfo = newValue;
|
||||
// this.islogin = newValue.uid > 0 ? true : false;
|
||||
// },
|
||||
|
||||
headMorePopState(newValue, oldValue) {
|
||||
if (newValue) this.$pageStop();
|
||||
else this.$pageMove();
|
||||
@ -107,10 +97,9 @@ export default {
|
||||
this.userInfo = user
|
||||
this.islogin = user.uid > 0 ? true : false;
|
||||
this.hotSearchkeywords = this.$store.state.hotSearchkeywords
|
||||
this.menu = this.$store.state.menu
|
||||
}
|
||||
|
||||
// this.getMenu()
|
||||
|
||||
|
||||
},
|
||||
|
||||
@ -140,16 +129,6 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getMenu() {
|
||||
return
|
||||
this.$http.get("/widget", {
|
||||
type: "menu",
|
||||
}).then((res) => {
|
||||
if (res.code != 200) return;
|
||||
this.menu = res.data.menu.data;
|
||||
});
|
||||
},
|
||||
|
||||
collapseClick() {
|
||||
if (this.collapseShow == true) this.collapseShow = false;
|
||||
else this.collapseShow = true;
|
||||
|
@ -28,7 +28,7 @@
|
||||
投币解锁
|
||||
</div>
|
||||
<div class="unlockCoin-hint flexacenter" style="font-size: .36rem;">作者设置了阅读限制,解锁所有内容仅需 <div
|
||||
class="unlockCoin-hint-sum">{{ defaultcoinnum }}</div> 寄托币</div>
|
||||
class="unlockCoin-hint-sum">{{ info.price }}</div> 寄托币</div>
|
||||
<div class="unlockCoin-btn flexcenter" @click="postCoin(defaultcoinnum)">立即解锁
|
||||
</div>
|
||||
<div class="unlockCoin-hint flexcenter">你共有 {{ mybalance }} 个寄托币</div>
|
||||
@ -41,7 +41,7 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'Coins',
|
||||
props: ["popState", "coinConfig"],
|
||||
props: ["popState", "coinConfig", "info", "mybalance"],
|
||||
data() {
|
||||
return {
|
||||
defaultcoinnum: 1
|
||||
|
@ -4,7 +4,7 @@ import router from './router'
|
||||
import store from './store'
|
||||
import ElementUI, { Message, Pagination, loading } from 'element-ui';
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams } from "@/utils/common.js"
|
||||
import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams, clearCookies } from "@/utils/common.js"
|
||||
import http from "@/utils/request"
|
||||
import VueSanitize from 'vue-sanitize'
|
||||
|
||||
@ -29,6 +29,7 @@ Vue.prototype.$startupUnderLoading = startupUnderLoading // 开启加载提示
|
||||
Vue.prototype.$closeUnderLoading = closeUnderLoading // 关闭加载提示 element的
|
||||
Vue.prototype.$formattedDate = formattedDate // 时间戳转格式
|
||||
Vue.prototype.$updateURLSearchParams = updateURLSearchParams // 不刷新的情况下修改url
|
||||
Vue.prototype.$clearCookies = clearCookies // 清空Cookies
|
||||
|
||||
//svg文件引入
|
||||
import './icons'
|
||||
@ -47,13 +48,14 @@ if (!Array.isArray) {
|
||||
Vue.use(ElementUI);
|
||||
Vue.use(Pagination);
|
||||
|
||||
// 不要的
|
||||
Vue.use(VueSanitize);
|
||||
|
||||
|
||||
|
||||
// v-focus
|
||||
Vue.directive('focus', {
|
||||
// 当绑定元素插入到 DOM 中。
|
||||
inserted: function (el) {
|
||||
// 聚焦元素
|
||||
el.focus()
|
||||
}
|
||||
})
|
||||
|
@ -5,12 +5,13 @@ Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
historicalSearch: [],
|
||||
historicalSearch: [], // 历史数据
|
||||
allForumList: [], // 全部板块数据
|
||||
homeRequestState: false, // 首页推荐和收藏接口的数据请求状态 这个是是否需要发送请求,因为用户点击收藏后需要重新获取
|
||||
getUserInfoState: false, // 这个是是否在请求状态
|
||||
favoriteList: [],
|
||||
recommendList: [],
|
||||
favoriteList: [], // 收藏板块 数据
|
||||
recommendList: [], // 推荐板块数据
|
||||
menu: [],
|
||||
user: {}, // 用户信息
|
||||
hotSearchkeywords: [], // 热门搜索
|
||||
loading: null,
|
||||
@ -56,6 +57,10 @@ export default new Vuex.Store({
|
||||
state.getUserInfoState = payload
|
||||
},
|
||||
|
||||
setMenu(state, payload) {
|
||||
state.menu = payload
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
actions: {
|
||||
@ -90,18 +95,20 @@ export default new Vuex.Store({
|
||||
that.$http.post("/api/home").then(res => {
|
||||
if (res.code != 200) return;
|
||||
let data = res.data
|
||||
let { config, favorite, hotSearchkeywords, recommend, user } = data
|
||||
let { config, favorite, hotSearchkeywords, recommend, user, menu } = data
|
||||
|
||||
commit('setHomeRequestState', true)
|
||||
commit('setUser', user)
|
||||
commit('setFavoriteList', favorite)
|
||||
commit('setRecommendList', recommend)
|
||||
commit('setHotSearchkeywords', hotSearchkeywords)
|
||||
commit('setMenu', menu)
|
||||
|
||||
if (that.userInfo) { // 这个是顶部用户数据的 这样不用监听是否请求成功
|
||||
that.userInfo = user
|
||||
that.islogin = user.uid > 0 ? true : false;
|
||||
that.hotSearchkeywords = hotSearchkeywords
|
||||
that.menu = menu
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
|
@ -85,4 +85,14 @@ function updateURLSearchParams(obj = {}) {
|
||||
window.history.pushState({}, '', newUrl);
|
||||
}
|
||||
|
||||
export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams }
|
||||
|
||||
// 清除所有cookies
|
||||
function clearCookies() {
|
||||
let cookies = document.cookie.split("; ");
|
||||
for (let c of cookies) {
|
||||
let [name, _] = c.split("=");
|
||||
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||
}
|
||||
}
|
||||
|
||||
export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams, clearCookies }
|
@ -16,6 +16,7 @@ baseURL = {
|
||||
offer: "https://offer.gter.net",
|
||||
tenement: "https://app.gter.net",
|
||||
|
||||
|
||||
}
|
||||
|
||||
const service = axios.create({
|
||||
@ -27,7 +28,6 @@ const service = axios.create({
|
||||
service.interceptors.request.use(config => {
|
||||
//发请求前做的一些处理,数据转化,配置请求头,设置token,设置loading等,根据需求去添加
|
||||
//注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie
|
||||
// config['baseURL'] = "https://offer.gter.net"
|
||||
config['headers']['authorization'] = "qj2q1qk1on0curclipghjtv5ja1g9eq2"
|
||||
return config
|
||||
}, error => {
|
||||
|
@ -310,7 +310,6 @@
|
||||
<div class="bottom-operation-item flex1 flexcolumn flexcenter" @click="transmit()">
|
||||
<img class="bottom-operation-icom bottom-transmit-icom" src="@/assets/img/detail/share.png" />
|
||||
<div class="bottom-operation-text">转发</div>
|
||||
<button class="bottom-operation-button flexcolumn flexcenter" open-type="share"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -319,7 +318,7 @@
|
||||
<detail-reply :two-comment-data="twoCommentData" :comment-content="commentContent"
|
||||
:pop-state="popState"></detail-reply>
|
||||
|
||||
<coins :coin-config="coinConfig" :pop-state="popState"></coins>
|
||||
<coins :coin-config="coinConfig" :mybalance="mybalance" :pop-state="popState" :info="info"></coins>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -463,6 +462,8 @@ export default {
|
||||
commentContent: "", // 评论的文本
|
||||
operateState: false, // 操作请求的状态
|
||||
|
||||
mybalance: 0, // 一共有多个寄托币
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@ -486,14 +487,52 @@ export default {
|
||||
let data = res.data
|
||||
let info = data.info
|
||||
|
||||
|
||||
info['message'] = info['message'].trim()
|
||||
|
||||
const reg = new RegExp("\r\n", "g")
|
||||
info['message'] = info['message'].replaceAll(reg, '<br/>')
|
||||
info['message'] = info['message'].replace(/<img[^>]*>/g, (match) => {
|
||||
return match.replace(/width="[^"]*"/g, '').replace(/height="[^"]*"/g, '');
|
||||
})
|
||||
|
||||
info['message'] = info['message'].replaceAll("[hide]作者设置了回复可见[/hide]", `<div class="flexcenter content-unlock content-unlock-no replyVisible" @click="aa()"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了回复可见</div>`)
|
||||
|
||||
let ispost = data.info.ispost
|
||||
let price = data.info.price
|
||||
|
||||
|
||||
if (price > 0) {
|
||||
let message = info['message']
|
||||
|
||||
if (message.indexOf("[free]") != -1) {
|
||||
info['message'] = ""
|
||||
const regex = /\[free\]([^[]+)\[\/free\]/g;
|
||||
let result = message.match(regex);
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
result[i] = result[i].replace("[free]", "")
|
||||
result[i] = result[i].replace("[/free]", "")
|
||||
|
||||
info['message'] += result[i]
|
||||
}
|
||||
info['message'] += `<div class="flexcenter content-unlock content-unlock-no coinVisible" @click="aa()"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了投币可见</div>`
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (info['message'].indexOf("[hide]") != -1) {
|
||||
if (ispost == 0) info['message'] = info['message'].replaceAll("[hide]作者设置了回复可见[/hide]", `<div class="flexcenter content-unlock content-unlock-no replyVisible" @click="setValue('popState', 'discussionSingle')"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了回复可见</div>`)
|
||||
if (ispost == 1) {
|
||||
info['message'] = info['message'].replaceAll("[hide]", `<div class="content-unlock content-already"><div class="content-already-header flexflex">- 本内容回复可见 -</div><div class="content-unlock-wenzi">`)
|
||||
info['message'] = info['message'].replaceAll("[/hide]", `</div></div>`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if (ispost == 1) info['message'] = info['message'].replaceAll("[hide]作者设置了回复可见[/hide]", "")
|
||||
// if (info.message.indexOf("[hide]作者设置了回复可见[/hide]")) {
|
||||
// `<div class="flexcenter content-unlock content-unlock-no"><img class="unlock-icom" src="@/assets/img/detail/unlock.png">作者设置了回复可见</div>`
|
||||
// }
|
||||
@ -514,11 +553,26 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
let coinVisibleList = document.getElementsByClassName("coinVisible")
|
||||
if (!Array.isArray(coinVisibleList)) {
|
||||
for (let i = 0; i < coinVisibleList.length; i++) {
|
||||
coinVisibleList[i].addEventListener('click', () => {
|
||||
this.$emit("coinVisibleClick")
|
||||
})
|
||||
}
|
||||
this.$on('coinVisibleClick', () => {
|
||||
// coinNo coindisplayuser
|
||||
this.popState = data.mybalance > price ? "coindisplayuser" : "coinNo"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// console.log(info, "offerinfo", data.type);
|
||||
|
||||
this.info = info
|
||||
this.type = data.type
|
||||
this.token = data.token
|
||||
this.mybalance = data.mybalance
|
||||
|
||||
if (this.type == 6) this.getOfferDetail()
|
||||
else if (this.type == 5) this.getsummaryDetails()
|
||||
@ -619,11 +673,6 @@ export default {
|
||||
getInterviewDetails() {
|
||||
|
||||
this.$http.post("/InterviewExperience/thread", {
|
||||
// token: this.token,
|
||||
// tid: this.tid
|
||||
// tid: 2322145,
|
||||
// uniqid: "--G1tS2SCTOQyoOMiedlLKxTnFvHWjBwQezsJjvVJFwgqOtOFeYr4_LAAG5RV37ETvMl2Zd4tSCc-_dqeKpERxXsx-tPfXrUs0kUysTGLzgxYzU~",
|
||||
// token: "5e3c42209eebfbab66e6f0d6c70a53c7",
|
||||
tid: this.tid,
|
||||
token: this.token
|
||||
}, "tenement").then(res => {
|
||||
@ -652,12 +701,11 @@ export default {
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 打开编辑评论
|
||||
openEditPop(item) {
|
||||
console.log(item);
|
||||
let message = item.message
|
||||
message = message.replace(/<div[^>]*>[\s\S]*?<\/div>/gi, '');
|
||||
message = message.replace(/<div[^>]*>[\s\S]*?<\/div>/gi, ''); // 清除掉引有的结构
|
||||
message = message.trim()
|
||||
this.commentContent = message
|
||||
this.editCommentPid = item.pid
|
||||
@ -785,10 +833,6 @@ export default {
|
||||
margin-top: 1.3rem;
|
||||
padding-bottom: 2.8rem;
|
||||
|
||||
.aaa {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.detail-head {
|
||||
color: #7F7F7F;
|
||||
padding: .191rem 0.2933rem 0;
|
||||
@ -1315,23 +1359,6 @@ export default {
|
||||
padding: 0 0.4rem;
|
||||
}
|
||||
|
||||
.bottom-operation-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-transmit-icom {
|
||||
width: 0.4rem;
|
||||
height: 0.4rem;
|
||||
|
@ -6,7 +6,7 @@
|
||||
@click="hotLabelClick(item.fid)">{{ item.name }}</div>
|
||||
</div>
|
||||
<!-- 路径 -->
|
||||
<plate-navigation :isskip="isskip" v-if="fid != 0" :stairname="plate.stairname"
|
||||
<plate-navigation isskip="true" v-if="fid != 0" :stairname="plate.stairname"
|
||||
:subsectionsname="plate.subsectionsname"></plate-navigation>
|
||||
<section>
|
||||
<template v-if="list.length != 0 || loading">
|
||||
|
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
|
||||
<div class="operation-box shadow">
|
||||
<div class="operation-item flexacenter">
|
||||
<a class="operation-item flexacenter" href="https://www.gter.net/bbs/user/pm.html?mobile=yes">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/information.png">消息
|
||||
</div>
|
||||
@ -33,103 +33,29 @@
|
||||
<div v-else class="unread-info flexcenter">{{ user.messagenum }}</div>
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="operation-item flexacenter">
|
||||
<a class="operation-item flexacenter" v-for="(item, index) in operateList" :key="index" :href="item.url">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/collect.png">收藏
|
||||
<img class="operation-icom" mode="widthFix" :src="`./img/user/${item.icon}`">{{ item.name }}
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<div class="operation-data flexcenter">{{ count.fav }}</div>
|
||||
<div class="operation-data flexcenter">{{ count[item.key] }}</div>
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" src="@/assets/img/user/postmessage.png" />发帖
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<div class="operation-data flexcenter">{{ count.post }}</div>
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/replymessage.png" />回帖
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<div class="operation-data flexcenter">{{ count.reply }}</div>
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="operation-box shadow">
|
||||
<div class="operation-item flexacenter">
|
||||
<a v-for="(item, index) in setList" :key="index" class="operation-item flexacenter" :href="item.url">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/personaldata.png">个人资料
|
||||
<img class="operation-icom" mode="widthFix" :src="`./img/user/${item.icon}`">{{ item.name }}
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" src="@/assets/img/user/avatarsetting.png" />设置头像
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/mystatus.png" />我的状态
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/changepassword.png" />修改密码
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/bindemail.png" />绑定邮箱
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/bindmobile.png" />绑定手机
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/bindingthird-party .png" />绑定第三方账号
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation-item flexacenter">
|
||||
<div class="operation-left flexacenter">
|
||||
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/visithomepage.png" />浏览个人主页
|
||||
</div>
|
||||
<div class="operation-right flexacenter">
|
||||
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
@ -151,6 +77,68 @@ export default {
|
||||
},
|
||||
count: {},
|
||||
|
||||
operateList: [{
|
||||
name: "收藏",
|
||||
url: "https://www.gter.net/bbs/user/collection.html",
|
||||
icon: "collect.png",
|
||||
type: "collect",
|
||||
key: "fav"
|
||||
}, {
|
||||
name: "发帖",
|
||||
url: "https://www.gter.net/bbs/user/threads.html",
|
||||
icon: "postmessage.png",
|
||||
type: "collect",
|
||||
key: "post"
|
||||
}, {
|
||||
name: "回帖",
|
||||
url: "https://www.gter.net/bbs/user/post.html",
|
||||
icon: "replymessage.png",
|
||||
type: "post",
|
||||
key: "reply"
|
||||
},],
|
||||
|
||||
setList: [{ // 设置列表
|
||||
name: "个人资料",
|
||||
url: "https://member.gter.net/index/modify.html",
|
||||
icon: "personaldata.png",
|
||||
type: "modify"
|
||||
}, {
|
||||
name: "设置头像",
|
||||
url: "https://member.gter.net/index/avatar.html",
|
||||
icon: "avatarsetting.png",
|
||||
type: "avatar"
|
||||
}, {
|
||||
name: "我的状态",
|
||||
url: "https://member.gter.net/index/status.html",
|
||||
icon: "mystatus.png",
|
||||
type: "status"
|
||||
}, {
|
||||
name: "修改密码",
|
||||
url: "https://member.gter.net/reset/password.html",
|
||||
icon: "changepassword.png",
|
||||
type: "password"
|
||||
}, {
|
||||
name: "绑定邮箱",
|
||||
url: "https://member.gter.net/reset/email.html",
|
||||
icon: "bindemail.png",
|
||||
type: "email"
|
||||
}, {
|
||||
name: "绑定手机",
|
||||
url: "https://member.gter.net/reset/mobile.html",
|
||||
icon: "bindmobile.png",
|
||||
type: "mobile"
|
||||
}, {
|
||||
name: "绑定第三方账号",
|
||||
url: "https://member.gter.net/bind",
|
||||
icon: "bindingthird-party.png",
|
||||
type: "bind"
|
||||
}, {
|
||||
name: "浏览个人主页",
|
||||
url: "",
|
||||
icon: "visithomepage.png",
|
||||
type: "space"
|
||||
}]
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
@ -161,18 +149,40 @@ export default {
|
||||
methods: {
|
||||
init() {
|
||||
this.$http.post("/api/user", "").then(res => {
|
||||
console.log(res, "res");
|
||||
let data = res.data
|
||||
this.count = data.count
|
||||
this.user = data.user
|
||||
|
||||
console.log(this.count);
|
||||
let user = data.user
|
||||
let setList = this.setList
|
||||
setList.forEach(el => {
|
||||
if (el.type == "space") el['url'] = `https://bbs.gter.net/space-uid-${user.uin}.html`
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 点击退出登录
|
||||
logOut() {
|
||||
console.log("点击退出登录");
|
||||
|
||||
this.user = {
|
||||
avatar: "",
|
||||
nickname: "",
|
||||
messagenum: 0
|
||||
}
|
||||
|
||||
|
||||
this.$store.commit('setUser', {})
|
||||
this.$store.commit('setFavoriteList', [])
|
||||
this.$store.commit('setHomeRequestState', false)
|
||||
|
||||
this.$clearCookies();
|
||||
|
||||
this.$router.push("/")
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|