Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
b05c8e1a
Commit
b05c8e1a
authored
Sep 15, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0e1a402f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
999 additions
and
546 deletions
+999
-546
activity.js
src/api/activity.js
+23
-0
signUp.vue
src/components/signUp.vue
+88
-164
pages.json
src/pages.json
+2
-0
activityDetails.vue
src/pages/activity/activityDetails.vue
+825
-0
activityList.vue
src/pages/activity/activityList.vue
+36
-56
media.vue
src/pages/activity/media.vue
+0
-0
examPaper.vue
src/pages/exam/examPaper.vue
+21
-17
subject1.vue
src/pages/exam/subject1.vue
+0
-307
index2.vue
src/pages/index/index2.vue
+3
-2
requestMall.js
src/utils/requestMall.js
+1
-0
No files found.
src/api/activity.js
View file @
b05c8e1a
...
...
@@ -23,3 +23,26 @@ export function getActivityList(data) {
data
})
}
/**
* 取消报名
* @param {JSON参数} data
*/
export
function
cancelSignUp
(
data
)
{
return
request
({
url
:
'/AppletEducation/CancelCommerceConsultJXH'
,
method
:
'post'
,
data
})
}
/**
* 获取详情
* @param {JSON参数} data
*/
export
function
getActivityDatail
(
data
)
{
return
request
({
url
:
'/AppletEducation/GetActivityDetialJXH'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/signUp.vue
View file @
b05c8e1a
<
template
>
<view
class=
"mysignupList"
>
<
u
-tabs
:
show-bar=
"false
"
:list=
"list
"
:is-scroll=
"false
"
:current=
"current
"
<
van
-tabs
:
active=
"data.ExamStatus
"
title-inactive-color=
"#444444
"
title-active-color=
"#00ACF9
"
line-height=
"0
"
@
change=
"change"
:active-color=
"mainColor"
></u-tabs>
<u-empty
v-if=
"g.length == 0"
text=
"暂无报名记录"
mode=
"list"
></u-empty>
<view
v-if=
"g.length > 0"
class=
"scroll-box"
:style=
"
{ 'padding-bottom': tabbarH + 'px' }"
>
<van-tab
title=
"全部"
:name=
"0"
></van-tab>
<van-tab
title=
"正常"
:name=
"1"
></van-tab>
<van-tab
title=
"取消"
:name=
"2"
></van-tab>
</van-tabs>
<van-empty
description=
"暂无活动"
v-if=
"g.length === 0"
/>
<view
v-if=
"g.length > 0"
class=
"scroll-box"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
...
...
@@ -146,7 +145,7 @@
class=
"box-Remark-b"
v-if=
"x.Status != 1 && x.IsApplyForCancel != 1"
>
<view
class=
"box-Remark-btn"
@
click
.
native
.
stop=
"cancel(x, i)"
>
<view
class=
"box-Remark-btn"
@
click
.
stop=
"cancel(x, i)"
>
取消
</view>
</view>
...
...
@@ -167,30 +166,12 @@
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#FFF"
/>
</scroll-view>
<view
style=
"margin: 20rpx 0"
>
<Loadmore
:state=
"pageState"
/>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx"
>
加载中...
</Text>
</scroll-view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<u-popup
v-model=
"show"
mode=
"center"
length=
"80%"
>
<van-popup
:show=
"show"
closeable
@
close=
"show = false"
>
<view
style=
"
display: flex;
...
...
@@ -204,7 +185,7 @@
display: flex;
align-items: center;
justify-content: center;
height:
70
px;
height:
140r
px;
"
>
<Text>
是否取消订单?
</Text>
...
...
@@ -213,15 +194,15 @@
style=
"
display: flex;
flex-direction: column;
height:
80
px;
margin-left:
15
px;
height:
160r
px;
margin-left:
30r
px;
width: 100%;
"
>
<Text
style=
"margin-left:
10px; margin-top: 5
px"
>
备注
</Text>
<Text
style=
"margin-left:
20rpx; margin-top: 10r
px"
>
备注
</Text>
<input
class=
"uni-input inputM"
style=
"margin-left:
10px; margin-top: 5
px"
style=
"margin-left:
20rpx; margin-top: 10r
px"
v-model=
"cancelRemark"
placeholder=
"输入备注"
/>
...
...
@@ -231,7 +212,7 @@
display: flex;
flex-direction: row;
align-items: center;
height:
50
px;
height:
100r
px;
border-top: 1px solid #f5f5f5;
width: 100%;
"
...
...
@@ -261,7 +242,7 @@
</view>
</view>
</view>
</
u
-popup>
</
van
-popup>
</view>
</
template
>
...
...
@@ -276,10 +257,11 @@ import {
computed
,
onMounted
,
}
from
"vue"
;
import
auth
from
"@/components/auth/index.vue"
;
import
Loadmore
from
"./loadmore.vue"
;
import
{
getActivityList
,
cancelSignUp
}
from
"../api/activity"
;
export
default
{
components
:
{
auth
,
Loadmore
,
},
setup
()
{
let
data
=
reactive
({
...
...
@@ -288,7 +270,6 @@ export default {
u
:
{},
show
:
false
,
current
:
0
,
list
:
[{
name
:
"全部"
},
{
name
:
"正常"
},
{
name
:
"取消"
}],
mainColor
:
""
,
contentHeight
:
0
,
...
...
@@ -297,161 +278,103 @@ export default {
pageSize
:
10
,
EnrollState
:
3
,
},
page_c
ount
:
1
,
PageC
ount
:
1
,
g
:
[],
loading
:
false
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
pageState
:
"more"
,
bmobj
:
{},
cancelRemark
:
""
,
tabbarH
:
0
,
});
let
methods
=
{
change
(
index
)
{
this
.
current
=
index
;
if
(
index
==
0
)
{
this
.
msg
.
EnrollState
=
3
;
change
(
e
)
{
data
.
current
=
e
.
detail
.
name
;
if
(
e
.
detail
.
name
==
0
)
{
data
.
msg
.
EnrollState
=
3
;
}
else
{
this
.
msg
.
EnrollState
=
index
;
data
.
msg
.
EnrollState
=
e
.
detail
.
name
;
}
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
loading
=
true
;
this
.
init
();
data
.
msg
.
pageIndex
=
1
;
data
.
g
=
[];
that
.
getList
();
},
getfzuj
()
{
this
.
current
=
0
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
init
();
},
init
()
{
this
.
request2
(
{
url
:
"/api/AppletEducation/GetUserJoinActivityPageList"
,
data
:
this
.
msg
,
data
.
current
=
0
;
data
.
msg
.
pageIndex
=
1
;
data
.
g
=
[];
that
.
getList
();
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
loading
=
false
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
async
getList
()
{
let
res
=
await
getActivityList
(
data
.
msg
);
if
(
res
)
{
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
g
=
res
.
data
.
pageData
;
}
else
{
data
.
g
=
data
.
g
.
concat
(
res
.
data
.
pageData
)
;
}
data
.
PageCount
=
res
.
data
.
pageCount
;
if
(
data
.
PageCount
==
1
)
{
data
.
pageState
=
"none"
;
}
},
(
error
)
=>
{
this
.
loading
=
false
;
}
);
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_c
ount
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
th
is
.
ini
t
();
if
(
data
.
msg
.
pageIndex
<
data
.
PageC
ount
)
{
data
.
pageState
=
"loading"
;
data
.
msg
.
pageIndex
++
;
th
at
.
getLis
t
();
}
else
{
this
.
status
=
"nomor
e"
;
data
.
pageState
=
"non
e"
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth=false;
this
.
init
();
},
//关闭登录窗口
gbAuth
()
{
uni
.
navigateBack
();
},
cancel
(
x
,
i
)
{
this
.
bmobj
=
{
data
.
bmobj
=
{
ActivityId
:
x
.
ActivityId
,
index
:
i
,
Id
:
x
.
Id
,
};
this
.
show
=
true
;
data
.
show
=
true
;
},
queren
()
{
this
.
request2
(
{
url
:
"/api/AppletEducation/CancelCommerceConsult"
,
data
:
{
ActivityId
:
this
.
bmobj
.
ActivityId
,
CancelRemark
:
this
.
cancelRemark
,
Id
:
this
.
bmobj
.
Id
,
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
//取消报名
async
queren
()
{
let
res
=
await
cancelSignUp
({
ActivityId
:
data
.
bmobj
.
ActivityId
,
CancelRemark
:
data
.
cancelRemark
,
Id
:
data
.
bmobj
.
Id
,
});
if
(
res
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
if
(
res
.
data
!=
1
)
{
if
(
this
.
msg
.
EnrollState
==
1
)
{
this
.
g
.
splice
(
this
.
bmobj
.
index
,
1
);
if
(
data
.
msg
.
EnrollState
==
1
)
{
data
.
g
.
splice
(
data
.
bmobj
.
index
,
1
);
}
else
{
this
.
g
[
this
.
bmobj
.
index
].
Status
=
1
;
data
.
g
[
this
.
bmobj
.
index
].
Status
=
1
;
}
}
else
{
this
.
g
[
this
.
bmobj
.
index
].
IsApplyForCancel
=
1
;
this
.
g
[
this
.
bmobj
.
index
].
CancelRemark
=
this
.
cancelRemark
;
data
.
g
[
data
.
bmobj
.
index
].
IsApplyForCancel
=
1
;
data
.
g
[
data
.
bmobj
.
index
].
CancelRemark
=
data
.
cancelRemark
;
}
this
.
show
=
false
;
data
.
show
=
false
;
}
}
);
},
//跳转至活动详情
goActiveDetail
(
x
)
{
uni
.
navigateTo
({
url
:
"/pages/
school/JIaheactivityd
etails?Id="
+
x
.
ActivityId
,
url
:
"/pages/
activity/activityD
etails?Id="
+
x
.
ActivityId
,
});
},
};
onMounted
(()
=>
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
tabbarH
=
this
.
$uiConfig
.
is_bang
?
78
:
50
;
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
});
onMounted
(()
=>
{});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
(
option
)
{
// this.u = uni.getStorageSync("mall_UserInfo");
// if (!this.u) {
// this.u = {
// nickName: "未登录",
// avatarUrl: "",
// };
// this.showAuth = true;
// } else {
// this.init();
// }
},
};
</
script
>
<
style
>
...
...
@@ -479,12 +402,13 @@ export default {
z-index
:
999
;
}
.mysignupList
.details
{
padding
:
15px
;
box-sizing
:
border-box
;
padding
:
30
rpx
;
display
:
flex
;
flex-direction
:
column
;
}
.mysignupList
.item
{
margin-bottom
:
15
px
;
margin-bottom
:
30
r
px
;
}
.mysignupList
.box-top
{
width
:
100%
;
...
...
src/pages.json
View file @
b05c8e1a
...
...
@@ -20,6 +20,8 @@
"path"
:
"pages/progress/progress"
//进度
},
{
"path"
:
"pages/activity/activityList"
//活动列表
},
{
"path"
:
"pages/activity/activityDetails"
//活动详情
}],
"subPackages"
:
[{
"root"
:
"pages/course"
,
//课程分包
...
...
src/pages/activity/activityDetails.vue
0 → 100644
View file @
b05c8e1a
<
style
scoped
>
.Jiaheactivitydetails
{
width
:
100%
;
height
:
100vh
;
background
:
#fff
;
font-family
:
aa
;
}
.box
{
width
:
100%
;
position
:
relative
;
}
.details-box-top-z
{
width
:
100%
;
height
:
3px
;
}
.details-box-top-f
{
width
:
100%
;
height
:
3px
;
background
:
#e2e2e2
;
}
.details-box-t-positions
{
height
:
40
rpx
;
font-size
:
20
rpx
;
color
:
#fff
;
background
:
#b7a264
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
padding
:
0
26
rpx
;
border-top-right-radius
:
6px
;
border-bottom-left-radius
:
6px
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.details-b-center
{
width
:
100%
;
display
:
flex
;
margin-top
:
40
rpx
;
}
.details-b-center-l
{
width
:
120
rpx
;
height
:
120
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
space-between
;
}
.details-b-center-r
{
width
:
1px
;
flex
:
1
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.details-b-title
{
width
:
100%
;
font-size
:
28
rpx
;
color
:
#111111
;
font-weight
:
bold
;
font-family
:
PingFang
SC
;
}
.details-b-time
{
font-size
:
22
rpx
;
color
:
#999999
;
margin-top
:
18
rpx
;
}
.addressStyle
{
width
:
690
rpx
;
height
:
45px
;
background
:
#ffffff
;
box-shadow
:
0px
3px
6px
0px
rgba
(
139
,
115
,
64
,
0.16
);
border-radius
:
6px
;
font-size
:
12px
;
color
:
#999999
;
display
:
flex
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
align-items
:
center
;
margin-top
:
20px
;
margin-left
:
30
rpx
;
}
.addressStyle-r
{
width
:
1px
;
flex
:
1
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.positionb
{
width
:
100%
;
height
:
120
rpx
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
background
:
#fff
;
}
.btnc
{
width
:
220
rpx
;
height
:
80
rpx
;
border-radius
:
4px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
14px
;
color
:
#ffffff
;
background
:
#cccccc
;
}
.title-pic
{
font-size
:
32
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
//
text-align
:
center
;
margin-top
:
40
rpx
;
margin-bottom
:
30
rpx
;
position
:
relative
;
}
.title-pic
.line-bottom
{
width
:
71
rpx
;
height
:
12
rpx
;
background-color
:
#40766e
;
border-radius
:
4
rpx
;
position
:
absolute
;
left
:
0
;
bottom
:
-5
rpx
;
opacity
:
0.8
;
}
.pic-name
{
margin-bottom
:
30
rpx
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.video-box
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.video-box
.pic-box
:nth-child
(
3n
)
{
margin-right
:
0
!important
;
}
.pic-box
{
width
:
222
rpx
;
height
:
300
rpx
;
border-radius
:
12
rpx
;
margin
:
0
10
rpx
30
rpx
0
;
}
.oneimg
{
width
:
222
rpx
;
height
:
222
rpx
;
border-radius
:
12
rpx
;
background-color
:
#d7d7d7
;
border
:
1
rpx
solid
#eeeeee
;
}
.fourimg-box
{
width
:
222
rpx
;
height
:
222
rpx
;
border-radius
:
12
rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
align-content
:
space-between
;
border
:
1
rpx
solid
#eeeeee
;
}
.fourimg
{
width
:
105
rpx
;
height
:
105
rpx
;
border-radius
:
11
rpx
;
/* background-color: #000000; */
}
.item-name
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
.item-num
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#666666
;
}
.jz_TripMain
{
position
:
relative
;
overflow
:
hidden
;
margin-bottom
:
50px
;
}
.jz_TripTitle
{
width
:
100%
;
min-height
:
90
rpx
;
border-radius
:
20
rpx
;
background-color
:
#40766e
;
color
:
#fff
;
display
:
flex
;
box-sizing
:
border-box
;
padding
:
28
rpx
;
}
.jz_TripLeft
{
width
:
80
rpx
;
white-space
:
nowrap
;
font-size
:
30
rpx
;
font-weight
:
500
;
margin-right
:
20
rpx
;
}
.jz_TripRight
{
font-size
:
30
rpx
;
font-weight
:
500
;
}
.jz_TripLine
{
position
:
absolute
;
width
:
4
rpx
;
height
:
100%
;
background-color
:
#40766e
;
left
:
24
rpx
;
top
:
90
rpx
;
}
.jz_RightInner
{
margin-left
:
50
rpx
;
}
.jz_Place
{
position
:
relative
;
color
:
#111111
;
font-size
:
24
rpx
;
margin
:
30
rpx
0
;
font-weight
:
bold
;
display
:
flex
;
}
.jz_ComDian
{
width
:
18
rpx
;
height
:
18
rpx
;
background-color
:
#dfbe6e
;
border-radius
:
50%
;
position
:
absolute
;
left
:
-17.6px
;
top
:
4px
;
}
.Jiaheactivitydetails
.con
{
width
:
622
rpx
;
background-color
:
#f1f1f1
;
border-radius
:
20
rpx
;
box-sizing
:
border-box
;
padding
:
20
rpx
;
margin-bottom
:
30
rpx
;
}
.Jiaheactivitydetails
.active-img-box
{
height
:
200
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.Jiaheactivitydetails
.img-box
{
width
:
200
rpx
;
height
:
200
rpx
;
border-radius
:
12
rpx
;
overflow
:
hidden
;
box-shadow
:
0
rpx
10
rpx
30
rpx
0
rpx
rgba
(
36
,
36
,
36
,
0.2
);
}
.Jiaheactivitydetails
.active-img
{
width
:
100%
;
height
:
100%
;
}
.Jiaheactivitydetails
.img-box2
{
position
:
relative
;
}
.Jiaheactivitydetails
.img-box2
.layer
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
10
;
background-color
:
#5f5b5d
;
opacity
:
0.5
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
32
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#ffffff
;
}
.Jiaheactivitydetails
.addr
{
margin
:
30
rpx
0
;
}
</
style
>
<
template
>
<view
class=
"Jiaheactivitydetails"
v-if=
"!loading"
>
<view
style=
"width: 100%; height: 450rpx"
@
click=
"previewImage(detial.CoverImg)"
>
<image
:src=
"detial.CoverImg"
style=
"width: 100%; height: 100%"
mode=
"aspectFill"
></image>
</view>
<view
class=
"box"
>
<view
v-if=
"detial.IsJoinActivity == 0"
>
<view
class=
"details-box-top-z"
v-if=
"detial.TotalMan - detial.JoinNum > 0"
:style=
"
{ background: mainColor }"
>
</view>
<view
class=
"details-box-top-f"
v-if=
"detial.TotalMan - detial.JoinNum == 0"
></view>
<view
class=
"details-box-t-positions"
v-if=
"detial.TotalMan - detial.JoinNum > 0 && detial.IsSignUp == 1"
:style=
"
{ background: mainColor }"
>
<text>
{{
detial
.
TotalMan
-
detial
.
JoinNum
>=
6
?
"可预约"
:
detial
.
TotalMan
-
detial
.
JoinNum
<
6
?
"剩余"
+
(
detial
.
TotalMan
-
detial
.
JoinNum
)
+
"个空位"
:
""
}}
</text>
</view>
<view
class=
"details-box-t-positions"
v-if=
"detial.TotalMan - detial.JoinNum == 0"
style=
"background: #e2e2e2; color: #999999"
>
爆满
</view>
</view>
<view
v-if=
"detial.IsJoinActivity == 1"
>
<view
class=
"details-box-top-f"
style=
"background: #40766e"
></view>
<view
class=
"details-box-t-positions"
:style=
"
{ background: '#40766E' }"
>
已报名
</view>
</view>
<view
class=
"details-b-center"
>
<view
class=
"details-b-center-l"
>
<view
style=
"
font-size: 28rpx;
color: #999999;
font-weight: 500;
font-family: PingFang SC;
"
>
{{
detial
.
MonthStr
}}
月
</view>
<view
style=
"
font-size: 50rpx;
color: #1b1d1e;
font-weight: 800;
font-family: PingFang SC;
"
>
{{
detial
.
DayStr
}}
</view>
<view
style=
"
font-size: 28rpx;
color: #999999;
font-weight: 500;
font-family: PingFang SC;
"
>
{{
detial
.
WeekStr
}}
</view>
</view>
<view
style=
"width: 1px; background: #e2e2e2; height: 86px"
></view>
<view
class=
"details-b-center-r"
>
<view
class=
"details-b-title"
>
{{
detial
.
ActivityName
}}
</view>
<view
class=
"details-b-time"
>
报名时间:
{{
detial
.
BMStart
}}
-
{{
detial
.
BMEnd
}}
</view>
<view
class=
"details-b-time"
>
活动时间:
{{
detial
.
HDStart
}}
-
{{
detial
.
HDEnd
}}
</view>
<view
class=
"details-b-time"
>
活动席位:
{{
detial
.
TotalMan
}}
人
</view>
<view
class=
"details-b-time"
>
<text
v-if=
"detial.Distinguish == 1"
>
已报入:
{{
detial
.
JoinNum
}}
人
</text
>
<text
v-if=
"detial.Distinguish == 0"
>
已报入:男性
{{
detial
.
ManNum
}}
人
<text
style=
"margin-left: 10px"
>
女性
{{
detial
.
WoManNum
}}
人
</text>
</text>
</view>
<view
class=
"details-b-time"
v-if=
"detial.AgeLimit == 0"
>
<text
>
年龄范围:
{{
detial
.
StartAge
}}
岁 ~
{{
detial
.
EndAge
}}
岁
</text
>
</view>
<view
class=
"details-b-time"
v-if=
"detial.LnsideLimit == 1"
>
<text>
只针对甲鹤学员
</text>
</view>
</view>
</view>
<view
class=
"addressStyle"
@
click=
"goopenlocation(detial)"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/jiaheaddress.png"
style=
"width: 12px; height: 15px; margin-right: 15px"
></image>
<view
class=
"addressStyle-r"
>
{{
detial
.
LocationName
}}
</view>
</view>
<view
style=
"
width: 100%;
box-sizing: border-box;
padding: 30rpx;
margin-bottom: 150rpx;
"
>
<view
class=
"title-pic"
v-if=
"richtext"
>
活动特色
<view
class=
"line-bottom"
></view>
</view>
<view
class=
"acdetail_Intro"
v-html=
"richtext"
></view>
<view
class=
"title-pic"
v-if=
"detial.ActivityTitleList.length > 0"
>
活动内容
<view
class=
"line-bottom"
></view>
</view>
<view
class=
"jz_TripMain"
>
<view
class=
"jz_TripLine"
></view>
<view
v-for=
"(item, index) in detial.ActivityTitleList"
:key=
"index"
>
<view
class=
"jz_TripTitle"
:style=
"
{ 'margin-top': index === 0 ? '10rpx' : '40rpx' }"
>
<view
class=
"jz_TripLeft"
>
第
{{
index
+
1
}}
天
</view>
<view
class=
"jz_TripRight"
>
{{
item
.
Title
}}
</view>
</view>
<view
class=
"jz_RightInner"
>
<template
v-for=
"(item2, index2) in item.ActivityPlanList"
v-if=
"item.ActivityPlanList.length > 0"
>
<view
class=
"jz_Place"
>
<view
class=
"jz_ComDian"
></view>
<text
style=
"margin-right: 10rpx"
>
{{
item2
.
StartTime
}}
</text
>
<text
style=
"margin-right: 10rpx"
v-if=
"item2.ActivityDuration"
>
{{
item2
.
ActivityDuration
}}
分钟
</text
>
<text
style=
"margin-right: 10rpx"
>
{{
item2
.
TripTitle
}}
</text>
</view>
<view
class=
"con"
v-if=
"item2.TripContent"
>
<rich-text
:nodes=
"item2.TripContent"
></rich-text>
</view>
<view
class=
"active-img-box"
v-if=
"item2.TripPicList.length > 0"
>
<view
v-for=
"(item3, index3) in item2.TripPicList"
:key=
"index3"
>
<view
class=
"img-box"
v-if=
"index3
<
2
"
@
click=
"previewImage2(index3, item2.TripPicList)"
>
<image
class=
"active-img"
:src=
"item3"
mode=
"aspectFill"
></image>
</view>
<view
class=
"img-box img-box2"
v-if=
"index3 == 2"
@
click=
"previewImage2(index3, item2.TripPicList)"
>
<image
class=
"active-img"
:src=
"item3"
mode=
"aspectFill"
></image>
<view
class=
"layer"
v-if=
"item2.TripPicList.length > 3"
>
+
{{
item2
.
TripPicList
.
length
-
3
}}
</view>
</view>
</view>
</view>
<view
class=
"addr"
v-if=
"item2.LocationName"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/jiaheaddress.png"
style=
"width: 12px; height: 15px; margin-right: 15px"
></image
>
{{
item2
.
LocationName
}}
</view>
</
template
>
</view>
</view>
</view>
<view
class=
"title-pic"
v-if=
"detial.Summary"
>
活动总结
<view
class=
"line-bottom"
></view>
</view>
<view
class=
"acdetail_Intro"
v-html=
"detial.Summary"
v-if=
"detial.Summary"
></view>
<view
class=
"title-pic"
v-if=
"
detial.FileGroup[0].groupList.length > 0 ||
detial.FileGroup[1].groupList.length > 0
"
>
活动相册
<view
class=
"line-bottom"
></view>
</view>
<view
class=
"pic-name"
v-if=
"detial.FileGroup[0].groupList.length > 0"
>
视频
</view>
<view
class=
"video-box"
>
<view
v-for=
"(item, index) in detial.FileGroup[0].groupList"
:key=
"index"
class=
"pic-box"
@
click=
"goPicDetail(item.FileList)"
v-if=
"item.FileList.length > 0"
>
<image
class=
"oneimg"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/videologo.png"
mode=
"aspectFill"
></image>
<!-- <image class="oneimg" :src="item.FileList[0].Image" mode="aspectFill" v-if="item.FileList.length<4" ></image> -->
<!-- <view class="fourimg-box" v-if="item.FileList.length>=4" >
<div v-for="(_item,_index) in item.FileList" :key="_item.id" class="subpic-box" v-if="_index<=3">
<image class="fourimg" :src="_item.Path" mode="aspectFill" ></image>
</div>
</view> -->
<view
class=
"item-name"
>
{{ item.Name }}
</view>
<view
class=
"item-num"
>
{{ item.FileList.length }}
</view>
</view>
</view>
<view
class=
"pic-name"
v-if=
"detial.FileGroup[1].groupList.length > 0"
>
图片
</view>
<view
class=
"video-box"
>
<view
v-for=
"(item, index) in detial.FileGroup[1].groupList"
:key=
"index"
class=
"pic-box"
@
click=
"goPicDetail(item.FileList)"
v-if=
"item.FileList.length > 0"
>
<image
class=
"oneimg"
:src=
"item.FileList[0].Path"
mode=
"aspectFill"
v-if=
"item.FileList.length < 4"
></image>
<view
class=
"fourimg-box"
v-if=
"item.FileList.length >= 4"
>
<div
v-for=
"(_item, _index) in item.FileList"
:key=
"_item.id"
class=
"subpic-box"
v-if=
"_index <= 3"
>
<image
class=
"fourimg"
:src=
"_item.Path"
mode=
"aspectFill"
></image>
</div>
</view>
<view
class=
"item-name"
>
{{ item.Name }}
</view>
<view
class=
"item-num"
>
{{ item.FileList.length }}
</view>
</view>
</view>
</view>
<view
class=
"positionb"
>
<view
:style=
"{ color: pricecolor, 'font-size': '40rpx' }"
>
<text
v-if=
"detial.IsFree == 1"
>
免费
</text>
<view
v-if=
"
detial.IsFree == 2 && (detial.Price > 0 || detial.PointNum > 0)
"
style=
"display: flex; align-items: center"
>
<view
style=
"display: flex; align-items: flex-end"
>
<text
v-if=
"detial.Price > 0"
style=
"font-size: 22rpx; margin-bottom: 6rpx"
>
¥
</text
>
<text
v-if=
"detial.Price > 0"
>
{{ detial.Price }}
</text>
<text
v-if=
"detial.Price > 0"
style=
"font-size: 22rpx; margin-bottom: 6rpx"
>
元
</text
>
</view>
<text
v-if=
"detial.Price > 0 && detial.PointNum > 0"
style=
"font-size: 12px; margin: 0 5px"
>
或
</text
>
<view
style=
"display: flex; align-items: flex-end"
>
<text
v-if=
"detial.PointNum > 0"
>
{{ detial.PointNum }}
</text>
<text
v-if=
"detial.PointNum > 0"
style=
"font-size: 22rpx; margin-bottom: 6rpx"
>
点
</text
>
</view>
</view>
<!-- <view v-if="detial.IsFree==2 && detial.Price==0 && detial.PointNum>0" style="display: flex;align-items: flex-end;" >
<text>{{detial.PointNum}}</text>
<text style="font-size: 22rpx;">点</text>
</view> -->
</view>
<view
class=
"btnc"
:style=
"{ background: mainColor }"
v-if=
"IsShowRollCall == 1"
@
click=
"goRollCall"
>
点名
</view
>
<view
v-if=
"detial.IsJoinActivity == 0"
>
<view
class=
"btnc"
v-if=
"detial.IsSignUp == 1 && detial.TotalMan - detial.JoinNum > 0"
:style=
"{ background: mainColor }"
@
click=
"gosignUp()"
>
立即预约
</view
>
<view
class=
"btnc"
v-if=
"detial.IsSignUp == 0 || detial.TotalMan - detial.JoinNum == 0"
>
不可预约
</view
>
</view>
<view
v-if=
"detial.IsJoinActivity == 1"
>
<view
class=
"btnc"
v-if=
"detial.IsSignUp == 1"
>
已报名
</view>
</view>
</view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
nextTick
,
}
from
"vue"
;
import
{
getActivityDatail
}
from
"../../api/activity"
;
export
default
{
setup
()
{
let
data
=
reactive
({
loading
:
true
,
pageTitle
:
"活动详情"
,
showAuth
:
false
,
mainColor
:
""
,
pricecolor
:
""
,
Id
:
0
,
detial
:
{},
richtext
:
""
,
Up
:
0
,
IsShowRollCall
:
0
,
//是否显示点名按钮
});
let
methods
=
{
goPicDetail
(
arr
)
{
uni
.
navigateTo
({
url
:
"/pages/school/picDetail?data="
+
encodeURIComponent
(
JSON
.
stringify
({
data
:
arr
})),
});
},
async
GetActivityDetial
()
{
let
res
=
await
getActivityDatail
({
Id
:
data
.
Id
,
});
if
(
res
)
{
this
.
loading
=
false
;
data
.
detial
=
res
.
data
;
let
tempRichtext
=
""
;
tempRichtext
=
data
.
detial
.
ActivityInfo
.
replace
(
/<img
[^
>
]
*>/gi
,
function
(
match
,
capture
)
{
var
match
=
match
.
replace
(
/style=
\"(
.*
)\"
/gi
,
'style="width:100% !important"'
);
return
match
;
}
);
data
.
richtext
=
tempRichtext
;
}
},
goopenlocation
(
x
)
{
uni
.
openLocation
({
address
:
x
.
LocationName
,
latitude
:
Number
(
x
.
LonLat
.
split
(
","
)[
0
]),
longitude
:
Number
(
x
.
LonLat
.
split
(
","
)[
1
]),
success
:
function
()
{
console
.
log
(
"success"
);
},
fail
:
function
(
err
)
{
console
.
log
(
err
);
},
});
},
gosignUp
()
{
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
u
)
{
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
let
dataList
=
encodeURIComponent
(
JSON
.
stringify
(
this
.
detial
));
uni
.
navigateTo
({
url
:
"/pages/school/jieheactivityBM?details="
+
dataList
,
});
}
},
previewImage
(
x
)
{
uni
.
previewImage
({
urls
:
[
x
],
current
:
0
,
});
},
previewImage2
(
i
,
arr
)
{
uni
.
previewImage
({
urls
:
arr
,
current
:
i
,
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
},
},
});
},
};
onMounted
(()
=>
{});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onShareTimeline
()
{
return
{
title
:
""
,
query
:
""
,
imageUrl
:
""
,
};
},
onShareAppMessage
(
res
)
{
return
{
title
:
this
.
detial
.
ActivityName
?
this
.
detial
.
ActivityName
:
"活动详情"
,
path
:
""
,
imageUrl
:
this
.
detial
.
CoverImg
?
this
.
detial
.
CoverImg
:
""
,
};
},
onLoad
(
options
)
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
if
(
options
&&
options
.
Id
)
{
this
.
Id
=
options
.
Id
;
}
this
.
GetActivityDetial
();
},
};
</
script
>
src/pages/activity/activityList.vue
View file @
b05c8e1a
...
...
@@ -176,21 +176,17 @@
</view>
</view>
</view>
<view
style=
"margin: 20rpx 0"
>
<Loadmore
:state=
"pageState"
/>
</view>
</scroll-view>
</view>
</view>
<view
v-show=
"current == 2"
style=
"height: calc(100vh - 50px)"
>
<
!--
<SignUp
ref=
"children"
></SignUp>
--
>
<
signUp
ref=
"children"
></signUp
>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<van-popup
:show=
"show"
closeable
...
...
@@ -240,18 +236,18 @@ import {
watch
,
computed
,
onMounted
,
nextTick
,
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
// import S
ignUp from "../../components/signUp.vue";
import
s
ignUp
from
"../../components/signUp.vue"
;
import
{
getActivityTypeList
,
getActivityList
}
from
"../../api/activity"
;
export
default
{
components
:
{
Loadmore
,
// S
ignUp,
s
ignUp
,
},
setup
()
{
let
i
=
getCurrentInstance
();
console
.
log
(
252
,
i
);
let
{
refs
}
=
getCurrentInstance
();
let
data
=
reactive
({
show
:
false
,
pageState
:
"more"
,
...
...
@@ -268,12 +264,12 @@ export default {
PageCount
:
1
,
g
:
[],
activityTypeList
:
[],
mainColor
:
"#00ACF9"
,
});
let
methods
=
{
async
getActivityType
()
{
let
res
=
await
getActivityTypeList
({});
if
(
res
)
{
console
.
log
(
"mall"
,
res
);
data
.
activityTypeList
=
res
.
data
;
data
.
activityTypeList
.
unshift
({
Id
:
0
,
...
...
@@ -282,12 +278,13 @@ export default {
data
.
msg
.
ActivityType
=
0
;
data
.
ActivityName
=
"不限"
;
}
// methods
.getList();
that
.
getList
();
},
async
getList
()
{
let
res
=
await
getActivityList
(
data
.
msg
);
if
(
res
)
{
let
arr
=
methods
.
groupArr
(
res
.
data
.
pageData
,
"MonthStr"
);
let
arr
=
that
.
groupArr
(
res
.
data
.
pageData
,
"MonthStr"
);
let
arr2
=
arr
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
g
=
[];
...
...
@@ -304,7 +301,7 @@ export default {
}
});
}
data
.
g
=
data
.
g
.
concat
(
data
);
data
.
g
=
data
.
g
.
concat
(
arr
);
data
.
PageCount
=
res
.
data
.
pageCount
;
if
(
res
.
data
.
pageCount
==
1
)
{
data
.
pageState
=
"none"
;
...
...
@@ -334,14 +331,14 @@ export default {
}
return
att
;
},
getorder
()
{
//报名成功处理
data
.
current
=
2
;
//让他直接跳入我报名
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
children
)
{
//判断
this
.
$refs
.
children
.
getfzuj
();
}
},
//
getorder() {
//
//报名成功处理
//
data.current = 2; //让他直接跳入我报名
//
if (Object.keys(this.$refs).length > 0 && this.$refs.children) {
//
//判断
//
this.$refs.children.getfzuj();
//
}
//
},
lower
(
e
)
{
if
(
data
.
msg
.
pageIndex
<
data
.
PageCount
)
{
data
.
pageState
=
"loading"
;
...
...
@@ -352,39 +349,19 @@ export default {
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
GetActivityTypeList
();
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
children
)
{
//判断
this
.
$refs
.
children
.
getfzuj
();
}
},
listType
(
type
)
{
data
.
current
=
type
;
if
(
type
==
3
)
{
this
.
msg
.
SelectIsEnd
=
1
;
this
.
msg
.
pageIndex
=
1
;
th
is
.
getList
();
data
.
msg
.
SelectIsEnd
=
1
;
data
.
msg
.
pageIndex
=
1
;
th
at
.
getList
();
}
else
if
(
type
==
1
)
{
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
SelectIsEnd
=
0
;
this
.
getList
();
}
else
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
data
.
msg
.
pageIndex
=
1
;
data
.
msg
.
SelectIsEnd
=
0
;
that
.
getList
();
}
else
{
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
children
)
{
//判断
this
.
$refs
.
children
.
getfzuj
();
}
}
console
.
log
(
253
,
refs
);
refs
.
children
.
$vm
.
getfzuj
();
}
},
select
(
x
)
{
...
...
@@ -393,16 +370,16 @@ export default {
data
.
show
=
false
;
data
.
msg
.
pageIndex
=
1
;
data
.
g
=
[];
data
.
getList
();
that
.
getList
();
},
gourl
(
x
)
{
uni
.
navigateTo
({
url
:
"/pages/
school/JIaheactivityd
etails?Id="
+
x
.
Id
,
url
:
"/pages/
activity/activityD
etails?Id="
+
x
.
Id
,
});
},
};
onMounted
(()
=>
{
methods
.
getActivityType
();
that
.
getActivityType
();
});
let
that
=
methods
;
return
{
...
...
@@ -497,6 +474,7 @@ export default {
background
:
#b7a264
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
padding
:
0
26
rpx
;
border-top-right-radius
:
12
rpx
;
border-bottom-left-radius
:
12
rpx
;
...
...
@@ -544,6 +522,7 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
...
...
@@ -551,7 +530,6 @@ export default {
height
:
calc
(
100vh
-
100
rpx
);
width
:
calc
(
100vw
);
overflow
:
hidden
;
padding-bottom
:
100
rpx
;
}
.Jiaheactivity
{
width
:
100%
;
...
...
@@ -577,6 +555,7 @@ export default {
.Jiaheactivity
.foritem
{
height
:
60
rpx
;
font-size
:
24
rpx
;
box-sizing
:
border-box
;
padding
:
0
24
rpx
;
display
:
flex
;
align-items
:
center
;
...
...
@@ -585,6 +564,7 @@ export default {
margin-bottom
:
30
rpx
;
}
.ht-box
{
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
...
...
src/pages/activity/media.vue
0 → 100644
View file @
b05c8e1a
src/pages/exam/examPaper.vue
View file @
b05c8e1a
...
...
@@ -377,10 +377,11 @@ export default {
},
setup
(
props
,
context
)
{
let
{
refs
}
=
getCurrentInstance
();
console
.
log
(
refs
);
let
data
=
reactive
({
time
:
999
,
statusBarHeight
:
0
,
msg
:
{
GuestId
:
0
,
PaperId
:
0
,
PublishId
:
0
},
msg
:
{
GuestId
:
0
,
PaperId
:
0
,
PublishId
:
0
},
peaperDetail
:
{},
changeIndex
:
0
,
//大题序号
...
...
@@ -389,7 +390,7 @@ export default {
Exam_Student_Id
:
0
,
autoTimeStart
:
false
,
isOperate
:
true
,
//考试状态 判断是考试还是查看答案
isAutoTime
:
true
isAutoTime
:
true
,
});
let
methods
=
{
changeNumToHan
,
...
...
@@ -410,7 +411,7 @@ export default {
if
(
res
.
Code
==
1
)
{
data
.
peaperDetail
=
res
.
Data
;
//判断是查看答题结果就不倒计时
if
(
this
.
isAutoTime
)
{
if
(
this
.
isAutoTime
)
{
data
.
autoTimeStart
=
true
;
data
.
time
=
res
.
Data
.
Publish
.
ExamTimes
*
60
*
1000
;
}
...
...
@@ -462,7 +463,7 @@ export default {
};
},
onLoad
(
options
)
{
if
(
options
.
GuestId
)
{
if
(
options
.
GuestId
)
{
this
.
msg
.
GuestId
=
options
.
GuestId
;
}
if
(
options
.
PaperId
)
{
...
...
@@ -474,7 +475,10 @@ export default {
if
(
options
.
Exam_Student_Id
)
{
this
.
Exam_Student_Id
=
options
.
Exam_Student_Id
;
}
if
(
options
.
ExamStatus
&&
(
options
.
ExamStatus
==
1
||
options
.
ExamStatus
==
2
))
{
if
(
options
.
ExamStatus
&&
(
options
.
ExamStatus
==
1
||
options
.
ExamStatus
==
2
)
)
{
this
.
isOperate
=
false
;
this
.
msg
.
isShowAnswer
=
true
;
this
.
isAutoTime
=
false
;
...
...
src/pages/exam/subject1.vue
deleted
100644 → 0
View file @
0e1a402f
<
template
>
<!-- 选择题 -->
<view>
<view
v-for=
"(item, index) in questionList"
:key=
"index"
class=
"item"
>
<view
class=
"name"
>
{{
item
.
name
}}
</view>
<view
v-for=
"(item1, index1) in item.children"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"num"
>
{{
item1
.
num
}}
</view>
<view
v-for=
"(item2, index2) in item1.children"
:key=
"item2.id"
class=
"flex item2 flex_start_center"
v-if=
"item.type === 1"
>
<view
class=
"chooseNum"
:class=
"
{ choose: item1.choose === item2.chooseNum }"
@click="change(item.type, index, index1, index2)"
>
{{
item2
.
chooseNum
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item.type, index, index1, index2)"
>
{{
item2
.
itemName
}}
</view
>
</view>
<view
v-for=
"(item2, index2) in item1.children"
:key=
"item2.id"
class=
"item2 flex flex_start_center"
v-if=
"item.type === 2"
>
<view
class=
"chooseNum"
:class=
"
{ choose: item1.choose.find((e) => e == item2.chooseNum) }"
@click="change(item.type, index, index1, index2)"
>
{{
item2
.
chooseNum
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item.type, index, index1, index2)"
>
{{
item2
.
itemName
}}
</view
>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
export
default
{
setup
(
props
,
context
)
{
// let { refs } = getCurrentInstance();
let
data
=
reactive
({
questionList
:
[
{
name
:
"一、单选题"
,
type
:
1
,
children
:
[
{
num
:
"1、真実はいつも一つ?"
,
choose
:
"A"
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
"2、"
,
choose
:
0
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
3
,
choose
:
0
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
],
},
{
name
:
"二、多选题"
,
type
:
2
,
children
:
[
{
num
:
"1、真実はいつも二つ?"
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
2
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
3
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
],
},
],
});
let
methods
=
{
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//选题
change
(
type
,
index
,
index1
,
index2
)
{
if
(
type
===
1
)
{
data
.
questionList
[
index
].
children
[
index1
].
choose
=
data
.
questionList
[
index
].
children
[
index1
].
children
[
index2
].
chooseNum
;
}
else
if
(
type
===
2
)
{
let
choose
=
data
.
questionList
[
index
].
children
[
index1
].
choose
;
let
res
=
data
.
questionList
[
index
].
children
[
index1
].
children
[
index2
]
.
chooseNum
;
let
find
=
choose
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
choose
.
push
(
res
);
}
else
{
choose
.
splice
(
find
,
1
);
}
console
.
log
(
230
,
choose
);
}
},
};
let
change
=
(
type
,
index
,
index1
,
index2
)
=>
{
console
.
log
(
158
,
type
);
};
onMounted
(()
=>
{});
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/pages/index/index2.vue
View file @
b05c8e1a
...
...
@@ -2,11 +2,12 @@
<
script
>
/**
* 因为 props 是响应式的,你不能使用 ES6 解构,因为它会消除 prop 的响应性。
*
1.
因为 props 是响应式的,你不能使用 ES6 解构,因为它会消除 prop 的响应性。
如果需要解构 prop,可以通过使用 setup 函数中的 toRefs 来完成此操作
* // ref和reactive的区别: ref()传入的是js的基本数据类型; reactive()中传入的是object普通对象,------------reactive对象不能直接赋值--------------
*@reactive:处理的是对象的双向绑定, 对象不能被***解构或展开***,一旦被解构或者展开,返回的值将失去响应式,需用...toRef()
* 没有this 通过 @getCurrentInstance,获取当前页面实例,使用const { ctx,proxy,refs } = getCurrentInstance(); ctx或proxy.$挂载的方法
* 2.ref 获取子组件实例,组件名首字母小写
*/
import
{
ref
,
...
...
src/utils/requestMall.js
View file @
b05c8e1a
...
...
@@ -30,6 +30,7 @@ let request = (param) => {
token
:
JHdata
.
MallToken
},
success
:
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
resolve
(
res
.
data
)
}
else
{
...
...
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