From 1df1e9daa4d33a0e975db7ef0a73ee4dd45d216b Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 26 八月 2024 09:19:58 +0800
Subject: [PATCH] lll

---
 h5/pages.json                                           |   20 +
 h5/pages/staff/task/visitorApprove.vue                  |    4 
 h5/pages/driver/taskDetail.vue                          |   11 
 h5/static/driver/position.png                           |    0 
 h5/pages/login/login.vue                                |   14 +
 admin/src/components/common/CommonHeader.vue            |    9 
 h5/pages/staffLogin/forgetPsd.vue                       |    9 
 admin/src/components/business/OperaCarUseBookWindow.vue |    8 
 h5/.gitignore                                           |   27 ++
 h5/pages/driver/login.vue                               |  220 ++++++++++++++++++++++
 h5/pages/driver/register.vue                            |  227 ++++++++++++++++++++++
 11 files changed, 525 insertions(+), 24 deletions(-)

diff --git a/admin/src/components/business/OperaCarUseBookWindow.vue b/admin/src/components/business/OperaCarUseBookWindow.vue
index 7c44234..8321ae4 100644
--- a/admin/src/components/business/OperaCarUseBookWindow.vue
+++ b/admin/src/components/business/OperaCarUseBookWindow.vue
@@ -244,16 +244,12 @@
     },
     agreeOpen () {
       this.isShowProblem = true
-      this.dealForm = {
-        driveId: null,
-        checkInfo: null
-      }
+      this.$set(this.dealForm, 'checkInfo', '')
       this.loadMemberList()
     },
     jectOpen () {
       this.isBackProblem = true
-      this.dealForm = {
-        driveId: null,
+      this.backForm = {
         checkInfo: null
       }
     },
diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index f4fe589..5afc768 100644
--- a/admin/src/components/common/CommonHeader.vue
+++ b/admin/src/components/common/CommonHeader.vue
@@ -3,6 +3,13 @@
     <div class="header">
       <div class="logo">
         <div>{{ title }}</div>
+        <div class="list">
+          <div class="item">鏈嶅姟涓績</div>
+          <div class="item">瀹夐槻涓績</div>
+          <div class="item">娑堥槻涓績</div>
+          <div class="item">鑳界涓績</div>
+          <div class="item">椹鹃┒鑸�</div>
+        </div>
         <!-- <div class="title-en">Diagnosis of Intelligent Manufacturing Integrated Service Platfrom</div> -->
       </div>
       <div class="user">
@@ -215,6 +222,8 @@
     font-size: 22px;
     font-weight: 600;
     color: #fff;
+    display: flex;
+    align-items: center;
     // display: inline;
     .title-en {
       font-size: 11px;
diff --git a/h5/.gitignore b/h5/.gitignore
new file mode 100644
index 0000000..dc260c4
--- /dev/null
+++ b/h5/.gitignore
@@ -0,0 +1,27 @@
+.DS_Store
+coderd.json
+node_modules
+.env.development
+uview-ui
+
+/dist
+
+
+# local env files
+.env.local
+.env.*.local
+unpackage
+admin
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/h5/pages.json b/h5/pages.json
index 31a0fd0..a7a6648 100644
--- a/h5/pages.json
+++ b/h5/pages.json
@@ -405,7 +405,25 @@
 				"enablePullDownRefresh": false
 			}
 		}
-	],
+	    ,{
+            "path" : "pages/driver/login",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "鐧诲綍",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/driver/register",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "娉ㄥ唽",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"subPackages": [
 		{
 			"root": "n_pages",
diff --git a/h5/pages/driver/login.vue b/h5/pages/driver/login.vue
new file mode 100644
index 0000000..cc0ff66
--- /dev/null
+++ b/h5/pages/driver/login.vue
@@ -0,0 +1,220 @@
+<template>
+  <view class="login">
+    <image class="login_bg" src="@/static/login_bg@2x.png" />
+    <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" />
+    <view class="login_title">瀹夋嘲鐗╂祦鏅烘収鍥尯</view>
+    <view class="login_title">鐗╂祦杞﹀徃鏈虹櫥褰�</view>
+    <view class="login_list">
+      <view class="login_list_item">
+        <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
+        <input v-model="form.phone" maxlength="18" placeholder="鎵嬫満鍙�" />
+      </view>
+      <view class="login_list_item">
+        <image src="@/static/login_ic_password@2x.png" mode="widthFix" />
+        <input
+          v-model="form.password"
+          type="password"
+          placeholder="瀵嗙爜"
+        />
+      </view>
+    </view>
+    <view class="login_btn">
+      <view class="login_btn_n" @click="onLogin">绔嬪嵆鐧诲綍</view>
+    </view>
+    <!--  -->
+		<view class="btns">
+			<view class="btn" @click="handleRegister">绔嬪嵆娉ㄥ唽</view>
+			<view class="btn separate"> | </view>
+			<view class="btn">蹇樿瀵嗙爜</view>
+		</view>
+  </view>
+</template>
+
+<script>
+import { resetPassword, sendSms } from '@/api'
+export default {
+  data() {
+    return {
+      form: {
+      },
+      isShowProtocol: false,
+      countDown: 0
+    }
+  },
+
+  onLoad() {
+  },
+
+  methods: {
+		handleRegister() {
+			uni.navigateTo({
+				url: "/pages/driver/register"
+			})
+		},
+    dealChange(e) {
+      console.log(e)
+    },
+    initCaptcha() {
+      if (!this.form.phone) return uni.showToast({
+        title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+        icon: 'none'
+      })
+      sendSms({ phone: this.form.phone }).then(res => {
+        this.countDown = 60
+        setInterval(() => {
+          if (this.countDown == 0) return
+          this.countDown--
+        }, 1000)
+      })
+    },
+
+    onLogin() {
+      const { form } = this
+      if (!form.phone) return uni.showToast({
+        title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+        icon: 'none'
+      })
+      if (!form.password) return uni.showToast({
+        title: '瀵嗙爜涓嶈兘涓虹┖',
+        icon: 'none'
+      })
+      resetPassword({
+        ...form
+      }).then(res => {
+        if (res && res.code == 200) {
+          setTimeout(() => {
+            uni.showToast({
+              title: '瀵嗙爜淇敼鎴愬姛,璇烽噸鏂扮櫥褰�',
+              icon: 'success',
+              duration: 2000
+            })
+          })
+          uni.redirectTo({
+            url: "/pages/staffLogin/login"
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.login {
+  width: 100%;
+  display: flex;
+  padding-top: 100rpx;
+  box-sizing: border-box;
+  align-items: center;
+  flex-direction: column;
+  background: linear-gradient(
+    180deg,
+    rgba(39, 155, 170, 0.2) 0%,
+    rgba(39, 155, 170, 0) 100%
+  );
+  .login_logo {
+    width: 180rpx;
+    height: 180rpx;
+		margin-bottom: 40rpx;
+  }
+  .login_bg {
+    position: absolute;
+    top: 0;
+    width: 750rpx;
+  }
+  .login_title {
+    font-size: 44rpx;
+    font-weight: 600;
+    color: #333333;
+  }
+  .login_list {
+		margin-top: 60rpx;
+    width: 100%;
+    padding: 0 60rpx;
+    box-sizing: border-box;
+    .login_list_item {
+      width: 100%;
+      border-radius: 50rpx;
+      height: 98rpx;
+      padding: 0 40rpx;
+      box-sizing: border-box;
+      background: #ffffff;
+      margin-bottom: 40rpx;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      &:last-child {
+        margin-bottom: 0 !important;
+      }
+      image {
+        flex-shrink: 0;
+        width: 40rpx;
+        height: 40rpx;
+      }
+      .captcha {
+        color: $uni-color-primary;
+      }
+      input {
+        flex: 1;
+        height: 100%;
+        color: #666666;
+        margin-left: 24rpx;
+        border: none;
+      }
+    }
+  }
+  .login_btn {
+    width: 100%;
+    padding: 0 60rpx;
+    box-sizing: border-box;
+    margin-top: 80rpx;
+    .for_psd {
+      color: $uni-color-primary;
+      margin-top: 40rpx;
+      width: 140rpx;
+      text-align: center;
+      margin: 40rpx auto;
+    }
+    .login_btn_n {
+      width: 100%;
+      height: 98rpx;
+      background: $uni-color-primary;
+      box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2);
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-weight: 600;
+      font-size: 32rpx;
+      color: #ffffff;
+      border-radius: 50rpx;
+    }
+  }
+  .deal_wrap {
+    position: absolute;
+    width: 100%;
+    left: 0;
+    text-align: center;
+    bottom: 108rpx;
+    .deal {
+      color: $uni-color-primary;
+    }
+  }
+	.btns{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		position: fixed;
+		bottom: 60rpx;
+		left: 0;
+		width: 100%;
+		.btn{
+			font-size: 30rpx;
+			color: $uni-color-primary;
+		}
+		.separate{ margin: 0 8rpx; }
+	}
+}
+.modal {
+  padding: 32rpx;
+}
+</style>
diff --git a/h5/pages/driver/register.vue b/h5/pages/driver/register.vue
new file mode 100644
index 0000000..ae1b1a5
--- /dev/null
+++ b/h5/pages/driver/register.vue
@@ -0,0 +1,227 @@
+<template>
+  <view class="login">
+    <image class="login_bg" src="@/static/login_bg@2x.png" />
+    <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" />
+    <view class="login_title">瀹夋嘲鐗╂祦鏅烘収鍥尯</view>
+    <view class="login_title">鐗╂祦杞﹀徃鏈虹櫥褰�</view>
+    <view class="login_list">
+      <view class="login_list_item">
+        <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
+        <input v-model="form.name" maxlength="18" placeholder="璇疯緭鍏ュ鍚�" />
+      </view>
+			<view class="login_list_item">
+			  <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
+			  <input v-model="form.phone" maxlength="18" placeholder="璇疯緭鍏ユ墜鏈哄彿" />
+			</view>
+      <view class="login_list_item">
+        <image src="@/static/ic_captcha.png" mode="widthFix"></image>
+        <input
+          v-model="form.validCode"
+          placeholder="璇疯緭鍏ラ獙璇佺爜"
+          type="text"
+        />
+        <text class="captcha" v-if="countDown == 0" @click="initCaptcha"
+          >鑾峰彇楠岃瘉鐮�</text
+        >
+        <text class="placeholder9" v-else>{{ countDown }}</text>
+      </view>
+      <view class="login_list_item">
+        <image src="@/static/login_ic_password@2x.png" mode="widthFix" />
+        <input
+          v-model="form.password"
+          type="password"
+          placeholder="璇疯緭鍏ュ瘑鐮�"
+        />
+      </view>
+    </view>
+    <view class="login_btn">
+      <view class="login_btn_n" @click="onLogin">绔嬪嵆娉ㄥ唽</view>
+    </view>
+    <!--  -->
+    <u-popup
+      :show="isShowProtocol"
+      @close="isShowProtocol = false"
+      mode="center"
+    >
+      <view class="modal">111</view>
+    </u-popup>
+  </view>
+</template>
+
+<script>
+import { resetPassword, sendSms } from '@/api'
+export default {
+  data() {
+    return {
+      form: {
+      },
+      isShowProtocol: false,
+      countDown: 0
+    }
+  },
+
+  onLoad() {
+  },
+
+  methods: {
+    dealChange(e) {
+      console.log(e)
+    },
+    initCaptcha() {
+      if (!this.form.phone) return uni.showToast({
+        title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+        icon: 'none'
+      })
+      sendSms({ phone: this.form.phone }).then(res => {
+        this.countDown = 60
+        setInterval(() => {
+          if (this.countDown == 0) return
+          this.countDown--
+        }, 1000)
+      })
+    },
+
+    onLogin() {
+      const { form } = this
+			if (!form.name) return uni.showToast({
+			  title: '鎵嬫満鍙峰鍚�',
+			  icon: 'none'
+			})
+      if (!form.phone) return uni.showToast({
+        title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+        icon: 'none'
+      })
+      if (!form.validCode) return uni.showToast({
+        title: '楠岃瘉鐮佷笉鑳戒负绌�',
+        icon: 'none'
+      })
+      if (!form.password) return uni.showToast({
+        title: '瀵嗙爜涓嶈兘涓虹┖',
+        icon: 'none'
+      })
+      resetPassword({
+        ...form
+      }).then(res => {
+        if (res && res.code == 200) {
+          setTimeout(() => {
+            uni.showToast({
+              title: '娉ㄥ唽鎴愬姛,璇峰墠寰�鐧诲綍',
+              icon: 'success',
+              duration: 2000
+            })
+          })
+          uni.redirectTo({
+            url: "/pages/driver/login"
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.login {
+  width: 100%;
+  display: flex;
+  padding-top: 100rpx;
+  box-sizing: border-box;
+  align-items: center;
+  flex-direction: column;
+  background: linear-gradient(
+    180deg,
+    rgba(39, 155, 170, 0.2) 0%,
+    rgba(39, 155, 170, 0) 100%
+  );
+  .login_logo {
+    width: 180rpx;
+    height: 180rpx;
+		margin-bottom: 40rpx;
+  }
+  .login_bg {
+    position: absolute;
+    top: 0;
+    width: 750rpx;
+  }
+  .login_title {
+    font-size: 44rpx;
+    font-weight: 600;
+    color: #333333;
+  }
+  .login_list {
+		margin-top: 60rpx;
+    width: 100%;
+    padding: 0 60rpx;
+    box-sizing: border-box;
+    .login_list_item {
+      width: 100%;
+      border-radius: 50rpx;
+      height: 98rpx;
+      padding: 0 40rpx;
+      box-sizing: border-box;
+      background: #ffffff;
+      margin-bottom: 40rpx;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      &:last-child {
+        margin-bottom: 0 !important;
+      }
+      image {
+        flex-shrink: 0;
+        width: 40rpx;
+        height: 40rpx;
+      }
+      .captcha {
+        color: $uni-color-primary;
+      }
+      input {
+        flex: 1;
+        height: 100%;
+        color: #666666;
+        margin-left: 24rpx;
+        border: none;
+      }
+    }
+  }
+  .login_btn {
+    width: 100%;
+    padding: 0 60rpx;
+    box-sizing: border-box;
+    margin-top: 80rpx;
+    .for_psd {
+      color: $uni-color-primary;
+      margin-top: 40rpx;
+      width: 140rpx;
+      text-align: center;
+      margin: 40rpx auto;
+    }
+    .login_btn_n {
+      width: 100%;
+      height: 98rpx;
+      background: $uni-color-primary;
+      box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2);
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-weight: 600;
+      font-size: 32rpx;
+      color: #ffffff;
+      border-radius: 50rpx;
+    }
+  }
+  .deal_wrap {
+    position: absolute;
+    width: 100%;
+    left: 0;
+    text-align: center;
+    bottom: 108rpx;
+    .deal {
+      color: $uni-color-primary;
+    }
+  }
+}
+.modal {
+  padding: 32rpx;
+}
+</style>
diff --git a/h5/pages/driver/taskDetail.vue b/h5/pages/driver/taskDetail.vue
index 7d8e014..8734397 100644
--- a/h5/pages/driver/taskDetail.vue
+++ b/h5/pages/driver/taskDetail.vue
@@ -41,11 +41,7 @@
         <view class="value">
           <view class="">0 鍏噷</view>
           <view class="btn" @click="getLocation">
-            <u-icon
-              name="map"
-              :color="$store.state.primaryColor"
-              class="mr6"
-            ></u-icon>
+						<image class="icon mr6" src="../../static/driver/position.png"></image>
             閲嶆柊瀹氫綅
           </view>
         </view>
@@ -209,6 +205,11 @@
           font-size: 28rpx;
           color: $uni-color-primary;
           display: flex;
+					align-items: center;
+					.icon{
+						width: 30rpx;
+						height: 30rpx;
+					}
         }
       }
     }
diff --git a/h5/pages/login/login.vue b/h5/pages/login/login.vue
index c459474..b209bab 100644
--- a/h5/pages/login/login.vue
+++ b/h5/pages/login/login.vue
@@ -19,7 +19,7 @@
       </view>
       <u-icon name="arrow-right" size="24" color="#979797" />
     </view>
-    <view class="item">
+    <view class="item" @click="driverLogin">
       <image class="avatar" src="@/static/ic_driver@2x.png" />
       <view class="content">
         <view class="name">鎴戞槸鐗╂祦杞﹀徃鏈�</view>
@@ -39,6 +39,18 @@
         url
       })
     },
+		driverLogin() {
+			const driverInfo = uni.getStorageSync('driverInfo') || {}
+			if (driverInfo && driverInfo.memberId) {
+			  uni.navigateTo({
+			    url: '/pages/driver/index'
+			  })
+			}else{
+			  uni.navigateTo({
+			    url: '/pages/driver/login'
+			  })
+			}
+		},
     staffLogin() {
       const userInfo = uni.getStorageSync('userInfo') || {}
       if (userInfo && userInfo.memberId) {
diff --git a/h5/pages/staff/task/visitorApprove.vue b/h5/pages/staff/task/visitorApprove.vue
index ad1a40f..82883a4 100644
--- a/h5/pages/staff/task/visitorApprove.vue
+++ b/h5/pages/staff/task/visitorApprove.vue
@@ -199,8 +199,8 @@
       statusMap: {
         0: '寰呭鎵�',
         1: '瀹℃壒涓�',
-        2: '瀹℃壒閫氳繃',
-        3: '瀹℃壒鏈�氳繃',
+        2: '宸查�氳繃',
+        3: '宸叉嫆缁�',
         4: '宸插彇娑�',
         5: '浠栦汉鎴栫',
         6: '浠栦汉鎷掔粷',
diff --git a/h5/pages/staffLogin/forgetPsd.vue b/h5/pages/staffLogin/forgetPsd.vue
index d51d593..d7d6fd8 100644
--- a/h5/pages/staffLogin/forgetPsd.vue
+++ b/h5/pages/staffLogin/forgetPsd.vue
@@ -40,14 +40,6 @@
     <view class="login_btn">
       <view class="login_btn_n" @click="onLogin">纭淇敼</view>
     </view>
-    <!--  -->
-    <u-popup
-      :show="isShowProtocol"
-      @close="isShowProtocol = false"
-      mode="center"
-    >
-      <view class="modal">111</view>
-    </u-popup>
   </view>
 </template>
 
@@ -58,7 +50,6 @@
     return {
       form: {
       },
-      isShowProtocol: false,
       countDown: 0
     }
   },
diff --git a/h5/static/driver/position.png b/h5/static/driver/position.png
new file mode 100644
index 0000000..5b2e7f2
--- /dev/null
+++ b/h5/static/driver/position.png
Binary files differ

--
Gitblit v1.9.3