提交 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 {
},
// 首次进入活动页面
firstEnterActivity(data) {
checkFirstEnter({
activityId: this.activityId
}).then(res => {
if(res.data == 1) { //0未知,1第一次 2非第一次
this.beanNum = data.firstEnterScore;
this.showFirstEnter = true;
}
})
if(getCookie('token')) {
checkFirstEnter({
activityId: this.activityId
}).then(res => {
if(res.data == 1) { //0未知,1第一次 2非第一次
this.beanNum = data.firstEnterScore;
this.showFirstEnter = true;
}
})
}
},
getUserInfo() {
this.$rocNative
......
......@@ -22,16 +22,22 @@
<van-count-down v-if="!notSend" :time="time" @finish="finishCount" :format="'ss' + 's'" />
</div>
<button class="btn-post" @click="gotoPoint" v-bp="{ component_tag: '361#360009'}">登录点赞 助力好友</button>
<loading v-if="loadingFlag" class="load-container"></loading>
</div>
</div>
</template>
<script>
import loading from '../../components/bussiness/common-loading';
import { getCaptchaGet, getAuthCode, pointResult, getPublicKey } from '@/service';
import { CryptoJS } from '../../utils/aes';
const TIMEALL = 60000; // 倒计时常量 60 秒
export default {
components: {
loading
},
data() {
return {
loadingFlag: false,
notSend: true,
regMobile: /^1[3456789]\d{9}$/,
mobilePhone: '',
......@@ -101,7 +107,7 @@ export default {
return;
}
// 校验图形验证码
if(this.captchaAnswer==''){
if(this.captchaAnswer == ''){
this.$toast('请输入图形验证码');
return;
}
......@@ -157,20 +163,26 @@ export default {
},
// 点赞登录
gotoPoint() {
this.loadingFlag = true;
let param = {
mobile: this.mobilePhone,
authCode: this.authCode,
id: this.userId,
taskId: this.taskId,
activityId: this.activityId
}
};
pointResult(param).then(res => {
this.loadingFlag = false;
if(res.code == '000000') {
if(res.data == '900001') {
this.$toast('不能给自己点赞哦');
}else {
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 {
this.$toast(res.message);
}
......@@ -181,9 +193,13 @@ export default {
</script>
<style lang="less" scoped>
.point-container {
position: fixed;
top: 0;
left: 0;
background-image: url('../../static/images/background.png');
width: 100%;
height: 100vh;
background-image:url('../../static/images/background.png');
height: auto;
min-height: 100%;
background-size: 100% 100%;
.info-text {
padding: 30px 0;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册