共力分加成
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 共力人生 -->
|
||||
<view class="life-cover">
|
||||
<view class="life-cover">
|
||||
<!-- 签到 -->
|
||||
<view class="life-sign">
|
||||
<view class="life-sign-icon number-float" @click="onSign">
|
||||
<view class="life-sign-icon-text">{{isSign ? 'GLF': '签到'}}</view>
|
||||
@@ -30,6 +31,13 @@
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 微信阅读 -->
|
||||
<view class="reading" v-if="!isOver">
|
||||
<view class="reading-icon number-float" @click="onReading">
|
||||
<image class="reading-icon-image" :src="require('@/static/icon/reading_btn.png')" alt="签到"></image>
|
||||
</view>
|
||||
<view class="reading-title">共力分加成</view>
|
||||
</view>
|
||||
<image class="life-cover-back" :src="require('@/static/life/back.png')"></image>
|
||||
<view class="life-role">
|
||||
@@ -110,7 +118,10 @@
|
||||
import {
|
||||
life,
|
||||
sign
|
||||
} from '@/apis/interfaces/life.js'
|
||||
} from '@/apis/interfaces/life.js'
|
||||
import {
|
||||
readingUrl
|
||||
} from '@/apis/interfaces/reading.js'
|
||||
import AD from '@/utils/ad.js'
|
||||
var account;
|
||||
export default {
|
||||
@@ -138,7 +149,8 @@
|
||||
base_seconds: 0,
|
||||
timeData: {},
|
||||
isSign: false,
|
||||
isAccount: false,
|
||||
isAccount: false,
|
||||
isOver : false,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -170,7 +182,8 @@
|
||||
this.children = res.children
|
||||
this.message = res.message
|
||||
this.order = res.order
|
||||
this.isSign = res.is_sign
|
||||
this.isSign = res.is_sign
|
||||
this.isOver = res.is_over
|
||||
if (res.is_sign) {
|
||||
this.outTime()
|
||||
}
|
||||
@@ -240,6 +253,25 @@
|
||||
break;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 微信阅读
|
||||
onReading(){
|
||||
uni.showLoading({
|
||||
title: ''
|
||||
})
|
||||
readingUrl().then(res => {
|
||||
if(res.is_over){
|
||||
plus.runtime.openURL(res.ticket)
|
||||
}
|
||||
|
||||
console.log(res)
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 激励广告
|
||||
showAd() {
|
||||
@@ -248,28 +280,29 @@
|
||||
adType: 'RewardedVideo'
|
||||
}, detail => {
|
||||
if (detail && detail.isEnded) {
|
||||
uni.showLoading({
|
||||
title: '签到中..'
|
||||
})
|
||||
sign().then(res => {
|
||||
uni.showToast({
|
||||
title: '签到成功',
|
||||
icon: 'none'
|
||||
})
|
||||
this.getLife()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
this.Sign()
|
||||
}
|
||||
}, err => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
}, err => {
|
||||
this.Sign()
|
||||
})
|
||||
},
|
||||
// 签到
|
||||
Sign(){
|
||||
uni.showLoading({
|
||||
title: '签到中..'
|
||||
})
|
||||
sign().then(res => {
|
||||
uni.showToast({
|
||||
title: '签到成功',
|
||||
icon: 'none'
|
||||
})
|
||||
this.getLife()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 我的订单
|
||||
onNav(name, type) {
|
||||
@@ -610,7 +643,33 @@
|
||||
width: 100%;
|
||||
padding-top: 134%;
|
||||
overflow: hidden;
|
||||
|
||||
// 加成
|
||||
.reading{
|
||||
position: absolute;
|
||||
top: 35vh;
|
||||
left: $margin * 3;
|
||||
z-index: 999;
|
||||
text-align: center;
|
||||
.reading-icon{
|
||||
display: inline-block;
|
||||
width: 78rpx;
|
||||
height: 78rpx;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
.reading-icon-image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 78rpx;
|
||||
height: 78rpx;
|
||||
}
|
||||
}
|
||||
.reading-title{
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
// 签到
|
||||
.life-sign {
|
||||
position: absolute;
|
||||
top: 15vh;
|
||||
|
||||
Reference in New Issue
Block a user