Commit b629ff31 authored by 王永阿飞's avatar 王永阿飞

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wyf/tjty-app

 Conflicts:
	tjty-app/utils/request.js
parents 75efe4fb 1f91d1d3
......@@ -68,7 +68,6 @@
"navigationBarTitleText": "开始答题",
"enablePullDownRefresh": false
}
}
]
},
......@@ -106,6 +105,15 @@
"enablePullDownRefresh": false
}
},
{
"path": "activity_signInExam/acvity_signInExam",
"style": {
"navigationBarTitleText": "答题活动详情",
"enablePullDownRefresh": false
}
},
{
"path": "activity_signInSucc/activity_signInSucc",
"style": {
......
......@@ -5,7 +5,7 @@
<uni-icons type="contact-filled" size="100" color="#AFAFAF"></uni-icons>
<!-- 登录按钮 -->
<!-- 可以从 @getuserinfo 事件处理函数的形参中,获取到用户的基本信息 -->
<button type="primary" class="btn-login" @click="getWXUserCode()">一键登录</button>
<button :disabled="flag" type="primary" class="btn-login" @click="getWXUserCode()">一键登录</button>
<!-- <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="avatarUrl"></image>
</button>
......@@ -31,6 +31,7 @@
export default {
data() {
return {
flag:false,
// code:'',
tokenflag: true,
// openid: "",
......@@ -52,6 +53,8 @@
...mapMutations('m_user', ['updateToken']),
...mapMutations('m_user', ['updateUserInfo']),
getWXUserCode() {
console.log("点击了按钮");
this.flag = true
console.log(this.token);
console.log("获取登录信息")
uni.login({
......@@ -66,6 +69,7 @@
uni.redirectTo({
url: this.url
})
// this.flag = false
})
}
});
......
<template>
<view>
<noData v-if="activityList.length === 0"></noData>
<view class="activityContainer" v-if="activityList.length !== 0">
<noData v-if="activityLength === 0"></noData>
<view class="activityContainer" v-if="activityLength !== 0">
<view class="activity_item" v-for="(item,index) in activityList" :key="index" @click="gotoDetail(item)">
<view>
<image class="image" :src="item.bannerImage"></image>
......@@ -61,7 +61,8 @@
total: 0,
type: '',
url: '/pages_activity/activity/activity',
flag: true
flag: true,
activityLength:1
};
},
computed: {
......@@ -140,10 +141,14 @@
this.isloading = true
listActivity(this.queryParams.pageNum).then(response => {
console.log("赛事活动:", response)
if(response.code == 200){
this.activityList = [...this.activityList, ...response.rows] || []
this.activityLength = this.activityList.length
this.total = response.total || [];
}else{
this.activityLength = 0
}
this.isloading = false;
// 只要数据请求完毕,就立即按需调用 cb 回调函数
cb && cb()
});
......
<template>
<view>
<!-- 报名信息 -->
<view v-for="(item,index) in signInList ">
<view class="signIn-info">
<view class="signIn-body"><text>家长姓名:<text style="display: block;float: right;margin-right: 20rpx;">{{item.name}}</text></text></view>
<view class="signIn-body"><text>参赛人员:<text style="display: block;float: right;margin-right: 20rpx;">{{item.sex==='0'?'男':'女'}}</text></text></view>
<view class="signIn-body"><text>联系方式:<text style="display: block;float: right;margin-right: 20rpx;">{{item.phone}}</text></text></view>
<view class="signIn-body"><text>证件号码:<text style="display: block;float: right;margin-right: 20rpx;">{{item.idCard}}</text></text></view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
import {
getSinInInfo
} from "@/api/activity.js";
export default {
data() {
return {
activityId: null,
signInExamList: []
}
},
computed: {
...mapState('m_user', ['userInfo']),
...mapState('m_user', ['token'])
},
onLoad(options) {
},
methods:{
getInfo(wechatId,activityId) {
getSinInInfo(wechatId,activityId).then(response=>{
console.log(response)
this.signInExamList = response.data
})
}
}
}
</script>
<style lang="scss">
.signIn-info{
margin: 30rpx;
height: 660rpx;
width: 706rpx;
background: #ffffff;
border-radius: 16px;
box-shadow: 0rpx 6rpx 20rpx 0rpx #dddddd;
.signIn-body{
margin-left: 16rpx;
text-align: left;
line-height: 60rpx;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
}
}
</style>
......@@ -53,6 +53,10 @@
uni.hideLoading();
}, 100);
this.agreement = res.userAgreement
var reg = new RegExp('<body*>','gi')
var reg1 = new RegExp('</body*>','gi')
this.agreement = this.agreement.replace(reg, '')
this.agreement = this.agreement.replace(reg1, '')
})
}
}
......
......@@ -83,6 +83,7 @@
.appoint{
width: 100%;
height: 100%;
overflow-x:hidden;
}
.appoint-card{
......
......@@ -15,7 +15,7 @@
<!-- 选项卡内容轮播滑动显示,current为当前第几个swiper子项 -->
<swiper @change="change" :current="isActive" class="swiper-content" :style="fullHeight">
<swiper-item class="swiperitem-content">
<scroll-view scroll-y style="height: 100%;" @scrolltolower="ReachBottom" lower-threshold="150px">
<scroll-view scroll-y style="height: 100%;" lower-threshold="20px">
<view class="nav_item">
<view v-if="ByTypelist.length == 0">
<view class="none">
......@@ -28,7 +28,6 @@
margin: 40rpx 0 0 268rpx;
color: #666666;">暂无数据</view>
</view>
</view>
</view>
<view v-else class="card" v-for="(item,index) in ByTypelist" :key="index">
......@@ -51,9 +50,7 @@
</view>
</view>
</view>
<view v-show="isLoadMore"> //loading加载提示处
<uni-load-more :status="loadStatus" ></uni-load-more>
</view>
<view class="bottomAdd" v-show="total >= max" @tap="more">查看更多</view>
</view>
</scroll-view>
</swiper-item>
......@@ -245,6 +242,7 @@
},
data() {
return {
max:5,
// token:uni.getStorageSync("token"),
onMore: true,
loadStatus:'loading',
......@@ -327,7 +325,7 @@
//获取手机屏幕的高度,让其等于swiper的高度,从而使屏幕充满
uni.getSystemInfo({
success: function(res) {
that.fullHeight = "height:" + res.windowHeight + "px";
that.fullHeight = "height:" + res.windowHeight + "rpx";
}
});
// 获取标题区域宽度,和每个子元素节点的宽度
......@@ -347,6 +345,23 @@
// }},
methods: {
more() {
this.max += 10; //每次点击加1条
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total)
return uni.$showMsg('数据加载完毕!')
// if (this.isloading) return
//让页码自增1
this.queryParams.pageNum += 1
console.log(this.queryParams.pageNum)
// 重新获取列表数据
this.flag = false
this.list(this.type, this.queryParams.pageNum)
},
...mapMutations('m_user', ['updateToken']),
...mapMutations('m_user', ['updateUserInfo']),
//登录判断
......@@ -404,17 +419,17 @@
}
});
},
ReachBottom() {
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total)
return uni.$showMsg('数据加载完毕!')
// if (this.isloading) return
//让页码自增1
this.queryParams.pageNum += 1
console.log(this.queryParams.pageNum)
// 重新获取列表数据
this.flag = false
this.list(this.type, this.queryParams.pageNum)
},
// ReachBottom() {
// if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total)
// return uni.$showMsg('数据加载完毕!')
// // if (this.isloading) return
// //让页码自增1
// this.queryParams.pageNum += 1
// console.log(this.queryParams.pageNum)
// // 重新获取列表数据
// this.flag = false
// this.list(this.type, this.queryParams.pageNum)
// },
// lowerBottom() {
......@@ -689,5 +704,15 @@
height: 334rpx;
}
.bottomAdd {
display: flex;
justify-content: center;
color: rgb(94, 94, 94);
padding-bottom: 10px;
}
}
</style>
......@@ -541,6 +541,7 @@
this.flagCode = res.code
console.log(this.flagCode);
}
console.log("方法执行完毕");
resolve()
})
......@@ -549,22 +550,29 @@
},
onLoad(options) {
this.examTime = options.examTime
this.examTime = new Date().toISOString().substring(0, 10)
this.signupId = Number(options.signupId)
this.activityId = Number(options.activityId)
this.getExamTime()
this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + uni.getStorageSync('menuInfo')
.navBarHeight + 15 + 'px'
console.log("marginHight", this.marginHight);
this.getExamTime()
this.begin()
this.getFinishSituation() //判断是否完成答题
this.getDailyQuestion()
uni.setStorageSync('title', '每日答题')
this.getFinishSituation().then(()=>{
let titleTime = new Date().toISOString().substring(0, 10)
if(titleTime != options.examTime){
this.titleTime = options.examTime
console.log('titleTime',this.titleTime);
}
}) //判断是否完成答题
this.getDailyQuestion()
uni.setStorageSync('title', '每日答题')
},
onShow() {
// let titleTime = new Date().toISOString().substring(0, 10)
// if(titleTime != this.examTime){
// this.titleTime = this.examTime
// console.log('titleTime',this.titleTime);
// }
},
destroyed() {
clearInterval(this.timer);
......
......@@ -60,6 +60,7 @@
console.log("点击获取的值:", this.signupId)
console.log("当前活动id", this.activityId)
getCount(this.activityId, this.signupId).then(res => {
console.log("答题情况",res);
if (res[res.length - 1] === 0) {
this.flag = 0
this.dateIndex = res.length - 1;
......@@ -72,6 +73,9 @@
break
}
}
if(i==res.length){
this.flag = 1
}
}
// console.log("今天是否答题",res);
// this.flag = res
......@@ -87,6 +91,7 @@
})
return
}
console.log("答题情况",this.flag);
if (this.flag > 0) {
uni.showToast({
title: '您今日已答题',
......
......@@ -140,6 +140,7 @@
if(this.examCount === 0){
return uni.$showMsg('暂无试卷!')
}
console.log('答题情况',this.flag);
if (this.flag > 0) {
return uni.$showMsg('答题已完成')
} else {
......@@ -156,6 +157,7 @@
if (res.code === 200) {
this.registerPeopleNum = res.data.length
if (res.data.length === 1) {
this.registerFlag = res.data.length
this.signupId = res.data[0].signupId
getCount(activityId, this.signupId).then(response => {
console.log("今天是否答题", response);
......@@ -171,6 +173,9 @@
break
}
}
if(i==response.length){
this.flag = 1
}
}
})
} else {
......@@ -256,7 +261,7 @@
.detail-page-content {
margin: 20rpx 20rpx 20rpx 20rpx;
margin: 20rpx 30rpx 30rpx 20rpx;
.content-image {
border-radius: 30rpx 30rpx 0 0;
......@@ -274,7 +279,7 @@
.image-status {
position: absolute;
// padding-left: 84%;
right: 20rpx;
right: 30rpx;
top: 20rpx;
width: 120rpx;
height: 120rpx;
......@@ -384,9 +389,9 @@
button {
border: none;
margin-top: 13px;
margin-right: 13px;
// margin-right: 13px;
justify-content: space-between;
width: 45%;
width: 40%;
height: 44px;
background: #3b7cde;
border-radius: 16px;
......
......@@ -292,7 +292,7 @@
uni.navigateBack({
delta: 1
})
}, 1200);
}, 1500);
})
}
},
......
......@@ -206,6 +206,7 @@
width: 100%;
height: 299px;
position: relative;
overflow-x:hidden;
.avatar {
......
......@@ -3,7 +3,8 @@
<view v-if="myActivitylist.length == 0">
<view class="none">
<view class="none-ima">
<image style="width: 90%;height: 90%;margin: 288rpx 118rpx 0 118rpx;" src="../../static/content_pic_wushuju@3x.png"></image>
<image style="width: 90%;height: 90%;margin: 288rpx 118rpx 0 118rpx;"
src="../../static/content_pic_wushuju@3x.png"></image>
<view style="font-size: 16px;
width: 600rpx;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
......@@ -21,46 +22,36 @@
</view>
</view>
<view v-else class="actions-card" v-for="(item,index) in myActivitylist" :key="index">
<view class="info" >
<view class="question"><text>{{item.activityName}}</text></view>
<dividerface></dividerface>
<view class="item" style="display: flex">比赛时间:
<view class="time">
{{item.activityTime}}
</view>
</view>
<view class="item1" >
<view >
<!-- <text style="color:#FCA624;font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;" v-if="item.activityStatus==='0'">
未开始
</text>
<text style="color:#36B25B;font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;" v-if="item.activityStatus==='1'">
进行中
</text>
<text style="color:#999999;" v-if="item.activityStatus==='2'">
已结束
</text> -->
<view class="info">
<view class="question">
<text>{{item.activityName}}</text>
<view class="item1">
<image class="image-status" src="../../static/oper-icon/content_tag_weikaishi@2x.png"
v-if="item.activityStatus==='0'"></image>
<image class="image-status" src="../../static/oper-icon/content_tag_jinxingzhong@2x.png"
v-else-if="item.activityStatus==='1'"></image>
<image class="image-status" src="../../static/oper-icon/content_tag_yijieshu@2x.png" v-else></image>
<image class="image-status" src="../../static/oper-icon/content_tag_yijieshu@2x.png" v-else>
</image>
</view>
</view>
<dividerface></dividerface>
<view class="item" style="display: flex">比赛时间:<view class="time">{{item.activityTime}}</view>
</view>
<view class="item" style="display: flex">报名时间:<view class="time">
{{item.taseCreateTime||item.tasCreateTime}}
</view>
</view>
<view class="item" style="display: flex;margin-left: 34rpx;">参赛人:<view class="time">
{{item.tasName||item.taseName}}
</view>
</view>
<view style="display: flex;">
<button @click="goActivity(item.type,wechatId,item.activityId)" style="width: 50%;background-color: #3b7cde;border-radius:0 0 0 16px;">报名详情</button>
<button @click="goDetail(item.type,wechatId,item.activityId)"
style="width: 50%;background-color: #3b7cde;border-radius:0 0 16px 0;">活动详情</button>
<button style="width: 111px;
height: 30px;
background: #3b7cde;
border-radius: 15px;
line-height: 25px;
display: block;
float: right;" @click="goActivity(item.type,wechatId,item.activityId)">
<text style="font-size: 14px;color: #ffffff;font-family: Source Han Sans CN, Source Han Sans CN-Regular;">报名详情</text>
</button>
</view>
</view>
</view>
</view>
......@@ -73,65 +64,81 @@ font-weight: 400;" v-if="item.activityStatus==='1'">
import {
mapState
} from 'vuex'
import {getMyActivitySignupByWechatId} from "@/api/myActivity.js";
import { userInfo } from 'os';
import {
getMyActivitySignupByWechatId
} from "@/api/myActivity.js";
import {
userInfo
} from 'os';
export default {
data(){
return{
wechatId:null,
status:1,
myActivitylist:[],
total:0,
data() {
return {
wechatId: null,
status: 1,
myActivitylist: [],
total: 0,
}
},
computed: {
...mapState('m_user', ['userInfo']),
},
onLoad() {
this.wechatId=this.userInfo.wechatId
this.wechatId = this.userInfo.wechatId
this.getList(this.wechatId)
},
methods:{
methods: {
getList(wechatId) {
getMyActivitySignupByWechatId(wechatId).then(response => {
console.log(response)
this.myActivitylist = [...this.myActivitylist,...response.rows]||[]
this.myActivitylist = [...this.myActivitylist, ...response.rows] || []
console.log(this.myActivitylist)
this.total = response.total ||[];
this.total = response.total || [];
console.log(this.total)
});
},
goActivity(type,wechatId,activityId){
if(type==='1'){
console.log('sdsdsds',activityId)
goActivity(type, wechatId, activityId) {
if (type === '1') {
console.log('sdsdsds', activityId)
uni.navigateTo({
url:'/pages_activity/activity_signInDetail/activity_signInDetail?wechat_id='+ wechatId +'&activity_id=' + activityId
url: '/pages_activity/activity_signInDetail/activity_signInDetail?wechat_id=' + wechatId +
'&activity_id=' + activityId
})
console.log('sdsdsds',activityId)
} else {
uni.navigateTo({
url:`/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=${activityId}`
url: `/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=${activityId}`
})
}
},
goDetail(type, wechatId, activityId){
if(type==='2'){
uni.navigateTo({
url: `/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=${activityId}`
})
}
else{
uni.navigateTo({
url: `/pages_activity/activity_detail/activity_detail?activityId=${activityId}`
})
}
},
}
}
</script>
<style lang="scss" scoped>
.actions{
.actions {
width: 100%;
height: 100%;
background: #f5f5f5;
}
.actions-card{
margin:3% 2% 0 2% ;
.actions-card {
margin: 3% 2% 0 2%;
width: 96%;
min-height: 440rpx;
height: auto;
......@@ -139,22 +146,15 @@ import { userInfo } from 'os';
border-radius: 16px;
box-shadow: 0px 3px 10px 0px #dddddd;
.image-status {
// justify-content: end;
position: absolute;
padding-left: 75%;
top: 10px;
width: 120rpx;
height: 120rpx;
z-index: 9;
// margin-left: 128rpx;
}
// :nth-child(1) {
// }
.info{
.info {
font-size: 16px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
......@@ -163,6 +163,7 @@ import { userInfo } from 'os';
line-height: 36px;
.item {
padding: 3% 4%;
width: 400px;
......@@ -175,18 +176,30 @@ import { userInfo } from 'os';
color: #333333;
line-height: 36px;
}
.item1 {
padding: 5% 5%;
font-size: 35rpx;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 200;
// padding: 5% 5%;
// font-size: 35rpx;
// font-family: Source Han Sans CN, Source Han Sans CN-Regular;
// font-weight: 200;
color: #333333;
// color: #333333;
.image-status {
position: relative;
top: -60rpx;
left: 98%;
width: 120rpx;
height: 120rpx;
z-index: 9;
}
}
}
.question{
.question {
margin-top: 5%;
margin: 2% 10% 0 5%;
margin: 2% 15% 0 5%;
min-height: 72px;
height: auto;
line-height: 30px;
......@@ -196,7 +209,8 @@ import { userInfo } from 'os';
}
}
.time{
.time {
font-size: 16px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
color: #666666;
......@@ -204,22 +218,20 @@ import { userInfo } from 'os';
// line-height: 38px;
}
.none{
.none {
width: 90%;
margin:5% 5% 0 5%;
margin: 5% 5% 0 5%;
height: 1300rpx;
background: #ffffff;
border-radius: 16px;
box-shadow: 0px 3px 10px 0px #dddddd;
.none-ima{
.none-ima {
width: 472rpx;
height: 334rpx;
}
}
</style>
......@@ -9,7 +9,7 @@
<view v-if="contentFlag" class="contentVerify">内容不能为空格或回车</view>
</uni-forms-item>
<uni-forms-item label="姓名" :required="true" name="nickName">
<uni-easyinput :inputBorder="false" type="text" v-model="personnel.nickName" @input="checkInfo"
<uni-easyinput :inputBorder="false" type="text" v-model="personnel.nickName"
maxlength="10" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="手机号" :required="true" name="phone">
......@@ -59,6 +59,7 @@
nickName: '',
phone: '',
wechatId: '',
consult_type : '0'
},
rules: {
// consultContent: {
......@@ -81,9 +82,22 @@
},
{
minLength: 2,
maxLength: 10,
maxLength: 16,
errorMessage: '姓名长度在 {minLength} 到 {maxLength} 个字符',
},
{
validateFunction: function(rule, value, data, callback) {
console.log("姓名--》", value)
let nameReg =/^[\u4E00-\u9FA5]{2,16}$|^[a-zA-Z]{2,16}$/
// let nameReg2 =//
if (!nameReg.test(value)) {
callback('姓名只能输入汉字或者大小写字母,请重新填写')
}
return true
}
}
]
},
phone: {
......@@ -121,16 +135,10 @@
this.$refs.form.setRules(this.rules)
},
methods: {
checkInfo(even) {
// console.log("输入框输入内容--->", even)
// console.log(typeof even.value)
// if (typeof even.value === undefined) {
// even.value = '';
// }
},
// 提交按钮
submitForm() {
if (this.personnel.consultContent.length > 0) {
console.log("咨询内容--->", this.personnel)
if (this.personnel.consultContent && this.personnel.consultContent.length > 0) {
let reg = /^\s*$/
if (reg.test(this.personnel.consultContent)) {
this.contentFlag = true
......@@ -156,10 +164,13 @@
this.personnel = {}
})
}).catch(err => {
this.personnel = {}
console.log('表单错误信息:', err);
})
// .catch(err => {
// setTimeout( function(){
// this.personnel = {}
// console.log('表单错误信息1122:', err);
// }, 3000)
// })
},
// 关闭弹窗
......
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