123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <template>
- <view>
- <view style="background:url(/static/my/bg.png) no-repeat;background-size: 100%;padding-bottom: 150rpx;">
- <view style="text-align: center;padding-top: 100rpx;font-size: 30rpx;line-height: 150%;">
- <image src="/static/tx1.png" style="width: 150rpx;height:150rpx;"></image>
- <view style="color: #fff;">{{ userinfo.xm }}</view>
- <view style="color: #c2c7ad;">ID号:{{ userinfo.sjh }}</view>
- </view>
- </view>
- <view class="tab">
- <view class="t">
- <view class="tit" @click="topage('/pages/integer/integer')">
- <view>{{ userinfo ? userinfo.jifen : 0 }}</view>
- <view>积分</view>
- </view>
- <view class="tit" @click="topage('/pages/integer/tjsymx')">
- <view>{{userinfo?userinfo.tuijian:0}}</view>
- <view>推荐收益</view>
- </view>
- <view class="tit" @click="topage('/pages/ppb/index')">
- <view>{{userinfo.lzc}}</view>
- <view style="font-family: Arial, Helvetica, sans-serif;">拍拍宝</view>
- </view>
- </view>
- <view class="t">
- <view class="tit" @click="topage('/pages/integer/symx')">
- <view>{{userinfo?userinfo.shouyi:0}}</view>
- <view>收益</view>
- </view>
- <view class="tit" @click="topage('/pages/integer/credit1?lx=lp')">
- <view>{{ userinfo ? userinfo.lepiao : 0 }}</view>
- <view>乐票</view>
- </view>
- <view class="tit" @click="topage('/pages/zichan/index')">
- <view>{{userinfo?userinfo.zc:0}}</view>
- <view>资产</view>
- </view>
- </view>
- <view class="t">
- <view class="tit" @click="topage('/pages/yuyue/index')">
- <view>{{userinfo?userinfo.qg:0}}</view>
- <view>抢购记录</view>
- </view>
- <view class="tit" @click="topage('/pages/zhuanrang/index')">
- <view>{{userinfo?userinfo.zr:0}}</view>
- <view>转让记录</view>
- </view>
- <view class="tit" @click="topage('/pages/integer/credit1')">
- <view>{{userinfo?userinfo.yy:0}}</view>
- <view>预约记录</view>
- </view>
- </view>
- </view>
- <view style="width: calc(100% - 100rpx);margin: auto;margin-top: 20rpx;display: table;">
- <image src="/static/my/a.png" style="width:350rpx;height: 210rpx;float: left;" @click="onClick_1"></image>
- <view style="float: right;width:calc(100% - 370rpx);float: right;">
- <image src="/static/my/b.png" style="width:100%;height: 100rpx;" @click="onRenzheng"></image>
- <image src="/static/my/c.png" style="width:100%;height: 100rpx;margin-top:4rpx;" @click="onPayaccount"></image>
- </view>
- </view>
- <view class="f">
- <view class="d" @click="shequ">
- <view><image src="/static/my/cc.png"></view>
- <view>我的社区</view>
- <view><image src="/static/my/aa.png"></view>
- </view>
- <view class="d" @click="fuxiao">
- <view><image src="/static/my/fx.png"></view>
- <view>我的复销</view>
- <view><image src="/static/my/aa.png"></view>
- </view>
- <view class="d" @click="updateaccount">
- <view><image src="/static/my/bb.png"></view>
- <view>安全中心</view>
- <view><image src="/static/my/aa.png"></view>
- </view>
- <view class="d" @click="exit">
- <view><image src="/static/my/dd.png"></view>
- <view>退出登录</view>
- <view><image src="/static/my/aa.png"></view>
- </view>
- </view>
- <view style="text-align: center;font-size: 28rpx;line-height: 300%;color: #c2c7ad;">版本号:{{bbh}}</view>
- <uni-popup ref="popup" type="center" isMaskClick="false">
- <view style="width:90%;margin: auto;">
- <view style="border-radius:30rpx 30rpx 0 0;background: #fff;border-bottom: #ddd solid 1rpx;text-align: center;line-height: 300%;">玩家守则</view>
- <view style="background:#f9f9f9;padding:30rpx;font-size:28rpx;line-height: 200%;height:600rpx;overflow-y: scroll;"><rich-text :nodes="wjsz"></rich-text></view>
- <view style="border-radius:0 0 30rpx 30rpx;background: #93a234;color: #fff;text-align: center;line-height: 300%;" @click="$refs.popup.close()">
- 我知道了
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- constants: {},
- userinfo: null,
- data: {
- _token: "",
- uid: 0,
- },
- bbh:'0',
- wjsz:''
- };
- },
- onLoad() {
- plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
- this.bbh=wgtinfo.version
- })
- },
- onShow() {
- var user = this.$api.getUserinfo();
- if (user) {
- this.userinfo = user;
- this.data.id = user.id;
- this.getMhUserinfo();
- } else {
- this.userinfo = null;
- uni.showToast({
- title:"请先登录",
- icon:"none"
- })
- setTimeout(function(){
- uni.navigateTo({
- url:"/pages/lanhu_login/index"
- })
- },1000)
- }
- },
- methods: {
- topage(page) {
- uni.navigateTo({
- url: page
- })
- },
- getMhUserinfo() {
- var data = new Object();
- data.uid = this.data.id;
- //data.uid = 1000025;
-
- data.src='my';
- this.$api
- .MhPostModel(data, 'user/info')
- .then(res => {
- if (res.data.code != 1) {
- uni.showModal({
- title: '提示',
- content: '账号异常!',
- showCancel:false,
- success: function (res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else {
- this.userinfo = res.data.data;
- if(this.userinfo.scyd==0){
- this.$refs.popup.open()
- }
- if(this.userinfo.duihuan==1){
- uni.showModal({
- title: '提示',
- content: '请进入兑换区复购,恢复预约功能!',
- showCancel:false,
- success: function (res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/shop/duihuan'
- });
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
- this.$api.setUserinfo(res.data.data);
- uni.switchTab({
- url: "/pages/my/index"
- })
- }
- this.wjsz=res.data.data.wjsz
- })
- .catch(err => {
- // console.log('request fail', JSON.stringify(err));
- });
- },
- updateaccount() {
- if (!this.userinfo) {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- return;
- }
- uni.navigateTo({
- url: '/pages/lanhu_updateaccount/index'
- });
- },
- shequ() {
- if (!this.userinfo) {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- return;
- }
- uni.navigateTo({
- url: 'shequ'
- });
- },
- fuxiao() {
- if (!this.userinfo) {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- return;
- }
- uni.navigateTo({
- url: 'fuxiao'
- });
- },
- onPayaccount() {
- if (!this.userinfo) {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- return;
- }
- uni.navigateTo({
- url: '/pages/shoukuan/shoukuan'
- });
- },
- onRenzheng() {
- if (!this.userinfo) {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- return;
- }
- uni.navigateTo({
- url: '/pages/lanhu_renzhen/index'
- });
- },
- onClick_1() {
- if (!this.userinfo) {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- return;
- }
- uni.navigateTo({
- url: '/pages/lanhu_poster/index?uid=' + this.userinfo.id
- });
- },
- exit() {
- this.$api.setUserinfo(null);
- var user = this.$api.getUserinfo();
- if (user) {
- this.userinfo = user;
- } else {
- this.userinfo = null;
- }
- uni.showToast({
- title: '退出成功',
- icon: 'none'
- });
- setTimeout(function() {
- uni.navigateTo({
- url: "/pages/lanhu_login/index"
- })
- }, 1000)
- },
- toLogin() {
- uni.navigateTo({
- url: '/pages/lanhu_login/index'
- });
- }
- }
- };
- </script>
- <style lang="css">
- @import '../common/common.css';
- @import './assets/style/index.rpx.css';
- page {
- background: #F2F2F6;
- }
- .tab {
- background: #fff;
- margin: auto;
- margin-top: -100rpx;padding: 30rpx 0;
- display: flex;
- border-radius: 10rpx;
- width: calc(100% - 100rpx);display: table;
- }
- .tab .t{display: flex;
- justify-content: space-between;
- align-items: center;margin-top: 30rpx;
- }
- .tit {
- display: block;
- text-align: center;width: 33%;
- }
- .tit view:nth-child(1) {
- color: #333333;
- font-weight: bold;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 32rpx;
- }
- .tit view:nth-child(2) {
- font-size: 28rpx;
- color: #999999;
- }
- .f{width: calc(100% - 100rpx);background: #FFFFFF;margin: auto;border-radius: 10rpx;margin-top: 20rpx;padding:20rpx 40rpx;}
- .d{display: table;width: 100%;height: 80rpx;}
-
- .d view:nth-child(1){float: left;height: 80rpx;padding-top: 20rpx;}
- .d view:nth-child(1) image{width: 40rpx;height: 40rpx;}
-
- .d view:nth-child(2){float: left;color: #333333;font-size: 28rpx;line-height: 80rpx;margin-left: 20rpx;}
-
- .d view:nth-child(3){float: right;height: 80rpx;padding-top: 20rpx;}
- .d view:nth-child(3) image{width: 30rpx;height: 30rpx;}
- </style>
|