|
|
|
@ -1,8 +1,8 @@ |
|
|
|
<template> |
|
|
|
<view class="wrap"> |
|
|
|
<view class="stabar"></view> |
|
|
|
<view class="marsk"></view> |
|
|
|
<view class="popup-layer"> |
|
|
|
<view class="marsk" v-if="showLayer"></view> |
|
|
|
<view class="popup-layer" v-if="showMedal"> |
|
|
|
<image class="animg" src="/static/images/joy.png"></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
@ -13,9 +13,9 @@ |
|
|
|
<view class="question-item" v-for="(item, i) in questionList" :key="i" @click="itemClickHandler(item)"> |
|
|
|
<span class="question-num">{{i+1}}</span> |
|
|
|
</view> |
|
|
|
<view class="question-item erritem" v-for="(item, i) in questionList" :key="i" @click="itemClickHandler(item)"> |
|
|
|
<!-- <view class="question-item erritem" v-for="(item, i) in questionList" :key="i" @click="itemClickHandler(item)"> |
|
|
|
<span class="question-num">{{i+1}}</span> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="answer-content"> |
|
|
|
@ -41,7 +41,7 @@ |
|
|
|
<view class="perinfo"> |
|
|
|
<view class="myitem"> |
|
|
|
<!-- <label><button open-type="share"></button>炫耀一下</label> --> |
|
|
|
<view open-type="share"><label><image src="/static/images/btn-xy.png"></image></label>炫耀一下</view> |
|
|
|
<view @click="shareUser()"><label><image src="/static/images/btn-xy.png"></image></label>炫耀一下</view> |
|
|
|
</view> |
|
|
|
<view class="myitem"> |
|
|
|
<view @click="review()"><label><image src="/static/images/btn-hg.png"></image></label>演练回顾</view> |
|
|
|
@ -51,15 +51,16 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="popup-share"> |
|
|
|
<view class="popup-share" v-if="showShare"> |
|
|
|
<view @click="closeShare()" style="margin-left: 250px;">关闭</view> |
|
|
|
<label class="medimg"><image src="/static/images/medal_1.png"></image></label> |
|
|
|
<view class="congrat">恭喜你获得1枚成就勋章!</view> |
|
|
|
<view class="perinfo"> |
|
|
|
<view class="myitem"> |
|
|
|
<view @click=""><label><image src="/static/images/btn-wx.png"></image></label>分享给微信好友</view> |
|
|
|
<view @click=""><label><button open-type="share"></button><image src="/static/images/btn-wx.png"></image></label>分享给微信好友</view> |
|
|
|
</view> |
|
|
|
<view class="myitem"> |
|
|
|
<view @click=""><label><image src="/static/images/btn-pyq.png"></image></label>分享到朋友圈</view> |
|
|
|
<view @click=""><label><button @tap="share"></button><image src="/static/images/btn-pyq.png"></image></label>分享到朋友圈</view> |
|
|
|
</view> |
|
|
|
<view class="myitem"> |
|
|
|
<view @click=""><label><image src="/static/images/btn-ma.png"></image></label>二维码邀请</view> |
|
|
|
@ -80,8 +81,13 @@ |
|
|
|
recordList: [], |
|
|
|
"ask":"", |
|
|
|
"answer":"", |
|
|
|
"showLayer":true, |
|
|
|
"showAnlysisc":false, |
|
|
|
"showMedal":true, |
|
|
|
"showShare":false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
//分享到好友 |
|
|
|
onShareAppMessage(res) { |
|
|
|
if (res.from === 'button') {// 来自页面内分享按钮 |
|
|
|
console.log(res.target) |
|
|
|
@ -91,13 +97,36 @@ |
|
|
|
path: '/pages/home/home' |
|
|
|
} |
|
|
|
}, |
|
|
|
//分享到朋友圈 |
|
|
|
onShareTimeline(res) { |
|
|
|
return { |
|
|
|
title: "快来和我一起答题吧", |
|
|
|
type: 0, |
|
|
|
summary: "", |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
//this.roleId = options.roleId |
|
|
|
//this.questionFreId = options.questionFreId |
|
|
|
this.timer = setTimeout(() => { |
|
|
|
this.showMedal = false |
|
|
|
this.showLayer = false |
|
|
|
clearTimeout(this.timer) |
|
|
|
}, 5000) |
|
|
|
this.roleId = options.roleId |
|
|
|
this.questionFreId = options.questionFreId |
|
|
|
this.getQuestionList() |
|
|
|
this.getRecordList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async share(){ |
|
|
|
await uni.share({ |
|
|
|
title: "快来和我一起答题吧", |
|
|
|
type: 0, |
|
|
|
summary: "", |
|
|
|
success() { |
|
|
|
console.log('分享成功') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
async getQuestionList() { |
|
|
|
const { |
|
|
|
data: res |
|
|
|
@ -125,6 +154,10 @@ |
|
|
|
url:'/pages/index/index' |
|
|
|
}) |
|
|
|
}, |
|
|
|
shareUser(){ |
|
|
|
this.showShare = true |
|
|
|
this.showLayer = true |
|
|
|
}, |
|
|
|
reChallenge(){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpkg/rechallenge/rechallenge?questionFreId='+this.questionFreId |
|
|
|
@ -135,10 +168,15 @@ |
|
|
|
url: '/subpkg/review/review?questionFreId='+this.questionFreId |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeShare(){ |
|
|
|
this.showShare = false |
|
|
|
this.showLayer = false |
|
|
|
}, |
|
|
|
itemClickHandler(item) { |
|
|
|
if(item !== ""){ |
|
|
|
this.ask= item.ask |
|
|
|
this.answer= item.answer |
|
|
|
this.showAnlysisc = true |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
@ -150,7 +188,7 @@ |
|
|
|
|
|
|
|
/* 设置弹出层 */ |
|
|
|
.marsk { |
|
|
|
display: none; |
|
|
|
// display: none; |
|
|
|
position: absolute; |
|
|
|
z-index: 999; |
|
|
|
width: 100%; |
|
|
|
@ -158,7 +196,7 @@ |
|
|
|
background-color: rgba(0, 0, 0, .5); |
|
|
|
} |
|
|
|
.popup-layer, .popup-share { |
|
|
|
display: none; |
|
|
|
//display: none; |
|
|
|
position: absolute; |
|
|
|
top: 45%; |
|
|
|
left: 50%; |
|
|
|
@ -239,7 +277,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
.answer-content { |
|
|
|
display: none; |
|
|
|
//display: none; |
|
|
|
position: absolute; |
|
|
|
z-index: 100; |
|
|
|
margin: 2% 3%; |
|
|
|
|