| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241 |
- <template>
- <scroll-view
- @scrolltolower="scrollTolower"
- :scroll-top="userScrollTop"
- scroll-y="true"
- class="container"
- @scroll="userScroll">
- <view class="top-cont">
- <view :class="fixedTop?'inner fixed':'inner'">
- <!-- 状态栏 -->
- <view :class="fixedTop?'status-bar es-bc-theme':'status-bar'" :style="{ background:headerBG }"></view>
- <view class="top-title-box show" :style="{ background:headerBG }">
- <view>个人中心</view>
- </view>
- </view>
- <view class="my-header-right inner fixed" style="justify-content: space-between;">
- <image style="margin-right: 10px;" src="@/static/image/home1/scancode_black.png" mode="aspectFill" @tap="handleScan()"></image>
- <view style="display: flex; align-items: center;">
- <image src="@/static/image/my/set_icon.png" mode="aspectFill" @tap="navTo('./about')"></image>
- <image :class="isNew ? 'badge':''" @tap="goToMsg()" src="@/static/image/hall/new_hall_icon.png" mode="aspectFill"></image>
- </view>
- </view>
-
- <!-- 用于顶部固定定位后占位 -->
- <view :class="fixedTop?'seat show':'seat'"></view>
-
- <view class="mybox">
- <view class="mybox-info">
- <image class="heads es-br-ban" @tap="navToUserInfo('./userInfo')" :src="!$isEmpty(user.avatar)?user.avatar:defUser.avatar" mode="aspectFill"></image>
- <view>
- <view class="flex-center" @tap="navToUserInfo('./userInfo')">
- <text class="mybox-info-name">{{ isLogin&&user&&user.nickName || '请登录' }}</text>
- <image class="arrow_black" src="@/static/image/my/right_arrow_black_icon.png" mode="aspectFill"></image>
- </view>
- <view class="flex-center" style="margin-top: 22rpx;">
- <view class="flex-center vipbox es-mr-10" v-if="user.isVip==1&&(!$isIos())" @click="loginNavTo('/pages/course/vipBuy')">
- <image class="arrow_black" src="@/static/image/my/lv_icon.png" mode="aspectFill"></image>
- <text>会员</text>
- </view>
- <view class="" v-if="user.userId">
- 用户号:{{user.userId}}
- </view>
- <!-- <view class="flex-center vipbox" style="margin-left: 16rpx;">
- <image class="arrow_black" src="@/static/image/my/lv_icon.png" mode="aspectFill"></image>
- <text>LV.{{user.vipLevel}}</text>
- </view> -->
- </view>
- </view>
- </view>
-
- <!-- 芳华币,币,券信息 -->
- <view class="mybox-integral" v-if="!this.userIsDel()">
- <view class="mybox-integral-item" @click="loginNavTo('/pages/user/integral/points')">
- <view class="num">{{ this.userIsDel()?0:user.integral}}</view>
- <view>芳华币</view>
- </view>
- <view class="mybox-integral-item" @click="loginNavTo('/pages/user/wallet/index')">
- <view class="num">{{ this.userIsDel()?0:user.mayWithdraw}}</view>
- <view>钱包</view>
- </view>
- <view class="mybox-integral-item" @click="loginNavTo('/pages/user/coupon/myCouponList?type=0')">
- <view class="num">{{ this.userIsDel()?0:coupons.notUsedCount}}</view>
- <view>待用券</view>
- </view>
- <view class="mybox-integral-item" @click="loginNavTo('/pages/user/coupon/myCouponList?type=1')">
- <view class="num">{{ this.userIsDel()?0:coupons.usedCount}}</view>
- <view>已用券</view>
- </view>
- <!-- <view class="mybox-integral-item" @click="loginNavTo('/pages/user/coupon/myCouponList?type=2')">
- <view class="num">{{ this.userIsDel()?0:coupons.expiredCount}}</view>
- <view>过期券</view>
- </view> -->
- </view>
-
- <!-- vip会员 -->
- <!-- <view class="vip-card" v-if="user.userId&&(!$isIos())&&!this.userIsDel() ">
- <view>
- <view class="flex-center vip-card-info">
- <image src="@/static/image/my/VIP_member.png" mode="aspectFill"></image>
- <text>{{getDayMix(user.vipEndDate)}}</text>
- </view>
- <view class="flex-center vip-card-price">续费享季卡会员约<text>6.5</text>折</view>
- </view>
- <view class="buyvip" @click="loginNavTo('/pages/course/vipBuy')" >立即续费</view>
- </view> -->
- <!-- <view style="height: 172rpx;margin-top: 28rpx;width: 100%;" v-if="user.userId&&!this.userIsDel()" @click="loginNavTo('/pages/user/integral/integralGoodsList')">
- <image style="width: 100%;height: 100%;" src="@/static/images/ad/2.png" mode="aspectFill"></image>
- </view> -->
-
- <view class="activity-area">
- <view v-if="!$isIos()" class="activity-item vip-bg" @click="loginNavTo('/pages/course/vipBuy')">
- <view class="title-row">
- <image style="width: 160rpx;" src="/static/image/my/vip_img.png" mode="widthFix"></image>
- <view class="desc">续费享约<text class="highlight">6.5</text>折</view>
- </view>
- <view class="action-btn">立即续费</view>
- </view>
-
- <view class="activity-item coin-bg" :class="{'activity-item1':$isIos() }" @click="loginNavTo('/pages/user/integral/integralGoodsList')">
- <view class="title-row">
- <image style="width: 178rpx;" src="/static/image/my/fanghua_icon.png" mode="widthFix"></image>
- <view class="desc"><text class="highlight">0</text>元好物任性换</view>
- </view>
- <view class="action-btn">立即兑换</view>
- </view>
- </view>
- <!-- 我的订单 医疗服务等 -->
- <view class="mybox-menu" v-for="(item, index) in menuList" :key="index" v-show="item.showMenu">
- <view class="mybox-menu-title">{{item.menuTitle}}</view>
- <view class="mybox-menu-box">
- <view class="mybox-menu-item" v-for="(menu, idx) in item.menus" :key="idx" v-show="menu.isShow" @click="handleMenu(menu)">
- <image :src="menu.icon" mode="aspectFill"></image>
- <text>{{menu.name}}</text>
- </view>
- </view>
- </view>
- </view>
-
- <view class="btns" v-if="isLogin" >
- <view class="login-btn" @click="showLogout">退出登录</view>
- </view>
-
- <u-modal
- :show="showCustomModal"
- title="系统提醒"
- content="当前账户已注销部分功能禁用,医疗行业受法律监管用户问诊订单/病历等数据必须保留15年以上不可删除"
- :show-cancel-button="false"
- confirm-text="确定"
- @confirm="showCustomModal = false">
- </u-modal>
-
- </view>
-
- </scroll-view>
- </template>
- <script>
- import { getIOSPayStatus } from '@/api/common.js';
- import {startDrugReport,getUserFollowDoctor} from '@/api/drugReport';
- import {getUserInfo,getMyCouponCount} from '@/api/user'
- // #ifdef APP-PLUS
- import permision1 from "@/utils/permission.js"
- // #endif
- const avatar="/static/image/hall/my_heads_icon.png";
- import IMSDK,{ SessionType } from "openim-uniapp-polyfill";
- import { navigateToDesignatedConversation,callingModule, meetingModule,setConversation } from "@/pages_im/util/imCommon";
- import { Igexin } from '@/pages_im/util/common.js';
- import { isIos } from '../../utils/common';
- export default {
- data() {
- return {
- isLogin: false,
- coupons:{
- expiredCount:0,
- notUsedCount: 0,
- usedCount: 0
- },
- show:false,
- defUser:{
- avatar:avatar,
- nickName:"请登录",
- userName:"请登录",
- phone:"",
- integral:0,
- balance:0
- },
- user:{
- avatar:"/static/image/hall/my_heads_icon.png",
- userName:"",
- phone:"",
- nickName:"",
- integral:0,
- balance:0,
- userId:null,
- isDel:0,
- status:1
- },
- isNew:false,
- top:0,
- userScrollTop: 0,
- fixedTop: false, // 是否固定头部
- statusBarHeight: uni.getStorageSync('statusBarHeight'),
- menuList: [],
- isIos: false,
- showIOSPay: 0,
- showManageCts:false,
- showCustomModal:false,
- showRemove:false,
- hasOpenCustomBox:false,
- registrationID:''
- }
- },
- onLoad(){
- let that=this;
- uni.$on('refreshUserInfo', function() {
- if(that.$isLogin()){
- that.$updateMsgDot()
- } else {
- that.isLogin = that.$isLogin()
- }
- });
- uni.$on('loginOut', function() {
- if(that.$isLogin()){
- that.logout();
- }
- });
- if(!this.$qconfig.isAppStore){ //应用市场版本隐藏芳华币商城
- let integralMenus=(this.menuList[2]).menus;
- let integralSubMenu={name: '芳华币商城',icon: "../../static/image/my/my_points_icon.png",pageUrl:"/pages/user/integral/integralGoodsList"};
- integralMenus.splice(2, 0, integralSubMenu);
- }
- // #ifdef APP-PLUS
- permision1.checkPush();
- // #endif
- },
- onUnload() {
- uni.$off('refreshUserInfo');
- },
- onShow() {
- this.isLogin = this.$isLogin()
- let token= uni.getStorageSync('AppToken');
- if(this.$isLogin()){
- this.getUserInfo();
- this.getMyCouponCount();
- this.$updateMsgDot()
- }else{
- this.user=this.defUser;
- uni.navigateTo({
- url: '/pages/auth/loginIndex'
- })
- return;
- }
- // #ifdef APP-PLUS
- this.isIos = (plus.os.name == "iOS")
- //if(this.$isIos()) {
- this.getIOSPayStatusFun();
- //}
- // #endif
- },
- created() {
- this.initMenu();
- },
- methods: {
- initMenu(){
- this.menuList=[
- {
- menuTitle: "我的订单",
- showMenu:true,
- menus: [
- {
- name: '问诊订单',
- icon: "../../static/image/my/my_order_icon.png",
- pageUrl:"/pages/store/inquiryOrderList",
- isShow:true
- },{
- name: '处方订单',
- icon: "../../static/image/my/my_cforder_icon.png",
- pageUrl:"/pages/store/storeOrderList",
- isShow:true
- },{
- name: '健康疗法',
- icon: "../../static/image/my/my_health_therapy_icon.png",
- pageUrl:"/pages/store/packageOrderList",
- isShow:true
- },{
- name: '售后服务',
- icon: "../../static/image/my/my_service_icon.png",
- pageUrl:"/pages/store/storeOrderRefundList",
- isShow:true
- },{
- name: '芳华币订单',
- icon: "../../static/image/my/my_cforder_icon.png",
- pageUrl:"/pages/user/integral/integralOrderList",
- isShow:true
- },
- {
- name: '中奖记录',
- icon: "../../static/image/my/my_order_icon.png",
- pageUrl:"/pages/courseAnswer/winningRecord",
- isShow:true
- },
- {
- name: '直播订单',
- icon: "../../static/image/my/my_cforder_icon.png",
- pageUrl:"/pages_live/shopping/order",
- isShow:true
- },
- {
- name: '直播售后',
- icon: "../../static/image/my/my_cforder_icon.png",
- pageUrl:"/pages_live/shopping/storeOrderRefundList",
- isShow:true
- },
- {
- name: '省钱订单',
- icon: "../../static/image/my/savemoney_icon.png",
- pageUrl:"/pages/points/shopOrder",
- isShow:true
- }
- ]
- },
- {
- menuTitle: "医疗服务",
- showMenu:true,
- menus: [
- // {
- // name: '血糖血压仪',
- // icon: "../../static/image/my/my_points_icon.png",
- // pageUrl:"/pages_bluetooth/healthMeter",
- // isShow:true
- // },
- {
- name: '我的处方',
- icon: "../../static/image/my/my_prescription_icon.png",
- pageUrl:"/pages/store/prescribeList",
- isShow:true
- },{
- name: '我的医生',
- icon: "../../static/image/my/my_doctor_icon.png",
- pageUrl:"./myDoctorList",
- isShow:true
- },{
- name: '随访服务',
- icon: "../../static/image/my/follow_up_icon.png",
- pageUrl:"/pages/user/followList",
- isShow:true
- },{
- name: '用药咨询',
- icon: "../../static/image/my/medical_consultation_icon.png",
- pageUrl:"/pages/store/inquiryOrderList",
- isIm:true,
- isShow:true
- },{
- name: '用药报告',
- icon: "../../static/image/my/medication_report_icon.png",
- pageUrl:"/pages/user/drugReportList",
- isShow:true
- }
- ,{
- name: '健康档案',
- icon: "../../static/image/my/my_order_icon.png",
- pageUrl: "/pages/user/healthRecords/index",
- isShow:true
- },
- {
- name: '健康周报',
- icon: "../../static/image/my/health_report_icon.png",
- pageUrl: "/pages_watch/health/healthWeekReport?selectUser=0",
- isShow:true
- }
- ]
- },
- {
- menuTitle: "我的应用",
- showMenu:!this.userIsDel(),
- menus: [
- {
- name: '就诊管理',
- icon: "../../static/image/my/visit_icon.png",
- pageUrl:"./patient",
- isShow:true
- }
- ,{
- name: '地址管理',
- icon: "../../static/image/my/address_management_icon.png",
- pageUrl:"./address",
- isShow:true
- },{
- name: '领券中心',
- icon: "../../static/image/my/coupon_collection.png",
- pageUrl:"/pages/company/couponList?couponType=6",
- isShow:true
- },{
- name: '直播',
- icon: "../../static/image/my/live.png",
- pageUrl:"/pages_live/livingList",
- isShow:true
- }
- // ,{
- // name: '芳华币商城',
- // icon: "../../static/image/my/my_points_icon.png",
- // pageUrl:"/pages/user/integral/integralGoodsList"
- // }
- ,{
- name: '会员中心',
- icon: "../../static/image/my/member_icon.png",
- isUserService:true,
- pageUrl:"",
- isShow:!isIos()
- }
- ,{
- name: '舌苔报告',
- icon: "../../static/image/my/shetai.png",
- pageUrl: "/pages/user/tongue/tongueList",
- isShow:!isIos()
- }
- // ,{
- // name: '健康管家',
- // icon: "../../static/image/my/my_doctor_icon.png",
- // pageUrl: "/pages/user/addHealthButler"
- // }
- ,{
- name: '开票历史',
- icon: "../../static/image/my/invoicing_icon.png",
- pageUrl:"/pages/store/invoice/invoiceList",
- isShow:true
- },{
- name: '客服中心',
- icon: "../../static/image/my/service_center_icon.png",
- pageUrl:"",
- isShow:true,
- },{
- name: '看课通知',
- icon: "../../static/image/my/my_order_icon.png",
- pageUrl: "/pages/courseAnswer/list",
- isShow:true
- },{
- name: '投诉建议',
- icon: "../../static/image/my/tsjy.png",
- pageUrl: "/pages/user/feedback",
- isShow:true
- },{
- name: '资质证书',
- icon: "../../static/image/my/qualifications_icon.png",
- pageUrl: "/pages/user/cert",
- isShow:true
- }
- ]
- },
- {
- menuTitle: "我的视频",
- showMenu:!this.userIsDel(),
- menus: [
- {
- name: '我的收藏',
- icon: "../../static/image/my/collect_icon.png",
- pageUrl:"./myFavoriteVideo",
- isShow:true
- }
- // ,{
- // name: '我的评论',
- // icon: "../../static/image/my/evaluate_icon.png",
- // pageUrl:"/pages/store/inquiryOrderPingList"
- // }
- ]
- },
-
- {
- menuTitle: "管理应用",
- showMenu:!this.userIsDel(),
- menus: [
- {
- name: '医生入驻',
- icon: "../../static/image/my/doctor_entrance_icon.png",
- pageUrl:"/pages/user/registerDoctor?type=1",
- isShow:true
- },{
- name: '药师入驻',
- icon: "../../static/image/my/pharmacist_entrance_icon.png",
- pageUrl:"/pages/user/registerDoctor?type=2",
- isShow:true
- }
- ,{
- name: '达人主页',
- icon: "../../static/image/my/drzy_icon.png",
- pageUrl:"/pages/expert/index",
- isShow:true
- }
- ,{
- name: '客服登录',
- icon: "../../static/image/my/login_icon.png",
- isService:true,
- pageUrl:"",
- isShow:this.manageSaleShow()
- },{
- name: '关于我们',
- icon: "../../static/image/my/feedback_icon.png",
- pageUrl:"./about",
- isShow:true
- }
- ]
- }
- ];
- },
-
- getIOSPayStatusFun() {
- getIOSPayStatus().then(res=>{
- if(res.code == 200) {
- //console.log("qxj getIOSPayStatus res",res);
- this.showIOSPay = parseInt(res.iosPayStatus);
- this.showManageCts=parseInt(res.showManageCts) || false;
- this.showRemove=parseInt(res.showRemove);
- uni.setStorageSync("showManageCts",this.showManageCts);
- uni.setStorageSync("showIOSPay",this.showIOSPay);
- uni.setStorageSync("showRemove",this.showRemove);
- this.updateMenuVisibility();
- }
- })
- },
- doIM(){
- uni.showLoading({
- title:"处理中..."
- });
- getUserFollowDoctor().then(res => {
- if(res.code==200){
- if(res.data!=null){
- let data=res.data;
- var params={followId:data.followId};
- console.log(data);
- startDrugReport(params).then(res => {
- uni.hideLoading();
- var that=this;
- var user = JSON.parse(uni.getStorageSync('userInfo'));
- var uid = 'U' + user.userId;
- var did='D' + data.followDoctorId;
- var conversationID=`si_${did}_${uid}`;
- this.$store.commit("timStore/setOrderId",data.orderId);
- this.$store.commit("timStore/setFollowId",data.followId);
- this.$store.commit("timStore/setImType", 2);
- this.$store.commit("timStore/setConversationID", conversationID);
- navigateToDesignatedConversation(did,SessionType.Single,false).then((res) => {
- // setConversation(conversationID,JSON.stringify(ex)).then(() => {
- // console.log("qxj setConversation ex:"+JSON.stringify(ex));
- // }).catch(() => {});
- }).catch(() => uni.$u.toast("操作失败") );
- },
- rej => {}
- );
-
- }
- else{
- uni.hideLoading()
- uni.showToast({
- icon:'none',
- title: "当前没有药师为您服务",
- });
- }
- }else{
- uni.showToast({
- icon:'none',
- title: "请求失败",
- });
- }
- },
- rej => {}
- );
- },
- toIM(){
- if(this.$isLogin()){
- this.doIM();
- }
- else{
- this.$showLoginPage();
- }
- },
- toCompany(){
- if(this.$isLogin()){
- var token = uni.getStorageSync('CompanyUserToken');
- if (token) {
- uni.navigateTo({
- url: '/pages/company/index'
- })
- } else {
- uni.navigateTo({
- url: '/pages/company/login'
- })
- }
- }else{
- this.$showLoginPage();
- }
- },
- showLogout(){
- //this.show=true;
- let that = this;
- uni.showActionSheet({
- title:"确认退出吗",
- itemList: ["确定"],
- success: function(res) {
- that.logout();
- that.isLogin = that.$isLogin()
- // uni.navigateTo({
- // url: '/pages/auth/loginIndex'
- // })
- }
- });
- },
- hideLogout(){
- this.show=false;
- },
- logout(){
- uni.removeStorageSync('sendCourseQiWeiData')
- this.$logout();
- this.$clearVideoCacheOnLogout();
- let IMUserID = uni.getStorageSync('IMUserID');
- IMSDK.asyncApi(IMSDK.IMMethods.Logout, IMSDK.uuid()).then(() => {
- callingModule?.endCall();
- meetingModule?.endCall();
- }).catch((err) => console.log(err))
- .finally(() => {
- Igexin.unbindAlias(IMUserID);
- uni.removeStorage({key: "IMToken"});
- uni.removeStorage({key: "IMUserID"});
- uni.removeStorage({key: "IMHasLogin"});
-
- });
-
- this.user=this.defUser;
- this.coupons.expiredCount=0;
- this.coupons.notUsedCount=0;
- this.coupons.usedCount=0;
- },
-
- handleMenu(item) {
- if(item.isIm!=undefined && item.isIm){
- this.toIM();
- }
- else if(item.isService!=undefined && item.isService){
- this.toCompany();
- }
- else if(item.isUserService!=undefined && item.isUserService){
- this.loginNavTo('/pages/course/vipBuy')
- }
- else if(item.isServerCenter!=undefined && item.isServerCenter){
- this.gotoMiniProgram("/page_user/service");
- } else if(item.name == '客服中心') {
- const url = getApp().globalData.kfurl //企业微信客服链接
- const corpId = getApp().globalData.corpId //企业id
- this.openCustomerServiceChat(url,corpId)
- } else{
- this.loginNavTo(item.pageUrl)
- }
- },
- navTo(url){
- console.log("qxj url",url);
- uni.navigateTo({
- url: url
- });
- },
- loginNavTo(url){
- if(!this.$isLogin()){
- this.$showLoginPage();
- return;
- }
- uni.navigateTo({
- url: url
- });
- },
- navToUserInfo(url){
- if(!this.$isLogin()){
- this.$showLoginPage();
- return;
- }
- uni.navigateTo({
- url: "./userInfo?userId="+this.user.userId
- });
- },
- navToServerCenter(){
- if(!this.$isLogin()){
- this.$showLoginPage();
- return;
- }
- },
- getUserInfo(){
- let that=this;
- getUserInfo().then(res => {
- if(res.code==200){
- if(res.user!=null){
-
- uni.setStorageSync('userInfo',JSON.stringify(res.user));
- this.user=res.user;
- this.registrationID = uni.getStorageSync("registrationID");
- if(!this.user.jpushId || this.registrationID!=this.user.jpushId){
- uni.setStorageSync("registrationID","");
- this.$getRegistrationID('update');
- }
- if(this.userIsDel() && !this.hasOpenCustomBox){
- this.initMenu();
- this.showCustomModal=true;
- this.hasOpenCustomBox=true;
- }
- }
- else{
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- }
- }
- },
- rej => {}
- );
- },
- getMyCouponCount(){
- let that=this;
- getMyCouponCount().then(res => {
- if(res.code==200){
- this.coupons=res.data;
- }
- },
- rej => {}
- );
- },
- getUserNickName(){
- let nickName="";
- if(!this.$isLogin()){ //已登录
- nickName="请登录";
- return nickName;
- }
- nickName=this.$isEmpty(this.user.nickName)?"请登录":this.user.nickName;
- return nickName;
- },
- userScroll(e) {
- if(e.detail.scrollTop >= 50) {
- this.fixedTop = true
- } else {
- this.fixedTop = false
- }
- this.top=e.detail.scrollTop;
- },
- scrollTolower(){
-
- },
- getDayMix(vipEndDate){
- // 假设 vipEndDate 字符串
- //let vipEndDate = "2024-09-06T14:43:36.000+0800";
- // 将 vipEndDate 解析为日期对象
- let endDate = new Date(vipEndDate);
- // 获取当前日期
- let currentDate = new Date();
- // 计算时间差(毫秒)
- let timeDiff = endDate - currentDate;
- // 计算天数差
- let dayDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));
- let dayStr="";
- // 输出结果
- if (dayDiff > 0) {
- dayStr=`VIP到期还有${dayDiff}天`;
- } else if (dayDiff === 0) {
- dayStr="今天是VIP到期日";
- } else {
- dayStr=`VIP已过期${Math.abs(dayDiff)}天`;
- }
- return dayStr;
- },
- goToMsg(){
- uni.switchTab({
- url: '/pages_im/pages/conversation/conversationList/index'
- });
- },
- async openCustomerServiceChat(url,corpId) {
- // #ifdef H5
- window.location.href = url
- // #endif
- // #ifdef MP-WEIXIN
- wx.openCustomerServiceChat({
- extInfo: {
- url
- },
- corpId,
- success(res) {
- console.log('成功');
- },
- fail(err) {
- console.log(err, '报错');
- }
- })
- // #endif
-
- // #ifdef APP-PLUS
- let shares = await this.getAppShare().catch(err => {
- throw Error(err)
- });
- shares['weixin'].openCustomerServiceChat({
- corpid: corpId,
- url
- }, suc => {
- console.log("客服打开成功", JSON.stringify(res))
- }, err => {
- console.log("error", JSON.stringify(err))
- })
- // #endif
- },
- getAppShare() {
- // #ifdef APP-PLUS
- return new Promise((re, rj) => {
- let shares = null;
- var pusher = plus.share.getServices(function(s) {
- shares = {};
- s.forEach(e => shares[e.id] = e);
- re(shares)
- }, function(e) {
- rj(e);
- });
- });
- // #endif
- },
- gotoMiniProgram(pageUrl){
- plus.share.getServices(function(res){
- var sweixin = null;
- for(var i=0;i<res.length;i++){
- var t = res[i];
- if(t.id == 'weixin'){
- sweixin = t;
- }
- }
- if(sweixin){
- //唤起微信跳转小程序
- sweixin.launchMiniProgram({
- id:"gh_feb7753a310b",//gh_7a6a32e5ef61 御君方互医
- path:pageUrl,
- type:0
- },function(){
- console.log("微信唤起成功");
- return true;
- },function(e){
- console.log("微信唤起失败",e);
- uni.showToast({
- title:'微信唤起失败,请检查是否有微信应用',
- icon:'none'
- })
- return false;
- })
-
- }
- else{
- uni.showToast({
- title:'微信唤起失败,请检查是否有微信应用',
- icon:'none',
- duration:3000
- })
- return false;
- }
-
- },function(res){
-
- });
- },
- userIsDel(){
- return this.user.status==0;
- },
- updateMenuVisibility() {
- // 找到管理应用菜单
- const manageAppMenu = this.menuList.find(menu => menu.menuTitle === "管理应用");
- if (manageAppMenu) {
- // 找到客服登录菜单项
- const customerServiceItem = manageAppMenu.menus.find(item => item.name === "客服登录");
- if (customerServiceItem) {
- // 根据showManageCts设置显示状态
- customerServiceItem.isShow = this.manageSaleShow();
- }
- }
- },
- manageSaleShow(){
- return true;
- //return (!isIos() || (isIos() && this.showManageCts));
- },
- handleScan(){
- console.log("qxj handleScan");
- this.navTo('/pages_watch/healthMonitoring/scanCode?typeFun=getScanCodeInfo');
- }
- },
- computed: {
- // 计算属性的 getter
- headerBG:function() {
- var top=this.top/88;
- return 'rgba(253,224,204, ' + top + ')';
- },
- }
-
-
- }
- </script>
- <style scoped lang="scss">
- page{
- height: 100%;
- background: #f7f7f7;
- }
- .top-cont{
- // height: 370rpx;
- position: relative;
- &::after{
- content: '';
- width: 100%;
- height: 370rpx;
- position: absolute;
- z-index: -1;
- left: 0;
- top: 0;
- border-radius: 0 0 50rpx 50rpx;
- }
- .inner.fixed{
- width: 100%;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 999;
- }
- .seat{
- display: none;
- height: var(--status-bar-height);
- &.show{
- display: block;
- }
- }
- .status-bar{
- background-color:rgba(253,224,204,1) ;
- height: var(--status-bar-height);
- }
- .status-bar.main-bg {
- background-color: #fff;
- }
- .top-title-box{
- height: 88rpx;
- line-height: 88rpx;
- text-align: center;
- background-color: #fff;
- font-size: 18px;
- color: #333;
- font-weight: 550;
- display: none;
- &.show{
- display: block;
- }
- }
- }
-
- .top-section{
- .bg-img{
- position: fixed;
- width: 100%;
- top: 0;
- left: 0;
- right: 0;
- height: 524rpx;
- z-index: 0;
- }
- }
-
- @mixin u-flex($flexD, $alignI, $justifyC) {
- display: flex;
- flex-direction: $flexD;
- align-items: $alignI;
- justify-content: $justifyC;
- }
-
- .flex-center {
- @include u-flex(row, center, flex-start);
- }
-
- .container {
- background-image: url("@/static/image/hall/home_top_bg.png");
- background-repeat: no-repeat;
- background-size: 100%;
- font-family: PingFang SC, PingFang SC;
- // padding-top: var(--status-bar-height);
- padding-bottom: 20rpx;
- height: 100%;
- }
-
- .my-header-right {
- height: 88rpx;
- padding-right: 28rpx;
- margin-top: var(--status-bar-height);
- @include u-flex(row,center, flex-end);
- image {
- margin-left: 32rpx;
- width: 48rpx;
- height: 48rpx;
- position: relative;
- }
- .badge::after {
- content: "";
- width: 16rpx;
- height: 16rpx;
- background: #FF5C03;
- border-radius: 50%;
- position: absolute;
- right: 0;
- top: 0;
- }
- }
- .mybox {
- padding: 12rpx 24rpx;
- &-info {
- @include u-flex(row, center, flex-start);
- &-name {
- font-weight: 600;
- font-size: 40rpx;
- color: #222222;
- }
- .heads {
- width: 128rpx;
- height: 128rpx;
- border-radius: 50%;
- margin-right: 16rpx;
- }
- .arrow_black {
- width: 48rpx;
- height: 48rpx;
- }
- .vipbox {
- background: linear-gradient( 90deg, #F26F00 0%, #FF9D1F 100%);
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- border: 1rpx solid #FEDDB9;
- font-weight: 500;
- font-size: 22rpx;
- color: #FEF5EA;
- padding: 0 22rpx 0 12rpx;
- }
- }
- &-integral {
- margin-top: 48rpx;
- @include u-flex(row, center, flex-start);
- &-item {
- width: 25%;
- text-align: center;
- font-weight: 400;
- font-size: 24rpx;
- color: #757575;
- }
- .num {
- margin-bottom: 12rpx;
- font-family: DIN, DIN;
- font-weight: 500;
- font-size: 40rpx;
- color: #313131;
- }
- }
- &-menu {
- background: #FFFFFF;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- padding: 32rpx 32rpx 36rpx 32rpx;
- margin: 20rpx 0;
- &-title {
- font-weight: 600;
- font-size: 36rpx;
- color: #222222;
- margin-bottom: 42rpx;
- }
- &-box {
- @include u-flex(row, center, flex-start);
- margin-bottom: -40rpx;
- flex-wrap: wrap;
- }
- &-item {
- width: 25%;
- margin-bottom: 40rpx;
- @include u-flex(column, center, center);
- font-weight: 400;
- font-size: 24rpx;
- color: #222222;
- image {
- height: 48rpx;
- width: 48rpx;
- margin-bottom: 10rpx;
- }
- }
- }
- }
- .vip-card {
- height: 172rpx;
- margin-top: 28rpx;
- background: url("@/static/image/my/vip_bg_left.png") no-repeat left / 128rpx 172rpx,
- url("@/static/image/my/vip_bg_right.png") no-repeat right / 324rpx 172rpx,
- linear-gradient( 90deg, #FFF3DF 0%, #FADBA9 100%);
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- padding: 0 32rpx;
-
- box-sizing: border-box;
- @include u-flex(row, center, space-between);
- &-info {
- font-weight: 400;
- font-size: 24rpx;
- color: #834F00;
- margin-bottom: 26rpx;
- image {
- width: 126rpx;
- height: 30rpx;
- margin-right: 34rpx;
- }
- }
- &-price {
- font-weight: 500;
- font-size: 32rpx;
- color: #885201;
- line-height: 38rpx;
- text {
- font-family: Roboto, Roboto;
- font-weight: bold;
- font-size: 40rpx;
- color: #EA8F07;
- margin: 0 8rpx;
- }
- }
- .buyvip {
- height: 72rpx;
- background: #885201;
- border-radius: 36rpx 36rpx 36rpx 36rpx;
- font-weight: 600;
- font-size: 28rpx;
- color: #FFF6E7;
- line-height: 72rpx;
- padding: 0 32rpx;
- display: inline-block;
- }
- }
- .vip-card {
- height: 172rpx;
- margin-top: 28rpx;
- background: url("@/static/image/my/vip_bg_left.png") no-repeat left / 128rpx 172rpx,
- url("@/static/image/my/vip_bg_right.png") no-repeat right / 324rpx 172rpx,
- linear-gradient( 90deg, #FFF3DF 0%, #FADBA9 100%);
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- padding: 0 32rpx;
-
- box-sizing: border-box;
- @include u-flex(row, center, space-between);
- &-info {
- font-weight: 400;
- font-size: 24rpx;
- color: #834F00;
- margin-bottom: 26rpx;
- image {
- width: 126rpx;
- height: 30rpx;
- margin-right: 34rpx;
- }
- }
- &-price {
- font-weight: 500;
- font-size: 32rpx;
- color: #885201;
- line-height: 38rpx;
- text {
- font-family: Roboto, Roboto;
- font-weight: bold;
- font-size: 40rpx;
- color: #EA8F07;
- margin: 0 8rpx;
- }
- }
- .buyvip {
- height: 72rpx;
- background: #885201;
- border-radius: 36rpx 36rpx 36rpx 36rpx;
- font-weight: 600;
- font-size: 28rpx;
- color: #FFF6E7;
- line-height: 72rpx;
- padding: 0 32rpx;
- display: inline-block;
- }
- }
- .btns{
- height: 110rpx;
- }
-
- .login-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- flex: 1;
- margin:0 30rpx;
- height: 80rpx;
- background: #fff;
- // box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
- border-radius: 40rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333;
- }
-
- .activity-area {
- display: flex;
- justify-content: space-between;
- margin-top: 20rpx;
- }
- .activity-item {
- width: 48.5%;
- height: 160rpx;
- border-radius: 16rpx;
- padding: 12rpx;
- box-sizing: border-box;
- position: relative;
- display: flex;
- align-items: center;
- overflow: hidden;
- }
-
- .activity-item1 {
- width: 99% !important;
- }
-
- .vip-bg {
- background-image: url('/static/image/my/vip_bg.png');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
- .coin-bg {
- background-image: url('/static/image/my/fanghua_icon_bg.png');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
- .desc {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 20rpx;
- color: #995316;
- .highlight {
- font-family: Roboto, Roboto;
- font-weight: bold;
- font-size: 28rpx;
- color: #995316;
- margin: 0 4rpx;
- }
- }
- .action-btn {
- position: absolute;
- right: 12rpx;
- top: 50%;
- transform: translateY(-50%);
- background: #fff;
- font-size: 24rpx;
- padding: 10rpx 20rpx;
- border-radius: 30rpx;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 20rpx;
- }
- .vip-bg .action-btn {
- color: #B47000;
- }
- .coin-bg .action-btn {
- color: #DF4E00;
- }
-
- </style>
|