123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413 |
- <template>
- <view class="mine-page">
- <!-- 头部 -->
- <headContent borderBottom>
- <template #left>
- <reverse-back />
- </template>
- <template #content>
- <view class="haed-title">
- 个人中心
- </view>
- </template>
- <template #right>
- <page-style />
- </template>
- </headContent>
- <!-- 个人信息 -->
- <view class="mine-info" v-if="showMuen">
- <view class="mine-account">{{ userInfo.account_number }}</view>
- <view class="mine-UID">UID: {{ userInfo.id }}<text v-show="userInfo.id" class="mine-copy iconfont"
- @click.stop="setCopy(userInfo.id)"></text>
- </view>
- </view>
- <!-- 个人信息 -->
- <view class="mine-info" v-else @click.stop="goLogin()">
- <view class="mine-account">点击登录/注册</view>
- <view class="mine-UID">Hi, 欢迎来到BiKing</view>
- </view>
- <gap />
- <!-- 个人信息 -->
- <view class="mine-muen">
- <view v-show="showMuen" class="mine-muen-item" @click.stop="openSafetySet()">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <!--
- <text class="muen-icon iconfont"></text> -->
- <text class="muen-text">安全设置</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- <!-- <image class="muen-more-icon" src="../../static/logo.png" mode="aspectFit" /> -->
- </view>
- </view>
- <view v-show="showMuen" class="mine-muen-item">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">身份验证</text>
- </view>
- <view class="muen-more">
- <text class="muen-more-text">{{ userInfo.is_realname == 1 ? '去认证' : '' }}</text>
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- <view v-show="showMuen" class="mine-muen-item" @click.stop="getAddress()">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">提现地址</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- <view v-show="showMuen" class="mine-muen-item">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">我的红包</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- <view v-show="showMuen" class="mine-muen-item" @click.stop="openActivityCenter()">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">活动中心</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- <view class="mine-muen-item" @click.stop="openShare()">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">邀请链接</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- <view v-show="showMuen" class="mine-muen-item">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">合约战绩</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- </view>
- <gap />
- <view class="mine-muen">
- <view class="mine-muen-item" @click.stop="openSetting()">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">系统设置</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- </view>
- <gap />
- <view class="mine-muen">
- <view class="mine-muen-item">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">检查更新</text>
- </view>
- <view class="muen-more">
- <text class="muen-more-text">当前版本 V2.4.6 62</text>
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- </view>
- <gap />
- <view class="mine-muen">
- <view class="mine-muen-item" @click.stop="getService()">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">在线客服</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- <view class="mine-muen-item" @click.stop="getAboutUs()">
- <view class="muen-content">
- <text class="muen-icon iconfont"></text>
- <text class="muen-text">关于我们</text>
- </view>
- <view class="muen-more">
- <text class="more-icon iconfont"></text>
- </view>
- </view>
- <view class="mine-btn" @click.stop="retreatFromLogin" v-show="showMuen">
- 安全退出
- </view>
- </view>
- <!-- 邀请 -->
- <sharePage ref="sharePageRef" :tabBar="false" />
- <!-- 确认退出 -->
- <confirm-popup ref="confirmPopup" @confirm="confirmOut" content="确认退出此账号"/>
- </view>
- </template>
- <script>
- import {
- mapGetters
- } from 'vuex'
- import reverseBack from "@/components/headModules/reverse-back.vue"
- import pageStyle from "@/components/headModules/style.vue"
- import {
- Way_getUserInfo
- } from "@/utils/common-request.js"
- import {
- refreshAccount
- } from "@/utils/common.js"
- export default {
- components: {
- pageStyle,
- reverseBack
- },
- data() {
- return {
- showMuen: false,
- userInfo: {}
- };
- },
- onShow() {
- },
- computed: {
- ...mapGetters([
- 'token'
- ]),
- },
- watch: {
- token: {
- handler(newToken) {
- this.showMuen = newToken ? true : false
- if (newToken) {
- this.getUserInfo()
- }
- },
- immediate: true
- }
- },
- methods: {
- // 获取用户信息
- getUserInfo() {
- Way_getUserInfo().then(res => {
- this.userInfo = res
- }).catch(err => {
- this.userInfo = {}
- })
- },
- // 去登陆
- goLogin() {
- uni.navigateTo({
- url: '/pages/login/index'
- });
- },
- // 打开邀请
- openShare() {
- this.$nextTick(() => {
- this.$refs.sharePageRef.openShare()
- })
- },
- // 系统设置
- openSetting() {
- uni.navigateTo({
- url: '/pages/content/setting'
- })
- },
- // 安全设置
- openSafetySet() {
- uni.navigateTo({
- url: '/pages/content/safety-set'
- })
- },
- // 在线客服
- getService() {
- uni.navigateTo({
- url: '/pages/content/customer-service'
- })
- },
- // 关于我们
- getAboutUs() {
- this.getSinglePage(1)
- },
- // 安全退出
- retreatFromLogin() {
- this.$nextTick(() => {
- this.$refs.confirmPopup.open()
- });
- },
- // 确认 安全退出
- confirmOut() {
- refreshAccount()
- },
- // 获取地址列表
- getAddress() {
- uni.navigateTo({
- url: '/pages/content/address'
- })
- },
- // getAboutUs
- openActivityCenter() {
- this.getSinglePage(2)
- },
- getSinglePage(id) {
- uni.navigateTo({
- url: `/pages/content/h5-list?id=${id}`
- })
- },
- setCopy(val) {
- uni.setClipboardData({
- data: val,
- success: function() {
- uni.showToast({
- title: '复制成功',
- icon: 'none'
- })
- }
- });
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #fff;
- }
- </style>
- <style lang="scss" scoped>
- .mine-info {
- width: 100%;
- min-height: 140rpx;
- background-color: $modules-box-bg;
- padding: 23rpx $pages-padding 30rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .mine-account {
- font-size: 34rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #1a1a1a;
- }
- .mine-UID {
- margin-top: 13rpx;
- font-size: 22rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #808080;
- display: flex;
- align-items: center;
- .copy-UID {
- width: 22rpx;
- height: 26rpx;
- margin-left: 12rpx;
- }
- .mine-copy {
- margin-left: 10rpx;
- font-size: 30rpx;
- }
- }
- }
- // <view class="mine-muen">
- // <view class="muen-content">
- // <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" /> <text class="muen-text">安全设置</text>
- // </view>
- // <image class="muen-moey" src="../../static/logo.png" mode="aspectFit" />
- // </view>
- .mine-muen-item {
- width: 100%;
- height: 94rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background-color: $modules-box-bg;
- padding: 0 $pages-padding;
- border-bottom: 1rpx solid #f2f2f2;
- &:last-child {
- border-bottom: none;
- }
- .muen-content {
- display: flex;
- align-items: center;
- .muen-icon {
- width: 50rpx;
- // height: 28rpx;
- font-size: 32rpx;
- }
- .muen-text {
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #1a1a1a;
- line-height: 40rpx;
- }
- }
- .muen-more {
- flex-shrink: 0;
- display: flex;
- align-items: center;
- .muen-more-text {
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #0abd76;
- padding-right: 8rpx;
- }
- .more-icon {
- font-size: 30rpx;
- color: #939292;
- transform: rotate(-180deg);
- }
- }
- }
- .mine-btn {
- width: 690rpx;
- height: 90rpx;
- margin: 80rpx auto;
- background: #05c175;
- border-radius: 8rpx;
- font-size: 30rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- text-align: center;
- color: #ffffff;
- line-height: 90rpx;
- letter-spacing: 0.64rpx;
- }
- </style>
|