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

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

parents 8c8ce8f6 a85a6720
......@@ -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, '')
})
}
}
......
......@@ -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.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', '每日答题')
let titleTime = new Date().toISOString().substring(0, 10)
if(titleTime != options.examTime){
this.titleTime = options.examTime
console.log('titleTime',this.titleTime);
}
},
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==response.length){
this.flag = 1
}
}
// console.log("今天是否答题",res);
// this.flag = res
......
......@@ -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;
......
......@@ -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