Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 596529b8
authored
Sep 13, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
案例视频添加接口
1 parent
e21e8dac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
21 deletions
api/module/boutique.js
pages/boutique/case.vue
api/module/boutique.js
View file @
596529b
/*
* @Description:
* @Author: huyue
* @Date: 2024-09-05 14:05:25
* @LastEditors: huyue
* @LastEditTime: 2024-09-13 11:08:55
*/
import
http
from
"../request/http"
;
import
http
from
"../request/http"
;
module
.
exports
=
{
module
.
exports
=
{
...
@@ -65,4 +72,21 @@ module.exports = {
...
@@ -65,4 +72,21 @@ module.exports = {
});
});
},
},
/** 案例视频 */
getCaseList
(
data
)
{
return
http
.
post
({
method
:
"dj.api.smartcarlife.recepiton.material.case.find"
,
projectName
:
"boutique"
,
...
data
})
},
/** 获取类目 */
getCategory
(
data
)
{
return
http
.
post
({
method
:
"dj.api.boutique.recepiton.material.merchant.category"
,
projectName
:
"boutique"
,
...
data
})
}
};
};
pages/boutique/case.vue
View file @
596529b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<view
class=
"box"
>
<view
class=
"box"
>
<view
class=
"select-box"
>
<view
class=
"select-box"
>
<view
class=
"select"
@
click=
"selectType"
>
<view
class=
"select"
@
click=
"selectType"
>
全部
{{
selectIndex
}}
<view
class=
"sprite-icon icon-arrow-bottom"
></view>
<view
class=
"sprite-icon icon-arrow-bottom"
></view>
</view>
</view>
<view
class=
"pop-box"
v-show=
"isSelect"
>
<view
class=
"pop-box"
v-show=
"isSelect"
>
...
@@ -59,16 +59,16 @@
...
@@ -59,16 +59,16 @@
@
click=
"playVideo(item)"
@
click=
"playVideo(item)"
>
>
<image
<image
:src=
"item.
cover
Url"
:src=
"item.
thumbnail
Url"
class=
"cover-box"
class=
"cover-box"
></image>
></image>
<image
<image
v-if=
"item.
sourceType == 2
"
v-if=
"item.
materialFormat == 1
"
src=
"../../assets/images/boutique/play.png"
src=
"../../assets/images/boutique/play.png"
class=
"play-box"
class=
"play-box"
></image>
></image>
</view>
</view>
<view
class=
"item-desc"
>
{{
item
.
tabN
ame
}}
</view>
<view
class=
"item-desc"
>
{{
item
.
n
ame
}}
</view>
</view>
</view>
</
template
>
</
template
>
</template>
</template>
...
@@ -125,29 +125,18 @@ export default {
...
@@ -125,29 +125,18 @@ export default {
return
{
return
{
name
:
''
,
name
:
''
,
list
:
[],
list
:
[],
searchList
:
[],
popupShow
:
false
,
popupShow
:
false
,
isSearch
:
false
,
isSearch
:
false
,
videoSrc
:
''
,
videoSrc
:
''
,
showPreview
:
false
,
showPreview
:
false
,
isSelect
:
false
,
isSelect
:
false
,
selectIndex
:
0
,
selectIndex
:
'全部'
,
selectList
:
[
selectList
:
[
{
{
label
:
'全部'
,
label
:
'全部'
,
value
:
0
value
:
'全部'
},
},
{
label
:
'视频'
,
value
:
1
},
{
label
:
'图片'
,
value
:
2
},
{
label
:
'PDF'
,
value
:
3
}
]
]
}
}
},
},
...
@@ -167,12 +156,16 @@ export default {
...
@@ -167,12 +156,16 @@ export default {
handler
()
{
handler
()
{
this
.
name
=
''
;
this
.
name
=
''
;
this
.
isSearch
=
false
this
.
isSearch
=
false
this
.
list
=
this
.
views
//
this.list = this.views
this
.
showPreview
=
false
this
.
showPreview
=
false
},
},
immediate
:
true
immediate
:
true
}
}
},
},
mounted
()
{
this
.
getCaseList
()
this
.
getCategory
()
},
methods
:
{
methods
:
{
playVideo
(
item
)
{
playVideo
(
item
)
{
const
{
tabName
,
sourceType
,
detailUrl
}
=
item
const
{
tabName
,
sourceType
,
detailUrl
}
=
item
...
@@ -196,11 +189,11 @@ export default {
...
@@ -196,11 +189,11 @@ export default {
handleClear
()
{
handleClear
()
{
this
.
init
()
this
.
init
()
},
},
input
(
e
)
{
input
(
e
)
{
this
.
name
=
e
.
detail
.
value
this
.
name
=
e
.
detail
.
value
if
(
this
.
name
==
''
)
if
(
this
.
name
==
''
)
this
.
isSearch
=
false
this
.
isSearch
=
false
this
.
list
=
this
.
views
.
filter
(
i
=>
i
.
tabN
ame
.
includes
(
this
.
name
))
this
.
list
=
this
.
searchList
.
filter
(
i
=>
i
.
n
ame
.
includes
(
this
.
name
))
},
},
selectType
()
{
selectType
()
{
this
.
isSelect
=
!
this
.
isSelect
this
.
isSelect
=
!
this
.
isSelect
...
@@ -208,6 +201,29 @@ export default {
...
@@ -208,6 +201,29 @@ export default {
chooseType
(
val
)
{
chooseType
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
this
.
selectIndex
=
val
.
value
this
.
selectIndex
=
val
.
value
this
.
isSelect
=
false
this
.
getCaseList
(
this
.
selectIndex
==
'全部'
?
''
:
this
.
selectIndex
)
},
async
getCaseList
(
category
=
''
)
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
{
shopMerchantId
}
=
userInfo
;
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getCaseList
({
merchantId
:
44217687
,
category
})
console
.
log
(
res
)
this
.
list
=
res
.
list
this
.
searchList
=
res
.
list
},
async
getCategory
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
{
shopMerchantId
}
=
userInfo
;
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getCategory
({
merchantId
:
44217687
})
console
.
log
(
res
)
const
_list
=
res
.
map
(
item
=>
{
return
{
label
:
item
,
value
:
item
}
})
this
.
selectList
=
[...
this
.
selectList
,
...
_list
]
}
}
},
},
}
}
...
@@ -345,6 +361,7 @@ export default {
...
@@ -345,6 +361,7 @@ export default {
font-size
:
32
rpx
;
font-size
:
32
rpx
;
color
:
#333333
;
color
:
#333333
;
border-radius
:
48
rpx
;
border-radius
:
48
rpx
;
text-align
:
center
;
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment