From 447e19fa298ae11a1c3a3fa2d2ff3a1a8dba0501 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期四, 29 八月 2024 17:15:29 +0800
Subject: [PATCH] -
---
src/pages/mine/mine.vue | 54 +++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 45 insertions(+), 9 deletions(-)
diff --git a/src/pages/mine/mine.vue b/src/pages/mine/mine.vue
index be6b8b1..c86ad67 100644
--- a/src/pages/mine/mine.vue
+++ b/src/pages/mine/mine.vue
@@ -7,32 +7,59 @@
</button>
</view>
- <fui-list>
- <fui-list-cell arrow>
+ <fui-list :topBorder='false'>
+ <fui-list-cell arrow :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']">
<view class="fui-list__item">
<text>鏄电О</text>
- <input type="nickname" class="fui-text__explain weui-input" placeholder="璇疯緭鍏ユ樀绉�" />
+ <text class="fui-text__explain">{{userInfo.nickname}}</text>
+ <!-- <input type="nickname" class="fui-text__explain weui-input" placeholder="璇疯緭鍏ユ樀绉�" /> -->
</view>
</fui-list-cell>
- <fui-list-cell arrow>
+ <fui-list-cell arrow :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']">
<view class="fui-list__item">
<text>鎵嬫満鍙�</text>
- <text class="fui-text__explain">13215465785</text>
+ <text class="fui-text__explain">{{userInfo.phone}}</text>
</view>
</fui-list-cell>
- <fui-list-cell arrow @click="goApply">
+ <fui-list-cell arrow @click="goApply" :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']">
<text>鐢宠鎺ュ崟</text>
</fui-list-cell>
</fui-list>
+ <!-- <view class="tabbtns">
+ <up-button color='#fece01' class="text-69" text="淇濆瓨" @click=''></up-button>
+ </view> -->
</view>
</template>
<script setup>
import {
- ref
+ onLoad,
+ onShow
+ } from "@dcloudio/uni-app";
+ import {
+ ref,
+ reactive,
+ getCurrentInstance,
+ toRefs
} from 'vue';
+ const {
+ $upload,
+ $api,
+ $db
+ } = getCurrentInstance().appContext.config.globalProperties
+ onLoad(() => {
+ // getUser()
+ })
+ onShow(() => {
+ getUser()
+ })
let avatarUrlImg = ref('')
let number1 = ref(0)
+ let userInfo = reactive({
+ nickname: '',
+ phone: '',
+ userWorker: false
+ })
// let src = "http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
const goApply = () => {
uni.navigateTo({
@@ -40,15 +67,24 @@
});
}
const onChooseAvatar = (e) => {
- const {avatarUrl} = e.detail
+ const {
+ avatarUrl
+ } = e.detail
avatarUrlImg.value = avatarUrl
+ }
+ const getUser = (e) => {
+ $api.getUser().then(res => {
+ userInfo.nickname = res.data.nickname
+ userInfo.phone = res.data.phone
+ $db.set('userInfo', JSON.stringify(res.data))
+ })
}
</script>
<style>
.content {
height: 300rpx;
- background: linear-gradient(to bottom, #B4DEFF, #ffffff);
+ background: linear-gradient(to bottom, #fbec99, #ffffff);
}
.avatar-wrapper {
--
Gitblit v1.9.1