Bläddra i källkod

调整页面样式

bayi 1 år sedan
förälder
incheckning
5f6cf060bf

+ 4 - 5
components/invite/index.js

@@ -1,4 +1,3 @@
-
 Component({
     /**
      * 组件的属性列表
@@ -10,9 +9,9 @@ Component({
         current: 1
     },
     lifetimes: {
-        /*  attached() {
-             this.openInvite()
-         } */
+        attached() {
+            this.openInvite()
+        }
     },
     methods: {
         openInvite() {
@@ -35,7 +34,7 @@ Component({
                 }
             })
         },
-        createPoster(){
+        createPoster() {
             this.closeInvite()
             this.selectComponent('#createPoster').open()
         },

+ 3 - 1
components/invite/index.less

@@ -2,6 +2,7 @@
         width: 100%;
         height: 100%;
         padding: 22rpx 32rpx;
+        padding-bottom: calc(22rpx + env(safe-area-inset-bottom)) !important;
         box-sizing: border-box;
         border-top-left-radius: 20rpx;
         border-top-right-radius: 20rpx;
@@ -36,12 +37,13 @@
             display: flex;
             align-items: center;
             justify-content: space-around;
-            width:100%;
+            width: 100%;
             padding: 0 10rpx;
             box-sizing: border-box;
 
             .box {
                 text-align: center;
+                padding: 0 30rpx;
 
                 .icon {
                     width: 84rpx;

+ 0 - 4
components/invite/index.wxml

@@ -37,10 +37,6 @@
                 <image src="/static/hb.png" class="icon" />
                 <view class="label">生成海报</view>
             </view>
-            <!--  <view class="box">
-                <image src="/static/pyq.png" class="icon" />
-                <view class="label">朋友圈</view>
-            </view> -->
             <view class="box" bindtap="jump">
                 <image src="/static/gzh.png" class="icon" />
                 <view class="label">公众号</view>

+ 2 - 0
components/invite/index.wxss

@@ -2,6 +2,7 @@
   width: 100%;
   height: 100%;
   padding: 22rpx 32rpx;
+  padding-bottom: calc(22rpx + env(safe-area-inset-bottom)) !important;
   box-sizing: border-box;
   border-top-left-radius: 20rpx;
   border-top-right-radius: 20rpx;
@@ -39,6 +40,7 @@
 }
 .popBox .shareType .box {
   text-align: center;
+  padding: 0 30rpx;
 }
 .popBox .shareType .box .icon {
   width: 84rpx;

+ 3 - 3
salesperson/pages/commission/index.wxml

@@ -14,9 +14,9 @@
         </view>
         <view class="tr" wx:for="{{list}}" wx:key="index">
             <view class="td1">{{item.title}}</view>
-            <view class="td2" wx:if="{{index==0}}">≤{{item.endAmount}}</view>
-            <view class="td2" wx:if="{{index==list.length-1}}">>{{item.startAmount}}</view>
-            <view class="td2" wx:if="{{index!=0&&index!=list.length-1}}">>{{item.startAmount}},≤{{item.endAmount}}
+            <view class="td2" wx:if="{{index==0}}">≤{{item.endAmount/100}}</view>
+            <view class="td2" wx:if="{{index==list.length-1}}">>{{item.startAmount/100}}</view>
+            <view class="td2" wx:if="{{index!=0&&index!=list.length-1}}">>{{item.startAmount/100}},≤{{item.endAmount/100}}
             </view>
             <view class="td3">{{item.ratio}}%</view>
         </view>

+ 1 - 0
salesperson/pages/history/index.less

@@ -77,6 +77,7 @@
 
     .btn {
         margin: 0 auto;
+        margin-bottom: env(safe-area-inset-bottom) !important;
         width: 466rpx;
         padding: 14rpx 0;
         background: linear-gradient(180deg, #6EC8FF 0%, #31BDFE 100%);

+ 1 - 0
salesperson/pages/history/index.wxss

@@ -67,6 +67,7 @@
 }
 .bottom .btn {
   margin: 0 auto;
+  margin-bottom: env(safe-area-inset-bottom) !important;
   width: 466rpx;
   padding: 14rpx 0;
   background: linear-gradient(180deg, #6EC8FF 0%, #31BDFE 100%);

+ 0 - 1
salesperson/pages/saleOffice/index.js

@@ -15,7 +15,6 @@ import {
 Page({
     behaviors: [share,event],
     data: {
-        userInfo: {},
         allIncome: {}
     },
     async onLoad() {

+ 2 - 0
salesperson/pages/saleOffice/index.less

@@ -12,6 +12,7 @@
 
         .left {
             display: flex;
+            align-items: center;
 
             .avatar {
                 width: 106rpx;
@@ -161,6 +162,7 @@
             margin: 0 auto;
             width: 466rpx;
             padding: 14rpx 0;
+            margin-bottom: env(safe-area-inset-bottom) !important;
             background: linear-gradient(180deg, #6EC8FF 0%, #31BDFE 100%);
             border-radius: 39rpx;
             color: white;

+ 2 - 2
salesperson/pages/saleOffice/index.wxml

@@ -23,11 +23,11 @@
             </view>
         </view>
         <view class="below">
-            <view class="box">
+            <view class="box" bindtap="jump" data-url="lxDetail">
                 <view class="label">今日收益(元)</view>
                 <view class="money">{{filters.twoDecimal(allIncome.todayIncome)}}</view>
             </view>
-            <view class="box">
+            <view class="box" bindtap="jump" data-url="lxDetail">
                 <view class="label rtext">累计收益(元)</view>
                 <view class="money rtext" style="padding-right:20rpx;">{{filters.twoDecimal(allIncome.income)}}</view>
             </view>

+ 2 - 0
salesperson/pages/saleOffice/index.wxss

@@ -12,6 +12,7 @@
 }
 .container .userBox .left {
   display: flex;
+  align-items: center;
 }
 .container .userBox .left .avatar {
   width: 106rpx;
@@ -136,6 +137,7 @@
   margin: 0 auto;
   width: 466rpx;
   padding: 14rpx 0;
+  margin-bottom: env(safe-area-inset-bottom) !important;
   background: linear-gradient(180deg, #6EC8FF 0%, #31BDFE 100%);
   border-radius: 39rpx;
   color: white;

+ 32 - 32
salesperson/pages/withdrawal/index.js

@@ -22,38 +22,38 @@ Page({
     },
     async withdrawalFun() {
         let money = this.data.money
-        /*      if (isNaN(money)) {
-                 this.setData({
-                     errMsg: '金额不合法'
-                 })
-                 return
-             }
-             // 判断金额是否超过两位小数
-             var decimalCount = (money.split('.')[1] || '').length;
-             if (decimalCount > 2) {
-                 this.setData({
-                     errMsg: '最多两位小数'
-                 })
-                 return
-             }
-             if (money <= 0) {
-                 this.setData({
-                     errMsg: '请输入要提现的金额'
-                 })
-                 return
-             }
-             if (money > this.data.allIncome.withdraw / 100) {
-                 this.setData({
-                     errMsg: '可提现金额不足'
-                 })
-                 return
-             }
-             if (money > 500 || money < 50) {
-                 this.setData({
-                     errMsg: '提现金额需≥50元,单笔最高可提500元'
-                 })
-                 return
-             } */
+        if (isNaN(money)) {
+            this.setData({
+                errMsg: '金额不合法'
+            })
+            return
+        }
+        // 判断金额是否超过两位小数
+        var decimalCount = (money.split('.')[1] || '').length;
+        if (decimalCount > 2) {
+            this.setData({
+                errMsg: '最多两位小数'
+            })
+            return
+        }
+        if (money <= 0) {
+            this.setData({
+                errMsg: '请输入要提现的金额'
+            })
+            return
+        }
+        if (money > this.data.allIncome.withdraw / 100) {
+            this.setData({
+                errMsg: '可提现金额不足'
+            })
+            return
+        }
+        if (money > 500 || money < 50) {
+            this.setData({
+                errMsg: '提现金额需≥50元,单笔最高可提500元'
+            })
+            return
+        }
         let res = await cashOut({
             amount: money * 100
         })