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.
99 lines
2.6 KiB
99 lines
2.6 KiB
<template>
|
|
<view class="pageBgImg">
|
|
<topNavbar title=" "></topNavbar>
|
|
<view class="pad">
|
|
<view class="h3">请选择您要学习的类型</view>
|
|
<view class="radioBox">
|
|
<view class="radioItem" v-for="(item,index) in radioArr" :key="index" @click="changeNav(item)">
|
|
<view class="text">{{ item.text }}</view>
|
|
<view class="icon">
|
|
<image src="@/static/images/index/radio_cli.png" mode="" v-if="currentId==item.id"></image>
|
|
<image src="@/static/images/index/radio_nor.png" mode="" v-else></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="btn" @click="goPage">去练习</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { website } from '@/config/site.config.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
radioArr: [
|
|
{text: '自学练习', id: 1},
|
|
// {text: '记录理论学时', id: 2},
|
|
// {text: '安全警示教育在线视频学习', id: 3},
|
|
],
|
|
currentId: 1,
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
// if(options.type) this.currentId = options.type
|
|
},
|
|
methods: {
|
|
changeNav(item) {
|
|
this.currentId = item.id
|
|
},
|
|
goPage() {
|
|
// return this.$u.toast('待确定!')
|
|
if(this.currentId==1) {
|
|
// let url = 'https://www.hzsjspx.com/theory/scienceStudy?token=amlhcGVpMTY5NTc3NzUzODg5ODA5NjU1&lat=30.343055&lng=120.183711&isUni=1'
|
|
let url =`http://121.41.97.244/question/question?phone=${this.vuex_userInfo.phone}&cityCode=3311&isUni=1`
|
|
this.$store.commit('updateWebVeiwUrl', url)
|
|
this.$goPage('/pages/indexEntry/theory/webView')
|
|
}else if(this.currentId==2) {
|
|
let theory = website+':91/theory/'
|
|
let token = this.$store.state.user.vuex_loginInfo.accessToken
|
|
let lat = this.vuex_cityInfo.lat|| 30.27419537786047
|
|
let lng = this.vuex_cityInfo.lng|| 120.20633397715788
|
|
let url = `${theory}?token=${token}&lat=${lat}&lng=${lng}&isWx=1`
|
|
this.$store.commit('updateWebVeiwUrl', url)
|
|
this.$goPage('/pages/indexEntry/webView/webView')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.radioBox {
|
|
width: 100%;
|
|
}
|
|
.h3 {
|
|
font-size: 28rpx;
|
|
color: #fff;
|
|
padding: 20rpx 10rpx;
|
|
}
|
|
.radioItem {
|
|
width: 100%;
|
|
height: 120rpx;
|
|
background: #FFFFFF;
|
|
border-radius: 16rpx;
|
|
margin-bottom: 20rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 0 32rpx;
|
|
.text {
|
|
font-size: 28rpx;
|
|
}
|
|
.icon {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
}
|
|
}
|
|
.btn {
|
|
width: 396rpx;
|
|
height: 72rpx;
|
|
background: #1989FA;
|
|
border-radius: 8rpx;
|
|
font-size: 28rpx;
|
|
color: #fff;
|
|
text-align: center;
|
|
line-height: 72rpx;
|
|
margin: 140rpx auto 0 auto;
|
|
}
|
|
</style>
|