From 2c86a8bd60deed0dd0e044bad6fb83f75d19a332 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期日, 26 十月 2025 15:05:50 +0800
Subject: [PATCH] Merge branch 'feature-task'
---
app/pages/mine/info/index.vue | 94 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/app/pages/mine/info/index.vue b/app/pages/mine/info/index.vue
new file mode 100644
index 0000000..3a1b9de
--- /dev/null
+++ b/app/pages/mine/info/index.vue
@@ -0,0 +1,94 @@
+<template>
+ <view class="container">
+ <uni-list>
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="鐢ㄦ埛鍚�" :rightText="user.userName" />
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="鎵嬫満鍙风爜" :rightText="user.phonenumber" />
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'location-filled'}" title="缁戝畾杞﹁締" :rightText="boundVehicle || '鏈粦瀹�'" />
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'info-filled'}" title="App鐗堟湰鍙�" :rightText="version" />
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="閭" :rightText="user.email" />
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="宀椾綅" :rightText="postGroup" />
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="瑙掕壊" :rightText="roleGroup" />
+ <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="鍒涘缓鏃ユ湡" :rightText="user.createTime" />
+ </uni-list>
+
+ <!-- 缁戝畾/瑙g粦杞﹁締鎿嶄綔 -->
+ <view class="vehicle-actions" v-if="boundVehicle">
+ <button class="unbind-btn" @click="unbindVehicle">鍙栨秷缁戝畾杞﹁締</button>
+ </view>
+ <view class="vehicle-actions" v-else>
+ <button class="bind-btn" @click="goToBindVehicle">缁戝畾杞﹁締</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ import { getUserProfile } from "@/api/system/user"
+
+ export default {
+ data() {
+ return {
+ user: {},
+ roleGroup: "",
+ postGroup: "",
+ boundVehicle: "", // 妯℃嫙缁戝畾鐨勮溅杈嗕俊鎭�
+ version: getApp().globalData.config.appInfo.version || "1.0.0" // App鐗堟湰鍙�
+ }
+ },
+ onLoad() {
+ this.getUser()
+ },
+ methods: {
+ getUser() {
+ getUserProfile().then(response => {
+ this.user = response.data
+ this.roleGroup = response.roleGroup
+ this.postGroup = response.postGroup
+ })
+ },
+
+ // 璺宠浆鍒扮粦瀹氳溅杈嗛〉闈�
+ goToBindVehicle() {
+ this.$tab.navigateTo('/pages/bind-vehicle')
+ },
+
+ // 鍙栨秷缁戝畾杞﹁締
+ unbindVehicle() {
+ this.$modal.confirm('鏄惁鍙栨秷缁戝畾杞﹁締锛�').then(() => {
+ // 杩欓噷鍙互璋冪敤API鍙栨秷缁戝畾杞﹁締
+ this.boundVehicle = ""
+ this.$modal.showToast('鍙栨秷缁戝畾鎴愬姛')
+ }).catch(() => {
+ // 鐢ㄦ埛鍙栨秷鎿嶄綔
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #ffffff;
+ }
+
+ .vehicle-actions {
+ padding: 30rpx;
+ text-align: center;
+
+ .bind-btn, .unbind-btn {
+ width: 80%;
+ height: 80rpx;
+ border-radius: 10rpx;
+ font-size: 32rpx;
+ }
+
+ .bind-btn {
+ background-color: #007AFF;
+ color: white;
+ }
+
+ .unbind-btn {
+ background-color: #ff4d4f;
+ color: white;
+ }
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.1