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.2 KiB
98 lines
2.2 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() {
|
|
if(!this.vuex_userInfo.phone) {
|
|
this.$u.toast('请先登录')
|
|
setTimeout(()=>{
|
|
uni.navigateTo({
|
|
url:'/pages/userCenter/login/login'
|
|
})
|
|
},1500)
|
|
return
|
|
}
|
|
let url =`http://question.ywxcw.cn/h5/index.html#/?phone=${this.vuex_userInfo.phone}&type=1`
|
|
// let url =`http://192.168.1.94:90`
|
|
|
|
this.$store.commit('updateWebVeiwUrl', url)
|
|
this.$goPage('/pages/indexEntry/theory/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>
|