Commit 07f63643 authored by 王永阿飞's avatar 王永阿飞

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wyf/tjty-app

 Conflicts:
	tjty-app/.gitignore
	tjty-app/utils/request.js
parents 8581d7b8 768d1aa5
......@@ -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
......@@ -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
......
......@@ -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;
}
}
......
......@@ -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%;
......
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;
}
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