| | |
| | | <fui-list-cell arrow> |
| | | <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> |
| | | <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"> |
| | | <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({ |
| | |
| | | }); |
| | | } |
| | | 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,#fbec99, #ffffff); |
| | | background: linear-gradient(to bottom, #fbec99, #ffffff); |
| | | } |
| | | |
| | | .avatar-wrapper { |