mine.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <template>
  2. <view class="main">
  3. <view class="pr">
  4. <view class="header-content">
  5. <image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/mybanner.png" style="width:100%;height:260rpx;"></image>
  6. </view>
  7. <view class="pr" style="z-index:2">
  8. <view class="plr15">
  9. <view class="bdr4 pb20">
  10. <view class="m-dpflex m-justify-start m-align-center" style="height: 165rpx;">
  11. <!-- <image binderror="_binderror" mode="scaleToFill" :src="info.avatar||" style="width: 120rpx;height: 120rpx;border-radius: 50%;"></image> -->
  12. <u-avatar :src="info.avatar" mode="circle" size="120"></u-avatar>
  13. <text class="line1 f20 fb plr15 text-white">{{info.nickname||'用户02958472'}}</text>
  14. <navigator hoverClass="none" :url="'editinfo?name='+info.nickname+'&phone='+info.phone">
  15. <image class="header-img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/myedit.png"></image>
  16. </navigator>
  17. <view class="pr tr m-flex" style="display: flex; justify-content: flex-end;">
  18. <!-- <view class="tip msg" v-if="true"></view> -->
  19. <navigator hoverClass="none" url="message" style="width: 50rpx;">
  20. <image class="header-img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/myinfo.png"></image>
  21. </navigator>
  22. </view>
  23. </view>
  24. <view class="pr m-xcenter plr20 header-box" style="padding: 40rpx 40rpx;background-color: #fff;border-radius: 16rpx;">
  25. <navigator class="m-flex tl f14 m-ycenter dpb" hoverClass="none" url="../personal/personal_information">
  26. <view class="m-gray-big f20 fb pr10">{{(info.balance/100)||'0'}}</view>
  27. <view class="m-gray-letter mt5 f12">余额(元)</view>
  28. </navigator>
  29. <view @click="gocoupon" class="m-flex tl f14 m-ycenter">
  30. <view class="m-gray-big f20 fb">{{info.coupon_num||'0'}}</view>
  31. <view class="m-gray-letter mt5 f12">优惠券(张)</view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="fb f18 plr20">我的订单</view>
  38. <view class="margin-lr-sm m-dpflex m-justify-start m-align-center overflow bg-white margin-top-sm" style="padding-top: 40rpx;padding-bottom: 40rpx;border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
  39. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="../common_tools/my_consulting/my_consulting">
  40. <image style="width: 76rpx;height: 76rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/myzixun.png"
  41. mode=""></image>
  42. <!-- <view class="tip"></view> -->
  43. <view class="f14 m-gray-small mt10 line1">我的咨询</view>
  44. </navigator>
  45. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="../common_tools/my_consulting/my_appointment">
  46. <image style="width: 76rpx;height: 76rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/myyuyue.png"
  47. mode=""></image>
  48. <!-- <view class="tip"></view> -->
  49. <view class="f14 m-gray-small mt10 line1">我的预约</view>
  50. </navigator>
  51. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="../common_tools/my_consulting/my_opinion">
  52. <image style="width: 76rpx;height: 76rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/myyijian.png"
  53. mode=""></image>
  54. <!-- <view class="tip"></view> -->
  55. <view class="f14 m-gray-small mt10 line1">我的意见单</view>
  56. </navigator>
  57. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="../service_box/box_details">
  58. <image style="width: 76rpx;height: 76rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/myservice.png"
  59. mode=""></image>
  60. <!-- <view class="tip"></view> -->
  61. <view class="f14 m-gray-small mt10 line1">服务包订单</view>
  62. </navigator>
  63. </view>
  64. <navigator class="pr m-xcenter plr20 pt20" hoverClass="none" url="../archives/my_archives">
  65. <view class="fb f18 pr m-flex tl">健康档案</view>
  66. <view class="pr m-gray-small">档案列表</view>
  67. <label class="m-gray-letter iconfont icon-arrow-right f18 dpb"></label>
  68. </navigator>
  69. <view class="mt20 pr pb40" style="margin-left: 20rpx;margin-right: 20rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);height:380rpx;">
  70. <navigator class="m-ycenter" hoverClass="none" style="padding-top: 174rpx;" url="../archives/add_archives" v-if="!istrue">
  71. <view class="bdr30 m-theme br-theme tc plr20 pt8 pb8 f14 width40">新增健康档案</view>
  72. <!-- <view class="pt20 f12 m-gray-letter">点击添加新的健康档案</view> -->
  73. </navigator>
  74. <swiper duration="500" @change="swiperChange" v-if="istrue" :current="itemcurrent" interval="5000" style="height:380rpx;"
  75. class="swiper-box">
  76. <swiper-item class="" style="box-sizing: border-box;" v-for="(ite,index) in patientList" :key="index">
  77. <view class="bg-white" style="border-radius: 16rpx;height: 100%;">
  78. <view @click="gotoinfo(ite)" style="height: 100%;">
  79. <view class="fb f18 pt20 margin-left">{{ite.name}}</view>
  80. <view class="f14 m-gray-letter pt10 margin-left">年龄:<text class="text-black">{{ite.age||'0岁'}}</text></view>
  81. <view class="plr10 m-dpflex m-justify-start m-align-center overflow pb30 pt30" style="margin-top:60rpx;border-top: 2rpx solid rgb(248,248,248);">
  82. <view class="width33 m-ycenter overflow pr">
  83. <view class="fb f18">{{ite.order_num}}</view>
  84. <view class="f12 m-gray-small mt6 line1">病例信息</view>
  85. </view>
  86. <view class="width33 m-ycenter overflow pr">
  87. <view class="fb f18">{{ite.pack_docter_num}}</view>
  88. <view class="f12 m-gray-small mt6 line1">就诊记录</view>
  89. </view>
  90. <view class="width33 m-ycenter overflow pr">
  91. <view class="fb f18">{{ite.perfectd_degree}}</view>
  92. <view class="f12 m-gray-small mt6 line1">个人资料</view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </swiper-item>
  98. </swiper>
  99. <view class="dots">
  100. <view :class="index==itemcurrent?'dot active':'dot'" v-for="(item,index) in patientList.length" :key="index"></view>
  101. </view>
  102. </view>
  103. <view class="fb f18 plr20 pt40">常用工具</view>
  104. <view class="bg-white margin-lr-sm margin-top-sm" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
  105. <view class="plr10 m-dpflex m-justify-start m-align-center overflow pt30 pb30">
  106. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="/pages/common_tools/home_doctor">
  107. <image style="width: 42rpx;height: 42rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/mydoctor.png"></image>
  108. <view class="f14 m-gray-small mt10 line1">家庭医生</view>
  109. </navigator>
  110. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="/pages/common_tools/me_follow">
  111. <image style="width: 42rpx;height: 42rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/myguanzhu.png"></image>
  112. <view class="f14 m-gray-small mt10 line1">我的关注</view>
  113. </navigator>
  114. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="/pages/common_tools/collection/collection">
  115. <image style="width: 42rpx;height: 42rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/wenzhang.png"></image>
  116. <view class="f14 m-gray-small mt10 line1">收藏文章</view>
  117. </navigator>
  118. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="/pages/common_tools/me_order/me_order">
  119. <image style="width: 42rpx;height: 42rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/baodan.png"></image>
  120. <!-- <view class="tip"></view> -->
  121. <view class="f14 m-gray-small mt10 line1">我的保单</view>
  122. </navigator>
  123. </view>
  124. <view class="plr10 m-dpflex m-justify-start m-align-center overflow pb30">
  125. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="/pages/common_tools/me_evaluate">
  126. <image style="width: 42rpx;height: 42rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/pinjia.png"></image>
  127. <view class="f14 m-gray-small mt10 line1">我的评价</view>
  128. </navigator>
  129. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="/pages/personal/coupon/couponList">
  130. <image style="width: 42rpx;height: 42rpx;" src="../../static/img/collarvolume.png"></image>
  131. <view class="f14 m-gray-small mt10 line1">领卷中心</view>
  132. </navigator>
  133. <navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="/pages/common_tools/help_feedback/help_feedback">
  134. <image style="width: 42rpx;height: 42rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/myhple.png"></image>
  135. <view class="f14 m-gray-small mt10 line1">帮助反馈</view>
  136. </navigator>
  137. <view class="width25 m-ycenter overflow pr" @click="customer">
  138. <image style="width: 42rpx;height: 42rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/toolimg/kefu.png"></image>
  139. <view class="f14 m-gray-small mt10 line1">客服咨询</view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="cu-tabbar-height"></view>
  145. <view class="cu-tabbar-height"></view>
  146. <u-no-network></u-no-network>
  147. </view>
  148. </template>
  149. <script>
  150. var user = require('../../common/user.js');
  151. import store from '@/store'
  152. export default {
  153. onLoad(options) {
  154. },
  155. onShow() {
  156. this.getUserInfo()
  157. this.getarchives()
  158. },
  159. data() {
  160. return {
  161. itemcurrent: 0,
  162. info: {},
  163. istrue: false,
  164. patientList: []
  165. }
  166. },
  167. methods: {
  168. customer() {
  169. uni.makePhoneCall({
  170. phoneNumber: "12345"
  171. })
  172. },
  173. swiperChange(e) {
  174. this.itemcurrent = e.detail.current
  175. },
  176. getUserInfo: async function() {
  177. let res = await this.$request.post('/api/v1/user/userInfo', {}, false)
  178. let status = user.islogin(res)
  179. if (status) {
  180. this.info = res.data
  181. console.log(this.info)
  182. store.commit('setUser', this.info)
  183. if (this.info.is_set_pay_password == 0) {
  184. uni.showModal({
  185. title: "提示",
  186. content: "尚未设置支付密码,是否前往设置",
  187. confirmText: "去设置",
  188. success: (res) => {
  189. if (res.confirm) {
  190. uni.navigateTo({
  191. url: "paypassword"
  192. })
  193. }
  194. }
  195. })
  196. }
  197. // getApp().globalData.imService = new IMService();
  198. // let loginResult = getApp().globalData.imService.login(e.detail.userInfo);
  199. // if (loginResult) {
  200. // //连接IM
  201. // getApp().globalData.imService.connectIM();
  202. // }
  203. }
  204. },
  205. gotoinfo(ite) {
  206. uni.navigateTo({
  207. url: "../archives/archives_info?id=" + ite.id
  208. })
  209. },
  210. getarchives: async function() {
  211. let res = await this.$request.post("/api/v1/patient/patientList", {}, false)
  212. if (res.status == 0) {
  213. this.patientList = res.data.data
  214. console.log(this.patientList)
  215. if (this.patientList.length != 0) {
  216. this.istrue = true
  217. }
  218. }
  219. },
  220. gocoupon() {
  221. uni.navigateTo({
  222. url: "../personal/coupon/coupon"
  223. })
  224. }
  225. }
  226. };
  227. </script>
  228. <style scoped>
  229. @import url("./mine.css");
  230. .header-content {
  231. position: absolute;
  232. top: 0;
  233. right: 0;
  234. bottom: 0;
  235. left: 0;
  236. width: 100%;
  237. z-index: -1;
  238. overflow: hidden;
  239. box-sizing: border-box;
  240. }
  241. .header-box {
  242. box-shadow: 0px 8rpx 34rpx -6rpx rgba(248, 151, 164, 0.13);
  243. }
  244. .header-img {
  245. width: 36rpx;
  246. height: 36rpx;
  247. }
  248. .tip {
  249. position: absolute;
  250. top: 0;
  251. right: 20%;
  252. bottom: 0;
  253. background-color: red;
  254. width: 12rpx;
  255. height: 12rpx;
  256. border-radius: 50%;
  257. }
  258. .msg {
  259. top: -3rpx;
  260. right: -9rpx;
  261. }
  262. swiper {
  263. height: 320rpx;
  264. }
  265. .swiper-wrapper {
  266. padding: 0 10rpx;
  267. box-sizing: border-box;
  268. }
  269. .swiper-item {
  270. width: 100%;
  271. height: 300rpx;
  272. box-shadow: 0 26rpx 40rpx 0 rgba(255, 255, 255, 0.31);
  273. background: url("http://file.supermm.me/miniProgram/images/personal/bg_doc.png") no-repeat bottom center;
  274. }
  275. .dots {
  276. position: absolute;
  277. left: 0;
  278. right: 0;
  279. bottom: -40rpx;
  280. display: flex;
  281. justify-content: center;
  282. }
  283. .dots .dot {
  284. margin: 0 8rpx;
  285. width: 14rpx;
  286. height: 14rpx;
  287. background: #E4E4E4;
  288. border-radius: 8rpx;
  289. transition: all .6s;
  290. }
  291. .dots .dot.active {
  292. width: 24rpx;
  293. background: rgb(153, 153, 153);
  294. }
  295. .game-wrap {
  296. position: relative;
  297. width: 100%;
  298. height: 100%;
  299. overflow: hidden;
  300. box-sizing: border-box;
  301. }
  302. .game-item {
  303. height: 100%;
  304. background: url("https://file.supermm.me/h5/wechat-h5/integral/personeBg001.jpg") no-repeat;
  305. background-size: 100% 100%;
  306. background-position: center center;
  307. border-radius: 100rpx;
  308. }
  309. </style>