Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DiscuzWeb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Discuz
DiscuzWeb
Commits
9a3bfd85
Commit
9a3bfd85
authored
Jan 23, 2021
by
xiongyuwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
d17eed53
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
64 deletions
+127
-64
Header.vue
components/Header.vue
+1
-0
TopicItem.vue
components/TopicItem.vue
+0
-0
NoticeItem.vue
components/my/NoticeItem.vue
+124
-62
config.js
config.js
+2
-2
notice.vue
pages/my/notice.vue
+0
-0
No files found.
components/Header.vue
View file @
9a3bfd85
...
...
@@ -171,6 +171,7 @@ export default {
// 更加微信用户id获取对应得用户信息并返回
axios
.
get
(
`http://discuz.bailuntec.com/api/login?useid=
${
wxUserid
}
`
)
//.get(`http://discuz.bailuntec.com/api/login?useid=chenzekai`)
.
then
(
res
=>
{
if
(
res
.
data
.
data
.
relationships
.
users
.
data
.
id
)
{
localStorage
.
setItem
(
...
...
components/TopicItem.vue
View file @
9a3bfd85
components/my/NoticeItem.vue
View file @
9a3bfd85
<
template
>
<div
class=
"notice-item"
>
<div
class=
"avatar"
>
<div
v-if=
"item.type === 'system'"
class=
"system-avatar"
>
<svg-icon
type=
"system-notice"
class=
"icon"
/>
<div
v-if=
"item.type === 'system'"
class=
"system-avatar"
>
<svg-icon
type=
"system-notice"
class=
"icon"
/>
</div>
<avatar
v-else
:user=
"
{ id: item.user_id,username: item.user_name, avatarUrl: item.user_avatar}"
:user=
"
{
id: item.user_id,
username: item.user_name,
avatarUrl: item.user_avatar,
}"
:size="50"
/>
</div>
...
...
@@ -28,37 +26,51 @@
<span
class=
"text"
>
<template
v-if=
"item.type === 'questioned'"
>
<template
v-if=
"item.is_answer === 0"
>
{{
$t
(
'notice.questions'
)
}}
{{
$t
(
"notice.questions"
)
}}
</
template
>
<
template
v-if=
"item.is_answer === 1"
>
{{
$t
(
'notice.answersMe'
)
}}
{{
$t
(
"notice.answersMe"
)
}}
</
template
>
</template>
<
template
v-else-if=
"item.type === 'rewarded'"
>
<template
v-if=
"item.isScale"
>
{{
item
.
order_type
===
1
?
typeMap
[
'registerScale'
]
:
item
.
order_type
===
2
?
typeMap
[
'rewardScale'
]
:
item
.
order_type
===
3
?
typeMap
[
'payScale'
]
:
typeMap
[
item
.
type
]
}}
{{
item
.
order_type
===
1
?
typeMap
[
"registerScale"
]
:
item
.
order_type
===
2
?
typeMap
[
"rewardScale"
]
:
item
.
order_type
===
3
?
typeMap
[
"payScale"
]
:
typeMap
[
item
.
type
]
}}
</
template
>
<
template
v-else-if=
"item.order_type === 3"
>
{{
typeMap
[
'payMe'
]
}}
</
template
>
<
template
v-else-if=
"item.order_type === 5"
>
{{
typeMap
[
'questions'
]
}}
</
template
>
<
template
v-else-if=
"item.order_type === 6"
>
{{
typeMap
[
'watchedMe'
]
}}
</
template
>
<
template
v-else-if=
"item.order_type === 3"
>
{{
typeMap
[
"payMe"
]
}}
</
template
>
<
template
v-else-if=
"item.order_type === 5"
>
{{
typeMap
[
"questions"
]
}}
</
template
>
<
template
v-else-if=
"item.order_type === 6"
>
{{
typeMap
[
"watchedMe"
]
}}
</
template
>
<
template
v-else
>
{{
typeMap
[
item
.
type
]
}}
</
template
>
</template>
<
template
v-else
>
{{
typeMap
[
item
.
type
]
}}
</
template
>
</span>
</template>
<div
v-if=
"item.title && item.type === 'system'"
class=
"user-name"
>
{{ item.title }}
</div>
<div
class=
"time"
>
{{ timerDiff(item.created_at) + $t('topic.before') }}
</div>
<div
v-if=
"item.title && item.type === 'system'"
class=
"user-name"
>
{{ item.title }}
</div>
<div
class=
"time"
>
{{ timerDiff(item.created_at) + $t("topic.before") }}
</div>
</div>
<nuxt-link
v-if=
"item.post_content"
:to=
"`/thread/comment?threadId=${item.thread_id}&commentId=${item.reply_post_id !== 0
? item.reply_post_id : item.post_id}`"
:to=
"`/thread/comment?threadId=${item.thread_id}&commentId=${
item.reply_post_id !== 0 ? item.reply_post_id : item.post_id
}`"
class=
"post-content"
v-html=
"$xss(item.post_content)"
/>
...
...
@@ -68,8 +80,38 @@
class=
"post-content"
v-html=
"$xss(item.answer_content)"
/>
<div
class=
"thread"
>
<div
class=
"thread-user-name"
>
{{ item.thread_username }}:
</div>
<div
class=
"thread-title"
>
<div
v-if=
"item.thread_title"
v-html=
"$xss(item.thread_title)"
/>
<div
v-else-if=
"item.content"
v-html=
"$xss(item.content)"
/>
</div>
<div
class=
"to-detail"
@
click=
"onClickContent(item)"
>
{{ $t("notice.toDetail") }}
</div>
</div>
<!-- <nuxt-link
v-if="item.fileid!=null"
:to="`/knowledge/knowledgeDetail?id=${item.fileid}&useid=${item.qywxUserid}`"
class="thread"
target="_blank"
>
<div class="thread-user-name">{{ item.thread_username }}:</div>
<div class="thread-title">
<div
v-if="item.thread_title"
v-html="$xss(item.thread_title)"
/>
<div
v-else-if="item.content"
v-html="$xss(item.content)"
/>
</div>
<div class="to-detail">{{ $t('notice.toDetail') }}</div>
</nuxt-link>
<nuxt-link
v-if=
"(item.thread_title || item.content) && item.type !== 'system'"
v-if="(item.thread_title || item.content) && item.type !== 'system'
&&item.fileid==null
"
:to="`/thread/${item.thread_id}`"
class="thread"
target="_blank"
...
...
@@ -86,69 +128,88 @@
/>
</div>
<div class="to-detail">{{ $t('notice.toDetail') }}</div>
</nuxt-link>
</nuxt-link>
-->
<div
v-if=
"item.type === 'system'"
class=
"post-content"
v-html=
"$xss(item.content)"
/>
<div
v-if=
"item.type === 'withdrawal'"
class=
"thread"
>
<
template
v-if=
"item.cash_status === 2"
>
{{
$t
(
'notice.approved'
)
}}
</
template
>
<
template
v-if=
"item.cash_status === 3"
>
{{
$t
(
'notice.unapproved'
)
}}
</
template
>
<div
v-if=
"item.type === 'withdrawal'"
class=
"thread"
>
<
template
v-if=
"item.cash_status === 2"
>
{{
$t
(
"notice.approved"
)
}}
</
template
>
<
template
v-if=
"item.cash_status === 3"
>
{{
$t
(
"notice.unapproved"
)
}}
</
template
>
</div>
<div
v-if=
"item.type === 'withdrawal' && item.cash_actual_amount"
class=
"amount green"
>
- {{ $t(
'post.yuanItem'
) + item.cash_actual_amount }}
- {{ $t(
"post.yuanItem"
) + item.cash_actual_amount }}
</div>
<div
v-if=
"item.type === 'rewarded' && item.amount"
class=
"amount"
>
+ {{ $t('post.yuanItem') + item.amount }}
<div
v-if=
"item.type === 'rewarded' && item.amount"
class=
"amount"
>
+ {{ $t("post.yuanItem") + item.amount }}
</div>
</div>
</div>
</template>
<
script
>
import
handleError
from
'@/mixin/handleError'
;
import
timerDiff
from
'@/mixin/timerDiff'
;
import
handleError
from
"@/mixin/handleError"
;
import
timerDiff
from
"@/mixin/timerDiff"
;
import
axios
from
"@/plugins/axios.js"
;
import
config
from
"@/config.js"
;
export
default
{
name
:
'NoticeItem'
,
name
:
"NoticeItem"
,
mixins
:
[
timerDiff
,
handleError
],
props
:
{
item
:
{
type
:
Object
,
default
:
()
=>
{
}
}
default
:
()
=>
{
},
}
,
},
data
()
{
return
{
typeMap
:
{
related
:
this
.
$t
(
'notice.relatedMe'
),
replied
:
this
.
$t
(
'notice.repliedMe'
),
liked
:
this
.
$t
(
'notice.likedMe'
),
rewarded
:
this
.
$t
(
'notice.rewardedMe'
),
payMe
:
this
.
$t
(
'notice.payMe'
),
registerScale
:
this
.
$t
(
'notice.registerScale'
),
rewardScale
:
this
.
$t
(
'notice.rewardScale'
),
payScale
:
this
.
$t
(
'notice.payScale'
),
system
:
this
.
$t
(
'notice.system'
),
questions
:
this
.
$t
(
'notice.questions'
),
watchedMe
:
this
.
$t
(
'notice.watchedMe'
),
payedMe
:
this
.
$t
(
'notice.payedMe'
),
answersMe
:
this
.
$t
(
'notice.answersMe'
),
questioned
:
this
.
$t
(
'notice.questions'
)
}
related
:
this
.
$t
(
"notice.relatedMe"
),
replied
:
this
.
$t
(
"notice.repliedMe"
),
liked
:
this
.
$t
(
"notice.likedMe"
),
rewarded
:
this
.
$t
(
"notice.rewardedMe"
),
payMe
:
this
.
$t
(
"notice.payMe"
),
registerScale
:
this
.
$t
(
"notice.registerScale"
),
rewardScale
:
this
.
$t
(
"notice.rewardScale"
),
payScale
:
this
.
$t
(
"notice.payScale"
),
system
:
this
.
$t
(
"notice.system"
),
questions
:
this
.
$t
(
"notice.questions"
),
watchedMe
:
this
.
$t
(
"notice.watchedMe"
),
payedMe
:
this
.
$t
(
"notice.payedMe"
),
answersMe
:
this
.
$t
(
"notice.answersMe"
),
questioned
:
this
.
$t
(
"notice.questions"
),
}
,
};
},
methods
:
{
onClickContent
(
item
)
{
let
fileid
=
null
;
axios
.
get
(
`
${
config
.
WEI_PAN_URL
}
/weipan/GetWeiPanFileByThreadId?threadId=
${
item
.
thread_id
}
`
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
statusCode
==
200
)
{
fileid
=
res
.
data
.
result
.
fileId
;
}
if
(
!!
fileid
)
{
window
.
open
(
`/knowledge/knowledgeDetail?id=
${
fileid
}
&useid=
${
item
.
qywxUserid
}
`
,
"_blank"
);
}
else
{
window
.
open
(
`/thread/
${
item
.
thread_id
}
`
,
"_blank"
);
}
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -246,6 +307,7 @@ export default {
}
.to-detail
{
color
:
$
color-blue-base
;
cursor
:
pointer
;
}
}
.amount
{
...
...
@@ -254,8 +316,8 @@ export default {
font-weight
:
bold
;
color
:
#fa5151
;
}
.green
{
color
:
#09
BB
07
;
.green
{
color
:
#09
bb
07
;
}
}
}
...
...
config.js
View file @
9a3bfd85
...
...
@@ -5,6 +5,6 @@ export default {
DEV_API_URL
:
'http://discuz.bailuntec.com'
,
// ssr api url
SSR_API_URL
:
'http://discuz.bailuntec.com'
,
//
WEI_PAN_URL: 'http://localhost:5008'
WEI_PAN_URL
:
'http://pps.bailuntec.com/DiscuzApi'
WEI_PAN_URL
:
'http://localhost:5008'
//
WEI_PAN_URL: 'http://pps.bailuntec.com/DiscuzApi'
};
pages/my/notice.vue
View file @
9a3bfd85
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment