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) { ...@@ -7,6 +7,9 @@ export function listExercise(query) {
return request({ return request({
url: '/system/course/selectCourseList', url: '/system/course/selectCourseList',
method: 'get', method: 'get',
headers:{
isToken:false
}
}) })
} }
...@@ -15,22 +18,25 @@ export function listActivityStart(query) { ...@@ -15,22 +18,25 @@ export function listActivityStart(query) {
return request({ return request({
url: '/tjt-activity/activity/selectActivityListStart', url: '/tjt-activity/activity/selectActivityListStart',
method: 'get', method: 'get',
headers:{
isToken:false
}
}) })
} }
//有token时调用 //有token时调用
// 查询训练体验列表 // 查询训练体验列表
export function listExerciseHaveToken(query) { // export function listExerciseHaveToken(query) {
return request({ // return request({
url: '/system/course/selectCourseListToken', // url: '/system/course/selectCourseListToken',
method: 'get', // method: 'get',
}) // })
} // }
// 查询热门活动列表 // 查询热门活动列表
export function listActivityStartHaveToken(query) { // export function listActivityStartHaveToken(query) {
return request({ // return request({
url: '/tjt-activity/activity/selectActivityListStartToken', // url: '/tjt-activity/activity/selectActivityListStartToken',
method: 'get', // method: 'get',
}) // })
} // }
\ No newline at end of file \ No newline at end of file
...@@ -249,6 +249,13 @@ ...@@ -249,6 +249,13 @@
clearInterval(this.timer) clearInterval(this.timer)
// this.timer = null // 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 => { addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => {
console.log('成绩录入', res); console.log('成绩录入', res);
this.scoreFlag = false this.scoreFlag = false
......
...@@ -141,9 +141,6 @@ ...@@ -141,9 +141,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <uni-popup ref="popup" type="top">
正在建设中
</uni-popup> -->
</view> </view>
</template> </template>
...@@ -186,35 +183,35 @@ ...@@ -186,35 +183,35 @@
...mapMutations('m_user', ['updateUserInfo']), ...mapMutations('m_user', ['updateUserInfo']),
goto() { goto() {
uni.showToast({ uni.showToast({
title: '建设中', title: '正在建设中',
icon: 'none' icon: 'none'
}) })
}, },
//登录判断 //登录判断
login() { login() {
if (!this.token) { // if (!this.token) {
this.getActivityList() this.getActivityList()
this.getExerciseList() this.getExerciseList()
} else { // } else {
this.getExerciseListHaveToken() // this.getExerciseListHaveToken()
this.getActivityListHaveToken() // 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 => {
}) // }
}, },
// 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() { getActivityList() {
listActivityStart().then(res => { listActivityStart().then(res => {
this.activityList = [...this.activityList, ...res.data] || [] this.activityList = [...this.activityList, ...res.data] || []
...@@ -251,7 +248,6 @@ ...@@ -251,7 +248,6 @@
}) })
}, },
goActDetil(item) { goActDetil(item) {
// let url = '/pages_activity/activity_detail/activity_detail?activity_id=' + item.activityId
if (!this.token) { if (!this.token) {
console.log("没有token") console.log("没有token")
uni.reLaunch({ uni.reLaunch({
...@@ -380,10 +376,6 @@ ...@@ -380,10 +376,6 @@
box-shadow: 0px 3px 10px 0px #dddddd; box-shadow: 0px 3px 10px 0px #dddddd;
text-align: right; text-align: right;
// button {
// margin-right: 2%;
// }
.ima { .ima {
margin: 8px; margin: 8px;
...@@ -425,22 +417,16 @@ ...@@ -425,22 +417,16 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
// left: 132px;
top: 25rpx; top: 25rpx;
width: 152rpx; width: 152rpx;
height: 64rpx; height: 64rpx;
margin-right: 7%; margin-right: 7%;
// height: auto;
text-align: center; text-align: center;
color: #ffffff; color: #ffffff;
font-size: 14px; font-size: 14px;
line-height: 32px; line-height: 32px;
background: #3b7cde; background: #3b7cde;
border-radius: 16px; border-radius: 16px;
// margin-top: -100rpx;
// margin-right: 100rpx;
} }
} }
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
</view> </view>
<view style="display: flex;"> <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)" <button @click="goDetail(item.type,wechatId,item.activityId)"
style="width: 50%;background-color: #3b7cde;border-radius:0 0 16px 0;">活动详情</button> style="width: 50%;background-color: #3b7cde;border-radius:0 0 16px 0;">活动详情</button>
...@@ -99,7 +100,6 @@ ...@@ -99,7 +100,6 @@
this.wechatId = this.userInfo.wechatId this.wechatId = this.userInfo.wechatId
this.getList(this.wechatId) this.getList(this.wechatId)
// this.getlista(this.wechatId,this.activityId)
}, },
methods: { methods: {
getList(wechatId) { getList(wechatId) {
...@@ -111,15 +111,6 @@ ...@@ -111,15 +111,6 @@
console.log(this.total) 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) { goActivity(type, wechatId, activityId) {
if (type === '1') { if (type === '1') {
console.log('sdsdsds', activityId) console.log('sdsdsds', activityId)
...@@ -135,19 +126,15 @@ ...@@ -135,19 +126,15 @@
}) })
} }
}, },
goDetail(type, wechatId, activityId){ goDetail(type, wechatId, activityId) {
if(type==='2'){ if (type === '2') {
// uni.navigateTo({ getSinInInfo(wechatId, activityId).then(response => {
// url: `/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=${activityId}` console.log("jkbnj", response)
// }) this.signInList = response.data
getSinInInfo(wechatId,activityId).then(response=>{
console.log("jkbnj",response)
this.signInList =response.data
}) })
} } else {
else{
uni.navigateTo({ uni.navigateTo({
url: `/pages_activity/activity_detail/activity_detail?activityId=${activityId}` url: `/pages_activity/activity_detail/activity_detail?activityId=${activityId}`
}) })
...@@ -185,15 +172,6 @@ ...@@ -185,15 +172,6 @@
z-index: 4; z-index: 4;
} }
// :nth-child(1) {
// }
.info { .info {
font-size: 16px; font-size: 16px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular; font-family: Source Han Sans CN, Source Han Sans CN-Regular;
...@@ -201,6 +179,7 @@ ...@@ -201,6 +179,7 @@
color: #333333; color: #333333;
line-height: 36px; line-height: 36px;
.question { .question {
// margin-top: 5%; // margin-top: 5%;
// margin: 2% 18% 0 5%; // margin: 2% 18% 0 5%;
......
import store from '@/store/store.js' 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 = { 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://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.11: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/' // 'DEV': 'https://www.aiwanyundong.com/api/'
}; };
let BASEURL = url_all["DEV"]; let BASEURL = url_all[env];
export const request = (options = {}) => { export const request = (options = {}) => {
return new Promise((resolve, rejects) => { return new Promise((resolve, rejects) => {
...@@ -44,7 +64,7 @@ function handleRequest(options, resolve, reject) { ...@@ -44,7 +64,7 @@ function handleRequest(options, resolve, reject) {
//获取token //获取token
function getToken() { function getToken() {
// return "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjljZDRiMmJmLTNjZDAtNDNjNy1hZWJhLTJkMWNiNjYwNGU3NiJ9.pEQ5o6rVhGmryKt23avS9BV_2F5Z-3ujS30uAWIZkZQL3GCnnsFgsBYnKHErEFLvKZRQV7efnq_MCJZCjOTcJA" // return "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjljZDRiMmJmLTNjZDAtNDNjNy1hZWJhLTJkMWNiNjYwNGU3NiJ9.pEQ5o6rVhGmryKt23avS9BV_2F5Z-3ujS30uAWIZkZQL3GCnnsFgsBYnKHErEFLvKZRQV7efnq_MCJZCjOTcJA"
return 'wx_' + store.state.m_user.token; 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