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
07f63643
Commit
07f63643
authored
Nov 24, 2022
by
王永阿飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
ssh://gitlab.91isoft.com:10022/wyf/tjty-app
Conflicts: tjty-app/.gitignore tjty-app/utils/request.js
parents
8581d7b8
768d1aa5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
107 deletions
+105
-107
homePage.js
tjty-app/api/homePage.js
+18
-12
tjty_dailyAnswer.vue
.../pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer.vue
+7
-0
tjty_home_page.vue
tjty-app/pages_home/tjty_home_page/tjty_home_page.vue
+23
-37
myActivity.vue
tjty-app/pages_my/myActicity/myActivity.vue
+33
-54
request.js
tjty-app/utils/request.js
+24
-4
No files found.
tjty-app/api/homePage.js
View file @
07f63643
...
...
@@ -7,6 +7,9 @@ export function listExercise(query) {
return
request
({
url
:
'/system/course/selectCourseList'
,
method
:
'get'
,
headers
:{
isToken
:
false
}
})
}
...
...
@@ -15,22 +18,25 @@ export function listActivityStart(query) {
return
request
({
url
:
'/tjt-activity/activity/selectActivityListStart'
,
method
:
'get'
,
headers
:{
isToken
:
false
}
})
}
//有token时调用
// 查询训练体验列表
export
function
listExerciseHaveToken
(
query
)
{
return
request
({
url
:
'/system/course/selectCourseListToken'
,
method
:
'get'
,
})
}
//
export function listExerciseHaveToken(query) {
//
return request({
//
url: '/system/course/selectCourseListToken',
//
method: 'get',
//
})
//
}
// 查询热门活动列表
export
function
listActivityStartHaveToken
(
query
)
{
return
request
({
url
:
'/tjt-activity/activity/selectActivityListStartToken'
,
method
:
'get'
,
})
}
\ No newline at end of file
// export function listActivityStartHaveToken(query) {
// return request({
// url: '/tjt-activity/activity/selectActivityListStartToken',
// method: 'get',
// })
// }
\ No newline at end of file
tjty-app/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer.vue
View file @
07f63643
...
...
@@ -249,6 +249,13 @@
clearInterval
(
this
.
timer
)
// this.timer = null
}
// let addScoreData = {
// signupId:this.signupId,
// examId:this.examId,
// score:this.score,
// activityId:this.activityId,
// flagTime:this.flagTime
// }
addScore
(
this
.
signupId
,
this
.
examId
,
this
.
score
,
this
.
activityId
,
this
.
flagTime
).
then
(
res
=>
{
console
.
log
(
'成绩录入'
,
res
);
this
.
scoreFlag
=
false
...
...
tjty-app/pages_home/tjty_home_page/tjty_home_page.vue
View file @
07f63643
...
...
@@ -141,9 +141,6 @@
</view>
</view>
</view>
<!--
<uni-popup
ref=
"popup"
type=
"top"
>
正在建设中
</uni-popup>
-->
</view>
</
template
>
...
...
@@ -186,35 +183,35 @@
...
mapMutations
(
'm_user'
,
[
'updateUserInfo'
]),
goto
()
{
uni
.
showToast
({
title
:
'建设中'
,
title
:
'
正在
建设中'
,
icon
:
'none'
})
},
//登录判断
login
()
{
if
(
!
this
.
token
)
{
//
if (!this.token) {
this
.
getActivityList
()
this
.
getExerciseList
()
}
else
{
this
.
getExerciseListHaveToken
()
this
.
getActivityListHaveToken
()
}
},
getExerciseListHaveToken
()
{
listExerciseHaveToken
().
then
(
res
=>
{
this
.
exerciseList
=
[...
this
.
exerciseList
,
...
res
.
data
]
||
[]
}).
catch
(
err
=>
{
})
},
getActivityListHaveToken
()
{
listActivityStartHaveToken
().
then
(
res
=>
{
this
.
activityList
=
[...
this
.
activityList
,
...
res
.
data
]
||
[]
}).
catch
(
err
=>
{
// } else {
// this.getExerciseListHaveToken()
// this.getActivityListHaveToken()
})
// }
},
// getExerciseListHaveToken() {
// listExerciseHaveToken().then(res => {
// this.exerciseList = [...this.exerciseList, ...res.data] || []
// }).catch(err => {
// })
// },
// getActivityListHaveToken() {
// listActivityStartHaveToken().then(res => {
// this.activityList = [...this.activityList, ...res.data] || []
// }).catch(err => {
// })
// },
getActivityList
()
{
listActivityStart
().
then
(
res
=>
{
this
.
activityList
=
[...
this
.
activityList
,
...
res
.
data
]
||
[]
...
...
@@ -251,7 +248,6 @@
})
},
goActDetil
(
item
)
{
// let url = '/pages_activity/activity_detail/activity_detail?activity_id=' + item.activityId
if
(
!
this
.
token
)
{
console
.
log
(
"没有token"
)
uni
.
reLaunch
({
...
...
@@ -380,10 +376,6 @@
box-shadow
:
0px
3px
10px
0px
#dddddd
;
text-align
:
right
;
// button {
// margin-right: 2%;
// }
.ima
{
margin
:
8px
;
...
...
@@ -425,22 +417,16 @@
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
// left: 132px;
top
:
25rpx
;
width
:
152rpx
;
height
:
64rpx
;
margin-right
:
7%
;
// height: auto;
text-align
:
center
;
color
:
#ffffff
;
font-size
:
14px
;
line-height
:
32px
;
background
:
#3b7cde
;
border-radius
:
16px
;
// margin-top: -100rpx;
// margin-right: 100rpx;
}
}
...
...
tjty-app/pages_my/myActicity/myActivity.vue
View file @
07f63643
...
...
@@ -56,7 +56,8 @@
</view>
<view
style=
"display: flex;"
>
<button
@
click=
"goActivity(item.type,wechatId,item.activityId)"
style=
"width: 50%;background-color: #3b7cde;border-radius:0 0 0 16px;"
>
报名详情
</button>
<button
@
click=
"goActivity(item.type,wechatId,item.activityId)"
style=
"width: 50%;background-color: #3b7cde;border-radius:0 0 0 16px;"
>
报名详情
</button>
<button
@
click=
"goDetail(item.type,wechatId,item.activityId)"
style=
"width: 50%;background-color: #3b7cde;border-radius:0 0 16px 0;"
>
活动详情
</button>
...
...
@@ -99,7 +100,6 @@
this
.
wechatId
=
this
.
userInfo
.
wechatId
this
.
getList
(
this
.
wechatId
)
// this.getlista(this.wechatId,this.activityId)
},
methods
:
{
getList
(
wechatId
)
{
...
...
@@ -111,15 +111,6 @@
console
.
log
(
this
.
total
)
});
},
// getlista(wechatId,activityId){
// getSinInInfo(wechatId,activityId).then(response=>{
// console.log("jkbnj",response)
// this.signInList =[...this.signInList, ...response.rows] || []
// })
// },
goActivity
(
type
,
wechatId
,
activityId
)
{
if
(
type
===
'1'
)
{
console
.
log
(
'sdsdsds'
,
activityId
)
...
...
@@ -135,19 +126,15 @@
})
}
},
goDetail
(
type
,
wechatId
,
activityId
){
if
(
type
===
'2'
){
// uni.navigateTo({
// url: `/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=${activityId}`
// })
getSinInInfo
(
wechatId
,
activityId
).
then
(
response
=>
{
console
.
log
(
"jkbnj"
,
response
)
this
.
signInList
=
response
.
data
goDetail
(
type
,
wechatId
,
activityId
)
{
if
(
type
===
'2'
)
{
getSinInInfo
(
wechatId
,
activityId
).
then
(
response
=>
{
console
.
log
(
"jkbnj"
,
response
)
this
.
signInList
=
response
.
data
})
}
else
{
}
else
{
uni
.
navigateTo
({
url
:
`/pages_activity/activity_detail/activity_detail?activityId=
${
activityId
}
`
})
...
...
@@ -185,15 +172,6 @@
z-index
:
4
;
}
// :nth-child(1) {
// }
.info
{
font-size
:
16px
;
font-family
:
Source
Han
Sans
CN
,
Source
Han
Sans
CN-Regular
;
...
...
@@ -201,6 +179,7 @@
color
:
#333333
;
line-height
:
36px
;
.question
{
// margin-top: 5%;
// margin: 2% 18% 0 5%;
...
...
tjty-app/utils/request.js
View file @
07f63643
import
store
from
'@/store/store.js'
// 获取当前帐号信息
const
accountInfo
=
wx
.
getAccountInfoSync
();
// env类型
const
env
=
accountInfo
.
miniProgram
.
envVersion
;
if
(
!
env
)
{
console
.
error
(
"获取运行环境失败!"
);
}
else
{
console
.
log
(
env
);
}
const
url_all
=
{
// 'DEV': 'http://192.168.1.161:8080', // 开发
'DEV'
:
'http://192.168.0.99:8080'
,
// DEV: "http://116.205.136.218:8088/api", //线上服务
// 'DEV': 'http://127.0.0.1:8080', // 开发
// 'DEV': 'http://192.168.1.11:8080'
// 开发版
develop
:
'https://www.aiwanyundong.com/api'
,
// develop: 'http://192.168.0.63:8080',
// 体验版
trial
:
'https://www.aiwanyundong.com/api'
,
// 正式版
release
:
'https://www.aiwanyundong.com/api'
// 'DEV': 'https://www.aiwanyundong.com/api/'
};
let
BASEURL
=
url_all
[
"DEV"
];
let
BASEURL
=
url_all
[
env
];
export
const
request
=
(
options
=
{})
=>
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
...
...
@@ -44,7 +64,7 @@ function handleRequest(options, resolve, reject) {
//获取token
function
getToken
()
{
// return "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjljZDRiMmJmLTNjZDAtNDNjNy1hZWJhLTJkMWNiNjYwNGU3NiJ9.pEQ5o6rVhGmryKt23avS9BV_2F5Z-3ujS30uAWIZkZQL3GCnnsFgsBYnKHErEFLvKZRQV7efnq_MCJZCjOTcJA"
// return "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjljZDRiMmJmLTNjZDAtNDNjNy1hZWJhLTJkMWNiNjYwNGU3NiJ9.pEQ5o6rVhGmryKt23avS9BV_2F5Z-3ujS30uAWIZkZQL3GCnnsFgsBYnKHErEFLvKZRQV7efnq_MCJZCjOTcJA"
return
'wx_'
+
store
.
state
.
m_user
.
token
;
}
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