|
|
@ -79,6 +79,7 @@ |
|
|
"questionFreId":"59088ceb55644b03b8d0c7d48d2f7d39", |
|
|
"questionFreId":"59088ceb55644b03b8d0c7d48d2f7d39", |
|
|
"roleId":"5f96b1baae1a47fbb17215a5dc46f5ce", |
|
|
"roleId":"5f96b1baae1a47fbb17215a5dc46f5ce", |
|
|
"userId":"", |
|
|
"userId":"", |
|
|
|
|
|
"sceneId": "", |
|
|
questionList: [], |
|
|
questionList: [], |
|
|
recordList: [], |
|
|
recordList: [], |
|
|
"ask":"", |
|
|
"ask":"", |
|
|
@ -89,9 +90,6 @@ |
|
|
"showShare":false, |
|
|
"showShare":false, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
|
|
|
...mapState('m_user', ['userId']) |
|
|
|
|
|
}, |
|
|
|
|
|
//分享到好友 |
|
|
//分享到好友 |
|
|
onShareAppMessage(res) { |
|
|
onShareAppMessage(res) { |
|
|
if (res.from === 'button') {// 来自页面内分享按钮 |
|
|
if (res.from === 'button') {// 来自页面内分享按钮 |
|
|
@ -103,12 +101,12 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//分享到朋友圈 |
|
|
//分享到朋友圈 |
|
|
onShareTimeline(res) { |
|
|
onShareTimeline(res) { |
|
|
return { |
|
|
return { |
|
|
title: "快来和我一起答题吧", |
|
|
title: "快来和我一起答题吧", |
|
|
type: 0, |
|
|
type: 0, |
|
|
summary: "", |
|
|
summary: "", |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
this.timer = setTimeout(() => { |
|
|
this.timer = setTimeout(() => { |
|
|
@ -118,11 +116,16 @@ |
|
|
}, 5000) |
|
|
}, 5000) |
|
|
//this.roleId = options.roleId |
|
|
//this.roleId = options.roleId |
|
|
//this.questionFreId = options.questionFreId |
|
|
//this.questionFreId = options.questionFreId |
|
|
|
|
|
this.sceneId = options.sceneId; |
|
|
this.getQuestionList() |
|
|
this.getQuestionList() |
|
|
this.getRecordList() |
|
|
this.getRecordList() |
|
|
|
|
|
this.editUserMedal(); |
|
|
|
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapState('m_user', ['userId']) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
async share(){ |
|
|
async share() { |
|
|
await uni.share({ |
|
|
await uni.share({ |
|
|
title: "快来和我一起答题吧", |
|
|
title: "快来和我一起答题吧", |
|
|
type: 0, |
|
|
type: 0, |
|
|
@ -135,10 +138,12 @@ |
|
|
async getQuestionList() { |
|
|
async getQuestionList() { |
|
|
const { |
|
|
const { |
|
|
data: res |
|
|
data: res |
|
|
} = await uni.$http.post('/small/questionAnswer/listAll',{questionFreId:this.questionFreId}) |
|
|
} = await uni.$http.post('/small/questionAnswer/listAll', { |
|
|
|
|
|
questionFreId: this.questionFreId |
|
|
|
|
|
}) |
|
|
if (!res.success) return uni.$showMsg() |
|
|
if (!res.success) return uni.$showMsg() |
|
|
this.questionList = res.data |
|
|
this.questionList = res.data |
|
|
if (this.questionList.length !=0) { |
|
|
if (this.questionList.length != 0) { |
|
|
this.ask = this.questionList[0].ask; |
|
|
this.ask = this.questionList[0].ask; |
|
|
this.answer = this.questionList[0].answer; |
|
|
this.answer = this.questionList[0].answer; |
|
|
} |
|
|
} |
|
|
@ -150,37 +155,52 @@ |
|
|
data: res |
|
|
data: res |
|
|
} = await uni.$http.post('/small/questionFre/listAll',{roleId:this.roleId,userId:this.userId}) |
|
|
} = await uni.$http.post('/small/questionFre/listAll',{roleId:this.roleId,userId:this.userId}) |
|
|
if (!res.success) return uni.$showMsg() |
|
|
if (!res.success) return uni.$showMsg() |
|
|
|
|
|
this.recordList = res.data |
|
|
|
|
|
|
|
|
|
|
|
//uni.$showMsg('数据请求成功!') |
|
|
|
|
|
}, |
|
|
|
|
|
async editUserMedal() { |
|
|
|
|
|
const { |
|
|
|
|
|
data: res |
|
|
|
|
|
} = await uni.$http.post('/small/wechat/editUserMedal', { |
|
|
|
|
|
medal: this.sceneId, |
|
|
|
|
|
guid: "2752c89b6ca843558991f888f8949da2", |
|
|
|
|
|
// guid: this.userId, |
|
|
|
|
|
}) |
|
|
|
|
|
if (!res.success) return uni.$showMsg() |
|
|
|
|
|
// this.recordList = res.data |
|
|
|
|
|
|
|
|
this.recordList = res.data |
|
|
this.recordList = res.data |
|
|
|
|
|
|
|
|
//uni.$showMsg('数据请求成功!') |
|
|
//uni.$showMsg('数据请求成功!') |
|
|
}, |
|
|
}, |
|
|
backIndex(){ |
|
|
backIndex() { |
|
|
uni.switchTab({ |
|
|
uni.switchTab({ |
|
|
url:'/pages/index/index' |
|
|
url: '/pages/index/index' |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
shareUser(){ |
|
|
shareUser() { |
|
|
this.showShare = true |
|
|
this.showShare = true |
|
|
this.showLayer = true |
|
|
this.showLayer = true |
|
|
}, |
|
|
}, |
|
|
reChallenge(){ |
|
|
reChallenge() { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/subpkg/rechallenge/rechallenge?questionFreId='+this.questionFreId |
|
|
url: '/subpkg/rechallenge/rechallenge?questionFreId=' + this.questionFreId |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
review(){ |
|
|
review() { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/subpkg/review/review?questionFreId='+this.questionFreId |
|
|
url: '/subpkg/review/review?questionFreId=' + this.questionFreId |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
closeShare(){ |
|
|
closeShare() { |
|
|
this.showShare = false |
|
|
this.showShare = false |
|
|
this.showLayer = false |
|
|
this.showLayer = false |
|
|
}, |
|
|
}, |
|
|
itemClickHandler(item) { |
|
|
itemClickHandler(item) { |
|
|
if(item !== ""){ |
|
|
if (item !== "") { |
|
|
this.ask= item.ask |
|
|
this.ask = item.ask |
|
|
this.answer= item.answer |
|
|
this.answer = item.answer |
|
|
this.showAnlysisc = true |
|
|
this.showAnlysisc = true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -200,7 +220,9 @@ |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
background-color: rgba(0, 0, 0, .5); |
|
|
background-color: rgba(0, 0, 0, .5); |
|
|
} |
|
|
} |
|
|
.popup-layer, .popup-share { |
|
|
|
|
|
|
|
|
.popup-layer, |
|
|
|
|
|
.popup-share { |
|
|
//display: none; |
|
|
//display: none; |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
top: 45%; |
|
|
top: 45%; |
|
|
@ -222,6 +244,7 @@ |
|
|
height: 500rpx; |
|
|
height: 500rpx; |
|
|
background-color: #e4eafe; |
|
|
background-color: #e4eafe; |
|
|
border-radius: 30rpx; |
|
|
border-radius: 30rpx; |
|
|
|
|
|
|
|
|
.medimg { |
|
|
.medimg { |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
top: -15%; |
|
|
top: -15%; |
|
|
@ -229,23 +252,31 @@ |
|
|
transform: translate(-50%, -10%); |
|
|
transform: translate(-50%, -10%); |
|
|
width: 300rpx; |
|
|
width: 300rpx; |
|
|
height: 230rpx; |
|
|
height: 230rpx; |
|
|
|
|
|
|
|
|
image { |
|
|
image { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.congrat { |
|
|
.congrat { |
|
|
margin: 25% auto 10%; |
|
|
margin: 25% auto 10%; |
|
|
color: #ff6b08; |
|
|
color: #ff6b08; |
|
|
font-size: 40rpx; |
|
|
font-size: 40rpx; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.myitem { |
|
|
.myitem { |
|
|
margin: 0; |
|
|
margin: 0; |
|
|
width: 33%; |
|
|
width: 33%; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.mainwrap3 { |
|
|
|
|
|
top: 56rpx; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.title { |
|
|
.title { |
|
|
margin: 50rpx 0; |
|
|
margin: 50rpx 0; |
|
|
color: #333; |
|
|
color: #333; |
|
|
@ -258,12 +289,13 @@ |
|
|
position: relative; |
|
|
position: relative; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.question-list { |
|
|
.question-list { |
|
|
/*display: flex; |
|
|
/*display: flex; |
|
|
justify-content: space-around;*/ |
|
|
justify-content: space-around;*/ |
|
|
margin: 0 2%; |
|
|
margin: 0 2%; |
|
|
|
|
|
|
|
|
.question-item { |
|
|
.question-item { |
|
|
display: inline-block; |
|
|
display: inline-block; |
|
|
margin: 2% 1.5%; |
|
|
margin: 2% 1.5%; |
|
|
padding: 1% 3%; |
|
|
padding: 1% 3%; |
|
|
@ -277,95 +309,104 @@ |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
.erritem { |
|
|
|
|
|
|
|
|
.erritem { |
|
|
background-color: #fb3737; |
|
|
background-color: #fb3737; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.answer-content { |
|
|
|
|
|
//display: none; |
|
|
.answer-content { |
|
|
position: absolute; |
|
|
//display: none; |
|
|
z-index: 100; |
|
|
position: relative; |
|
|
margin: 2% 3%; |
|
|
z-index: 100; |
|
|
padding: 2%; |
|
|
margin: 2% 3%; |
|
|
width: 90%; |
|
|
padding: 2%; |
|
|
height: 400rpx; |
|
|
width: 90%; |
|
|
background: #fff; |
|
|
min-height: 400rpx; |
|
|
border: 1px solid #18c569; |
|
|
background: #fff; |
|
|
border-radius: 10px; |
|
|
border: 1px solid #18c569; |
|
|
} |
|
|
border-radius: 10px; |
|
|
|
|
|
} |
|
|
.qucont { |
|
|
|
|
|
margin: 1% 0 3% 0; |
|
|
.qucont { |
|
|
color: #000; |
|
|
margin: 1% 0 3% 0; |
|
|
font-family: 30rpx; |
|
|
color: #000; |
|
|
font-weight: bold; |
|
|
font-family: 30rpx; |
|
|
} |
|
|
font-weight: bold; |
|
|
|
|
|
} |
|
|
.corans { |
|
|
|
|
|
color: #18c569; |
|
|
.corans { |
|
|
font-weight: bold; |
|
|
color: #18c569; |
|
|
label { |
|
|
font-weight: bold; |
|
|
font-size: 36rpx; |
|
|
|
|
|
} |
|
|
label { |
|
|
} |
|
|
font-size: 36rpx; |
|
|
|
|
|
} |
|
|
.youans { |
|
|
} |
|
|
margin: 2% 0; |
|
|
|
|
|
color: #999; |
|
|
.youans { |
|
|
} |
|
|
margin: 2% 0; |
|
|
|
|
|
color: #999; |
|
|
.analys { |
|
|
} |
|
|
margin: 3% 0; |
|
|
|
|
|
|
|
|
.analys { |
|
|
label { |
|
|
margin: 3% 0; |
|
|
font-size: 36rpx; |
|
|
|
|
|
font-weight: bold; |
|
|
label { |
|
|
} |
|
|
font-size: 36rpx; |
|
|
view { |
|
|
font-weight: bold; |
|
|
color: #666; |
|
|
} |
|
|
line-height: 1.75; |
|
|
|
|
|
} |
|
|
view { |
|
|
} |
|
|
color: #666; |
|
|
|
|
|
line-height: 1.5; |
|
|
.question-record { |
|
|
} |
|
|
margin: 6% 3% 10%; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.question-record { |
|
|
|
|
|
margin: 3% 3% 5%; |
|
|
width: 94%; |
|
|
width: 94%; |
|
|
height: 45%; |
|
|
height: 25%; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
label { |
|
|
label { |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
line-height: 2; |
|
|
line-height: 2; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.list { |
|
|
.list { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: calc(100% - 80rpx); |
|
|
height: calc(100% - 80rpx); |
|
|
line-height: 1.75; |
|
|
line-height: 1.75; |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
|
|
|
|
|
|
.item { |
|
|
.item { |
|
|
margin: 2% 0; |
|
|
margin: 2% 0; |
|
|
border-bottom: 1px dotted #ddd; |
|
|
border-bottom: 1px dotted #ddd; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.backIndex { |
|
|
|
|
|
margin: 2% auto; |
|
|
.backIndex { |
|
|
width: 86%; |
|
|
margin: 2% auto; |
|
|
button { |
|
|
width: 86%; |
|
|
background-color: #1367fe !important; |
|
|
|
|
|
border-radius: 50rpx !important; |
|
|
button { |
|
|
color: #fff !important; |
|
|
background-color: #1367fe !important; |
|
|
} |
|
|
border-radius: 50rpx !important; |
|
|
} |
|
|
color: #fff !important; |
|
|
|
|
|
} |
|
|
.perinfo { |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.perinfo { |
|
|
display: flex; |
|
|
display: flex; |
|
|
margin: 5% 0; |
|
|
margin: 5% 0; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.myitem { |
|
|
.myitem { |
|
|
margin: 3% 8%; |
|
|
margin: 3% 8%; |
|
|
width: 15%; |
|
|
width: 15%; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
@ -373,17 +414,16 @@ |
|
|
color: #666; |
|
|
color: #666; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.myitem > view > label { |
|
|
.myitem>view>label { |
|
|
display: block; |
|
|
display: block; |
|
|
position: relative; |
|
|
position: relative; |
|
|
margin: 20rpx auto; |
|
|
margin: 20rpx auto; |
|
|
width: 100rpx; |
|
|
width: 100rpx; |
|
|
height: 100rpx; |
|
|
height: 100rpx; |
|
|
|
|
|
|
|
|
image { |
|
|
image { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |