schooldetail.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="jiben">
  3. <view v-for="(sc,i) in list" :key="i" v-if="i==chongci">
  4. <view class="schoolicon">
  5. <image :src="sc.schoolImg" mode="widthFix"></image>
  6. </view>
  7. <view class="icontext">
  8. 系统预测该校录取概率为:{{chongci}}
  9. </view>
  10. <view class="jieshao">
  11. <sun-tab :value.sync="index" :tabList="tabList"></sun-tab>
  12. <view :value.sync="index" v-if="index==0">
  13. <view>{{sc.schoolName}}</view>
  14. <view>{{sc.banxuexingzhi}}</view>
  15. <view>{{sc.leixing}}</view>
  16. <view>{{sc.lishu}}</view>
  17. <view>{{sc.shengshi}}</view>
  18. <view>{{sc.dizhi}}</view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import sunTab from '@/components/sun-tab/sun-tab.vue';
  26. export default {
  27. // props: ['schoolInfo'],
  28. components: {
  29. sunTab
  30. },
  31. data() {
  32. return {
  33. chongci: "",
  34. list: getApp().globalData.schoolInfo,
  35. schoolImg: '',
  36. Name: '',
  37. index: 0,
  38. tabList: ['学院介绍', '开设专业', '录取招生'], //普通数据赋值
  39. tabObjectList: [ //对象数组赋值
  40. {
  41. name: '学院介绍',
  42. value: 1
  43. },
  44. {
  45. name: '开设专业',
  46. value: 2
  47. },
  48. {
  49. name: '录取招生',
  50. value: 3
  51. }
  52. ],
  53. }
  54. },
  55. onLoad(event) {
  56. this.chongci = getApp().globalData.global_page;
  57. // console.log(this);
  58. wx.setNavigationBarTitle({
  59. title: this._data.list[this.chongci].schoolName
  60. })
  61. },
  62. methods: {
  63. arrayChange(e) {
  64. console.log('数组数据返回格式');
  65. console.log(e);
  66. },
  67. objectChange(e) {
  68. console.log('对象数据返回格式');
  69. console.log(e);
  70. }
  71. }
  72. }
  73. </script>
  74. <style>
  75. .jiben {
  76. padding-top: 60upx;
  77. width: 750upx;
  78. height: 1002upx;
  79. background: rgba(255, 255, 255, 1);
  80. }
  81. .schoolicon {
  82. margin: 0 auto;
  83. width: 180upx;
  84. height: 180upx;
  85. }
  86. .schoolicon image {
  87. display: inline;
  88. }
  89. .icontext {
  90. margin-top: 24upx;
  91. text-align: center;
  92. font-size: 28upx;
  93. font-family: PingFangSC;
  94. font-weight: 400;
  95. color: rgba(117, 119, 128, 1);
  96. line-height: 40upx;
  97. margin-bottom: 60upx;
  98. }
  99. </style>