index.vue 7.0 KB

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