| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- <template>
- <view class="container">
- <!-- 顶部用户信息区域 -->
- <view class="header">
- <img src="../../static/my/headerImg.png" />
- <!-- 页面标题 -->
- <view class="title">我的</view>
- <!-- 头像区域 -->
- <img class="img" src="../../static/my/portrait.png" />
- <!-- 姓名区域 -->
- <view class="name" v-if="flag">张三</view>
- <!-- 用户id区域 -->
- <view class="number" v-if="flag">ID:1925689</view>
- <!-- 是否实名认证区域 -->
- <view class="real" v-if="real">
- <img src="../../static/my/true.png" />
- 已实名认证
- </view>
- <view class="real2" v-if="flag" v-else @click="goPageCommon">
- 去认证
- <img src="../../static/my/right2.png" />
- </view>
- <view class="login" v-if="!flag" @click="goPageLogin">去登录</view>
- </view>
- <!-- 内容区域 -->
- <view class="body">
- <!-- 订单管理区域 -->
- <view class="body_item" @click="goPageOrder">
- <img class="img" src="../../static/my/order.png" />
- 订单管理
- </view>
- <!-- 常用旅客区域 -->
- <view class="body_item" @click="goPageCommon">
- <img class="img2" src="../../static/my/people.png" />
- 常用旅客
- </view>
- <!-- 设置区域 -->
- <view class="body_item" @click="goPageSet">
- <img class="img3" src="../../static/my/set.png" />
- 设置
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // 是否实名认证
- real: false,
- // 是否登录标识
- flag: false
- }
- },
- onLoad() {
- this.flag = false
- },
- onShow() {
- // console.log(121)
- },
- methods: {
- // 去登录文字回调
- goPageLogin() {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- },
- // 点击订单管理按钮回调
- goPageOrder() {
- if (this.isLogin()) {
- uni.navigateTo({
- url: '/pages/orderManage/orderManage'
- })
- }
- },
- // 点击常用旅客按钮回调
- goPageCommon() {
- if (this.isLogin()) {
- uni.navigateTo({
- url: '/pages/common/common'
- })
- }
- },
- // 点击设置按钮回调
- goPageSet() {
- if (this.isLogin()) {
- uni.navigateTo({
- url: '/pages/set/set'
- })
- }
- },
- isLogin() {
- if (this.flag) {
- return true
- } else {
- uni.showToast({
- title: '请先登录',
- icon: 'none',
- mask: true
- })
- setTimeout(() => {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }, 1500)
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- position: relative;
- min-height: 100vh;
- background-color: #ebeced;
- .header {
- position: relative;
- height: 480rpx;
- color: #fff;
- overflow: hidden;
- img {
- width: 100%;
- }
- .title {
- position: absolute;
- top: 65rpx;
- left: 342rpx;
- font-size: 28rpx;
- color: #fff;
- }
- .img {
- position: absolute;
- top: 190rpx;
- left: 32rpx;
- width: 140rpx;
- height: 140rpx;
- }
- .name {
- position: absolute;
- top: 178rpx;
- left: 202rpx;
- font-size: 40rpx;
- font-weight: bold;
- }
- .number {
- position: absolute;
- top: 240rpx;
- left: 202rpx;
- font-size: 24rpx;
- opacity: 0.5;
- }
- .real {
- position: absolute;
- top: 285rpx;
- left: 202rpx;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding-left: 13rpx;
- width: 179rpx;
- height: 42rpx;
- font-size: 24rpx;
- border-radius: 113rpx;
- background-color: rgba(255, 255, 255, 0.2);
- img {
- margin-right: 7rpx;
- width: 24rpx;
- height: 24rpx;
- }
- }
- .real2 {
- position: absolute;
- top: 285rpx;
- left: 202rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- box-sizing: border-box;
- padding-left: 13rpx;
- width: 179rpx;
- height: 42rpx;
- font-size: 24rpx;
- border-radius: 113rpx;
- background-color: rgba(255, 255, 255, 0.2);
- img {
- margin-left: 12rpx;
- width: 24rpx;
- height: 24rpx;
- }
- }
- .login {
- position: absolute;
- top: 235rpx;
- left: 202rpx;
- font-size: 40rpx;
- font-weight: bold;
- }
- }
- .body {
- position: absolute;
- top: 360rpx;
- box-sizing: border-box;
- padding: 0 30rpx;
- width: 100%;
- height: calc(100vh - 360rpx);
- border-radius: 20rpx 20rpx 0 0;
- background-color: #fff;
- .body_item {
- display: flex;
- align-items: center;
- height: 121rpx;
- font-size: 28rpx;
- border-bottom: 1rpx solid #e6e6e6;
- .img {
- margin-right: 17rpx;
- width: 53rpx;
- height: 53rpx;
- }
- .img2 {
- margin-right: 22rpx;
- width: 42rpx;
- height: 42rpx;
- }
- .img3 {
- margin-right: 18rpx;
- width: 50rpx;
- height: 50rpx;
- }
- }
- }
- }
- </style>
|