浏览代码

修改授权样式

zhashaonan 6 年之前
父节点
当前提交
3b2e8d2c06
共有 5 个文件被更改,包括 45 次插入16 次删除
  1. 二进制
      image/empty.png
  2. 8 3
      pages/components/auth/auth.wxml
  3. 7 5
      pages/components/auth/auth.wxss
  4. 10 7
      pages/login/login.wxml
  5. 20 1
      pages/login/login.wxss

二进制
image/empty.png


+ 8 - 3
pages/components/auth/auth.wxml

@@ -1,5 +1,10 @@
 <!--pages/components/auth/auth.wxml-->
 <view class="auth_container">
-  <image class="auth_bg" src="../../../image/empty.png"></image>
-  <button style='margin-top:80rpx;width:60%;height: 92rpx;background: #2b2b2b;color: #fff;' open-type="getUserInfo" bindgetuserinfo="userInfoHandler">立即授权</button>
-</view>
+  <view class="auth_text">
+    <view>您暂未获取微信授权,将无法正常使用小程序</view>
+    <view>的功能。如需要正常使用,请点击“授权登录”</view>
+    <view>按钮,打开头像、昵称等信息的授权。</view>
+  </view>
+  <button style='margin-top:160rpx;width:82%;height: 92rpx;background: #2b2b2b;color: #fff;' open-type="getUserInfo"
+    bindgetuserinfo="userInfoHandler">授权登录</button>
+</view>

+ 7 - 5
pages/components/auth/auth.wxss

@@ -6,13 +6,15 @@
   top: 0;
   bottom: 0;
   z-index: 9999;
-  padding-top: 40rpx;
+  padding-top: 100rpx;
   box-sizing: border-box;
   background: #fff;
 }
-.auth_bg {
-  display: block;
-  width: 523rpx;
-  height: 300rpx;
+.auth_text {
+  width: 82%;
   margin: auto;
+  font-size: 28rpx;
+  color: #333;
+  line-height: 42rpx;
+  text-align: center;
 }

+ 10 - 7
pages/login/login.wxml

@@ -1,7 +1,10 @@
-<view class='flex_center' style='margin-top:200rpx;'>
-  <image style='width:150rpx;height: 150rpx;' src="../../image/mine_logo_icon.png"></image>
-</view>
-<view style='font-size:30rpx;'>
-  <view class='flex_center' style='margin-top:20rpx;'>需要你的授权才可以使用哦!</view>
-</view>
-<button  style='margin-top:80rpx;width:60%;height: 92rpx;' type="primary" open-type="getUserInfo" bindgetuserinfo="userInfoHandler">立即授权</button>
+
+<view class="auth_container">
+    <view class="auth_text">
+      <view>您暂未获取微信授权,将无法正常使用小程序</view>
+      <view>的功能。如需要正常使用,请点击“授权登录”</view>
+      <view>按钮,打开头像、昵称等信息的授权。</view>
+    </view>
+    <button style='margin-top:160rpx;width:82%;height: 92rpx;background: #2b2b2b;color: #fff;' open-type="getUserInfo"
+      bindgetuserinfo="userInfoHandler">授权登录</button>
+  </view>

+ 20 - 1
pages/login/login.wxss

@@ -1 +1,20 @@
-/* pages/login/login.wxss */
+/* pages/login/login.wxss */
+.auth_container {
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  z-index: 9999;
+  padding-top: 100rpx;
+  box-sizing: border-box;
+  background: #fff;
+}
+.auth_text {
+  width: 82%;
+  margin: auto;
+  font-size: 28rpx;
+  color: #333;
+  line-height: 42rpx;
+  text-align: center;
+}