index.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <template>
  2. <view class="top-cont">
  3. <view class="content">
  4. <view class="user-info">
  5. <view class="left">
  6. <view class="name-phone">
  7. <view class="name" v-if="user!=null">{{user.nickName}}</view>
  8. <view class="phone" v-if="user!=null">{{$parsePhone(user.phonenumber)}}</view>
  9. </view>
  10. </view>
  11. <view class="msg-box" v-if="user!=null" >
  12. {{user.deptName}}
  13. </view>
  14. </view>
  15. <!-- 常用工具 -->
  16. <view class="used-tools">
  17. <view class="title">常用工具</view>
  18. <view class="tools-list">
  19. <view class="item" @click="navTo('/pages_company/couponList?isShare=1&couponType=5')">
  20. <image src="/static/images/icon_my_coupon.png" mode=""></image>
  21. <text class="text">私域疗法券</text>
  22. </view>
  23. <view class="item" @click="navTo('/pages_company/couponList?isShare=1&couponType=2')">
  24. <image src="/static/images/icon_my_coupon.png" mode=""></image>
  25. <text class="text">中药免单券</text>
  26. </view>
  27. <view class="item" @click="navTo('/pages_company/packageList')">
  28. <image src="/static/images/icon_company_2.png" mode=""></image>
  29. <text class="text">疗法</text>
  30. </view>
  31. <view class="item" @click="navTo('/pages_order/inquirySelectType?companyId='+companyId+'&companyUserId='+companyUserId+'&isShare=1')">
  32. <image src="../static/images/icon_company_3.png" mode=""></image>
  33. <text class="text">会诊</text>
  34. </view>
  35. <view class="item" @click="navTo('/pages_order/inquirySelect?inquiryType=3&companyId='+companyId+'&companyUserId='+companyUserId+'&isShare=1')">
  36. <image src="../static/images/icon_company_3.png" mode=""></image>
  37. <text class="text">按方开药</text>
  38. </view>
  39. <view class="item" @click="navTo('/pages_company/packageOrderList')">
  40. <image src="../static/images/icon_company_3.png" mode=""></image>
  41. <text class="text">套餐订单</text>
  42. </view>
  43. <view class="item" @click="navTo('/pages_company/inquiryOrderList')">
  44. <image src="../static/images/icon_company_3.png" mode=""></image>
  45. <text class="text">问诊订单</text>
  46. </view>
  47. <view class="item" @click="navTo('/pages_company/storeOrderList')">
  48. <image src="../static/images/icon_company_3.png" mode=""></image>
  49. <text class="text">药品订单</text>
  50. </view>
  51. <view class="item" @click="navTo('/pages_user/healthRecords/index')">
  52. <image src="../static/images/icon_company_3.png" mode=""></image>
  53. <view class="text">健康档案</view>
  54. </view>
  55. <view class="item" @click="navTo('/pages_company/bindInfo')">
  56. <image src="../static/images/icon_company_3.png" mode=""></image>
  57. <text class="text">公司码</text>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 退出登录按钮 -->
  62. <view class="logout" @click="logout">退出登录</view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. import {getUserInfo,getQrImg} from '@/api/companyUser'
  68. export default {
  69. data() {
  70. return {
  71. companyId:null,
  72. companyUserId:null,
  73. user:null,
  74. };
  75. },
  76. onLoad() {
  77. },
  78. onShow() {
  79. this.companyId=uni.getStorageSync('companyId');
  80. this.companyUserId=uni.getStorageSync('companyUserId');
  81. console.log(this.companyUserId)
  82. this.getUserInfo()
  83. },
  84. onShareAppMessage(res) {
  85. return {
  86. title: "问诊",
  87. path: '/pages/TUIKit/TUIPages/TUIConversation/index',
  88. imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  89. }
  90. },
  91. methods: {
  92. navTo(url){
  93. uni.navigateTo({
  94. url: url
  95. })
  96. },
  97. getUserInfo(){
  98. var data={}
  99. getUserInfo(data).then(
  100. res => {
  101. if(res.code==200){
  102. this.user=res.data;
  103. }
  104. else{
  105. uni.setStorageSync('CompanyUserToken',null);
  106. uni.showToast({
  107. icon:'none',
  108. title: res.msg,
  109. });
  110. uni.navigateBack({
  111. delta:-1
  112. })
  113. }
  114. },
  115. rej => {}
  116. );
  117. },
  118. logout(){
  119. uni.showModal({
  120. title:"提示",
  121. content:"确认退出登录吗?",
  122. showCancel:true,
  123. cancelText:'取消',
  124. confirmText:'确定',
  125. success:res=>{
  126. if(res.confirm){
  127. uni.setStorageSync('CompanyUserToken',null);
  128. uni.navigateBack({
  129. delta:-1
  130. })
  131. }else{
  132. }
  133. }
  134. })
  135. },
  136. // 跳转页面
  137. navgetTo(url) {
  138. this.$isLogin().then(res => {
  139. if(res){
  140. uni.navigateTo({
  141. url: url
  142. })
  143. }
  144. })
  145. },
  146. }
  147. }
  148. </script>
  149. <style lang="scss">
  150. .content{
  151. padding: 20upx;
  152. .user-info{
  153. padding: 30upx;
  154. display: flex;
  155. align-items: center;
  156. justify-content: space-between;
  157. .left{
  158. position: relative;
  159. display: flex;
  160. .head-img{
  161. width: 120upx;
  162. height: 120upx;
  163. border-radius: 50%;
  164. overflow: hidden;
  165. margin-right: 30upx;
  166. border: 4upx solid #FFFFFF;
  167. box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.1);
  168. image{
  169. width: 100%;
  170. height: 100%;
  171. }
  172. }
  173. .name-phone{
  174. padding-top: 15upx;
  175. .name{
  176. font-size: 36upx;
  177. font-family: PingFang SC;
  178. font-weight: bold;
  179. color: #111111;
  180. line-height: 1;
  181. }
  182. .phone{
  183. font-size: 28upx;
  184. font-family: PingFang SC;
  185. font-weight: 500;
  186. color: #666666;
  187. line-height: 1;
  188. margin-top: 30upx;
  189. }
  190. }
  191. }
  192. .msg-box{
  193. padding: 10rpx 20upx;
  194. font-size: 28upx;
  195. font-family: PingFang SC;
  196. font-weight: 500;
  197. color: #FFFFFF;
  198. border-radius: 8rpx;
  199. background-color: #C39A58;
  200. }
  201. }
  202. .used-tools{
  203. box-sizing: border-box;
  204. background: #FFFFFF;
  205. border-radius: 16upx;
  206. padding: 40upx 30upx;
  207. .title{
  208. font-size: 32upx;
  209. font-family: PingFang SC;
  210. font-weight: bold;
  211. color: #222222;
  212. line-height: 1;
  213. }
  214. .tools-list{
  215. margin-top: 50upx;
  216. display: flex;
  217. flex-wrap: wrap;
  218. width: 100%;
  219. .item{
  220. box-sizing: border-box;
  221. width: 25%;
  222. display: flex;
  223. flex-direction: column;
  224. align-items: center;
  225. justify-content: center;
  226. margin-bottom: 50upx;
  227. position: relative;
  228. image{
  229. width: 44upx;
  230. height: 44upx;
  231. }
  232. .text{
  233. font-size: 24upx;
  234. font-family: PingFang SC;
  235. font-weight: 500;
  236. color: #111111;
  237. line-height: 1;
  238. margin-top: 20upx;
  239. }
  240. .share-btn{
  241. display: inline-block;
  242. position: absolute;
  243. top: 0;
  244. left: 0;
  245. width: 100%;
  246. height: 100%;
  247. opacity: 0;
  248. }
  249. }
  250. }
  251. }
  252. .logout{
  253. height: 80upx;
  254. line-height: 80upx;
  255. text-align: center;
  256. font-size: 26upx;
  257. font-family: PingFang SC;
  258. font-weight: 500;
  259. color: #666666;
  260. background: #FFFFFF;
  261. border-radius: 16upx;
  262. margin-top: 20upx;
  263. }
  264. }
  265. </style>