共力分加成

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 = { const config = {
apiUrl : 'https://api.gongli.vip/api/', // 正式环境 // apiUrl : 'https://api.gongli.vip/api/', // 正式环境
// apiUrl : 'http://api.gl.shangkelian.cn/api/', // 测试 apiUrl : 'http://api.gl.shangkelian.cn/api/', // 测试
timeout : 60000 timeout : 60000
} }

View File

@@ -108,3 +108,4 @@ export {
integral, integral,
paymentpre 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" : "共力生态", "name" : "共力生态",
"appid" : "__UNI__DE7B0E6", "appid" : "__UNI__DE7B0E6",
"description" : "共力生态", "description" : "共力生态",
"versionName" : "1.0.34", "versionName" : "1.0.35",
"versionCode" : 100, "versionCode" : 100,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
"compatible" : {
"ignoreVersion" : true
},
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3, "compilerVersion" : 3,

View File

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

View File

@@ -8,6 +8,7 @@
</view> </view>
<!-- 共力人生 --> <!-- 共力人生 -->
<view class="life-cover"> <view class="life-cover">
<!-- 签到 -->
<view class="life-sign"> <view class="life-sign">
<view class="life-sign-icon number-float" @click="onSign"> <view class="life-sign-icon number-float" @click="onSign">
<view class="life-sign-icon-text">{{isSign ? 'GLF': '签到'}}</view> <view class="life-sign-icon-text">{{isSign ? 'GLF': '签到'}}</view>
@@ -31,6 +32,13 @@
</view> </view>
</view> </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> <image class="life-cover-back" :src="require('@/static/life/back.png')"></image>
<view class="life-role"> <view class="life-role">
<image class="life-role-src" :src="figurePath" mode="widthFix" /> <image class="life-role-src" :src="figurePath" mode="widthFix" />
@@ -111,6 +119,9 @@
life, life,
sign sign
} from '@/apis/interfaces/life.js' } from '@/apis/interfaces/life.js'
import {
readingUrl
} from '@/apis/interfaces/reading.js'
import AD from '@/utils/ad.js' import AD from '@/utils/ad.js'
var account; var account;
export default { export default {
@@ -139,6 +150,7 @@
timeData: {}, timeData: {},
isSign: false, isSign: false,
isAccount: false, isAccount: false,
isOver : false,
}; };
}, },
onShow() { onShow() {
@@ -171,6 +183,7 @@
this.message = res.message this.message = res.message
this.order = res.order this.order = res.order
this.isSign = res.is_sign this.isSign = res.is_sign
this.isOver = res.is_over
if (res.is_sign) { if (res.is_sign) {
this.outTime() this.outTime()
} }
@@ -241,6 +254,25 @@
} }
}) })
}, },
// 微信阅读
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() { showAd() {
AD.show({ AD.show({
@@ -248,6 +280,14 @@
adType: 'RewardedVideo' adType: 'RewardedVideo'
}, detail => { }, detail => {
if (detail && detail.isEnded) { if (detail && detail.isEnded) {
this.Sign()
}
}, err => {
this.Sign()
})
},
// 签到
Sign(){
uni.showLoading({ uni.showLoading({
title: '签到中..' title: '签到中..'
}) })
@@ -263,13 +303,6 @@
icon: 'none' icon: 'none'
}) })
}) })
}
}, err => {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
})
}, },
// 我的订单 // 我的订单
onNav(name, type) { onNav(name, type) {
@@ -610,7 +643,33 @@
width: 100%; width: 100%;
padding-top: 134%; padding-top: 134%;
overflow: hidden; 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 { .life-sign {
position: absolute; position: absolute;
top: 15vh; top: 15vh;

View File

@@ -20,7 +20,7 @@
</view> </view>
<view class="rank_update_time" v-if="lists.length > 0"> <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"> <u-count-down :time="end_timestamp" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
<view class="time"> <view class="time">
<view class="time__item"> <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