Compare commits
3 Commits
15b7c46e35
...
d5ab2ca459
Author | SHA1 | Date | |
---|---|---|---|
|
d5ab2ca459 | ||
|
fb44b267bd | ||
|
3e8dba7d4b |
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/detail/icon_quote_e.gif
Normal file
After Width: | Height: | Size: 287 B |
BIN
src/assets/img/detail/icon_quote_s.gif
Normal file
After Width: | Height: | Size: 298 B |
BIN
src/assets/img/detail/quotation-left.png
Normal file
After Width: | Height: | Size: 434 B |
BIN
src/assets/img/detail/quotation-right.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
src/assets/img/user/bindingthird-party.png
Normal file
After Width: | Height: | 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)" />
|
||||
@input="inputCommentContent($event)" v-focus />
|
||||
<img class="discussion-single-input-icom" @click.stop="setValue()"
|
||||
src="@/assets/img/detail/unfold.png" />
|
||||
</div>
|
||||
@ -33,16 +33,15 @@
|
||||
<div class="discussion-text one-line">{{ twoCommentData.content }}</div>
|
||||
</div>
|
||||
<div class="discussion-multi-content flexflex flex1">
|
||||
<textarea class="discussion-multi-textarea flex1" type="text" maxlength="500" :value="commentContent"
|
||||
:placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'" @input="inputCommentContent($event)"></textarea>
|
||||
<textarea class="discussion-multi-textarea flex1" v-focus 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>
|
||||
@ -64,7 +63,6 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 提交回复
|
||||
postComment() {
|
||||
this.$parent.postComment()
|
||||
@ -74,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;
|
||||
|
@ -53,7 +53,6 @@ export default {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #7F7F7F;
|
||||
}
|
||||
|
||||
.path-slash {
|
||||
@ -98,4 +97,6 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
@ -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
|
||||
|
15
src/main.js
@ -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,11 +48,21 @@ 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,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 }
|
@ -11,10 +11,12 @@ axios.defaults.withCredentials = true
|
||||
axios.defaults.emulateJSON = true
|
||||
|
||||
baseURL = {
|
||||
forum: "https://forum.gter.net",
|
||||
// forum: "https://forum.gter.net",
|
||||
forum: "https://app.gter.net/forum",
|
||||
offer: "https://offer.gter.net",
|
||||
tenement: "https://app.gter.net",
|
||||
|
||||
|
||||
}
|
||||
|
||||
const service = axios.create({
|
||||
@ -26,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 => {
|
||||
|
@ -18,7 +18,6 @@
|
||||
{{ info.subject }}
|
||||
</div>
|
||||
|
||||
|
||||
<!-- -->
|
||||
<div class="card flexcenter">
|
||||
<div class="card-item shadow" v-if="postList.page == 1">
|
||||
@ -146,7 +145,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="handleIsmyself(item)">
|
||||
<div class="edit-box flexcenter" v-if="item.ismyself == 1" @click.stop="openEditPop(item)">
|
||||
<img class="edit-icom" src="@/assets/img/detail/edit.png" />
|
||||
</div>
|
||||
<!-- <div class="card-head-fool">{{ index == 0 ? '楼主' : `${index}楼` }}</div> -->
|
||||
@ -169,8 +168,7 @@
|
||||
<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">
|
||||
@ -312,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>
|
||||
@ -321,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>
|
||||
|
||||
@ -337,6 +334,7 @@ export default {
|
||||
// avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle",
|
||||
// content: "评论回复",
|
||||
// },
|
||||
editCommentPid: null,
|
||||
popState: "", // discussionSingle discussionMulti
|
||||
coinConfig: {
|
||||
strategy: {
|
||||
@ -464,6 +462,8 @@ export default {
|
||||
commentContent: "", // 评论的文本
|
||||
operateState: false, // 操作请求的状态
|
||||
|
||||
mybalance: 0, // 一共有多个寄托币
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@ -487,24 +487,57 @@ 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"] = []
|
||||
|
||||
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>`
|
||||
// }
|
||||
|
||||
// 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'] : "" : ""
|
||||
|
||||
@ -520,18 +553,34 @@ 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() : ''
|
||||
// info['ispost'] != 0 ? this.getPostList() : ''
|
||||
this.getPostList()
|
||||
|
||||
}).finally(() => {
|
||||
this.$closeUnderLoading(this)
|
||||
@ -624,11 +673,7 @@ 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 => {
|
||||
// console.log(res);
|
||||
@ -654,25 +699,51 @@ 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) {
|
||||
this.$http.post("/api/operation/reply", {
|
||||
let url = ""
|
||||
|
||||
if (this.editCommentPid) url = "/api/operation/redactPost" // 回复评论或者评论
|
||||
else url = "/api/operation/reply" // 编辑评论
|
||||
|
||||
this.$http.post(url, {
|
||||
token: this.token,
|
||||
message: this.commentContent
|
||||
message: this.commentContent,
|
||||
pid: this.editCommentPid || (this.twoCommentData && this.twoCommentData.pid)
|
||||
}).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)
|
||||
@ -714,7 +785,6 @@ 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
|
||||
@ -763,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;
|
||||
@ -903,7 +969,6 @@ export default {
|
||||
|
||||
.edit-icom {
|
||||
width: .4rem;
|
||||
// height: .4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -921,44 +986,54 @@ export default {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
.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-wenzi {
|
||||
line-height: .52rem;
|
||||
}
|
||||
padding: .1333rem .1333rem .1333rem 1rem;
|
||||
|
||||
.quotation-icon {
|
||||
width: .32rem;
|
||||
height: .26rem;
|
||||
}
|
||||
// padding: .36rem .24rem;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: .48rem;
|
||||
|
||||
.quotation-right {
|
||||
flex-direction: column;
|
||||
margin-left: .28rem;
|
||||
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-bottom {
|
||||
color: #7F7F7F;
|
||||
font-size: .28rem;
|
||||
margin-top: .258rem;
|
||||
.quotation-wenzi {
|
||||
line-height: .52rem;
|
||||
}
|
||||
|
||||
.quotation-icon {
|
||||
margin-left: .2rem;
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.content-unlock {
|
||||
&.content-unlock-no {
|
||||
height: 3.2rem;
|
||||
@ -1000,6 +1075,8 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1282,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;
|
||||
|
@ -100,7 +100,6 @@ export default {
|
||||
methods: {
|
||||
// 处理 query 的参数
|
||||
handQuery() {
|
||||
console.log(this.list);
|
||||
if (this.list.length >= 2) {
|
||||
let list = this.list
|
||||
list.forEach((el, index) => {
|
||||
@ -119,10 +118,6 @@ export default {
|
||||
|
||||
})
|
||||
|
||||
console.log(this.allActive, "allActive");
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.handQuery()
|
||||
@ -196,8 +191,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="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("/")
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|