Browse Source

Merge remote-tracking branch 'origin/master'

chendt 3 years ago
parent
commit
57f2ff9cd8
3 changed files with 23 additions and 16 deletions
  1. 4 11
      README.md
  2. 17 3
      mall4m/pages/login/login.js
  3. 2 2
      mall4m/pages/login/login.wxml

+ 4 - 11
README.md

@@ -89,19 +89,15 @@ https://gitee.com/gz-yami/mall4j/wikis
 ![输入图片说明](https://images.gitee.com/uploads/images/2021/1110/145209_2ec1ad04_5094767.png "开源移动端截图.png")
 ![输入图片说明](https://images.gitee.com/uploads/images/2021/1110/145209_2ec1ad04_5094767.png "开源移动端截图.png")
 
 
 
 
-### 3. 软著截图
-![输入图片说明](https://images.gitee.com/uploads/images/2021/0703/110940_a9b72c43_5094767.png "Mall4j商城系统V1.0.png")
-
-
 
 
 ## 提交反馈
 ## 提交反馈
 - Mall4j官网 https://www.mall4j.com
 - Mall4j官网 https://www.mall4j.com
 
 
 
 
-- mall4j开源技术QQ群:722835385
-
-![输入图片说明](https://images.gitee.com/uploads/images/2021/0703/110919_835cf484_5094767.jpeg "mall4j群.jpg")
+- Mall4j官方技术QQ群:722835385(3000人群)
+- 如需购买商业版源码,请联系商务微信
 
 
+  ![输入图片说明](https://19838323.s21i.faiusr.com/4/4/ABUIABAEGAAgksmNlAYojomK2gIwrAI4rAI!160x160.png)
 
 
 ## 特别鸣谢
 ## 特别鸣谢
 
 
@@ -110,7 +106,4 @@ https://gitee.com/gz-yami/mall4j/wikis
 ## mall4cloud微服务版本已上线
 ## mall4cloud微服务版本已上线
 https://gitee.com/gz-yami/mall4cloud
 https://gitee.com/gz-yami/mall4cloud
 
 
-## 你的点赞鼓励,是我们前进的动力~
-## 你的点赞鼓励,是我们前进的动力~
-## 你的点赞鼓励,是我们前进的动力~
-
+## 更多信息请查看官网 <https://www.mall4j.com>

+ 17 - 3
mall4m/pages/login/login.js

@@ -109,6 +109,7 @@ Page({
    * 注册/登录按钮
    * 注册/登录按钮
    */
    */
   handleLoginOrRegister() {
   handleLoginOrRegister() {
+    const that = this
     if (!this.data.userName.trim()) {
     if (!this.data.userName.trim()) {
       wx.showToast({
       wx.showToast({
         title: '请输入用户名',
         title: '请输入用户名',
@@ -132,9 +133,22 @@ Page({
       },
       },
       callBack: (res) => {
       callBack: (res) => {
         wx.setStorageSync('token', res.accessToken)
         wx.setStorageSync('token', res.accessToken)
-        wx.switchTab({
-          url: '/pages/index/index',
-        })
+        if(this.data.isRegister) {
+          that.setData({
+            userName: '',
+            password: '',
+            isRegister: !that.data.isRegister
+          })
+          wx.showToast({
+            title: '注册成功,请登录',
+            icon: 'none'
+          })
+        }else {
+          wx.switchTab({
+            url: '/pages/index/index',
+          })          
+        }
+
       }
       }
     };
     };
     http.request(params);
     http.request(params);

+ 2 - 2
mall4m/pages/login/login.wxml

@@ -5,13 +5,13 @@
     <view class="item">
     <view class="item">
         <view class="account">
         <view class="account">
             <text class="input-item">用户名</text>
             <text class="input-item">用户名</text>
-            <input type="text" data-type="account" placeholder-class="inp-palcehoder" placeholder="请输入用户名" bindinput="getInputVal"></input>
+            <input type="text" data-type="account" placeholder-class="inp-palcehoder" value="{{userName}}" placeholder="请输入用户名" bindinput="getInputVal"></input>
         </view>
         </view>
     </view>
     </view>
     <view class="item">
     <view class="item">
         <view class="account">
         <view class="account">
             <text class="input-item">密码</text>
             <text class="input-item">密码</text>
-            <input type="password" data-type="password" placeholder-class="inp-palcehoder" placeholder="请输入密码" bindinput="getInputVal"></input>
+            <input type="password" data-type="password" placeholder-class="inp-palcehoder" value="{{password}}" placeholder="请输入密码" bindinput="getInputVal"></input>
         </view>
         </view>
     </view>
     </view>
     <view>
     <view>