lion 2 years ago
parent 03d1798f10
commit ac0853f05e

@ -1,8 +1,10 @@
<template> <template>
<div class="body" id="signed"> <div class="body" id="signed">
<u-image :lazy-load="false" :show-loading="false" class="bkg" width="100vw" height="100%" :src="require('@/static/cer-bg.png')"></u-image> <u-image :lazy-load="false" :show-loading="false" class="bkg" width="100vw" height="100%" :src="require('@/static/cer-bg.png')"></u-image>
<!-- <u-image :lazy-load="false" :show-loading="false" class="city" mode="widthFix" width="100vw" src="//cdn.langye.net/h5hssnx/city.png"></u-image> --> <u-image :lazy-load="false" :show-loading="false" class="logo1" width="630" height="142" :src="require('@/static/cer-logo1.png')"></u-image>
<u-image id="share-img" v-show="!isHidden" class="share-img" mode="scaleToFill" :width="99" :height="99" :src="require('@/static/share.png')" @click="$u.throttle(share)"> mode=</u-image> <u-image :lazy-load="false" :show-loading="false" class="logo2" width="520" height="245" :src="require('@/static/cer-logo2.png')"></u-image>
<u-image id="share-img" v-show="!isHidden" class="share-img" mode="scaleToFill" :width="99" :height="99" :src="require('@/static/share.png')" @click="$u.throttle(share)"> mode=</u-image>
<div class="content"> <div class="content">
<div class="container"> <div class="container">
<div class="container__text"> <div class="container__text">
@ -153,9 +155,17 @@ export default {
.body { .body {
overflow: hidden; overflow: hidden;
min-height: 100vh; min-height: 100vh;
position: relative; position: relative;
} }
.logo1{
margin:0 auto;
margin-top:100rpx;
}
.logo2{
margin:0 auto;
margin-top:40rpx;
}
.footer { .footer {
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
@ -224,7 +234,7 @@ export default {
.content { .content {
padding-top: 730rpx; padding-top: 40rpx;
position: relative; position: relative;
.container { .container {

@ -32,7 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="detail-btn"> <view class="detail-btn" v-if="!isSubmit">
<view v-if="currentIndex<question_list.length-1" class="detail-btn-next" @click="next"> <view v-if="currentIndex<question_list.length-1" class="detail-btn-next" @click="next">
下一题 下一题
</view> </view>
@ -40,11 +40,11 @@
完成打卡 完成打卡
</view> </view>
</view> </view>
<!-- <view class="detail-btn" v-else> <view class="detail-btn" v-else>
<view class="detail-btn-next" @click="goMap"> <view class="detail-btn-next" @click="goMap">
返回地图 返回地图
</view> </view>
</view> --> </view>
</view> </view>
</view> </view>
</view> </view>
@ -134,13 +134,13 @@
toast('请先答题') toast('请先答题')
return return
} }
if(this.isSubmit || this.isNext){ if(this.isNext){
return return
} }
this.isNext = true this.isNext = true
if(this.currentIndex==this.question_list.length-1){ if(this.currentIndex==this.question_list.length-1){
uni.showLoading({title:'提交中'}) uni.showLoading({title:'提交中'})
this.isSubmit = true
} }
this.showAnswer = true this.showAnswer = true
let answer_id = [] let answer_id = []
@ -162,14 +162,16 @@
answers: that.myAnswers answers: that.myAnswers
}).then(res=>{ }).then(res=>{
uni.hideLoading() uni.hideLoading()
toast('打卡成功',1000,function(){ that.isSubmit = true
setTimeout(function(){ toast("打卡成功")
uni.redirectTo({ // toast('',1000,function(){
url:'/pages/map/map' // setTimeout(function(){
}) // uni.redirectTo({
},500) // url:'/pages/map/map'
// })
// },500)
}) // })
}) })
// .then(res=>{ // .then(res=>{

@ -2,13 +2,13 @@
<div class="wrap"> <div class="wrap">
<div class="map"> <div class="map">
<movable-area style="width:100vw;height:100vh" class="bg" scale-area> <movable-area style="width:100vw;height:100vh" class="bg" scale-area>
<movable-view :x="area.x" :style="{ 'height': '100vh', 'width': area.w +'rpx' }" :scale="true" <movable-view :x="area.x" :style="{ 'height': '100vh', 'width': area.w +40+'px' }" :scale="true"
out-of-bounds direction="all"> out-of-bounds direction="all">
<view class="map-wrap"> <view class="map-wrap" :style="{ 'height': '100vh', 'width': area.w+'px','margin':'0 auto' }">
<img style="height:100vh;display:block;margin:0 auto" mode="heightFix" ref="image" <img style="height:100vh;display:block;margin:0 auto" mode="heightFix" ref="image"
:src="require('@/static/map-map.png')" alt=""> :src="require('@/static/map-map.png')" alt="" @load="load">
<view v-for="item in pointers"> <view v-for="item in pointers">
<view class="map-item" @click="toDetail(item)" :style="{'top':item.y+'%','left':item.x+'%'}"> <view class="map-item" @click="toDetail(item)" :style="{'top':item.y+'%','left':item.x+'%'}" >
<image class="map-item-flag" v-if="item.has_answer > 0" :src="require('@/static/map-flag.png')"></image> <image class="map-item-flag" v-if="item.has_answer > 0" :src="require('@/static/map-flag.png')"></image>
<image class="map-item-points" :src="require('@/static/map-point.png')"></image> <image class="map-item-points" :src="require('@/static/map-point.png')"></image>
<view class="map-item-title"> <view class="map-item-title">
@ -105,7 +105,12 @@
pointers: [] pointers: []
}; };
}, },
methods: { methods: {
load(){
this.area.w = this.$refs['image'].getBoundingClientRect().width
this.area.h = this.$refs['image'].getBoundingClientRect().height
},
async getPoints() { async getPoints() {
this.pointers = [] this.pointers = []
const res = await this.$u.api.getPoints() const res = await this.$u.api.getPoints()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Loading…
Cancel
Save