123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <template>
- <view class="body">
- <view class="pd24_20 flex alcenter space user-info">
- <view class="flex alcenter">
- <view class="member-face">
- <image class="face" :src="statics.defaultFace"></image>
- <!-- <image class="vip-level" :src="userinfo.group_id>1?statics.vipLevelImg[0]:''"></image> -->
- </view>
- <view class="ml15">
- <view class="ft16 cl-main">{{ userinfo.type }}</view>
- <view class="mt12 ft12 cl-notice">ID:{{ userinfo.uid || '' }}
- <image @click="copyId(userinfo.uid || '')" style="margin-left: 10px; width: 30rpx;height: 15px;"
- src="/static/img/wode/cpoy.png" />
- </view>
- </view>
- </view>
- </view>
- <view class="pd24_20">
- <div class="box pd16_15 creadit-box">
- <div class="mt16 coin-box">
- <div class="flex alcenter coin-item">
- <label class="coin-text">{{ userinfo.charge_coin || 0 }}</label>
- <label class="coin-text">永久看币</label>
- </div>
- <label class="box-line">|</label>
- <div class="flex alcenter coin-item">
- <label class="coin-text">{{ userinfo.reward_coin || 0 }}</label>
- <label class="coin-text">赠送看币</label>
- </div>
- </div>
- <navigator url="/pages/pay/pay">
- <div class="mt16 box-cj"><label class="btn-cz">去充值</label></div>
- </navigator>
- </div>
- <!-- <home-vipcard :userinfo="userinfo" @loginAct="showLoginAct" @qrcode="showQrcode = true"></home-vipcard> -->
- <view class="flex wrap space mt16">
- <view v-for="(item, index) in getMenus" :key="index" :class="index > 1 ? 'mt16' : ''">
- <view v-if="item.type == 'link'" :data-index="index" @click="memberLinkTo" class="box pd16_15 flex alcenter"
- style="width: 320rpx;">
- <image :src="item.icon" style="width: 64rpx;height: 64rpx;"></image>
- <text class="ml15 ft14 ftw500 cl-main">{{ item.name }}</text>
- </view>
- <view v-else style="width: 320rpx;" @click="showPopu(item.type)">
- <button class="box pd16_15 flex alcenter" style="padding: 32rpx 30rpx; margin: 0;">
- <image :src="item.icon" style="width: 64rpx;height: 64rpx;"></image>
- <text class="ml15 ft14 ftw500 cl-main">{{ item.name }}</text>
- </button>
- </view>
- </view>
- </view>
- <com-copyright></com-copyright>
- <uni-popup ref="popup" type="center">
- <image :show-menu-by-longpress="true" class="qrcode-img" :src="kefu.url"></image>
- </uni-popup>
- </view>
- </view>
- </template>
- <script>
- import {
- getKefu
- } from "@/common/apis/common.js"
- import {
- getUserInfo
- } from "@/common/apis/my.js"
- export default {
- data() {
- return {
- isLogin: false,
- showLogin: false,
- isBirthday: true,
- showBirthday: false,
- showQrcode: true,
- avatar: '',
- userinfo: {
- type: "微信用户",
- },
- kefu: {
- url: "",
- },
- vipLevel: 0,
- iskq: 0,
- uid: 0,
- staticUrl: this.$config.staticUrl,
- memberMenus: [
- // {name:'观看历史',type:'link',model:'',link:'/pages/client/tuan/zjgk',icon:this.$config.staticUrl + 'vipcard_icon_my_card@2x.png',show:1},
- // {name:'我的追剧',type:'link',model:'',link:'/pages/client/tuan/zjjl',icon:this.$config.staticUrl + 'vipcard_icon_my_order@2x.png',show:1},
- {
- name: '我的追剧',
- type: 'link',
- model: 'tab',
- link: '/pages/zhuiju/index',
- icon: this.$config.zystaticUrl + '/static/img/wode/zhuij.png',
- show: 1
- },
- {
- name: '充值记录',
- type: 'link',
- model: '',
- link: '/pages/member/orders',
- icon: this.$config.zystaticUrl + '/static/img/wode/wd-cz.png',
- show: 1
- },
- {
- name: '消费记录',
- type: 'link',
- model: '',
- link: '/pages/member/consume',
- icon: this.$config.zystaticUrl + '/static/img/wode/xiaofei.png',
- show: 1
- },
- {
- name: '联系客服',
- type: 'kefu',
- model: '',
- link: '/pages/client/tuan/wdxh',
- icon: this.$config.zystaticUrl + '/static/img/wode/kefu.png',
- show: 1
- },
- // {name:'收货地址',type:'git link',model:'',link:'/pages/client/member/address',icon:this.$config.staticUrl + 'vipcard_icon_my_address@2x.png',show:0},
- // {name:'官方商城',type:'link',model:'',link:'/pages/client/shop',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:0},
- // {name:'联系客服',type:'link',model:'',link:'/pages/client/vipcard/adviser',icon:this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',show:1},
- // {name:'我的团队',type:'link',model:'',link:'/pages/client/mytuandui',icon:this.$config.staticUrl + 'vipcard_icon_my_invite@2x.png',show:3},
- // {name:'分销订单',type:'link',model:'',link:'/pages/client/vipcard/fxlog',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:3},
- ],
- }
- },
- computed: {
- getMenus() {
- let arr = new Array;
- for (var a in this.memberMenus) {
- if (this.memberMenus[a].show == 1 || (this.iskq == 1 && this.memberMenus[a].show == 3)) {
- arr.push(this.memberMenus[a]);
- }
- }
- return arr;
- }
- },
- async onLoad() {
- let res = await getKefu();
- this.kefu = res.data;
- },
- async onShow() {
- let res = await getUserInfo();
- this.userinfo = res.data;
- },
- onShareAppMessage: function (res) {
- // #ifdef MP-WEIXIN
- var href = '/pages/login/login?fxpid=' + this.uid
- console.log(res)
- let that = this;
- const obj = {
- title: "发送给好友",
- imageUrl: '',
- path: href,
- success: function (res) {
- console.log(res, "转发成功")
- },
- fail: function (res) {
- wx.showToast({
- title: '发送失败',
- icon: 'none'
- })
- }
- }
- return obj
- // #endif
- },
- onShareTimeline(e) {
- },
- methods: {
- showPopu(type = "kefu") {
- if (type == "kefu") {
- this.$refs.popup.open('center')
- }
- },
- opset() {
- uni.navigateTo({
- url: '/pages/set/set'
- })
- },
- opsets() {
- uni.navigateTo({
- url: '/pages/set/grzl/grzl'
- })
- },
- memberLinkTo(e) {
- let index = parseInt(e.currentTarget.dataset.index);
- if (this.getMenus[index].link != '') {
- if (this.getMenus[index].model == 'integral') {
- uni.redirectTo({
- url: this.getMenus[index].link
- })
- } else if (this.getMenus[index].model == 'tab') {
- uni.switchTab({
- url: this.getMenus[index].link
- })
- } else {
- uni.navigateTo({
- url: this.getMenus[index].link
- })
- }
- }
- },
- birthdayAct() {
- if (this.isBirthday) {
- uni.navigateTo({
- url: '/pages/client/member/birthday'
- })
- } else {
- uni.navigateTo({
- url: '/pages/client/member/info'
- })
- }
- },
- copyId(uid) {
- console.log('uid', uid);
- uni.setClipboardData({
- data: uid + "",
- success: () => {
- uni.showToast({
- title: '复制成功',
- icon: "none"
- })
- },
- fail: function (err) {
- uni.showToast({
- title: '复制失败',
- duration: 2000,
- icon: 'none'
- });
- }
- })
- },
- previewImage(e) {
- console.log('e', e);
- uni.previewImage({
- urls: this.kefu.url,
- longPressActions: {
- // itemList: ['发送给朋友', '保存图片', '收藏'],
- success: function (data) {
- console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
- },
- fail: function (err) {
- console.log(err.errMsg);
- }
- }
- });
- }
- },
- }
- </script>
- <style>
- @import url("style/index.css");
- </style>
|