phone.vue 1.5 KB
<template>
  <u-navbar title="我的手机号" :autoBack="true" bgColor="#0cb9d3" placeholder safeAreaInsetTop :titleStyle="{ color: '#fff' }" leftIconColor="#fff"></u-navbar>
  <view class="phone">
    <image src="/static/images/mphone.png" class="phone-phone flexC" mode="aspectFill" />
    <view class="flexC ti">你可以用该手机号直接登录****短信通知</view>
    <view class="flexC bl">已绑定手机号</view>
    <view class="flexC nu">{{ UserInfo.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') }}</view>
    <up-button color="#E4F8F9" shape="circle" icon="更换手机号" iconColor="#05B8D2" throttleTime="1500" @click="proxy.$h.jumpUrl(`/pages2/mineinfo/editphone?type=editphone`)" :customStyle="{ fontSize: '16px' }"></up-button>
  </view>
</template>

<script setup lang="ts">
import { ref, getCurrentInstance, ComponentPublicInstance } from 'vue'

const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }

const UserInfo = uni.getStorageSync('UserInfo')
</script>

<style lang="scss" scoped>
:deep(.u-icon__icon) {
  font-size: 32rpx !important;
}
.phone {
  box-sizing: border-box;
  padding: 102rpx 64rpx 0;
  &-phone {
    width: 260rpx;
    height: 262rpx;
    margin: 0 auto 28rpx;
  }
  .ti {
    color: #666666;
    font-size: 26rpx;
    margin-bottom: 58rpx;
  }
  .bl {
    color: #333333;
    font-size: 30rpx;
    margin-bottom: 20rpx;
  }
  .nu {
    color: #333333;
    font-size: 52rpx;
    margin-bottom: 104rpx;
  }
}
</style>