Преглед изворни кода

Merge branch 'master' of http://118.195.146.34:3000/ygtx/ygoa_miniapp

tianxing45174 пре 1 година
родитељ
комит
c2a6076447
3 измењених фајлова са 96 додато и 103 уклоњено
  1. 1 1
      pages/mine/index.vue
  2. 6 10
      pages/mine/personal_message/personal_message.vue
  3. 89 92
      pages/mine/setting/setting.vue

+ 1 - 1
pages/mine/index.vue

@@ -137,7 +137,7 @@
 		background-color: #f5f5f5;
 		border-radius: 10rpx;
 		margin-bottom: 20rpx;
-		border-bottom:1px solid black;
+		border-bottom:1px solid gainsboro;
 	}
 
 	.icon {

+ 6 - 10
pages/mine/personal_message/personal_message.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<!-- 用户头像 -->
-		<image src="/static/images/headImg.jpg" class="avatar"></image>
+		<image :src="headImg" class="avatar"></image>
 		
 		<!-- 用户名及职位 -->
 		<text class="username">{{ userInfo.name }}</text>
@@ -48,21 +48,17 @@
 	</view>
 </template>
 
-<script>
-	export default {
-		data() {
-			return {
-				userInfo: {
+<script setup>
+	import { reactive } from 'vue';
+	import headImg from "/static/images/mine/headImg.jpg";
+	const userInfo=reactive({
 					name: "张三",
 					position: "研发部-软件开发工程师",
 					phone: "",
 					email: "",
 					gender: "男",
 					birthday: "2000-01-10"
-				}
-			};
-		}
-	}
+				});
 </script>
 
 <style lang="scss" scoped>

+ 89 - 92
pages/mine/setting/setting.vue

@@ -1,111 +1,108 @@
 <!-- index.vue -->
 <template>
-  <view class="container">
-    <!-- 列表区域 -->
-    <view class="list-item" @click="showModal">
-		<view>
-			<uni-icons type="locked" size="20"></uni-icons>
-			<text>修改密码</text>
+	<view class="container">
+		<!-- 列表区域 -->
+		<view class="list-item" @click="">
+			<view>
+				<uni-icons type="locked" size="20"></uni-icons>
+				<text>修改密码</text>
+			</view>
+			<text>></text>
 		</view>
-		<text>></text>
-    </view>
-    <view class="list-item" @click="showModal">
-		<view>
-			<uni-icons type="refreshempty" size="20"></uni-icons>
-			<text>检查更新</text>
+		<view class="list-item" @click="">
+			<view>
+				<uni-icons type="refreshempty" size="20"></uni-icons>
+				<text>检查更新</text>
+			</view>
+			<text>></text>
 		</view>
-		<text>></text>
-    </view>
-    <view class="list-item" @click="showModal">
-		<view>
-			<uni-icons type="trash" size="20"></uni-icons>
-			<text>清理缓存</text>
+		<view class="list-item" @click="">
+			<view>
+				<uni-icons type="trash" size="20"></uni-icons>
+				<text>清理缓存</text>
+			</view>
+			<text>></text>
 		</view>
-		<text>></text>
-    </view>
 
-    <!-- 弹出框 -->
-    <uni-popup ref="popup" type="center">
-      <view class="modal-content">
-        <text class="modal-title">系统提示</text>
-        <text class="modal-text">确定注销并退出系统吗?</text>
-        <view class="modal-buttons">
-          <button class="modal-button-cancel" @click="hideModal">取消</button>
-          <button class="modal-button-confirm" @click="confirmLogout">确定</button>
-        </view>
-      </view>
-    </uni-popup>
-  </view>
+		<!-- 弹出框 -->
+		<uni-popup ref="popup" type="center">
+			<view class="modal-content">
+				<text class="modal-title">系统提示</text>
+				<text class="modal-text">确定注销并退出系统吗?</text>
+				<view class="modal-buttons">
+					<button class="modal-button-cancel" @click="hideModal">取消</button>
+					<button class="modal-button-confirm" @click="confirmLogout">确定</button>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
 </template>
 
-<script>
-export default {
-  methods: {
-    showModal() {
-      this.$refs.popup.open();
-    },
-    hideModal() {
-      this.$refs.popup.close();
-    },
-    confirmLogout() {
-      // 这里处理确认注销的逻辑
-      console.log('User confirmed logout');
-      this.hideModal();
-    }
-  }
-}
+<script setup>
+	function showModal() {
+		this.$refs.popup.open();
+	};
+
+	function hideModal() {
+		this.$refs.popup.close();
+	};
+
+	function confirmLogout() {
+		// 这里处理确认注销的逻辑
+		console.log('User confirmed logout');
+		this.hideModal();
+	};
 </script>
 
 <style lang="scss" scoped>
-/* 添加必要的样式 */
-.container {
-  padding: 20px;
-}
-
-.list-item {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  height: 50px;
-  border-bottom: 1px solid #eee;
-  font-size: 16px;
-}
+	/* 添加必要的样式 */
+	.container {
+		padding: 20px;
+	}
 
-.arrow-icon {
-  width: 24px;
-  height: 24px;
-}
+	.list-item {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		height: 50px;
+		border-bottom: 1px solid #eee;
+		font-size: 16px;
+	}
 
-.modal-content {
-  background-color: white;
-  padding: 30px;
-  border-radius: 8px;
-}
+	.arrow-icon {
+		width: 24px;
+		height: 24px;
+	}
 
-.modal-title {
-  text-align: center;
-  margin-bottom: 15px;
-  font-weight: bold;
-}
+	.modal-content {
+		background-color: white;
+		padding: 30px;
+		border-radius: 8px;
+	}
 
-.modal-text {
-  text-align: center;
-  margin-bottom: 25px;
-}
+	.modal-title {
+		text-align: center;
+		margin-bottom: 15px;
+		font-weight: bold;
+	}
 
-.modal-buttons {
-  display: flex;
-  justify-content: space-around;
-}
+	.modal-text {
+		text-align: center;
+		margin-bottom: 25px;
+	}
 
-.modal-button-cancel,
-.modal-button-confirm {
-  flex: 1;
-  margin-left: 10px;
-}
+	.modal-buttons {
+		display: flex;
+		justify-content: space-around;
+	}
 
-.modal-button-confirm {
-  color: blue;
-}
-</style>
+	.modal-button-cancel,
+	.modal-button-confirm {
+		flex: 1;
+		margin-left: 10px;
+	}
 
+	.modal-button-confirm {
+		color: blue;
+	}
+</style>