home_doctor.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view style="height: 100%;width: 100%; padding: 20rpx 30rpx;">
  3. <view class="list" v-for="item,index in tcTeam" :key='index' @click="clicklist" :data-index="index">
  4. <!-- 头像 -->
  5. <view class="portrait">
  6. <view style="padding-top: 20rpx;">
  7. <image class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png"></image>
  8. <view class="bun_true" @click="follow" v-if="!item.follow">关注</view>
  9. <view class="bun_false" @click="follow" :data-index="index" v-else>已关注</view>
  10. </view>
  11. </view>
  12. <!-- 文字 -->
  13. <view class="text">
  14. <!-- 名字+标签 -->
  15. <view class="name">
  16. <view style="margin-right: 15rpx;">{{item.name}}</view>
  17. <view class="label">{{item.label1}}</view>
  18. <view class="label">{{item.label2}}</view>
  19. </view>
  20. <!-- 科室 -->
  21. <view class="department">
  22. <text>科室:</text>
  23. <text style="color: #333333;">{{item.department1}}</text>
  24. <text style="color: #333333;">{{item.department2}}</text>
  25. </view>
  26. <!-- 选项 -->
  27. <view class="option">
  28. <view>图文</view>
  29. <view>电话</view>
  30. <view>门诊</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. //关注
  41. isfollow: false,
  42. //协议
  43. num: 1,
  44. imgitem: {
  45. istrue: false,
  46. name: "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyi.png"
  47. },
  48. tcID: '套餐一', //ID
  49. tcTime: '一年', //套餐有效期
  50. tcContent: { //套餐内容
  51. content: '套餐一包含包含疫苗接种、门诊预约、儿保预约三项服务', //内容
  52. scope: '使用范围:家医团队可用,有效期内无限次、300元额度以内门诊预约与儿保预约无限制', //范围
  53. giving: '赠送XXXX保险:保险介绍' //赠送
  54. },
  55. tcTeam: [{
  56. id: '1',
  57. name: '熊大',
  58. label1: '熊',
  59. label2: '主角',
  60. department1: '外科',
  61. department2: '主任医师',
  62. follow: false
  63. }, {
  64. id: '2',
  65. name: '熊二',
  66. label1: '熊',
  67. label2: '主角',
  68. department1: '外科',
  69. department2: '主任医师',
  70. follow: false
  71. }, {
  72. id: '3',
  73. name: '光头强',
  74. label1: '人',
  75. label2: '主角',
  76. department1: '外科',
  77. department2: '主任医师',
  78. follow: false
  79. }, {
  80. id: '4',
  81. name: '李老板',
  82. label1: '人',
  83. label2: '配角',
  84. department1: '外科',
  85. department2: '主任医师',
  86. follow: false
  87. }, {
  88. id: '5',
  89. name: '吉吉国王',
  90. label1: '猴子',
  91. label2: '配角',
  92. department1: '外科',
  93. department2: '主任医师',
  94. follow: false
  95. }, {
  96. id: '6',
  97. name: '毛毛',
  98. label1: '猴子',
  99. label2: '配角',
  100. department1: '外科',
  101. department2: '主任医师',
  102. follow: false
  103. }, {
  104. id: '7',
  105. name: '蹦蹦',
  106. label1: '猴子',
  107. label2: '配角',
  108. department1: '外科',
  109. department2: '主任医师',
  110. follow: false
  111. }],
  112. packs: {
  113. id: '', //ID
  114. name: '', //名称
  115. intro: '', //简介
  116. desc: '', //详细介绍
  117. price: '', //价格(单位分)
  118. team_id: '', //医生团队ID
  119. phone_minutes: '', //电话分钟数
  120. chat_num: '', //图文咨询次数
  121. appoint_num: '', //门诊预约次数
  122. vaccine_limit_amount: '', //疫苗总金额限制
  123. nurses_limit_amount: '', //儿保总金额限制
  124. effective_days: '', //有效天数
  125. created_at: '', //创建时间
  126. updated_at: '' //更新时间
  127. }
  128. }
  129. },
  130. methods: {
  131. //关注
  132. follow(e) {
  133. console.log(this.tcTeam[e.currentTarget.dataset.index])
  134. }
  135. }
  136. }
  137. </script>
  138. <style lang="scss">
  139. .list {
  140. margin: 20rpx 0 10rpx 0;
  141. display: flex;
  142. width: 100%;
  143. height: 200rpx;
  144. border-radius: 15rpx;
  145. background-color: #FFFFFF;
  146. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
  147. .portrait {
  148. width: 30%;
  149. height: 100%;
  150. display: flex;
  151. justify-content: center;
  152. align-items: center;
  153. .img {
  154. width: 100rpx;
  155. height: 100rpx;
  156. border-radius: 50%;
  157. }
  158. .bun_true {
  159. text-align: center;
  160. width: 80rpx;
  161. height: 36rpx;
  162. background-color: #D92975;
  163. margin: 0 10rpx;
  164. border-radius: 60rpx;
  165. position: relative;
  166. top: -20rpx;
  167. font-size: 20rpx;
  168. color: #FFFFFF;
  169. padding: 3rpx 0;
  170. }
  171. .bun_false {
  172. border: 1rpx solid #D92975;
  173. text-align: center;
  174. width: 80rpx;
  175. height: 36rpx;
  176. background-color: #FFFFFF;
  177. margin: 0 10rpx;
  178. border-radius: 60rpx;
  179. position: relative;
  180. top: -20rpx;
  181. font-size: 20rpx;
  182. color: #D92975;
  183. padding: 3rpx 0;
  184. }
  185. }
  186. //文字
  187. .text {
  188. width: 70%;
  189. height: 100%;
  190. padding: 20rpx 0;
  191. //名字+标签
  192. .name {
  193. font-size: 30rpx;
  194. font-weight: bold;
  195. display: flex;
  196. align-items: center;
  197. .label {
  198. font-weight: 400;
  199. margin-right: 15rpx;
  200. background-color: #E5F5FF;
  201. color: #0B73B9;
  202. width: 100rpx;
  203. height: 28rpx;
  204. font-size: 20rpx;
  205. border-radius: 10rpx;
  206. text-align: center;
  207. align-items: center;
  208. }
  209. }
  210. //科室
  211. .department {
  212. padding: 20rpx 0;
  213. color: #666666;
  214. text {
  215. margin-right: 15rpx;
  216. }
  217. }
  218. // 选项
  219. .option {
  220. display: flex;
  221. view {
  222. background-color: #E4E4E4;
  223. width: 100rpx;
  224. height: 48rpx;
  225. border-radius: 12px;
  226. margin-right: 15rpx;
  227. display: flex;
  228. justify-content: center;
  229. align-items: center;
  230. }
  231. }
  232. }
  233. }
  234. </style>