640 lines
14 KiB
Vue
640 lines
14 KiB
Vue
<template>
|
||
<view>
|
||
<view class="pageBg">
|
||
<view class="userHeader" @click="goUsers">
|
||
<view class="userCont">
|
||
<image class="userImg" :src="userInfo.avatar" mode="aspectFit" ></image>
|
||
<view class="userDel">
|
||
<view class="userName"><text>{{ userInfo.nickname || '暂未登录' }}</text></view>
|
||
<view class="userId"><text
|
||
v-if="userInfo.id">ID:</text><text>{{ userInfo.id || '点击登录 享受更多会员特惠' }}</text></view>
|
||
</view>
|
||
</view>
|
||
<uni-icons type="right" size="16px" color="#999999"></uni-icons>
|
||
</view>
|
||
|
||
|
||
<!-- <view class="moneyBanner">
|
||
<view>
|
||
<view class="moneyLeft">
|
||
<view>
|
||
<image class="beansIcon" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/jindou1.png">
|
||
</image>
|
||
<text class="beansNum" @click="goBill">我的金豆:{{ userInfo.beans || '0' }}</text>
|
||
</view>
|
||
<view class="unlock">获得金豆可解锁更多剧情</view>
|
||
</view>
|
||
<view class="moneyRight" @click="rechargeapi"> 去充值</view>
|
||
</view>
|
||
</view> -->
|
||
<!--
|
||
<view class="vipbox">
|
||
<view class="vipimg">
|
||
<image style="height: 156rpx;width: 678rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/vip_bg.png" mode=""></image>
|
||
<view class="viptext">
|
||
<view class="title" >开通VIP</view>
|
||
<view class="text">开通后解锁更多剧情</view>
|
||
</view>
|
||
<view class="vipgo" @click="liberalvip()">
|
||
<image style="width: 196rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/vip_go.png" mode="">
|
||
<view class="liberal">立即开通</view>
|
||
</image>
|
||
</view>
|
||
</view>
|
||
</view> -->
|
||
|
||
|
||
<view class="tabBarList" style="margin-top: 40rpx;">
|
||
<view class="barBox">
|
||
<view class="barItem" @click="rechargeapi">
|
||
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/qianbao.png" mode="scaleToFill">
|
||
</image>
|
||
<view class="barName">金豆充值</view>
|
||
</view>
|
||
<view class="barItem" @click="goEarning" v-if="config.site.shop_type == 1">
|
||
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/qianbao.png" mode="scaleToFill">
|
||
</image>
|
||
<view class="barName">积分商城</view>
|
||
</view>
|
||
<view class="barItem" @click="shareapi">
|
||
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/erweima.png" mode="scaleToFill">
|
||
</image>
|
||
<view class="barName">客服二维码</view>
|
||
</view>
|
||
<!-- #ifdef APP-PLUS || H5 -->
|
||
<view class="barItem" @click="shareapp">
|
||
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fenx.png" mode="scaleToFill"></image>
|
||
<view class="barName"> 分享</view>
|
||
</view>
|
||
<!-- #endif -->
|
||
<!-- #ifdef MP-WEIXIN -->
|
||
<view class="barItem wxShareBtn">
|
||
<button open-type="share" class="wxShareBtn">
|
||
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fenx.png" mode="scaleToFill">
|
||
</image>
|
||
<view class="barName"> 分享</view>
|
||
</button>
|
||
|
||
</view>
|
||
<!-- #endif -->
|
||
<!-- <view class="barItem" @click="showVip">-->
|
||
<!-- <view class="vipBox">-->
|
||
<!-- <image class="VIPIcon" src="@/static/VIP.png" mode="scaleToFill"></image>-->
|
||
<!-- </view>-->
|
||
<!-- <view class="barName"> VIP兑换</view>-->
|
||
<!-- </view>-->
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- <view style="width: 100%; height: 30upx;"></view>
|
||
<home-vipcard :userinfo="userinfo" @loginAct="showLoginAct" @qrcode="showQrcode = true"></home-vipcard> -->
|
||
<view class="mt24" style="padding: 0 30rpx;">
|
||
<home-banner :banners="banners"></home-banner>
|
||
</view>
|
||
<view class="userFooterList">
|
||
<view class="userFooterItem" v-for="(item,index) in getMenus" :key="index" @click="memberLinkTo(item.link)">
|
||
<image class="fimg" :src="item.icon" mode="scaleToFill"></image>
|
||
<text class="fname">{{ item.name }}</text>
|
||
</view>
|
||
</view>
|
||
<!-- <com-footer model="member"></com-footer> -->
|
||
<redeem ref="vipPup"></redeem>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import redeem from "@/components/redeemVIP.vue"; //vip卡密兑换
|
||
|
||
export default {
|
||
components: {
|
||
redeem
|
||
},
|
||
data() {
|
||
return {
|
||
config:uni.getStorageSync('config'),
|
||
isLogin: false,
|
||
showLogin: false,
|
||
isBirthday: true,
|
||
showBirthday: false,
|
||
showQrcode: false,
|
||
userInfo: {},
|
||
banners: [],
|
||
vipLevel: 0,
|
||
configUrl: this.$config.webUrl,
|
||
memberMenus: [{
|
||
name: '观看历史',
|
||
type: 'link',
|
||
model: '',
|
||
link: '/pagesA/myCenter/watchHistory',
|
||
icon: this.$config.staticUrl + 'vipcard_icon_my_card@2x.png',
|
||
show: 1
|
||
},
|
||
{
|
||
name: '我的追剧',
|
||
type: 'link',
|
||
model: '',
|
||
link: '/pagesA/myCenter/bingeWatch',
|
||
icon: this.$config.staticUrl + 'vipcard_icon_my_order@2x.png',
|
||
show: 1
|
||
},
|
||
{
|
||
name: '我的喜欢',
|
||
type: 'link',
|
||
model: '',
|
||
link: '/pagesA/myCenter/myLike',
|
||
icon: this.$config.staticUrl + 'vipcard_love.png?v=1',
|
||
show: 1
|
||
},
|
||
{
|
||
name: '收货地址',
|
||
type: '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: '/pagesA/servers/callServer',
|
||
icon: this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',
|
||
show: 1
|
||
},
|
||
{name:'我的团队',type:'link',model:'',link:'/pages/client/member/myTeam',icon:this.$config.staticUrl + 'vipcard_icon_my_invite@2x.png',show:3},
|
||
//{name:'我的邀请码',type:'link',model:'',link:'/pages/client/member/qrshare',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;
|
||
}
|
||
},
|
||
onLoad(option) {
|
||
this.userInfo = uni.getStorageSync("userinfo")
|
||
},
|
||
onShow() {
|
||
this.config=uni.getStorageSync('config');
|
||
if (uni.getStorageSync("userinfo").token) {
|
||
this.ongrzlTap();
|
||
}
|
||
this.banners = uni.getStorageSync("config").banner
|
||
},
|
||
onShareAppMessage: function(res) {
|
||
// #ifdef MP-WEIXIN
|
||
var href = `/pages/tabs/my?fxpid=${this.uid}&invite=${this.userInfo.invite}`
|
||
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
|
||
// #ifdef H5
|
||
|
||
uni.setClipboardData({
|
||
data: this.$config.webUrl + `/h5/?fxpid=${this.uid}&invite=${this.userInfo.invite}`,
|
||
complete() {
|
||
uni.showToast({
|
||
title: "分享连接已复制到剪贴板"
|
||
})
|
||
}
|
||
})
|
||
// #endif
|
||
},
|
||
|
||
methods: {
|
||
goBill() { //消费明细
|
||
uni.navigateTo({ //钱包
|
||
url: 'pagesA/myCenter/recharge'
|
||
})
|
||
},
|
||
goEarning() { //收益
|
||
uni.navigateTo({
|
||
// url: '/pagesA/myCenter/wallet/earning',
|
||
url: '/pagesA/integral/integralShop'
|
||
})
|
||
},
|
||
shareapp() {
|
||
console.log('2222', this.userInfo.invite)
|
||
// #ifdef H5
|
||
let invite = this.userInfo.invite ? this.userInfo.invite : "";
|
||
uni.setClipboardData({
|
||
data: this.configs.webUrl + `/h5/#/?fxpid=${this.uid}&invite=${invite}`,
|
||
complete() {
|
||
uni.showToast({
|
||
title: "分享连接已复制到剪贴板"
|
||
})
|
||
}
|
||
})
|
||
// #endif
|
||
// #ifdef MP-WEIXIN
|
||
uni.share({
|
||
provider: 'weixin',
|
||
type: 0,
|
||
title: '玛薇剧场',
|
||
imageUrl: 'https://wx.yaohe.hnjrdzkj.xyz/h5/img/share.png',
|
||
path: `pages/tabs/my?invite=${this.userInfo.invite}`,
|
||
success(res) {
|
||
|
||
},
|
||
fail(res) {
|
||
|
||
}
|
||
})
|
||
// #endif
|
||
},
|
||
rechargeapi() {
|
||
uni.navigateTo({
|
||
url: '/pagesA/myCenter/recharge'
|
||
})
|
||
},
|
||
shareapi() {
|
||
uni.navigateTo({
|
||
url: '/pagesA/servers/servesQR'
|
||
})
|
||
},
|
||
goUsers() {
|
||
if (this.userInfo.token) {
|
||
uni.navigateTo({
|
||
url: '/pagesA/myCenter/settings/set'
|
||
})
|
||
} else {
|
||
uni.navigateTo({
|
||
url: '/pagesA/login/login'
|
||
})
|
||
}
|
||
|
||
},
|
||
ongrzlTap() {
|
||
let that = this;
|
||
that.$httpRequest({
|
||
url: "/api/user/index",
|
||
method: "GET",
|
||
data: {}
|
||
}).then(res => {
|
||
if (res.code == 1) {
|
||
that.userInfo = res.data;
|
||
uni.setStorageSync("userinfo", res.data);
|
||
uni.setStorageSync("config", res.data.config);
|
||
}
|
||
}).catch(err => {
|
||
console.log(err)
|
||
})
|
||
|
||
},
|
||
|
||
memberLinkTo(e) {
|
||
// uni.navigateTo({
|
||
// url: e
|
||
// })
|
||
if (this.userInfo.token) {
|
||
uni.navigateTo({
|
||
url: e
|
||
})
|
||
} else {
|
||
uni.navigateTo({
|
||
url: '/pagesA/login/login'
|
||
})
|
||
}
|
||
|
||
// let index = parseInt(e.currentTarget.dataset.index);
|
||
// if (!this.userInfo.token && this.getMenus[index].model != 'integral') {
|
||
// this.showLogin = true;
|
||
// } else {
|
||
// if (this.getMenus[index].link != '') {
|
||
// if (this.getMenus[index].model == 'integral') {
|
||
// uni.redirectTo({
|
||
// 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'
|
||
})
|
||
}
|
||
},
|
||
showLoginAct() {
|
||
uni.navigateTo({
|
||
url: '/pages/login/login'
|
||
})
|
||
},
|
||
showVip() {
|
||
this.$refs.vipPup.showRedeem()
|
||
},
|
||
|
||
|
||
liberalvip(){
|
||
uni.navigateTo({
|
||
url: '/pagesA/VIP/VIP'
|
||
})
|
||
},
|
||
|
||
|
||
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped>
|
||
.pageBg {
|
||
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/mybgc.png');
|
||
/* background-image: url(@/static/my/my_bg.png); */
|
||
background-repeat: no-repeat;
|
||
background-size: 750rpx 440rpx;
|
||
width: 750rpx;
|
||
/* height: 705rpx; */
|
||
padding-top: 120rpx;
|
||
padding-left: 32rpx;
|
||
padding-right: 32rpx;
|
||
position: relative;
|
||
background-color: #F8F8F8;
|
||
}
|
||
|
||
|
||
|
||
.userHeader {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
padding: 0 32rpx;
|
||
|
||
}
|
||
|
||
.userCont {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
.userDel {
|
||
margin-left: 20rpx;
|
||
}
|
||
|
||
.userImg {
|
||
height: 80rpx;
|
||
width: 80rpx;
|
||
border-radius: 50%;
|
||
border: 6rpx solid #FFFFFF;
|
||
background: #FFFFFF;
|
||
box-shadow: 0rpx 24rpx 48rpx 0rpx rgba(197, 202, 219, 0.3);
|
||
}
|
||
|
||
.userName {
|
||
font-size: 32rpx;
|
||
color: #2E2F33;
|
||
}
|
||
|
||
.userId {
|
||
color: #AEB2C1;
|
||
font-size: 24rpx;
|
||
margin-top: 12rpx;
|
||
}
|
||
|
||
|
||
.vipIcon {
|
||
margin-left: 20rpx;
|
||
width: 82rpx;
|
||
height: 33rpx;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.moneyBanner {
|
||
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/myjian.png');
|
||
background-size: 686rpx 188rpx;
|
||
width: 686rpx;
|
||
height: 188rpx;
|
||
margin-top: 44rpx;
|
||
padding: 50rpx 56rpx;
|
||
color: #fff;
|
||
}
|
||
|
||
.moneyLeft,
|
||
.moneyRight {
|
||
display: inline-block;
|
||
}
|
||
|
||
.beansIcon {
|
||
width: 44rpx;
|
||
height: 44rpx;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.beansNum {
|
||
font-size: 32rpx;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.unlock {
|
||
font-size: 22rpx;
|
||
color: #999;
|
||
}
|
||
|
||
/* .moneyRight {
|
||
display: inline-block;
|
||
width: 172rpx;
|
||
height: 72rpx;
|
||
background: linear-gradient(180deg, #FFFB25 0%, #00CB92 100%);
|
||
border-radius: 38rpx;
|
||
border-image: linear-gradient(180deg, rgba(251, 250, 38, 1), rgba(178, 255, 194, 1)) 2 2;
|
||
float: right;
|
||
font-size: 32rpx;
|
||
color: #fff;
|
||
text-align: center;
|
||
line-height: 72rpx;
|
||
font-weight: 600;
|
||
} */
|
||
|
||
.tabBarList {
|
||
height: 180rpx;
|
||
width: 678rpx;
|
||
color: #fff;
|
||
background-color: #FFFFFF;
|
||
border-radius: 16rpx;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
|
||
.barBox {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-around;
|
||
flex: 1;
|
||
}
|
||
|
||
.barItem {
|
||
/* flex: 1; */
|
||
text-align: center;
|
||
}
|
||
|
||
.vipBox {
|
||
width: 86rpx;
|
||
height: 86rpx;
|
||
margin: 0 auto;
|
||
background: linear-gradient(to bottom, #fa6f02, #FFFFFF);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: 38rpx;
|
||
}
|
||
|
||
.VIPIcon {
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
}
|
||
|
||
.wxShareBtn {
|
||
background: none;
|
||
border: none;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
.wxShareBtn .barName {
|
||
line-height: 30rpx;
|
||
margin-top: -20rpx;
|
||
|
||
}
|
||
|
||
.barIcon {
|
||
width: 88rpx;
|
||
height: 88rpx;
|
||
}
|
||
|
||
.barName {
|
||
font-size: 28rpx;
|
||
color: #000;
|
||
text-align: center;
|
||
}
|
||
|
||
.userFooterList {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-around;
|
||
flex-wrap: wrap;
|
||
margin-top: 60rpx;
|
||
}
|
||
|
||
.userFooterItem {
|
||
width: calc(50% - 76rpx);
|
||
display: flex;
|
||
align-items: center;
|
||
flex-direction: row;
|
||
justify-content: center;
|
||
height: 100rpx;
|
||
margin-bottom: 30rpx;
|
||
background-color: #fff;
|
||
border-radius: 12rpx;
|
||
}
|
||
|
||
.fimg {
|
||
width: 64rpx;
|
||
height: 64rpx;
|
||
}
|
||
|
||
.fname {
|
||
font-size: 28rpx;
|
||
padding-left: 30rpx;
|
||
}
|
||
|
||
|
||
.vipbox {
|
||
margin-top: 46rpx;
|
||
position: relative;
|
||
margin-bottom: 24rpx;
|
||
}
|
||
|
||
.viptext {
|
||
position: absolute;
|
||
top: 38rpx;
|
||
left: 128rpx;
|
||
}
|
||
|
||
.title {
|
||
font-family: PingFangSC, PingFang SC;
|
||
font-weight: 500;
|
||
font-size: 32rpx;
|
||
color: #FFFFFF;
|
||
line-height: 44rpx;
|
||
text-align: left;
|
||
font-style: normal;
|
||
}
|
||
|
||
.text {
|
||
font-family: PingFang-SC, PingFang-SC;
|
||
font-weight: 500;
|
||
font-size: 22rpx;
|
||
color: #9EA9CD;
|
||
line-height: 32rpx;
|
||
text-align: left;
|
||
font-style: normal;
|
||
}
|
||
|
||
|
||
.vipgo {
|
||
position: absolute;
|
||
top: 50rpx;
|
||
left: 428rpx;
|
||
}
|
||
|
||
.liberal {
|
||
position: absolute;
|
||
top: 16rpx;
|
||
left: 40rpx;
|
||
|
||
font-family: PingFangSC, PingFang SC;
|
||
font-weight: 500;
|
||
font-size: 28rpx;
|
||
color: #FFFFFF;
|
||
line-height: 40rpx;
|
||
text-align: left;
|
||
font-style: normal;
|
||
}
|
||
</style> |