sadjv3_user/pages/my/index.vue

1469 lines
38 KiB
Vue

<template>
<view class="content">
<view class="my-head">
<view class="my-head-top back-width">
<view class="u-m-r-10" style="position: relative;">
<image :src="avatar"
style="width: 120rpx;height:120rpx;border-radius: 50%; margin-left: 10rpx; border:#fff 1px solid;"
@click="goNav('/pages/my/userinfo')"></image>
</view>
<view class="my-head-top-view" v-if="!isLogin">
<view class="my-head-top-text">
<span>{{userName}}</span>
<view class="my-head-top-id" v-if="isVip=='1'">
<image v-if="vipNameType=='0'" class="my-head-vip" style="width:120rpx; height: 36rpx;"
src="../../static/vip/membership5.gif"></image>
<image v-if="vipNameType=='1'" class="my-head-vip" style="width:120rpx; height: 36rpx;"
src="../../static/vip/membership6.gif"></image>
<image v-if="vipNameType=='2'" class="my-head-vip" style="width:120rpx; height: 36rpx;"
src="../../static/vip/membership7.gif"></image>
<span>{{vipNameType=='0'?'':vipNameType=='1'?'':''}}</span>
</view>
</view>
<view class="my-head-texa">
<!-- <span>{{phone}}</span>
<span style="font-size: 30rpx;font-weight: bold; padding: 0 10rpx;">·</span> -->
<span>邀请码:{{invitationCode}}</span>
</view>
</view>
<view v-else class="text-xl" @click="goLogin('/pages/public/login')">
登录
</view>
</view>
<view class="my-head-mian back-width">
<view class="my-head-mian-top-view-qian">
<view style="display: flex;align-items: center;">
<image class="wallet3" src="../../static/wallet3.png" mode=""></image>我的钱包
</view>
<view @click="chonghi('明细')">钱包明细<span class="view-more"></span></view>
</view>
<view class="my-head-mian-top">
<view class="flex money-list">
<!--<image class="money-img" src="../../static/money2.png" mode="" @click="qidai()"></image>-->
<view>钱包金额(元)</view>
<view class="my-head-mian-top-yuE">{{money}}</view>
</view>
</view>
<view class="my-head-mian-top-view">
<view class="my-head-mian-top-view-chong" @click="chonghi('充值')">充值</view>
<!--<view class="my-head-mian-top-view-ming" @click="chonghi('明细')">明细</view>-->
</view>
<view class="my-head-mian-bottom">
<view class="my-head-mian-bottom-list" @click="youhui('/my/hongbao/youhuijuan')">
<image src="../../static/my-yuehui.png" mode=""></image>
<span class="my-head-mian-bottom-list-text">优惠券</span>
</view>
<view class="my-head-mian-bottom-list">
<image src="../../static/my-juanma.png" mode="" @click="qidai()"></image>
<span class="my-head-mian-bottom-list-text">券码兑换</span>
</view>
<view class="my-head-mian-bottom-list">
<image src="../../static/my-jifen.png" mode="" @click="qidai()"></image>
<span class="my-head-mian-bottom-list-text">盛安豆钱包</span>
</view>
</view>
</view>
<view class="my-head-bottom back-width" @click="goNav('/my/vip/index')">
<image src="../../static/activate2.png" mode="widthFix" v-if="isVip=='1'"></image>
<image src="../../static/activate3.png" mode="widthFix" v-else></image>
<!-- <image src="../../static/servicePackage/member_ba.png" mode="widthFix" v-if="!isVip"></image>
<image src="../../static/activate2.png" mode="widthFix" v-if="isVip"></image> -->
</view>
<!-- <view class="padding-lr margin-lr" style="background-color: #35C495;border-radius: 18rpx;margin-top: 30rpx;"
v-if="XCXIsSelect != '否' && hyCheck != '否'">
<view class="flex justify-between align-center" style="height: 140rpx;">
<view class="flex justify-between align-center" style="">
<view class="">
<image src="../../static/images/my/lihe.png" style="width: 70upx;height: 70upx;" mode="">
</image>
</view>
<view class="" style="margin-left: 24rpx;">
<view v-if="!isVip" class="vipttl" style="color: #fff;">开通会员</view>
<view v-if="isVip" class="vipttl" style="color: #fff;">会员中心</view>
<view class="flex-sub text-26" style="color: #e6c485;margin-top: 6rpx;">会员可享贵族福利</view>
</view>
</view>
<view v-if="!isVip" class="btn-bg" @click="goNav('/my/vip/index')"
style="justify-content: space-between;color: #fff;">立即开通
</view>
<view v-if="isVip" class="btn-bg" @click="goNav('/my/vip/index')"
style="justify-content: space-between;color: #fff;">会员特权
</view>
</view>
</view> -->
</view>
<view class="my-serve width">
<view class="my-serve-title">我的服务</view>
<view class="my-serve-view">
<view class="my-serve-list" @click="meServe('服务套餐')">
<div class="wdfw-dsy" v-show="wdfwTj.fwtc>0">
</div>
<image src="../../static/my-fuwu.png" mode=""></image>
<span class="my-serve-list-text">服务套餐</span>
</view>
<view class="my-serve-list" @click="meServe('项目次卡')">
<div class="wdfw-dsy" v-show="wdfwTj.xmck>0">
</div>
<image src="../../static/my-cika.png" mode=""></image>
<span class="my-serve-list-text">项目次卡</span>
</view>
<view class="my-serve-list" @click="meServe('服务疗程')">
<div class="wdfw-dsy" v-show="wdfwTj.fwlc>0">
</div>
<image src="../../static/my-liaocheng.png" mode=""></image>
<span class="my-serve-list-text">服务疗程</span>
</view>
</view>
<view class="my-serve-view">
<view class="my-serve-list" @click="tuangou()">
<div class="wdfw-dsy" v-show="wdfwTj.pt>0">
</div>
<image src="../../static/my-liaocheng2.png" mode=""></image>
<span class="my-serve-list-text">拼团</span>
</view>
<view class="my-serve-list" @click="miaoshao()">
<div class="wdfw-dsy" v-show="wdfwTj.xsms>0">
</div>
<image src="../../static/my-liaocheng3.png" mode=""></image>
<span class="my-serve-list-text">限时秒杀</span>
</view>
<view class="my-serve-list" @click="qiye()">
<div class="wdfw-dsy" v-show="wdfwTj.qyyy>0">
</div>
<image src="../../static/my-liaocheng1.png" mode=""></image>
<span class="my-serve-list-text">企业预约</span>
</view>
</view>
</view>
<view class="my-use width">
<view class="my-use-title">常用功能</view>
<view class="my-use-view">
<view class="my-use-list" @click="useToUrl('/my/gird/shoucang')">
<image style="padding: 3rpx;" src="../../static/my-gong-1.png" mode=""></image>
<span class="my-use-list-text">我的收藏</span>
</view>
<view class="my-use-list" @click="useToUrl('/pages/my/historyMy')">
<image style="padding: 3rpx;" src="../../static/my-gong-8.png" mode=""></image>
<span class="my-use-list-text">浏览历史</span>
</view>
<view class="my-use-list" @click="useToUrl('/my/address/address')">
<image style="padding: 3rpx;" src="../../static/my-gong-5.png" mode=""></image>
<span class="my-use-list-text">地址管理</span>
</view>
<view class="my-use-list" @click="useToUrl('/my/setting/index')">
<image style="padding: 3rpx;" src="../../static/my-gong-7.png" mode=""></image>
<span class="my-use-list-text">设置中心</span>
</view>
<view class="my-use-list" @click="useToUrl('/my/help/feedbackIndex')">
<image style="padding: 3rpx;" src="../../static/my-gong-6.png" mode=""></image>
<span class="my-use-list-text">帮助中心</span>
</view>
<view class="my-use-list" @click="useToUrl('/pages/my/fuwuGengduo?text='+'index')">
<image style="padding: 3rpx;" src="../../static/my-gong-10.png" mode=""></image>
<span class="my-use-list-text">项目推荐</span>
</view>
<view class="my-use-list" @click="useToUrl('/pages/my/invitationUser')">
<image style="padding: 3rpx;" src="../../static/my-gong-3.png" mode=""></image>
<span class="my-use-list-text">分享好友</span>
</view>
<view class="my-use-list" @click="useToUrl('/pages/my/hehuo')">
<image style="padding: 3rpx;" src="../../static/my-gong-2.png" mode=""></image>
<span class="my-use-list-text">申请合作技师</span>
</view>
<view class="my-use-list" @click="useToUrl('/pages/my/cooperation')">
<image style="padding: 3rpx;" src="../../static/my-gong-4.png" mode=""></image>
<span class="my-use-list-text">城市合伙人</span>
</view>
<view class="my-use-list" v-if="blIsJjr=='0'" @click="useToUrl('/pages/my/applyBroker/index')">
<image style="padding: 3rpx;" src="../../static/my-gong-11.png" mode=""></image>
<span class="my-use-list-text">申请经纪人</span>
</view>
<view class="my-use-list" v-if="blIsJjr=='1'" @click="useToUrl('/pages/my/applyBroker/myBroker')">
<image style="padding: 3rpx;" src="../../static/my-gong-12.png" mode=""></image>
<span class="my-use-list-text">我是经纪人</span>
</view>
<view class="my-use-list" v-if="blIsYwy=='0'" @click="useToUrl('/pages/my/applySalesperson/index')">
<image style="padding: 3rpx;" src="../../static/my-gong-14.png" mode=""></image>
<span class="my-use-list-text">申请业务员</span>
</view>
<view class="my-use-list" v-if="blIsYwy=='1'"
@click="useToUrl('/pages/my/applySalesperson/mySalesperson')">
<image style="padding: 3rpx;" src="../../static/my-gong-13.png" mode=""></image>
<span class="my-use-list-text">我是业务员</span>
</view>
<view class="my-use-list" v-if="blIsFxy=='0'" @click="useToUrl('/pages/my/applyDistributor/index')">
<image style="padding: 3rpx;" src="../../static/my-gong-15.png" mode=""></image>
<span class="my-use-list-text">申请分销员</span>
</view>
<view class="my-use-list" v-if="blIsFxy=='1'"
@click="useToUrl('/pages/my/applyDistributor/myDistributor')">
<image style="padding: 3rpx;" src="../../static/my-gong-16.png" mode=""></image>
<span class="my-use-list-text">我是分销员</span>
</view>
<view class="my-use-list" v-if="blIsQds=='0'" @click="useToUrl('/pages/my/channelMerchants/index')">
<image style="padding: 3rpx;" src="../../static/my-gong-11.png" mode=""></image>
<span class="my-use-list-text">申请渠道商</span>
</view>
<view class="my-use-list" v-if="blIsQds=='1'"
@click="useToUrl('/pages/my/channelMerchants/myMerchants')">
<image style="padding: 3rpx;" src="../../static/my-gong-12.png" mode=""></image>
<span class="my-use-list-text">我是渠道商</span>
</view>
<!-- <view class="my-use-list" @click="useToUrl('/pages/my/joinUs/index')">
<image style="padding: 3rpx;" src="../../static/my-gong-11.png" mode=""></image>
<span class="my-use-list-text">招商加盟</span>
</view>
<view class="my-use-list" @click="useToUrl('/pages/my/joinUs/myJoinUs')">
<image style="padding: 3rpx;" src="../../static/my-gong-12.png" mode=""></image>
<span class="my-use-list-text">我是代理商</span>
</view> -->
<!-- <view class="my-use-list" @click="useToUrl('/pages/my/myteam')">
<image style="padding: 3rpx;" src="../../static/my-gong-9.png" mode=""></image>
<span class="my-use-list-text">我的团队</span>
</view> -->
<view class="my-use-list" @click="useToUrl('/my/feedback/feedbackMenu')">
<image style="padding: 3rpx;" src="../../static/shezhi4.png" mode=""></image>
<span class="my-use-list-text">我要投诉</span>
</view>
</view>
</view>
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
<image :src="item.packageImg" mode="" class="item-img"></image>
<view class="item-view">
<view class="item-view-title">
{{item.title}}
</view>
<view class="item-view-bottom">
<view class="item-view-bottom-qian">
<span>¥</span>
<span>{{item.price}}</span>
<span v-if="item.type!='104'&&(item.type=='105'||item.type=='106')">
/{{item.serviceCount?item.serviceCount:''}}次
</span>
<span v-if="item.type=='104'">/套
</span>
<span v-if="item.type!='104'"
style="font-size: 12px;color: #848484;= -webkit-text-decoration-line: line-through;text-decoration-line: line-through;margin-left: 5px;">
¥{{item.oldPrice}}
</span>
<span v-if="item.type!='104'&&(item.type=='105'||item.type=='106')"
style="font-size: 12px;color: #848484;-webkit-text-decoration-line: line-through;text-decoration-line: line-through;margin-left: 5px;">
/{{item.serviceCount?item.serviceCount:''}}次
</span>
<span v-if="item.type=='104'">¥{{item.oldPrice}}/套</span>
</view>
</view>
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}</span><!-- | 好评{{item.esteemRate}}% -->
</view>
<view class="item-view-bottom-btn">
查看
</view>
</view>
</view>
</view>
<view class="prompt-text">-当你累了 想起盛安到家-</view>
<view class="kefu" @click="goMsg">
<image :class="{'blinking': haveNewMsg}" src="../../static/kefu.png" mode=""></image>
<!--<span>联系客服</span>-->
</view>
</view>
</template>
<script>
export default {
data() {
return {
isShop: 0,
hyCheck: '否',
tgCheck: '否',
isAgency: 0,
avatar: '../../static/logo.png',
isLogin: true,
userName: '匿名',
phone: '18684369159',
browse: 0, //浏览数
fans: 0, //粉丝数
follow: 0, //关注数
visitor: 0, //访客数
userId: '',
isVip: 0,
invitationCode: '', //邀请码
money: '0',
couponnum: '0',
renzheng: 0,
XCXIsSelect: '否',
useList: [],
token: '',
vipData: [],
vipNameType: '',
dataList: [],
tagsData: [],
blIsJjr: '', //1是经纪人 0不是经纪人
blIsFxy: '', //1是分销员 0不是分销员
blIsYwy: '', //1是业务员 0不是业务员
blIsQds: '', //1是渠道商 0不是渠道商
kfInterval: null, //是否有新客服消息逻辑定时任务
haveNewMsg: false, //是否有新消息
wdfwTj: { //我得服务各内容未使用数量统计 个别服务统计结果并非最终未使用数 不能作为未使用数量依据
fwtc: 0,
xmck: 0,
fwlc: 0,
pt: 0,
xsms: 0,
qyyy: 0
},
}
},
onLoad(e) {
this.token = uni.getStorageSync('token');
this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
if (e.money && e.couponnum) {
this.money = e.money;
this.couponnum = e.couponnum;
}
this.getDataX()
},
onShow() {
this.queryKytcs()
this.hyCheck = this.$queue.getData('hyCheck');
this.tgCheck = this.$queue.getData('tgCheck');
this.userId = uni.getStorageSync('userId')
if (this.userId) {
this.isLogin = false
this.getUserInfo()
this.getAmount()
this.getIsVip()
} else {
this.isShop = 0;
this.isAgency = 0;
this.isLogin = true
this.userName = '匿名'
this.browse = 0
this.fans = 0
this.follow = 0
this.visitor = 0
this.avatar = '../../static/logo.png'
this.isVip = 0
}
this.haveNewMsg = false
if (this.kfInterval == null) {
this.kfInterval = setInterval(() => {
this.selectMsg()
}, 2000)
}
},
methods: {
//查询可用套餐数量
queryKytcs() {
let that = this
this.$Request.get('/app/user/package/queryKytcs', {
userId: uni.getStorageSync('userId'),
type: '104'
}).then(res => {
if (res.data) {
res.data.forEach(item => {
if (item.type == 104) that.wdfwTj.fwtc = item.count
if (item.type == 105) that.wdfwTj.xmck = item.count
if (item.type == 106) that.wdfwTj.fwlc = item.count
if (item.type == 111) that.wdfwTj.pt = item.count
if (item.type == 112) that.wdfwTj.xsms = item.count
if (item.type == 114) that.wdfwTj.qyyy = item.count
});
} else {
that.wdfwTj = {
fwtc: 0,
xmck: 0,
fwlc: 0,
pt: 0,
xsms: 0,
qyyy: 0
}
}
}).catch(res => {
that.wdfwTj = {
fwtc: 0,
xmck: 0,
fwlc: 0,
pt: 0,
xsms: 0,
qyyy: 0
}
})
},
selectMsg() {
let keFuLastMsgCount = this.$queue.getData('keFuLastMsgCount');
let keFuNewMsgCount = this.$queue.getData('keFuNewMsgCount');
if (keFuLastMsgCount == undefined) {
if (keFuNewMsgCount != 0 && keFuNewMsgCount != undefined) this.haveNewMsg = true
} else {
if (keFuNewMsgCount != undefined && keFuNewMsgCount > keFuLastMsgCount) this.haveNewMsg = true
}
},
danxiang() {
uni.navigateTo({
url: '/pages/my/fuwuGengduo'
})
},
getUserInfo() {
this.$Request.get("/app/user/selectUserById").then(res => {
console.log("res.data--->", res.data);
if (res.code == 0) {
this.userName = res.data.userName
this.phone = res.data.phone;
this.invitationCode = res.data.invitationCode
this.avatar = res.data.avatar ? res.data.avatar : '../../static/logo.png'
this.isAuthentication = res.data.isAuthentication
this.isAgency = res.data.isAgency ? res.data.isAgency : 0; //是否是推广员 1是 2否
this.blIsJjr = res.data.blIsJjr; //经纪人
this.blIsFxy = res.data.blIsFxy; //分销员
this.blIsYwy = res.data.blIsYwy; //业务员
this.blIsQds = res.data.blIsQds; //渠道商
this.money = res.data.money
this.couponnum = res.data.member
// uni.setStorageSync('isAuthentication', res.data.isAuthentication)
this.isShop = res.data.isShop ? res.data.isShop : 0;
uni.setStorageSync('avatar', res.data.avatar)
uni.setStorageSync('userName', res.data.userName)
uni.setStorageSync('invitationCode', res.data.invitationCode)
uni.setStorageSync('zhiFuBao', res.data.zhiFuBao)
uni.setStorageSync('zhiFuBaoName', res.data.zhiFuBaoName)
if (res.data.isAuthentication == 0 || res.data.isAuthentication == null) {
this.renzheng = 0
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 1) {
this.renzheng = 1
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 2) {
this.renzheng = 2
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 3) {
this.renzheng = 3
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 4) {
this.renzheng = 4
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 5) {
this.renzheng = 5
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 6) {
this.renzheng = 6
uni.setStorageSync("renzheng", this.renzheng)
}
}
});
},
qiye() {
uni.navigateTo({
url: '/pages/shop/qiyeListMy'
})
},
goMsg() { //客服聊天
let data = {
userId: uni.getStorageSync('userId'),
focusedUserId: '0',
// userName:this.order.userName
}
// app/chat/insertChatConversation
this.$Request.postJson('/app/chat/insertChatConversation', data).then(res => {
if (res.data) {
let id = this.ordersId == res.data.userId ? res.data.focusedUserId : this.ordersId
uni.navigateTo({
url: '/pages/msg/im?chatConversationId=' + res.data.chatConversationId +
'&byUserId=' + res.data.userId
})
}
})
},
getDataX() {
this.$Request.get("/app/massage/package/findPackageAndMassagePage", {
city: '',
page: 1,
limit: 30,
isTj: 1
}).then(res => {
console.log(res);
if (res.code == 0) {
if (res.data) {
this.dataList = res.data.list || {}; //追加新数据
for (var i = 0; i < this.dataList.length; i++) {
this.dataList[i].tagsData = this.dataList[i].labels.split(',');
}
}
}
});
},
qidai() {
uni.showToast({
title: '敬请期待!'
})
},
goChat() {
let kefu = this.$queue.getData('kefu'); // 用户端联系方式 1 手机号 2企业微信
let kefuPhone = this.$queue.getData('kefuPhone');
if (kefu == 1) {
uni.makePhoneCall({
phoneNumber: kefuPhone //仅为示例
});
} else if (kefu == 3) {
uni.navigateTo({
url: '/my/setting/customer'
});
} else {
// #ifdef MP-WEIXIN
let that = this
try {
wx.openCustomerServiceChat({
extInfo: {
url: that.$queue.getData('kefuUrl')
},
corpId: that.$queue.getData('kefuAppId'),
success(res) {},
fail(res) {
console.error(res)
}
})
} catch (error) {
console.error("catchcatch" + error)
uni.showToast({
title: '请更新至微信最新版本'
});
}
// #endif
// #ifndef MP-WEIXIN
let url = this.$queue.getData('kefuUrl');
if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
// #endif
}
},
//退出登录
TuiLogin() {
let that = this
if (that.userId) {
uni.showModal({
title: '提示',
content: '确定退出登录吗?',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.removeStorageSync('userName')
uni.removeStorageSync('avatar')
uni.removeStorageSync('userId')
uni.removeStorageSync('token')
uni.removeStorageSync('phone')
uni.removeStorageSync('zhiFuBaoName')
uni.removeStorageSync('zhiFuBao')
uni.removeStorageSync('invitationCode')
uni.removeStorageSync('unionId')
uni.removeStorageSync('openId')
uni.removeStorageSync('isVIP')
uni.showToast({
title: '退出成功!',
icon: 'none'
})
that.isLogin = true
that.userName = '匿名'
that.browse = 0
that.fans = 0
that.follow = 0
that.visitor = 0
that.isVip = 0
that.avatar = '../../static/logo.png'
that.userId = uni.getStorageSync('userId')
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
//成为按摩师 跳转商户端
bindFb() {
if (this.userId) {
uni.navigateTo({
url: '/pages/my/hehuo'
});
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
goNavOrder(index) {
let token = this.$queue.getData('token');
if (token) {
this.$queue.setData('SelectIndex', index);
uni.switchTab({
url: '/pages/order/index'
})
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
goNav(e, name) {
if (this.userId) {
uni.navigateTo({
url: e
})
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
goLogin(e) {
uni.navigateTo({
url: e
})
},
getAmount() {
this.$Request.get("/app/userBrowse/selectAmount").then(res => {
if (res.code == 0) {
this.browse = res.data.browse
this.fans = res.data.fans
this.follow = res.data.follow
this.visitor = res.data.visitor
}
});
},
getIsVip() {
this.$Request.get("/app/UserVip/selectUserVip").then(res => {
if (res.code == 0) {
this.vipNameType = res.data.vipNameType;
this.isVip = res.data.isVip;
this.$queue.setData('isVIP', this.isVip)
}
});
},
chonghi(link) { //我的钱包
if (this.userId) {
if (link == '充值') {
uni.navigateTo({
url: '/my/wallet/index?text=' + 'my'
})
} else {
uni.navigateTo({
url: '/my/wallet/mymoneydetail'
})
}
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
youhui(link) { //优惠劵,券码兑换,积分兑换 跳页
if (this.userId) {
uni.navigateTo({
url: link
})
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
useToUrl(link) { //常用功能跳转页面
// var link = item.link
if (this.userId) {
uni.navigateTo({
url: link
})
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
tuangou() {
uni.navigateTo({
url: '/pages/my/newTeaml?text=' + 'my'
})
},
miaoshao() {
uni.navigateTo({
url: '/pages/my/newseckill?text=' + 'my'
})
},
meServe(item) {
if (this.userId) {
if (item == "服务套餐") {
uni.navigateTo({
url: '/pages/my/servicePackage'
})
} else if (item == "项目次卡") {
uni.navigateTo({
url: '/pages/my/cika'
})
} else if (item == "服务疗程") {
uni.navigateTo({
url: '/pages/my/fuwuliaocheng'
})
}
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
itemClick(item) {
let limit = 10;
let page = 1;
if (item.type == '104') {
uni.navigateTo({
url: '/pages/my/serviceOderDrtail?id=' + item.id + '&limit=' + limit + '&page=' + page +
'&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
} else if (item.type == '105') {
uni.navigateTo({
url: '/pages/my/cikarDrtail?id=' + item.id + '&limit=' + limit + '&page=' + page +
'&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
} else if (item.type == '106') {
uni.navigateTo({
url: '/pages/my/fuwuliaochengDetail?id=' + item.id + '&limit=' + limit + '&page=' + page +
'&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
} else {
uni.navigateTo({
url: '/pages/my/fuwuDateil?id=' + item.id + '&limit=' + limit + '&page=' + page +
'&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
}
}
}
}
</script>
<style scoped>
.kefu span {
font-size: 14px;
color: #1296db;
}
.kefu image {
width: 50px;
height: 50px;
}
.kefu {
width: 75px;
height: 75px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
right: 0;
bottom: 0;
margin-bottom: 20%;
margin-right: -5px;
}
.shop_label {
display: flex;
flex-wrap: wrap;
margin-top: 4rpx;
}
.shop_label span {
background: linear-gradient(90deg, #ffefde, #fff7ef);
height: 34rpx;
line-height: 34rpx;
border-radius: 8rpx;
padding: 0 10rpx;
font-size: 22rpx;
margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
}
.item-view-xiangmu span:nth-child(2) {
font-weight: normal;
color: #333333;
font-size: 30rpx;
}
.item-view-xiangmu span:nth-child(1) {
font-weight: normal;
color: #666666;
margin-right: 5rpx;
font-size: 30rpx;
}
.item-view-xiangmu {
width: 100%;
display: flex;
flex-direction: row;
font-weight: 400;
font-size: 25rpx;
align-items: flex-end;
}
.item-view-title {
font-weight: bold;
font-size: 32rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-view {
width: 60%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
justify-content: space-between;
padding: 6rpx 0;
}
.item-img {
width: 240rpx;
height: 200rpx;
border-radius: 14rpx;
position: relative;
}
.item-img img {
border-radius: 14rpx;
}
.img-span {
padding: 2px 5px;
font-weight: 400;
font-size: 8px;
color: #FFFFFF;
background: linear-gradient(-90deg, #FF6F48, #FF9E69);
border-radius: 7px 0px 7px 0px;
position: absolute;
bottom: 0px;
right: 0;
margin-bottom: 5px;
margin-right: 5px;
}
.item {
width: 96%;
margin: 0 auto;
display: flex;
flex-direction: row;
justify-content: space-between;
background: #FFFFFF;
border-radius: 21rpx;
margin-top: 10px;
align-items: center;
padding: 12px;
}
.item-detail {
padding: 5rpx 15rpx;
border-radius: 10rpx;
font-size: 28rpx;
color: white;
background-color: #007AFF;
}
.item-line {
position: absolute;
bottom: 0rpx;
left: 0rpx;
height: 1px;
width: 100%;
background-color: #eeeeee;
}
.item-view-bottom-btn {
text-align: center;
width: 131rpx;
height: 50rpx;
line-height: 50rpx;
background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);
border-radius: 10rpx;
font-weight: bold;
font-size: 26rpx;
color: #FFFFFF;
margin-top: 8rpx;
}
.item-view-bottom-qian span:nth-child(4) {
font-size: 26rpx;
color: #848484;
text-decoration-line: line-through;
margin-left: 5px;
}
.item-view-bottom-qian span:nth-child(3) {
font-size: 28rpx;
color: #FF6000;
}
.item-view-bottom-qian span:nth-child(2) {
font-weight: bold;
font-size: 36.81rpx;
color: #FF6000;
}
.item-view-bottom-qian span:nth-child(1) {
font-weight: 400;
font-size: 26rpx;
color: #FF6000;
}
.item-view-bottom-qian {
margin-top: 2px;
}
.item-view-bottom {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.item-view-jianjie {
font-weight: 400;
font-size: 24rpx;
color: #848484;
margin: 5px 0px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/* 显示的行数,可以根据需要修改 */
overflow: hidden;
text-overflow: ellipsis;
}
.item-view-biao {
padding: 1px 2px;
border-radius: 6rpx;
}
.prompt-text {
font-size: 21rpx;
color: #999999;
height: 170rpx;
text-align: top;
text-align: center;
padding: 20rpx 0;
}
.my-use-list-text {
color: #6C6C6C;
margin-top: 5px;
font-size: 14px;
}
.my-use-list image {
width: 76rpx;
height: 76rpx;
}
.my-use {
background: #FFFFFF;
border-radius: 21rpx;
padding: 12px 14px;
display: flex;
flex-direction: column;
margin: 0px auto 12px auto;
}
.my-use-view {
width: 100%;
margin: 5px auto;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.my-serve-view {
width: 86%;
margin: 10px auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.my-use-list {
width: 33%;
margin-top: 15px;
display: flex;
flex-direction: column;
align-items: center;
}
.my-serve-list {
width: 22%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
}
.my-serve-list image {
width: 76rpx;
height: 76rpx;
}
.my-serve-list-text {
color: #6C6C6C;
margin-top: 5px;
font-size: 26rpx;
}
.my-serve-title,
.my-use-title {
width: 95%;
font-weight: bold;
font-size: 30rpx;
color: #333333;
margin-left: 8px;
margin-top: 5px;
}
.width {
width: 94%;
}
.my-serve {
background: #FFFFFF;
border-radius: 21rpx;
padding: 10px;
display: flex;
flex-direction: column;
margin: 0px auto 8px auto;
}
.my-serve,
.my-serve {
background: #FFFFFF;
border-radius: 21rpx;
padding: 12px 14px;
display: flex;
flex-direction: column;
}
.my-head-bottom {
width: 86%;
}
.my-head-bottom image {
width: 100%;
height: 100%;
}
.my-head-mian-bottom-list image {
width: 80rpx;
height: 80rpx;
}
.my-head-mian-bottom-list-text {
font-size: 26rpx;
color: #6C6C6C;
}
.my-head-mian-bottom-list {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.my-head-mian-bottom {
width: 80%;
margin: 0 auto;
display: flex;
flex-direction: row;
justify-content: space-between;
padding-bottom: 30rpx;
margin-top: 30rpx;
border-top: 1px #F6F6F6 solid;
padding-top: 20rpx;
}
.money-list {
display: flex;
flex-direction: column;
align-items: center;
font-size: 20rpx;
margin-top: 20rpx;
color: #666;
}
.my-head-mian-top-yuE {
font-size: 60rpx;
color: #111111;
margin-top: 6rpx;
font-weight: bold;
}
.my-head-mian-top-view-chong,
.my-head-mian-top-view-ming {
width: 260rpx;
height: 58rpx;
line-height: 58rpx;
text-align: center;
border-radius: 60rpx;
font-size: 28rpx;
}
.my-head-mian-top-view-chong {
background: linear-gradient(90deg, #1bc8ac, #1bc8ac, #ffb761);
color: #fff;
}
.my-head-mian-top-view-ming {
background: #e6f6f3;
color: #019c88;
}
.my-head-mian-top-view-qian {
width: 100%;
color: #333;
background-image: linear-gradient(to left, rgba(255, 236, 222, 0.7), rgba(255, 255, 255, 0.8));
margin: 0 auto;
border-radius: 20rpx 20rpx 0 0;
height: 76rpx;
line-height: 74rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0 20rpx;
font-size: 26rpx;
}
.view-more {
display: inline-block;
border-top: 1px solid;
border-right: 1px solid;
width: 15rpx;
height: 15rpx;
border-color: #333;
transform: rotate(45deg);
margin-top: 10rpx;
}
.wallet3 {
width: 38rpx;
height: 34rpx;
}
.my-head-mian-top-view {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20rpx;
justify-content: center;
}
.my-head-mian-top {
width: 95%;
margin: 0 auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding-top: 20rpx;
text-align: center;
justify-content: center;
}
.my-head-mian {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
background-image: url(../../static/vip/reduce1.png);
background-repeat: no-repeat;
background-size: 100% 100%;
border-radius: 21rpx;
}
.my-head-top-id {
width: 26%;
padding: 3rpx 5rpx 6rpx 22rpx;
text-align: center;
/*ckground-image: url(../../static/vip/membership5.png);*/
border-radius: 0 30rpx 30rpx 0;
color: #fff;
position: relative;
}
.my-head-top-id span:nth-child(1) {
margin-left: 20rpx;
font-size: 18rpx;
}
.my-head-texa {
font-size: 26rpx;
color: #555;
}
.my-head-vip {
width: 28rpx;
height: 28rpx;
position: absolute;
left: -20rpx;
top: -10rpx
}
.my-head-top-text {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
color: #3a3f4f;
margin-bottom: 8rpx;
}
.my-head-top-text span:nth-child(1) {
font-size: 32rpx;
font-weight: bold;
}
.my-head-top-text span:nth-child(2) {
font-size: 26rpx;
}
.my-head-top-view {
display: flex;
flex-direction: column;
width: 82%;
}
.my-head-top image {
width: 106rpx;
height: 106rpx;
}
.my-head-top {
width: 100%;
margin: 20px 0px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.my-head {
width: 100%;
/* background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), #f7f7f7), url('../../static/background-img.png');
background-position: center center;
background-repeat: no-repeat;
background-size: cover; */
}
.content {
width: 100%;
height: 100vh;
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), #f7f7f7), url('../../static/background-img.png');
background-position: center right;
background-repeat: no-repeat;
background-size: cover;
/* background: #f7f7f7; */
overflow: auto;
position: relative;
}
.div-with-background {
width: 300px;
/* 你的容器宽度 */
height: 200px;
/* 你的容器高度 */
}
.back-width {
width: 94%;
display: flex;
margin: 12px auto;
}
.money-img {
width: 45rpx;
height: 45rpx;
margin-bottom: 20rpx;
margin-right: 8rpx;
}
.text-xl {
width: 100rpx;
height: 56rpx;
font-size: 26rpx;
background: linear-gradient(-90deg, #0CA891, #23BBA2);
border-radius: 30rpx;
line-height: 56rpx;
color: #fff;
text-align: center;
}
/* 定义闪烁动画 */
@keyframes blink {
0%,
100% {
opacity: 1;
/* 初始和结束状态透明度为1 */
}
50% {
opacity: 0.2;
/* 中间状态透明度降低 */
}
}
/* 应用动画到图片 */
.blinking {
animation: blink 1s infinite;
/* 'blink' 是动画名, '1s' 是持续时间, 'infinite' 表示无限循环 */
width: 50px;
/* 假设设置了宽度 */
height: auto;
/* 自动调整高度 */
}
.wdfw-dsy {
position: absolute;
top: 0px;
right: 8px;
width: 11px;
height: 11px;
display: inline-block;
background-color: #ff5b56;
border-radius: 12px;
border: 3px solid #fff;
z-index: 99;
}
</style>