Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
tjty-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王永飞
tjty-app
Commits
0d650242
Commit
0d650242
authored
Nov 16, 2022
by
LiZongLin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
74fd0240
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
244 additions
and
195 deletions
+244
-195
App.vue
tjty-app/App.vue
+4
-2
dailyAnswer.js
tjty-app/api/dailyAnswer.js
+8
-0
navTop.vue
tjty-app/components/navTop/navTop.vue
+2
-2
activity.vue
tjty-app/pages_activity/activity/activity.vue
+1
-10
tjty_dailyAnswer.vue
.../pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer.vue
+191
-150
tjty_ans_detail.vue
tjty-app/pages_events/tjty_ans_detail/tjty_ans_detail.vue
+2
-13
tjty_ans_info.vue
tjty-app/pages_events/tjty_ans_detail/tjty_ans_info.vue
+1
-1
tjty_feedback.vue
tjty-app/pages_feedback/tjty_feedback/tjty_feedback.vue
+32
-14
request.js
tjty-app/utils/request.js
+3
-3
No files found.
tjty-app/App.vue
View file @
0d650242
...
@@ -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
)
},
},
...
...
tjty-app/api/dailyAnswer.js
View file @
0d650242
...
@@ -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'
,
})
}
tjty-app/components/navTop/navTop.vue
View file @
0d650242
...
@@ -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'
),
...
...
tjty-app/pages_activity/activity/activity.vue
View file @
0d650242
...
@@ -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
...
...
tjty-app/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer.vue
View file @
0d650242
This diff is collapsed.
Click to expand it.
tjty-app/pages_events/tjty_ans_detail/tjty_ans_detail.vue
View file @
0d650242
...
@@ -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
:
-8
6
rpx
;
top
:
-8
2
rpx
;
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
;
...
...
tjty-app/pages_events/tjty_ans_detail/tjty_ans_info.vue
View file @
0d650242
...
@@ -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
{
...
...
tjty-app/pages_feedback/tjty_feedback/tjty_feedback.vue
View file @
0d650242
...
@@ -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
:
1
3
%
;
top
:
1
2
%
;
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
;
}
}
}
}
}
}
...
...
tjty-app/utils/request.js
View file @
0d650242
...
@@ -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"
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment