classCallStudentDetail.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view>
  3. <u-navbar title="剩余课时详情"></u-navbar>
  4. <view class="main" v-for="(item, index) in detail.buyLogList" :key="index">
  5. <u-cell-group>
  6. <u-cell-item title="订单号" :value="item.billNum" :arrow="false"></u-cell-item>
  7. <u-cell-item title="购买时间" :value="item.buyTime" :arrow="false"></u-cell-item>
  8. <u-cell-item title="课程单价(元)" :value="item.unitPrice" :arrow="false"></u-cell-item>
  9. <u-cell-item title="剩余课时" :value="item.remainCount" :arrow="false"></u-cell-item>
  10. </u-cell-group>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import * as callNamesApi from '@/apis/teacher/callNames.js'
  16. export default {
  17. data() {
  18. return {
  19. studentId: '',
  20. classId: '',
  21. detail: {
  22. courseAmountList: [0],
  23. buyLogList: []
  24. },
  25. }
  26. },
  27. onLoad(op) {
  28. if (op.id) {
  29. this.studentId = op.id;
  30. this.classId = op.classId;
  31. this.getStudentDetail();
  32. }
  33. },
  34. methods: {
  35. getStudentDetail() {
  36. uni.showLoading({
  37. title: "加载中",
  38. mask: true,
  39. })
  40. callNamesApi.getStudentData({
  41. studentId: this.studentId,
  42. classId: this.classId
  43. }).then((response) => {
  44. uni.hideLoading();
  45. this.detail = response.data;
  46. }).catch(error => {
  47. uni.showToast({
  48. title: error,
  49. icon: "none"
  50. })
  51. })
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .main{
  58. background-color: #fff;
  59. margin-bottom: 10px;
  60. }
  61. /deep/.u-cell_title{
  62. color: rgba(119, 119, 119, 1);
  63. }
  64. /deep/.u-cell__value{
  65. color: #333333;
  66. }
  67. .teacher{
  68. /deep/.u-cell__value{
  69. color: #00BAC8;
  70. }
  71. }
  72. </style>