Kaynağa Gözat

pref: update user info auth modal

wangyuan 2 yıl önce
ebeveyn
işleme
1d2ad420a8
3 değiştirilmiş dosya ile 63 ekleme ve 26 silme
  1. 7 8
      pages/my/my.js
  2. 14 11
      pages/my/my.wxml
  3. 42 7
      pages/my/my.wxss

+ 7 - 8
pages/my/my.js

@@ -68,12 +68,6 @@ Page({
         url: '/pages/openArea/openArea?form=my',
         imgUrl: '../../imaes/quyu@2x.png'
       }, */
-      {
-        id: 6,
-        title: '去充值',
-        url: '/pages/buy/buy?form=my',
-        imgUrl: '../../imaes/quyu@2x.png'
-      },
       {
         id: 7,
         title: '设置',
@@ -151,7 +145,7 @@ Page({
       that.handleConfirmNickname()
     }).catch(e => {
       wx.showToast({
-        title: '获取授权失败',
+        title: '授权失败',
         icon: 'error'
       })
     })
@@ -280,7 +274,7 @@ Page({
       that.bindMobileFn(phoneCode)
     } else {
       wx.showToast({
-        title: '手机号授权失败',
+        title: '授权失败',
         icon: 'error'
       })
     }
@@ -382,6 +376,11 @@ Page({
     this.authNavTo(url)
   },
 
+  // 去充值
+  handleCharge () {
+    this.authNavTo('/pages/buy/buy?from=my')
+  },
+
   // 立即预约
   handleAppoint () {
     this.getDocumentList()

+ 14 - 11
pages/my/my.wxml

@@ -15,7 +15,10 @@
           <text class="boldtext">{{count}}</text>
           <text class="noraltext">次</text>
         </view>
-        <view class="appoin-btn ittflex" bindtap="handleAppoint">立即预约</view>
+        <view class="action-btn ittflex-jcs">
+          <view class="appoin-btn ittflex" style="margin-right:10rpx;" bindtap="handleCharge">去充值</view>
+          <view class="appoin-btn ittflex" bindtap="handleAppoint">立即预约</view>
+        </view>
       </view>
     </view>
   </view>
@@ -29,17 +32,17 @@
   </view>
   <van-overlay show="{{ overshow }}">
     <view class="wrapper ittflex">
-      <view class="userinfo-auth-modal ittflex">
-        <button size="mini" class="confirm auth-btn" bindtap="getUserinfo">授权头像和昵称</button>
+      <view class="userinfo-auth-modal">
+        <view class="modal-title">申请权限</view>
+        <view class="px-border"></view>
+        <view class="app-logo">
+          <image class="logopng" src="../../imaes/logo1@2x.png"></image>
+        </view>
+        <view class="auth-text">
+          小程序申请授权你的公开信息(昵称,头像)
+        </view>
+        <button class="confirm auth-btn" bindtap="getUserinfo">点击授权</button>
       </view>
-      <!-- <view class="action-modal">
-        <view class="nick-title">选择头像和昵称</view>
-        <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
-          <image class="avatar" src="{{avatarUrl}}"></image>
-        </button> 
-        <input type="nickname" model:value="{{nickname}}" class="weui-input nickname-input" placeholder="请输入昵称"/>
-        <button size="mini" class="confirm itt-btn" bindtap="handleConfirmNickname">确定</button>
-      </view> -->
     </view>
   </van-overlay>
 </view>

+ 42 - 7
pages/my/my.wxss

@@ -34,6 +34,9 @@
 }
 .check-count {
   margin-bottom: 10rpx;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
 }
 .noraltext {
   font-size: 26rpx;
@@ -85,7 +88,7 @@
 }
 .wrapper {
   height: 100%;
-  align-items: flex-start;
+  align-items: center;
 }
 .action-modal {
   width: 540rpx;
@@ -95,17 +98,49 @@
   margin-top: 300rpx;
 }
 .userinfo-auth-modal {
-  width: 500rpx;
-  height: 200rpx;
-  padding: 10rpx;
+  width: 498rpx;
+  height: 496rpx;
   background: #FFFFFF;
-  border-radius: 24rpx;
-  margin-top: 300rpx;
+  border-radius: 5px;
+}
+.modal-title {
+  height: 82rpx;
+  text-align: center;
+  line-height: 82rpx;
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #333333;
+}
+.px-border {
+  height: 1rpx;
+  transform: scaleY(0.5);
+  transform-origin: 50% 100%;
+  background-color: #dddddd;
+}
+.app-logo {
+  height: 80rpx;
+  text-align: center;
+  margin: 30rpx 0;
+}
+.auth-text {
+  width: 418rpx;
+  margin: 0 auto;
+  font-size: 26rpx;
+  font-weight: 400;
+  color: #333333;
+}
+.logopng {
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 50%;
 }
 .auth-btn {
-  margin: 0;
+  width: 418rpx;
+  border-radius: 10rpx;
+  margin-top: 80rpx;
   background-color: var(--maincolor);
   color: #fff;
+  font-size: 26rpx;
 }
 .nick-title{
   width: 100%;