Commit 4d078883 by wangzhihui

一轮bug修复

1 parent edbefe64
...@@ -67,3 +67,4 @@ ...@@ -67,3 +67,4 @@
</Dialog> </Dialog>
<!-- <dialog show="{{showModal}}" confirmText="{{success?'去兑换':'我知道了'}}" cancelText="我知道了" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> --> <!-- <dialog show="{{showModal}}" confirmText="{{success?'去兑换':'我知道了'}}" cancelText="我知道了" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> -->
<!-- </dialog> --> <!-- </dialog> -->
<glsx-privacy appletName="积分商城"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
font-weight: 600; font-weight: 600;
font-size: 40rpx; font-size: 40rpx;
color: #333333; color: #333333;
text-align: center;
} }
.text { .text {
...@@ -175,6 +176,7 @@ ...@@ -175,6 +176,7 @@
color: #888888; color: #888888;
line-height: 36rpx; line-height: 36rpx;
white-space: nowrap; white-space: nowrap;
text-align: center;
} }
} }
......
...@@ -134,12 +134,14 @@ ...@@ -134,12 +134,14 @@
color: #333333; color: #333333;
font-size: 34rpx; font-size: 34rpx;
font-weight: 600; font-weight: 600;
text-align: center;
} }
.text{ .text{
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #888888; color: #888888;
margin-top:6rpx; margin-top:6rpx;
text-align: center;
} }
} }
} }
......
...@@ -91,3 +91,11 @@ ...@@ -91,3 +91,11 @@
height: 0; height: 0;
color: transparent; color: transparent;
} }
.list_data_widget {
// 隐藏滚动条但保持滚动功能
&::-webkit-scrollbar {
display: none; // Webkit浏览器
}
scrollbar-width: none; // Firefox
-ms-overflow-style: none; // IE/Edge
}
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
收益明细 收益明细
</view> </view>
<block wx:if="{{list.length}}"> <block wx:if="{{list.length}}">
<scroll-view class="list_data_widget" scroll-y="{{true}}" bindrefresherrefresh="bindrefresherrefresh" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" refresher-triggered="{{triggered}}"> <scroll-view class="list_data_widget" scroll-y="{{true}}"enhanced="{{true}}" show-scrollbar="{{false}}" bindrefresherrefresh="bindrefresherrefresh" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" refresher-triggered="{{triggered}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<view class="element" bind:tap="handleDetail" data-id="{{item.id}}" data-infoName="{{item.infoName}}" data-channelSource="{{item.channelSource}}"> <view class="element" bind:tap="handleDetail" data-id="{{item.id}}" data-infoName="{{item.infoName}}" data-channelSource="{{item.channelSource}}">
<view class="title">{{item.infoName}} <view class="title">{{item.infoName}}
......
...@@ -8,6 +8,7 @@ Page({ ...@@ -8,6 +8,7 @@ Page({
navStyle: "background-color: transparent;", navStyle: "background-color: transparent;",
showBank: false, showBank: false,
agree: false, agree: false,
btnDisabled: true,
isConfig: true, isConfig: true,
showAuthDialog: false, showAuthDialog: false,
showConfirmDialog: false, showConfirmDialog: false,
...@@ -200,6 +201,8 @@ Page({ ...@@ -200,6 +201,8 @@ Page({
} = this.data; } = this.data;
this.setData({ this.setData({
sumbitScore: score sumbitScore: score
},()=>{
this.checkBtn(score)
}) })
}, },
handleInput(e) { handleInput(e) {
...@@ -213,6 +216,13 @@ Page({ ...@@ -213,6 +216,13 @@ Page({
sumbitScore = this.priceVerify(value, score) sumbitScore = this.priceVerify(value, score)
this.setData({ this.setData({
sumbitScore: sumbitScore || '' sumbitScore: sumbitScore || ''
}, () => {
this.checkBtn(sumbitScore)
})
},
checkBtn(score) {
this.setData({
btnDisabled: Number(score) ? false : true
}) })
}, },
// 价格输入校验规则(提现积分值:最小值需大于0) // 价格输入校验规则(提现积分值:最小值需大于0)
...@@ -314,14 +324,16 @@ Page({ ...@@ -314,14 +324,16 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
if (this.refresh) {
this.getBankList()
}
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
this.refresh = true;
}, },
/** /**
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
} }
.submit { .button {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;
...@@ -163,7 +163,19 @@ ...@@ -163,7 +163,19 @@
position: fixed; position: fixed;
bottom: 266rpx; bottom: 266rpx;
left:48rpx; left:48rpx;
&[disabled]:not([type]) {
background: #CCCED1 !important;
border-color: #CCCED1 !important;
color: #fff !important;
box-shadow: none;
&::after {
border-color: #CCCED1 !important;
}
}
} }
} }
} }
...@@ -188,3 +200,4 @@ ...@@ -188,3 +200,4 @@
font-size: 28rpx; font-size: 28rpx;
color: #1B233D; color: #1B233D;
} }
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
<!-- 协议 --> <!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" url="{{disclaimerAgreementUrl}}" /> <auth-setting bind:choose="authChoose" agree="{{ agree }}" url="{{disclaimerAgreementUrl}}" />
</view> </view>
<view class="submit" bind:tap="toSumbitData">提交</view> <!-- <view class="submit" bind:tap="toSumbitData">提交</view> -->
<button class="button text-center" disabled="{{btnDisabled}}" hover-class="btn-hover" loading="{{submitLoading}}" bind:tap="toSumbitData">提交</button>
</view> </view>
</view> </view>
......
...@@ -12,7 +12,6 @@ Page({ ...@@ -12,7 +12,6 @@ Page({
const { const {
reason reason
} = e.currentTarget.dataset } = e.currentTarget.dataset
// wx.$api.showToast(reason);
wx.showModal({ wx.showModal({
title: '', title: '',
content: String(reason), content: String(reason),
......
...@@ -152,3 +152,8 @@ page { ...@@ -152,3 +152,8 @@ page {
text-align: center; text-align: center;
} }
} }
.error-icon{
width: 24rpx;
height: 56rpx;
margin-left:4rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
</block> </block>
<view class="countText flex"> <view class="countText flex">
-{{i.withdrawalScore}} -{{i.withdrawalScore}}
<!-- <block wx:if="{{item.status == 4&&item.failReason}}"> <block wx:if="{{i.status == 4&&i.failReason}}">
<view class="type flex"> <view class="type flex">
<view class="failReason">{{item.failReason}} </view> <view class="failReason">{{i.failReason}} </view>
<glsx-image mode="widthFix" class="error-icon" bind:tap="toastError" data-reason="{{item.failReason}}" src="store-assistant/error-icon.png" /> <glsx-image mode="widthFix" class="error-icon" bind:tap="toastError" data-reason="{{i.failReason}}" src="/bankAccount/error-icon.png" />
</view> </view>
</block> --> </block>
<block> <block wx:else>
<view class="type"> <view class="type">
银行卡兑换 银行卡提现积分
</view> </view>
</block> </block>
......
...@@ -30,6 +30,27 @@ Page({ ...@@ -30,6 +30,27 @@ Page({
this.getGoodsList() this.getGoodsList()
}) })
}, },
simpleWanConvert(num) {
if (num === null || num === undefined || isNaN(num)) {
return '';
}
// 处理大于等于10000的数字
if (Math.abs(num) >= 10000) {
const wan = (num / 10000).toFixed(1);
// 去掉末尾的.0
return parseFloat(wan) == parseInt(wan) ? parseInt(wan) + '万' : wan + '万';
}
// 处理小于10000但大于等于1000的数字
else if (Math.abs(num) >= 1000) {
const qian = (num / 10000).toFixed(1);
return qian + '万';
}
// 小于1000的数字直接返回
else {
return num.toString();
}
},
// 获取商品数据 // 获取商品数据
getGoodsList() { getGoodsList() {
...@@ -110,7 +131,10 @@ Page({ ...@@ -110,7 +131,10 @@ Page({
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
taxRateObj: res.data taxRateObj:{
...res.data,
baseIncome:this.simpleWanConvert(res.data.baseIncome)
}
}) })
} }
}).catch(err => { }).catch(err => {
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
background-size: 100%; background-size: 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall/integral/rule-bg.png'); background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall/integral/rule-bg.png');
position:relative;
.salary { .salary {
padding: 114rpx 32rpx 144rpx; padding: 114rpx 32rpx 144rpx;
...@@ -112,8 +112,17 @@ ...@@ -112,8 +112,17 @@
.income { .income {
color: #FFFFFF; color: #FFFFFF;
} }
}
}
.hypothesis {
font-weight: 400;
font-size: 24rpx;
color: #F55800;
position:absolute;
right:32rpx;
top:2rpx;
}
.accumulative { .accumulative {
margin-bottom: 48rpx; margin-bottom: 48rpx;
...@@ -204,9 +213,10 @@ ...@@ -204,9 +213,10 @@
font-size: 32rpx; font-size: 32rpx;
color: #FB8A32; color: #FB8A32;
text-align: center; text-align: center;
line-height:80rpx; line-height: 80rpx;
} }
.withdraw{
.withdraw {
background: #FB8A32; background: #FB8A32;
color: #FFFFFF; color: #FFFFFF;
} }
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
<view class="salary flex_scb"> <view class="salary flex_scb">
<view class="proportion">{{taxRateObj.taxRateWithoutSalary}}%</view> <view class="proportion">{{taxRateObj.taxRateWithoutSalary}}%</view>
<view class="proportion income">{{taxRateObj.taxRateWithSalary}}%</view> <view class="proportion income">{{taxRateObj.taxRateWithSalary}}%</view>
</view> </view>
<view class="hypothesis">假设月工资{{taxRateObj.baseIncome}}</view>
<view class="accumulative flex_sc"> <view class="accumulative flex_sc">
<view class="earning have-no"> <view class="earning have-no">
<view class="money">{{taxRateObj.totalIncomeWithoutSalary}}元</view> <view class="money">{{taxRateObj.totalIncomeWithoutSalary}}元</view>
...@@ -27,7 +29,7 @@ ...@@ -27,7 +29,7 @@
</view> </view>
<view class=" earning have"> <view class=" earning have">
<view class="money">{{taxRateObj.totalIncomeWithSalary}}元</view> <view class="money">{{taxRateObj.totalIncomeWithSalary}}元</view>
<view class="text">{{taxRateObj.withdrawalScore}}*{{taxRateObj.month}}个月+累计提现+本次提现</view> <view class="text">{{taxRateObj.baseIncome}}*{{taxRateObj.month}}个月+累计提现+本次提现</view>
</view> </view>
</view> </view>
<view class="tips">以上仅为本平台评估展示,本次提现金额不会扣除,您的真实税务建议您去<text>个人所得税APP</text>查询</view> <view class="tips">以上仅为本平台评估展示,本次提现金额不会扣除,您的真实税务建议您去<text>个人所得税APP</text>查询</view>
......
...@@ -25,15 +25,19 @@ Page({ ...@@ -25,15 +25,19 @@ Page({
this.login(); this.login();
}, },
loginOut() { loginOut() {
console.log(1111)
wx.p.storage.rm('sessionId') wx.p.storage.rm('sessionId')
wx.p.isLogin = false wx.p.isLogin = false
wx.p.storage.rm('userInfo') wx.p.storage.rm('userInfo')
wx.p.router.reLaunch('/pages/Login/Login') wx.p.router.reLaunch('/pages/Login/Login')
}, },
async login(options = {}) { async login(options = {}) {
console.log(777)
if (!wx.p.storage.get('sessionId')) return this.loginOut() if (!wx.p.storage.get('sessionId')) return this.loginOut()
try { try {
console.log('try')
const { code, data, message } = await commonApi.getLoginInfo(); const { code, data, message } = await commonApi.getLoginInfo();
console.log(code,'code')
if (code == 0) { if (code == 0) {
let userInfo = wx.p.storage.get('userInfo') let userInfo = wx.p.storage.get('userInfo')
if (userInfo && Object.keys(userInfo)?.length) { if (userInfo && Object.keys(userInfo)?.length) {
...@@ -51,6 +55,7 @@ Page({ ...@@ -51,6 +55,7 @@ Page({
return this.jumpPage(options.url); return this.jumpPage(options.url);
} }
} catch (error) { } catch (error) {
console.log(90900)
wx.p.isLogin = false; //请求失败默认未登录 wx.p.isLogin = false; //请求失败默认未登录
console.log(error); console.log(error);
wx.p.wxApi.showToast(String(error)); wx.p.wxApi.showToast(String(error));
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
export const authPages = [ export const authPages = [
'/packageMine/', '/packageMine/',
'/pages/mine/', '/pages/mine/',
'/packageIndex/' '/packageIndex/',
// '/packageIndex/pages/integral/index/index' //积分 '/packageIndex/pages/integral/index/index' //积分
]; ];
// 不需要拦截的页面路径配置 // 不需要拦截的页面路径配置
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!