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

@@ -11,7 +11,8 @@
</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>
<view class="capacity-block-glf">{{group.capacity}}GLF/h</view> <view class="capacity-block-glf">{{group.capacity}}GLF/h</view>
<!-- <view class="more" @click="onInvitation">邀请更多好友</view> --> <!-- <view class="more" @click="onInvitation">邀请更多好友</view> -->
</view> </view>
@@ -68,75 +69,67 @@
</template> </template>
<script> <script>
import { glz } from '@/apis/interfaces/life.js' import {
glz,sign
} from '@/apis/interfaces/life.js'
import AD from '@/utils/ad.js'
export default { export default {
data() { data() {
return { return {
identityText: '普通用户', identityText: '普通用户',
baseHour : 0, baseHour: 0,
base : 0, base: 0,
group : { group: {
count : 0, count: 0,
effect : 0, effect: 0,
capacity: 0, capacity: 0,
}, },
nickname : '', nickname: '',
recommend : { recommend: {
vip : '-', vip: '-',
vip_count : '-', vip_count: '-',
novip : '-', novip: '-',
novip_count : '-', novip_count: '-',
vip_text : '-', vip_text: '-',
novip_text : '-', novip_text: '-',
}, },
partner : { partner: {
vip : '-', vip: '-',
vip_count : '-', vip_count: '-',
novip : '-', novip: '-',
novip_count : '-', novip_count: '-',
vip_text : '-', vip_text: '-',
novip_text : '-', novip_text: '-',
}, },
build:{}, build: {},
together:{}, together: {},
other:{} other: {},
can_repeat_sign: false
}; };
}, },
created() { created() {
uni.showLoading({}) uni.showLoading({})
glz().then(res => { this.glz();
this.nickname = res.nickname
this.identityText = res.identity_text
this.baseHour = res.base_hour
this.base = res.base
this.group = res.group
this.recommend = res.recommend
this.partner = res.partner
this.build = res.build
this.together = res.together
this.other = res.other
uni.setNavigationBarTitle({
title: res.glz + 'GLF'
})
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
if (!this.can_repeat_sign) {
uni.showModal({ uni.showModal({
title:'温馨提示', title: '温馨提示',
content:'重置签到只重新计算24小时时间所迭代加成的比例不变', content: '今日重置签到机会已使用过了,明日再来试试吧~',
confirmColor:'#34CE98', confirmColor: '#34CE98',
confirmText:'立即重置', confirmText: '知道了',
cancelColor:'#999', showCancel: false,
cancelText:'再想想', })
success: (res) => { } else {
if(res.confirm){ uni.showModal({
console.log('再次签到。。。') title: '温馨提示',
content: '重置签到只重新计算24小时时间所迭代加成的比例不变',
confirmColor: '#34CE98',
confirmText: '立即重置',
cancelColor: '#999',
cancelText: '再想想',
success: (res1) => {
if (res1.confirm) {
this.checkIMEI().then(res => { this.checkIMEI().then(res => {
switch (res) { switch (res) {
case 'Permanent': case 'Permanent':
@@ -155,7 +148,8 @@
success: e => { success: e => {
if (e.cancel) { if (e.cancel) {
this.checkIMEI().then(IMEI => { this.checkIMEI().then(IMEI => {
if (IMEI === 'Success') { if (IMEI ===
'Success') {
this.showAd() this.showAd()
} }
}) })
@@ -167,14 +161,73 @@
this.showAd() this.showAd()
break; break;
} }
}).catch(err => {
console.log(err)
}) })
} }
} }
}) })
}
}, },
methods: { methods: {
onInvitation(){ glz(){
this.$Router.push({name: 'Invitation'}) glz().then(res => {
this.nickname = res.nickname
this.identityText = res.identity_text
this.baseHour = res.base_hour
this.base = res.base
this.group = res.group
this.recommend = res.recommend
this.partner = res.partner
this.build = res.build
this.together = res.together
this.other = res.other
this.can_repeat_sign = res.can_repeat_sign
uni.setNavigationBarTitle({
title: res.glz + 'GLF'
})
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
showAd() {
AD.show({
adpid: 1428308887,
adType: 'RewardedVideo'
}, detail => {
if (detail && detail.isEnded) {
this.Sign()
}
}, err => {
this.Sign()
})
},
// 签到
Sign(){
uni.showLoading({
title: '签到中..'
})
sign().then(res => {
uni.showToast({
title: '签到成功',
icon: 'none'
})
this.glz()
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
onInvitation() {
this.$Router.push({
name: 'Invitation'
})
}, },
// imei权限 // imei权限
checkIMEI() { checkIMEI() {
@@ -207,54 +260,63 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.capacity{ .capacity {
background: $window-color; background: $window-color;
min-height: 100vh; min-height: 100vh;
padding: $padding; padding: $padding;
box-sizing: border-box; box-sizing: border-box;
&-hint{
&-hint {
font-size: 26rpx; font-size: 26rpx;
color: gray; color: gray;
line-height: 40rpx; line-height: 40rpx;
padding: $padding 0; padding: $padding 0;
} }
&-title{
&-title {
font-size: 38rpx; font-size: 38rpx;
font-weight: bold; font-weight: bold;
line-height: 60rpx; line-height: 60rpx;
text{
text {
margin-left: 10rpx; margin-left: 10rpx;
color: $main-color; color: $main-color;
} }
} }
&-sbutitle{
&-sbutitle {
font-size: 26rpx; font-size: 26rpx;
line-height: 40rpx; line-height: 40rpx;
} }
&-block{
&-block {
background: white; background: white;
margin-top: $margin; margin-top: $margin;
border-radius: $radius; border-radius: $radius;
padding: $padding; padding: $padding;
&-glf{
&-glf {
color: $main-color; color: $main-color;
font-size: 30rpx; font-size: 30rpx;
// padding-top: 30rpx; // padding-top: 30rpx;
} }
&-title{
&-title {
font-weight: bold; font-weight: bold;
font-size: 34rpx; font-size: 34rpx;
line-height: 60rpx; line-height: 60rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.title{
text{ .title {
text {
color: $main-color; color: $main-color;
font-weight: normal; font-weight: normal;
padding-left: 10rpx; padding-left: 10rpx;
} }
} }
.more{
.more {
background: $main-color; background: $main-color;
color: white; color: white;
font-weight: bold; font-weight: bold;
@@ -264,47 +326,56 @@
width: 230rpx; width: 230rpx;
text-align: center; text-align: center;
} }
.subtitle{
.subtitle {
font-weight: normal; font-weight: normal;
font-size: 24rpx; font-size: 24rpx;
color: $main-color; color: $main-color;
} }
.nickname{
.nickname {
color: gray; color: gray;
font-size: 30rpx; font-size: 30rpx;
} }
} }
&-text{
&-text {
font-size: 28rpx; font-size: 28rpx;
color: gray; color: gray;
line-height: 40rpx; line-height: 40rpx;
padding-top: 30rpx; padding-top: 30rpx;
} }
&-table{
border:solid 1px $border-color; &-table {
border: solid 1px $border-color;
margin-bottom: 20rpx; margin-bottom: 20rpx;
padding-top: 30rpx; padding-top: 30rpx;
&:last-child{
&:last-child {
margin-top: 0; margin-top: 0;
} }
.header{
.header {
background: $border-color; background: $border-color;
line-height: 50rpx; line-height: 50rpx;
padding: 0 15rpx; padding: 0 15rpx;
font-size: 26rpx; font-size: 26rpx;
color: gray; color: gray;
} }
.flex{
.flex {
display: flex; display: flex;
border-top: solid 1rpx $border-color; border-top: solid 1rpx $border-color;
color: gray; color: gray;
.flex-item{
.flex-item {
width: 50%; width: 50%;
box-sizing: border-box; box-sizing: border-box;
line-height: 50rpx; line-height: 50rpx;
padding: 0 15rpx; padding: 0 15rpx;
font-size: 24rpx; font-size: 24rpx;
&:first-child{
&:first-child {
border-right: solid 1rpx $border-color; border-right: solid 1rpx $border-color;
} }
} }
@@ -312,7 +383,8 @@
} }
} }
.pt30{
.pt30 {
padding-top: 30rpx; padding-top: 30rpx;
} }
} }

View File

@@ -260,11 +260,13 @@
title: '' title: ''
}) })
readingUrl().then(res => { readingUrl().then(res => {
if(res.is_over){ if(!res.is_over){
try{
plus.runtime.openURL(res.ticket) 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;
// line-height: 40rpx;
.title{
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; @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,6 +203,12 @@
color: $text-gray; color: $text-gray;
} }
} }
.unit{
padding: 30rpx;
font-size: $title-size-m;
color: #333;
border-top:solid 20rpx #f9f9f9;
}
.imgs{ .imgs{
image{ image{
vertical-align: top; vertical-align: top;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long