From a2b6203372280be42530c6eaee2bffb6cf3c74d3 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期一, 23 十二月 2024 15:25:41 +0800
Subject: [PATCH] 111

---
 packageDomain/pages/sampleBookList/applicationForm/index.js |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/packageDomain/pages/sampleBookList/applicationForm/index.js b/packageDomain/pages/sampleBookList/applicationForm/index.js
index 8a7d525..d298ac9 100644
--- a/packageDomain/pages/sampleBookList/applicationForm/index.js
+++ b/packageDomain/pages/sampleBookList/applicationForm/index.js
@@ -5,18 +5,18 @@
 Page({
   data: {
     userInfo: null,
-    active: 0,
+    active: '0',
     description: "", //鐢宠瑙勫垯
     teacherInfo: {
       workInfo: null,
       schoolName: "",
       courseName: "",
-      detailedAddress: ""
+      address: ""
     },
     contactInfo: {
-      fullName: "",
+      user: "",
       phone: "",
-      detailedAddress: ""
+      address: ""
     },
     phoneError: false,
     paperBookList: [], //鏍蜂功鍗曠焊璐ㄤ功
@@ -48,9 +48,9 @@
         that.setData({
           'teacherInfo.schoolName': JSON.parse(that.data.userInfo.data).schoolName,
           'teacherInfo.courseName': JSON.parse(that.data.userInfo.data).courseName,
-          'contactInfo.fullName': JSON.parse(that.data.userInfo.data).fullName,
+          'contactInfo.user': JSON.parse(that.data.userInfo.data).fullName,
           'contactInfo.phone': JSON.parse(that.data.userInfo.data).phone,
-          'contactInfo.detailedAddress': JSON.parse(that.data.userInfo.data).detailedAddress,
+          'contactInfo.address': JSON.parse(that.data.userInfo.data).detailedAddress,
         })
       } else {
         wx.showModal({
@@ -154,6 +154,7 @@
           'teacherInfo.workInfo': res[0].cmsTypeLinks[0].children,
         })
       }
+
     })
   },
   //鑾峰彇褰撳墠宸茬敵璇锋鏁帮紙鐢靛瓙锛�
@@ -187,7 +188,7 @@
   //濮撳悕
   onFullNameInput(e) {
     this.setData({
-      "contactInfo.fullName": e.detail.value,
+      "contactInfo.user": e.detail.value,
     });
   },
   //杈撳叆鎵嬫満鍙�
@@ -209,13 +210,11 @@
       });
     }
   },
-  onAddressInput() {
+  onAddressInput(e) {
     this.setData({
-      "contactInfo.detailedAddress": e.detail.value,
+      "contactInfo.address": e.detail.value,
     });
   },
-
-
   submit() {
     let that = this;
     if (that.data.bookList.length > 0) {
@@ -253,7 +252,7 @@
           refType: 'applyBook'
         }
       } else {
-        if (!(that.data.contactInfo.fullName && that.data.contactInfo.phone && that.data.contactInfo.detailedAddress)) {
+        if (!(that.data.contactInfo.user && that.data.contactInfo.phone && that.data.contactInfo.address)) {
           wx.showToast({
             title: "璇峰皢鏀惰揣浜轰俊鎭~鍐欏畬鏁达紒",
             icon: 'none',
@@ -263,7 +262,7 @@
         }
         const mailAddress = JSON.stringify(that.data.contactInfo)
         that.setData({
-          'teacherInfo.detailedAddress': mailAddress
+          'teacherInfo.address': mailAddress
         })
 
         data = {
@@ -411,14 +410,14 @@
   // 鐩戝惉椤甸潰杞敭鐩樺脊璧锋墜鍔ㄦ帹鍔ㄩ〉闈�
   scrollToInput(keyboardHeight, scrollTop) {
     this.setData({
-      keyboardHeight,
+      keyboardHeight: keyboardHeight ? keyboardHeight + 300 : 0,
     });
     if (scrollTop) {
       try {
         this.getScrollOffset().then((lastScrollTop) => {
           wx.pageScrollTo({
             // 濡傛灉宸茬粡瀛樺湪婊氬姩锛屽湪姝ゅ熀纭�涓婄户缁粴
-            scrollTop: lastScrollTop ? lastScrollTop + scrollTop : scrollTop,
+            scrollTop: lastScrollTop ? lastScrollTop + scrollTop + 100 : scrollTop + 200,
             duration: 300,
           });
         });

--
Gitblit v1.9.1