Browse Source

开发donutlogin页面

bayi 1 year ago
parent
commit
cc135085a6

+ 1 - 1
pages/chat/index.js

@@ -86,7 +86,7 @@ Page({
         })
     },
     async sendReply() {
-        if (!this.data.value) {
+        if (!this.data.value.trim()) {
             return
         }
         await sendMsg({

File diff suppressed because it is too large
+ 58 - 41
pages/donutLogin/index.less


+ 6 - 4
pages/donutLogin/index.wxml

@@ -1,14 +1,16 @@
 <view class="donutLogin">
     <view class="welcomeText">欢迎来到朗读小咖秀<view>请先登录</view>
     </view>
-    <button class="button" type="primary" bindtap="onTapWeixinMiniProgramLogin"
-        disabled="{{!checkedAgree}}">微信小程序登录</button>
-    <checkbox-group bindchange="onCheckboxChange">
+    <button class="button" type="primary" bindtap="onTapWeixinMiniProgramLogin" disabled="{{!checkedAgree}}">
+        <image src="/static/donutWx.png" class="wxIcon" />
+        微信登录
+    </button>
+    <checkbox-group bindchange="onCheckboxChange" class="cgroup">
         <label class="donutLogin__checkbox-container">
             <checkbox class="donutLogin__checkbox" checked="{{checkedAgree}}" />
             <span class="donutLogin__checkbox-label"></span>
             <span class="donutLogin__checkbox-text">
-                阅读并同意
+                我已阅读并同意
                 <span catchtap="onShowAgreement" data-idx="0" style="color: #576b95;">
                     《用户协议》
                 </span>

+ 25 - 8
pages/donutLogin/index.wxss

@@ -3,31 +3,48 @@
   overflow: hidden;
   height: 100vh;
   width: 100vw;
+  background-color: #F0F2F5;
+  background-image: url('https://reader-wx.ai160.com/images/reader/v3/donutLogin.png');
+  background-repeat: no-repeat;
+  background-size: contain;
+  color: #000000;
 }
 .donutLogin .welcomeText {
-  margin-top: 50vh;
-  transform: translateY(-50%);
+  margin-top: 560rpx;
   width: 100%;
   text-align: center;
   font-size: 40rpx;
   line-height: 80rpx;
 }
 .donutLogin .button {
+  margin-top: 100rpx;
   width: 500rpx;
+  height: 100rpx;
   background: #00B240;
   border-radius: 50rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.donutLogin .button .wxIcon {
+  width: 68rpx;
+  height: 68rpx;
+  margin-right: 40rpx;
+}
+.cgroup {
+  margin-top: 230rpx;
 }
-.donutLogin__checkbox-container {
+.cgroup .donutLogin__checkbox-container {
   color: rgba(0, 0, 0, 0.3);
   display: flex;
   justify-content: center;
   font-size: 12px;
   margin-top: 12px;
 }
-.donutLogin__checkbox {
+.cgroup .donutLogin__checkbox {
   display: none;
 }
-.donutLogin__checkbox-label {
+.cgroup .donutLogin__checkbox-label {
   appearance: none;
   display: inline-block;
   border: 0;
@@ -47,12 +64,12 @@
   height: 1em;
   font-size: 17px;
 }
-.donutLogin__checkbox[aria-checked=true] + .donutLogin__checkbox-label,
-.donutLogin__checkbox-label:checked {
+.cgroup .donutLogin__checkbox[aria-checked=true] + .donutLogin__checkbox-label,
+.cgroup .donutLogin__checkbox-label:checked {
   -webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
   mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
   color: #07c160;
 }
-.donutLogin__checkbox-text {
+.cgroup .donutLogin__checkbox-text {
   margin-left: 2px;
 }

BIN
static/donutLogin.png


BIN
static/donutWx.png


+ 3 - 3
utils/request.js

@@ -6,13 +6,13 @@ const {
         envVersion
     }
 } = wx.getAccountInfoSync();
-if (envVersion == 'develop') {
+/* if (envVersion == 'develop') {
     baseUrl = 'https://reader-api.efunbox.cn/wx'
     oldUrl = 'https://reader-api.efunbox.cn'
-} else {
+} else { */
     baseUrl = 'https://reader-api.ai160.com/wx'
     oldUrl = 'https://reader-api.ai160.com'
-}
+// }
 
 function request(url, method, data, oldBaseUrl = false, intercept = true) {
     let header = {