完善定位功能
This commit is contained in:
@ -5,14 +5,30 @@
|
||||
<view class="u-text-center text-fff lg" :style="{paddingTop: statusBar + 'px'}">我的</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="u-p-t-60 px32 row-between" @click="toProfile">
|
||||
<view class="row u-col-top text-fff">
|
||||
<view>
|
||||
<u-avatar :src="cloudPath + 'img/icon_avatar.png'" mode="square" size="112"></u-avatar>
|
||||
<view class="u-p-t-60 px32 row-between">
|
||||
<view class="text-fff">
|
||||
<view v-if="isLogin">
|
||||
<navigator class="row u-col-top" url="/pages/my/profile" hover-class="none">
|
||||
<view>
|
||||
<u-avatar :src="userInfo.avatar ? userInfo.avatar : cloudPath + 'img/icon_avatar_empty2.png'" size="112"></u-avatar>
|
||||
</view>
|
||||
<view class="u-m-l-32 nr u-m-10">
|
||||
<view>{{ userInfo.nickname }}</view>
|
||||
<view class="u-m-t-16">{{userInfo.mobile || userInfo.sn}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="u-m-l-32 nr u-m-10">
|
||||
<view>用户昵称</view>
|
||||
<view class="u-m-t-16">18749957626</view>
|
||||
|
||||
<view v-if="!isLogin">
|
||||
<navigator class="row u-col-top" url="/pages/login/login" hover-class="none">
|
||||
<view>
|
||||
<u-avatar :src="cloudPath + 'img/icon_avatar_empty2.png'" size="112"></u-avatar>
|
||||
</view>
|
||||
<view class="u-m-l-32 nr u-m-10">
|
||||
<view>点击登录</view>
|
||||
<view class="u-m-t-16">登录体验更多功能</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
@ -64,7 +80,7 @@
|
||||
<u-image :src="cloudPath + 'img/icon_my_coupon.png'" width="64" height="64"></u-image>
|
||||
<view class="grid-text mt10">我的优惠券</view>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<u-grid-item @tap="toSetting">
|
||||
<u-image :src="cloudPath + 'img/icon_my_setting.png'" width="64" height="64"></u-image>
|
||||
<view class="grid-text mt10">设置</view>
|
||||
</u-grid-item>
|
||||
@ -85,6 +101,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapActions } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -92,7 +110,8 @@
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
console.log(uni.getSystemInfoSync())
|
||||
console.log(this.isLogin)
|
||||
console.log(this.userInfo)
|
||||
},
|
||||
|
||||
methods: {
|
||||
@ -108,9 +127,17 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/wallet'
|
||||
})
|
||||
},
|
||||
|
||||
// 去设置页
|
||||
toSetting() {
|
||||
uni.navigateTo({
|
||||
url: '/bundle/pages/setting/setting'
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['cartNum', 'userInfo', 'inviteCode', 'appConfig']),
|
||||
statusBar() {
|
||||
return uni.getSystemInfoSync().statusBarHeight + 10
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user