洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.6 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title=" "></topNavbar>
  4. <view class="pad">
  5. <view class="h3">请选择您要学习的类型</view>
  6. <view class="radioBox">
  7. <view class="radioItem" v-for="(item,index) in radioArr" :key="index" @click="changeNav(item)">
  8. <view class="text">{{ item.text }}</view>
  9. <view class="icon">
  10. <image src="@/static/images/index/radio_cli.png" mode="" v-if="currentId==item.id"></image>
  11. <image src="@/static/images/index/radio_nor.png" mode="" v-else></image>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="btn" @click="goPage">去练习</view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import { website } from '@/config/site.config.js'
  21. export default {
  22. data() {
  23. return {
  24. radioArr: [
  25. {text: '自学练习', id: 1},
  26. // {text: '记录理论学时', id: 2},
  27. // {text: '安全警示教育在线视频学习', id: 3},
  28. ],
  29. currentId: 1,
  30. }
  31. },
  32. onLoad(options) {
  33. if(options.type) this.currentId = options.type
  34. },
  35. methods: {
  36. changeNav(item) {
  37. this.currentId = item.id
  38. },
  39. goPage() {
  40. // return this.$u.toast('待确定!')
  41. if(this.currentId==1) {
  42. // let url = 'https://www.hzsjspx.com/theory/scienceStudy?token=amlhcGVpMTY5NTc3NzUzODg5ODA5NjU1&lat=30.343055&lng=120.183711&isUni=1'
  43. let url =`http://121.41.97.244/question/question?phone=${this.vuex_userInfo.phone}&cityCode=3311&isUni=1`
  44. this.$store.commit('updateWebVeiwUrl', url)
  45. this.$goPage('/pages/indexEntry/theory/webView')
  46. }else if(this.currentId==2) {
  47. let theory = website+':91/theory/'
  48. let token = this.$store.state.user.vuex_loginInfo.accessToken
  49. let lat = this.vuex_cityInfo.lat|| 30.27419537786047
  50. let lng = this.vuex_cityInfo.lng|| 120.20633397715788
  51. let url = `${theory}?token=${token}&lat=${lat}&lng=${lng}&isWx=1`
  52. this.$store.commit('updateWebVeiwUrl', url)
  53. this.$goPage('/pages/indexEntry/webView/webView')
  54. }
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .radioBox {
  61. width: 100%;
  62. }
  63. .h3 {
  64. font-size: 28rpx;
  65. color: #fff;
  66. padding: 20rpx 10rpx;
  67. }
  68. .radioItem {
  69. width: 100%;
  70. height: 120rpx;
  71. background: #FFFFFF;
  72. border-radius: 16rpx;
  73. margin-bottom: 20rpx;
  74. display: flex;
  75. justify-content: space-between;
  76. align-items: center;
  77. padding: 0 32rpx;
  78. .text {
  79. font-size: 28rpx;
  80. }
  81. .icon {
  82. width: 32rpx;
  83. height: 32rpx;
  84. }
  85. }
  86. .btn {
  87. width: 396rpx;
  88. height: 72rpx;
  89. background: #1989FA;
  90. border-radius: 8rpx;
  91. font-size: 28rpx;
  92. color: #fff;
  93. text-align: center;
  94. line-height: 72rpx;
  95. margin: 140rpx auto 0 auto;
  96. }
  97. </style>