This commit is contained in:
唐明明
2022-07-07 17:19:03 +08:00
9 changed files with 690 additions and 556 deletions

View File

@@ -14,7 +14,7 @@
title : "更新提示", title : "更新提示",
content : res.note || '版本更新信息', content : res.note || '版本更新信息',
confirmText : "更新", confirmText : "更新",
showCancel : false, showCancel : true,
success : modalRes => { success : modalRes => {
if (modalRes.confirm) { if (modalRes.confirm) {
if (plus.os.name == "Android") { if (plus.os.name == "Android") {

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

@@ -3,7 +3,9 @@
<!-- 设置支付密码 --> <!-- 设置支付密码 -->
<view class="password"> <view class="password">
<view class="prompt"> <view class="prompt">
<view class="prompt-code">验证码已发送至{{phone}} <button size="mini" :disabled="getCodeState" @click="getCode">{{sendCode}}</button></view> <view class="prompt-code">验证码已发送至{{phone}}
<!-- <button size="mini" :disabled="getCodeState" @click="getCode">{{sendCode}}</button> -->
</view>
<view>请设置6位数字密码建议不要使用连续的数字</view> <view>请设置6位数字密码建议不要使用连续的数字</view>
</view> </view>
<view class="group"> <view class="group">
@@ -40,7 +42,7 @@
return { return {
sendCode : '获取验证码', sendCode : '获取验证码',
canGet : true, canGet : true,
getCodeState: false, getCodeState: true,
phone : '', phone : '',
code : '', code : '',
password : '', password : '',
@@ -58,7 +60,7 @@
// 获取验证码 // 获取验证码
getCode(){ getCode(){
let smsTime = 3; let smsTime = 60;
getSms().then(res => { getSms().then(res => {
this.canGet = false this.canGet = false
uni.showToast({ uni.showToast({
@@ -225,6 +227,7 @@
width: 100%; width: 100%;
.time{ .time{
padding:20rpx 30rpx 20rpx 20rpx; padding:20rpx 30rpx 20rpx 20rpx;
font-size: 30rpx;
} }
} }
</style> </style>

View File

@@ -1,319 +1,391 @@
<template> <template>
<view class="capacity"> <view class="capacity">
<view class="capacity-title">共力分总产率/小时<text>{{baseHour}}GLF/h</text></view> <view class="capacity-title">共力分总产率/小时<text>{{baseHour}}GLF/h</text></view>
<view class="capacity-sbutitle">总产率=角色产率+团队产率+共建产率+共力值产率</view> <view class="capacity-sbutitle">总产率=角色产率+团队产率+共建产率+共力值产率</view>
<view class="capacity-block"> <view class="capacity-block">
<view class="capacity-block-title"> <view class="capacity-block-title">
<view class="title">我的角色</view> <view class="title">我的角色</view>
<view class="nickname">{{nickname}}</view> <view class="nickname">{{nickname}}</view>
</view> </view>
<view class="capacity-block-glf ">{{identityText}}:{{base}}GLF/h</view> <view class="capacity-block-glf ">{{identityText}}:{{base}}GLF/h</view>
</view> </view>
<view class="capacity-block"> <view class="capacity-block">
<view class="capacity-block-title"> <view class="capacity-block-title">
<view class="title">成员产率({{group.effect}}/{{group.count}})<text</text></view> <view class="title">成员产率({{group.effect}}/{{group.count}})<text< /text>
<view class="capacity-block-glf">{{group.capacity}}GLF/h</view> </view>
<!-- <view class="more" @click="onInvitation">邀请更多好友</view> --> <view class="capacity-block-glf">{{group.capacity}}GLF/h</view>
</view> <!-- <view class="more" @click="onInvitation">邀请更多好友</view> -->
<view class="capacity-block-table pt30"> </view>
<view class="header"> <view class="capacity-block-table pt30">
<view class="flex-item">家族成员产率</view> <view class="header">
</view> <view class="flex-item">家族成员产率</view>
<view class="flex"> </view>
<view class="flex-item">{{recommend.vip}}人在线(会员)</view> <view class="flex">
<view class="flex-item">{{recommend.vip_text}}</view> <view class="flex-item">{{recommend.vip}}人在线(会员)</view>
</view> <view class="flex-item">{{recommend.vip_text}}</view>
<view class="flex"> </view>
<view class="flex-item">{{recommend.novip}}人在线(普通用户)</view> <view class="flex">
<view class="flex-item">{{recommend.novip_text}}</view> <view class="flex-item">{{recommend.novip}}人在线(普通用户)</view>
</view> <view class="flex-item">{{recommend.novip_text}}</view>
</view> </view>
<view class="capacity-block-table"> </view>
<view class="header"> <view class="capacity-block-table">
<view class="flex-item">伙伴成员</view> <view class="header">
</view> <view class="flex-item">伙伴成员</view>
<view class="flex"> </view>
<view class="flex-item">{{partner.vip}}人在线(会员)</view> <view class="flex">
<view class="flex-item">{{partner.vip_text}}</view> <view class="flex-item">{{partner.vip}}人在线(会员)</view>
</view> <view class="flex-item">{{partner.vip_text}}</view>
<view class="flex"> </view>
<view class="flex-item">{{partner.novip}}人在线(普通用户)</view> <view class="flex">
<view class="flex-item">{{partner.novip_text}}</view> <view class="flex-item">{{partner.novip}}人在线(普通用户)</view>
</view> <view class="flex-item">{{partner.novip_text}}</view>
</view> </view>
</view> </view>
<view class="capacity-block"> </view>
<view class="capacity-block-title"> <view class="capacity-block">
<view class="title">共建产率<text>{{build.capacity}}GLF/h</text></view> <view class="capacity-block-title">
<view class="subtitle">{{build.current}}/{{build.max}}</view> <view class="title">共建产率<text>{{build.capacity}}GLF/h</text></view>
</view> <view class="subtitle">{{build.current}}/{{build.max}}</view>
<view class="capacity-block-text ">产品当前设置共建者每日可以通过看广告获得共建值暂未开放敬请期待</view> </view>
</view> <view class="capacity-block-text ">产品当前设置共建者每日可以通过看广告获得共建值暂未开放敬请期待</view>
<view class="capacity-block"> </view>
<view class="capacity-block-title"> <view class="capacity-block">
<view class="title">共力值产率<text>{{together.capacity}}GLF/h</text></view> <view class="capacity-block-title">
<view class="subtitle">{{together.current}}/{{together.max}}</view> <view class="title">共力值产率<text>{{together.capacity}}GLF/h</text></view>
</view> <view class="subtitle">{{together.current}}/{{together.max}}</view>
<view class="capacity-block-text ">根据正常用户的使用在平台的使用习惯购物等行为产生对应共力值暂未开放敬请期待</view> </view>
</view> <view class="capacity-block-text ">根据正常用户的使用在平台的使用习惯购物等行为产生对应共力值暂未开放敬请期待</view>
<view class="capacity-block" v-for="(item,index) in other" :keys='index'> </view>
<view class="capacity-block-title"> <view class="capacity-block" v-for="(item,index) in other" :keys='index'>
<view class="title">{{item.title}}</view> <view class="capacity-block-title">
<view class="capacity-block-glf">{{item.capacity}}GLF/h</view> <view class="title">{{item.title}}</view>
</view> <view class="capacity-block-glf">{{item.capacity}}GLF/h</view>
<view class="capacity-block-text " v-if="item.remark">{{item.remark}}</view> </view>
</view> <view class="capacity-block-text " v-if="item.remark">{{item.remark}}</view>
<view class="capacity-hint"> 用户须知用户所产生共力分在每日结算时平台会扣除30%的共力分用于平台运营使用 </view> </view>
</view> <view class="capacity-hint"> 用户须知用户所产生共力分在每日结算时平台会扣除30%的共力分用于平台运营使用 </view>
</template> </view>
</template>
<script>
import { glz } from '@/apis/interfaces/life.js' <script>
export default { import {
data() { glz,sign
return { } from '@/apis/interfaces/life.js'
identityText: '普通用户', import AD from '@/utils/ad.js'
baseHour : 0, export default {
base : 0, data() {
group : { return {
count : 0, identityText: '普通用户',
effect : 0, baseHour: 0,
capacity: 0, base: 0,
}, group: {
nickname : '', count: 0,
recommend : { effect: 0,
vip : '-', capacity: 0,
vip_count : '-', },
novip : '-', nickname: '',
novip_count : '-', recommend: {
vip_text : '-', vip: '-',
novip_text : '-', vip_count: '-',
}, novip: '-',
partner : { novip_count: '-',
vip : '-', vip_text: '-',
vip_count : '-', novip_text: '-',
novip : '-', },
novip_count : '-', partner: {
vip_text : '-', vip: '-',
novip_text : '-', vip_count: '-',
}, novip: '-',
build:{}, novip_count: '-',
together:{}, vip_text: '-',
other:{} novip_text: '-',
}; },
}, build: {},
created() { together: {},
uni.showLoading({}) other: {},
glz().then(res => { can_repeat_sign: false
this.nickname = res.nickname };
this.identityText = res.identity_text },
this.baseHour = res.base_hour created() {
this.base = res.base uni.showLoading({})
this.group = res.group this.glz();
this.recommend = res.recommend },
this.partner = res.partner onNavigationBarButtonTap() {
this.build = res.build if (!this.can_repeat_sign) {
this.together = res.together uni.showModal({
this.other = res.other title: '温馨提示',
uni.setNavigationBarTitle({ content: '今日重置签到机会已使用过了,明日再来试试吧~',
title: res.glz + 'GLF' confirmColor: '#34CE98',
}) confirmText: '知道了',
uni.hideLoading() showCancel: false,
}).catch(err => { })
uni.showToast({ } else {
title: err.message, uni.showModal({
icon : 'none' title: '温馨提示',
}) content: '重置签到只重新计算24小时时间所迭代加成的比例不变',
}) confirmColor: '#34CE98',
}, confirmText: '立即重置',
onNavigationBarButtonTap() { cancelColor: '#999',
uni.showModal({ cancelText: '再想想',
title:'温馨提示', success: (res1) => {
content:'重置签到只重新计算24小时时间所迭代加成的比例不变', if (res1.confirm) {
confirmColor:'#34CE98', this.checkIMEI().then(res => {
confirmText:'立即重置', switch (res) {
cancelColor:'#999', case 'Permanent':
cancelText:'再想想', uni.showModal({
success: (res) => { title: '提示',
if(res.confirm){ content: '签到功能需使用您的电话状态和网络信息,请在手机设置中权限开启您的权限',
console.log('再次签到。。。') showCancel: false,
this.checkIMEI().then(res => { })
switch (res) { break;
case 'Permanent': case 'Temporary':
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '签到功能需使用您的电话状态和网络信息,请在手机设置中权限开启您的权限', content: '签到功能需使用您的电话状态和网络信息,请点击设置开启应用权限',
showCancel: false, cancelText: '获取权限',
}) confirmText: '稍后再说',
break; success: e => {
case 'Temporary': if (e.cancel) {
uni.showModal({ this.checkIMEI().then(IMEI => {
title: '提示', if (IMEI ===
content: '签到功能需使用您的电话状态和网络信息,请点击设置开启应用权限', 'Success') {
cancelText: '获取权限', this.showAd()
confirmText: '稍后再说', }
success: e => { })
if (e.cancel) { }
this.checkIMEI().then(IMEI => { }
if (IMEI === 'Success') { })
this.showAd() break;
} case 'Success':
}) this.showAd()
} break;
} }
}) }).catch(err => {
break; console.log(err)
case 'Success': })
this.showAd() }
break; }
} })
}) }
} },
} methods: {
}) glz(){
}, glz().then(res => {
methods: { this.nickname = res.nickname
onInvitation(){ this.identityText = res.identity_text
this.$Router.push({name: 'Invitation'}) this.baseHour = res.base_hour
}, this.base = res.base
// imei权限 this.group = res.group
checkIMEI() { this.recommend = res.recommend
// 检查imei权限 this.partner = res.partner
return new Promise((resolve, reject) => { this.build = res.build
if (plus.os.name == "Android") { this.together = res.together
plus.android.requestPermissions(['android.permission.READ_PHONE_STATE'], (e) => { this.other = res.other
if (e.deniedAlways.length > 0) { this.can_repeat_sign = res.can_repeat_sign
resolve('Permanent'); uni.setNavigationBarTitle({
} title: res.glz + 'GLF'
if (e.deniedPresent.length > 0) { })
resolve('Temporary'); uni.hideLoading()
} }).catch(err => {
if (e.granted.length > 0) { uni.showToast({
resolve('Success'); title: err.message,
} icon: 'none'
}, (e) => { })
uni.showToast({ })
title: JSON.stringify(e), },
icon: 'none' showAd() {
}) AD.show({
}) adpid: 1428308887,
return adType: 'RewardedVideo'
} }, detail => {
reject('非安卓设备'); if (detail && detail.isEnded) {
this.Sign()
}
}, err => {
this.Sign()
})
},
// 签到
Sign(){
uni.showLoading({
title: '签到中..'
}) })
} sign().then(res => {
} uni.showToast({
} title: '签到成功',
</script> icon: 'none'
})
<style lang="scss"> this.glz()
.capacity{ }).catch(err => {
background: $window-color; uni.showToast({
min-height: 100vh; title: err.message,
padding: $padding; icon: 'none'
box-sizing: border-box; })
&-hint{ })
font-size: 26rpx; },
color: gray; onInvitation() {
line-height: 40rpx; this.$Router.push({
padding: $padding 0; name: 'Invitation'
} })
&-title{ },
font-size: 38rpx; // imei权限
font-weight: bold; checkIMEI() {
line-height: 60rpx; // 检查imei权限
text{ return new Promise((resolve, reject) => {
margin-left: 10rpx; if (plus.os.name == "Android") {
color: $main-color; plus.android.requestPermissions(['android.permission.READ_PHONE_STATE'], (e) => {
} if (e.deniedAlways.length > 0) {
} resolve('Permanent');
&-sbutitle{ }
font-size: 26rpx; if (e.deniedPresent.length > 0) {
line-height: 40rpx; resolve('Temporary');
} }
&-block{ if (e.granted.length > 0) {
background: white; resolve('Success');
margin-top: $margin; }
border-radius: $radius; }, (e) => {
padding: $padding; uni.showToast({
&-glf{ title: JSON.stringify(e),
color: $main-color; icon: 'none'
font-size: 30rpx; })
// padding-top: 30rpx; })
} return
&-title{ }
font-weight: bold; reject('非安卓设备');
font-size: 34rpx; })
line-height: 60rpx; }
display: flex; }
justify-content: space-between; }
.title{ </script>
text{
color: $main-color; <style lang="scss">
font-weight: normal; .capacity {
padding-left: 10rpx; background: $window-color;
} min-height: 100vh;
} padding: $padding;
.more{ box-sizing: border-box;
background: $main-color;
color: white; &-hint {
font-weight: bold; font-size: 26rpx;
font-size: 28rpx; color: gray;
border-radius: 25rpx; line-height: 40rpx;
line-height: 60rpx; padding: $padding 0;
width: 230rpx; }
text-align: center;
} &-title {
.subtitle{ font-size: 38rpx;
font-weight: normal; font-weight: bold;
font-size: 24rpx; line-height: 60rpx;
color: $main-color;
} text {
.nickname{ margin-left: 10rpx;
color: gray; color: $main-color;
font-size: 30rpx; }
} }
}
&-text{ &-sbutitle {
font-size: 28rpx; font-size: 26rpx;
color: gray; line-height: 40rpx;
line-height: 40rpx; }
padding-top: 30rpx;
} &-block {
&-table{ background: white;
border:solid 1px $border-color; margin-top: $margin;
margin-bottom: 20rpx; border-radius: $radius;
padding-top: 30rpx; padding: $padding;
&:last-child{
margin-top: 0; &-glf {
} color: $main-color;
.header{ font-size: 30rpx;
background: $border-color; // padding-top: 30rpx;
line-height: 50rpx; }
padding: 0 15rpx;
font-size: 26rpx; &-title {
color: gray; font-weight: bold;
} font-size: 34rpx;
.flex{ line-height: 60rpx;
display: flex; display: flex;
border-top: solid 1rpx $border-color; justify-content: space-between;
color: gray;
.flex-item{ .title {
width: 50%; text {
box-sizing: border-box; color: $main-color;
line-height: 50rpx; font-weight: normal;
padding: 0 15rpx; padding-left: 10rpx;
font-size: 24rpx; }
&:first-child{ }
border-right: solid 1rpx $border-color;
} .more {
} background: $main-color;
} color: white;
font-weight: bold;
} font-size: 28rpx;
} border-radius: 25rpx;
.pt30{ line-height: 60rpx;
padding-top: 30rpx; width: 230rpx;
} text-align: center;
} }
.subtitle {
font-weight: normal;
font-size: 24rpx;
color: $main-color;
}
.nickname {
color: gray;
font-size: 30rpx;
}
}
&-text {
font-size: 28rpx;
color: gray;
line-height: 40rpx;
padding-top: 30rpx;
}
&-table {
border: solid 1px $border-color;
margin-bottom: 20rpx;
padding-top: 30rpx;
&:last-child {
margin-top: 0;
}
.header {
background: $border-color;
line-height: 50rpx;
padding: 0 15rpx;
font-size: 26rpx;
color: gray;
}
.flex {
display: flex;
border-top: solid 1rpx $border-color;
color: gray;
.flex-item {
width: 50%;
box-sizing: border-box;
line-height: 50rpx;
padding: 0 15rpx;
font-size: 24rpx;
&:first-child {
border-right: solid 1rpx $border-color;
}
}
}
}
}
.pt30 {
padding-top: 30rpx;
}
}
</style> </style>

View File

@@ -260,11 +260,13 @@
title: '' title: ''
}) })
readingUrl().then(res => { readingUrl().then(res => {
if(res.is_over){ if(!res.is_over){
plus.runtime.openURL(res.ticket) try{
plus.runtime.openURL(res.ticket)
}catch(e){
console.log(e)
}
} }
console.log(res)
uni.hideLoading() uni.hideLoading()
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({

View File

@@ -19,7 +19,10 @@
<block v-for="(item, index) in goodsInfo" :key="index"> <block v-for="(item, index) in goodsInfo" :key="index">
<view class="goods-item"> <view class="goods-item">
<image class="order-cover" :src="item.items[0].cover" mode="aspectFill"></image> <image class="order-cover" :src="item.items[0].cover" mode="aspectFill"></image>
<view class="order-title">{{item.items[0].title}}</view> <view class="order-title">
<view class="title"> {{item.items[0].title}}</view>
<view class="subtitle" v-if="item.items[0] && item.items[0].value"> {{item.items[0].value}} </view>
</view>
<view class="order-count"> <view class="order-count">
<view class="order-price">{{item.items[0].price}}<text class="type">DT积分</text></view> <view class="order-price">{{item.items[0].price}}<text class="type">DT积分</text></view>
</view> </view>
@@ -214,12 +217,19 @@
height: 128rpx; height: 128rpx;
} }
.order-title{ .order-title{
@extend .ellipsis;
text-align: left;
flex: 1; flex: 1;
padding-left: $margin; padding-left: $margin;
font-size: 28rpx; // line-height: 40rpx;
line-height: 40rpx; .title{
font-size: 28rpx;
@extend .ellipsis;
text-align: left;
}
.subtitle{
font-size: 26rpx;
color: #666;
padding-top: 10rpx;
}
} }
.order-count{ .order-count{
text-align: right; text-align: right;

View File

@@ -23,6 +23,9 @@
</view> </view>
<view class="sales" v-if="goods.skus">库存量{{goods.skus[0].stock}}</view> <view class="sales" v-if="goods.skus">库存量{{goods.skus[0].stock}}</view>
</view> </view>
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== ''">
规格 : {{goods.skus[0].unit}}
</view>
<!-- 店铺信息 --> <!-- 店铺信息 -->
<view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop"> <view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop">
@@ -200,7 +203,13 @@
color: $text-gray; color: $text-gray;
} }
} }
.imgs{ .unit{
padding: 30rpx;
font-size: $title-size-m;
color: #333;
border-top:solid 20rpx #f9f9f9;
}
.imgs{
image{ image{
vertical-align: top; vertical-align: top;
width: 100%; width: 100%;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long