提交
This commit is contained in:
@@ -144,8 +144,14 @@
|
|||||||
"navigationBarTitleText": "真实考场模拟",
|
"navigationBarTitleText": "真实考场模拟",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
}
|
{
|
||||||
|
"path": "pages/me/uploadPic",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "上传证件照",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="box-nav">
|
<view class="box-nav">
|
||||||
<image style="width: 100%;" src="../../static/image/index/index_bg.jpg"></image>
|
<image style="width: 100%;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%A6%96%E9%A1%B5_20230830213855.png"></image>
|
||||||
<view class="center-box flex jc-sb ai-c">
|
<view class="center-box flex jc-sb ai-c">
|
||||||
<view class="box-item flex ai-c jc-c">
|
<view class="box-item flex ai-c jc-c">
|
||||||
<view class="flex jc-c ai-c relative" style="width: 230rpx;height: 230rpx;" @tap="toAnswer('顺序答题',false)">
|
<view class="flex jc-c ai-c relative" style="width: 230rpx;height: 230rpx;" @tap="toAnswer('顺序答题',false)">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 0 28rpx;margin-top: 60rpx;">
|
<view style="padding: 0 28rpx;margin-top: calc(100% - 718rpx);">
|
||||||
<view class="tabs-box">
|
<view class="tabs-box">
|
||||||
<view class="wp33 flex ai-c jc-c" @tap="toVip">
|
<view class="wp33 flex ai-c jc-c" @tap="toVip">
|
||||||
<view class="text-center wp100">
|
<view class="text-center wp100">
|
||||||
@@ -102,6 +102,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState,mapActions } from 'pinia' //引入映射函数
|
import { mapState,mapActions } from 'pinia' //引入映射函数
|
||||||
|
import useUserStore from '@/jtools/store/user'
|
||||||
import storage from '@/jtools/storage';
|
import storage from '@/jtools/storage';
|
||||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||||
export default {
|
export default {
|
||||||
@@ -125,16 +126,35 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(useUserStore, ["vipOnList", "token"]),
|
||||||
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]) ,//映射函数,取出tagslist
|
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]) ,//映射函数,取出tagslist
|
||||||
getDoNum(){
|
getDoNum(){
|
||||||
return this.rightList.length+this.wrongList.length
|
return this.rightList.length+this.wrongList.length
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toTestRoom(){
|
...mapActions(useUserStore, ['searchUserVip']),
|
||||||
uni.navigateTo({
|
async toTestRoom(){
|
||||||
url:"/pages/index/trueTest"
|
// uni.navigateTo({
|
||||||
})
|
// url:"/pages/index/trueTest"
|
||||||
|
// })
|
||||||
|
if (this.token) {
|
||||||
|
await this.searchUserVip()
|
||||||
|
const res = this.vipOnList.some(item => item.subjects == this.subject)
|
||||||
|
if (!res) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/index/videoVip?subject="+this.subject
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/index/trueTest?subject="+this.subject
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toVip(){
|
toVip(){
|
||||||
// if(storage.get('token')){
|
// if(storage.get('token')){
|
||||||
@@ -197,6 +217,7 @@
|
|||||||
.box-nav {
|
.box-nav {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
height: 500rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.center-box {
|
.center-box {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="box-nav">
|
<view class="box-nav">
|
||||||
<image style="width: 100%;" src="../../../static/image/index/index_bg.jpg"></image>
|
<image style="width: 100%;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%A6%96%E9%A1%B5_20230830213855.png"></image>
|
||||||
<view style="width: 100%;position: absolute;top: 80px;left: 0;" class="flex jc-c">
|
<view style="width: 100%;position: absolute;top: 80px;left: 0;" class="flex jc-c" @tap="toVipVideo">
|
||||||
<image style="width: 694rpx" mode="widthFix"
|
<image style="width: 694rpx" mode="widthFix"
|
||||||
:src="subject=='2'?'../../../static/image/index/subject2_bg.png':'../../../static/image/index/subject3_bg.png'">
|
:src="subject=='2'?'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E7%A7%91%E4%BA%8C%E9%A6%96%E9%A1%B5banner_20230830214212.png':'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E7%A7%91%E4%B8%89%E9%A6%96%E9%A1%B5banner_20230830214245.png'">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -28,10 +28,13 @@
|
|||||||
<swiper class="swiper" :current="videoIndex" style="height: 362rpx;" :autoplay="false"
|
<swiper class="swiper" :current="videoIndex" style="height: 362rpx;" :autoplay="false"
|
||||||
:disable-programmatic-animation="true" @change="onChange">
|
:disable-programmatic-animation="true" @change="onChange">
|
||||||
<swiper-item v-for="(item,index) of operateList" :key="index" @tap="toVideo">
|
<swiper-item v-for="(item,index) of operateList" :key="index" @tap="toVideo">
|
||||||
<view class="wp100 relative p5lr" style="height: 362rpx;border-radius: 16rpx;overflow: hidden;">
|
<view class="p5lr wp100">
|
||||||
<image style="width: 100%;height: 362rpx;border-radius: 16rpx;" mode="widthFix"
|
<view class="wp100 relative hide"
|
||||||
:src="item.videoList[0].videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
style="height: 362rpx;border-radius: 16rpx;overflow: hidden;">
|
||||||
<image class="play_btn_2" src="../../static/image/index/play.png" />
|
<image style="width: 100%;height: 362rpx;position: absolute;left: 0;top: 0;" mode="widthFix"
|
||||||
|
:src="item.videoList[0].videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||||
|
<image class="play_btn_2" src="../../static/image/index/play.png" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -44,7 +47,7 @@
|
|||||||
<u-icon color="#666" name="arrow-right" size="18"></u-icon>
|
<u-icon color="#666" name="arrow-right" size="18"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex p14lr p20tb bc-fff mt10" style="border-bottom: 1rpx solid #DDDCDC;"
|
<view class="flex p14lr p20tb bc-fff" style="border-bottom: 1rpx solid #DDDCDC;"
|
||||||
v-for="(item,index) of videoList" :key="index" @click="toOperateDetail(item.videoId)">
|
v-for="(item,index) of videoList" :key="index" @click="toOperateDetail(item.videoId)">
|
||||||
<view class="pic relative" style="overflow: hidden;">
|
<view class="pic relative" style="overflow: hidden;">
|
||||||
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||||
@@ -61,6 +64,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
mapState,
|
||||||
|
mapActions
|
||||||
|
} from 'pinia' //引入映射函数
|
||||||
|
import useUserStore from '@/jtools/store/user'
|
||||||
import {
|
import {
|
||||||
querySysConfigList,
|
querySysConfigList,
|
||||||
queryProjectList
|
queryProjectList
|
||||||
@@ -88,7 +96,31 @@
|
|||||||
async mounted() {
|
async mounted() {
|
||||||
await this.getDiverType()
|
await this.getDiverType()
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useUserStore, ["vipOnList", "token"])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(useUserStore, ['searchUserVip']),
|
||||||
|
//vip视频页面
|
||||||
|
async toVipVideo(){
|
||||||
|
if (this.token) {
|
||||||
|
await this.searchUserVip()
|
||||||
|
const res = this.vipOnList.some(item => item.subjects == this.subject)
|
||||||
|
if (!res) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/index/videoVip?subject="+this.subject
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/questionBank/baseOperate?subject=" + this.subject+"&type=3"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
this.videoIndex = e.detail.current
|
this.videoIndex = e.detail.current
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -105,7 +137,7 @@
|
|||||||
}).then(resp => {
|
}).then(resp => {
|
||||||
if (resp.code === '0000') {
|
if (resp.code === '0000') {
|
||||||
this.baseList = resp.data
|
this.baseList = resp.data
|
||||||
this.videoList = resp.data[0].videoList.slice(0, 5)
|
this.videoList = resp.data[0] ? resp.data[0].videoList.slice(0, 5) : []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -123,7 +155,7 @@
|
|||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
videoUrl: item.videoList[0]?.videoUrl,
|
videoUrl: item.videoList[0]?.videoUrl,
|
||||||
videoTime:this.formateTime(item.videoList[0]?.videoTime)
|
videoTime: this.formateTime(item.videoList[0]?.videoTime)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let jsonString = JSON.stringify(arr)
|
let jsonString = JSON.stringify(arr)
|
||||||
@@ -132,14 +164,14 @@
|
|||||||
"&projectId=" + this.projectId + "&type=1"
|
"&projectId=" + this.projectId + "&type=1"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toOperateDetail(val){
|
toOperateDetail(val) {
|
||||||
let arr = JSON.parse(JSON.stringify(this.baseList[0].videoList))
|
let arr = JSON.parse(JSON.stringify(this.baseList[0].videoList))
|
||||||
arr = arr.map(item => {
|
arr = arr.map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
projectId:item.videoId,
|
projectId: item.videoId,
|
||||||
subDesc:this.baseList[0].description,
|
subDesc: this.baseList[0].description,
|
||||||
videoTime:this.formateTime(item.videoTime)
|
videoTime: this.formateTime(item.videoTime)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let jsonString = JSON.stringify(arr)
|
let jsonString = JSON.stringify(arr)
|
||||||
@@ -181,7 +213,7 @@
|
|||||||
},
|
},
|
||||||
toDetail() {
|
toDetail() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/questionBank/baseOperate?subject=" + this.subject
|
url: "/pages/questionBank/baseOperate?subject=" + this.subject+"&type=2"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,7 +259,7 @@
|
|||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 169rpx;
|
height: 169rpx;
|
||||||
background: #00B74F;
|
background: #00B74F;
|
||||||
border-radius: 8rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.play_btn_3 {
|
.play_btn_3 {
|
||||||
@@ -262,4 +294,11 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide {
|
||||||
|
backface-visibility: hidden;
|
||||||
|
transform: translate3d(0, 0, 0);
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
|
-webkit-transform: translate3d(0, 0, 0);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="relative" style="height: 100vh;">
|
<view class="relative" style="height: 100vh;">
|
||||||
<image style="width: 100%;height: 600rpx;" src="../../static/image/index/vip_bg.jpg"></image>
|
<image style="width: 100%;height: 600rpx;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E9%A1%B5%E8%83%8C%E6%99%AF%E5%9B%BE_20230830214136.png"></image>
|
||||||
<view class="p14">
|
<view class="p14">
|
||||||
<view class="flex jc-fa ai-c wp100">
|
<view class="flex jc-sb ai-c wp100">
|
||||||
<view class="option_tem relative mr15" :class="checkedId===item.memberId?'checked_item':''" v-for="(item,index) of priceList" :key="index" @click="checkPrice(item.memberId,item.price)">
|
<view class="option_tem relative" :class="checkedId===item.memberId?'checked_item':''" v-for="(item,index) of priceList" :key="index" @click="checkPrice(item.memberId,item.price)">
|
||||||
<text class="fw600 fs12 cor-333">{{item.memberName}}</text>
|
<text class="fw600 fs12 cor-333">{{item.memberName}}</text>
|
||||||
<view class="mt5">
|
<view class="mt5">
|
||||||
<text class="fs14" style="color: #FF6E02;">¥</text>
|
<text class="fs14" style="color: #FF6E02;">¥</text>
|
||||||
|
|||||||
@@ -11,6 +11,10 @@
|
|||||||
<view class="m30lr fs14 cor-333 fl1">安徽省合肥市包河区</view>
|
<view class="m30lr fs14 cor-333 fl1">安徽省合肥市包河区</view>
|
||||||
<u-icon name="arrow-right" color="#999" />
|
<u-icon name="arrow-right" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex ai-c wp100" style="height: 110rpx;" @tap="toUpload">
|
||||||
|
<view class="fs14 cor-666 fl1">证件照上传</view>
|
||||||
|
<u-icon name="arrow-right" color="#999" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -23,7 +27,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toUpload(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/me/uploadPic"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
217
src/pages/me/uploadPic.vue
Normal file
217
src/pages/me/uploadPic.vue
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="wp100 bc-fff p14">
|
||||||
|
<view class="title fontColor">第一步 上传学员图像</view>
|
||||||
|
<view class="mt15">
|
||||||
|
<!-- <u-upload width="165" height="165" :file-list=" fileList1" multiple :max-count="1" @afterRead="afterRead" @delete="deletePic" /> -->
|
||||||
|
<!-- <u-upload ref="uUpload" class="mt25" :size-type="['compressed']" :file-list="fileList1" deletable :multiple="false" :max-count="1" width="165rpx" height="165rpx" @afterRead="afterRead" @delete="deletePic" /> -->
|
||||||
|
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="1" width="150"
|
||||||
|
height="150">
|
||||||
|
<view style="width: 320rpx;height:300rpx;background-color: rgb(247, 255, 255);border-radius: 20rpx;">
|
||||||
|
<view style="width: 320rpx;height:240rpx;" class="flex jc-c ai-c">
|
||||||
|
<image v-if="fileList1&&fileList1.length" style="width: 240rpx;height: 240rpx;" :src="fileList1[0].url">
|
||||||
|
</image>
|
||||||
|
<u-avatar v-else class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="width: 320rpx;height:60rpx;line-height:60rpx;background-color: #3C9CFF;border-radius: 0 0 20rpx 20rpx;"
|
||||||
|
class="text-center cor-fff">
|
||||||
|
点击
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
<view class="mt20">
|
||||||
|
<view class="title fontColor">第二步 核实后再提交</view>
|
||||||
|
<u--form labelPosition="left" labelWidth="80" :model="form" :rules="rules" ref="form1">
|
||||||
|
<u-form-item label="姓名" :required="true" prop="name" borderBottom ref="item1">
|
||||||
|
<u--input v-model="form.name" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="身份证号" :required="true" prop="idNum" borderBottom ref="item2">
|
||||||
|
<u--input v-model="form.idNum" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
</u--form>
|
||||||
|
</view>
|
||||||
|
<view style="margin-top: 20px;">
|
||||||
|
<u-button type="primary" :style="{width: '100%',borderRadius:'40rpx'}" :disabled="saving" text="提交"
|
||||||
|
@click="submit" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import storage from '@/jtools/storage';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
const shenfenzhen = (rule, value, callback) => {
|
||||||
|
/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value) ? callback() : callback(
|
||||||
|
new Error('请输入正确的身份证号'))
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
name: '',
|
||||||
|
idNum: ''
|
||||||
|
},
|
||||||
|
fileList1: [],
|
||||||
|
uploadList: [],
|
||||||
|
saving: false,
|
||||||
|
rules: {
|
||||||
|
name: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入姓名',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
}],
|
||||||
|
idNum: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入身份证号',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
},{
|
||||||
|
// 自定义验证函数,见上说明
|
||||||
|
validator: shenfenzhen,
|
||||||
|
message: '身份证号码不正确',
|
||||||
|
// 触发器可以同时用blur和change
|
||||||
|
trigger: ['change', 'blur'],
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
console.log(storage.get('photoForm'));
|
||||||
|
if(storage.get('photoForm')){
|
||||||
|
this.fileList1=storage.get('photoForm').file
|
||||||
|
this.form={
|
||||||
|
name: storage.get('photoForm').name,
|
||||||
|
idNum: storage.get('photoForm').idNum
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$refs.form1.setRules(this.rules);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 删除图片
|
||||||
|
deletePic(event) {
|
||||||
|
this.fileList1.splice(event.index, 1);
|
||||||
|
this.uploadList.splice(event.index, 1);
|
||||||
|
},
|
||||||
|
// 新增图片
|
||||||
|
async afterRead(event) {
|
||||||
|
// this.compressImage(event.file);
|
||||||
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
const lists = [].concat(event.file);
|
||||||
|
this.fileList1 = lists;
|
||||||
|
uni.showToast({
|
||||||
|
title:'上传成功!'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
uploadFilePromise(url) {
|
||||||
|
this.saving = true;
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: process.env.VUE_APP_BASE_API + 'mongodb/uploadFile', // 仅为示例,非真实的接口地址
|
||||||
|
filePath: url,
|
||||||
|
name: 'file',
|
||||||
|
success: (res) => {
|
||||||
|
// setTimeout(() => {
|
||||||
|
resolve(JSON.parse(res.data).data);
|
||||||
|
// }, 100);
|
||||||
|
this.saving = false;
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
resolve(null);
|
||||||
|
this.saving = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
submit() {
|
||||||
|
this.$refs.form1.validate().then((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const param={
|
||||||
|
file:this.fileList1,
|
||||||
|
...this.form
|
||||||
|
}
|
||||||
|
storage.set('photoForm',param)
|
||||||
|
uni.showToast({
|
||||||
|
title:"提交成功!",
|
||||||
|
duration:2000,
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateBack()
|
||||||
|
},1000)
|
||||||
|
} else {
|
||||||
|
console.log('验证失败');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
async compressImage(image) {
|
||||||
|
const img = new Image();
|
||||||
|
img.src = image.url;
|
||||||
|
|
||||||
|
img.onload = async () => {
|
||||||
|
const canvas = document.createElement('canvas'); // 创建Canvas对象(画布)
|
||||||
|
const context = canvas.getContext('2d');
|
||||||
|
// 默认按比例压缩
|
||||||
|
const cw = img.width;
|
||||||
|
const ch = img.height;
|
||||||
|
let w = img.width;
|
||||||
|
let h = img.height;
|
||||||
|
canvas.width = w;
|
||||||
|
canvas.height = h;
|
||||||
|
if (cw > 400 && cw > ch) {
|
||||||
|
w = 400;
|
||||||
|
h = (400 * ch) / cw;
|
||||||
|
canvas.width = w;
|
||||||
|
canvas.height = h;
|
||||||
|
}
|
||||||
|
if (ch > 400 && ch > cw) {
|
||||||
|
h = 400;
|
||||||
|
w = (400 * cw) / ch;
|
||||||
|
canvas.width = w;
|
||||||
|
canvas.height = h;
|
||||||
|
}
|
||||||
|
// 生成canvas
|
||||||
|
let base64;
|
||||||
|
// 创建属性节点
|
||||||
|
context.clearRect(0, 0, 0, w, h);
|
||||||
|
context.drawImage(img, 0, 0, w, h);
|
||||||
|
if (image.size > 2000000) {
|
||||||
|
// 如果图片超过2m,则进行压缩
|
||||||
|
base64 = canvas.toDataURL(image['type'], 0.5);
|
||||||
|
}
|
||||||
|
const result = await this.uploadFilePromise(base64 || image.url);
|
||||||
|
this.uploadList.push(result);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.upload-img {
|
||||||
|
width: 165rpx;
|
||||||
|
height: 165rpx;
|
||||||
|
border: 1px dashed #c4c4c4;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fontColor {
|
||||||
|
color: #383838;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-textarea__count {
|
||||||
|
background-color: #f9faf9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-upload__button>.u-icon>.u-icon__icon {
|
||||||
|
font-size: 90rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-button--square {
|
||||||
|
border-radius: 40rpx !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
<view v-if="vipHasOpened(item)" class="corner">
|
<view v-if="vipHasOpened(item)" class="corner">
|
||||||
VIP已开通
|
VIP已开通
|
||||||
</view>
|
</view>
|
||||||
<view v-if="vipHasOpened(item)" class="renew">
|
<view v-if="vipHasOpened(item)" @tap="chargeVip(item)" class="renew">
|
||||||
{{ item.price }}元立即续费
|
{{ item.price }}元立即续费
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="buy">
|
<view v-else class="buy" @tap="chargeVip(item)">
|
||||||
立即充值
|
立即充值
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -141,6 +141,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
chargeVip(item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/index/videoVip?subject="+item.subjects
|
||||||
|
})
|
||||||
|
},
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
this.current = e.detail.current
|
this.current = e.detail.current
|
||||||
},
|
},
|
||||||
@@ -168,6 +173,9 @@ export default {
|
|||||||
// 当前vip是否已开通
|
// 当前vip是否已开通
|
||||||
if (this.vipHasOpened(item)) {
|
if (this.vipHasOpened(item)) {
|
||||||
// 跳转
|
// 跳转
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/questionBank/questionBank?navTitle=精简500题&subject="+item.subjects+"&needVip=true&isVip=1"
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
||||||
@@ -180,6 +188,9 @@ export default {
|
|||||||
// 当前vip是否已开通
|
// 当前vip是否已开通
|
||||||
if (this.vipHasOpened(item)) {
|
if (this.vipHasOpened(item)) {
|
||||||
// 跳转
|
// 跳转
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/index/trueTest?subject="+item.subjects
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
||||||
@@ -192,6 +203,9 @@ export default {
|
|||||||
// 当前vip是否已开通
|
// 当前vip是否已开通
|
||||||
if (this.vipHasOpened(item)) {
|
if (this.vipHasOpened(item)) {
|
||||||
// 跳转
|
// 跳转
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/questionBank/practiceExams?subject="+item.subjects+'&title=考前密卷&isExam1=1'
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
||||||
@@ -204,6 +218,10 @@ export default {
|
|||||||
// 当前vip是否已开通
|
// 当前vip是否已开通
|
||||||
if (this.vipHasOpened(item)) {
|
if (this.vipHasOpened(item)) {
|
||||||
// 跳转
|
// 跳转
|
||||||
|
uni.showToast({
|
||||||
|
title:'敬请期待',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<!-- <view class="flex ai-c">
|
<!-- <view class="flex ai-c">
|
||||||
<view class="car_item mr10" v-for="(item,index) of carTypeList" :key="index" @tap="chooseCar(item.value)" :class="item.value===tCar?'checked_car':'unchecked_car'">{{item.label}}</view>
|
<view class="car_item mr10" v-for="(item,index) of carTypeList" :key="index" @tap="chooseCar(item.value)" :class="item.value===tCar?'checked_car':'unchecked_car'">{{item.label}}</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="flex p14lr p20tb bc-fff mt10" style="border-bottom: 1rpx solid #DDDCDC;;"
|
<view class="flex p14lr p20tb bc-fff mb10" style="border-radius: 10rpx;"
|
||||||
v-for="(item,index) of videoList" :key="index" @tap="toOperateDetail(item.videoId)">
|
v-for="(item,index) of videoList" :key="index" @tap="toOperateDetail(item.videoId)">
|
||||||
<view class="pic relative" style="overflow: hidden;">
|
<view class="pic relative" style="overflow: hidden;">
|
||||||
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
type:'2',
|
||||||
subject:'1',
|
subject:'1',
|
||||||
tCar:0,
|
tCar:0,
|
||||||
categoryList:[{
|
categoryList:[{
|
||||||
@@ -40,22 +41,18 @@
|
|||||||
name:'自动挡C2'
|
name:'自动挡C2'
|
||||||
}],
|
}],
|
||||||
allVideoList:[],
|
allVideoList:[],
|
||||||
videoList:[{
|
videoList:[]
|
||||||
label:"111"
|
|
||||||
},{
|
|
||||||
label:'222'
|
|
||||||
},{
|
|
||||||
label:'333'
|
|
||||||
},{
|
|
||||||
label:'444'
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op){
|
onLoad(op){
|
||||||
if(op.subject){
|
if(op.subject){
|
||||||
this.subject=op.subject
|
this.subject=op.subject
|
||||||
this.getDiverType()
|
|
||||||
}
|
}
|
||||||
|
if(op.type){
|
||||||
|
this.type=op.type
|
||||||
|
}
|
||||||
|
console.log(this.type);
|
||||||
|
this.getDiverType()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
formateTime(time) {
|
formateTime(time) {
|
||||||
@@ -87,7 +84,7 @@
|
|||||||
"carTypeId": storage.get('carType') || '1001',
|
"carTypeId": storage.get('carType') || '1001',
|
||||||
"subject": String(this.subject),
|
"subject": String(this.subject),
|
||||||
"driveType": this.categoryList[this.tCar].configItemCode,
|
"driveType": this.categoryList[this.tCar].configItemCode,
|
||||||
"type": "2"
|
"type": this.type
|
||||||
}).then(resp => {
|
}).then(resp => {
|
||||||
if(resp.code==='0000'){
|
if(resp.code==='0000'){
|
||||||
this.videoList=resp.data[0]?resp.data[0].videoList:[]
|
this.videoList=resp.data[0]?resp.data[0].videoList:[]
|
||||||
@@ -150,7 +147,7 @@
|
|||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 169rpx;
|
height: 169rpx;
|
||||||
background: #00B74F;
|
background: #00B74F;
|
||||||
border-radius: 8rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
.play_btn_2 {
|
.play_btn_2 {
|
||||||
width: 65rpx;
|
width: 65rpx;
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<view style="width: 220rpx;">
|
<view style="width: 220rpx;">
|
||||||
<view v-if="type==='practice'" style="width: 220rpx;height: 80rpx;"></view>
|
<view v-if="type==='practice'" style="width: 220rpx;height: 80rpx;"></view>
|
||||||
<view v-else-if="type=='exam'" class="btn" style="text-align: center;" @tap="submitPaper">
|
<view v-else-if="type=='exam'" class="btn" style="text-align: center;" @tap="submitPaper">
|
||||||
<u-count-down ref="countDown_1" :time=" 1*60*60 * 1000" format="HH:mm:ss" @change="timeChange"></u-count-down>
|
<u-count-down ref="countDown_1" :time=" timeCount" format="HH:mm:ss" @change="timeChange"></u-count-down>
|
||||||
<text>交卷</text>
|
<text>交卷</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<view class="cor-333">未答题数</view>
|
<view class="cor-333">未答题数</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center">
|
<view class="text-center">
|
||||||
<u-count-down ref="countDown_3" class="balckColor" :time="1*60*60 * 1000" format="HH:mm:ss"></u-count-down>
|
<u-count-down ref="countDown_3" class="balckColor" :time="timeCount" format="HH:mm:ss"></u-count-down>
|
||||||
<view>剩余时间</view>
|
<view>剩余时间</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center">
|
<view class="text-center">
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
<view style="width: 220rpx;">
|
<view style="width: 220rpx;">
|
||||||
<view v-if="type==='practice'" style="width: 220rpx;height: 80rpx;"></view>
|
<view v-if="type==='practice'" style="width: 220rpx;height: 80rpx;"></view>
|
||||||
<view v-else-if="type=='exam'" class="btn" style="text-align: center;" @tap="submitPaper">
|
<view v-else-if="type=='exam'" class="btn" style="text-align: center;" @tap="submitPaper">
|
||||||
<u-count-down ref="countDown_2" :time="1 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
|
<u-count-down ref="countDown_2" :time="timeCount" format="HH:mm:ss"></u-count-down>
|
||||||
<text>交卷</text>
|
<text>交卷</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -308,6 +308,10 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
timeCount() {
|
||||||
|
const time=this.subject == '1' ? 60 * 60 * 1000 : 45 * 60 * 1000
|
||||||
|
return time
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -44,6 +44,9 @@
|
|||||||
import errorIcon from "../../static/image/practice/error_icon.png"
|
import errorIcon from "../../static/image/practice/error_icon.png"
|
||||||
import newRulesIcon from "../../static/image/practice/newRules_icon.png"
|
import newRulesIcon from "../../static/image/practice/newRules_icon.png"
|
||||||
import neverWriteIcon from "../../static/image/practice/neverWrite_icon.png"
|
import neverWriteIcon from "../../static/image/practice/neverWrite_icon.png"
|
||||||
|
import danxuanIcon from "../../static/image/index/danxuan.png"
|
||||||
|
import panduanIcon from "../../static/image/index/panduan.png"
|
||||||
|
import tupianIcon from "../../static/image/index/tupian.png"
|
||||||
import {
|
import {
|
||||||
querySysConfigList,
|
querySysConfigList,
|
||||||
querySpecialNum
|
querySpecialNum
|
||||||
@@ -72,19 +75,19 @@
|
|||||||
subTitle:'392题',
|
subTitle:'392题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:newRulesIcon
|
image:danxuanIcon
|
||||||
},{
|
},{
|
||||||
title:'判断题',
|
title:'判断题',
|
||||||
subTitle:'392题',
|
subTitle:'392题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:errorIcon
|
image:panduanIcon
|
||||||
},{
|
},{
|
||||||
title:'图片题',
|
title:'图片题',
|
||||||
subTitle:'392题',
|
subTitle:'392题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:neverWriteIcon
|
image:tupianIcon
|
||||||
}],
|
}],
|
||||||
testCenterList:[],
|
testCenterList:[],
|
||||||
subject:'1'
|
subject:'1'
|
||||||
@@ -122,19 +125,19 @@
|
|||||||
subTitle:resp.data.radioQuestionNum+'题',
|
subTitle:resp.data.radioQuestionNum+'题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:newRulesIcon
|
image:danxuanIcon
|
||||||
},{
|
},{
|
||||||
title:'判断题',
|
title:'判断题',
|
||||||
subTitle:resp.data.judgeQuestionNum+'题',
|
subTitle:resp.data.judgeQuestionNum+'题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:errorIcon
|
image:panduanIcon
|
||||||
},{
|
},{
|
||||||
title:'图片题',
|
title:'图片题',
|
||||||
subTitle:resp.data.imageQuestionNum+'题',
|
subTitle:resp.data.imageQuestionNum+'题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:neverWriteIcon
|
image:tupianIcon
|
||||||
}]
|
}]
|
||||||
}else{
|
}else{
|
||||||
this.list=[{
|
this.list=[{
|
||||||
@@ -154,7 +157,7 @@
|
|||||||
subTitle:resp.data.radioQuestionNum+'题',
|
subTitle:resp.data.radioQuestionNum+'题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:newRulesIcon
|
image:danxuanIcon
|
||||||
},{
|
},{
|
||||||
title:'多选题',
|
title:'多选题',
|
||||||
subTitle:resp.data.multipleChoiceQuestionNum+'题',
|
subTitle:resp.data.multipleChoiceQuestionNum+'题',
|
||||||
@@ -166,13 +169,13 @@
|
|||||||
subTitle:resp.data.judgeQuestionNum+'题',
|
subTitle:resp.data.judgeQuestionNum+'题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:errorIcon
|
image:panduanIcon
|
||||||
},{
|
},{
|
||||||
title:'图片题',
|
title:'图片题',
|
||||||
subTitle:resp.data.imageQuestionNum+'题',
|
subTitle:resp.data.imageQuestionNum+'题',
|
||||||
isNew:0,
|
isNew:0,
|
||||||
isError:0,
|
isError:0,
|
||||||
image:neverWriteIcon
|
image:tupianIcon
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
src/static/image/index/danxuan.png
Normal file
BIN
src/static/image/index/danxuan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/static/image/index/panduan.png
Normal file
BIN
src/static/image/index/panduan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/static/image/index/tupian.png
Normal file
BIN
src/static/image/index/tupian.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Reference in New Issue
Block a user