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
cf703984
Commit
cf703984
authored
Dec 21, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增了活动详情页面和报名页面
parent
7e14accf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
40 deletions
+58
-40
index.js
api/activity/index.js
+9
-1
pages.json
pages.json
+11
-0
activity.vue
pages/tab/activity.vue
+7
-1
activityDetail.vue
pagesActivity/components/activityDetail.vue
+31
-38
date.png
static/images/activity/date.png
+0
-0
unitPrice.png
static/images/activity/unitPrice.png
+0
-0
No files found.
api/activity/index.js
View file @
cf703984
import
{
request
}
from
'../../util/api'
//
公告
列表
//
活动
列表
export
function
activityList
(
query
)
{
return
request
({
url
:
'/app/cmsActivity/queryCmsActivityByPagination'
,
...
...
@@ -8,3 +8,11 @@ export function activityList(query) {
method
:
'GET'
,
})
}
//活动详情
export
function
activityDetail
(
id
)
{
return
request
({
url
:
'/app/cmsActivity/detail/'
+
id
,
method
:
'GET'
,
})
}
pages.json
View file @
cf703984
...
...
@@ -58,6 +58,17 @@
}
],
"subPackages"
:
[
{
"root"
:
"pagesActivity"
,
"pages"
:
[
{
"path"
:
"components/activityDetail"
,
"style"
:
{
"navigationBarTitleText"
:
"活动详情"
}
}
]
},
{
"root"
:
"pagesNotice"
,
"pages"
:
[
...
...
pages/tab/activity.vue
View file @
cf703984
...
...
@@ -9,7 +9,7 @@
</view>
</view>
<!-- 活动列表-->
<view
class=
"card"
v-for=
"(item,index) in activityList"
:key=
"index"
@
click=
"goto
detail
(item)"
>
<view
class=
"card"
v-for=
"(item,index) in activityList"
:key=
"index"
@
click=
"goto
page
(item)"
>
<view
class=
"contentBody"
>
<view
class=
"leftlist"
>
<image
src=
"/static/images/home/gonggao.png"
class=
"leftlistimage"
/>
...
...
@@ -175,6 +175,12 @@ export default {
console
.
log
(
e
)
})
},
// 页面跳转
gotopage
(
item
)
{
uni
.
navigateTo
({
url
:
'/pagesActivity/components/activityDetail?id='
+
item
.
businessId
})
},
},
};
</
script
>
...
...
pagesActivity/component
/activityd
etail.vue
→
pagesActivity/component
s/activityD
etail.vue
View file @
cf703984
<
template
>
<view
class=
"activity-detail"
>
<view
:class=
"show ? 'popupShow' : ''"
>
<view
class=
"act-title"
>
{{
activityDetail
.
nam
e
}}
</view>
<view
class=
"act-title"
>
{{
activityDetail
.
titl
e
}}
</view>
<view
class=
"act-body"
>
<!--
<view
class=
"act-from"
>
来源:龙韵文创园区
</view>
-->
<view
class=
"act-time"
>
{{
activityDetail
.
activityBeginDate
}}
</view>
<view
class=
"act-time"
>
{{
activityDetail
.
createDate
}}
</view>
</view>
<view>
<view
class=
"act-detail"
v-html=
"activityDetail.
activityD
etails"
>
<view
class=
"act-detail"
v-html=
"activityDetail.
d
etails"
>
</view>
</view>
<view
class=
"act-bottom"
v-if=
"type!=='1'"
>
...
...
@@ -20,18 +19,18 @@
<view
class=
"popup-title"
>
报名
</view>
<view
class=
"pop-body"
>
<view>
<image
class=
"popbody-image"
:src=
"baseURL+businessActivityDetail.imgUrl
"
/>
<image
class=
"popbody-image"
src=
"../../static/images/home/gonggao.png
"
/>
</view>
<view>
<view
class=
"popbod-title"
>
{{
businessActivityDetail
.
nam
e
}}
</view>
<view
class=
"popbod-title"
>
{{
activityDetail
.
titl
e
}}
</view>
<view
class=
"pop-time"
>
<image
class=
"poptime-img"
:src=
"baseURL+'static/images/日期.png'
"
/>
<view
class=
"poptime-text"
>
{{
businessActivityDetail
.
activityBegin
Date
}}
</view>
<image
class=
"poptime-img"
src=
"../../static/images/activity/date.png
"
/>
<view
class=
"poptime-text"
>
{{
activityDetail
.
create
Date
}}
</view>
</view>
<view
class=
"pop-price"
>
<image
class=
"popprice-img"
:src=
"baseURL+'static/images/单价.png'
"
/>
<image
class=
"popprice-img"
src=
"../../static/images/activity/unitPrice.png
"
/>
<view
class=
"popprice-text"
>
单价:
<text>
¥
{{
businessActivityDetail
.
pric
e
}}
次/人
</text></view>
<view
class=
"popprice-text"
>
单价:
<text>
¥
{{
activityDetail
.
registrationFe
e
}}
次/人
</text></view>
</view>
</view>
</view>
...
...
@@ -115,28 +114,16 @@
</
template
>
<
script
>
import
{
activitydetail
}
from
"../../api/activity/index.js"
import
{
queryDetailById
,
busActivityList
,
couponList
,
receivedcoupon
,
claimcoupons
,
memberdiscount
,
addorder
,
pay
,
updateorderstatus
}
from
'../../api/business/index.js'
import
{
activityDetail
}
from
"../../api/activity/index.js"
export
default
{
data
()
{
return
{
baseURL
:
'http://localhost:8088/idea/file/'
,
show
:
false
,
show
:
false
,
//报名弹窗
show1
:
false
,
// 是否显示优惠券弹窗
show2
:
false
,
// 是否显示可用优惠券弹窗
show3
:
false
,
id
:
''
,
activityDetail
:
''
,
show3
:
false
,
//是否使用折扣券弹出框
activityDetail
:
{},
//活动详情
type
:
''
,
businessActivityDetail
:
{},
//活动详情
couponList
:
[],
//优惠券列表
...
...
@@ -156,23 +143,17 @@
}
},
onLoad
(
options
)
{
this
.
id
=
JSON
.
parse
(
options
.
id
)
if
(
options
!=
null
)
{
this
.
id
=
JSON
.
parse
(
decodeURIComponent
(
options
.
id
))
console
.
log
(
"传参的id"
,
this
.
id
)
this
.
type
=
decodeURIComponent
(
options
.
type
)
console
.
log
(
"传参的type"
,
this
.
type
)
}
this
.
activityId
=
JSON
.
parse
(
options
.
id
)
this
.
getActivityDetail
()
},
methods
:
{
// 获取活动详情
getActivityDetail
(){
activitydetail
(
this
.
i
d
).
then
(
res
=>
{
activityDetail
(
this
.
activityI
d
).
then
(
res
=>
{
console
.
log
(
"活动详情"
,
res
)
this
.
activityDetail
=
res
.
data
this
.
activityDetail
=
res
.
data
.
data
// 处理图片样式问题
this
.
activityDetail
.
activityDetails
=
res
.
data
.
activityD
etails
.
replace
(
/\<img/gi
,
this
.
activityDetail
.
details
=
res
.
data
.
d
etails
.
replace
(
/\<img/gi
,
'<img style="max-width:100%;height:auto;border-radius: 12px 12px 12px 12px;" '
)
})
},
...
...
@@ -421,6 +402,12 @@
color
:
#222222
;
padding-bottom
:
42rpx
;
border-bottom
:
1px
solid
#ECECEC
;
/* 超出3行省略 */
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
3
;
/* 控制行数 */
}
.act-body
{
...
...
@@ -461,7 +448,7 @@
position
:
fixed
;
bottom
:
0
;
margin
:
0
-34rpx
;
box-sizing
:
border-box
;
.act-button
{
width
:
100%
;
height
:
44px
;
...
...
@@ -505,7 +492,13 @@
font-weight
:
500
;
color
:
#222222
;
margin-bottom
:
26rpx
;
height
:
76rpx
;
height
:
80rpx
;
/* 超出2行省略 */
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
/* 控制行数 */
}
.pop-time
{
display
:
flex
;
...
...
static/images/activity/date.png
0 → 100644
View file @
cf703984
3.76 KB
static/images/activity/unitPrice.png
0 → 100644
View file @
cf703984
3.96 KB
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