clientDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. <template>
  2. <view class="content">
  3. <view class="user-info2">
  4. <view class="align-center justify-between">
  5. <view class="left">
  6. <view class="head-img">
  7. <image :src="user.avatar==null?'../static/images/health/my_heads.png':user.avatar" mode="aspectFill"></image>
  8. </view>
  9. <view class="name-phone">
  10. <view class="name">{{user.nickName}}</view>
  11. <view class="phone-box" v-if="user!=null">
  12. <image class="w32 h32" src="../static/images/company/address_icon.png" mode=""></image>
  13. <view class="address">
  14. 重庆
  15. </view>
  16. <view class="phone">
  17. {{utils.parsePhone(user.phonenumber)}}
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <image class="w80 h80" src="../static/images/company/phone_icon.png" mode=""></image>
  23. </view>
  24. <view class="tag-box">
  25. <view class="align-center justify-between mb32">
  26. <view class="title">他的标签</view>
  27. <view class="title2">编辑标签</view>
  28. </view>
  29. <view class="align-center">
  30. <view class="tag">高血压</view>
  31. <view class="tag">高血压</view>
  32. <view class="add-tag">
  33. <image class="w24 h24" src="../static/images/company/add_blue_icon.png" mode=""></image>
  34. <view>添加标签</view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="demands">
  39. <view class="title">健康诉求</view>
  40. <view class="text">希望能够调理好糖尿病</view>
  41. </view>
  42. </view>
  43. <view class="used-tools2">
  44. <view class="title">管理</view>
  45. <view class="tools-list">
  46. <view class="item" @click="navgetTo('/pages_user/user/userTui')">
  47. <image src="../static/images/company/health_records_icon.png" mode=""></image>
  48. <text class="text">健康档案</text>
  49. </view>
  50. <view class="item" @click="navgetTo('')">
  51. <image src="../static/images/company/physical_examination_icon.png" mode=""></image>
  52. <text class="text">体检信息</text>
  53. </view>
  54. <view class="item" @click="navgetTo('/pages_company/executionRecord')">
  55. <image src="../static/images/company/execution_record_icon.png" mode=""></image>
  56. <text class="text">执行记录</text>
  57. </view>
  58. <view class="item" @click="navgetTo('/pages_company/returnRecord')">
  59. <image src="../static/images/company/return_records_icon.png" mode=""></image>
  60. <text class="text">回访记录</text>
  61. </view>
  62. <view class="item" @click="navgetTo('')">
  63. <image src="../static/images/company/consumables_mall_icon.png" mode=""></image>
  64. <text class="text">购买信息</text>
  65. </view>
  66. <view class="item" @click="navgetTo('')">
  67. <image src="../static/images/company/comparison_indicators_icon.png" mode=""></image>
  68. <text class="text">指标对比</text>
  69. </view>
  70. <view class="item" @click="navgetTo('/pages_company/testRecord')">
  71. <image src="../static/images/company/evaluation_record_icon.png" mode=""></image>
  72. <text class="text">测评记录</text>
  73. </view>
  74. <view class="item" @click="navgetTo('')">
  75. <image src="../static/images/company/follow_up_records_icon.png" mode=""></image>
  76. <text class="text">跟进记录</text>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="used-tools2">
  81. <view class="title">备注信息</view>
  82. <view class="tools-list">
  83. <view class="remark">暂无</view>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. import {getUserInfo,getQrImg} from '@/api/companyUser'
  90. export default {
  91. data() {
  92. return {
  93. statusBarHeight:'',
  94. top:0,
  95. user:{
  96. nickName:'健康管家小左',
  97. phonenumber:'13996660261',
  98. deptName:'测试企业',
  99. avatar:null
  100. },
  101. // user:null,
  102. };
  103. },
  104. computed: {
  105. // 计算属性的 getter
  106. bgColor: function() {
  107. var top = this.top / 30;
  108. return 'rgba(11,179,242, ' + top + ')';
  109. },
  110. },
  111. onLoad() {
  112. console.log("onload")
  113. },
  114. onShow() {
  115. console.log("onshow")
  116. // this.getUserInfo()
  117. },
  118. methods: {
  119. alipay(){
  120. // var url="http://alipay.yjf.runtzh.com/#/?companyId="+this.user.companyId+"&companyUserId="+this.user.userId
  121. // uni.setClipboardData({
  122. // data:url,
  123. // success:()=>{
  124. // uni.showToast({
  125. // title:'收款地址已复制到剪切板',
  126. // icon:'none'
  127. // })
  128. // }
  129. // });
  130. uni.navigateTo({
  131. url:'/pages_company/alipayImg'
  132. })
  133. },
  134. toCard(){
  135. uni.navigateTo({
  136. url:'/pages_company/card?cardId='+this.user.cardId
  137. })
  138. },
  139. toCreateOrder(){
  140. uni.navigateTo({
  141. url:'/pages_company/order/productList'
  142. })
  143. },
  144. toPay(){
  145. uni.navigateTo({
  146. url:'/pages_user/user/pay?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
  147. })
  148. },
  149. toOrder(){
  150. uni.navigateTo({
  151. url:'/pages_company/storeOrder?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
  152. })
  153. },
  154. toPackage(){
  155. uni.navigateTo({
  156. url:'/pages_company/storeProductPackage?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
  157. })
  158. },
  159. toCoupon(){
  160. uni.navigateTo({
  161. url:'/pages_company/coupon'
  162. })
  163. },
  164. toCreateCoupon(){
  165. uni.navigateTo({
  166. url:'/pages_company/order/coupon'
  167. })
  168. },
  169. toCreateOrderCoupon(){
  170. uni.navigateTo({
  171. url:'/pages_company/order/coupon'
  172. })
  173. },
  174. getUserInfo(){
  175. var data={token:uni.getStorageSync('CompanyUserToken')}
  176. getUserInfo(data).then(
  177. res => {
  178. if(res.code==200){
  179. this.user=res.data;
  180. }
  181. else if(res.code==403){
  182. uni.setStorageSync('CompanyUserToken',null);
  183. uni.navigateBack({
  184. delta:-1
  185. })
  186. }else{
  187. uni.showToast({
  188. icon:'none',
  189. title: res.msg,
  190. });
  191. }
  192. },
  193. rej => {}
  194. );
  195. },
  196. logout(){
  197. uni.showModal({
  198. title:"提示",
  199. content:"确认退出登录吗?",
  200. showCancel:true,
  201. cancelText:'取消',
  202. confirmText:'确定',
  203. success:res=>{
  204. if(res.confirm){
  205. uni.setStorageSync('CompanyUserToken',null);
  206. uni.navigateBack({
  207. delta:-1
  208. })
  209. }else{
  210. }
  211. }
  212. })
  213. },
  214. // 跳转页面
  215. navgetTo(url) {
  216. // this.utils.isLogin().then(res => {
  217. // if(res){
  218. uni.navigateTo({
  219. url: url
  220. })
  221. // }
  222. // })
  223. },
  224. }
  225. }
  226. </script>
  227. <style lang="scss">
  228. .bg {
  229. width: 100%;
  230. height: 380rpx;
  231. position: absolute;
  232. top: 0;
  233. left: 0;
  234. z-index: -1;
  235. }
  236. .content{
  237. padding:20upx;
  238. background: linear-gradient( 180deg, #008FD3 0%, #EFF3F7 24%, #EFF3F7 100%);
  239. height: 100vh;
  240. box-sizing: border-box;
  241. padding-top: 32rpx;
  242. .user-info2{
  243. box-sizing: border-box;
  244. background: #FFFFFF;
  245. border-radius: 16upx;
  246. padding: 40upx 30upx;
  247. margin-bottom: 20rpx;
  248. .left{
  249. position: relative;
  250. display: flex;
  251. .head-img{
  252. width: 112upx;
  253. height: 112upx;
  254. border-radius: 50%;
  255. overflow: hidden;
  256. margin-right: 30upx;
  257. image{
  258. width: 100%;
  259. height: 100%;
  260. }
  261. }
  262. .name-phone{
  263. // padding-top: 15upx;
  264. display: flex;
  265. flex-direction: column;
  266. justify-content:center;
  267. .name{
  268. font-size: 36upx;
  269. font-family: PingFang SC;
  270. font-weight: bold;
  271. color: #111111;
  272. // line-height: 1;
  273. }
  274. .phone-box{
  275. display: flex;
  276. align-items: center;
  277. margin-top: 14rpx;
  278. .phone{
  279. font-family: PingFang SC;
  280. font-weight: 400;
  281. font-size: 24rpx;
  282. color: #626468;
  283. line-height: 36rpx;
  284. }
  285. .address{
  286. font-family: PingFang SC;
  287. font-weight: 400;
  288. font-size: 24rpx;
  289. color: #626468;
  290. margin-left:8rpx;
  291. margin-right: 30rpx;
  292. }
  293. }
  294. }
  295. }
  296. .tag-box{
  297. padding-top: 40rpx;
  298. padding-bottom: 40rpx;
  299. border-bottom: 1rpx solid #ECECEC;
  300. .title{
  301. font-family: PingFang SC;
  302. font-weight: 500;
  303. font-size: 32rpx;
  304. color: #222426;
  305. }
  306. .title2{
  307. font-family: PingFang SC;
  308. font-weight: 400;
  309. font-size: 24rpx;
  310. color: #626468;
  311. }
  312. .tag{
  313. margin-right: 16rpx;
  314. width: 112rpx;
  315. height: 56rpx;
  316. line-height: 56rpx;
  317. text-align: center;
  318. background: #F0FAFF;
  319. border-radius: 8rpx 8rpx 8rpx 8rpx;
  320. font-size: 24rpx;
  321. color: #008FD3;
  322. }
  323. .add-tag{
  324. display: flex;
  325. align-items: center;
  326. justify-content: center;
  327. width: 160rpx;
  328. height: 56rpx;
  329. background: #FFFFFF;
  330. border-radius: 8rpx 8rpx 8rpx 8rpx;
  331. border: 1rpx solid #008FD3;
  332. font-size: 22rpx;
  333. color: #008FD3;
  334. image{
  335. margin-right: 8rpx;
  336. }
  337. }
  338. }
  339. .demands{
  340. .title{
  341. font-family: PingFang SC;
  342. font-weight: 500;
  343. font-size: 32rpx;
  344. color: #222426;
  345. padding:28rpx 0;
  346. }
  347. .text{
  348. font-weight: 400;
  349. font-size: 28rpx;
  350. color: #898E91;
  351. }
  352. }
  353. .msg-box{
  354. width: 144rpx;
  355. height: 56rpx;
  356. line-height: 56rpx;
  357. font-family: PingFang SC;
  358. font-weight: 400;
  359. font-size: 24rpx;
  360. color: #FFFFFF;
  361. text-align: center;
  362. background: linear-gradient( 90deg, #FEA501 0%, #FECB8A 100%);
  363. border-radius: 28rpx 28rpx 28rpx 28rpx;
  364. border: 1rpx solid #FEDDB9;
  365. }
  366. }
  367. .used-tools2{
  368. box-sizing: border-box;
  369. background: #FFFFFF;
  370. border-radius: 16upx;
  371. padding: 40upx 30upx;
  372. margin-bottom: 20rpx;
  373. .title{
  374. font-size: 32upx;
  375. font-family: PingFang SC;
  376. font-weight: bold;
  377. color: #222222;
  378. line-height: 1;
  379. }
  380. .tools-list{
  381. margin-top: 50upx;
  382. display: flex;
  383. flex-wrap: wrap;
  384. width: 100%;
  385. .item{
  386. box-sizing: border-box;
  387. width: 25%;
  388. display: flex;
  389. flex-direction: column;
  390. align-items: center;
  391. justify-content: center;
  392. margin-bottom: 50upx;
  393. position: relative;
  394. image{
  395. width: 44upx;
  396. height: 44upx;
  397. }
  398. .text{
  399. font-size: 24upx;
  400. font-family: PingFang SC;
  401. font-weight: 500;
  402. color: #111111;
  403. line-height: 1;
  404. margin-top: 20upx;
  405. }
  406. .contact-btn{
  407. display: inline-block;
  408. position: absolute;
  409. top: 0;
  410. left: 0;
  411. width: 100%;
  412. height: 100%;
  413. opacity: 0;
  414. }
  415. }
  416. .remark{
  417. font-family: PingFang SC;
  418. font-weight: 400;
  419. font-size: 28rpx;
  420. color: #898E91;
  421. text-align: left;
  422. }
  423. }
  424. .index-box{
  425. margin-top: 30rpx;
  426. display: flex;
  427. align-items: center;
  428. justify-content: space-between;
  429. .box-title{
  430. font-family: PingFang SC;
  431. font-weight: 400;
  432. font-size: 24rpx;
  433. color: #626468;
  434. margin: 0 14rpx;
  435. }
  436. .prop{
  437. font-family: Roboto Slab;
  438. font-weight: 500;
  439. font-size: 48rpx;
  440. color: #222426;
  441. }
  442. .task{
  443. width: 311rpx;
  444. height: 142rpx;
  445. background: #EBF8FF;
  446. border-radius: 16rpx 16rpx 16rpx 16rpx;
  447. display: flex;
  448. flex-direction: column;
  449. justify-content: center;
  450. align-items: center;
  451. }
  452. .work{
  453. width: 311rpx;
  454. height: 142rpx;
  455. background: #FFF3DE;
  456. border-radius: 16rpx 16rpx 16rpx 16rpx;
  457. display: flex;
  458. flex-direction: column;
  459. justify-content: center;
  460. align-items: center;
  461. }
  462. }
  463. }
  464. .log-out{
  465. height: 80upx;
  466. line-height: 80upx;
  467. text-align: center;
  468. font-size: 28upx;
  469. font-family: PingFang SC;
  470. font-weight: 500;
  471. color: #666666;
  472. background: #FFFFFF;
  473. border-radius: 16upx;
  474. margin-top: 20upx;
  475. }
  476. }
  477. </style>