123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <template>
- <view class="page">
- <view class="topBody">
- <view class="header">
- <view class="infoBg">
- <view class="left" @click="goPage('/pages/login/loginFirst')">
- <image class="img" mode="widthFix" :src="myinfo.avator"></image>
- </view>
- <view class="right" @click="goPage('/pages/login/loginFirst')">
- <view class="nickname">
- <text>{{myinfo.nickname}}</text>
- <image src="../../static/me/icon_vip.png" mode="widthFix" />
- <view class="siming">已实名</view>
- </view>
- <view class="join_date">
- {{myinfo.join_name}}
- <image src="../../static/me/arrow_right.png" mode="widthFix" />
- </view>
- </view>
- <view class="dashang" @click="chkSel">
- <view class="sel" v-if="sel == 1">
- <view class="name">关闭<br />打赏</view>
- <view class="block"></view>
- </view>
- <view class="selno" v-else>
- <view class="blockGray"></view>
- <view class="name">开启<br />打赏</view>
- </view>
- </view>
- </view>
- </view>
- <view class="myinfo">
- <view class="line"></view>
- <view class="numlist">
- <view class="item">
- <view class="num">
- <text style="color:#FF2A95;">{{myinfo.num_gmd}}</text>
- <view class="name">我的糖果</view>
- </view>
- </view>
- <view class="item">
- <view class="num">
- <text>{{myinfo.num_gmb}}</text>
- <view class="name">我的M币</view>
- </view>
- </view>
- <view class="item">
- <view class="num" @click="goPage('/pages/w3/ucenter')">
- <image src="../../static/me/web3.0.png" mode="widthFix" />
- <view class="name">WEB3.0</view>
- </view>
- </view>
- </view>
- <view class="numlist2" style="margin-top: 60rpx;">
- <view class="item" @click="goPage('/pages/my/idcheck')">
- <view class="num">
- <image class="icon" src="../../static/me/icon_list.png" mode="widthFix" />
- <view class="name">身份认证</view>
- </view>
- </view>
- <view class="item" v-for="(item,index) in 0">
- <view class="num">
- <image class="icon" src="../../static/me/icon_list.png" mode="widthFix" />
- <view class="name">基本资料</view>
- </view>
- </view>
- </view>
- </view>
- <view class="btn_submit" @click="onLogout()">退出登录</view>
- <view class="blankHeight"></view>
- <view class="blankHeight"></view>
- </view>
- <!-- 提示框 -->
- <DialogBox ref="DialogBox"></DialogBox>
- </view>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- title: '',
- sel: 1,
- myinfo: {
- nickname: '王思思',
- join_name: '注册日期:2024年5月',
- num_1: 0,
- num_2: 0,
- num_3: 0,
- num_4: 0,
- is_login: 'no',
- num_history: 0,
- num_collection: 0
- },
- }
- },
- onLoad() {
- setTimeout(function() {
- uni.setNavigationBarColor({
- frontColor: '#ffffff',
- backgroundColor: '#00000000',
- animation: {
- duration: 400,
- timingFunc: 'easeIn'
- }
- })
- }, 200);
- },
- onShow() {
- this.loadData();
- },
- methods: {
- onBack() {},
- chkSel() {
- if (this.sel == 1) {
- this.sel = 0;
- } else {
- this.sel = 1;
- }
- },
- goPage(page) {
- uni.navigateTo({
- url: page,
- })
- },
- loadData() {
- console.log({
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- });
- uni.request({
- url: this.$apiHost + '/Web/getinfo',
- data: {
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- },
- header: {
- "content-type": "application/json", //自定义请求头信息
- },
- success: (res) => {
- console.log("----:", res.data);
- this.myinfo = res.data;
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- },
- onLogout() {
- let that = this;
- this.$refs['DialogBox'].confirm({
- title: '提示',
- content: '确定退出吗?',
- DialogType: 'inquiry',
- btn1: '取消',
- btn2: '退出',
- animation: 0
- }).then((res) => {
- uni.request({
- url: that.$apiHost + '/My/logout',
- data: {
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- },
- header: {
- "content-type": "application/json", //自定义请求头信息
- },
- success: (res) => {
- console.log("----:", res.data);
- getApp().globalData.skey = "";
- getApp().globalData.uuid = "";
- uni.removeStorageSync("wapptoken");
- uni.redirectTo({
- url: '/pages/login/login'
- })
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- })
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import 'my.scss';
- </style>
|