123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669 |
- <template>
- <view class="content">
- <view class="cont">
- <view class="bg">
- <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/bbe743373f4d4b78852ea5fd9824ade4.png"></image>
- </view>
- <view class="cont-box">
- <view class="status_bar" :style="{height: statusBarHeight}"></view>
- <view class="top-title">
- </view>
- <view class="user" @click.stop="loginNavTo('/pages_user/personInfo')">
- <view class="left" >
- <image :src="user.avatar==null?'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/90d9eb0f8f87482b977611eb36b66d82.jpg':user.avatar"></image>
- </view>
- <view class="right" >
- <view class="name-box" >
- <view class="name">{{user.nickName}}</view>
- <view class="btns" >
- <image src="../../static/images/icon_set.png"></image>
- </view>
- </view>
- <view class="phone" v-if="user.phone!=''">{{$parsePhone(user.phone)}}</view>
- <view class="counts">
- <view class="count" @click="loginNavTo('/pages_user/integral')">积分 {{user.integral}}</view>
- <!-- <view class="count">我的健康金 {{user.balance}}</view> -->
- </view>
- </view>
- </view>
- <view class="menus">
- <view class="title-box" >
- <view class="line"></view>
- <view class="title">我的订单</view>
- </view>
- <view class="menu-box">
- <view class="menu" @click="loginNavTo('/pages_order/inquiryOrderList')">
- <image src="../../static/images/icon_inquiry_order.png"></image>
- <view class="title">咨询订单</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_order/storeOrderList')">
- <image src="../../static/images/icon_store_order.png"></image>
- <view class="title">处方订单</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_order/packageOrderList')">
- <image src="../../static/images/icon_qianyue.png"></image>
- <view class="title">服务包</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_order/storeOrderRefundList')">
- <image src="../../static/images/sales_orders_icon.png"></image>
- <view class="title">售后服务</view>
- </view>
-
- </view>
-
- </view>
- <view class="menus">
- <view class="title-box">
- <view class="line"></view>
- <view class="title">医疗服务</view>
- </view>
- <view class="menu-box">
- <view class="menu" @click="loginNavTo('/pages_user/myDoctorList')">
- <image src="../../static/images/icon_my_doctor.png"></image>
- <view class="title">我的医生</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_order/prescribeList')">
- <image src="../../static/images/icon_my_prescription.png"></image>
- <view class="title">我的处方</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_user/followList')">
- <image src="../../static/images/icon_my_follow.png"></image>
- <view class="title">我的随访</view>
- </view>
- <view class="menu" @click="toIM()">
- <image src="https://cos.his.cdwjyyh.com/fs/20240429/6e68b42d9d824532945a1dda73350576.png"></image>
- <view class="title">用药咨询</view>
- </view>
- <view class="menu" @click="navTo('/pages_user/drugReportList')" >
- <image src="https://cos.his.cdwjyyh.com/fs/20240429/6b9f340b16e74fa2bc095265d525769e.png"></image>
- <view class="title">用药报告</view>
- </view>
- </view>
-
- </view>
- <view class="menus">
- <view class="title-box">
- <view class="line"></view>
- <view class="title">常用应用</view>
- </view>
- <view class="menu-box">
- <view class="menu" @click="loginNavTo('/pages_user/patient')">
- <image class="min-image" src="../../static/images/icon_visitor_management.png"></image>
- <view class="title">就诊管理</view>
- </view>
-
- <view class="menu" @click="loginNavTo('/pages_user/address')">
- <image class="min-image" src="../../static/images/icon_address_management.png"></image>
- <view class="title">地址管理</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_user/healthRecords/index')">
- <image class="min-image" src="../../static/images/icon_visitor_management.png"></image>
- <view class="title">健康档案</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_user/tongue/tongueList')">
- <image class="min-image" src="../../static/images/icon_visitor_management.png"></image>
- <view class="title">舌苔报告</view>
- </view>
-
- <view class="menu" @click="loginNavTo('/pages_user/addHealthButler')">
- <image class="min-image" src="../../static/images/icon_my_doctor.png"></image>
- <view class="title">健康管家</view>
- </view>
-
-
-
- </view>
- <view class="menu-box">
- <view class="menu" @click="loginNavTo('/pages_user/myCouponList')">
- <image class="min-image" src="../../static/images/icon_my_coupon.png"></image>
- <view class="title">我的优惠卷</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_company/couponList?couponType=6')">
- <image class="min-image" src="../../static/images/icon_coupon.png"></image>
- <view class="title">领券中心</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_user/cert')">
- <image class="min-image" src="../../static/images/cert.png"></image>
- <view class="title">资质证书</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_user/price')">
- <image class="min-image" src="https://cos.his.cdwjyyh.com/fs/20240808/415e1a6a58ec49ffaa1bb62cb376d4e8.png"></image>
- <view class="title">价格公示</view>
- </view>
-
- </view>
-
- <view class="menu-box">
- <view class="menu" >
- <image class="min-image" src="../../static/images/icon_service_center.png"></image>
- <view class="title">客服中心</view>
- <button class='contact-btn' open-type="contact">
- </button>
- </view>
- <view class="menu" @click="navTo('/pages_user/about')">
- <image class="min-image" src="../../static/images/icon_feedback.png"></image>
- <view class="title">关于我们</view>
- </view>
- </view>
-
-
- </view>
- <view class="menus">
- <view class="title-box">
- <view class="line"></view>
- <view class="title">管理端</view>
- </view>
- <view class="menu-box">
- <view class="menu" @click="loginNavTo('/pages_user/registerDoctor?type=1')">
- <image class="min-image" src="/static/images/doctor_reg.png"></image>
- <view class="title">医生入驻</view>
- </view>
- <view class="menu" @click="loginNavTo('/pages_user/registerDoctor?type=2')">
- <image class="min-image" src="/static/images/doctor_reg.png"></image>
- <view class="title">药师入驻</view>
- </view>
- <view class="menu" @click="toCompany()">
- <image class="min-image" src="/static/images/sales.png"></image>
- <view class="title">客服登录</view>
- </view>
-
- </view>
- </view>
- <view class="btn-box" v-if="isLogin">
- <view class="sub-btn" @click="showLogout()">退出登录</view>
- </view>
-
- <view class="tip" >
- <view class="title">技术支持 重庆云联融智科技有限公司 </view>
- <!-- <view class="tel">联系电话 18696558100 </view> -->
- </view>
- </view>
- </view>
- <u-popup bgColor="#f6f6f6" :safeAreaInsetBottom="false" :round="15" mode="bottom" :show="wxShow" @close="wxAuthClose" @open="wxAuthOpen">
- <view class="wxAuth">
- <view class="title">编辑头像和昵称</view>
- <wx-auth class="wx-box" @updateUser="updateUser()" ref="wxauth" ></wx-auth>
- </view>
-
- </u-popup>
- <u-modal :show="show" title="提示" :showCancelButton="true" @cancel="hideLogout()" @confirm="logout()" content='确认退出吗?'></u-modal>
- </view>
- </template>
- <script>
- import {getUserInfo} from '@/api/user.js'
- import store from "@/store";
- import {wxAuth} from '../components/wxAuth.vue';
- import {startDrugReport,getUserFollowDoctor} from '@/api/drugReport';
- export default {
- components:{
- wxAuth
- },
- data() {
- return {
- wxShow:false,
- isLogin:false,
- show:false,
- statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
- user:{
- nickName:"登录/注册",
- phone:"",
- integral:0,
- balance:0.00
- }
- }
- },
- onLoad() {
- var that=this;
-
- },
- onShow() {
- var that=this;
- this.$isLogin().then(
- res => {
- if(res){
- uni.$emit('refreshIM')
- this.getUserInfo();
- }
- },
- rej => {}
- );
-
- },
- onReachBottom() {
- },
- onPageScroll(e){
-
- },
- methods: {
- updateUser(){
- this.wxShow=false;
- this.getUserInfo()
- },
- wxAuthOpen(){
- this.wxShow=true;
- var that=this;
- setTimeout(function(){
- that.$refs.wxauth.getUserInfo();
- })
-
- },
- wxAuthClose(){
- this.wxShow=false;
- },
- doIM(){
- console.log(110)
- uni.showLoading({
- title:"处理中..."
- })
- getUserFollowDoctor().then(
- res => {
- if(res.code==200){
- if(res.data!=null){
- var data=res.data;
- var param={followId:res.data.followId};
- startDrugReport(param).then(
- res => {
- uni.hideLoading()
- //
- // uni.switchTab({
- // url:"/pages/TUIKit/TUIPages/TUIConversation/index"
- // })
- var id="C2CD-"+data.followDoctorId;
- store.commit("timStore/setOrderId",data.orderId);
- store.commit("timStore/setFollowId",data.followId);
- store.commit("timStore/setImType", 2);
- store.commit("timStore/setConversationID", id);
- //uni.$TUIKit.TUIChatServer.updateStore(conversationId)
- uni.$TUIKit.TUIConversationServer.setMessageRead(id);
- uni.$TUIKit.TUIConversationServer.getConversationProfile(id)
- .then((res) => {
- console.log(res)
- // uni.$TUIKit.TUIConversationServer.setConversationValue(id,that.orderId.toString())
- // .then((res) => {
- // console.log("更新order")
- // })
- // .catch((err) => {
-
- // });
- //通知 TUIChat 关闭当前会话
- const { conversation } = res.data;
- store.commit("timStore/setConversation", conversation);
- let url = "/pages/TUIKit/TUIPages/TUIChat/index";
- const { nick: name } = conversation.userProfile;
- url = `${url}?conversationName=${
- conversation.userProfile.nick?.nick ||
- conversation.userProfile.userID
- }`;
- uni.redirectTo({ url });
-
- })
- .catch((err) => {
- uni.hideLoading()
- console.warn("获取 group profile 异常 = ", err);
- });
- },
- rej => {}
- );
-
- }
- else{
- uni.hideLoading()
- uni.showToast({
- icon:'none',
- title: "当前没有药师为您服务",
- });
- }
- }else{
- uni.hideLoading()
- uni.showToast({
- icon:'none',
- title: "请求失败",
- });
- }
- },
- rej => {}
- );
- },
- toIM(){
- var that=this;
- this.$isLogin().then(
- res => {
- console.log(res)
- if(res){
- that.doIM()
- }
- else{
- uni.navigateTo({
- url:'/pages/auth/login'
- })
- }
- }
- );
- },
- callPhone(){
- uni.makePhoneCall({
- phoneNumber: "18696558100"
- })
- },
- toCompany(){
- this.$isLogin().then(
- res => {
- console.log(res)
- if(res){
- var token = uni.getStorageSync('CompanyUserToken');
- if (token ) {
- uni.navigateTo({
- url: '/pages_company/index'
- })
- } else {
- uni.navigateTo({
- url: '/pages_company/login'
- })
- }
- }
- else{
- uni.navigateTo({
- url:'/pages/auth/login'
- })
- }
- }
- );
- },
- showLogout(){
- this.show=true;
- },
- hideLogout(){
- this.show=false;
- },
- logout(){
- this.$logout();
- uni.$TUIKit.logout();
- if(uni.$TUICallKit!=null){
- uni.$TUICallKit.logout();
- }
- uni.reLaunch({
- url: '/pages/index/index',
- animationType: 'pop-in',
- animationDuration: 100
- })
- this.isLogin=false;
- },
- getUserInfo(){
- getUserInfo().then(
- res => {
- if(res.code==200){
- if(res.user!=null){
- this.isLogin=true;
- this.user=res.user;
- console.log(this.user.nickName.substr(0,4));
- if(this.user.isWeixinAuth==0){
- this.wxAuthOpen()
- }
- }
- }else{
- uni.showToast({
- icon:'none',
- title: "请求失败",
- });
- }
- },
- rej => {}
- );
- },
- navTo(url){
- uni.navigateTo({
- url: url
- })
-
- },
- loginNavTo(url){
- this.$isLogin().then(
- res => {
- console.log(res)
- if(res){
- uni.navigateTo({
- url: url
- })
- }
- else{
- uni.navigateTo({
- url:'/pages/auth/login'
- })
- }
- }
- );
-
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .content{
- height: 100%;
- .cont{
- position: relative;
- width: 100%;
- display: flex;
- flex-direction: column;
- .bg{
- width: 100%;
- height:450rpx;
- // background-color: #2BC7B9;
- // background: linear-gradient(#2BC7B9, #88e2da);
-
- position: fixed;
- image{
- border-radius: 0rpx 0rpx 50rpx 50rpx;
- width: 100%;
- height:100%;
- }
- }
- .cont-box{
-
- z-index: 1000;
- .top-title{
- height: 88upx;
- line-height: 88upx;
- }
- .user{
- margin: 0rpx 30rpx 30rpx;
- z-index: 101;
- display: flex;
- align-items: flex-start;
- justify-content: flex-start;
- .left{
- image{
- width:100rpx;
- height:100rpx;
- border-radius: 50%;
- }
- }
- .right{
- flex: 1;
- margin-left: 30rpx;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: flex-start;
- .name-box{
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .name{
- font-size: 38rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #111111;
- }
- .btns{
- image{
- width: 50rpx;
- height:50rpx;
- }
- }
-
- }
- .phone{
- margin-top:10rpx ;
- font-size: 32rpx;
- font-family: PingFang SC;
- color: #111111;
-
- }
- .counts{
- margin-top:10rpx ;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- .count{
- margin-right: 10rpx;
- background-color: #E2C99E;
- padding: 5rpx 15rpx;
- border-radius: 20rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- color: #ffffff;
- }
-
- }
-
- }
-
- }
-
- .menus{
- z-index: 101;
- margin: 0rpx 30rpx 20rpx;
- padding: 15rpx;
- display: flex;
- flex-direction: column;
- box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
- background-color: #fff;
- border-radius: 15rpx;
- .title-box{
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: flex-start;
- .title{
- font-size: 32upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #111111;
- }
- .line{
- margin-right: 15rpx;
- height: 30rpx;
- width: 6rpx;
- background-color: #C39A58;
-
- }
-
- }
- .menu-box{
- display: flex;
- align-items: center;
- justify-content: flex-start;
- flex-wrap: wrap;
- .menu{
- padding: 15rpx;
- width:25%;
- min-width: 25%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- position: relative;
- image{
- width:58rpx;
- height:58rpx;
- }
- .min-image{
- width:40rpx;
- height:40rpx;
- }
- .title{
- margin-top: 10rpx;
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- }
- .contact-btn {
- position: absolute;
- width:80rpx;
- height:80rpx;
- display: flex;
- opacity: 0;
- }
- }
- }
-
- }
- .btn-box{
- margin: 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .sub-btn{
- // box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
- border: 1rpx solid #f8f8f8;
- background: #FFFFFF;
- width: 100%;
- height: 88upx;
- line-height: 88upx;
- text-align: center;
- font-size: 30upx;
- font-family: PingFang SC;
- color: #111;
- }
- }
- }
-
-
- }
-
- }
- .tip{
- margin: 30rpx 0rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- .title{
- font-size: 24rpx;
- color: #b5b5b5;
- font-weight: bold;
-
- }
- .tel{
- margin-top: 15rpx;
- font-size: 24rpx;
- color: #b5b5b5;
- }
-
-
- }
- .wxAuth{
- border-radius: 30rpx;
- width: 100%;
- padding: 15rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- background-color: #FFFFFF;
- .title{
- font-size: 32rpx;
- margin: 10rpx 0rpx;
- font-weight: bold;
- text-align: center;
- }
- .wx-box{
- width: 100%;
- padding: 0rpx 30rpx;
- }
- }
-
- </style>
|