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
3a011d37
Commit
3a011d37
authored
Sep 16, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
6e3075f9
b05c8e1a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
985 additions
and
535 deletions
+985
-535
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
+7
-6
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 @
3a011d37
...
...
@@ -22,4 +22,27 @@ export function getActivityList(data) {
method
:
'post'
,
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 @
3a011d37
This diff is collapsed.
Click to expand it.
src/pages.json
View file @
3a011d37
...
...
@@ -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 @
3a011d37
This diff is collapsed.
Click to expand it.
src/pages/activity/activityList.vue
View file @
3a011d37
...
...
@@ -176,21 +176,17 @@
</view>
</view>
</view>
<Loadmore
:state=
"pageState"
/>
<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
;
th
is
.
getList
();
data
.
msg
.
pageIndex
=
1
;
data
.
msg
.
SelectIsEnd
=
0
;
th
at
.
getList
();
}
else
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
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 @
3a011d37
src/pages/exam/examPaper.vue
View file @
3a011d37
...
...
@@ -397,11 +397,12 @@ 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
,
//大题序号
isLast
:
false
,
//用于判断是否从后往前翻
...
...
@@ -502,14 +503,14 @@ export default {
};
},
onLoad
(
options
)
{
if
(
options
.
GuestId
)
{
this
.
msg
.
GuestId
=
options
.
GuestId
;
if
(
options
.
GuestId
)
{
this
.
msg
.
GuestId
=
options
.
GuestId
;
}
if
(
options
.
PaperId
)
{
this
.
msg
.
PaperId
=
options
.
PaperId
;
this
.
msg
.
PaperId
=
options
.
PaperId
;
}
if
(
options
.
Id
)
{
this
.
msg
.
PublishId
=
options
.
Id
;
this
.
msg
.
PublishId
=
options
.
Id
;
}
if
(
options
.
Exam_Student_Id
)
{
this
.
Exam_Student_Id
=
options
.
Exam_Student_Id
;
...
...
src/pages/exam/subject1.vue
deleted
100644 → 0
View file @
6e3075f9
<
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 @
3a011d37
...
...
@@ -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.$挂载的方法
* 没有this 通过 @getCurrentInstance,获取当前页面实例,使用const { ctx,proxy,refs } = getCurrentInstance(); ctx或proxy.$挂载的方法
* 2.ref 获取子组件实例,组件名首字母小写
*/
import
{
ref
,
...
...
src/utils/requestMall.js
View file @
3a011d37
...
...
@@ -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