Commit 0d650242 authored by LiZongLin's avatar LiZongLin

修改

parent 74fd0240
......@@ -11,7 +11,7 @@
success: (result) => {
// 获取手机系统的状态栏高度(不同手机的状态栏高度不同) ( 不要使用uni-app官方文档的var(--status-bar-height) 官方这个是固定的20px 不对的 )
// console.log('当前手机的状态栏高度',result.statusBarHeight)
let statusBarHeight = result.statusBarHeight + 'px'
let statusBarHeight = result.statusBarHeight
uni.setStorageSync('statusBarHeight', statusBarHeight)
// 获取右侧胶囊的信息 单位px
const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
......@@ -23,11 +23,12 @@
//width: 胶囊宽度
// console.log(menuButtonInfo.width, menuButtonInfo.height, menuButtonInfo.top)
// console.log('计算胶囊右侧距离屏幕右边距离', result.screenWidth - menuButtonInfo.right)
let navBarHeight = menuButtonInfo.height + (menuButtonInfo.top - statusBarHeight) * 2
let menuWidth = menuButtonInfo.width + 'px'
let menuHeight = menuButtonInfo.height + 'px'
let menuBorderRadius = menuButtonInfo.height / 2 + 'px'
let menuRight = result.screenWidth - menuButtonInfo.right + 'px'
let menuTop = menuButtonInfo.top + 'px'
let menuTop = menuButtonInfo.top
let contentTop = result.statusBarHeight + 44 + 'px'
let menuInfo = {
......@@ -38,6 +39,7 @@
menuRight: menuRight, //右侧的胶囊距离右侧屏幕距离--用来给自定义导航条页面的左侧胶囊设置使用
menuTop: menuTop, //右侧的胶囊顶部距离屏幕顶部的距离--用来给自定义导航条页面的左侧胶囊设置使用
contentTop: contentTop, //内容区距离页面最上方的高度--用来给自定义导航条页面的内容区定位距离使用
navBarHeight:navBarHeight, //导航栏高度
}
uni.setStorageSync('menuInfo', menuInfo)
},
......
......@@ -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 @@
export default {
data() {
return {
statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight, //状态栏的高度(可以设置为顶部导航条的padding-top)
statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight + 'px', //状态栏的高度(可以设置为顶部导航条的padding-top)
menuWidth: uni.getStorageSync('menuInfo').menuWidth,
menuHeight: uni.getStorageSync('menuInfo').menuHeight,
menuBorderRadius: uni.getStorageSync('menuInfo').menuBorderRadius,
menuRight: uni.getStorageSync('menuInfo').menuRight,
menuTop: uni.getStorageSync('menuInfo').menuTop,
menuTop: uni.getStorageSync('menuInfo').menuTop + 'px',
contentTop: uni.getStorageSync('menuInfo').contentTop,
title: uni.getStorageSync('title'),
pages:uni.getStorageSync('pages'),
......
......@@ -63,17 +63,8 @@
onLoad() {
this.login()
this.getList()
console.log(pages);
},
created() {
// uni.setStorageSync("title", '赛事活动')
},
onShow() {
// uni.setStorageSync('pages','activity')
// uni.setStorageSync("title", '赛事活动')
},
onHide() {
// uni.setStorageSync("title", '')
this.flag = true
},
methods: {
......@@ -81,7 +72,7 @@
...mapMutations('m_user', ['updateUserInfo']),
//登录判断
login() {
if (JSON.stringify(this.userInfo) === '{}') {
if (!this.token) {
console.log("userInfo", this.userInfo);
uni.reLaunch({
url: '/pages/login/login?url=' + this.url
......
......@@ -73,24 +73,13 @@
},
onShow() {
uni.setStorageSync('pages','activityDetail')
// uni.setStorageSync("title", '赛事活动详情')
this.getRegister(this.activityId)
// this.getRegister(+this.activityInfo.activityId)
},
onHide() {
// uni.setStorageSync('pages','activity')
// uni.setStorageSync("title", '赛事活动')
},
onLoad(options) {
this.activityId = options.activityId
this.getActivityDetial(this.activityId)
this.wechatId = this.userInfo.wechatId
},
created() {
// uni.setStorageSync("title", '赛事活动详情')
// uni.setStorageSync('pages','activityDetail')
},
methods: {
//计算到截止报名还有几天
getDaysBetween(endDate) {
......@@ -132,7 +121,7 @@
if (this.flag > 0) {
return uni.$showMsg('今日答题已完成')
} else {
uni.reLaunch({
uni.navigateTo({
url: `/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer?signupId=${this.signupId}&activityId=${this.activityInfo.activityId}`
})
}
......@@ -254,7 +243,7 @@
height: 72rpx;
opacity: 0.6;
background: #000000;
top: -86rpx;
top: -82rpx;
z-index: 9;
font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Medium;
......
......@@ -294,7 +294,7 @@
title: '报名成功!',
icon: 'none'
})
uni.reLaunch({
uni.navigateTo({
url: `/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer?activityId=${this.info.activityId}&signupId=${res}`
})
}else{
......
......@@ -2,9 +2,10 @@
<view class="feedback-page">
<view class="feedback-content">
<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.trim="uploadOpus.question" placeholder="请输入内容" />
<uni-easyinput styles="" v-model="uploadOpus.question" placeholder="请输入内容" :inputBorder="false"
:trim="both" type="textarea" ></uni-easyinput>
</view>
</view>
<view class="content-item" style="width: 100%;">
......@@ -120,7 +121,25 @@
onLoad() {
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: {
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() {
// this.uploadOpus.wechatId = ''
this.uploadOpus.phone = ''
......@@ -217,18 +236,14 @@
opusList = this.imageList
this.uploadOpus.wechatId = this.wechatId
// 上传数据
uni.showLoading({
title: '上传中',
mask: true
});
addFeedBack(this.uploadOpus).then(response => {
console.log("上传作品后端获取的数据:", response)
// 接收后端传回的作品id,在作为附带信息和文件传到后端
uni.showToast({
title: '反馈成功!',
icon: 'none',
duration: 3000
})
let feedbackId = response.data
// if (opusList.length <= 0) return
for (let i = 0; i < opusList.length; i++) {
......@@ -255,9 +270,11 @@
setTimeout(function() {
uni.hideLoading();
}, 100);
console.log("上传结果:", response)
this.clearList()
this.imageList = []
uni.navigateBack({
delta: 1
})
})
},
}
......@@ -428,20 +445,21 @@
.feedback-bottom {
width: 100%;
height: 10%;
// position: relative;
position: relative;
bottom: 0;
background: #ffffff;
button {
width: 80%;
height: 80%;
top: 13%;
top: 12%;
background: #3b7cde;
border-radius: 16px;
font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
line-height: 3;
}
}
}
......
......@@ -4,10 +4,10 @@ const url_all = {
// 'DEV': 'http://192.168.1.161:8080', // 开发
// 'DEV': 'http://192.168.1.13:8080', // 英伟姐
// DEV: "http://116.205.136.218:8088/api", //线上服务
// 'DEV': 'http://127.0.0.1:8080', // 开发
'DEV': 'http://192.168.1.4:8080'
// 'DEV': 'http://127.0.0.1:8080' // 开发
// 'DEV': 'http://192.168.1.11: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"];
......
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