提交
This commit is contained in:
175
src/pages/index/components/Subject1.vue
Normal file
175
src/pages/index/components/Subject1.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="box-nav">
|
||||
<image style="width: 100%;" src="../../static/image/index/index_bg.png"></image>
|
||||
<view class="center-box flex jc-sb ai-c">
|
||||
<view class="box-item flex ai-c jc-c">
|
||||
<view class="btn-item flex ai-c jc-c">
|
||||
<view class="text-center cor-fff" style="line-height: 40rpx;" @tap="toAnswer">
|
||||
<view class="fs16">顺序练习</view>
|
||||
<text class="fs14">0/2344</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-item flex ai-c jc-c">
|
||||
<view class="btn2-item flex ai-c jc-c">
|
||||
<view class="text-center cor-fff" style="line-height: 40rpx;">
|
||||
<view class="fs16">模拟考试</view>
|
||||
<text class="fs14">去考试</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 0 28rpx;margin-top: 110rpx;">
|
||||
<view class="tabs-box">
|
||||
<view class="wp33 flex ai-c jc-c">
|
||||
<view class="text-center wp100">
|
||||
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
|
||||
src="../../static/image/index/vipicon.png">
|
||||
</image>
|
||||
<view class="mt5">VIP课程</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wp33 flex ai-c jc-c">
|
||||
<view class="text-center wp100">
|
||||
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
|
||||
src="../../static/image/index/500icon.png">
|
||||
</image>
|
||||
<view class="mt5">精简500题</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wp33 flex ai-c jc-c">
|
||||
<view class="text-center wp100">
|
||||
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
|
||||
src="../../static/image/index/zxicon.png">
|
||||
</image>
|
||||
<view class="mt5">专项练习</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wp33 flex ai-c jc-c">
|
||||
<view class="text-center wp100">
|
||||
<image style="width: 72rpx;height: 72rpx;margin: 0 auto;"
|
||||
src="../../static/image/index/realicon.png"></image>
|
||||
<view class="mt5">真实考场模拟</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wp33 flex ai-c jc-c">
|
||||
<view class="text-center wp100">
|
||||
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
|
||||
src="../../static/image/index/testbeforeicon.png"></image>
|
||||
<view class="mt5">考前密卷</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wp33 flex ai-c jc-c">
|
||||
<view class="text-center wp100">
|
||||
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
|
||||
src="../../static/image/index/worryicon.png"></image>
|
||||
<view class="mt5">错题收藏</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 0 28rpx;margin-top: 30rpx;">
|
||||
<view class="video-box">
|
||||
<view class="flex jc-sb ai-c wp100">
|
||||
<text style="color: #05C341;font-size: 36rpx;">科一精品视频课</text>
|
||||
<text class="cor-666 fs12">全部10节课 ></text>
|
||||
</view>
|
||||
<view class="flex ai-c mt20">
|
||||
<image class="contain-box" src="../../static/image/index/index_bg.png"></image>
|
||||
<view class="ml15 text-center">
|
||||
<u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff"
|
||||
text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle">
|
||||
</u-button>
|
||||
<view class="cor-333 fs15 fw600 mt10">科一易错试题</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
toAnswer() {
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-nav {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.center-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 170rpx;
|
||||
padding: 0 28rpx;
|
||||
}
|
||||
|
||||
.box-item {
|
||||
width: 336rpx;
|
||||
height: 336rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.btn-item {
|
||||
width: 193rpx;
|
||||
height: 193rpx;
|
||||
background: linear-gradient(0deg, #11DF20 0%, #00B74F 100%);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.btn2-item {
|
||||
width: 193rpx;
|
||||
height: 193rpx;
|
||||
background: linear-gradient(0deg, #E95A0E 0%, #FF9600 100%);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
::v-deep .u-tabs__wrapper__nav__line {
|
||||
background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%) !important;
|
||||
bottom: 14rpx !important;
|
||||
}
|
||||
|
||||
.tabs-box {
|
||||
width: 694rpx;
|
||||
height: 366rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.video-box {
|
||||
padding: 20rpx;
|
||||
width: 694rpx;
|
||||
height: 369rpx;
|
||||
background: #DEEFE5;
|
||||
border: 2px solid #47DB87;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.contain-box {
|
||||
width: 406rpx;
|
||||
height: 228rpx;
|
||||
background: #00B74F;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
</style>
|
||||
46
src/pages/index/components/Subject2.vue
Normal file
46
src/pages/index/components/Subject2.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="box-nav">
|
||||
<image style="width: 100%;" src="../../static/image/index/index_bg.png"></image>
|
||||
<view class="center-box flex jc-sb ai-c">
|
||||
<view class="box-item flex ai-c jc-c">
|
||||
<view class="btn-item flex ai-c jc-c">
|
||||
<view class="text-center cor-fff" style="line-height: 40rpx;">
|
||||
<view class="fs16">顺序练习</view>
|
||||
<text class="fs14">0/2344</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-item flex ai-c jc-c">
|
||||
<view class="btn2-item flex ai-c jc-c">
|
||||
<view class="text-center cor-fff" style="line-height: 40rpx;">
|
||||
<view class="fs16">模拟考试</view>
|
||||
<text class="fs14">去考试</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Subject2"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-nav{
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.center-box{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 170rpx;
|
||||
padding: 0 28rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
52
src/pages/index/index.vue
Normal file
52
src/pages/index/index.vue
Normal file
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky bgColor="#fff">
|
||||
<u-tabs :list="categoryList" :scrollable="false"></u-tabs>
|
||||
</u-sticky>
|
||||
<view style="height: 100vh;background-color: rgb(245, 245, 245);">
|
||||
<Subject1 />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import storage from '@/jtools/storage';
|
||||
import Subject1 from "./components/Subject1";
|
||||
export default {
|
||||
components: {Subject1},
|
||||
data() {
|
||||
return {
|
||||
searchValue:'',
|
||||
cityName:'',
|
||||
categoryList:[{
|
||||
name:'科目1'
|
||||
},{
|
||||
name:'科目2'
|
||||
},{
|
||||
name:'科目3'
|
||||
},{
|
||||
name:'科目4'
|
||||
}]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
//切换科目
|
||||
changeCategory(){
|
||||
|
||||
},
|
||||
//获取全部题库
|
||||
getAllQuestion(){
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .u-tabs__wrapper__nav__line {
|
||||
background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%) !important;
|
||||
bottom: 14rpx !important;
|
||||
}
|
||||
</style>
|
||||
27
src/pages/login/agreement.vue
Normal file
27
src/pages/login/agreement.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :webview-styles="webviewStyles" :src="articleurl"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
articleurl: '',
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: '#FF7200'
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.articleurl = 'http://www.baidu.com/';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
255
src/pages/login/forget.vue
Normal file
255
src/pages/login/forget.vue
Normal file
@@ -0,0 +1,255 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="list">
|
||||
<view class="tishi">若您忘记了密码,可在此重新设置新密码。</view>
|
||||
<view class="list-call">
|
||||
<u-icon name="phone" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" type="number" v-model="phone" maxlength="11" placeholder="请输入手机号" />
|
||||
</view>
|
||||
<view class="list-call">
|
||||
<u-icon name="lock" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" type="text" v-model="password" maxlength="32" placeholder="请输入新密码"
|
||||
:password="!showPassword" />
|
||||
<u-icon @click="display" :name="showPassword?'eye-off':'eye-fill'" color="#EE2626" size="40"></u-icon>
|
||||
|
||||
</view>
|
||||
<view class="list-call">
|
||||
<u-icon name="checkmark-circle" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" type="number" v-model="code" maxlength="4" placeholder="验证码" />
|
||||
<view class="yzm" :class="{ yzms: second>0 }" @tap="getcode">{{yanzhengma}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-login" hover-class="button-hover" @tap="bindLogin()">
|
||||
<text>修改密码</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var _this, js;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: '',
|
||||
second: 0,
|
||||
code: "",
|
||||
showPassword: false,
|
||||
password: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
_this = this;
|
||||
},
|
||||
computed: {
|
||||
yanzhengma() {
|
||||
if (this.second == 0) {
|
||||
return '获取验证码';
|
||||
} else {
|
||||
if (this.second < 10) {
|
||||
return '重新获取0' + this.second;
|
||||
} else {
|
||||
return '重新获取' + this.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.clear()
|
||||
},
|
||||
methods: {
|
||||
display() {
|
||||
this.showPassword = !this.showPassword
|
||||
},
|
||||
clear() {
|
||||
clearInterval(js)
|
||||
js = null
|
||||
this.second = 0
|
||||
},
|
||||
getcode() {
|
||||
if (this.phone.length != 11) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '手机号不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.second > 0) {
|
||||
return;
|
||||
}
|
||||
_this.second = 60;
|
||||
js = setInterval(function() {
|
||||
_this.second--;
|
||||
if (_this.second == 0) {
|
||||
_this.clear()
|
||||
}
|
||||
}, 1000)
|
||||
uni.request({
|
||||
url: 'http://***/getPassWord', //仅为示例,并非真实接口地址。
|
||||
data: {
|
||||
phone: this.phone,
|
||||
type: 'forget'
|
||||
},
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code != 200) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
_this.second = 0;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg
|
||||
});
|
||||
_this.second = 60;
|
||||
js = setInterval(function() {
|
||||
_this.second--;
|
||||
if (_this.second == 0) {
|
||||
_this.clear()
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
this.clear()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
bindLogin() {
|
||||
if (this.phone.length != 11) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '手机号不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.password.length < 6) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '密码不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.code.length != 4) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '验证码不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: 'http://***/forget',
|
||||
data: {
|
||||
phone: this.phone,
|
||||
password: this.password,
|
||||
code: this.code
|
||||
},
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code != 200) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.navigateBack();
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tishi {
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
line-height: 50rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 50rpx;
|
||||
padding-left: 70rpx;
|
||||
padding-right: 70rpx;
|
||||
}
|
||||
|
||||
.list-call {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
color: #333333;
|
||||
border-bottom: 0.5px solid #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
.list-call .sl-input {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
font-size: 32rpx;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.button-login {
|
||||
color: #FFFFFF;
|
||||
font-size: 34rpx;
|
||||
width: 470rpx;
|
||||
height: 100rpx;
|
||||
background: linear-gradient(-90deg, rgba(193, 25, 32, 1), rgba(238, 38, 38, 1));
|
||||
border-radius: 50rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.button-hover {
|
||||
background: linear-gradient(-90deg, rgba(193, 25, 32, 0.8), rgba(238, 38, 38, 0.8));
|
||||
}
|
||||
|
||||
.yzm {
|
||||
color: #FF7D13;
|
||||
font-size: 24rpx;
|
||||
line-height: 64rpx;
|
||||
padding-left: 10rpx;
|
||||
padding-right: 10rpx;
|
||||
width: auto;
|
||||
height: 64rpx;
|
||||
border: 1rpx solid rgba(255, 131, 30, 1);
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.yzms {
|
||||
color: #999999 !important;
|
||||
border: 1rpx solid #999999;
|
||||
}
|
||||
</style>
|
||||
140
src/pages/login/login.vue
Normal file
140
src/pages/login/login.vue
Normal file
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
<image src="/static/images/login/logo.jpg"></image>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<view class="list-call">
|
||||
<u-icon name="phone" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" v-model="login.phone" type="number" maxlength="11" placeholder="输入手机号" />
|
||||
</view>
|
||||
<view class="list-call">
|
||||
<u-icon name="lock" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" v-model="login.password" type="text" maxlength="32" placeholder="输入密码"
|
||||
password="true" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="button-login" hover-class="button-hover" @tap="bindLogin()">
|
||||
<text>登录</text>
|
||||
</view>
|
||||
|
||||
<view class="agreenment">
|
||||
<navigator url="/pages/login/forget" open-type="navigate">忘记密码</navigator>
|
||||
<text>|</text>
|
||||
<navigator url="/pages/login/reg" open-type="navigate">注册账户</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
login: {
|
||||
phone: '',
|
||||
password: ''
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
bindLogin() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 161rpx;
|
||||
height: 161rpx;
|
||||
border-radius: 50%;
|
||||
margin-top: 30rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.header image {
|
||||
width: 161rpx;
|
||||
height: 161rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 50rpx;
|
||||
padding-left: 70rpx;
|
||||
padding-right: 70rpx;
|
||||
}
|
||||
|
||||
.list-call {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
color: #333333;
|
||||
border-bottom: 0.5px solid #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.list-call .sl-input {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
font-size: 32rpx;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.button-login {
|
||||
color: #FFFFFF;
|
||||
font-size: 34rpx;
|
||||
width: 470rpx;
|
||||
height: 100rpx;
|
||||
background: linear-gradient(-90deg, rgba(193, 25, 32, 1), rgba(238, 38, 38, 1));
|
||||
border-radius: 50rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.button-hover {
|
||||
background: linear-gradient(-90deg, rgba(193, 25, 32, 0.8), rgba(238, 38, 38, 0.8));
|
||||
}
|
||||
|
||||
.agreenment {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
margin-top: 80rpx;
|
||||
color: #FFA800;
|
||||
text-align: center;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.agreenment text {
|
||||
font-size: 24rpx;
|
||||
margin-left: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
</style>
|
||||
303
src/pages/login/reg.vue
Normal file
303
src/pages/login/reg.vue
Normal file
@@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
<image src="/static/images/login/logo.jpg"></image>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<view class="list-call">
|
||||
<u-icon name="phone" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" v-model="phone" type="number" maxlength="11" placeholder="手机号" />
|
||||
</view>
|
||||
<view class="list-call">
|
||||
<u-icon name="lock" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" v-model="password" type="text" maxlength="32" placeholder="登录密码"
|
||||
:password="!showPassword" />
|
||||
<u-icon @click="display" :name="showPassword?'eye-off':'eye-fill'" color="#EE2626" size="40"></u-icon>
|
||||
</view>
|
||||
<view class="list-call">
|
||||
<u-icon name="checkmark-circle" color="#EE2626" size="40"></u-icon>
|
||||
<input class="sl-input" v-model="code" type="number" maxlength="4" placeholder="验证码" />
|
||||
<view class="yzm" :class="{ yzms: second>0 }" @tap="getcode">{{yanzhengma}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="button-login" hover-class="button-hover" @tap="bindLogin">
|
||||
<text>注册</text>
|
||||
</view>
|
||||
|
||||
<view class="agreement">
|
||||
<image @tap="agreementSuccess"
|
||||
:src="agreement==true?'/static/images/login/ty1.png':'/static/images/login/ty0.png'"></image>
|
||||
<text @tap="agreementSuccess"> 同意</text>
|
||||
<navigator url="/pages/login/agreement?id=1" open-type="navigate">《软件用户协议》</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var _this, js;
|
||||
export default {
|
||||
onLoad() {
|
||||
_this = this;
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
clearInterval(js)
|
||||
this.second = 0;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
phone: '',
|
||||
password: '',
|
||||
code: '',
|
||||
agreement: true,
|
||||
showPassword: false,
|
||||
second: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
yanzhengma() {
|
||||
if (this.second == 0) {
|
||||
return '获取验证码';
|
||||
} else {
|
||||
if (this.second < 10) {
|
||||
return '重新获取0' + this.second;
|
||||
} else {
|
||||
return '重新获取' + this.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.clear()
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
clearInterval(js)
|
||||
js = null
|
||||
this.second = 0
|
||||
},
|
||||
display() {
|
||||
this.showPassword = !this.showPassword
|
||||
},
|
||||
agreementSuccess() {
|
||||
this.agreement = !this.agreement;
|
||||
},
|
||||
getcode() {
|
||||
if (this.phone.length != 11) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '手机号不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.second > 0) {
|
||||
return;
|
||||
}
|
||||
this.second = 60;
|
||||
//请求业务
|
||||
js = setInterval(function() {
|
||||
_this.second--;
|
||||
if (_this.second == 0) {
|
||||
_this.clear()
|
||||
}
|
||||
}, 1000)
|
||||
// uni.request({
|
||||
// url: 'http://***/getcode.html', //仅为示例,并非真实接口地址。
|
||||
// data: {
|
||||
// phone: this.phone,
|
||||
// type: 'reg'
|
||||
// },
|
||||
// method: 'POST',
|
||||
// dataType: 'json',
|
||||
// success: (res) => {
|
||||
// if (res.data.code != 200) {
|
||||
// uni.showToast({
|
||||
// title: res.data.msg,
|
||||
// icon: 'none'
|
||||
// });
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: res.data.msg
|
||||
// });
|
||||
// js = setInterval(function() {
|
||||
// _this.second--;
|
||||
// if (_this.second == 0) {
|
||||
// _this.clear()
|
||||
// }
|
||||
// }, 1000)
|
||||
// }
|
||||
// },
|
||||
// fail() {
|
||||
// this.second == 0
|
||||
// }
|
||||
// });
|
||||
},
|
||||
bindLogin() {
|
||||
if (this.agreement == false) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先阅读《软件用户协议》'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.phone.length != 11) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '手机号不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.password.length < 6) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '密码不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.code.length != 4) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '验证码不正确'
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: 'http://***/reg.html',
|
||||
data: {
|
||||
phone: this.phone,
|
||||
password: this.password,
|
||||
code: this.code,
|
||||
},
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code != 200) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.navigateBack();
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 161rpx;
|
||||
height: 161rpx;
|
||||
border-radius: 50%;
|
||||
margin-top: 30rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.header image {
|
||||
width: 161rpx;
|
||||
height: 161rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 50rpx;
|
||||
padding-left: 70rpx;
|
||||
padding-right: 70rpx;
|
||||
}
|
||||
|
||||
.list-call {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
color: #333333;
|
||||
border-bottom: 0.5px solid #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.list-call .sl-input {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
font-size: 32rpx;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.yzm {
|
||||
color: #FF7D13;
|
||||
font-size: 24rpx;
|
||||
line-height: 64rpx;
|
||||
padding-left: 10rpx;
|
||||
padding-right: 10rpx;
|
||||
width: auto;
|
||||
height: 64rpx;
|
||||
border: 1rpx solid #FFA800;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.yzms {
|
||||
color: #999999 !important;
|
||||
border: 1rpx solid #999999;
|
||||
}
|
||||
|
||||
.button-login {
|
||||
color: #FFFFFF;
|
||||
font-size: 34rpx;
|
||||
width: 470rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background: linear-gradient(-90deg, rgba(193, 25, 32, 1), rgba(238, 38, 38, 1));
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.button-hover {
|
||||
background: linear-gradient(-90deg, rgba(193, 25, 32, 0.8), rgba(238, 38, 38, 0.8));
|
||||
}
|
||||
|
||||
.agreement {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
margin-top: 80rpx;
|
||||
color: #FFA800;
|
||||
text-align: center;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.agreement image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
30
src/pages/me/index.vue
Normal file
30
src/pages/me/index.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg-white padding">
|
||||
<view class="text-xl text-center">我的
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
//加载
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
13
src/pages/public/404.vue
Normal file
13
src/pages/public/404.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
|
||||
<u-empty mode="page">
|
||||
<u-button slot="bottom" size="medium" @click="$Router.pushTab('/pages/tabbar/home')">
|
||||
去首页
|
||||
</u-button>
|
||||
</u-empty>
|
||||
</template>
|
||||
|
||||
<script></script>
|
||||
|
||||
<style></style>
|
||||
146
src/pages/questionBank/components/Question.vue
Normal file
146
src/pages/questionBank/components/Question.vue
Normal file
@@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<view style="margin-top: 100px;">
|
||||
<view class="flex ai-c jc-c">
|
||||
<view class="flex type_box">
|
||||
<view class="type_item" :class="tCurrent==0?'checked':'unchecked'" @tap="sectionChange(0)">答题</view>
|
||||
<view class="type_item" :class="tCurrent==1?'checked':'unchecked'" @tap="sectionChange(1)">背题</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m14lr">
|
||||
<text class="tag_box">{{questionList[currentIndex].questionTypeDesc}}</text>
|
||||
<text class="fs18">{{questionList[currentIndex].questionDesc}}</text>
|
||||
</view>
|
||||
<view class="flex m14lr ai-c mt20" v-for="(item,index) in questionList[currentIndex].optionList" :key="item.op">
|
||||
<template v-if="clickAnswer&&item.op===questionList[currentIndex].rightAnswer">
|
||||
<u-icon name="checkmark-circle-fill" color="#05C341" size="30"></u-icon>
|
||||
</template>
|
||||
<template v-else-if="clickAnswer===item.op&&item.op!==questionList[currentIndex].rightAnswer">
|
||||
<u-icon name="close-circle-fill" color="red" size="30"></u-icon>
|
||||
</template>
|
||||
<template v-else-if="!clickAnswer">
|
||||
<view class="option_item">{{item.op}}</view>
|
||||
</template>
|
||||
<text class="fs18">{{item.opDesc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tCurrent:0,
|
||||
clickAnswer:undefined,
|
||||
questionList:[],
|
||||
currentIndex:0,
|
||||
}
|
||||
},
|
||||
onshow(){
|
||||
this.getQuestionList()
|
||||
},
|
||||
methods: {
|
||||
sectionChange(index){
|
||||
this.tCurrent=index
|
||||
},
|
||||
getQuestionList(){
|
||||
this.questionList=[{
|
||||
questionId:0,
|
||||
questionTypeDesc:'单选',
|
||||
questionDesc:'在实习期内驾驶机动车的,应当在车身后部粘贴或者悬挂哪种标志?',
|
||||
optionList:[{
|
||||
op:'A',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'B',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'C',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'D',
|
||||
opDesc:'注意新手标志'
|
||||
}],
|
||||
rightOp:'C',
|
||||
},{
|
||||
questionId:1,
|
||||
questionDesc:'在实习期内驾驶机动车的,应当在车身后部粘贴或者悬挂哪种标志?',
|
||||
optionList:[{
|
||||
op:'A',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'B',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'C',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'D',
|
||||
opDesc:'注意新手标志'
|
||||
}],
|
||||
rightOp:'B',
|
||||
},{
|
||||
questionId:2,
|
||||
questionDesc:'在实习期内驾驶机动车的,应当在车身后部粘贴或者悬挂哪种标志?',
|
||||
optionList:[{
|
||||
op:'A',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'B',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'C',
|
||||
opDesc:'注意新手标志'
|
||||
},{
|
||||
op:'D',
|
||||
opDesc:'注意新手标志'
|
||||
}],
|
||||
rightOp:'A',
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.type_box{
|
||||
width: 280rpx;
|
||||
height: 72rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.type_item{
|
||||
text-align: center;
|
||||
line-height: 64rpx;
|
||||
width: 126rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.checked{
|
||||
color: #fff;
|
||||
background-color: #05C341;
|
||||
}
|
||||
.unchecked{
|
||||
color: #666;
|
||||
}
|
||||
.tag_box{
|
||||
display: inline-block;
|
||||
width: 78rpx;
|
||||
height: 42rpx;
|
||||
background: #05C341;
|
||||
border-radius: 8rpx;
|
||||
text-align: center;
|
||||
line-height: 42rpx;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.option_item{
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border: 1px solid #666;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
</style>
|
||||
22
src/pages/questionBank/practiceExams.vue
Normal file
22
src/pages/questionBank/practiceExams.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
28
src/pages/questionBank/questionBank.vue
Normal file
28
src/pages/questionBank/questionBank.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-navbar title="顺序答题" @rightClick="rightClick" :autoBack="true">
|
||||
</u-navbar>
|
||||
<Question />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Question from './components/Question.vue';
|
||||
export default {
|
||||
components: {Question},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
rightClick(){
|
||||
console.log('返回');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user