Compare commits

..

No commits in common. "d5ab2ca459bc688a70ec4fcecd78a1b91bcbb8ae" and "15b7c46e3567b53cf0de67779b280fe62e97e1e9" have entirely different histories.

30 changed files with 213 additions and 288 deletions

Binary file not shown.

Before

(image error) Size: 4.6 KiB

Binary file not shown.

Before

(image error) Size: 1.3 KiB

Binary file not shown.

Before

(image error) Size: 2.1 KiB

Binary file not shown.

Before

(image error) Size: 1.1 KiB

Binary file not shown.

Before

(image error) Size: 2.1 KiB

Binary file not shown.

Before

(image error) Size: 2.0 KiB

Binary file not shown.

Before

(image error) Size: 1011 B

Binary file not shown.

Before

(image error) Size: 1.4 KiB

Binary file not shown.

Before

(image error) Size: 1.6 KiB

Binary file not shown.

Before

(image error) Size: 1.6 KiB

Binary file not shown.

Before

(image error) Size: 968 B

Binary file not shown.

Before

(image error) Size: 1.7 KiB

Binary file not shown.

Before

(image error) Size: 287 B

Binary file not shown.

Before

(image error) Size: 298 B

Binary file not shown.

Before

(image error) Size: 434 B

Binary file not shown.

Before

(image error) Size: 437 B

Before

(image error) Size: 1.2 KiB

After

(image error) Size: 1.2 KiB

Binary file not shown.

Before

(image error) Size: 1.2 KiB

@ -13,7 +13,7 @@
<div class="discussion-single-content flexacenter flex1">
<input class="discussion-single-input flex1" cursor-spacing="5" type="text"
:placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'" :value="commentContent"
@input="inputCommentContent($event)" v-focus />
@input="inputCommentContent($event)" />
<img class="discussion-single-input-icom" @click.stop="setValue()"
src="@/assets/img/detail/unfold.png" />
</div>
@ -33,15 +33,16 @@
<div class="discussion-text one-line">{{ twoCommentData.content }}</div>
</div>
<div class="discussion-multi-content flexflex flex1">
<textarea class="discussion-multi-textarea flex1" v-focus type="text" maxlength="500"
:value="commentContent" :placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'"
@input="inputCommentContent($event)"></textarea>
<textarea class="discussion-multi-textarea flex1" type="text" maxlength="500" :value="commentContent"
:placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'" @input="inputCommentContent($event)"></textarea>
<img class="discussion-multi-icom" @click.stop="openDiscussionSingle()"
src="@/assets/img/detail/pack.png" />
<div class="discussion-multi-sum">{{ 500 - commentContent.length }}</div>
</div>
<div class="discussion-multi-bottom flexflex flexacenter">
<div class="discussion-multi-btn flexcenter" @click.stop="postComment()">发布</div>
<div class="discussion-multi-btn flexcenter" @click.stop="postComment()">
发布
</div>
</div>
</div>
</div>
@ -63,6 +64,7 @@ export default {
},
methods: {
//
postComment() {
this.$parent.postComment()
@ -72,9 +74,6 @@ 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="userInfo && userInfo.messagenum"></div>
<div class="red-dot" v-if="false"></div>
<svg-icon icon-class="threeAcross" class-name="head-more-icon"></svg-icon>
</div>
</div>
@ -22,12 +22,9 @@
<div class="head-more-pop" :class="{ animation: headMorePopState }">
<div class="head-more-userinfo flex1 flexacenter">
<div class="head-more-left flexacenter">
<router-link to="/user">
<img class="head-more-userinfo-avatar" :src="userInfo.avatar || './img/defaultAvatar.jpg'" />
</router-link>
<img class="head-more-userinfo-avatar" :src="userInfo.avatar" alt="" />
<div class="head-more-userinfo-username">
{{ userInfo.nickname || '未登录' }}
{{ userInfo.nickname }}
</div>
</div>
<div class="head-more-right">
@ -44,7 +41,7 @@
</div>
<div class="tab-list">
<a class="tab-item flexacenter" :href="item.url" target="_blank" :class="{ pitch: item.current == 1 }"
<a class="tab-item flexacenter" :href="item.url" target="_blank" :class="{ pitch: tab == item.name }"
v-for="(item, index) in menu" :key="index">{{ item.name }}</a>
</div>
@ -76,6 +73,7 @@ export default {
return {
collapseShow: false, //
a: 0,
tab: "Offer榜",
headMorePopState: false, //
islogin: false,
userInfo: {}, // userInfo I ,, user user
@ -85,6 +83,18 @@ 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();
@ -97,9 +107,10 @@ 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()
},
@ -129,6 +140,16 @@ 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;

@ -53,6 +53,7 @@ export default {
left: 0;
width: 100%;
height: 100%;
background: #7F7F7F;
}
.path-slash {
@ -97,6 +98,4 @@ export default {
}
}
</style>

@ -28,7 +28,7 @@
投币解锁
</div>
<div class="unlockCoin-hint flexacenter" style="font-size: .36rem;">作者设置了阅读限制解锁所有内容仅需 <div
class="unlockCoin-hint-sum">{{ info.price }}</div> 寄托币</div>
class="unlockCoin-hint-sum">{{ defaultcoinnum }}</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", "info", "mybalance"],
props: ["popState", "coinConfig"],
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, clearCookies } from "@/utils/common.js"
import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams } from "@/utils/common.js"
import http from "@/utils/request"
import VueSanitize from 'vue-sanitize'
@ -29,7 +29,6 @@ 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'
@ -48,21 +47,11 @@ if (!Array.isArray) {
Vue.use(ElementUI);
Vue.use(Pagination);
// 不要的
Vue.use(VueSanitize);
// v-focus
Vue.directive('focus', {
inserted: function (el) {
el.focus()
}
})
new Vue({
router,
store,
render: h => h(App),
render: h => h(App)
}).$mount('#app')

@ -5,13 +5,12 @@ Vue.use(Vuex)
export default new Vuex.Store({
state: {
historicalSearch: [], // 历史数据
historicalSearch: [],
allForumList: [], // 全部板块数据
homeRequestState: false, // 首页推荐和收藏接口的数据请求状态 这个是是否需要发送请求,因为用户点击收藏后需要重新获取
getUserInfoState: false, // 这个是是否在请求状态
favoriteList: [], // 收藏板块 数据
recommendList: [], // 推荐板块数据
menu: [],
favoriteList: [],
recommendList: [],
user: {}, // 用户信息
hotSearchkeywords: [], // 热门搜索
loading: null,
@ -57,10 +56,6 @@ export default new Vuex.Store({
state.getUserInfoState = payload
},
setMenu(state, payload) {
state.menu = payload
}
},
actions: {
@ -95,20 +90,18 @@ 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, menu } = data
let { config, favorite, hotSearchkeywords, recommend, user } = 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,14 +85,4 @@ function updateURLSearchParams(obj = {}) {
window.history.pushState({}, '', newUrl);
}
// 清除所有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 }
export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams }

@ -11,12 +11,10 @@ axios.defaults.withCredentials = true
axios.defaults.emulateJSON = true
baseURL = {
// forum: "https://forum.gter.net",
forum: "https://app.gter.net/forum",
forum: "https://forum.gter.net",
offer: "https://offer.gter.net",
tenement: "https://app.gter.net",
}
const service = axios.create({
@ -28,6 +26,7 @@ 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 => {

@ -18,6 +18,7 @@
{{ info.subject }}
</div>
<!-- -->
<div class="card flexcenter">
<div class="card-item shadow" v-if="postList.page == 1">
@ -145,7 +146,7 @@
index + 2}` }}</div>
<div class="card-head-fool" v-else>{{ `${(postList.page - 1) * postList.limit + index + 1}` }}
</div>
<div class="edit-box flexcenter" v-if="item.ismyself == 1" @click.stop="openEditPop(item)">
<div class="edit-box flexcenter" v-if="item.ismyself == 1" @click.stop="handleIsmyself(item)">
<img class="edit-icom" src="@/assets/img/detail/edit.png" />
</div>
<!-- <div class="card-head-fool">{{ index == 0 ? '楼主' : `${index}` }}</div> -->
@ -168,7 +169,8 @@
<svg-icon icon-class="quotation-right" class-name="quotation-icon"></svg-icon>
</div>
</div>
</div> 之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
</div>
之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
<!-- 未解锁区域 -->
<div class="flexcenter content-unlock content-unlock-no" v-if="index == 3 || index == 4">
<img class="unlock-icom" src="@/assets/img/detail/unlock.png">
@ -310,6 +312,7 @@
<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>
@ -318,7 +321,7 @@
<detail-reply :two-comment-data="twoCommentData" :comment-content="commentContent"
:pop-state="popState"></detail-reply>
<coins :coin-config="coinConfig" :mybalance="mybalance" :pop-state="popState" :info="info"></coins>
<coins :coin-config="coinConfig" :pop-state="popState"></coins>
</div>
</template>
@ -334,7 +337,6 @@ export default {
// avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle",
// content: "",
// },
editCommentPid: null,
popState: "", // discussionSingle discussionMulti
coinConfig: {
strategy: {
@ -462,8 +464,6 @@ export default {
commentContent: "", //
operateState: false, //
mybalance: 0, //
};
},
mounted() {
@ -487,57 +487,24 @@ 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["messageList"] = []
let ispost = data.info.ispost
let price = data.info.price
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>`)
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>`
// }
// console.log(info['message']);
// info['message'] = this.$sanitize(info['message'])
// console.log(info['message']);
data.type == 0 ? this.$refs['vHtmlMessage'] ? this.$refs.vHtmlMessage.innerHTML = info['message'] : "" : ""
@ -553,34 +520,18 @@ 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()
else if (this.type == 3) this.getTenementDetails()
else if (this.type == 2) this.getInterviewDetails()
// info['ispost'] != 0 ? this.getPostList() : ''
this.getPostList()
info['ispost'] != 0 ? this.getPostList() : ''
}).finally(() => {
this.$closeUnderLoading(this)
@ -673,7 +624,11 @@ export default {
getInterviewDetails() {
this.$http.post("/InterviewExperience/thread", {
tid: this.tid,
// token: this.token,
// tid: this.tid
// tid: 2322145,
// uniqid: "--G1tS2SCTOQyoOMiedlLKxTnFvHWjBwQezsJjvVJFwgqOtOFeYr4_LAAG5RV37ETvMl2Zd4tSCc-_dqeKpERxXsx-tPfXrUs0kUysTGLzgxYzU~",
// token: "5e3c42209eebfbab66e6f0d6c70a53c7",
token: this.token
}, "tenement").then(res => {
// console.log(res);
@ -699,51 +654,25 @@ export default {
this.postList.count = data.count
})
},
//
openEditPop(item) {
console.log(item);
let message = item.message
message = message.replace(/<div[^>]*>[\s\S]*?<\/div>/gi, ''); //
message = message.trim()
this.commentContent = message
this.editCommentPid = item.pid
this.popState = "discussionMulti"
},
//
handleReplyPop(item) {
this.twoCommentData = {
avatar: item.avatar,
content: item.message,
pid: item.pid
}
this.popState = "discussionSingle"
},
//
postComment(message) {
let url = ""
if (this.editCommentPid) url = "/api/operation/redactPost" //
else url = "/api/operation/reply" //
this.$http.post(url, {
this.$http.post("/api/operation/reply", {
token: this.token,
message: this.commentContent,
pid: this.editCommentPid || (this.twoCommentData && this.twoCommentData.pid)
message: this.commentContent
}).then(res => {
if (res.code != 200) return
// let data = res.data
// console.log(data);
this.popState = ""
this.twoCommentData = null
if (this.editCommentPid) this.$router.go(0)
this.editCommentPid = null
let { count, limit } = this.postList
let page = Math.ceil((count + 1) / limit)
@ -785,6 +714,7 @@ export default {
else if (key == "uncollect") url = "/api/operation/threadunFav"
this.$http.post(url, { tid: this.tid }).then(res => {
console.log(res);
if (res.code != 200) return
if (key == "like") this.info.islike = 1
if (key == "collect") this.info.isfav = 1
@ -833,6 +763,10 @@ export default {
margin-top: 1.3rem;
padding-bottom: 2.8rem;
.aaa {
color: red;
}
.detail-head {
color: #7F7F7F;
padding: .191rem 0.2933rem 0;
@ -969,6 +903,7 @@ export default {
.edit-icom {
width: .4rem;
// height: .4rem;
}
}
}
@ -986,54 +921,44 @@ export default {
width: 100% !important;
height: auto !important;
}
}
.quote {
width: 100%;
color: #333;
font-size: .32rem;
border-radius: .16rem;
background: rgb(246, 246, 246) url(@/assets/img/detail/quotation-left.png) no-repeat .4rem .2666rem;
.quotation {
width: 100%;
color: #333;
font-size: .32rem;
border-radius: .16rem;
background: rgb(246, 246, 246);
padding: .36rem .24rem;
box-sizing: border-box;
margin-bottom: .48rem;
padding: .1333rem .1333rem .1333rem 1rem;
.quotation-wenzi {
line-height: .52rem;
}
// padding: .36rem .24rem;
box-sizing: border-box;
margin-bottom: .48rem;
.quotation-icon {
width: .32rem;
height: .26rem;
}
blockquote {
margin: 0;
padding: 0 .8667rem .0667rem 0;
background: url(@/assets/img/detail/quotation-right.png) no-repeat 100% 100%;
line-height: 1.6;
zoom: 1;
display: inline;
}
.quotation-right {
flex-direction: column;
margin-left: .28rem;
.quotation-wenzi {
line-height: .52rem;
}
.quotation-bottom {
color: #7F7F7F;
font-size: .28rem;
margin-top: .258rem;
.quotation-icon {
width: .32rem;
height: .26rem;
}
.quotation-right {
flex-direction: column;
margin-left: .28rem;
.quotation-bottom {
color: #7F7F7F;
font-size: .28rem;
margin-top: .258rem;
.quotation-icon {
margin-left: .2rem;
}
.quotation-icon {
margin-left: .2rem;
}
}
}
}
/deep/ {
.content-unlock {
&.content-unlock-no {
height: 3.2rem;
@ -1075,8 +1000,6 @@ export default {
}
}
}
@ -1359,6 +1282,23 @@ 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;

@ -100,6 +100,7 @@ export default {
methods: {
// query
handQuery() {
console.log(this.list);
if (this.list.length >= 2) {
let list = this.list
list.forEach((el, index) => {
@ -118,6 +119,10 @@ export default {
})
console.log(this.allActive, "allActive");
} else {
setTimeout(() => {
this.handQuery()
@ -191,8 +196,8 @@ export default {
this.$router.push({ path: `/allSections`, query: { fid: this.fid, invitationPage: this.invitationPage } })
},
//
flybackAll() {
console.log("jkldfgjklfggfdjklgfjkl");
this.isPlateListState = true
},

@ -6,7 +6,7 @@
@click="hotLabelClick(item.fid)">{{ item.name }}</div>
</div>
<!-- 路径 -->
<plate-navigation isskip="true" v-if="fid != 0" :stairname="plate.stairname"
<plate-navigation :isskip="isskip" 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">
<a class="operation-item flexacenter" href="https://www.gter.net/bbs/user/pm.html?mobile=yes">
<div class="operation-item flexacenter">
<div class="operation-left flexacenter">
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/information.png">消息
</div>
@ -33,29 +33,103 @@
<div v-else class="unread-info flexcenter">{{ user.messagenum }}</div>
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
</div>
</a>
</div>
<a class="operation-item flexacenter" v-for="(item, index) in operateList" :key="index" :href="item.url">
<div class="operation-item flexacenter">
<div class="operation-left flexacenter">
<img class="operation-icom" mode="widthFix" :src="`./img/user/${item.icon}`">{{ item.name }}
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/collect.png">收藏
</div>
<div class="operation-right flexacenter">
<div class="operation-data flexcenter">{{ count[item.key] }}</div>
<div class="operation-data flexcenter">{{ count.fav }}</div>
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
</div>
</a>
</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>
</div>
<div class="operation-box shadow">
<a v-for="(item, index) in setList" :key="index" class="operation-item flexacenter" :href="item.url">
<div class="operation-item flexacenter">
<div class="operation-left flexacenter">
<img class="operation-icom" mode="widthFix" :src="`./img/user/${item.icon}`">{{ item.name }}
<img class="operation-icom" mode="widthFix" src="@/assets/img/user/personaldata.png">个人资料
</div>
<div class="operation-right flexacenter">
<svg-icon icon-class="arrowsLeft" class-name="operation-right-icom"></svg-icon>
</div>
</a>
</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>
</div>
@ -77,68 +151,6 @@ 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"
}]
};
},
@ -149,40 +161,18 @@ 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
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`
})
console.log(this.count);
})
},
// 退
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("/")
},
},
};