|
@@ -3,7 +3,8 @@ import {
|
|
|
ihome,
|
|
|
iactivity,
|
|
|
icommunity,
|
|
|
- imine
|
|
|
+ imine,
|
|
|
+ answer
|
|
|
} from '../../api/api.js'
|
|
|
const app = getApp()
|
|
|
|
|
@@ -395,28 +396,37 @@ Page({
|
|
|
linkState: true
|
|
|
})
|
|
|
}
|
|
|
- console.log(111)
|
|
|
this.setData({
|
|
|
linkState: false
|
|
|
})
|
|
|
- // user.isRegister?'/pages/contest/answer/answer':'/pages/contest/info/info'
|
|
|
- this.data.user.isRegister
|
|
|
- ? wx.showModal({
|
|
|
- title: '答题须知:',
|
|
|
- content: '1.每人每天最多答题三次\n\n 2.排行榜以得分情况计算',
|
|
|
- confirmColor: '#ff0000',
|
|
|
- cancelText: '返回',
|
|
|
- success (res) {
|
|
|
- if (res.confirm) {
|
|
|
- wx.navigateTo({
|
|
|
- url: '/pages/contest/answer/answer'
|
|
|
+
|
|
|
+ answer.checkPermission({reqdata:{
|
|
|
+ userId: this.data.user.id
|
|
|
+ }},r => {
|
|
|
+ r.object.status
|
|
|
+ ? this.data.user.isRegister
|
|
|
+ ? wx.showModal({
|
|
|
+ title: '答题须知:',
|
|
|
+ content: '1.比赛期间每人最多答题三次\n\n 2.排行榜以得分情况计算',
|
|
|
+ confirmColor: '#ff0000',
|
|
|
+ cancelText: '返回',
|
|
|
+ success (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/contest/answer/answer'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- : wx.navigateTo({
|
|
|
- url: '/pages/contest/info/info'
|
|
|
- })
|
|
|
+ : wx.navigateTo({
|
|
|
+ url: '/pages/contest/info/info'
|
|
|
+ })
|
|
|
+ : wx.showToast({
|
|
|
+ title: '比赛期间最多答题三次!',
|
|
|
+ icon:'none'
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
clickStudy () {
|
|
|
wx.showToast({
|