Commit 15fc5cd6 authored by 罗超's avatar 罗超

1

parent ed96ba59
<template>
<view class="mysignupList">
<u-tabs
:show-bar="false"
:list="list"
:is-scroll="false"
:current="current"
@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' }"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<view class="details">
<view
class="item"
v-for="(x, i) in g"
:key="i"
@click="goActiveDetail(x)"
>
<view class="box-top">
<image
:src="x.CoverImg"
mode="aspectFill"
style="width: 110px; height: 67px; border-radius: 8px"
></image>
<view style="margin-left: 10px; height: 67px">
<view class="box-title">{{ x.ActivityName }}</view>
<view style="font-size: 12px; color: #666666; margin-top: 8px"
>活动类型:{{ x.TypeName }}</view
>
</view>
</view>
<view class="box-top-r-b">
<u-icon
name="contact"
:size="28"
color="#999999"
style="margin-right: 5px"
></u-icon>
<view
style="
max-width: 280rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>{{ x.LinkMan }}</view
>
<u-icon
name="friends-o"
:size="28"
color="#999999"
style="margin-right: 5px; margin-left: 10px"
></u-icon>
<view>{{ x.PeopleNum }}</view>
<u-icon
name="phone-o"
:size="28"
color="#999999"
style="margin-right: 5px; margin-left: 10px"
></u-icon>
<view>{{ x.LinkTel }}</view>
<u-icon
name="star-o"
:size="28"
:color="mainColor"
style="margin-right: 5px; margin-left: 10px"
></u-icon>
<view
v-if="x.Money > 0 && x.TotalPoint == 0"
:style="{ color: mainColor }"
>{{ x.Money }}</view
>
<view
v-if="x.Money == 0 && x.TotalPoint > 0"
:style="{ color: mainColor }"
>{{ x.TotalPoint }}</view
>
<view
v-if="x.Money == 0 && x.TotalPoint == 0"
:style="{ color: mainColor }"
>免费</view
>
</view>
<view class="box-Remark">
<view class="box-Remark-top">
<view style="width: calc(100vw - 110px)">
备注:{{ x.Remark == "" ? "无" : x.Remark }}
</view>
<view
class="box-Remark-top-r"
style="color: #00c6c1"
v-if="x.Status != 1 && x.IsApplyForCancel != 1"
>已报名</view
>
<view
class="box-Remark-top-r"
style="color: #00c6c1"
v-if="
x.Status != 1 &&
x.IsApplyForCancel == 1 &&
x.ApplyForCancelStatus == 0
"
>待审核</view
>
<view
class="box-Remark-top-r"
style="color: #00c6c1"
v-if="
x.Status != 1 &&
x.IsApplyForCancel == 1 &&
x.ApplyForCancelStatus == 1
"
>通过</view
>
<view
class="box-Remark-top-r"
style="color: #ff4646"
v-if="
x.Status != 1 &&
x.IsApplyForCancel == 1 &&
x.ApplyForCancelStatus == 2
"
>拒绝</view
>
<view
class="box-Remark-top-r"
style="color: #ff4646"
v-if="x.Status == 1"
>已取消</view
>
</view>
<view
class="box-Remark-b"
v-if="x.Status != 1 && x.IsApplyForCancel != 1"
>
<view class="box-Remark-btn" @click.native.stop="cancel(x, i)">
取消
</view>
</view>
<view
style="width: calc(100vw - 110px)"
v-if="x.CancelRemark != null && x.CancelRemark != ''"
>
取消备注:{{ x.CancelRemark == "" ? "无" : x.CancelRemark }}
</view>
<view
style="width: calc(100vw - 110px)"
v-if="x.RejectRemark != null && x.ApplyForCancelStatus == 2"
>
审核未通过理由:{{
x.RejectRemark == "" ? "无" : x.RejectRemark
}}
</view>
</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>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx">加载中...</Text>
</view>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
<u-popup v-model="show" mode="center" length="80%">
<view
style="
display: flex;
flex-direction: column;
align-items: center;
background: #fff;
"
>
<view
style="
display: flex;
align-items: center;
justify-content: center;
height: 70px;
"
>
<Text>是否取消订单?</Text>
</view>
<view
style="
display: flex;
flex-direction: column;
height: 80px;
margin-left: 15px;
width: 100%;
"
>
<Text style="margin-left: 10px; margin-top: 5px">备注</Text>
<input
class="uni-input inputM"
style="margin-left: 10px; margin-top: 5px"
v-model="cancelRemark"
placeholder="输入备注"
/>
</view>
<view
style="
display: flex;
flex-direction: row;
align-items: center;
height: 50px;
border-top: 1px solid #f5f5f5;
width: 100%;
"
>
<view
style="
width: 50%;
display: flex;
align-items: center;
justify-content: center;
"
@click="show = false"
>
<Text>取消</Text>
</view>
<view
style="
width: 50%;
color: #a0cfff;
display: flex;
align-items: center;
justify-content: center;
"
@click="queren"
>
<Text>确定</Text>
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import auth from "@/components/auth/index.vue";
export default {
components: {
auth,
},
setup() {
let data = reactive({
pageTitle: "报名列表",
showAuth: false,
u: {},
show: false,
current: 0,
list: [{ name: "全部" }, { name: "正常" }, { name: "取消" }],
mainColor: "",
contentHeight: 0,
msg: {
pageIndex: 1,
pageSize: 10,
EnrollState: 3,
},
page_count: 1,
g: [],
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
bmobj: {},
cancelRemark: "",
tabbarH: 0,
});
let methods = {
change(index) {
this.current = index;
if (index == 0) {
this.msg.EnrollState = 3;
} else {
this.msg.EnrollState = index;
}
this.msg.pageIndex = 1;
this.g = [];
this.loading = true;
this.init();
},
getfzuj() {
this.current = 0;
this.msg.pageIndex = 1;
this.g = [];
this.init();
},
init() {
this.request2(
{
url: "/api/AppletEducation/GetUserJoinActivityPageList",
data: this.msg,
},
(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";
}
}
},
(error) => {
this.loading = false;
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.init();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack();
},
cancel(x, i) {
this.bmobj = {
ActivityId: x.ActivityId,
index: i,
Id: x.Id,
};
this.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) {
uni.showToast({
title: "操作成功",
icon: "success",
});
if (res.data != 1) {
if (this.msg.EnrollState == 1) {
this.g.splice(this.bmobj.index, 1);
} else {
this.g[this.bmobj.index].Status = 1;
}
} else {
this.g[this.bmobj.index].IsApplyForCancel = 1;
this.g[this.bmobj.index].CancelRemark = this.cancelRemark;
}
this.show = false;
}
}
);
},
//跳转至活动详情
goActiveDetail(x) {
uni.navigateTo({
url: "/pages/school/JIaheactivitydetails?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,
});
});
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>
.mysignupList {
width: 100%;
height: calc(100vh - 50px);
background: #fff;
position: relative;
}
.mysignupList .loading {
width: 180rpx;
height: 180rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top: 30%;
margin-left: -100rpx;
z-index: 999;
}
.mysignupList .details {
padding: 15px;
display: flex;
flex-direction: column;
}
.mysignupList .item {
margin-bottom: 15px;
}
.mysignupList .box-top {
width: 100%;
height: 67px;
display: flex;
align-items: center;
}
.mysignupList .box-title {
width: calc(100vw - 30px - 110px - 10px);
font-size: 15px;
color: #000000;
font-weight: 500;
line-height: 22px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.mysignupList .box-top-r-b {
width: 100%;
display: flex;
align-items: center;
font-size: 13px;
color: #666666;
margin-top: 10px;
}
.mysignupList .box-Remark {
width: 100%;
padding: 14px 10px;
font-size: 11px;
color: #777777;
background: #ededed;
margin-top: 13px;
border-radius: 6px;
}
.mysignupList .box-Remark-top {
width: 100%;
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.mysignupList .box-Remark-top-r {
font-size: 11px;
}
.mysignupList .box-Remark-b {
width: 100%;
display: flex;
justify-content: flex-end;
margin-top: 5px;
}
.mysignupList .box-Remark-btn {
width: 60px;
height: 25px;
border-radius: 12.5px;
border: 1px solid #333333;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
color: #333333;
}
.mysignupList .scroll-box {
height: calc(100vh - 90px);
width: calc(100vw);
overflow: hidden;
}
</style>
......@@ -5,35 +5,61 @@
<view class="name">
<view>
{{ changeNumToHan(sortIndex) }}{{ data.GroupName }}
<text style="color: #999999">(共{{ data.DetailsList.length }}道,{{ data.GScore }}分)</text>
<text style="color: #999999"
>(共{{ data.DetailsList.length }}道,{{ data.GScore }}分)</text
>
</view>
<view class="ExamIndex_Box">
<text class="Single_Before">{{ ExamIndex }}</text>/<text
class="Exam_Total">{{ data.DetailsList.length }}</text>
<text class="Single_Before">{{ ExamIndex }}</text
>/<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view>
</view>
<swiper class="swiper-box" :style="{
<swiper
class="swiper-box"
:style="{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}" :autoplay="autoplay" :current="current" @change="onchange">
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="flex">
<view class="num" v-html="item1.Title"></view>{{item1.Score}}
<view class="num" v-html="item1.Title"></view>{{
item1.Score
}}
</view>
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2"
class="item2 flex flex_start_center">
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="item2 flex flex_start_center"
>
<template v-if="isOperate">
<view class="chooseNum" :class="{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)">{{ item2.ShowName }}
<view
class="chooseNum"
:class="{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>{{ item2.ShowName }}
</view>
<view class="chooseName" @click="change(item1, item2)" v-html="item2.Content"></view>
<view
class="chooseName"
@click="change(item1, item2)"
v-html="item2.Content"
></view>
</template>
<template v-else>
<view class="chooseNum" :class="{ isTrueAnswer: item2.IsAnswer }">{{ item2.Name }}
<view
class="chooseNum"
:class="{ isTrueAnswer: item2.IsAnswer }"
>{{ item2.Name }}
</view>
<view class="chooseName" :class="{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content">
<view
class="chooseName"
:class="{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
</view>
</template>
</view>
......@@ -41,28 +67,39 @@
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{item1.Answer}}</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text
>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer ==item1.StundetAnswer" class="isTrueAnswer">
<text
v-if="item1.Answer == item1.StundetAnswer"
class="isTrueAnswer"
>
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
<text v-else class="isNotAnswer"
>{{ item1.StundetAnswer }},回答错误</text
>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view style="margin: 20rpx 0" v-if="item1.StudentScore">
<text style="color: #8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore > 0">{{
item1.StudentScore
}}</text>
<text class="isNotAnswer" v-else>{{ item1.StudentScore }}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000; display: inline-block" v-html="item1.AnswerParse"></view>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
</swiper-item>
......@@ -74,7 +111,7 @@
</template>
<script>
import {
import {
ref,
reactive,
toRefs,
......@@ -83,11 +120,9 @@
watch,
computed,
onMounted,
} from "vue";
import {
changeNumToHan
} from "../../utils/index";
export default {
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
isLast: Boolean,
......@@ -144,14 +179,16 @@
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current + 1;
}
if (data.ExamIndex === data.data.DetailsList.length + 1) {
this.$emit("getAfterTopic");
}
if (e.detail.current == 0 && data.sortIndex != 1) {
this.$emit("getBeforeTopic");
console.log("多选返回", e);
}
}
},
};
onMounted(() => {
if (props.isLast) {
......@@ -170,10 +207,10 @@
};
},
onLoad() {},
};
};
</script>
<style scoped>
.name {
.name {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC;
......@@ -182,70 +219,70 @@
display: flex;
align-items: center;
justify-content: space-between;
}
}
.ExamIndex_Box {
.ExamIndex_Box {
margin-right: 20px;
}
}
.isTrueAnswer {
.isTrueAnswer {
color: green !important;
}
}
.isNotAnswer {
.isNotAnswer {
color: red !important;
}
}
.AnswerContent {
.AnswerContent {
font-size: 30rpx;
padding: 28rpx;
background-color: #f4f4f4;
border-radius: 5px;
}
}
.Single_Before {
.Single_Before {
font-size: 28rpx;
font-weight: bold;
color: #da7878;
}
}
.Exam_Total {
.Exam_Total {
font-size: 25rpx;
color: gray;
}
}
.swiper-box {
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
}
}
.num {
.num {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
}
.item {
.item {
margin-bottom: 40rpx;
}
}
.item1 {
.item1 {
/* margin: 25rpx 0; */
align-items: center;
}
}
.item2 {
.item2 {
padding-left: 25rpx;
margin: 30rpx 0;
}
}
.myAnswer {
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
}
.chooseNum {
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
......@@ -257,12 +294,12 @@
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
}
.chooseName {
.chooseName {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
}
</style>
......@@ -183,7 +183,7 @@
</view>
<view v-show="current == 2" style="height: calc(100vh - 50px)">
<SignUp ref="children"></SignUp>
<!-- <SignUp ref="children"></SignUp> -->
</view>
<auth
......@@ -242,12 +242,12 @@ import {
onMounted,
} from "vue";
import Loadmore from "../../components/loadmore.vue";
import SignUp from "../../components/signUp.vue";
// import SignUp from "../../components/signUp.vue";
import { getActivityTypeList, getActivityList } from "../../api/activity";
export default {
components: {
Loadmore,
SignUp,
// SignUp,
},
setup() {
let i = getCurrentInstance();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment