123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- <template>
- <view class="page">
- <uni-nav-bar rightWidth='136rpx' title="会员中心" fixed :border="false" statusBar backgroundColor="#24234B"
- color="#FFFFFF">
- <template #left>
- <view class="cl-topbar__icon" @click="navigateBack">
- <text class="cl-icon-arrow-left"></text>
- </view>
- </template>
- </uni-nav-bar>
- <view style="width: 100vw;height: 88rpx;"></view>
- <view class="header">
- <view class="bg">
- <view class="left">
- <view class="user">
- <image class="avator" mode="aspectFill" :src="myinfo.avator"></image>
- <text class="nickname">{{myinfo.nickname}}</text>
- <image class="iconV" mode="widthFix" :src="img_w3_icon_lev">
- </image>
- </view>
- <view class="num">{{myinfo.num_gmb}}</view>
- <view class="desc">
- 可用数量
- <image class="arrow" mode="widthFix" src="http://c.yujianmate.com/images/v1/w3/wenhao.png">
- </image>
- </view>
- </view>
- <view class="right">
- <image class="icon" mode="widthFix" :src="img_w3_lev"></image>
- <view class="desc" @click="goPage('/pages/w3/levRule')">
- 查看晋升规则
- <image class="arrow" mode="widthFix" src="http://c.yujianmate.com/images/v1/me/arrow_right.png">
- </image>
- </view>
- </view>
- </view>
- </view>
- <view class="thread"></view>
- <view class="sigin">
- <view class="btn gray" v-if="myinfo.is_signin > 0">
- 已签到
- </view>
- <view class="btn" v-else @click="goSign">
- </view>
- </view>
- <view class="thread"></view>
- <view class="list_r">
- <view class="item1" @click="goPage('/pages/w3/box')"></view>
- <view class="item2" @click="goPage('/pages/w3/invite')"></view>
- </view>
- <view class="list_r">
- <view class="item3" @click="goPage('/pages/w3/tran')"></view>
- <view class="item4" @click="goPage('/pages/w3/X_bank')"></view>
- </view>
- <view class="thread"></view>
- <view class="thread"></view>
- <view class="thread"></view>
- <view class="list_item" v-for="(item,index) in list" v-if="index == 0">
- <view class="item2">
- <view class="left">
- <image class="icon" mode="widthFix"
- :src="'http://c.yujianmate.com/images/v1/w3/box/box_'+item.id+'.png'"></image>
- <view class="price">
- {{item.num_dui}}暗物质
- </view>
- <block v-if="item.num_have > 0">
- <text class="name">待解锁:{{item.num_sign}}/{{item.num_task}}天</text>
- <text class="time">开拓日期:{{item.tdate}}</text>
- </block>
- </view>
- <view class="right">
- <view class="item1">
- <text class="left2">{{item.name}}</text>
- <text class="right2">开拓中{{item.num_have}}/{{item.num}}</text>
- </view>
- <view class="content">
- 探索需要{{item.num_dui}}个暗物质,可探索获得{{item.num_jkb}}个暗物质,周期{{item.num_limit_day}}
- 天,最多可完成{{item.num}}次探索。
- </view>
- <view class="act">
- <block v-if="myinfo.is_idcheck < 1">
- <view class="btn" @click="onIdcheck()">
- 探索
- </view>
- </block>
- <block v-else-if="item.num_have < 1">
- <view class="btn" @click="onGetBox()">
- 探索
- </view>
- </block>
- </view>
- </view>
- </view>
- </view>
- <view class="thread2"></view>
- <DialogBoxW3 ref="DialogBoxW3"></DialogBoxW3>
- </view>
- </template>
- <script>
- import uniNavBar from '../../components/uni-ui/uni-nav-bar/uni-nav-bar.vue'
- export default {
- components: {
- uniNavBar
- },
- data() {
- return {
- title: '',
- myinfo: {},
- platDiff: '',
- num_people: 0,
- num_diamond: 0,
- showPop: false,
- popFrom: 'bottom',
- maskClick: true,
- isPlayingState: false,
- bg_show: false,
- show_sound: false,
- swiperIndex: 0,
- data_list: [{
- "title": "",
- "author": "",
- "content": "",
- "is_show": 1
- }],
- list: [],
- tid: 0,
- audio: null,
- record_id: 0,
- img_w3_icon_lev: '',
- img_w3_lev: '',
- }
- },
- onLoad() {
- let self = this;
- },
- onShow() {
- // uni.hideTabBar({
- // animation:false
- // })
- // this.loadData(1);
- // this.showBottomPlayer();
- this.loadInfo();
- this.loadBoxList();
- },
- methods: {
- navigateBack() {
- uni.navigateBack(1)
- },
- goPage(page) {
- uni.navigateTo({
- url: page,
- })
- },
- loadInfo() {
- uni.request({
- url: this.$apiHost + '/Web/getinfo',
- data: {
- uuid: getApp().globalData.uuid
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----:", res.data);
- this.myinfo = res.data;
- this.img_w3_icon_lev = 'http://c.yujianmate.com/images/v1/w3/w3_icon_' + (this.myinfo
- .level + 1) + '.png';
- this.img_w3_lev = 'http://c.yujianmate.com/images/v1/w3/w3_' + (this.myinfo.level +
- 1) + '.png';
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- },
- loadBoxList() {
- let that = this;
- uni.request({
- url: this.$apiHost + "/Box/getlist", //仅为示例,并非真实接口地址。
- data: {
- uuid: getApp().globalData.uuid,
- tab: 1,
- type: 1,
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----", res.data.list);
- if (res.data.success == "yes") {
- that.list = res.data.list;
- }
- },
- complete: (com) => {
- uni.hideLoading();
- },
- });
- },
- goSign() {
- uni.showLoading({})
- let that = this;
- uni.request({
- url: this.$apiHost + "/My/signin", //仅为示例,并非真实接口地址。
- data: {
- uuid: getApp().globalData.uuid,
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----", res.data.list);
- uni.showToast({
- title: res.data.str,
- icon: 'none'
- });
- if (res.data.success == "yes") {
- this.loadInfo();
- this.loadBoxList();
- }
- },
- complete: (com) => {
- uni.hideLoading();
- },
- });
- },
- onIdcheck() {
- let that = this;
- this.$refs['DialogBoxW3'].confirm({
- title: '实名',
- content: '您未实名,实名后领取50个暗物质开启星际通行证',
- DialogType: 'inquiry',
- btn1: '',
- btn2: '',
- animation: 0
- }).then((res) => {
- uni.navigateTo({
- url: '/pages/my/idcheck',
- })
- })
- },
- onGetBox() {
- let that = this;
- this.$refs['DialogBoxW3'].confirm({
- title: '探索',
- content: '您还没有开通探索卡,快去激活吧!',
- DialogType: 'inquiry',
- btn1: '',
- btn2: '',
- animation: 0
- }).then((res) => {
- uni.navigateTo({
- url: '/pages/w3/box',
- })
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- @import 'ucenter.scss';
- </style>
|