Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
N
newLive
Project
Project
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
孟庆瑞
newLive
Commits
9ec1eace
Commit
9ec1eace
authored
Dec 28, 2022
by
jiaoyahui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加删除接口
parent
8a74d3fb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
9 deletions
+31
-9
api.js
src/axios/api.js
+5
-0
browse.vue
src/views/mine/browse.vue
+26
-9
No files found.
src/axios/api.js
View file @
9ec1eace
...
@@ -108,6 +108,11 @@ live: {
...
@@ -108,6 +108,11 @@ live: {
getconfig
:
function
(
data
){
getconfig
:
function
(
data
){
return
service
.
post
(
'/wx/jssdk/config'
,
data
)
return
service
.
post
(
'/wx/jssdk/config'
,
data
)
},
},
deleteLiveHistory
:
function
(
data
,
historyId
){
console
.
log
(
data
,
'p'
)
return
service
.
get
(
'/app/live/deleteLiveHistory/'
+
historyId
,
data
)
},
...
...
src/views/mine/browse.vue
View file @
9ec1eace
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<img
src=
"../../assets/left.png"
alt=
""
class=
"Lent_p"
@
click=
"go"
>
<img
src=
"../../assets/left.png"
alt=
""
class=
"Lent_p"
@
click=
"go"
>
<div
class=
"brow"
>
我的浏览
</div>
<div
class=
"brow"
>
我的浏览
</div>
<ul
v-if=
"this.flag == 1"
>
<ul>
<div
class=
"time"
>
一天之内
</div>
<div
class=
"time"
>
一天之内
</div>
<!-- data-type=0 隐藏删除按钮 data-type=1 显示删除按钮 -->
<!-- data-type=0 隐藏删除按钮 data-type=1 显示删除按钮 -->
<li
class=
"li_vessel"
v-for=
"(item,index) in lists "
data-type=
"0"
:key=
"index"
>
<li
class=
"li_vessel"
v-for=
"(item,index) in lists "
data-type=
"0"
:key=
"index"
>
<!-- "touchstart" 当手指触摸屏幕时候触发 "touchend" 当手指从屏幕上离开的时候触发 "capture" 用于事件捕获-->
<!-- "touchstart" 当手指触摸屏幕时候触发 "touchend" 当手指从屏幕上离开的时候触发 "capture" 用于事件捕获-->
<div
@
touchstart
.
capture=
"touchStart"
@
touchend
.
capture=
"touchEnd"
@
click=
"oneself"
>
<div
@
touchstart
.
capture=
"touchStart"
@
touchend
.
capture=
"touchEnd"
@
click=
"oneself"
v-if=
"item.flag == 1"
>
<div
class=
"contant"
>
<div
class=
"contant"
>
<img
class=
"image"
:src=
"item.lvrImgSmallUrl"
alt
/>
<img
class=
"image"
:src=
"item.lvrImgSmallUrl"
alt
/>
<div
class=
"rightBox"
>
<div
class=
"rightBox"
>
...
@@ -19,16 +19,16 @@
...
@@ -19,16 +19,16 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"removeBtn"
@
click=
"remove"
:data-index=
"index"
>
删除
</div>
<div
class=
"removeBtn"
@
click=
"remove
(index,item.id)
"
:data-index=
"index"
>
删除
</div>
</li>
</li>
</ul>
</ul>
<!-- 更早 -->
<!-- 更早 -->
<ul
v-if=
"this.flag == 0"
>
<ul>
<div
class=
"timetwo"
>
更早
</div>
<div
class=
"timetwo"
>
更早
</div>
<li
class=
"li_vessel"
v-for=
"(item,index) in lists "
data-type=
"0"
:key=
"index"
>
<li
class=
"li_vessel"
v-for=
"(item,index) in lists "
data-type=
"0"
:key=
"index"
>
<!-- "touchstart" 当手指触摸屏幕时候触发 "touchend" 当手指从屏幕上离开的时候触发 "capture" 用于事件捕获-->
<!-- "touchstart" 当手指触摸屏幕时候触发 "touchend" 当手指从屏幕上离开的时候触发 "capture" 用于事件捕获-->
<div
@
touchstart
.
capture=
"touchStart"
@
touchend
.
capture=
"touchEnd"
@
click=
"oneself"
>
<div
@
touchstart
.
capture=
"touchStart"
@
touchend
.
capture=
"touchEnd"
@
click=
"oneself"
v-if=
"item.flag == 0"
>
<div
class=
"contant"
>
<div
class=
"contant"
>
<img
class=
"image"
:src=
"item.lvrImgSmallUrl"
alt
/>
<img
class=
"image"
:src=
"item.lvrImgSmallUrl"
alt
/>
<div
class=
"rightBox"
>
<div
class=
"rightBox"
>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"removeBtn"
@
click=
"remove"
:data-index=
"index"
>
删除
</div>
<div
class=
"removeBtn"
@
click=
"remove
(index,item.id)
"
:data-index=
"index"
>
删除
</div>
</li>
</li>
</ul>
</ul>
...
@@ -65,6 +65,19 @@ export default {
...
@@ -65,6 +65,19 @@ export default {
this
.
getLiveHistory
()
this
.
getLiveHistory
()
},
},
methods
:
{
methods
:
{
deleteLiveHistory
(
id
){
let
token
=
sessionStorage
.
getItem
(
"token"
)
console
.
log
(
id
,
'有没有id'
)
let
temp
=
this
.
qs
.
stringify
({
token
:
token
,
historyId
:
id
})
this
.
server
.
live
.
deleteLiveHistory
(
temp
,
id
).
then
(
res
=>
{
})
},
go
:
function
(){
go
:
function
(){
this
.
$router
.
push
({
name
:
'mine'
})
this
.
$router
.
push
({
name
:
'mine'
})
...
@@ -87,7 +100,8 @@ export default {
...
@@ -87,7 +100,8 @@ export default {
this
.
lists
=
res
.
data
.
data
.
list
this
.
lists
=
res
.
data
.
data
.
list
this
.
listtwo
=
res
.
data
.
data
.
list
this
.
listtwo
=
res
.
data
.
data
.
list
this
.
updateTime
=
res
.
data
.
data
.
list
.
updateTime
this
.
updateTime
=
res
.
data
.
data
.
list
.
updateTime
this
.
flag
=
res
.
data
.
data
.
list
[
0
].
flag
this
.
flag
=
res
.
data
.
data
.
list
console
.
log
(
this
.
flag
,
'-=----------------'
)
console
.
log
(
this
.
flag
,
'-=----------------'
)
})
})
...
@@ -144,13 +158,16 @@ export default {
...
@@ -144,13 +158,16 @@ export default {
}
}
},
},
//删除数据信息
//删除数据信息
remove
(
e
)
{
remove
(
index
,
id
)
{
// 当前索引值
// 当前索引值
let
index
=
e
.
currentTarget
.
dataset
.
index
;
// let index = e.currentTarget.dataset.index;
// let id = e.currentTarget.dataset.id;
console
.
log
(
id
,
'wwwwww'
)
// 复位
// 复位
this
.
restSlide
();
this
.
restSlide
();
// 删除数组lists中一个数据
// 删除数组lists中一个数据
this
.
lists
.
splice
(
index
,
1
);
this
.
lists
.
splice
(
index
,
1
);
this
.
deleteLiveHistory
(
id
)
},
},
},
},
...
...
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