Browse Source

优化首页个人中心页面、修改登录布局

master
liaoxinyu 3 months ago
parent
commit
aba7279671
  1. BIN
      assets/img/home/Havelogged.png
  2. BIN
      assets/img/home/login.png
  3. 38
      pages/base/home.vue
  4. 66
      pages/login/index.vue

BIN
assets/img/home/Havelogged.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
assets/img/home/login.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

38
pages/base/home.vue

@ -1277,7 +1277,7 @@
</view>
</view>
<!-- <v-link :to="detail.status!=2?'/pages/auth/index':''" tag="div"-->
<v-link v-if="isLogin" :to="detail.status != 2 ? '/pages/auth/index' : '/pages/auth/index'" tag="div"
<v-link v-if="false" :to="detail.status != 2 ? '/pages/auth/index' : '/pages/auth/index'" tag="div"
class="bg-form-panel-3 p-xs m-xs color-theme-1 d-flex justify-between align-center">
<view class=" d-flex align-center">
<van-icon name="manager" class="fn-18" />
@ -1286,6 +1286,16 @@
<!-- <text class="bg-theme-1 color-white p-x-xs p-y-xxs rounded" v-if="detail.status!=2">{{$t('first.a0')}}</text> -->
<!-- <text class="bg-theme-1 color-white p-x-xs p-y-xxs rounded" v-else>{{$t('auth.a3')}}</text> -->
</v-link>
<v-link :to="detail.status != 2 ? '/pages/auth/index' : '/pages/auth/index'" class=" p-xs m-xs d-flex justify-between align-center" v-if="isLogin">
<view style="display: flex;">
<image src="@/assets/img/home/login.png" mode="aspectFit" class="logine"></image>
<image src="@/assets/img/home/Havelogged.png" mode="aspectFit" class="havelogg" v-if="detail.status == 2"></image>
<view style="margin-left: 26rpx;display: flex;align-items: center;">
<view class="color-light username">{{username}}</view>
</view>
</view>
<!-- <van-icon name="arrow" class="fn-18" /> -->
</v-link>
<!-- <view class="personalCenter-center border-b border-gray-5">
<view class="d-flex justify-around">
<v-link to="/pages/assets/recharge" tag="div" class="d-flex flex-col align-center">
@ -1506,6 +1516,12 @@ export default {
isLogin() {
return Boolean(uni.getStorageSync("token"))
},
//
username(){
const name = uni.getStorageSync("_user_login")
const username = name.data.user.username
return username
},
},
watch: {
isShow(n) {
@ -1978,6 +1994,26 @@ export default {
box-sizing: border-box;
}
.username{
font-size: 18px;
font-weight: bold;
margin-bottom: 3px;
}
.logine{
// background: url('@/assets/img/home/Havelogged.png');
width: 96rpx;height: 96rpx;
}
.havelogg{
position: relative;
left: -35rpx;
top: 60rpx;
height: 28rpx;
border:1px solid #000000;
background-color: #000000;
border-radius: 50%;
width: 28rpx;
}
.nav_bar {
width: 100%;
height: 50px;

66
pages/login/index.vue

@ -13,40 +13,42 @@
</view>
</template>
</v-header>
<main class="flex-fill flex-shrink">
<view class="fn-center p-t-lg p-b-md">
<main class="flex-fill flex-shrink" style="align-items: center;display: flex;">
<!-- <view class="fn-center p-t-lg p-b-md">
<img :src="logoMap.login_logo" class="h-80" />
</view>
<view class="form m-lg <strong>bg-panel</strong>-3 p-lg rounded-md box-shadow">
<view class="form-item border-b m-b-lg p-b-xs ">
<view class="label m-b-lg">{{$t('login.a0')}}</view>
<v-input class="color-light" v-model="form.account" :placeholder="$t('login.a1')"></v-input>
</view>
<view class="form-item border-b m-b-xl p-b-xs">
<view class="label m-b-lg">{{$t('login.a2')}}</view>
<v-input
class="color-light"
v-model="form.password"
type="password"
:placeholder="$t('login.a3')"
></v-input>
</view>
<view class="m-b-lg">
<v-button type="blue" block class="w-max rounded-md" key="loginbtn" @click="toLogin">{{$t('login.a4')}}</v-button>
</view>
</view>
<view class="m-x-lg m-y-md d-flex">
<v-link
tag="div"
to="/pages/safe/forget-password"
class="tips fn-sm color-sell"
>{{$t('login.a5')}}</v-link>
<view class="mlaotu fn-12">
{{$t('login.a6')}}
<v-link to="/pages/reg/index?from=login" class="color-sell d-inline-block" >{{$t('login.a7')}}</v-link>
</view> -->
<view style="width: 100%;">
<view class="form m-lg <strong>bg-panel</strong>-3 p-lg rounded-md box-shadow">
<view class="form-item border-b m-b-lg p-b-xs ">
<view class="label m-b-lg">{{$t('login.a0')}}</view>
<v-input class="color-light" v-model="form.account" :placeholder="$t('login.a1')"></v-input>
</view>
<view class="form-item border-b m-b-xl p-b-xs">
<view class="label m-b-lg">{{$t('login.a2')}}</view>
<v-input
class="color-light"
v-model="form.password"
type="password"
:placeholder="$t('login.a3')"
></v-input>
</view>
<view class="m-b-lg">
<v-button type="blue" block class="w-max rounded-md" key="loginbtn" @click="toLogin">{{$t('login.a4')}}</v-button>
</view>
</view>
<view class="m-x-lg m-y-md d-flex">
<v-link
tag="div"
to="/pages/safe/forget-password"
class="tips fn-sm color-sell"
>{{$t('login.a5')}}</v-link>
<view class="mlaotu fn-12">
{{$t('login.a6')}}
<v-link to="/pages/reg/index?from=login" class="color-sell d-inline-block" >{{$t('login.a7')}}</v-link>
</view>
</view>
</view>
</view>
</main>
<view class="m-x-lg p-x-lg">
<!-- <view class="p-y-md border-t fn-center">

Loading…
Cancel
Save