| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <template>
- <view class="page" >
- <view class="backImage">
- <image class="backImage" src="/static/me/u655.png"></image>
- </view>
- <view class="content">
- <view class="userInfo flex-row justify-between ">
- <view class="flex-row">
- <view class="userPhoto" @click="navigateToPage('/myPages/userInfo/index')">
- <image class="userPhoto" :src="userInfo.selfPhotoUrl || '/static/me/u4.png'"></image>
- </view>
- <view class="userTitle flex-col justify-center" @click="navigateToPage('/myPages/userInfo/index')">
- <text class="nickName">HI,亲爱的{{ userInfo.ncikName }}</text>
- <view class="flex-row">
- <text class="xinxTitle">点击完善个人信息</text>
- <u-icon name="arrow-right" color="#333333" size="16"></u-icon>
- </view>
- </view>
- </view>
- <view class="qrcodeView flex-col justify-center" @click="navigateToPage('/pages/qrCode/index')">
- <image class="qrcode" src="/static/me/u5.png"></image>
- <text class="qrcodeTitle">会员码</text>
- </view>
- </view>
- <view class="sudoku flex-col">
- <view class="balance-name">
- <text>我的资产</text>
- </view>
- <view class="balance flex-row justify-around">
- <view class="balanceItem" @click="navigateToPage('/myPages/recharge/index')">
- <view class="icon flex-row justify-center">
- <u-icon name="/static/me/u701.png" color="red" size="30"></u-icon>
- </view>
- <view class="name">
- 余额
- </view>
- <view class="num">
- <text>¥{{userInfo.balance || 0}}</text>
- </view>
- </view>
- <view class="balanceItem">
- <view class="icon flex-row justify-center">
- <u-icon name="/static/me/u680.png" color="red" size="30"></u-icon>
- </view>
- <view class="name">
- 积分
- </view>
- <view class="num">
- <text>{{userInfo.integral|| 0}}</text>
- </view>
- </view>
- <view class="balanceItem" @click="navigateToPage('/orderPages/myCoupon/index')">
- <view class="icon flex-row justify-center">
- <u-icon name="/static/me/u687.png" color="red" size="30"></u-icon>
- </view>
- <view class="name">
- 优惠券
- </view>
- <view class="num">
- <text>{{userInfo.coupon || 0}}</text>
- </view>
- </view>
- <view class="balanceItem" @click="navigateToPage('/storePages/myRights/index')">
- <view class="icon flex-row justify-center">
- <u-icon name="/static/me/u694.png" color="red" size="30"></u-icon>
- </view>
- <view class="name">
- 我的权益卡
- </view>
- <view class="num">
- <text>{{userInfo.equityCardTotal || 0}}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="group">
- <uni-list>
- <uni-list-item :to="item.to" :title="item.title" showArrow :thumb="item.thumb" thumb-size="sm" :rightText="item.rightText" v-for="(item,index) in group1" :key="index" />
- </uni-list>
- </view>
- <!-- <view class="group">-->
- <!-- <uni-list>-->
- <!-- <uni-list-item :to="item.to" :title="item.title" showArrow :thumb="item.thumb" thumb-size="sm" v-for="(item,index) in group2" :key="index" />-->
- <!-- </uni-list>-->
- <!-- </view>-->
- <view class="tabBarLineHeight"></view>
- </view>
- <view class="tabBarView">
- <tab-bar :tabIndex="tabIndex"></tab-bar>
- </view>
- </view>
- </template>
- <script >
- import tabBar from "../../components/tabBar/tabBar";
- export default {
- components: {
- tabBar
- },
- data() {
- return {
- group1:[
- // {thumb:'/static/me/u1796.png',title:'贡献奖励记录',rightText:'',to:''},
- // {thumb:'/static/me/u1803.png',title:'实名认证',rightText:'',to:'/myPages/realNameAuth/index'},
- {thumb:'/static/me/u1812.png',title:'服务对象管理',rightText:'',to:'/myPages/ServiceObjectManagement/index'},
- {thumb:'/static/me/u3.png',title:'我的推广',rightText:'',to:'/myPages/promotionCenter/index'},
- // {thumb:'/static/me/u1833.png',title:'新老系统切换',rightText:'',to:'/myPages/systemSwitch/index'},
- {thumb:'/static/me/u826.png',title:'储值服务',rightText:'',to:'/myPages/recharge/index'},
- {thumb:'/static/me/u701.png',title:'交易记录',rightText:'',to:'/myPages/transactionRecord/index'},
- {thumb:'/static/me/关于我们.png',title:'关于我们',rightText:'',to:'/myPages/aboutOur/index'}
- ],
- group2:[
- // {thumb:'/static/me/u10.png',title:'个人信息',rightText:'',to:'/myPages/userInfo/index'},
- // {thumb:'/static/me/u101.png',title:'设置',rightText:'',to:'/myPages/setting/index'}
- ],
- height:'',
- title: 'Hello',
- tabIndex: 4,
- userInfo: {}
- }
- },
- // 分享到朋友圈
- onShareTimeline() { },
- // 分享到用户
- onShareAppMessage(OBJECT) { },
- onLoad() {
- uni.hideTabBar({
- animation:false
- })
- let sysInfo = uni.getSystemInfoSync()
- this.height = sysInfo.screenHeight +'px'
- },
- onShow(){
- this.userInfo = uni.getStorageSync('userInfo')
- if (this.userInfo.isAttestation){
- this.group1[0].rightText = '已认证'
- }else {
- this.group1[0].rightText = '未实名认证,去认证'
- }
- this.getUserInfo()
- },
- methods: {
- getUserInfo(){
- this.$api.getUserInfo().then(res=>{
- console.log('++++++++++++获取用户信息++++++++++++++++++',res)
- uni.setStorageSync('userInfo',res.data.data)
- this.userInfo = res.data.data
- this.getImgUrlByOssId(this.userInfo.selfPhoto)
- })
- },
- getImgUrlByOssId(Id){
- if (Id) {
- this.$api.getImage(Id).then(res=>{
- this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
- this.$set(this.userInfo)
- });
- }
- },
- navigateToPage(url){
- uni.navigateTo({
- url:url
- })
- },
- }
- }
- </script>
- <style>
- @import '/common/css/common.css';
- @import './index.rpx.css';
- </style>
|