提交 6bc84dc4 编写于 作者: huangwensu's avatar huangwensu

点赞页面问题优化

上级 43842e07
<template>
<div class="common-loader loader--style3" title="2">
<div class="loader-mask"></div>
<svg
version="1.1"
id="loader-1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
width="40"
height="40"
viewBox="0 0 60 60"
style="enable-background:new 0 0 80 80;"
xml:space="preserve"
>
<path
fill="#000"
d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"
>
<animateTransform
attributeType="xml"
attributeName="transform"
type="rotate"
from="0 25 25"
to="360 25 25"
dur="0.6s"
repeatCount="indefinite"
/>
</path>
</svg>
</div>
</template>
<style lang="less" scoped>
.common-loader {
.loader-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 1000000020;
background: rgba(0, 0, 0, 0.1);
}
svg {
position: fixed;
top: 300px;
left: 172px;
z-index: 1000000021;
}
}
svg path,
svg rect {
fill: #449284;
}
</style>
...@@ -245,15 +245,16 @@ export default { ...@@ -245,15 +245,16 @@ export default {
}, },
// 首次进入活动页面 // 首次进入活动页面
firstEnterActivity(data) { firstEnterActivity(data) {
checkFirstEnter({ if(getCookie('token')) {
activityId: this.activityId checkFirstEnter({
}).then(res => { activityId: this.activityId
if(res.data == 1) { //0未知,1第一次 2非第一次 }).then(res => {
this.beanNum = data.firstEnterScore; if(res.data == 1) { //0未知,1第一次 2非第一次
this.showFirstEnter = true; this.beanNum = data.firstEnterScore;
} this.showFirstEnter = true;
}) }
})
}
}, },
getUserInfo() { getUserInfo() {
this.$rocNative this.$rocNative
......
...@@ -22,16 +22,22 @@ ...@@ -22,16 +22,22 @@
<van-count-down v-if="!notSend" :time="time" @finish="finishCount" :format="'ss' + 's'" /> <van-count-down v-if="!notSend" :time="time" @finish="finishCount" :format="'ss' + 's'" />
</div> </div>
<button class="btn-post" @click="gotoPoint" v-bp="{ component_tag: '361#360009'}">登录点赞 助力好友</button> <button class="btn-post" @click="gotoPoint" v-bp="{ component_tag: '361#360009'}">登录点赞 助力好友</button>
<loading v-if="loadingFlag" class="load-container"></loading>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import loading from '../../components/bussiness/common-loading';
import { getCaptchaGet, getAuthCode, pointResult, getPublicKey } from '@/service'; import { getCaptchaGet, getAuthCode, pointResult, getPublicKey } from '@/service';
import { CryptoJS } from '../../utils/aes'; import { CryptoJS } from '../../utils/aes';
const TIMEALL = 60000; // 倒计时常量 60 秒 const TIMEALL = 60000; // 倒计时常量 60 秒
export default { export default {
components: {
loading
},
data() { data() {
return { return {
loadingFlag: false,
notSend: true, notSend: true,
regMobile: /^1[3456789]\d{9}$/, regMobile: /^1[3456789]\d{9}$/,
mobilePhone: '', mobilePhone: '',
...@@ -101,7 +107,7 @@ export default { ...@@ -101,7 +107,7 @@ export default {
return; return;
} }
// 校验图形验证码 // 校验图形验证码
if(this.captchaAnswer==''){ if(this.captchaAnswer == ''){
this.$toast('请输入图形验证码'); this.$toast('请输入图形验证码');
return; return;
} }
...@@ -157,20 +163,26 @@ export default { ...@@ -157,20 +163,26 @@ export default {
}, },
// 点赞登录 // 点赞登录
gotoPoint() { gotoPoint() {
this.loadingFlag = true;
let param = { let param = {
mobile: this.mobilePhone, mobile: this.mobilePhone,
authCode: this.authCode, authCode: this.authCode,
id: this.userId, id: this.userId,
taskId: this.taskId, taskId: this.taskId,
activityId: this.activityId activityId: this.activityId
} };
pointResult(param).then(res => { pointResult(param).then(res => {
this.loadingFlag = false;
if(res.code == '000000') { if(res.code == '000000') {
if(res.data == '900001') { if(res.data == '900001') {
this.$toast('不能给自己点赞哦'); this.$toast('不能给自己点赞哦');
}else { }else {
this.$router.push({path: "/login-point/point-result",query: {code: res.data}}); this.$router.push({path: "/login-point/point-result",query: {code: res.data}});
} }
}else if(res.code == '300000') {
this.$toast(res.message);
this.captchaAnswer = '';
this.getCaptcha();
}else { }else {
this.$toast(res.message); this.$toast(res.message);
} }
...@@ -181,9 +193,13 @@ export default { ...@@ -181,9 +193,13 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.point-container { .point-container {
position: fixed;
top: 0;
left: 0;
background-image: url('../../static/images/background.png');
width: 100%; width: 100%;
height: 100vh; height: auto;
background-image:url('../../static/images/background.png'); min-height: 100%;
background-size: 100% 100%; background-size: 100% 100%;
.info-text { .info-text {
padding: 30px 0; padding: 30px 0;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册