Commit 0d650242 authored by LiZongLin's avatar LiZongLin

修改

parent 74fd0240
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
success: (result) => { success: (result) => {
// 获取手机系统的状态栏高度(不同手机的状态栏高度不同) ( 不要使用uni-app官方文档的var(--status-bar-height) 官方这个是固定的20px 不对的 ) // 获取手机系统的状态栏高度(不同手机的状态栏高度不同) ( 不要使用uni-app官方文档的var(--status-bar-height) 官方这个是固定的20px 不对的 )
// console.log('当前手机的状态栏高度',result.statusBarHeight) // console.log('当前手机的状态栏高度',result.statusBarHeight)
let statusBarHeight = result.statusBarHeight + 'px' let statusBarHeight = result.statusBarHeight
uni.setStorageSync('statusBarHeight', statusBarHeight) uni.setStorageSync('statusBarHeight', statusBarHeight)
// 获取右侧胶囊的信息 单位px // 获取右侧胶囊的信息 单位px
const menuButtonInfo = uni.getMenuButtonBoundingClientRect() const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
...@@ -23,11 +23,12 @@ ...@@ -23,11 +23,12 @@
//width: 胶囊宽度 //width: 胶囊宽度
// console.log(menuButtonInfo.width, menuButtonInfo.height, menuButtonInfo.top) // console.log(menuButtonInfo.width, menuButtonInfo.height, menuButtonInfo.top)
// console.log('计算胶囊右侧距离屏幕右边距离', result.screenWidth - menuButtonInfo.right) // console.log('计算胶囊右侧距离屏幕右边距离', result.screenWidth - menuButtonInfo.right)
let navBarHeight = menuButtonInfo.height + (menuButtonInfo.top - statusBarHeight) * 2
let menuWidth = menuButtonInfo.width + 'px' let menuWidth = menuButtonInfo.width + 'px'
let menuHeight = menuButtonInfo.height + 'px' let menuHeight = menuButtonInfo.height + 'px'
let menuBorderRadius = menuButtonInfo.height / 2 + 'px' let menuBorderRadius = menuButtonInfo.height / 2 + 'px'
let menuRight = result.screenWidth - menuButtonInfo.right + 'px' let menuRight = result.screenWidth - menuButtonInfo.right + 'px'
let menuTop = menuButtonInfo.top + 'px' let menuTop = menuButtonInfo.top
let contentTop = result.statusBarHeight + 44 + 'px' let contentTop = result.statusBarHeight + 44 + 'px'
let menuInfo = { let menuInfo = {
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
menuRight: menuRight, //右侧的胶囊距离右侧屏幕距离--用来给自定义导航条页面的左侧胶囊设置使用 menuRight: menuRight, //右侧的胶囊距离右侧屏幕距离--用来给自定义导航条页面的左侧胶囊设置使用
menuTop: menuTop, //右侧的胶囊顶部距离屏幕顶部的距离--用来给自定义导航条页面的左侧胶囊设置使用 menuTop: menuTop, //右侧的胶囊顶部距离屏幕顶部的距离--用来给自定义导航条页面的左侧胶囊设置使用
contentTop: contentTop, //内容区距离页面最上方的高度--用来给自定义导航条页面的内容区定位距离使用 contentTop: contentTop, //内容区距离页面最上方的高度--用来给自定义导航条页面的内容区定位距离使用
navBarHeight:navBarHeight, //导航栏高度
} }
uni.setStorageSync('menuInfo', menuInfo) uni.setStorageSync('menuInfo', menuInfo)
}, },
......
...@@ -69,3 +69,11 @@ export function getCount(activityId,signupId) { ...@@ -69,3 +69,11 @@ export function getCount(activityId,signupId) {
}) })
} }
//查询考试时间,总共有几天
export function selectExamTime(activityId) {
return request({
url: `/tjt-race/answerQuestion/selectExamTime/${activityId}`,
method: 'get',
})
}
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
export default { export default {
data() { data() {
return { return {
statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight, //状态栏的高度(可以设置为顶部导航条的padding-top) statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight + 'px', //状态栏的高度(可以设置为顶部导航条的padding-top)
menuWidth: uni.getStorageSync('menuInfo').menuWidth, menuWidth: uni.getStorageSync('menuInfo').menuWidth,
menuHeight: uni.getStorageSync('menuInfo').menuHeight, menuHeight: uni.getStorageSync('menuInfo').menuHeight,
menuBorderRadius: uni.getStorageSync('menuInfo').menuBorderRadius, menuBorderRadius: uni.getStorageSync('menuInfo').menuBorderRadius,
menuRight: uni.getStorageSync('menuInfo').menuRight, menuRight: uni.getStorageSync('menuInfo').menuRight,
menuTop: uni.getStorageSync('menuInfo').menuTop, menuTop: uni.getStorageSync('menuInfo').menuTop + 'px',
contentTop: uni.getStorageSync('menuInfo').contentTop, contentTop: uni.getStorageSync('menuInfo').contentTop,
title: uni.getStorageSync('title'), title: uni.getStorageSync('title'),
pages:uni.getStorageSync('pages'), pages:uni.getStorageSync('pages'),
......
...@@ -63,17 +63,8 @@ ...@@ -63,17 +63,8 @@
onLoad() { onLoad() {
this.login() this.login()
this.getList() this.getList()
console.log(pages);
},
created() {
// uni.setStorageSync("title", '赛事活动')
},
onShow() {
// uni.setStorageSync('pages','activity')
// uni.setStorageSync("title", '赛事活动')
}, },
onHide() { onHide() {
// uni.setStorageSync("title", '')
this.flag = true this.flag = true
}, },
methods: { methods: {
...@@ -81,7 +72,7 @@ ...@@ -81,7 +72,7 @@
...mapMutations('m_user', ['updateUserInfo']), ...mapMutations('m_user', ['updateUserInfo']),
//登录判断 //登录判断
login() { login() {
if (JSON.stringify(this.userInfo) === '{}') { if (!this.token) {
console.log("userInfo", this.userInfo); console.log("userInfo", this.userInfo);
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/login?url=' + this.url url: '/pages/login/login?url=' + this.url
......
<template> <template>
<view class="answer-page"> <view class="answer-page" :style="{marginTop:marginHight}">
<navTop></navTop> <navTop></navTop>
<view style="height: auto;position: relative;padding-bottom: 160rpx;"> <view style="height: auto;position: relative;padding-bottom: 160rpx;">
<view class="answer-top"> <view class="answer-top">
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
</view> </view>
<view class="answer-info"> <view class="answer-info">
<view class="days"> <view class="days">
<view style="margin-top: 10%;">累计分数</view> <view style="padding-top: 6%;height: 40%;">累计分数</view>
<view style="margin-top: 8%;color: #fca624;">{{cumulativeScore}}</view> <view style="color: #fca624;">{{cumulativeScore}}</view>
</view> </view>
<view style="float: left;width: 1px;height: 88%;background: #ffffff;margin-top: 2%;"></view> <view style="float: left;width: 1px;height: 66%;background: #ffffff;margin-top: 4%;"></view>
<view class="scores"> <view class="scores">
<view style="margin-top: 10%;">活动天数</view> <view style="padding-top: 6%;height: 40%;">活动天数</view>
<view style="margin-top: 8%;color: #fca624;">{{day}}</view> <view style="color: #fca624;">{{day}}</view>
</view> </view>
</view> </view>
<view class="answer-day"> <view class="answer-day">
...@@ -22,18 +22,23 @@ ...@@ -22,18 +22,23 @@
<view class="scroll-view-item" v-for="i in dayTotal" :key="i"> <view class="scroll-view-item" v-for="i in dayTotal" :key="i">
<view <view
v-if="(i+1 === day && finishSituationList[i].flag === false) || (i+1 === day && flagCode === 201)" v-if="(i+1 === day && finishSituationList[i].flag === false) || (i+1 === day && flagCode === 201)"
style="color: #36b25b;" @click="getNotFinish(finishSituationList[i].date)">进行中 style="color: #36b25b;" @click="getNotFinish(dateList[i].examTime,i)">进行中
</view> </view>
<view v-else-if="i+1 <= day && finishSituationList[i].flag === true" <view v-else-if="i+1 <= day && finishSituationList[i].flag === true"
style="color: #999999;">已完成 style="color: #999999;">已完成
</view> </view>
<view <view
v-else-if="(i+1 <= day && finishSituationList[i].flag === false) || (i+1 <= day && flagCode === 201)" v-else-if="(i+1 <= day && finishSituationList[i].flag === false) || (i+1 <= day && flagCode === 201)"
@click="getNotFinish(finishSituationList[i].date)">未完成</view> @click="getNotFinish(dateList[i].examTime,i)">
<!-- <view id="titleline" @click="clickChange($event)">未完成</view> -->
<view v-if="titleTime == dateList[i].examTime" style="color: #36b25b;">补答中</view>
<view v-else>未完成</view>
</view>
<view v-else-if="i+1 > day">未开始</view> <view v-else-if="i+1 > day">未开始</view>
<view class="item-bottom"> <view class="item-bottom">
<text v-if="i+1 === day && finishSituationList[i].flag === false" <text
v-if="(i+1 === day && finishSituationList[i].flag === false) || (i+1 === day && flagCode === 201) ||(titleTime == dateList[i].examTime)"
style="color: #36b25b;">{{i+1}}</text> style="color: #36b25b;">{{i+1}}</text>
<text v-else>{{i+1}}</text> <text v-else>{{i+1}}</text>
...@@ -80,7 +85,10 @@ ...@@ -80,7 +85,10 @@
<view>{{ti}}</view> <view>{{ti}}</view>
</view> </view>
</view> </view>
<button @click="gotoActivity">我知道了</button> <view class="result-button">
<button @click="gotoActivity('返回答题')">返回答题</button>
<button @click="gotoActivity('返回活动')">返回活动</button>
</view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
...@@ -90,7 +98,8 @@ ...@@ -90,7 +98,8 @@
import { import {
dailyQuestion, dailyQuestion,
addScore, addScore,
selectScore selectScore,
selectExamTime
} from '@/api/dailyAnswer.js' } from '@/api/dailyAnswer.js'
import { import {
getActivity getActivity
...@@ -101,6 +110,8 @@ ...@@ -101,6 +110,8 @@
export default { export default {
data() { data() {
return { return {
titleTime: '',
marginHight: '',
flagCode: '', //完成情况 flagCode: '', //完成情况
status: '', status: '',
dateList: [], //从活动开始到现在的日期 dateList: [], //从活动开始到现在的日期
...@@ -134,31 +145,42 @@ ...@@ -134,31 +145,42 @@
}, },
methods: { methods: {
//答题完成返回赛事活动页面 //答题完成返回赛事活动页面
gotoActivity() { gotoActivity(back) {
addScore(this.signupId, this.examId, this.score).then(res => { console.log("时间标志", this.flagTime);
console.log('成绩录入', res);
})
let today = new Date().toISOString().substring(0, 10) let today = new Date().toISOString().substring(0, 10)
let flag = this.getDaysBetween(this.flagTime, today) let flag = this.getDaysBetween(this.flagTime, today)
console.log("天数", flag); console.log("天数", flag);
if (flag === 1) { if (back === '返回活动') {
if (uni.getSystemInfoSync('pages') === 'activityDetail') { if (uni.getSystemInfoSync('pages') === 'activityDetail') {
uni.navigateBack({ uni.navigateBack({
// url: '/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=' + this.activityId
delta: 1 delta: 1
}) })
} else { } else {
uni.navigateBack({ uni.navigateBack({
// url: '/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=' + this.activityId
delta: 2 delta: 2
}) })
} }
} else { } else {
// uni.setStorageSync('pages', 'dailyActivity') // uni.setStorageSync('pages', 'dailyActivity')
console.log(flag); console.log(flag);
this.getFinishSituation()
this.$refs.popup.close() this.$refs.popup.close()
this.getFinishSituation().then(()=>{
console.log("finishSituationList", this.finishSituationList);
for (let i = 0; i < this.dayTotal; i++) {
if (i < this.day) {
if (this.finishSituationList[i].flag === false) {
console.log(this.finishSituationList[i]);
this.getNotFinish(this.finishSituationList[i].date, i)
}
}
if (i === this.dayTotal - 1) {
uni.showToast({
title: '所有答题已完成,请退出答题页面'
})
}
}
})
} }
}, },
//下一题 //下一题
...@@ -217,30 +239,37 @@ ...@@ -217,30 +239,37 @@
clearInterval(this.timer) clearInterval(this.timer)
// this.timer = null // this.timer = null
} }
addScore(this.signupId, this.examId, this.score).then(res => {
console.log('成绩录入', res);
})
console.log(this.ti) console.log(this.ti)
}, },
//获取状态 //得到考试时间
// getStatus(i) { getExamTime() {
// let flag = this.finishStatus.some(item => { selectExamTime(this.activityId).then(res => {
// console.log(item); console.log("考试时间", res);
// }) if (res.code === 200) {
// if (flag == true) { this.dayTotal = res.data[0].count
// this.flag = 1 this.dateList = res.data
// } else { }
// flag = 0 })
// }
// return flag
// console.log('hehe', this.dateList);
// },
//计算日期
dateCalculation(day) {
let date = new Date(this.examTime);
date.setDate(date.getDate() - day);
let month = date.getMonth() + 1; //月份从0开始所以需要+1
var day = date.getDate();
let date1 = date.getFullYear() + '-' + month + '-' + day
this.dateList.push(date1)
}, },
//计算日期
// dateCalculation(day) {
// let date = new Date(this.examTime);
// date.setDate(date.getDate() - day);
// let month = date.getMonth() + 1; //月份从0开始所以需要+1
// var day = date.getDate();
// let date1 = date.getFullYear() + '-' + month + '-' + day
// this.dateList.push(date1)
// },
// clickChange(e){
// console.log(e);
// let id = e.currentTarget.id
// let titleLine = this.$refs.id
// titleLine.innerHTML = '补答中'
// document.write(titleLine.innerHTML)
// },
//获取当前是第几天 //获取当前是第几天
getDaysBetween(date1, date2) { getDaysBetween(date1, date2) {
let startDate = Date.parse(date1); let startDate = Date.parse(date1);
...@@ -253,7 +282,12 @@ ...@@ -253,7 +282,12 @@
console.log(this.day); console.log(this.day);
}, },
//获取未完成的试卷 //获取未完成的试卷
getNotFinish(date) { getNotFinish(date, index) {
console.log('index', index);
if (index <= this.day - 1) {
this.titleTime = this.dateList[index].examTime
console.log(this.titleTime);
}
let question = [] let question = []
let questionId = new Array() let questionId = new Array()
let questionItem = { let questionItem = {
...@@ -262,20 +296,13 @@ ...@@ -262,20 +296,13 @@
questionId: 0, questionId: 0,
question: '' question: ''
} }
console.log("date", date);
dailyQuestion(this.signupId, date).then(res => { dailyQuestion(this.signupId, date).then(res => {
console.log(res); // console.log(res);
if (res.code === 200) { if (res.code === 200) {
// this.bannerImage = res.data[0].bannerImage // this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //标志时间
// this.total = res.data[0].questionsNum this.flagTime =res.data[0].examTime//标志时间
this.flagTime = res.data[0].examTime //标志时间
// this.day = this.getDaysBetween(res.data[0].activityStart, res.data[0]
// .examTime) //今天是答题活动的第几天
// for (let i = 0; i < this.day; i++) {
// this.dateCalculation(i)
// }
this.examId = res.data[0].examId this.examId = res.data[0].examId
// this.dayTotal = this.getDaysBetween(res.data[0].activityStart, res.data[0].activityEnd)
// this.getFinishSituationList()
let question1 = new Array() let question1 = new Array()
res.data.forEach(e => { res.data.forEach(e => {
question1.push(e.questionId) question1.push(e.questionId)
...@@ -288,6 +315,7 @@ ...@@ -288,6 +315,7 @@
questionId.push(val) questionId.push(val)
} }
}) })
this.total = res.data[0].questionsNum
//将取到的题目id集合反转 //将取到的题目id集合反转
questionId = questionId.reverse() questionId = questionId.reverse()
for (let i = 0; i < res.data.length / 4; i++) { for (let i = 0; i < res.data.length / 4; i++) {
...@@ -369,18 +397,28 @@ ...@@ -369,18 +397,28 @@
this.bannerImage = res.data[0].bannerImage this.bannerImage = res.data[0].bannerImage
this.total = res.data[0].questionsNum this.total = res.data[0].questionsNum
this.flagTime = res.data[0].examTime this.flagTime = res.data[0].examTime
// this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd')
this.examTime = res.data[0].examTime //今天的日期 this.examTime = res.data[0].examTime //今天的日期
this.day = this.getDaysBetween(res.data[0].activityStart, res.data[0] // this.examTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //今天的日期
.examTime) //今天是答题活动的第几天 // this.day = this.getDaysBetween(res.data[0].activityStart, res.data[0]
// console.log("今天是活动的第几天", this.day); // .examTime) //今天是答题活动的第几天
for (let i = 0; i < this.day; i++) { console.log("examTime", this.examTime);
this.dateCalculation(i) console.log("dataList", this.dateList);
for (let j = 0; j < this.dateList.length; j++) {
if (this.dateList[j].examTime == res.data[0].examTime) {
// if (formatDate(this.dateList[j].examTime, 'yyyy-MM-dd') == formatDate(res.data[0].examTime, 'yyyy-MM-dd')) {
this.day = j + 1
}
} }
console.log("今天是活动的第几天", this.day);
// for (let i = 0; i < this.day; i++) {
// this.dateCalculation(i)
// }
this.examId = res.data[0].examId this.examId = res.data[0].examId
console.log(this.dateList); // console.log(this.dateList);
this.dayTotal = this.getDaysBetween(res.data[0].activityStart, res.data[0].activityEnd) // this.dayTotal = this.getDaysBetween(res.data[0].activityStart, res.data[0].activityEnd)
// this.getFinishSituationList() // this.getFinishSituationList()
console.log("该活动总共多少天", this.dayTotal); // console.log("该活动总共多少天", this.dayTotal);
let question1 = new Array() let question1 = new Array()
res.data.forEach(e => { res.data.forEach(e => {
question1.push(e.questionId) question1.push(e.questionId)
...@@ -396,12 +434,11 @@ ...@@ -396,12 +434,11 @@
//将取到的题目id集合反转 //将取到的题目id集合反转
questionId = questionId.reverse() questionId = questionId.reverse()
console.log("试卷总共多少题", res.data.length / 4); console.log("试卷总共多少题", res.data.length / 4);
const length = res.data.length / 4 for (let i = 0; i < res.data.length / 4; i++) {
for (let i = 0; i < length; i++) {
// console.log('i', i); // console.log('i', i);
let questionNum = questionId[i] let questionNum = questionId[i]
res.data.forEach(item => { res.data.forEach(item => {
if (item.questionId === questionNum) { if (item.questionId === questionId[i]) {
questionItem.question = item.topic questionItem.question = item.topic
questionItem.questionId = item.questionId questionItem.questionId = item.questionId
if (item.answer === '1') { if (item.answer === '1') {
...@@ -458,64 +495,67 @@ ...@@ -458,64 +495,67 @@
let flag = {} let flag = {}
this.finishSituationList = [] this.finishSituationList = []
// this.finishSituationList.length = 0 // this.finishSituationList.length = 0
selectScore(this.signupId, this.examTime).then(res => { return new Promise((resolve, reject) => {
console.log('完成情况', res); selectScore(this.signupId, this.examTime).then(res => {
console.log("dateList", this.dateList); console.log('完成情况', res);
// debugger console.log("dateList", this.dateList);
if (res.code === 200) { if (res.code === 200) {
this.finishStatus = res.data this.finishStatus = res.data
this.cumulativeScore = res.data[0].cumulativeScore this.cumulativeScore = res.data[0].cumulativeScore
let flag = '' let flag = ''
let situation = { let situation = {
date: '',
flag: ''
}
this.dateList.forEach(temp => {
flag = ''
temp = formatDate(temp, 'yyyy-MM-dd')
// console.log('time', formatDate(item.tjtActivityProject.examTime, 'yyyy-MM-dd'));
// flag = formatDate(item.tjtActivityProject.examTime, 'yyyy-MM-dd') == temp
flag = this.finishStatus.some(item =>
formatDate(item.tjtActivityProject.examTime, 'yyyy-MM-dd') === temp
)
situation.date = temp
situation.flag = flag
this.finishSituationList.push(situation)
situation = {
date: '', date: '',
flag: '' flag: ''
} }
}) this.dateList.forEach(temp => {
this.finishSituationList = this.finishSituationList.reverse() flag = this.finishStatus.some(item =>
console.log('flag', this.finishSituationList); formatDate(item.tjtActivityProject.examTime,'yyyy-MM-dd') === temp.examTime
} else { )
this.flagCode = res.code //昨天
// situation.date = temp
situation.date = temp.examTime
situation.flag = flag
this.finishSituationList.push(situation)
situation = {
date: '',
flag: ''
}
})
// this.finishSituationList = this.finishSituationList.reverse()
console.log('flag', this.finishSituationList);
this.titleTime = ''
// this.getDailyQuestion()
} else {
this.flagCode = res.code
console.log(this.flagCode);
// let situation = {
// date: '',
// flag: ''
// }
// console.log("dateList", this.dateList);
// console.log("dateList", this.dateList.length);
// this.dateList.forEach(item => {
// // date = formatDate(date, 'yyyy-MM-dd')
// // console.log(date);
// // situation.date = date
// // situation.flag = false
// // this.finishSituationList.push(situation)
// // situation = {
// // date: '',
// // flag: ''
// // }
// console.log(item);
// })
// situation = {
// date: '',
// flag: ''
// }
// console.log('flag', this.finishSituationList);
}
resolve()
})
// let situation = {
// date: '',
// flag: ''
// }
// console.log("dateList", this.dateList);
// console.log("dateList", this.dateList.length);
// this.dateList.forEach(item => {
// // date = formatDate(date, 'yyyy-MM-dd')
// // console.log(date);
// // situation.date = date
// // situation.flag = false
// // this.finishSituationList.push(situation)
// // situation = {
// // date: '',
// // flag: ''
// // }
// console.log(item);
// })
// situation = {
// date: '',
// flag: ''
// }
// console.log('flag', this.finishSituationList);
}
}) })
} }
...@@ -524,38 +564,31 @@ ...@@ -524,38 +564,31 @@
this.examTime = new Date().toISOString().substring(0, 10) 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)
// console.log(options); this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + uni.getStorageSync('menuInfo')
.navBarHeight + 15 + 'px'
console.log("marginHight", this.marginHight);
this.begin() this.begin()
this.getExamTime()
this.getFinishSituation() //判断是否完成答题 this.getFinishSituation() //判断是否完成答题
this.getDailyQuestion() this.getDailyQuestion()
uni.setStorageSync('title','每日答题') uni.setStorageSync('title', '每日答题')
// this.getActivityDetail()
},
onShow() {
},
onHide() {
console.log("haha");
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
console.log("哈哈");
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.answer-page { .answer-page {
// position: relative;
min-height: 100%; min-height: 100%;
height: auto; height: auto;
margin-top: 30rpx; margin-top: 180rpx;
.answer-top { .answer-top {
position: relative; position: relative;
// bottom: 20rpx;
width: 96%; width: 96%;
height: 45vh; height: 40%;
background: #ffffff; background: #ffffff;
border-radius: 16px; border-radius: 16px;
box-shadow: 0px 3px 10px 0px #dddddd; box-shadow: 0px 3px 10px 0px #dddddd;
...@@ -564,11 +597,11 @@ ...@@ -564,11 +597,11 @@
.answer-image { .answer-image {
position: relative; position: relative;
width: 100%; width: 100%;
height: 30vh; height: 165px;
// border-radius: 30rpx;
image { image {
border-radius: 30rpx; border-top-right-radius: 30rpx;
border-top-left-radius: 30rpx;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
...@@ -578,11 +611,11 @@ ...@@ -578,11 +611,11 @@
.answer-info { .answer-info {
display: flex; display: flex;
position: absolute; position: absolute;
bottom: 22%; bottom: 24%;
left: 15%; left: 15%;
z-index: 4; z-index: 4;
width: 70%; width: 70%;
height: 26%; height: 25%;
background: #2481e0; background: #2481e0;
border-radius: 16px; border-radius: 16px;
...@@ -611,12 +644,13 @@ ...@@ -611,12 +644,13 @@
} }
.answer-day { .answer-day {
margin-top: 10%; margin-top: 12%;
width: 100%; width: 100%;
height: 20%; height: 20%;
background: rgba(245, 245, 245, 0.00); background: rgba(245, 245, 245, 0.00);
border-bottom-left-radius: 16px; border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px; border-bottom-right-radius: 16px;
padding-bottom: 2%;
.scroll-view_H { .scroll-view_H {
min-width: 100%; min-width: 100%;
...@@ -632,7 +666,6 @@ ...@@ -632,7 +666,6 @@
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
color: #666666; color: #666666;
// margin-left: 2%;
.item-bottom { .item-bottom {
text-align: center; text-align: center;
...@@ -761,10 +794,10 @@ ...@@ -761,10 +794,10 @@
} }
image { image {
margin: 5% 30% 0 25%; margin: 10% 30% 5% 30%;
width: 50%; width: 40%;
height: 30%; height: 20%;
border: 1px dashed #009DFF; // border: 1px dashed #009DFF;
} }
.popup-scores { .popup-scores {
...@@ -801,14 +834,22 @@ ...@@ -801,14 +834,22 @@
} }
} }
button { .result-button {
border-radius: 16px;
background: #3b7cde;
width: 40%;
height: 10%;
margin-top: 6%; margin-top: 6%;
margin-left: 30%; margin-left: 10%;
color: #ffffff; height: 10%;
width: 80%;
display: flex;
justify-content: space-between;
button {
border-radius: 16px;
background: #3b7cde;
width: 40%;
// height: 10%;
color: #ffffff;
}
} }
} }
} }
......
...@@ -73,24 +73,13 @@ ...@@ -73,24 +73,13 @@
}, },
onShow() { onShow() {
uni.setStorageSync('pages','activityDetail') uni.setStorageSync('pages','activityDetail')
// uni.setStorageSync("title", '赛事活动详情')
this.getRegister(this.activityId) this.getRegister(this.activityId)
// this.getRegister(+this.activityInfo.activityId)
},
onHide() {
// uni.setStorageSync('pages','activity')
// uni.setStorageSync("title", '赛事活动')
}, },
onLoad(options) { onLoad(options) {
this.activityId = options.activityId this.activityId = options.activityId
this.getActivityDetial(this.activityId) this.getActivityDetial(this.activityId)
this.wechatId = this.userInfo.wechatId this.wechatId = this.userInfo.wechatId
}, },
created() {
// uni.setStorageSync("title", '赛事活动详情')
// uni.setStorageSync('pages','activityDetail')
},
methods: { methods: {
//计算到截止报名还有几天 //计算到截止报名还有几天
getDaysBetween(endDate) { getDaysBetween(endDate) {
...@@ -132,7 +121,7 @@ ...@@ -132,7 +121,7 @@
if (this.flag > 0) { if (this.flag > 0) {
return uni.$showMsg('今日答题已完成') return uni.$showMsg('今日答题已完成')
} else { } else {
uni.reLaunch({ uni.navigateTo({
url: `/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer?signupId=${this.signupId}&activityId=${this.activityInfo.activityId}` url: `/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer?signupId=${this.signupId}&activityId=${this.activityInfo.activityId}`
}) })
} }
...@@ -254,7 +243,7 @@ ...@@ -254,7 +243,7 @@
height: 72rpx; height: 72rpx;
opacity: 0.6; opacity: 0.6;
background: #000000; background: #000000;
top: -86rpx; top: -82rpx;
z-index: 9; z-index: 9;
font-size: 18px; font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Medium; font-family: Source Han Sans CN, Source Han Sans CN-Medium;
......
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
title: '报名成功!', title: '报名成功!',
icon: 'none' icon: 'none'
}) })
uni.reLaunch({ uni.navigateTo({
url: `/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer?activityId=${this.info.activityId}&signupId=${res}` url: `/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer?activityId=${this.info.activityId}&signupId=${res}`
}) })
}else{ }else{
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
<view class="feedback-page"> <view class="feedback-page">
<view class="feedback-content"> <view class="feedback-content">
<view class="content-item" style="width: 100%;"> <view class="content-item" style="width: 100%;">
<view> <view class="content-textarea">
<!-- <textarea class="content-textarea" v-model="uploadOpus.opusBrief" @blur="bindTextAreaBlur" placeholder="请输入内容"/> --> <!-- <textarea class="content-textarea" v-model="uploadOpus.opusBrief" @blur="bindTextAreaBlur" placeholder="请输入内容"/> -->
<textarea class="content-textarea" v-model.trim="uploadOpus.question" placeholder="请输入内容" /> <uni-easyinput styles="" v-model="uploadOpus.question" placeholder="请输入内容" :inputBorder="false"
:trim="both" type="textarea" ></uni-easyinput>
</view> </view>
</view> </view>
<view class="content-item" style="width: 100%;"> <view class="content-item" style="width: 100%;">
...@@ -120,7 +121,25 @@ ...@@ -120,7 +121,25 @@
onLoad() { onLoad() {
this.uploadOpus.wechatId = this.userInfo.wechatId this.uploadOpus.wechatId = this.userInfo.wechatId
}, },
// watch: {
// 'uploadOpus.question': {
// handler(newName, oldName) {
// console.log(newName);
// this.uploadOpus.question = newName.replace('[^\\s\\r\\n]+', "")
// },
// immediate: true
// }
// },
methods: { methods: {
contentInpt(e) {
console.log(e);
// let value = e.target.value;
if (!e || e == " " || e=='\n') {
return '';
}
this.uploadOpus.question = e.replace('[^\\s\\r\\n]+', "")
},
//清空
clearList() { clearList() {
// this.uploadOpus.wechatId = '' // this.uploadOpus.wechatId = ''
this.uploadOpus.phone = '' this.uploadOpus.phone = ''
...@@ -217,18 +236,14 @@ ...@@ -217,18 +236,14 @@
opusList = this.imageList opusList = this.imageList
this.uploadOpus.wechatId = this.wechatId this.uploadOpus.wechatId = this.wechatId
// 上传数据 // 上传数据
uni.showLoading({
title: '上传中',
mask: true
});
addFeedBack(this.uploadOpus).then(response => { addFeedBack(this.uploadOpus).then(response => {
console.log("上传作品后端获取的数据:", response) console.log("上传作品后端获取的数据:", response)
// 接收后端传回的作品id,在作为附带信息和文件传到后端 // 接收后端传回的作品id,在作为附带信息和文件传到后端
uni.showToast({
title: '反馈成功!',
icon: 'none',
duration: 3000
})
let feedbackId = response.data let feedbackId = response.data
// if (opusList.length <= 0) return // if (opusList.length <= 0) return
for (let i = 0; i < opusList.length; i++) { for (let i = 0; i < opusList.length; i++) {
...@@ -255,9 +270,11 @@ ...@@ -255,9 +270,11 @@
setTimeout(function() { setTimeout(function() {
uni.hideLoading(); uni.hideLoading();
}, 100); }, 100);
console.log("上传结果:", response)
this.clearList() this.clearList()
this.imageList = [] this.imageList = []
uni.navigateBack({
delta: 1
})
}) })
}, },
} }
...@@ -428,20 +445,21 @@ ...@@ -428,20 +445,21 @@
.feedback-bottom { .feedback-bottom {
width: 100%; width: 100%;
height: 10%; height: 10%;
// position: relative; position: relative;
bottom: 0; bottom: 0;
background: #ffffff; background: #ffffff;
button { button {
width: 80%; width: 80%;
height: 80%; height: 80%;
top: 13%; top: 12%;
background: #3b7cde; background: #3b7cde;
border-radius: 16px; border-radius: 16px;
font-size: 18px; font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular; font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
line-height: 3;
} }
} }
} }
......
...@@ -4,10 +4,10 @@ const url_all = { ...@@ -4,10 +4,10 @@ const url_all = {
// 'DEV': 'http://192.168.1.161:8080', // 开发 // 'DEV': 'http://192.168.1.161:8080', // 开发
// 'DEV': 'http://192.168.1.13:8080', // 英伟姐 // 'DEV': 'http://192.168.1.13:8080', // 英伟姐
// DEV: "http://116.205.136.218:8088/api", //线上服务 // DEV: "http://116.205.136.218:8088/api", //线上服务
// 'DEV': 'http://127.0.0.1:8080', // 开发 // 'DEV': 'http://127.0.0.1:8080' // 开发
'DEV': 'http://192.168.1.4:8080' // 'DEV': 'http://192.168.1.11:8080'
// 'DEV': 'http://192.168.0.72:8080' // 'DEV': 'http://192.168.0.72:8080'
// 'DEV':'https://www.aiwanyundong.com/api' 'DEV':'https://www.aiwanyundong.com/api'
}; };
let BASEURL = url_all["DEV"]; let BASEURL = url_all["DEV"];
......
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