Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
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
李伟
cust-app
Commits
3a502861
Commit
3a502861
authored
Mar 06, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改动态删除
parent
860abf0d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
134 additions
and
47 deletions
+134
-47
index.js
api/activity/index.js
+9
-0
index.js
api/article/index.js
+9
-0
Item.vue
pages/components/article/Item.vue
+21
-11
List.vue
pages/components/article/List.vue
+7
-1
my.vue
pages/tab/my.vue
+43
-0
Item.vue
pagesUser/component/Item.vue
+38
-34
userArticleList.vue
pagesUser/userArticleList.vue
+7
-1
No files found.
api/activity/index.js
View file @
3a502861
...
...
@@ -9,6 +9,15 @@ export function activityList(data) {
})
}
// 活动列表
export
function
userActivityList
(
data
)
{
return
request
({
url
:
'/app/cmsApplication/queryCmsApplicationByPagination'
,
data
:
data
,
method
:
'GET'
,
})
}
//活动详情
export
function
activityDetail
(
id
)
{
return
request
({
...
...
api/article/index.js
View file @
3a502861
...
...
@@ -70,3 +70,12 @@ export function comment(data) {
method
:
'POST'
,
})
}
//删除动态
export
function
delArticle
(
id
)
{
return
request
({
url
:
'/app/delete/'
+
id
,
method
:
'delete'
,
headers
:
{}
})
}
\ No newline at end of file
pages/components/article/Item.vue
View file @
3a502861
...
...
@@ -85,16 +85,16 @@
</view>
</view>
<view
class=
"right"
>
<view
v-if=
"info.userId == userInfo.businessId"
class=
"right"
>
<!-- 右上角的三个点-->
<view
v-if=
"info.isDelete"
@
click=
"showSelect(info)"
>
<view
@
click=
"showSelect(info)"
>
<text></text>
<text></text>
<text></text>
</view>
</view>
<!-- 右上角三个点的选项-->
<u-action-sheet
:actions=
"list"
:closeOnClickOverlay=
"true"
:safeAreaInsetBottom=
"
tru
e"
cancelText=
"取消"
<u-action-sheet
:actions=
"list"
:closeOnClickOverlay=
"true"
:safeAreaInsetBottom=
"
fals
e"
cancelText=
"取消"
@
select=
"selectClick"
@
close=
"show = false"
:show=
"show"
></u-action-sheet>
</view>
</template>
...
...
@@ -103,6 +103,7 @@
import
imageAdaptation
from
'@/components/images-adaptation/imageAdaptation.vue'
import
xzjReadMore
from
"@/components/xzj-readMore/xzj-readMore.vue"
import
{
isStopAccount
,
userDetail
}
from
"../../../api/user"
;
import
{
delArticle
}
from
"../../../api/article"
;
export
default
{
name
:
'ArticleItem'
,
options
:
{
...
...
@@ -137,6 +138,8 @@
imgLayout2
:
[
220
,
220
],
imgLayout3
:
[
160
,
160
],
show
:
false
,
userInfo
:
uni
.
getStorageSync
(
'userInfo'
),
selectId
:
''
,
//右上角三个点的操作项
list
:
[{
name
:
'删除'
,
...
...
@@ -199,7 +202,20 @@
},
// 删除
selectClick
(
item
)
{
delArticle
(
this
.
selectId
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
})
this
.
$emit
(
'refresh'
)
}
else
if
(
res
.
data
.
code
==
1001
||
res
.
data
.
code
==
1002
){
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
})
}
})
},
//
preview
({
...
...
@@ -255,14 +271,8 @@
this
.
$emit
(
"close"
)
},
showSelect
(
info
)
{
if
(
info
.
isDelete
!=
true
)
{
const
index
=
this
.
list
.
findIndex
(
i
=>
i
.
name
===
'删除'
);
if
(
index
!==
-
1
)
{
this
.
list
.
splice
(
index
,
1
);
}
}
this
.
show
=
true
;
this
.
selectId
=
info
.
businessId
}
}
}
...
...
pages/components/article/List.vue
View file @
3a502861
...
...
@@ -15,7 +15,7 @@
</u-tabs>
</view>
<view
v-for=
"(item,index) in dataList"
:key=
"item.id"
>
<ItemVue
:info=
"item"
@
praise=
"praise"
/>
<ItemVue
:info=
"item"
@
praise=
"praise"
@
refresh=
"refresh"
/>
</view>
<empty
v-if=
"firstLoaded && !dataList.length"
/>
</z-paging>
...
...
@@ -143,6 +143,12 @@
this
.
topicId
=
id
this
.
$emit
(
'topicId'
,
this
.
topicId
)
this
.
reload
()
},
refresh
(){
this
.
$nextTick
(()
=>
{
// 刷新列表数据
this
.
$refs
.
paging
&&
this
.
$refs
.
paging
.
reload
();
})
},
//查询话题列表
getTopicList
(){
...
...
pages/tab/my.vue
View file @
3a502861
...
...
@@ -149,6 +149,28 @@
</view>
</view>
<!-- 活动 -->
<view
class=
"content-2"
v-if=
"(activityInfo !== null && activityInfo !== undefined) && (activityInfo.title !== null && activityInfo.title !== undefined)"
>
<view
class=
"my-article"
>
<view
class=
"my-article-title"
>
<image
class=
"title-image"
:src=
"baseUrl+'/user/106.svg'"
mode=
"aspectFill"
/>
<view
class=
"title-text"
>
我的活动
</view>
</view>
<view
class=
"my-article-more"
@
click=
"gotomore"
>
查看更多
<u-icon
name=
"arrow-right"
size=
"13"
bold=
"true"
></u-icon>
</view>
</view>
<view
class=
"my-article-content"
v-if=
"activityInfo.title !== null"
>
{{
activityInfo
.
title
}}
</view>
<view
class=
"my-article-image-1"
>
<image
:src=
"activityInfo.pictureUrl"
mode=
"aspectFill"
></image>
</view>
</view>
<!-- 操作项 第三部分-->
<view
class=
"content-3"
>
<view
class=
"box-bottom"
v-for=
"(item,index) in button"
:key=
"index"
@
click=
"whether(index)"
>
...
...
@@ -209,6 +231,7 @@
import
{
login
,
phoneLogin
,
setUserProfile
}
from
'../../api/login/index'
import
{
getUserInfo
,
noReadMessageAllCount
,
userDetail
}
from
"../../api/user"
;
import
{
articleList
,
getOssUrl
,
userArticleList
}
from
"../../api/article"
;
import
{
activityList
,
userActivityList
}
from
"../../api/activity"
;
export
default
{
data
()
{
return
{
...
...
@@ -227,6 +250,7 @@ import {articleList, getOssUrl, userArticleList} from "../../api/article";
userInfo
:{},
//用户信息
token
:
''
,
//token
articleInfo
:{},
activityInfo
:{},
noReadMessageAllCount
:
''
,
info
:{},
button
:
[
...
...
@@ -510,6 +534,7 @@ import {articleList, getOssUrl, userArticleList} from "../../api/article";
this
.
authorizeShow
=
true
}
this
.
getArticleList
()
this
.
getActivityList
()
this
.
getnoReadMessageAllCount
()
})
},
...
...
@@ -539,6 +564,24 @@ import {articleList, getOssUrl, userArticleList} from "../../api/article";
}
})
},
getActivityList
(){
const
query
=
{
page
:
1
,
rows
:
1
,
publishStatus
:
'1'
}
userActivityList
(
query
).
then
(
res
=>
{
this
.
activityInfo
=
res
.
data
.
data
[
0
]
getOssUrl
(
this
.
activityInfo
.
pictureId
).
then
(
imgRes
=>
{
if
(
imgRes
.
data
.
data
!=
null
)
{
imgRes
.
data
.
data
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
this
.
activityInfo
.
pictureUrl
=
imgRes
.
data
.
data
}
})
}).
catch
(
e
=>
{
console
.
log
(
e
)
})
},
//查看更多动态
gotomore
(){
uni
.
navigateTo
({
...
...
pagesUser/component/Item.vue
View file @
3a502861
...
...
@@ -85,22 +85,22 @@
</view>
</view>
<view
class=
"right"
v-if=
"userInfoId == userId"
>
<view
class=
"right"
style=
"margin-top: 40rpx;"
v-if=
"userInfoId == userId"
>
<u-tag
v-if=
"info.examStatus === '0'"
plain
plainFill
text=
"审核中"
type=
"info"
/>
<u-tag
v-if=
"info.examStatus === '1'"
plain
plainFill
text=
"审核通过"
type=
"success"
/>
<u-tag
@
click=
"showRemarks(info)"
v-if=
"info.examStatus === '2' || info.examStatus === '3'"
plain
plainFill
text=
"未通过"
type=
"error"
/>
</view>
<!-- <view class="right">--
>
<!-- 右上角的三个点-->
<!-- <view v-if="info.isDelete" @click="showSelect(info)">--
>
<!-- <text></text>--
>
<!-- <text></text>--
>
<!-- <text></text>--
>
<!-- </view>--
>
<!-- </view>--
>
<!-- 右上角三个点的选项-->
<!-- <u-action-sheet :actions="list" :closeOnClickOverlay="true" :safeAreaInsetBottom="true" cancelText="取消"-->
<!-- @select="selectClick" @close="show = false" :show="show"></u-action-sheet>--
>
<view
class=
"right"
>
<!-- 右上角的三个点-->
<view
@
click=
"showSelect(info)"
>
<text></text
>
<text></text
>
<text></text
>
</view
>
</view
>
<!-- 右上角三个点的选项-->
<u-action-sheet
:actions=
"list"
:closeOnClickOverlay=
"true"
:safeAreaInsetBottom=
"false"
cancelText=
"取消"
@
select=
"selectClick"
@
close=
"show = false"
:show=
"show"
></u-action-sheet
>
<!-- 登录弹窗-->
<!-- <login @change="getToLogin" :isLoginPop="isLoginPop" class="my-select"></login>-->
...
...
@@ -112,6 +112,7 @@
import
imageAdaptation
from
'@/components/images-adaptation/imageAdaptation.vue'
import
xzjReadMore
from
"@/components/xzj-readMore/xzj-readMore.vue"
import
ELM
from
'@/components/elm-toast/index.vue'
;
import
{
delArticle
}
from
"../../api/article"
;
export
default
{
name
:
'ArticleItem'
,
options
:
{
...
...
@@ -164,6 +165,7 @@
imgLayout2
:
[
220
,
220
],
imgLayout3
:
[
160
,
160
],
show
:
false
,
selectId
:
''
,
tipMsg
:
''
,
isConfirm
:
false
,
userInfoId
:
uni
.
getStorageSync
(
'userInfo'
).
businessId
,
...
...
@@ -221,8 +223,16 @@
}
},
// 删除
selectClick
(
item
)
{
selectClick
()
{
delArticle
(
this
.
selectId
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
})
this
.
$emit
(
'refresh'
)
}
})
},
//
preview
({
...
...
@@ -278,14 +288,8 @@
this
.
$emit
(
"close"
)
},
showSelect
(
info
)
{
if
(
info
.
isDelete
!=
true
)
{
const
index
=
this
.
list
.
findIndex
(
i
=>
i
.
name
===
'删除'
);
if
(
index
!==
-
1
)
{
this
.
list
.
splice
(
index
,
1
);
}
}
this
.
show
=
true
;
this
.
selectId
=
info
.
businessId
},
showRemarks
(
info
){
const
remarks
=
JSON
.
parse
(
info
.
remarks
)
...
...
@@ -419,19 +423,19 @@
.right
{
position
:
absolute
;
right
:
30rpx
;
//
view {
//
display: flex;
//
height: 30rpx;
// padding-top: 14
rpx;
//
//
text {
//
width: 8rpx;
//
height: 8rpx;
//
background-color: #333;
//
border-radius: 50%;
//
margin-right: 6rpx;
//
}
//
}
view
{
display
:
flex
;
height
:
30rpx
;
padding-top
:
6
rpx
;
text
{
width
:
8rpx
;
height
:
8rpx
;
background-color
:
#333
;
border-radius
:
50%
;
margin-right
:
6rpx
;
}
}
}
}
...
...
pagesUser/userArticleList.vue
View file @
3a502861
...
...
@@ -5,7 +5,7 @@
<z-paging
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
:fixed=
"true"
>
<view
:style=
"
{'margin-top':navHeight+'px'}">
<view
v-for=
"(item,index) in dataList"
:key=
"item.id"
>
<ItemVue
:info=
"item"
@
praise=
"praise"
:userId=
"userId"
/>
<ItemVue
:info=
"item"
@
praise=
"praise"
:userId=
"userId"
@
refresh=
"refresh"
/>
</view>
</view>
</z-paging>
...
...
@@ -99,6 +99,12 @@ export default {
this
.
$refs
.
paging
&&
this
.
$refs
.
paging
.
reload
();
})
},
refresh
(){
this
.
$nextTick
(()
=>
{
// 刷新列表数据
this
.
$refs
.
paging
&&
this
.
$refs
.
paging
.
reload
();
})
},
//分页查询方法
queryList
(
pageNo
,
pageSize
)
{
const
params
=
{
...
...
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