index.vue 8.4 KB

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