斜塘打卡

main
lion 2 years ago
parent 8999758cf1
commit ec2e6668ae

@ -1,5 +1,5 @@
<script>
// const jwx = require('jweixin-module')
const jwx = require('jweixin-module')
export default {
onLaunch: function() {
this.$nextTick(() => {
@ -32,7 +32,7 @@
jwx.updateAppMessageShareData({
title: '斜塘党员冬训云端Walk行', //
link: link, // ,JS
desc: ' ',
desc: '点击查看',
imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', //
success: () => {
console.log(
@ -43,7 +43,7 @@
});
jwx.updateTimelineShareData({
title: '斜塘党员冬训云端Walk行', //
desc: ' ',
desc: '点击查看',
link: link, // ,JS
imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', //
success: () => {
@ -77,7 +77,7 @@
jwx.ready(() => {
jwx.updateAppMessageShareData({
title: '斜塘党员冬训云端Walk行', //
desc: ' ',
desc: '点击查看',
link: link, // ,JS
imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', //
success: () => {
@ -89,7 +89,7 @@
});
jwx.updateTimelineShareData({
title: '斜塘党员冬训云端Walk行', //
desc: ' ',
desc: '点击查看',
link: link, // ,JS
imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', //
success: () => {
@ -104,7 +104,7 @@
}
} else {
// this.$u.vuex('vuex_token', "8580|wkUOFD8hv3HAzRQ9zNsqLgc2awp3QS1BMaiYjIwp")
// this.$u.vuex('vuex_token', "8642|kSbQ892iDUpZKFVIhMJjoDTm04lo1em9VE4Hej1r")
this.$u.api.getAppId().then(res => {
let redirect = encodeURIComponent(link.replace(/#\//, ""))
window.location.href =

@ -7,9 +7,9 @@ const install = (Vue, vm) => {
// 此为自定义配置参数,具体参数见上方说明
Vue.prototype.$u.http.setConfig({
baseUrl,
showLoading: true, // 是否显示请求中的loading
loadingMask: true, // 展示loading的时候是否给一个透明的蒙层防止触摸穿透
loadingText: '加载中', // 请求loading中的文字提示
showLoading: false, // 是否显示请求中的loading
loadingMask: false, // 展示loading的时候是否给一个透明的蒙层防止触摸穿透
loadingText: '', // 请求loading中的文字提示
loadingTime: 800,
originalData: true, // 是否在拦截器中返回服务端的原始数据
// 设置自定义头部content-type

@ -1,5 +1,5 @@
{
"name" : "党员冬训云端Walk行",
"name" : "斜塘党员冬训云端Walk行",
"appid" : "__UNI__350D128",
"description" : "",
"versionName" : "1.0.0",
@ -74,7 +74,8 @@
"base" : "h5xtdk"
},
"devServer" : {
"disableHostCheck" : true
"disableHostCheck" : true,
"https" : false
},
"title" : "斜塘党员冬训云端Walk行"
}

@ -44,7 +44,7 @@
"preloadRule": {},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "党员冬训云端Walk行",
"navigationBarTitleText": "斜塘党员冬训云端Walk行",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}

@ -1,475 +0,0 @@
<template>
<div class="body">
<div class="bkg">
<u-image :lazy-load="false" :show-loading="false" mode="aspectFill" height="100vh" width="100vw"
:src="require('../../static/xtdk/answer-bg.png')"></u-image>
<u-image class="bg-bottom" :lazy-load="false" :show-loading="false" mode="aspectFill"
:src="require('../../static/xtdk/index-bg-bottom.png')"></u-image>
</div>
<div class="container">
<!-- <div class="container__bkg">
<u-image :lazy-load="false" :show-loading="false" width="100%" height="100%" mode="scaleToFill"
src="//cdn.langye.net/h5hssnx/answer-container-bkg.png"></u-image>
</div> -->
<div class="title">
(答题{{(now+1)}}/{{answers.length}})
</div>
<transition name="answering" enter-active-class="fade-in" leave-to-class="fade-out">
<div :style="{ 'display': progress !== 1 ? 'none' : '' }" v-show="progress === 1">
<div class="question">
{{ questionTitle }}
</div>
<div class="answers">
<div class="answers__item" v-for="(item, index) in questionAnswers"
@click="$u.throttle(() => answer(item, index))">
<div class="answers__item--num" :class="{ 'answers__item--num-active': index === flag }">
{{num(item.myindex)}}</div>
<div class="answers__item--text" :class="{ 'answers__item--text-active': index === flag }">
{{item.title}}</div>
</div>
</div>
</div>
</transition>
<transition name="answer-result" enter-active-class="fade-in" leave-to-class="fade-out">
<div :style="{ 'display': progress !== 2 ? 'none' : '' }" class="answers correct"
v-show="progress === 2">
<template v-if="isCorrect">
<div class="answers__img">
<u-image :show-loading="false" mode="widthFix" :width="194"
src="//cdn.langye.net/h5hssnx/correct.png"></u-image>
</div>
<div class="answers__text">
恭喜你答对了
</div>
</template>
<template v-else>
<div class="answers__img">
<u-image :show-loading="false" mode="widthFix" :width="194"
src="//cdn.langye.net/h5hssnx/error.png"></u-image>
</div>
<div class="answers__text">
正确答案{{ correctAnswer }}
</div>
</template>
<div class="answers__btn" @click="$u.throttle(next)">
<u-image :show-loading="false" mode="widthFix" :width="381"
src="//cdn.langye.net/h5hssnx/next-btn.png"></u-image>
</div>
</div>
</transition>
<transition name="answer-end" enter-active-class="fade-in" leave-to-class="fade-out">
<div :style="{ 'display': progress !== 3 ? 'none' : '' }" class="answers correct"
v-show="progress === 3">
<div class="answers__img">
<u-image mode="widthFix" :width="answerImgWidth" :src="answerImg"></u-image>
</div>
<template>
<template v-if="isCorrect">
<div class="answers__text">
恭喜你答对了
</div>
</template>
<template v-else>
<div class="answers__text">
正确答案{{ correctAnswer }}
</div>
</template>
</template>
<template>
<template v-if="!isTotalEnd">
<div class="answers__text answers__result">
打卡成功已完成<span>{{ totalDone }}</span>个红色场馆的打卡
完成{{ detail.points ? detail.points.length : 0}}家红色场馆打卡即可获得<span>荣誉证书</span>
</div>
<div class="answers__btn" @click="$u.throttle(toMap)">
<u-image mode="widthFix" :width="381"
:src="require('@/static/back-home-btn.png')"></u-image>
</div>
</template>
<template v-else>
<div class="answers__text answers__result">
打卡成功已完成所有红色场馆的打卡 <br>快来生成你的证书吧!
</div>
<div class="answers__btn" @click="$u.throttle(toCertificate)">
<u-image mode="widthFix" :width="381"
:src="require('@/static/certificate-btn.png')"></u-image>
</div>
</template>
</template>
</div>
</transition>
</div>
</div>
</template>
<script>
export default {
data() {
return {
isTotalEnd: false, //
detail: {},
now: 0,
nowAnswer: {},
answers: [],
myAnswers: [], //
isCorrect: false,
progress: 1, //123
flag: -1, //active index
};
},
methods: {
async getDetail() {
const res = await this.$u.api.getPoints()
this.detail = res
},
async getQuestions(id) {
const res = await this.$u.api.getQuestions({
point_id: id
})
this.answers = res.questions
},
answer(item, index) {
this.flag = index
this.myAnswers.push({
question_id: this.answers[this.now].id,
answer_ids: item.id
})
this.isCorrect = !!item.is_correct
setTimeout(() => {
this.progress = this.now === (this.answers?.length - 1) ? 3 : 2
if (this.progress === 3) {
this.isTotalEnd = this.detail.points?.length == this.totalDone
this.$u.api.saveQuiz({
point_id: this.$route.query?.id ? this.$route.query.id : this.vuex_point_id,
answers: this.myAnswers
})
}
}, 500)
},
next() {
this.now++
this.flag = -1
this.progress = 1
},
toMap() {
uni.navigateTo({
url: '/pages/map/map'
})
},
toCertificate() {
uni.navigateTo({
url: '/pages/certificate/certificate'
})
}
},
computed: {
answerImgWidth() {
if (this.isTotalEnd) {
return 370
}
if (this.isCorrect) {
return 194
}
return 184
},
answerImg() {
if (this.isTotalEnd) {
return require('@/static/error2.png')
}
if (this.isCorrect) {
return require('@/static/correct.png')
}
return require('@/static/error.png')
},
totalDone() {
if (this.detail && this.detail.points) {
let id = this.$route.query?.id ? this.$route.query.id : this.vuex_point_id
let point = this.detail.points.find(i => i.id == id)
return point?.has_answer > 0 ? this.detail.point_answer_total : this.detail.point_answer_total + 1
}
return 1
},
correctAnswer() {
let correct = this.answers[this.now]?.options?.find(i => i.is_correct)
return `${this.num(correct?.myindex)}${correct?.title}`
},
questionTitle() {
return this.answers[this.now]?.title
},
questionAnswers() {
return this.answers[this.now]?.options?.sort((a, b) => {
return a.myindex - b.myindex
})
},
num() {
return function(index) {
let map = new Map([
[1, 'A'],
[2, 'B'],
[3, 'C'],
[4, 'D'],
[5, 'E'],
[6, 'F'],
[7, 'G'],
[8, 'H'],
[9, 'I'],
])
return map.get(index)
}
},
containerTitle() {
return function(number) {
let chineseNumber = "";
let chineseDigits = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"];
let chineseUnits = ["", "十", "百", "千", "万", "亿"];
if (number === 0) {
return chineseDigits[0];
}
let digits = [];
while (number > 0) {
digits.push(number % 10);
number = Math.floor(number / 10);
}
let unitIndex = 0;
for (let i = 0; i < digits.length; i++) {
let digit = digits[i];
let unit = chineseUnits[unitIndex];
if (digit === 0) {
if (unit === "万" || unit === "亿") {
chineseNumber = chineseUnits[unitIndex] + chineseNumber;
unitIndex++;
}
continue;
}
chineseNumber = chineseDigits[digit] + unit + chineseNumber;
unitIndex++;
if (unitIndex === 5) {
unitIndex = 1;
}
}
return `${chineseNumber}`;
}
}
},
onLoad(option) {
this.getQuestions(option.id);
this.getDetail();
}
}
</script>
<style lang="scss">
.body {
padding: 100rpx 20rpx 0 20rpx;
}
.bkg {
z-index: -1;
position: absolute;
top: 0;
left: 0;
}
.bg-bottom {
height: 628rpx !important;
width: 100vw;
background: url(../../static/xtdk/index-bg-bottom.png) no-repeat top left;
background-size: 100% 100%;
position: absolute;
bottom: 0;
left: 0;
}
.container {
min-height: 790rpx;
padding-bottom: 96rpx;
position: relative;
&__bkg {
z-index: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
& .title {
width: 51%;
text-align: center;
font-size: 50rpx;
font-weight: 400;
color: #FFFFFF;
padding: 15rpx 0rpx;
z-index: 1;
position: relative;
}
& .question {
font-weight: 500;
color: #333333;
font-size: 35rpx;
margin-top: 96rpx;
padding: 0 51rpx;
z-index: 1;
position: relative;
}
& .correct {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
& .answers {
margin-top: 58rpx;
padding: 0 51rpx;
z-index: 1;
position: relative;
&__item {
display: flex;
justify-content: space-between;
align-items: flex-start;
&+div {
margin-top: 34rpx;
}
&--num {
font-weight: 500;
color: #666666;
font-size: 32rpx;
text-align: center;
width: 60rpx;
height: 60rpx;
line-height: 60rpx;
background: #fff;
border: 1px solid #F85352;
border-radius: 50%;
transition: all 0.2s;
margin-right: 13rpx;
&-active {
background: #F85352;
color: #fff;
}
}
&--text {
line-height: 60rpx;
flex: 1;
font-weight: 500;
font-size: 32rpx;
color: #666;
background: #fff;
border: 1px solid #F85352;
border-radius: 0 20rpx 20rpx 20rpx;
transition: all 0.2s;
padding: 0 54rpx;
&-active {
background: #F85352;
color: #fff;
}
}
}
&__text {
font-size: 32rpx;
font-weight: 500;
color: #666666;
padding-top: 52rpx;
text-align: center;
//line-height: 135rpx;
&>span {
font-size: 34rpx;
color: #C52A34;
}
}
&__result {
color: #666666;
font-weight: 500;
font-size: 20rpx;
line-height: 36rpx;
word-break: break-word;
padding: 0 calc(127rpx - 51rpx);
padding-top: 38rpx;
}
}
}
.fade-in {
animation: fade-in .5s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.fade-out {
animation: fade-out .4s ease-out both;
}
@keyframes fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
</style>

@ -1,14 +1,16 @@
<template>
<div class="body">
<div class="bkg">
<!-- <div class="bkg">
<u-image :lazy-load="false" :show-loading="false" mode="aspectFill" height="100vh" width="100vw"
:src="require('../../static/xtdk/answer-bg.png')"></u-image>
<u-image class="bg-bottom" :lazy-load="false" :show-loading="false" mode="aspectFill"
:src="require('../../static/xtdk/index-bg-bottom.png')"></u-image>
</div> -->
<div class="bottom">
</div>
<div class="container">
<div class="container" :class="{'container_has':changebottom}">
<!-- <div class="container__bkg">
<u-image :lazy-load="false" :show-loading="false" width="100%" height="100%" mode="scaleToFill"
src="//cdn.langye.net/h5hssnx/answer-container-bkg.png"></u-image>
@ -24,7 +26,7 @@
</div>
<div class="answers">
<!-- -->
<div class="answers__item" :class="{ 'answers__item-active': index === flag }" v-for="(item, index) in questionAnswers"
<div class="answers__item" :class="{ 'answers__item-active': index === flag,'unclickable': flag>-1}" v-for="(item, index) in questionAnswers"
@click="$u.throttle(() => answer(item, index))"
>
<div class="answers__item--num" :class="{ 'answers__item--num-active': index === flag }">
@ -33,7 +35,7 @@
{{item.title}}</div>
</div>
</div>
<div v-if="answers.length>0" class="answers_correct">{{ correctAnswer }}</div>
<!-- <div v-if="answers.length>0" class="answers_correct">{{ correctAnswer }}</div> -->
</div>
</transition>
@ -49,6 +51,9 @@
<div class="answers__text">
恭喜你答对了
</div>
<div class="answers__text">
正确答案{{ correctAnswer }}
</div>
</template>
<template v-else>
@ -56,9 +61,10 @@
<u-image :show-loading="false" mode="heightFix" :width="137" :height="261"
:src="require('@/static/xtdk/answer-wrong.png')"></u-image>
</div>
<div class="answers__text">
<!-- 正确答案{{ correctAnswer }} -->
正确答案{{ correctAnswer }}
</div>
<div class="answers__text">
再接再厉
</div>
</template>
@ -80,12 +86,17 @@
<template v-if="isCorrect">
<div class="answers__text">
恭喜你答对了
</div>
<div class="answers__text">
正确答案{{ correctAnswer }}
</div>
</template>
<template v-else>
<div class="answers__text">
<!-- 正确答案{{ correctAnswer }} -->
<template v-else>
<div class="answers__text">
正确答案{{ correctAnswer }}
</div>
<div class="answers__text">
再接再厉
</div>
</template>
@ -134,7 +145,9 @@
progress: 1, //123
flag: -1, //active index
correctAnswer:''
correctAnswer:'',
signInfo:'',
changebottom:false
};
},
methods: {
@ -150,7 +163,8 @@
this.answers = res.questions
},
answer(item, index) {
answer(item, index) {
this.correctAnswer = ''
this.flag = index
this.myAnswers.push({
@ -159,11 +173,12 @@
})
this.isCorrect = !!item.is_correct
let correct = this.answers[this.now]?.options?.find(i => i.is_correct)
this.correctAnswer = `${this.num(correct?.myindex)}`
this.correctAnswer = `${this.num(correct?.myindex)}${correct?.title}`
setTimeout(() => {
this.progress = this.now === (this.answers?.length - 1) ? 3 : 2
this.correctAnswer = ''
this.progress = this.now === (this.answers?.length - 1) ? 3 : 2
this.changebottom = true
// this.correctAnswer = ''
if (this.progress === 3) {
this.isTotalEnd = this.detail.points?.length == this.totalDone
this.$u.api.saveQuiz({
@ -171,13 +186,14 @@
answers: this.myAnswers
})
}
}, 2000)
}, 500)
},
next() {
this.now++
this.flag = -1
this.progress = 1
this.progress = 1
this.changebottom = false
},
toMap() {
@ -185,12 +201,25 @@
url: '/pages/map/map'
})
},
toCertificate() {
uni.navigateTo({
url: '/pages/certificate/certificate'
})
}
async getPoster () {
const res = await this.$u.api.getPoster({
user_id: this.vuex_user.id,
type: 2
})
this.signInfo = res
},
async toCertificate() {
await this.getPoster()
if (!this.signInfo?.upload) {
uni.navigateTo({
url: '/pages/sign/sign'
})
}else{
uni.navigateTo({
url: '/pages/certificate/certificate'
})
}
},
},
computed: {
answerImgWidth() {
@ -300,10 +329,23 @@
<style lang="scss">
.body {
padding: 100rpx 20rpx 0 20rpx;
// padding: 100rpx 20rpx 0 20rpx;
background: url(../../static/xtdk/answer-bg.png) no-repeat top left;
background-size: 100% 100%;
background-color: #fdd5d6;
height: 100vh;
width: 100vw;
overflow: scroll;
}
.bottom{
height: 628rpx;
width: 100vw;
background: url(../../static/xtdk/index-bg-bottom.png) no-repeat top left;
background-size: 100% 100%;
position: absolute;
bottom: 0;
left: 0;
}
.bkg {
z-index: -1;
@ -312,32 +354,19 @@
left: 0;
}
.bg-bottom {
height: 628rpx !important;
width: 100vw;
background: url(../../static/xtdk/index-bg-bottom.png) no-repeat top left;
background-size: 100% 100%;
position: absolute;
bottom: 0;
left: 0;
}
.container {
min-height: 790rpx;
min-height: 690rpx;
// padding-bottom: 96rpx;
// position: relative;
position: relative;
z-index:2;
width:90%;
background-color: #f9f6f6;
border-radius:40rpx;
margin:0 auto;
box-shadow: 0px 0px 20px -10px #d22425;
margin-top:-40rpx;
margin-top:40rpx;
padding-bottom:51rpx;
&__bkg {
z-index: 0;
@ -392,9 +421,12 @@
padding-left:15rpx;
color:#333333;
font-size: 28rpx;
}
}
& .answers {
& .unclickable{
pointer-events: none;
}
// margin-top: 30rpx;
padding: 51rpx;
// padding-bottom:60rpx;
@ -475,8 +507,8 @@
font-size: 32rpx;
font-weight: 500;
color: #666666;
padding-top: 52rpx;
padding-bottom: 52rpx;
margin-top: 30rpx;
// margin-bottom: 20rpx;
text-align: center;
//line-height: 135rpx;
@ -484,6 +516,10 @@
font-size: 34rpx;
color: #C52A34;
}
}
&__btn{
margin-top:30rpx;
margin-bottom:50rpx;
}
&__result {
@ -498,7 +534,13 @@
}
}
}
.container_has{
background-image:url(../../static/xtdk/answer-bg-bottom.png);
background-color: #fff;
background-position: bottom left;
background-size: 100% 130rpx;
background-repeat:no-repeat;
}
.fade-in {
animation: fade-in .5s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

@ -13,7 +13,7 @@
<div class="container__text">
<div class="container__text--title">
<u-image :show-loading="false" :width="100" :src="signInfo.upload ? signInfo.upload.url : vuex_sign_base64" mode="heightFix" :height="56"></u-image>
<u-image :show-loading="false" :width="100" :src="signInfo.upload ? signInfo.upload.url : vuex_sign_base64" mode="heightFix" :height="56"></u-image>
</div>
<div class="container__text--total">
你已完成2024年党员冬训云端Walk行党员研学线上打卡
@ -34,7 +34,7 @@
<transition name="share-pop" enter-active-class="fade-in" leave-to-class="fade-out">
<view class="share_cover" v-show="isShare" @click="isShare = false">
<image src="/static/toShare.png" class="share_cover_arrow"></image>
<image :src="require('@/static/xtdk/toShare.png')" class="share_cover_arrow"></image>
<view class="share_cover_word">
请点击右上角将它发送给指定朋友或分享到朋友圈
</view>
@ -167,12 +167,12 @@ export default {
}
},
async onShow() {
// await this.getPoster()
// if (!this.signInfo?.upload) {
// uni.navigateTo({
// url: '/pages/sign/sign'
// })
// }
await this.getPoster()
if (!this.signInfo?.upload) {
uni.navigateTo({
url: '/pages/sign/sign'
})
}
}
}
</script>
@ -271,7 +271,7 @@ export default {
.content {
padding-top: 243rpx;
padding-top: 160rpx;
position: relative;
.container {

@ -1,12 +1,22 @@
<template>
<view class='wrap'>
<view class="playvideo" v-if="playvideo">
<view class="playvideowrap">
<video :autoplay="true" :src="detailPoints.video?detailPoints.video.url:''" play-btn-position="center"></video>
<view class="closevideo" @click="playvideo=false">X</view>
</view>
<!-- <u-icon name="photo" color="#fff" size="30"></u-icon> -->
<view class="playvideo" v-if="playvideo" @click="playvideo=false,isfull=false">
<view class="playvideowrap">
<video ref="video" :autoplay="true" @timeupdate="onTimeUpdate"
:src="detailPoints.video?detailPoints.video.url:''" play-btn-position="center"></video>
<view class="closevideo" @click="playvideo=false,isfull=false">X</view>
</view>
<!-- <u-icon name="photo" color="#fff" size="30"></u-icon> -->
</view>
<view class="playvideo" v-if="playimg" @click="playimg=false">
<view class="playvideowrap" style="width:100%">
<view v-if="imageArr.length>0&&showVorImage" class="imgwrap">
<u-swiper :height="537" bgColor="transparent" :border-radius="0" :list="imageArr"
:autoplay="false"></u-swiper>
<view class="closevideo" @click="playimg=false">X</view>
</view>
</view>
</view>
<view class="detail-study">
<view>
@ -18,26 +28,27 @@
<view class="detail-study-video">
<view class="detail-study-video-content">
<view style="display: flex;">
<view class="detail-study-video-content-left">
<view v-if="detailPoints.video&&showVorImage" class="videowrap" @click="playvideo=true">
<view class="videowrap-mask"></view>
<view class="videowrap-play"></view>
<image :src="detailPoints.video_image.url"></image>
<!-- <video :src="detailPoints.video?detailPoints.video.url:''" style="width: 100%;height: 340rpx;" play-btn-position="center"></video> -->
</view>
<view v-if="imageArr.length>0&&showVorImage" class="imgwrap">
<u-swiper :height="340" bgColor="#fff" radius="0rpx" :list="imageArr" :autoplay="false"
></u-swiper>
<view class="detail-study-video-content-left">
<view v-if="detailPoints.video&&showVorImage" class="videowrap"
@click="playvideo=true,isfull=true">
<view class="videowrap-mask"></view>
<view class="videowrap-play"></view>
<image :src="detailPoints.video_image.url"></image>
<!-- <video :src="detailPoints.video?detailPoints.video.url:''" style="width: 100%;height: 340rpx;" play-btn-position="center"></video> -->
</view>
<view class="detail-study-video-content-left-change" v-if="videoOrimage===3">
<view @click="showVorImage=true">
<image :src="require('@/static/xtdk/detail-camera.png')"></image>1
</view>
<view @click="showVorImage=false">
<image :src="require('@/static/xtdk/detail-photo.png')"></image>
{{imageArr.length}}
</view>
<view v-if="imageArr.length>0&&showVorImage" class="imgwrap">
<u-swiper @click="playimg=true" :height="340" bgColor="transparent" :border-radius="0"
:list="imageArr" :autoplay="false"></u-swiper>
</view>
<view class="detail-study-video-content-left-change" v-if="videoOrimage===3">
<view @click="showVorImage=true">
<image :src="require('@/static/xtdk/detail-camera.png')"></image>1
</view>
<view @click="showVorImage=false">
<image :src="require('@/static/xtdk/detail-photo.png')"></image>
{{imageArr.length}}
</view>
</view>
</view>
<view class="detail-study-video-content-right">
@ -46,17 +57,17 @@
</view>
</view>
</view>
<view class="detail-study-detail">
<view class="detail-study-bg">{{detailPoints.name}}</view>
<view class="detail-study-detail">
<view class="detail-study-bg">{{companyName}}</view>
<u-read-more :showHeight="450" :textIndent="'0em'" closeText="查看更多" color="#d0382f" ref="uReadMore">
<rich-text :nodes="detailPoints.content"></rich-text>
</u-read-more>
<view class="detail-study-btn" @click="$u.throttle(toAnswer)">
<p>你已经对{{detailPoints.name}}有一些了解了</p>
<p>快来答题</p>
</u-read-more>
<view class="detail-study-btn" @click="$u.throttle(toAnswer)">
<p>你已经对{{companyName}}有一些了解了<span v-if="companyName.length>=10"></span></p>
<p v-if="companyName.length<10"></p>
</view>
</view>
</view>
<!-- <iframe ref="iframe" src="static/html/explanation.html" frameborder="0"></iframe> -->
@ -72,13 +83,22 @@
studybtn: require('../../static/xtdk/detail-btn.png'),
flag: true,
detailPoints: {},
imageArr: [],
videoOrimage:1,//1:23
showVorImage:true,
playvideo:false
imageArr: [],
videoOrimage: 1, //1:23
showVorImage: true,
playvideo: false,
isfull: false,
playimg: false,
companyName:''
};
},
methods: {
onTimeUpdate(e) {
if (this.isfull) {
this.$refs.video.requestFullScreen();
this.isfull = false
}
},
showVr(id) {
this.$u.api.baseFormShow({
table_name: 'map_point_contents',
@ -136,22 +156,23 @@
},
async onLoad(option) {
let detail = await this.getDetail(option.id)
this.detailPoints = detail.points
this.detailPoints = detail.points
this.companyName = this.detailPoints.name
this.$nextTick(() => {
this.$refs.uReadMore.init();
})
let vrs = detail.content
let images = await this.getImages(option.id)
images.data.map(item=>{
this.imageArr.push(item.image.url)
let images = await this.getImages(option.id)
images.data.map(item => {
this.imageArr.push(item.image.url)
})
if(this.detailPoints.video&&this.imageArr.length>0){
this.videoOrimage = 3
}else if(this.imageArr.length>0&&!this.detailPoints.video){
this.videoOrimage = 2
}else{
this.videoOrimage = 1
if (this.detailPoints.video && this.imageArr.length > 0) {
this.videoOrimage = 3
} else if (this.imageArr.length > 0 && !this.detailPoints.video) {
this.videoOrimage = 2
} else {
this.videoOrimage = 1
}
// if (this.flag) {
// uni.showLoading({
@ -187,40 +208,49 @@
background-color: #fdd5d6;
height: 100vh;
width: 100vw;
.playvideo{
width:100%;
height:100%;
position: absolute;
top:0;
left:0;
z-index:11;
background-color: rgba(0,0,0,0.6);
&>.playvideowrap{
width:95%;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
uni-video{
width:100%
}
.closevideo{
color: #fff;
width: 50rpx;
height: 50rpx;
border: 1px solid #fff;
border-radius: 50rpx;
position: absolute;
text-align: center;
line-height: 50rpx;
/* display: inline-block; */
right: 0rpx;
top:-25rpx
// transform: translate(0,-50%);
}
}
overflow: scroll;
.playvideo {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 11;
background-color: rgba(0, 0, 0, 0.6);
&>.playvideowrap {
width: 95%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
uni-video {
width: 100%
}
::v-deep .u-indicator-item-round.u-indicator-item-round-active {
background-color: #bf3022;
}
.closevideo {
color: #fff;
width: 50rpx;
height: 50rpx;
border: 1px solid #fff;
border-radius: 50rpx;
position: absolute;
text-align: center;
line-height: 50rpx;
/* display: inline-block; */
right: 0rpx;
top: -25rpx // transform: translate(0,-50%);
}
}
}
.title {
width: 514rpx;
height: 274rpx;
@ -257,65 +287,73 @@
&-left {
width: 475rpx;
height: 340rpx;
position: relative;
& .videowrap{
image{
width: 475rpx;
height: 340rpx;
padding-top:0;
}
&-mask{
width: 475rpx;
height: 340rpx;
background-color: rgba(0, 0, 0, 0.5);
position: absolute;
z-index: 9;
top: 0;
left: 0;
}
&-play{
background: url(../../static/xtdk/detail-videoplay.png) no-repeat top left;
width:67rpx;
height:68rpx;
background-size: 100% 100%;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
z-index: 10;
}
}
// ::v-deep .u-swiper-indicator{
// display: none;
// }
::v-deep .u-indicator-item-round.u-indicator-item-round-active{
background-color: #bf3022;
}
&-change{
padding:10rpx 30rpx;
border-radius: 20rpx;
background-color: rgba(0,0,0,0.3);
display: flex;
position: absolute;
bottom:20rpx;
left:20rpx;
z-index: 10;
&>view{
font-size:24rpx;
color:#fff;
&:first-child{
margin-right:10rpx;
border-right:1px solid #fff;
padding-right:10rpx
}
image{
width:23rpx;
height:21rpx;
padding-right:10rpx
}
}
height: 340rpx;
position: relative;
& .videowrap {
image {
width: 475rpx;
height: 340rpx;
padding-top: 0;
}
&-mask {
width: 475rpx;
height: 340rpx;
background-color: rgba(0, 0, 0, 0.5);
position: absolute;
z-index: 9;
top: 0;
left: 0;
}
&-play {
background: url(../../static/xtdk/detail-videoplay.png) no-repeat top left;
width: 67rpx;
height: 68rpx;
background-size: 100% 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
}
// ::v-deep .u-swiper-indicator{
// display: none;
// }
::v-deep .u-indicator-item-round.u-indicator-item-round-active {
background-color: #bf3022;
}
&-change {
padding: 10rpx 30rpx;
border-radius: 20rpx;
background-color: rgba(0, 0, 0, 0.3);
display: flex;
position: absolute;
bottom: 20rpx;
left: 20rpx;
z-index: 10;
&>view {
font-size: 24rpx;
color: #fff;
&:first-child {
margin-right: 10rpx;
border-right: 1px solid #fff;
padding-right: 10rpx
}
image {
width: 23rpx;
height: 21rpx;
padding-right: 10rpx
}
}
}
}
@ -331,22 +369,24 @@
&-detail {
width: 685rpx;
margin: 20rpx auto;
margin: 20rpx auto;
padding-bottom: 40rpx;
}
&-bg{
width: 685rpx;
height: 49rpx;
background: url(../../static/xtdk/detail-study1.png) no-repeat top left;
background-size: 100% 100%;
margin: 20rpx auto;
line-height: 49rpx;
color:#bf3022;
padding-left:60rpx;
font-family: '宋体';
font-size: 30rpx;
&-bg {
width: 685rpx;
height: 49rpx;
background: url(../../static/xtdk/detail-study1.png) no-repeat top left;
background-size: 100% 100%;
margin: 20rpx auto;
line-height: 49rpx;
color: #bf3022;
padding-left: 60rpx;
font-family: '宋体';
font-size: 30rpx;
}
&-btn {
width: 685rpx;
height: 182rpx;
@ -356,8 +396,9 @@
padding-top: 100rpx;
padding-left: 215rpx;
color: #fbf2dd;
font-size: 20rpx;
margin-top:20rpx;
font-size: 20rpx;
margin-top: 20rpx;
padding-right:40rpx;
}
}
}

@ -44,7 +44,7 @@
height: '100rpx'
}, {
name: 'zoomIn',
duration: '1s',
duration: '1.5s',
timer: 1500,
content: require('../../static/xtdk/index-title.png'),
autoplay: false,
@ -55,8 +55,8 @@
},
{
name: 'wobble',
duration: '1s',
timer: 1000,
duration: '1.5s',
timer: 1500,
content: require('../../static/xtdk/index-btn.png'),
autoplay: false,
class: 'btn',
@ -113,21 +113,21 @@
.logo {
position: absolute;
top: 190rpx;
top: 100rpx;
left: 50%;
transform: translate(-50%, 0);
}
.title {
position: absolute;
top: 330rpx;
top: 240rpx;
left: 50%;
transform: translate(-50%, 0);
}
.btn {
position: absolute;
top: 650rpx;
top: 560rpx;
left: 200rpx;
// transform: translate(-50%, 0);
}
@ -143,14 +143,16 @@
width: 207rpx;
height: 160rpx;
z-index: 9;
animation: slide-in 4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
animation: slide-in 5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes slide-in {
0% {
transform: translateX(-100%);
}
// 50% {
// transform: translateX(236rpx);
// }
100% {
transform: translateX(469rpx);
}

@ -24,9 +24,14 @@
</div>
<div class="box__text" :class="{ 'box__text--active': item.has_answer > 0 }"
:style="{ 'transform': (item.d > 100 || item.d < -100) ? 'translate(calc(-50% + 58rpx), 136rpx)' : '' }">
<image class="icons"
v-if="index>0"
:style="{'left':`-${iconArr[index]['width']/2+18}rpx`,'width':`${iconArr[index]['width']}rpx`,'height':`${iconArr[index]['height']}rpx`}"
:src="iconArr[index]['src']" alt="">
<!-- <u-image v-if="index>0" class="icons" :style="{'left':`-${iconArr[index]['width']/2+10}rpx`}" :src="iconArr[index]['src']" :width="iconArr[index]['width']" :height="iconArr[index]['height']" ></u-image> -->
{{ item.name }}</div>
<u-image class="pointer__flag"
v-if="item.has_answer > 0"
v-if="item.has_answer > 0"
:width="92" :height="67"
:src="require('@/static/xtdk/map-flag.png')"></u-image>
</div>
@ -42,7 +47,7 @@
<div class="close">
<u-icon name="close-circle" :size="40" color="#555" @click="isShowProgress = false"></u-icon>
</div>
<div class="box">
<div class="box" @click="$u.throttle(toCertificate(done !== pointers.length))">
<div class="box__line-progress">
<u-image class="box__line-progress--bkg" width="100%" mode="widthFix"
:src="require('@/static/xtdk/map-progress.png')"></u-image>
@ -68,7 +73,7 @@
</template>
<template v-else>
<br><span>生成我的</span>
<span class="box__text--red" @click="$u.throttle(toCertificate)"></span>
<span class="box__text--red" @click="$u.throttle(toCertificate(false))"></span>
</template>
</div>
</div>
@ -88,7 +93,46 @@
data() {
return {
indexlogo:require('../../static/xtdk/index-logo.png'),
indextitle:require('../../static/xtdk/index-title.png'),
indextitle:require('../../static/xtdk/index-title.png'),
iconArr:[{
src:'',
width:0,
height:0
},{
src:require('../../static/xtdk/map1.png'),
width:52,
height:68
},{
src:require('../../static/xtdk/map2.png'),
width:57,
height:65
},{
src:require('../../static/xtdk/map3.png'),
width:35,
height:85
},{
src:require('../../static/xtdk/map4.png'),
width:23,
height:102
},{
src:require('../../static/xtdk/map5.png'),
width:26,
height:83
},{
src:require('../../static/xtdk/map6.png'),
width:43,
height:59
},{
src:require('../../static/xtdk/map7.png'),
width:68,
height:54
},{
src:require('../../static/xtdk/map8.png'),
width:45,
height:82
}
],
signInfo:'',
isBkgLoad: false,
done: 0,
isShowProgress: true,
@ -119,11 +163,35 @@
]
};
},
methods: {
toCertificate() {
uni.navigateTo({
url: '/pages/certificate/certificate'
})
methods: {
async getPoster () {
const res = await this.$u.api.getPoster({
user_id: this.vuex_user.id,
type: 2
})
this.signInfo = res
},
async getPoster () {
const res = await this.$u.api.getPoster({
user_id: this.vuex_user.id,
type: 2
})
this.signInfo = res
},
async toCertificate(isgo) {
if(isgo){
return
}
await this.getPoster()
if (!this.signInfo?.upload) {
uni.navigateTo({
url: '/pages/sign/sign'
})
}else{
uni.navigateTo({
url: '/pages/certificate/certificate'
})
}
},
toDetail(item) {
this.$u.vuex('vuex_point_id', item.id)
@ -240,21 +308,21 @@
}
.top {
width: 100%;
height: 474rpx;
height: 380rpx;
background: transparent;
.logo{
width: 135rpx;
height: 100rpx;
width: 122rpx;
height: 90rpx;
position: absolute;
top: 60rpx;
top: 50rpx;
left: 50%;
transform: translate(-50%, 0);
}
.title{
width: 514rpx;
height: 274rpx;
width: 360rpx;
height: 192rpx;
position: absolute;
top: 180rpx;
top: 170rpx;
left: 50%;
transform: translate(-50%, 0);
}
@ -262,11 +330,13 @@
.container {
// background: #FAEDCD;
height: calc(100vh - 474rpx);
width: 100vw;
height: calc(100vh - 380rpx);
// width: 100vw;
width: calc(100vw + 250rpx);
overflow: scroll;
position: relative;
position: relative;
margin-left:-250rpx;
&>img {
width: auto;
@ -302,7 +372,7 @@
//transform: translate(0%, -34rpx);
position: absolute;
top: -30rpx;
right: -20rpx;
right: -10rpx;
}
&__horn {
@ -340,14 +410,23 @@
// transform: translate(calc(-50% + 58rpx), -100%);
transform: translate(0, -30%);
padding: 10rpx 8rpx;
padding: 10rpx 8rpx;
position: relative;
// position: absolute;
// top: 0;
.icons{
max-height:102rpx;
max-width:68rpx;
position: absolute;
left: -25px;
bottom:0
// transform: translate(0,-50%);
}
&--active {
background: #b93736;
color: #fff;
}
}
}
&__image {
@ -362,7 +441,7 @@
// filter: drop-shadow(2rpx 4rpx 4rpx #90D2CF);
overflow: hidden;
position: relative;
min-width:200rpx;
min-width:240rpx;
// max-width: 212rpx;
// width: 212rpx;
// height: 101rpx;

@ -21,7 +21,12 @@
<view class="sign-btn">
<view class="sign-btn__reset" @click="$u.throttle(onClick('clear'))"></view>
<view class="sign-btn__confirm" @click="$u.throttle(onClick('save'))"></view>
</view>
<view class="sign-btn sign-close">
<view class="sign-btn__reset" @click="$u.throttle(onClick('close'))"></view>
</view>
</view>
</template>
@ -122,6 +127,11 @@ export default {
this.openSmooth = !this.openSmooth
return
}
if(type=='close'){
uni.redirectTo({
url:'/pages/map/map'
})
}
if (type == 'save') {
this.$refs.signatureRef.canvasToTempFilePath({
success: (res) => {
@ -271,8 +281,13 @@ export default {
border-radius: 34rpx;
line-height: 66rpx;
text-align: center;
margin-right: 52rpx;
}
}
&-close{
top:90%;
right:-100rpx
}
}
}
@ -372,6 +387,12 @@ export default {
line-height: 6vw;
}
}
&-close{
top: 10%;
/* right: 100%; */
bottom: 0;
left: 90%;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Loading…
Cancel
Save