Commit d2d8ce0c authored by 刘鑫鹏's avatar 刘鑫鹏

Merge remote-tracking branch 'origin/dev' into dev

parents 8c8ce8f6 a85a6720
...@@ -53,6 +53,10 @@ ...@@ -53,6 +53,10 @@
uni.hideLoading(); uni.hideLoading();
}, 100); }, 100);
this.agreement = res.userAgreement 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, '')
}) })
} }
} }
......
...@@ -541,6 +541,7 @@ ...@@ -541,6 +541,7 @@
this.flagCode = res.code this.flagCode = res.code
console.log(this.flagCode); console.log(this.flagCode);
} }
console.log("方法执行完毕");
resolve() resolve()
}) })
...@@ -549,22 +550,29 @@ ...@@ -549,22 +550,29 @@
}, },
onLoad(options) { onLoad(options) {
this.examTime = options.examTime this.examTime = new Date().toISOString().substring(0, 10)
this.signupId = Number(options.signupId) this.signupId = Number(options.signupId)
this.activityId = Number(options.activityId) this.activityId = Number(options.activityId)
this.getExamTime()
this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + uni.getStorageSync('menuInfo') this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + uni.getStorageSync('menuInfo')
.navBarHeight + 15 + 'px' .navBarHeight + 15 + 'px'
console.log("marginHight", this.marginHight);
this.getExamTime()
this.begin() this.begin()
this.getFinishSituation() //判断是否完成答题 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() this.getDailyQuestion()
uni.setStorageSync('title', '每日答题') uni.setStorageSync('title', '每日答题')
let titleTime = new Date().toISOString().substring(0, 10) },
if(titleTime != options.examTime){ onShow() {
this.titleTime = options.examTime // let titleTime = new Date().toISOString().substring(0, 10)
console.log('titleTime',this.titleTime); // if(titleTime != this.examTime){
} // this.titleTime = this.examTime
// console.log('titleTime',this.titleTime);
// }
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
console.log("点击获取的值:", this.signupId) console.log("点击获取的值:", this.signupId)
console.log("当前活动id", this.activityId) console.log("当前活动id", this.activityId)
getCount(this.activityId, this.signupId).then(res => { getCount(this.activityId, this.signupId).then(res => {
console.log("答题情况",res);
if (res[res.length - 1] === 0) { if (res[res.length - 1] === 0) {
this.flag = 0 this.flag = 0
this.dateIndex = res.length - 1; this.dateIndex = res.length - 1;
...@@ -72,6 +73,9 @@ ...@@ -72,6 +73,9 @@
break break
} }
} }
if(i==response.length){
this.flag = 1
}
} }
// console.log("今天是否答题",res); // console.log("今天是否答题",res);
// this.flag = res // this.flag = res
......
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
if(this.examCount === 0){ if(this.examCount === 0){
return uni.$showMsg('暂无试卷!') return uni.$showMsg('暂无试卷!')
} }
console.log('答题情况',this.flag);
if (this.flag > 0) { if (this.flag > 0) {
return uni.$showMsg('答题已完成') return uni.$showMsg('答题已完成')
} else { } else {
...@@ -156,6 +157,7 @@ ...@@ -156,6 +157,7 @@
if (res.code === 200) { if (res.code === 200) {
this.registerPeopleNum = res.data.length this.registerPeopleNum = res.data.length
if (res.data.length === 1) { if (res.data.length === 1) {
this.registerFlag = res.data.length
this.signupId = res.data[0].signupId this.signupId = res.data[0].signupId
getCount(activityId, this.signupId).then(response => { getCount(activityId, this.signupId).then(response => {
console.log("今天是否答题", response); console.log("今天是否答题", response);
...@@ -171,6 +173,9 @@ ...@@ -171,6 +173,9 @@
break break
} }
} }
if(i==response.length){
this.flag = 1
}
} }
}) })
} else { } else {
...@@ -256,7 +261,7 @@ ...@@ -256,7 +261,7 @@
.detail-page-content { .detail-page-content {
margin: 20rpx 20rpx 20rpx 20rpx; margin: 20rpx 30rpx 30rpx 20rpx;
.content-image { .content-image {
border-radius: 30rpx 30rpx 0 0; border-radius: 30rpx 30rpx 0 0;
...@@ -274,7 +279,7 @@ ...@@ -274,7 +279,7 @@
.image-status { .image-status {
position: absolute; position: absolute;
// padding-left: 84%; // padding-left: 84%;
right: 20rpx; right: 30rpx;
top: 20rpx; top: 20rpx;
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
...@@ -384,9 +389,9 @@ ...@@ -384,9 +389,9 @@
button { button {
border: none; border: none;
margin-top: 13px; margin-top: 13px;
margin-right: 13px; // margin-right: 13px;
justify-content: space-between; justify-content: space-between;
width: 45%; width: 40%;
height: 44px; height: 44px;
background: #3b7cde; background: #3b7cde;
border-radius: 16px; border-radius: 16px;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view v-if="contentFlag" class="contentVerify">内容不能为空格或回车</view> <view v-if="contentFlag" class="contentVerify">内容不能为空格或回车</view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="姓名" :required="true" name="nickName"> <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="请输入姓名" /> maxlength="10" placeholder="请输入姓名" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="手机号" :required="true" name="phone"> <uni-forms-item label="手机号" :required="true" name="phone">
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
nickName: '', nickName: '',
phone: '', phone: '',
wechatId: '', wechatId: '',
consult_type : '0'
}, },
rules: { rules: {
// consultContent: { // consultContent: {
...@@ -81,9 +82,22 @@ ...@@ -81,9 +82,22 @@
}, },
{ {
minLength: 2, minLength: 2,
maxLength: 10, maxLength: 16,
errorMessage: '姓名长度在 {minLength} 到 {maxLength} 个字符', 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: { phone: {
...@@ -121,16 +135,10 @@ ...@@ -121,16 +135,10 @@
this.$refs.form.setRules(this.rules) this.$refs.form.setRules(this.rules)
}, },
methods: { methods: {
checkInfo(even) {
// console.log("输入框输入内容--->", even)
// console.log(typeof even.value)
// if (typeof even.value === undefined) {
// even.value = '';
// }
},
// 提交按钮 // 提交按钮
submitForm() { submitForm() {
if (this.personnel.consultContent.length > 0) { console.log("咨询内容--->", this.personnel)
if (this.personnel.consultContent && this.personnel.consultContent.length > 0) {
let reg = /^\s*$/ let reg = /^\s*$/
if (reg.test(this.personnel.consultContent)) { if (reg.test(this.personnel.consultContent)) {
this.contentFlag = true this.contentFlag = true
...@@ -156,10 +164,13 @@ ...@@ -156,10 +164,13 @@
this.personnel = {} 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