Przeglądaj źródła

代码格式化

Huanyi 3 dni temu
rodzic
commit
8d2ab30512
2 zmienionych plików z 20 dodań i 16 usunięć
  1. 10 7
      pages/login/index.vue
  2. 10 9
      pages/login/register.vue

+ 10 - 7
pages/login/index.vue

@@ -139,18 +139,18 @@ const onSubmit = async () => {
 
 		if (res.access_token) {
 			uni.setStorageSync('token', res.access_token)
-			
+
 			// 获取用户信息并存储 tenantId
 			try {
 				const userRes = await getInfo()
 				if (userRes && userRes.user && userRes.user.tenantId) {
 					uni.setStorageSync('tenantId', userRes.user.tenantId)
 				}
-	} catch (e) {
-		console.error('获取用户信息失败', e)
-		uni.showToast({ title: typeof e === 'string' ? e : '请求失败', icon: 'none' })
-	}
-			
+			} catch (e) {
+				console.error('获取用户信息失败', e)
+				uni.showToast({ title: typeof e === 'string' ? e : '请求失败', icon: 'none' })
+			}
+
 			uni.showToast({ title: '登录成功', icon: 'success' })
 			setTimeout(() => {
 				uni.reLaunch({ url: '/pages/index/index' })
@@ -377,7 +377,10 @@ const showAgreement = async (agreementId) => {
 	border: none;
 	border-radius: 52rpx;
 	letter-spacing: 4rpx;
-	&::after { border: none; }
+
+	&::after {
+		border: none;
+	}
 }
 
 .footer-hint {

+ 10 - 9
pages/login/register.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="login-page">
 		<nav-bar title="注册" bgColor="transparent" color="#fff" :showBack="false"></nav-bar>
-		
+
 		<!-- 顶部渐变装饰区 -->
 		<view class="hero-bg">
 			<view class="deco-circle c1"></view>
@@ -54,8 +54,7 @@
 				<view class="input-icon-wrap">
 					<uni-icons type="staff" size="18" color="#ffc837"></uni-icons>
 				</view>
-				<input class="custom-input" v-model="name" placeholder="请输入姓名"
-					placeholder-class="input-placeholder" />
+				<input class="custom-input" v-model="name" placeholder="请输入姓名" placeholder-class="input-placeholder" />
 			</view>
 
 			<!-- 邮箱 -->
@@ -63,8 +62,7 @@
 				<view class="input-icon-wrap">
 					<uni-icons type="email" size="18" color="#ffc837"></uni-icons>
 				</view>
-				<input class="custom-input" v-model="email" placeholder="请输入邮箱"
-					placeholder-class="input-placeholder" />
+				<input class="custom-input" v-model="email" placeholder="请输入邮箱" placeholder-class="input-placeholder" />
 			</view>
 
 			<!-- 密码 -->
@@ -268,17 +266,17 @@ const onSubmit = async () => {
 			password: password.value,
 			confirmPassword: confirmPassword.value
 		})
-		
+
 		uni.hideLoading()
 		uni.showToast({
 			title: '提交成功',
 			icon: 'success'
 		})
-		
+
 		// 缓存商户名称和提交时间,供审核界面展示使用
 		uni.setStorageSync('registered_merchant', companyName.value)
 		uni.setStorageSync('registered_time', new Date().toLocaleString())
-		
+
 		setTimeout(() => {
 			uni.reLaunch({
 				url: '/pages/login/review'
@@ -441,7 +439,10 @@ const onSubmit = async () => {
 	border: none;
 	border-radius: 52rpx;
 	letter-spacing: 4rpx;
-	&::after { border: none; }
+
+	&::after {
+		border: none;
+	}
 }
 
 .register-redirect-row {