共力分加成

This commit is contained in:
唐明明
2022-07-05 17:32:50 +08:00
16 changed files with 3740 additions and 3555 deletions

View File

@@ -10,8 +10,8 @@ import router from '../router'
// 基础配置
const config = {
apiUrl : 'https://api.gongli.vip/api/', // 正式环境
// apiUrl : 'http://api.gl.shangkelian.cn/api/', // 测试
// apiUrl : 'https://api.gongli.vip/api/', // 正式环境
apiUrl : 'http://api.gl.shangkelian.cn/api/', // 测试
timeout : 60000
}

View File

@@ -108,3 +108,4 @@ export {
integral,
paymentpre
}

View File

@@ -0,0 +1,20 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 微信阅读
*/
import { request } from '../index'
// url
const readingUrl = () =>{
return request({
url: "user/reading/get_url"
})
}
export {
readingUrl
}

View File

@@ -2,11 +2,14 @@
"name" : "共力生态",
"appid" : "__UNI__DE7B0E6",
"description" : "共力生态",
"versionName" : "1.0.34",
"versionName" : "1.0.35",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"compatible" : {
"ignoreVersion" : true
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,

View File

@@ -47,7 +47,7 @@
<view class="title">共建产率<text>{{build.capacity}}GLF/h</text></view>
<view class="subtitle">{{build.current}}/{{build.max}}</view>
</view>
<view class="capacity-block-text ">产品当前设置共建者每日可以通过看广告获得共建值</view>
<view class="capacity-block-text ">产品当前设置共建者每日可以通过看广告获得共建值暂未开放敬请期待</view>
</view>
<view class="capacity-block">
<view class="capacity-block-title">

View File

@@ -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;

View File

@@ -20,7 +20,7 @@
</view>
<view class="rank_update_time" v-if="lists.length > 0">
<view class="title"> 加成{{type === '1'?' 结束':'生效'}}倒计时 : </view>
<view class="title"> 加成{{type === '1'?'结束':'生效'}}倒计时 : </view>
<u-count-down :time="end_timestamp" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
<view class="time">
<view class="time__item">

BIN
static/icon/reading_btn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long