Jelajahi Sumber

auto commit

gcz 4 tahun lalu
induk
melakukan
b60d4085bc
6 mengubah file dengan 84 tambahan dan 4 penghapusan
  1. 3 0
      common/apiurl.js
  2. 5 2
      common/http.api.js
  3. 7 0
      pages.json
  4. 1 1
      pages/index/index.vue
  5. 1 1
      pages/login/login.vue
  6. 67 0
      pages/modifypwd/modifypwd.vue

+ 3 - 0
common/apiurl.js

@@ -15,6 +15,9 @@ const apiurl = {
 	
 	//车辆出场详情
 	entranceOutDetailUrl:'/orderinfo/entranceOutDetail/',
+	
+	//收费员密码修改
+	modifyPwdUrl:'/payeeinfo/modifyPwd',
 
 }
 

+ 5 - 2
common/http.api.js

@@ -17,7 +17,9 @@ const install = (Vue, vm) => {
 	
 	let baiduOcr = (params = {}) => vm.$u.post(apiurl.baiduOcrUrl, params);
 	
-	let entranceOutDetail = (params = {}) => vm.$u.get(apiurl.entranceOutDetailUrl+params.spaceId);	
+	let entranceOutDetail = (params = {}) => vm.$u.get(apiurl.entranceOutDetailUrl+params.spaceId);
+	
+	let modifyPwd = (params = {}) => vm.$u.put(apiurl.modifyPwdUrl, params);
 	
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 	vm.$u.api = {
@@ -27,7 +29,8 @@ const install = (Vue, vm) => {
 		getOut,
 		getIndex,
 		baiduOcr,
-		entranceOutDetail
+		entranceOutDetail,
+		modifyPwd
 	};
 }
 

+ 7 - 0
pages.json

@@ -19,6 +19,13 @@
 				"navigationBarTitleText": "城市智慧停车"
 			}
 		},
+		{
+			"path": "pages/modifypwd/modifypwd",
+			"style": {
+				// "navigationStyle":"custom",// 隐藏系统导航栏
+				"navigationBarTitleText": "密码修改"
+			}
+		},
 		{
 			"path": "pages/parking/parking",
 			"style": {

+ 1 - 1
pages/index/index.vue

@@ -57,7 +57,7 @@
 					<u-image width="120rpx" height="120rpx" src="/static/img/index-feature-06.png"></u-image>
 					<view class="feature-item-text">车辆出场</view>
 				</view>
-				<view class="feature-item" @click="$refs.uToast.show({title: '请联系管理员修改'})">
+				<view class="feature-item" @click="openPage('pages/modifypwd/modifypwd')">
 					<u-image width="120rpx" height="120rpx" src="/static/img/index-feature-07.png"></u-image>
 					<view class="feature-item-text">密码修改</view>
 				</view>

+ 1 - 1
pages/login/login.vue

@@ -12,7 +12,7 @@
 			</u-form>
 			<view class="pass-tool">
 				<u-checkbox v-model="form.passCheck" active-color="transparent">记住密码</u-checkbox>
-				<view class="">忘记密码?</view>
+				<!-- <view class="" @click="$refs.uToast.show({title: '请联系管理员修改'})">忘记密码?</view> -->
 			</view>
 			<view class="login-btn" @click="handleLogin">立即登录</view>
 		</view>

+ 67 - 0
pages/modifypwd/modifypwd.vue

@@ -0,0 +1,67 @@
+<template>
+	<view>
+		<u-form :model="form" ref="uForm">
+			<u-form-item class="u-m-t-40 u-m-b-40" label="原密码:" label-width="180rpx">
+				<u-input v-model="form.oldPassword" placeholder="请输入原密码"/>
+			</u-form-item>
+			<u-form-item label="新密码:" label-width="180rpx">
+				<u-input v-model="form.newPassword" placeholder="请输入新密码" />
+			</u-form-item>
+			<u-form-item label="确认新密码:" label-width="180rpx">
+				<u-input v-model="form.confirmPassword" placeholder="请再次输入新密码"/>
+			</u-form-item>
+		</u-form>
+		<u-button class="submit-btn" @click="submit">确认修改</u-button>
+		
+		<u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				form:{
+					oldPassword:null,
+					newPassword:null,
+					confirmPassword:null,
+				}
+			}
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			submit(){
+				let param = {
+					oldPassword:this.form.oldPassword,
+					newPassword:this.form.newPassword,
+					confirmPassword:this.form.confirmPassword
+				};
+				this.$u.api.modifyPwd(param)
+				.then(res=>{
+					this.$refs.uToast.show({
+						title: res.msg,
+						type: 'success',
+						url:'pages/index/index'
+					});
+					console.log('modifyPwd',res)
+				}).catch(err=>{
+					this.$refs.uToast.show({
+						title: err.msg,
+						type: 'error',
+					});
+					console.log('modifyPwd ',err)
+				});
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page{background-color: #F4F4F4;}
+	.u-form-item{background-color: #fff;padding-left: 40rpx;padding-right: 40rpx;}
+	.submit-btn{background-color: #3397FA;color: #fff;border: 0;margin: 274rpx 40rpx 40rpx;}
+	// @import "./modifypwd.scss";
+</style>