Jelajahi Sumber

登录页修改

tanxue 4 bulan lalu
induk
melakukan
5b0906c9e8

+ 0 - 8
components/password-lli/password-lli.vue

@@ -42,15 +42,7 @@
 			if (window.lli && typeof window.lli.encode === 'function') {
 			} else {
 				const script = document.createElement('script')
-				// #ifdef H5
-				script.src = '/static/encode.js'
-				// #endif
-				
-				// #ifdef APP-PLUS
 				script.src = 'static/encode.js'
-				// #endif
-
-				
 				document.head.appendChild(script)
 			}
 		},

+ 1 - 7
pages.json

@@ -1,13 +1,7 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/admin/Login/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/client/Login/index",
+			"path": "pages/Login/index",
 			"style": {
 				"navigationStyle": "custom"
 			}

+ 0 - 75
pages/admin/Login/index.vue

@@ -1,75 +0,0 @@
-<template>
-	<view>
-		北京诚祥 登录页面
-		<view>
-			<!-- <button type="primary" @click="setLocalData">设置缓存</button>
-			<button type="primary" @click="setPinia">设置状态</button>
-			<button type="primary" @click="goAdminShouye">去管理首页</button>
-			<button type="warn" @click="goJiaZhengShouye">去家政首页</button> -->
-			<input type="text" v-model="userName" placeholder="请输入用户名">
-			<input type="text" v-model="password" @blur="handleUpdateLLiPassword" placeholder="请输入密码">
-			<button type="warn" @click="handleLogin">登录</button>
-		</view>
-		已加密的:{{lliPassword}}
-
-    <!--  隐藏的同步加密密码组件 非可见  -->
-		<passwordLli ref="passLLiRef" :password="password" @lli-password="onLliPassword" />
-	</view>
-</template>
-
-<script setup>
-	import cacheManager from '@/utils/cacheManager.js'
-	import * as httpApi from "@/api/login.js"
-	import passwordLli from "@/components/password-lli/password-lli.vue";
-	import {
-		ref
-	} from "vue"
-	const userName = ref('18604088413') // 用户名
-	const password = ref('1') // 密码
-	const lliPassword = ref('') // 加密后的密码
-	const passLLiRef = ref(null)
-
-	function goAdminShouye() {
-		uni.navigateTo({
-			url: "/pages/ShouYe/shouyeOne"
-		})
-	}
-
-	function goJiaZhengShouye() {
-		uni.navigateTo({
-			url: "/pages/ShouYe/shouyeTwo"
-		})
-	}
-
-	function handleUpdateLLiPassword() {
-		passLLiRef.value.lliPassword();
-	}
-
-	function onLliPassword(password) {
-		lliPassword.value = password;
-	}
-
-	function handleLogin() {
-		httpApi.login({
-			userName: userName.value,
-			password: lliPassword.value
-		}).then(res => {
-			cacheManager.set('auth', res.data)
-			console.log('登录成功')
-
-			// 目前默认跳转管理端首页
-			// uni.navigateTo({
-			// 	url: `/pages/admin/ShouYe/shouye`
-			// })
-
-			// 目前默认管理端考试页面
-			uni.navigateTo({
-				url: `/pages/admin/Jiazheng/index`
-			})
-		})
-	}
-</script>
-
-<style lang="scss">
-
-</style>

+ 0 - 71
pages/client/Login/index.vue

@@ -1,71 +0,0 @@
-<template>
-	<view>
-		北京诚祥 登录页面
-		<view>
-			<!-- <button type="primary" @click="setLocalData">设置缓存</button>
-			<button type="primary" @click="setPinia">设置状态</button>
-			<button type="primary" @click="goAdminShouye">去管理首页</button>
-			<button type="warn" @click="goJiaZhengShouye">去家政首页</button> -->
-			<input type="text" v-model="userName" placeholder="请输入用户名">
-			<input type="text" v-model="password" @blur="handleUpdateLLiPassword" placeholder="请输入密码">
-			<button type="warn" @click="handleLogin">登录</button>
-		</view>
-		已加密的:{{lliPassword}}
-
-    <!--  隐藏的同步加密密码组件 非可见  -->
-		<passwordLli ref="passLLiRef" :password="password" @lli-password="onLliPassword" />
-	</view>
-</template>
-
-<script setup>
-	import cacheManager from '@/utils/cacheManager.js'
-	import * as httpApi from "@/api/login.js"
-	import passwordLli from "@/components/password-lli/password-lli.vue";
-	import {
-		ref
-	} from "vue"
-	const userName = ref('18604088413') // 用户名
-	const password = ref('1') // 密码
-	const lliPassword = ref('') // 加密后的密码
-	const passLLiRef = ref(null)
-
-	function goAdminShouye() {
-		uni.navigateTo({
-			url: "/pages/ShouYe/shouyeOne"
-		})
-	}
-
-	function goJiaZhengShouye() {
-		uni.navigateTo({
-			url: "/pages/ShouYe/shouyeTwo"
-		})
-	}
-
-	function handleUpdateLLiPassword() {
-		passLLiRef.value.lliPassword();
-	}
-
-	function onLliPassword(password) {
-		lliPassword.value = password;
-	}
-
-	function handleLogin() {
-		httpApi.login({
-			userName: userName.value,
-			password: lliPassword.value
-		}).then(res => {
-			cacheManager.set('auth', res.data)
-			console.log('登录成功')
-
-			// 目前默认跳转管理端首页
-			// uni.navigateTo({
-			// 	url: `/pages/admin/ShouYe/shouye`
-			// })
-
-			// 目前默认管理端考试页面
-			uni.navigateTo({
-				url: `/pages/admin/Jiazheng/index`
-			})
-		})
-	}
-</script>