| | |
| | | </view> |
| | | <view class="header" @click="userDetail"> |
| | | <view class="head-1"> |
| | | <image :src="userInfo.face || userImage"></image> |
| | | <image v-if="userInfo.face" :src="endpoint + '/' + userInfo.face"></image> |
| | | <image v-else :src="userImage"></image> |
| | | </view> |
| | | <view class="head-2" v-if="userInfo.id"> |
| | | <view class="user-name">{{ userInfo.nickName }}</view> |
| | |
| | | </view> |
| | | </view> |
| | | </div> |
| | | |
| | | <!-- 视频相关, --> |
| | | <div class="pointBox box" style="margin-top: 20rpx;"> |
| | | <view class="order"> |
| | | <view class="order-item" @click="jumpToVideoHome()"> |
| | | <view> |
| | | <text class="iconfont"></text> |
| | | </view> |
| | | <view>视频主页</view> |
| | | </view> |
| | | <view class="order-item" @click="navigateTo('/pages/mine/myAttention')"> |
| | | <view> |
| | | <text class="iconfont"></text> |
| | | </view> |
| | | <view>关注列表</view> |
| | | </view> |
| | | <view class="order-item" @click="navigateTo('/pages/mine/myCollect/myCollect')"> |
| | | <view> |
| | | <text class="iconfont"></text> |
| | | </view> |
| | | <view>收藏列表</view> |
| | | </view> |
| | | <view class="order-item" @click="navigateTo('/pages/mine/activity/myActivity')"> |
| | | <view> |
| | | <text class="iconfont"></text> |
| | | </view> |
| | | <view>我的活动</view> |
| | | </view> |
| | | <view class="order-item" @click="navigateTo('/pages/mine/myTracks')"> |
| | | <view> |
| | | <text class="iconfont"></text> |
| | | </view> |
| | | <view>浏览记录</view> |
| | | </view> |
| | | </view> |
| | | </div> |
| | | |
| | | <!-- 常用工具 --> |
| | | |
| | | <tool /> |
| | | <view class="pointBox box" style="margin-top: 20rpx;"> |
| | | <tool /> |
| | | </view> |
| | | |
| | | |
| | | <custom-tabbar bgColor="#ffffff" selected="my"></custom-tabbar> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import UIcon from '@/uview-components/uview-ui/components/u-icon/u-icon.vue'; |
| | | import URow from '@/uview-components/uview-ui/components/u-row/u-row.vue'; |
| | | import UCol from '@/uview-components/uview-ui/components/u-col/u-col.vue'; |
| | | import '@/components/uview-components/uview-ui'; |
| | | import tool from "@/pages/tabbar/user/utils/tool.vue"; |
| | | import { getSTSToken } from "@/api/common.js"; |
| | | import { getCouponsNum, getFootprintNum } from "@/api/members.js"; |
| | | import { getUserWallet } from "@/api/members"; |
| | | import configs from '@/config/config' |
| | | import storage from '@/utils/storage.js' |
| | | export default { |
| | | components: { |
| | | tool,UIcon,URow,UCol |
| | | tool |
| | | }, |
| | | data() { |
| | | return { |
| | | endpoint: '', |
| | | configs, |
| | | userImage:configs.defaultUserPhoto, |
| | | coverTransform: "translateY(0px)", |
| | |
| | | walletNum: "", |
| | | }; |
| | | }, |
| | | onLoad() { }, |
| | | onLoad() { |
| | | this.initCOS() |
| | | }, |
| | | onShow() { |
| | | this.userInfo = this.$options.filters.isLogin() || {}; |
| | | if (this.$options.filters.isLogin("auth")) { |
| | |
| | | |
| | | mounted() { }, |
| | | methods: { |
| | | // 初始化腾讯云cos客户端 |
| | | initCOS() { |
| | | // 调用后端获取sts临时访问凭证 |
| | | getSTSToken().then(res => { |
| | | this.endpoint = res.data.data.endpoint |
| | | }) |
| | | }, |
| | | // 跳转视频主页 |
| | | jumpToVideoHome() { |
| | | uni.navigateTo({ |
| | | url: '/pages/video/home-page?authorId=' + storage.getUserInfo().id |
| | | }); |
| | | }, |
| | | /** |
| | | * 统一跳转接口,拦截未登录路由 |
| | | * navigator标签现在默认没有转场动画,所以用view |
| | |
| | | .header { |
| | | max-width: 100%; |
| | | padding: calc(50rpx + var(--status-bar-height)) 30rpx 0 6%; |
| | | height: calc(var(--status-bar-height) + 360rpx); |
| | | height: calc(360rpx); |
| | | background-size: cover; |
| | | border-bottom-left-radius: 30rpx; |
| | | border-bottom-right-radius: 30rpx; |