guhongwei před 2 roky
rodič
revize
34ed48ac44

+ 3 - 3
app.json

@@ -1,11 +1,11 @@
 {
   "pages": [
-    "pages/login0/index",
+    "pages/index/index",
     "pages/login/index",
+    "pages/login/agreement",
+    "pages/login0/index",
     "pages/login1/index",
     "pages/login2/index",
-    "pages/login2/agreement",
-    "pages/index/index",
     "pages/home/index",
     "pages/apply/index",
     "pages/apply/detail",

+ 1 - 1
pages/login2/agreement.js

@@ -12,7 +12,7 @@ Page({
         infoHeight: '',
     },
     back: function () {
-        wx.navigateBack({ url: '/pages/login2/index' })
+        wx.navigateBack({ url: '/pages/login/index' })
     },
     /**
      * 生命周期函数--监听页面加载

pages/login2/agreement.json → pages/login/agreement.json


pages/login2/agreement.wxml → pages/login/agreement.wxml


pages/login2/agreement.wxss → pages/login/agreement.wxss


+ 13 - 17
pages/login/index.js

@@ -7,28 +7,32 @@ Page({
    * 页面的初始数据
    */
   data: {
-    frameStyle: { useTop: false, name: '登录', leftArrow: false, useBar: false },
+    frameStyle: { useTop: false, name: '', leftArrow: false, useBar: false },
     // 主体高度
     infoHeight: '',
-    //判断协议是否选中
-    agreement: false,
+    // 使用协议
+    agreement: false
   },
   initValidate() {
     const rules = { phone: { required: true, tel: true }, password: { required: true, } }
     // 验证字段的提示信息,若不传则调用默认的信息
-    const messages = { phone: { required: '请输入号', }, password: { required: '请输入密码', } };
+    const messages = { phone: { required: '请输入手机号', }, password: { required: '请输入密码', } };
     this.WxValidate = new WxValidate(rules, messages)
   },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
   },
-  //使用协议
-  checkboxChange(e) {
+  // 协议选择
+  agreementChange: function (e) {
     const that = this;
     let value = e.detail.value;
     if (value.length > 0) that.setData({ agreement: true })
     else that.setData({ agreement: false })
   },
+  // 协议查看
+  agreementView: function () {
+    wx.navigateTo({ url: '/pages/login/agreement' })
+  },
   // 提交登录
   onSubmit: function (e) {
     const params = e.detail.value;
@@ -59,20 +63,12 @@ Page({
       } else {
         wx.showToast({ title: `请同意使用协议`, icon: 'error', duration: 1000 })
       }
-
     }
   },
-  //微信登录
-  wxlogin: function () {
-    wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
-  },
-  //注册
-  register: function () {
-    wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
-  },
-  //忘记密码
-  noopen: function () {
+  // 微信登录
+  wxLogin: function () {
     wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
+    // wx.navigateTo({ url: '/pages/home/index' })
   },
   /**
    * 生命周期函数--监听页面加载

pages/login2/index.less → pages/login/index.less


+ 40 - 40
pages/login/index.wxml

@@ -1,49 +1,49 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
   <view slot="info" class="main" style="height:{{infoHeight}}px;">
     <view class="one">
-      <view class="one_1">耗材采购平台</view>
-      <form bindsubmit="onSubmit">
-        <view class="content">
-          <view class="left">
-            <text class=" icon iconfont icon-dianhua"></text>
-          </view>
-          <view class="right">
-            <input type='number' name="phone" value="{{form.phone}}" maxlength="11" placeholder='请输入账号' placeholder-class="placeholder"></input>
-          </view>
+      <view class="one_1">
+        <view class="one_1_1">耗材采购平台</view>
+        <view class="one_1_2">
+          <form bindsubmit="onSubmit">
+            <view class="content">
+              <view class="left">
+                <text class=" icon iconfont icon-dianhua"></text>
+              </view>
+              <view class="right">
+                <input type='number' name="phone" value="{{form.phone}}" maxlength="11" placeholder='请输入手机号' placeholder-class="placeholder"></input>
+              </view>
+            </view>
+            <view class="content">
+              <view class="left">
+                <text class="icon iconfont icon-mima"></text>
+              </view>
+              <view class="right">
+                <input type='text' name="password" value="{{form.password}}" password placeholder='请输入密码' placeholder-class="placeholder"></input>
+              </view>
+            </view>
+            <view class="btn">
+              <view class="btn_1">
+                <button size="mini" plain="true" bindtap="wxLogin">立即注册</button>
+                <button size="mini" plain="true" bindtap="wxLogin">忘记密码?</button>
+              </view>
+              <view class="btn_2">
+                <button type="primary" size="mini" form-type="submit">登录</button>
+              </view>
+            </view>
+          </form>
         </view>
-        <view class="content">
-          <view class="left">
-            <text class="icon iconfont icon-mima"></text>
-          </view>
-          <view class="right">
-            <input type='text' name="password" value="{{form.password}}" password placeholder='请输入密码' placeholder-class="placeholder"></input>
-          </view>
-        </view>
-        <view class="one_2">
-          <view class="left">
-            <view bindtap="register">立即注册</view>
-          </view>
-          <view class="right">
-            <view bindtap="noopen">忘记密码?</view>
-          </view>
-        </view>
-        <view class="save">
-          <button type="primary" size="mini" form-type="submit">登录</button>
-        </view>
-        <view class="one_3">
-          <checkbox-group bindchange="checkboxChange">
-            <checkbox class="box" value="true" />
+        <view class="one_1_3">
+          <checkbox-group class="check" bindchange="agreementChange">
+            <checkbox class="isXY" value="true" /><text bindtap="agreementView">同意小程序的《使用协议》</text>
           </checkbox-group>
-          <view class="box_text">同意小程序的《使用协议》</view>
         </view>
-      </form>
-    </view>
-    <view class="two">
-      <view class="line"></view>
-      <view class="lText">—————您还可以使用以下方式登录—————</view>
-    </view>
-    <view class="thr">
-      <button type="primary" size="mini" bindtap="wxlogin">微信登录</button>
+      </view>
+      <view class="one_2">
+        一一一一<text>您还可以使用一下方式登录</text>一一一
+      </view>
+      <view class="one_3">
+        <button type="primary" size="mini" bindtap="wxLogin">微信登录</button>
+      </view>
     </view>
   </view>
 </mobile-main>

+ 89 - 91
pages/login/index.wxss

@@ -3,130 +3,128 @@
   width: 100%;
   background: #356363;
 }
-
 .main .one {
   float: left;
   width: 80%;
-  margin-top: 25%;
-  margin-left: 10%;
-  background: #FFFFFF;
-  border-radius: 50rpx;
+  margin: 25% 10% 0 10%;
 }
-
 .main .one .one_1 {
   float: left;
-  width: 100%;
-  margin-top: 5%;
-  margin-left: 10%;
-  margin-bottom: 5%;
-  font-size: 40rpx;
-  font-family: Helvetica;
-  color: #000000;
-  line-height: 100rpx;
-  letter-spacing: 2rpx;
-}
-
-.main .one .content {
+  width: 93%;
+  height: 350px;
+  overflow: hidden;
+  background-color: #fff;
+  margin: 0 0 20px 0;
+  border-radius: 10px;
+  padding: 10px;
+}
+.main .one .one_1 .one_1_1 {
   float: left;
-  width: 80%;
-  margin-left: 10%;
-  text-align: center;
-  margin-bottom: 15%;
-  border-bottom: 3rpx solid rgb(58, 57, 57);
-}
-.main .one .one_2 {
-  float: left;
-  width: 80%;
-  margin-left: 10%;
-  margin-bottom: 5%;
-  font-size: 25rpx;
+  width: 100%;
+  font-size: 20px;
+  font-weight: 700;
+  margin: 25px 0;
 }
-.main .one .one_2 .left {
+.main .one .one_1 .one_1_2 {
   float: left;
-  width: 40%;
-  margin: 0 30px;
+  width: 100%;
+  margin: 0 0 20px 0;
 }
-
-.main .one .one_2 .right {
+.main .one .one_1 .one_1_2 .content {
   float: left;
-  width: 30%;
+  width: 100%;
+  margin: 0 0 15px 0;
+  padding: 10px 0;
+  border-bottom: 1px solid #000;
 }
-
-.main .one .content .left {
+.main .one .one_1 .one_1_2 .content .left {
   float: left;
   width: 20%;
+  text-align: center;
 }
-
-.main .one .content .right {
-  float: left;
-  width: 60%;
-  text-align: left;
-  margin-bottom: 2.5%;
+.main .one .one_1 .one_1_2 .content .left .icon {
+  font-size: 30px;
 }
-
-.main .one .content .left .icon {
-  color: black;
+.main .one .one_1 .one_1_2 .content .right {
+  float: left;
+  width: 80%;
 }
-
-.main .one .content .right input {
-  color: black;
+.main .one .one_1 .one_1_2 .content .right input {
+  float: left;
+  width: 100%;
+  padding: 4px 0;
+  font-size: 14px;
 }
-
-.main .one .content .right .placeholder {
-  color: black;
+.main .one .one_1 .one_1_2 .btn {
+  float: left;
+  width: 100%;
+  margin: 15px 0 0 0;
 }
-
-.main .one .content .right .picker view {
-  color: #ffffff;
+.main .one .one_1 .one_1_2 .btn .btn_1 {
+  float: left;
+  width: 100%;
+  margin: 0 0 10px 0;
 }
-
-.main .one .save {
-  margin: 15px 10px;
-  text-align: center;
+.main .one .one_1 .one_1_2 .btn .btn_1 button {
+  border: none;
+  font-size: 12px;
 }
-
-.main .one .save button {
-  padding: 0rpx;
-  line-height: 50rpx;
-  font-size: 25rpx;
-  width: 60%;
-  height: 100%;
-  border-radius: 30rpx;
+.main .one .one_1 .one_1_2 .btn .btn_1 button:last-child {
+  float: right;
 }
-.main .one .one_3{
+.main .one .one_1 .one_1_2 .btn .btn_2 {
   float: left;
   width: 100%;
-  margin-bottom: 2.5%;
-}
-.main .one .one_3 .box{
-  float: left;
-  margin-left: 29%;
-  width: 10%;
-  transform:scale(.6);
+  text-align: center;
 }
-.main .one .one_3 .box_text{
-  float: left;
-  width: 40%;
-  color: #000000;
-  margin-top: 2%;
-  font-size:18rpx;
+.main .one .one_1 .one_1_2 .btn .btn_2 button {
+  width: 80%;
+  border-radius: 25px;
 }
-.mian .one .two{
+.main .one .one_1 .one_1_3 {
   float: left;
   width: 100%;
-  text-align: center;
+  font-size: 12px;
+  color: #666;
+}
+.main .one .one_1 .one_1_3 .check {
+  padding: 0 50px;
 }
-.main .two {
+.main .one .one_2 {
   float: left;
   width: 100%;
-  margin-top: 5%;
-  text-align: center;
   color: #ffffff;
-  font-size: 25rpx;
+  margin: 0 0 50px 0;
 }
-.main .thr {
+.main .one .one_2 text {
+  padding: 0 10px;
+  font-size: 14px;
+}
+.main .one .one_3 {
   float: left;
   width: 100%;
   text-align: center;
-  margin-top: 5%;
-}
+}
+/* 未选中 */
+checkbox .wx-checkbox-input {
+  width: 30rpx;
+  height: 30rpx;
+}
+/* 选中 */
+/* checkbox .wx-checkbox-input.wx-checkbox-input-checked{
+    border: none;
+    background: red;
+ } */
+/* 选中 */
+/* checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
+    border-radius: 50%;
+    width: 40rpx;
+    height: 40rpx;
+    line-height: 40rpx;
+    text-align: center;
+    font-size:30rpx; 
+    color:#fff; 
+    background: transparent;
+    transform:translate(-50%, -50%) scale(1);
+    -webkit-transform:translate(-50%, -50%) scale(1);
+ } */

+ 17 - 13
pages/login2/index.js

@@ -7,32 +7,28 @@ Page({
    * 页面的初始数据
    */
   data: {
-    frameStyle: { useTop: false, name: '', leftArrow: false, useBar: false },
+    frameStyle: { useTop: false, name: '登录', leftArrow: false, useBar: false },
     // 主体高度
     infoHeight: '',
-    // 使用协议
-    agreement: false
+    //判断协议是否选中
+    agreement: false,
   },
   initValidate() {
     const rules = { phone: { required: true, tel: true }, password: { required: true, } }
     // 验证字段的提示信息,若不传则调用默认的信息
-    const messages = { phone: { required: '请输入手机号', }, password: { required: '请输入密码', } };
+    const messages = { phone: { required: '请输入号', }, password: { required: '请输入密码', } };
     this.WxValidate = new WxValidate(rules, messages)
   },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
   },
-  // 协议选择
-  agreementChange: function (e) {
+  //使用协议
+  checkboxChange(e) {
     const that = this;
     let value = e.detail.value;
     if (value.length > 0) that.setData({ agreement: true })
     else that.setData({ agreement: false })
   },
-  // 协议查看
-  agreementView: function () {
-    wx.navigateTo({ url: '/pages/login2/agreement' })
-  },
   // 提交登录
   onSubmit: function (e) {
     const params = e.detail.value;
@@ -63,12 +59,20 @@ Page({
       } else {
         wx.showToast({ title: `请同意使用协议`, icon: 'error', duration: 1000 })
       }
+
     }
   },
-  // 微信登录
-  wxLogin: function () {
+  //微信登录
+  wxlogin: function () {
+    wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
+  },
+  //注册
+  register: function () {
+    wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
+  },
+  //忘记密码
+  noopen: function () {
     wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
-    // wx.navigateTo({ url: '/pages/home/index' })
   },
   /**
    * 生命周期函数--监听页面加载

+ 40 - 40
pages/login2/index.wxml

@@ -1,49 +1,49 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
   <view slot="info" class="main" style="height:{{infoHeight}}px;">
     <view class="one">
-      <view class="one_1">
-        <view class="one_1_1">耗材采购平台</view>
-        <view class="one_1_2">
-          <form bindsubmit="onSubmit">
-            <view class="content">
-              <view class="left">
-                <text class=" icon iconfont icon-dianhua"></text>
-              </view>
-              <view class="right">
-                <input type='number' name="phone" value="{{form.phone}}" maxlength="11" placeholder='请输入手机号' placeholder-class="placeholder"></input>
-              </view>
-            </view>
-            <view class="content">
-              <view class="left">
-                <text class="icon iconfont icon-mima"></text>
-              </view>
-              <view class="right">
-                <input type='text' name="password" value="{{form.password}}" password placeholder='请输入密码' placeholder-class="placeholder"></input>
-              </view>
-            </view>
-            <view class="btn">
-              <view class="btn_1">
-                <button size="mini" plain="true" bindtap="wxLogin">立即注册</button>
-                <button size="mini" plain="true" bindtap="wxLogin">忘记密码?</button>
-              </view>
-              <view class="btn_2">
-                <button type="primary" size="mini" form-type="submit">登录</button>
-              </view>
-            </view>
-          </form>
+      <view class="one_1">耗材采购平台</view>
+      <form bindsubmit="onSubmit">
+        <view class="content">
+          <view class="left">
+            <text class=" icon iconfont icon-dianhua"></text>
+          </view>
+          <view class="right">
+            <input type='number' name="phone" value="{{form.phone}}" maxlength="11" placeholder='请输入账号' placeholder-class="placeholder"></input>
+          </view>
         </view>
-        <view class="one_1_3">
-          <checkbox-group class="check" bindchange="agreementChange">
-            <checkbox class="isXY" value="true" /><text bindtap="agreementView">同意小程序的《使用协议》</text>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mima"></text>
+          </view>
+          <view class="right">
+            <input type='text' name="password" value="{{form.password}}" password placeholder='请输入密码' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="one_2">
+          <view class="left">
+            <view bindtap="register">立即注册</view>
+          </view>
+          <view class="right">
+            <view bindtap="noopen">忘记密码?</view>
+          </view>
+        </view>
+        <view class="save">
+          <button type="primary" size="mini" form-type="submit">登录</button>
+        </view>
+        <view class="one_3">
+          <checkbox-group bindchange="checkboxChange">
+            <checkbox class="box" value="true" />
           </checkbox-group>
+          <view class="box_text">同意小程序的《使用协议》</view>
         </view>
-      </view>
-      <view class="one_2">
-        一一一一<text>您还可以使用一下方式登录</text>一一一
-      </view>
-      <view class="one_3">
-        <button type="primary" size="mini" bindtap="wxLogin">微信登录</button>
-      </view>
+      </form>
+    </view>
+    <view class="two">
+      <view class="line"></view>
+      <view class="lText">—————您还可以使用以下方式登录—————</view>
+    </view>
+    <view class="thr">
+      <button type="primary" size="mini" bindtap="wxlogin">微信登录</button>
     </view>
   </view>
 </mobile-main>

+ 91 - 89
pages/login2/index.wxss

@@ -3,128 +3,130 @@
   width: 100%;
   background: #356363;
 }
+
 .main .one {
   float: left;
   width: 80%;
-  margin: 25% 10% 0 10%;
+  margin-top: 25%;
+  margin-left: 10%;
+  background: #FFFFFF;
+  border-radius: 50rpx;
 }
+
 .main .one .one_1 {
-  float: left;
-  width: 93%;
-  height: 350px;
-  overflow: hidden;
-  background-color: #fff;
-  margin: 0 0 20px 0;
-  border-radius: 10px;
-  padding: 10px;
-}
-.main .one .one_1 .one_1_1 {
   float: left;
   width: 100%;
-  font-size: 20px;
-  font-weight: 700;
-  margin: 25px 0;
-}
-.main .one .one_1 .one_1_2 {
+  margin-top: 5%;
+  margin-left: 10%;
+  margin-bottom: 5%;
+  font-size: 40rpx;
+  font-family: Helvetica;
+  color: #000000;
+  line-height: 100rpx;
+  letter-spacing: 2rpx;
+}
+
+.main .one .content {
   float: left;
-  width: 100%;
-  margin: 0 0 20px 0;
+  width: 80%;
+  margin-left: 10%;
+  text-align: center;
+  margin-bottom: 15%;
+  border-bottom: 3rpx solid rgb(58, 57, 57);
 }
-.main .one .one_1 .one_1_2 .content {
+.main .one .one_2 {
   float: left;
-  width: 100%;
-  margin: 0 0 15px 0;
-  padding: 10px 0;
-  border-bottom: 1px solid #000;
+  width: 80%;
+  margin-left: 10%;
+  margin-bottom: 5%;
+  font-size: 25rpx;
 }
-.main .one .one_1 .one_1_2 .content .left {
+.main .one .one_2 .left {
   float: left;
-  width: 20%;
-  text-align: center;
-}
-.main .one .one_1 .one_1_2 .content .left .icon {
-  font-size: 30px;
+  width: 40%;
+  margin: 0 30px;
 }
-.main .one .one_1 .one_1_2 .content .right {
+
+.main .one .one_2 .right {
   float: left;
-  width: 80%;
+  width: 30%;
 }
-.main .one .one_1 .one_1_2 .content .right input {
+
+.main .one .content .left {
   float: left;
-  width: 100%;
-  padding: 4px 0;
-  font-size: 14px;
+  width: 20%;
 }
-.main .one .one_1 .one_1_2 .btn {
+
+.main .one .content .right {
   float: left;
-  width: 100%;
-  margin: 15px 0 0 0;
+  width: 60%;
+  text-align: left;
+  margin-bottom: 2.5%;
 }
-.main .one .one_1 .one_1_2 .btn .btn_1 {
-  float: left;
-  width: 100%;
-  margin: 0 0 10px 0;
+
+.main .one .content .left .icon {
+  color: black;
 }
-.main .one .one_1 .one_1_2 .btn .btn_1 button {
-  border: none;
-  font-size: 12px;
+
+.main .one .content .right input {
+  color: black;
 }
-.main .one .one_1 .one_1_2 .btn .btn_1 button:last-child {
-  float: right;
+
+.main .one .content .right .placeholder {
+  color: black;
 }
-.main .one .one_1 .one_1_2 .btn .btn_2 {
-  float: left;
-  width: 100%;
+
+.main .one .content .right .picker view {
+  color: #ffffff;
+}
+
+.main .one .save {
+  margin: 15px 10px;
   text-align: center;
 }
-.main .one .one_1 .one_1_2 .btn .btn_2 button {
-  width: 80%;
-  border-radius: 25px;
+
+.main .one .save button {
+  padding: 0rpx;
+  line-height: 50rpx;
+  font-size: 25rpx;
+  width: 60%;
+  height: 100%;
+  border-radius: 30rpx;
 }
-.main .one .one_1 .one_1_3 {
+.main .one .one_3{
   float: left;
   width: 100%;
-  font-size: 12px;
-  color: #666;
+  margin-bottom: 2.5%;
 }
-.main .one .one_1 .one_1_3 .check {
-  padding: 0 50px;
+.main .one .one_3 .box{
+  float: left;
+  margin-left: 29%;
+  width: 10%;
+  transform:scale(.6);
 }
-.main .one .one_2 {
+.main .one .one_3 .box_text{
   float: left;
-  width: 100%;
-  color: #ffffff;
-  margin: 0 0 50px 0;
+  width: 40%;
+  color: #000000;
+  margin-top: 2%;
+  font-size:18rpx;
 }
-.main .one .one_2 text {
-  padding: 0 10px;
-  font-size: 14px;
+.mian .one .two{
+  float: left;
+  width: 100%;
+  text-align: center;
 }
-.main .one .one_3 {
+.main .two {
   float: left;
   width: 100%;
+  margin-top: 5%;
   text-align: center;
+  color: #ffffff;
+  font-size: 25rpx;
 }
-/* 未选中 */
-checkbox .wx-checkbox-input {
-  width: 30rpx;
-  height: 30rpx;
-}
-/* 选中 */
-/* checkbox .wx-checkbox-input.wx-checkbox-input-checked{
-    border: none;
-    background: red;
- } */
-/* 选中 */
-/* checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
-    border-radius: 50%;
-    width: 40rpx;
-    height: 40rpx;
-    line-height: 40rpx;
-    text-align: center;
-    font-size:30rpx; 
-    color:#fff; 
-    background: transparent;
-    transform:translate(-50%, -50%) scale(1);
-    -webkit-transform:translate(-50%, -50%) scale(1);
- } */
+.main .thr {
+  float: left;
+  width: 100%;
+  text-align: center;
+  margin-top: 5%;
+}