mine.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. <template>
  2. <view>
  3. <view class="head">
  4. <view class="photo">
  5. <img src="../../../assets/img/minePhoto.png" alt="">
  6. </view>
  7. <view class="infos">
  8. <view class="name">
  9. 用户191012
  10. </view>
  11. <view class="modification">
  12. 点击修改个人信息
  13. </view>
  14. </view>
  15. </view>
  16. <view class="my-children">
  17. <view class="top">
  18. <view class="text">
  19. 我的子女
  20. </view>
  21. <view class="add">
  22. 添加
  23. </view>
  24. </view>
  25. <view class="children">
  26. <view class="check-box" v-for="(item,index) in studentList" :key="item.studentId">
  27. <view class="photo">
  28. <img :src="item.headPhoto" alt="">
  29. </view>
  30. <view class="infos">
  31. <view class="name">
  32. {{item.studentName}}
  33. </view>
  34. <view class="age">
  35. 4岁1个月
  36. </view>
  37. </view>
  38. <view class="radio">
  39. <label class="radio">
  40. <radio value="" />
  41. </label>
  42. </view>
  43. </view>
  44. <view class="check-box">
  45. <view class="photo">
  46. <img src="../../../assets/img/zixuan.png" alt="">
  47. </view>
  48. <view class="infos">
  49. <view class="name">
  50. 王紫瑄
  51. </view>
  52. <view class="age">
  53. 6岁7个月
  54. </view>
  55. </view>
  56. <view class="radio">
  57. <label class="radio">
  58. <radio value="" />
  59. </label>
  60. </view>
  61. </view>
  62. <view class="check-box">
  63. <view class="photo">
  64. <img src="../../../assets/img/zixuan.png" alt="">
  65. </view>
  66. <view class="infos">
  67. <view class="name">
  68. 王紫瑄
  69. </view>
  70. <view class="age">
  71. 6岁7个月
  72. </view>
  73. </view>
  74. <view class="radio">
  75. <label class="radio">
  76. <radio value="" />
  77. </label>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="class-times">
  83. <view class="box">
  84. <view class="times">
  85. 36节
  86. </view>
  87. <view class="text">
  88. 购买课次
  89. </view>
  90. </view>
  91. <u-line direction="col" color="rgba(232, 232, 232, 1)" length="80rpx" margin="auto 0"></u-line>
  92. <view class="box">
  93. <view class="times">
  94. 4节
  95. </view>
  96. <view class="text">
  97. 赠送课次
  98. </view>
  99. </view>
  100. </view>
  101. <view class="option-group">
  102. <view class="item">
  103. <view class="title">
  104. <view class="icon">
  105. <img src="../../../assets/img/riLine-user-smile-line@1x.png" alt="">
  106. </view>
  107. <view class="text">
  108. 人脸信息采集
  109. </view>
  110. </view>
  111. <view class="value">
  112. <view class="text">
  113. </view>
  114. <view class="icon">
  115. <u-icon name="arrow-right" color="#cccccc"></u-icon>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="item">
  120. <view class="title">
  121. <view class="icon">
  122. <img src="../../../assets/img/riLine-smartphone-line@1x(1).png" alt="">
  123. </view>
  124. <view class="text">
  125. 绑定手机
  126. </view>
  127. </view>
  128. <view class="value">
  129. <view class="text">
  130. 155****0000
  131. </view>
  132. <view class="icon">
  133. <u-icon name="arrow-right" color="#cccccc"></u-icon>
  134. </view>
  135. </view>
  136. </view>
  137. <view class="item">
  138. <view class="title">
  139. <view class="icon">
  140. <img src="../../../assets/img/riLine-file-edit-line@1x.png" alt="">
  141. </view>
  142. <view class="text">
  143. 意见反馈
  144. </view>
  145. </view>
  146. <view class="value">
  147. <view class="icon">
  148. <u-icon name="arrow-right" color="#cccccc"></u-icon>
  149. </view>
  150. </view>
  151. </view>
  152. <view class="item">
  153. <view class="title">
  154. <view class="icon">
  155. <img src="../../../assets/img/riLine-customer-service-2-line@1x.png" alt="">
  156. </view>
  157. <view class="text">
  158. 联系我们
  159. </view>
  160. </view>
  161. <view class="value">
  162. <view class="text">
  163. 0716-8888888
  164. </view>
  165. <view class="icon">
  166. <u-icon name="arrow-right" color="#cccccc"></u-icon>
  167. </view>
  168. </view>
  169. </view>
  170. <view class="item" @click="gotoUrl('pages/parents/mine/logout')">
  171. <view class="title">
  172. <view class="icon">
  173. <img src="../../../assets/img/riLine-spam-3-line@1x.png" alt="">
  174. </view>
  175. <view class="text">
  176. 注销账号
  177. </view>
  178. </view>
  179. <view class="value">
  180. <view class="text">
  181. 注销后无法恢复,请谨慎操作
  182. </view>
  183. <view class="icon">
  184. <u-icon name="arrow-right" color="#cccccc"></u-icon>
  185. </view>
  186. </view>
  187. </view>
  188. <view class="item" @click="signOut">
  189. <view class="title">
  190. <view class="icon">
  191. <img src="../../../assets/img/riLine-logout-box-r-line@1x(1).png" alt="">
  192. </view>
  193. <view class="text">
  194. 退出账号
  195. </view>
  196. </view>
  197. <view class="value">
  198. <view class="text">
  199. </view>
  200. <view class="icon">
  201. <u-icon name="arrow-right" color="#cccccc"></u-icon>
  202. </view>
  203. </view>
  204. </view>
  205. <u-modal v-model="show" @confirm="confirm" confirm-color="#FF3D00" :show-cancel-button="true" ref="uModal"
  206. :asyncClose="true" :title="title" :content="content" :content-style="{color: '#333333'}"></u-modal>
  207. </view>
  208. <ParentsTabbar :current="3" ref="tabbarMain"></ParentsTabbar>
  209. </view>
  210. </template>
  211. <script>
  212. import * as mineApi from '@/apis/parents/mine.js'
  213. import * as loginApi from '@/apis/login.js'
  214. import * as API from '@/apis/index.js'
  215. import ParentsTabbar from '@/components/ParentsTabbar.vue'
  216. export default {
  217. components: {
  218. ParentsTabbar
  219. },
  220. data() {
  221. return {
  222. parentsInfo: {},
  223. show: false,
  224. title: '退出账号',
  225. content: '是否退出当前账号?',
  226. studentList: [],
  227. }
  228. },
  229. onReady() {
  230. this.getStudentList();
  231. },
  232. methods: {
  233. getParentsInfo() {
  234. },
  235. getStudentList() {
  236. uni.showLoading({
  237. title: "加载中",
  238. mask: true,
  239. })
  240. mineApi.studentList().then((res) => {
  241. uni.hideLoading();
  242. this.studentList = res.data.studentList;
  243. }).catch(error => {
  244. uni.showToast({
  245. title: error,
  246. icon: "none"
  247. })
  248. })
  249. },
  250. signOut() {
  251. this.show = true;
  252. },
  253. confirm() {
  254. uni.showLoading({
  255. title: "加载中",
  256. mask: true,
  257. })
  258. API.logout().then((res) => {
  259. uni.hideLoading();
  260. this.show = false;
  261. this.carhelp.logoff()
  262. uni.reLaunch({
  263. url: '/pages/parents/login/login'
  264. })
  265. }).catch(error => {
  266. uni.showToast({
  267. title: error,
  268. icon: "none"
  269. })
  270. })
  271. }
  272. }
  273. }
  274. </script>
  275. <style lang="scss" scoped>
  276. .head {
  277. padding: 48rpx 40rpx;
  278. display: flex;
  279. align-items: center;
  280. .photo {
  281. width: 120rpx;
  282. height: 120rpx;
  283. border-radius: 100rpx;
  284. border: 4rpx solid rgba(255, 255, 255, 1);
  285. overflow: hidden;
  286. img {
  287. width: 100%;
  288. height: 100%;
  289. }
  290. }
  291. .infos {
  292. margin-left: 32rpx;
  293. .name {
  294. color: rgba(51, 51, 51, 1);
  295. font-size: 20px;
  296. line-height: 20px;
  297. font-weight: bold;
  298. }
  299. .modification {
  300. color: rgba(119, 119, 119, 1);
  301. font-size: 24rpx;
  302. line-height: 24rpx;
  303. margin-top: 16rpx;
  304. }
  305. }
  306. }
  307. .my-children {
  308. margin: 0 32rpx;
  309. padding: 32rpx 24rpx;
  310. border-radius: 12px;
  311. background: linear-gradient(90deg, rgba(13, 186, 199, 1) 0%, rgba(37, 209, 146, 1) 100%);
  312. .top {
  313. display: flex;
  314. justify-content: space-between;
  315. .text {
  316. color: rgba(255, 255, 255, 1);
  317. font-size: 18px;
  318. }
  319. .add {
  320. width: 120rpx;
  321. line-height: 28px;
  322. border-radius: 50px;
  323. background-color: rgba(255, 174, 0, 1);
  324. color: rgba(255, 255, 255, 1);
  325. font-size: 28rpx;
  326. text-align: center;
  327. }
  328. }
  329. .children {
  330. margin-top: 12px;
  331. border-radius: 16rpx;
  332. background-color: rgba(255, 255, 255, 1);
  333. padding: 24rpx 24rpx 8rpx 24rpx;
  334. display: flex;
  335. flex-wrap: wrap;
  336. .check-box {
  337. padding: 16rpx 40rpx 16rpx 16rpx;
  338. border-radius: 100rpx;
  339. background-color: rgba(13, 186, 199, 0.1);
  340. border: 1px solid rgba(13, 186, 199, 0.5);
  341. display: flex;
  342. position: relative;
  343. margin-right: 24rpx;
  344. margin-bottom:16rpx;
  345. .photo {
  346. width: 80rpx;
  347. height: 80rpx;
  348. border-radius: 100rpx;
  349. overflow: hidden;
  350. img {
  351. width: 100%;
  352. height: 100%;
  353. }
  354. }
  355. @media screen and(max-width:320px){
  356. .photo {
  357. width: 70rpx;
  358. height: 70rpx;
  359. border-radius: 999rpx;
  360. overflow: hidden;
  361. img {
  362. width: 100%;
  363. height: 100%;
  364. vertical-align: middle;
  365. }
  366. }
  367. }
  368. .infos {
  369. margin-left: 16rpx;
  370. .name {
  371. width: 96rpx;
  372. overflow: hidden;
  373. white-space: nowrap;
  374. text-overflow: ellipsis;
  375. color: rgba(51, 51, 51, 1);
  376. font-size: 32rpx;
  377. line-height: 48rpx;
  378. }
  379. .age {
  380. color: rgba(119, 119, 119, 1);
  381. font-size: 24rpx;
  382. line-height: 28rpx;
  383. }
  384. }
  385. .radio {
  386. position: absolute;
  387. bottom: -2rpx;
  388. right: -8rpx;
  389. /deep/.uni-radio-input {
  390. width: 40rpx;
  391. height: 40rpx;
  392. background-color: rgba(221, 241, 242, 1);
  393. }
  394. /deep/.uni-radio-input-checked {
  395. background-color: #43C9D3 !important;
  396. border-color: #43C9D3 !important;
  397. }
  398. }
  399. }
  400. @media screen and(max-width:320px) {
  401. .check-box{
  402. margin-right:16rpx;
  403. }
  404. }
  405. }
  406. }
  407. .class-times {
  408. border-radius: 12px;
  409. background-color: rgba(255, 255, 255, 1);
  410. display: flex;
  411. padding: 20px 0;
  412. margin: 12px 16px;
  413. .box {
  414. width: 50%;
  415. text-align: center;
  416. .times {
  417. color: rgba(51, 51, 51, 1);
  418. font-size: 20px;
  419. font-weight: bold;
  420. }
  421. .text {
  422. color: rgba(119, 119, 119, 1);
  423. font-size: 14px;
  424. margin-top: 8px;
  425. }
  426. }
  427. }
  428. .option-group {
  429. margin: 0 32rpx;
  430. background-color: #fff;
  431. border-radius: 12px;
  432. .item {
  433. display: flex;
  434. justify-content: space-between;
  435. align-items: center;
  436. padding: 24rpx;
  437. border-bottom: 1px solid rgba(244, 244, 244, 1);
  438. .title {
  439. display: flex;
  440. align-items: center;
  441. img {
  442. vertical-align: middle;
  443. }
  444. .text {
  445. margin-left: 16rpx;
  446. color: rgba(119, 119, 119, 1);
  447. font-size: 28rpx
  448. }
  449. }
  450. .value {
  451. display: flex;
  452. align-items: center;
  453. .icon {
  454. margin-left: 16rpx;
  455. }
  456. .text {
  457. color: rgba(119, 119, 119, 1);
  458. font-size: 24rpx;
  459. }
  460. }
  461. }
  462. }
  463. </style>