123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- <template>
- <view class="index-my">
- <custom-nav ref="ltm" :title="title" transparent="transparent" noback="noback"></custom-nav>
- <navigator class="login-reg" v-if="!logged" url="../../pages/login-reg/login-reg"></navigator>
- <view class="content tabbar">
- <view class="area info">
- <image class="bg" src="../../static/index/my/my-bg.png" mode=""></image>
- <view class="userinfo">
- <view class="headpic">
- <image v-if="logged" class="head" :src="userinfo.avatar"></image>
- <image v-else class="head" src="../../static/index/my/defaultimg.png"></image>
- <image v-if="userinfo.store" class="medal" src="../../static/index/my/medal.png"></image>
- </view>
- <view class="center">
- <view class="top">
- <text class="username">{{ logged ? userinfo.nickname : '请登录' }}</text>
- <text v-if="logged" class="level-name"><text class="cuIcon-crownfill"></text>{{ userinfo.level }}</text>
- </view>
- <view class="bot" v-if="logged">
- <text class="userid">ID:{{ userinfo.uuid || '' }}</text>
- </view>
- </view>
- <navigator class="editinfo" :url="'../../pages/person-card/person-card?id=' + userinfo.id + '&self=1'">
- <text>我的名片</text>
- <text class="cuIcon-right"></text>
- </navigator>
- </view>
- <view class="numinfo">
- <navigator url="../../pages/my-order/my-order?type=1" class="numitem">
- <text class="num">{{ userinfo.order_num1 || 0 }}</text>
- <text class="numname">待审核</text>
- </navigator>
- <navigator url="../../pages/my-order/my-order?type=2" class="numitem">
- <text class="num">{{ userinfo.order_num2 || 0 }}</text>
- <text class="numname">待审核</text>
- </navigator>
- <navigator url="../../pages/my-order/my-order?type=3" class="numitem">
- <text class="num">{{ userinfo.order_num3 || 0 }}</text>
- <text class="numname">待收货</text>
- </navigator>
- <navigator url="../../pages/my-order/my-order?type=4" class="numitem">
- <text class="num">{{ userinfo.order_num4 || 0 }}</text>
- <text class="numname">已完成</text>
- </navigator>
- </view>
- </view>
- <navigator url="../money-running/money-running" class="money">
- <view class="left">账户余额:<text class="basecolor">¥{{ money | numDot }}</text></view>
- <view class="right">详情 <text class="cuIcon-right"></text></view>
- </navigator>
- <!-- <navigator url="../../pages/proxy-updata/proxy-updata" class="card">
- <image src="../../static/index/my/user-up.png"></image>
- </navigator> -->
- <!-- <view class="area active">
- <view class="active-item" v-for="(item, index) in activeList" :url="item.url" :key="index" @tap="toActive(index)">
- <image :src="item.image"></image>
- <text>{{ item.name }}</text>
- </view>
- </view> -->
- <view class="area appfun">
- <navigator class="app-item" v-for="(item, index) in appfunList" :url="item.url" :key="index">
- <image :src="item.image"></image>
- <text class="itemname">{{ item.name }}</text>
- <text class="cuIcon-right"></text>
- <text v-if="index === 0 && messageNum" class="num">{{ messageNum }}</text>
- </navigator>
- </view>
- <!-- <view class="area systemset">
- <navigator class="app-item" url="../../pages/system-set/system-set">
- <image src="../../static/index/my/set.png"></image>
- <text class="itemname">系统设置</text>
- <text class="cuIcon-right"></text>
- </navigator> -->
- </view>
- </view>
- </view>
- </template>
- <script>
- import { _API_GetUserStatus, _API_GetUserInfo, _API_ConfireLevel } from '@/apis/user.js'
- export default {
- data() {
- return {
- title: '我的',
- activeList: [
- {
- name: '争霸赛',
- image: '../../static/index/my/zhengbasai.png'
- },
- {
- name: '线下沙龙',
- image: '../../static/index/my/shalong.png'
- },
- {
- name: '密训营',
- image: '../../static/index/my/mixun.png'
- }
- ],
- appfunList: [
- // {
- // name: '消息通知',
- // url: '../../pages/notify-msg/notify-msg',
- // image: '../../static/index/my/message.png'
- // },
- {
- name: '地址管理',
- url: '../../pages/address-manage/address-manage',
- image: '../../static/index/my/address.png'
- },
- {
- name: '安全管理',
- url: '../../pages/safe-manage/safe-manage',
- image: '../../static/index/my/safe.png'
- },
- {
- name: '我的授权',
- url: '../../pages/auth-card/auth-card',
- image: '../../static/index/my/auth.png'
- },
- {
- name: '如何使用',
- url: '../../pages/help-use/help-use',
- image: '../../static/index/my/help.png'
- }
- ]
- }
- },
- onPullDownRefresh() {
- uni.$emit('INIT')
- },
- onShow() {
- if (this.$store.getters['cart/shopcarNum']) {
- uni.setTabBarBadge({ index: 1, text: this.$store.getters['cart/shopcarNum'] + '' })
- } else {
- uni.removeTabBarBadge({ index: 1 })
- }
- },
- computed: {
- userinfo() { return this.$store.state.userinfo },
- logged() { return this.$store.state.app.token ? true : false },
- messageNum() { return this.$store.getters['message/messageNum'] },
- money() { return this.$store.state.userinfo.money }
- },
- methods: {
- toActive(index) {
- if (index === 0) {
-
- // uni.showLoading({ mask: true })
- // plus.share.getServices(list => {
- // try{
- // list.find(e => e.id === 'weixin').launchMiniProgram({ id:'gh_ccc3d7c5cbe0' })
- // uni.hideLoading()
- // }catch(e){
- // uni.toast('唤起争霸赛小程序失败,请手动打开')
- // uni.hideLoading()
- // }
- // }, e => {
- // uni.toast('获取分享服务列表失败,请手动打开小程序')
- // })
- } else {
- uni.toast('暂未开放')
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .index-my {
- @include page();
- border-top: none;
- .login-reg {
- top: 0;
- left: 0;
- right: 0;
- z-index: 2;
- position: absolute;
- background: transparent;
- bottom: $app-tabbar-height;
- }
- .content {
- .card {
- left: 50%;
- top: 410rpx;
- height: 90rpx;
- width: 690rpx;
- position: absolute;
- transform: translateX(-50%);
- image {
- width: 100%;
- height: 100%;
- }
- }
- .money {
- height: 148rpx;
- padding: 0 30rpx;
- background: #FFFFFF;
- margin-top: 10rpx;
- box-sizing: border-box;
- @include flex();
- justify-content: space-between;
- font-size: 32rpx;
- > .left {
- .basecolor {
- font-size: 54rpx;
- }
- }
- .right {
- color: #B7B7B7;
- }
- }
- .area {
- background: #FFFFFF;
- &.info {
- height: 437rpx;
- position: relative;
- .bg {
- z-index: 0;
- width: 100%;
- height: 100%;
- position: absolute;
- }
- .userinfo {
- top: 158rpx;
- width: 100%;
- display: flex;
- height: 100rpx;
- padding: 0 30rpx;
- position: absolute;
- box-sizing: border-box;
- .headpic {
- height: 100%;
- width: 100rpx;
- position: relative;
- .head {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- .medal {
- right: -10rpx;
- bottom: -20rpx;
- width: 50rpx;
- height: 60rpx;
- position: absolute;
- }
- }
- .center {
- @include flex(column);
- flex: 1;
- height: 100%;
- margin: 0 16rpx;
- .top, .bot {
- flex: 1;
- width: 100%;
- display: flex;
- align-items: center;
- .username {
- font-size: 32rpx;
- margin-right: 16rpx;
- max-width: calc(100% - 130rpx);
- }
- .userid {
- color: #666666;
- font-size: 24rpx;
- margin-right: 26rpx;
- }
- .realname-img {
- width: 34rpx;
- height: 26rpx;
- margin-right: 10rpx;
- }
- .realname-text {
- color: #666666;
- font-size: 24rpx;
- &.noreal {
- color: $app-base-color;
- }
- }
- }
- }
- .editinfo {
- @include flex();
- height: 100%;
- width: 150rpx;
- font-size: 26rpx;
- .cuIcon-right {
- margin-left: 6rpx;
- }
- }
- }
- .numinfo {
- @include flex();
- bottom: 0;
- width: 100%;
- height: 140rpx;
- position: absolute;
- box-shadow: 0px -1px 5px 0px rgba(126,126,126,0.11);
- background: linear-gradient(0deg,rgba(255,255,255,1) 0%, rgba(255,255,255,0.2) 100%);
- .numitem {
- flex: 1;
- height: 100%;
- @include flex(column);
- .num {
- font-size: 36rpx;
- color: #7B5533;
- margin-top: 12rpx 0 26rpx;
- }
- .numname {
- font-size: 26rpx;
- }
- }
- }
- }
- &.active {
- height: 180rpx;
- margin-top: 74rpx;
- display: flex;
- .active-item {
- @include flex(column);
- flex: 1;
- height: 100%;
- image {
- width: 88rpx;
- height: 88rpx;
- margin-top: 24rpx;
- }
- text {
- font-size: 26rpx;
- margin-top: 16rpx;
- }
- }
- }
- &.appfun, &.systemset {
- margin-top: 10rpx;
- background: $app-base-bg;
- navigator {
- position: relative;
- image {
- width: 38rpx;
- height: 38rpx;
- }
- .itemname {
- flex: 1;
- margin-left: 16rpx;
- }
- .num {
- @include flex();
- top: 50%;
- right: 66rpx;
- width: 30rpx;
- height: 30rpx;
- color: #FFFFFF;
- font-size: 24rpx;
- position: absolute;
- border-radius: 50%;
- background: #FF0000;
- transform: translateY(-50%);
- }
- }
- }
- }
- }
- }
- </style>
|