pull/15/head
脆皮鸭 1 year ago
commit 3c4e11799b
  1. 4
      .env.development
  2. 4
      .env.production
  3. 14
      src/jtools/api/question.js
  4. 3
      src/jtools/api/vip.js
  5. 4
      src/jtools/store/question.js
  6. 20
      src/pages/index/components/Subject1.vue
  7. 27
      src/pages/index/components/Subject2.vue
  8. 4
      src/pages/index/index.vue
  9. 4
      src/pages/index/paySuccess.vue
  10. 15
      src/pages/index/videoVip.vue
  11. 33
      src/pages/me/index.vue
  12. 30
      src/pages/questionBank/components/Question.vue
  13. 11
      src/pages/questionBank/questionBank.vue
  14. BIN
      src/static/image/index/subject3_bg.png

@ -5,7 +5,7 @@ VITE_APP_TITLE = 金武联驾校
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
# 金武联驾校/开发环境 # 金武联驾校/开发环境
VITE_APP_BASE_API = 'http://118.31.23.45:8888/' VITE_APP_BASE_API = 'https://jwl.ahduima.com/'
# #
VITE_WEB_BASE_URL = 'http://118.31.23.45:8888/' VITE_WEB_BASE_URL = 'https://jwl.ahduima.com'

@ -5,7 +5,7 @@ VITE_APP_TITLE = 金武联驾校
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
# 金武联驾校/开发环境 # 金武联驾校/开发环境
VITE_APP_BASE_API = 'https://i.equ-tech.com/zongheng-api/' VITE_APP_BASE_API = 'https://jwl.ahduima.com/'
# #
VITE_WEB_BASE_URL = 'https://i.equ-tech.com/zongheng' VITE_WEB_BASE_URL = 'https://jwl.ahduima.com'

@ -1,11 +1,11 @@
import request from '../request/index.js'; import request from '../request/index.js';
export function queryQuestion(data) { export function queryQuestion(data) {
return request({ return request({
url: 'driver-api/tdQuestion/queryQuestion', url: 'driver-api/tdQuestion/queryQuestion',
method: 'POST', method: 'POST',
data, data,
noToken: true
}); });
} }
@ -13,7 +13,7 @@ export function questionCategory(data) {
return request({ return request({
url: 'driver-api/tdQuestion/questionCategory', url: 'driver-api/tdQuestion/questionCategory',
method: 'POST', method: 'POST',
data, data
}); });
} }
@ -21,7 +21,7 @@ export function getTestQuestion(data) {
return request({ return request({
url: 'driver-api/tdQuestion/getTestQuestion', url: 'driver-api/tdQuestion/getTestQuestion',
method: 'POST', method: 'POST',
data, data
}); });
} }
@ -29,7 +29,7 @@ export function submitTest(data) {
return request({ return request({
url: 'driver-api/tdQuestionTest/testSubmit', url: 'driver-api/tdQuestionTest/testSubmit',
method: 'POST', method: 'POST',
data, data
}); });
} }
@ -37,7 +37,7 @@ export function testTotal(data) {
return request({ return request({
url: 'driver-api/tdQuestionTest/testTotal', url: 'driver-api/tdQuestionTest/testTotal',
method: 'POST', method: 'POST',
data, data
}); });
} }
@ -45,7 +45,7 @@ export function testTotal(data) {
export function querySysConfigList(carTypeId, configKey) { export function querySysConfigList(carTypeId, configKey) {
return request({ return request({
url: 'driver-api/tdSysConfigList/querySysConfigList?configKey=' + configKey + '&carTypeId=' + carTypeId, url: 'driver-api/tdSysConfigList/querySysConfigList?configKey=' + configKey + '&carTypeId=' + carTypeId,
method: 'GET', method: 'GET'
}); });
} }
@ -54,6 +54,6 @@ export function queryProjectList(data) {
return request({ return request({
url: 'driver-api/tdTestProject/queryProjectList', url: 'driver-api/tdTestProject/queryProjectList',
method: 'POST', method: 'POST',
data, data
}); });
} }

@ -4,7 +4,7 @@ export function queryVip(data) {
return request({ return request({
url: 'driver-api/tdMember/queryUserMember', url: 'driver-api/tdMember/queryUserMember',
method: 'POST', method: 'POST',
data, data
}); });
} }
@ -13,5 +13,6 @@ export function getVipList(data) {
url: 'driver-api/tdMember/queryMember', url: 'driver-api/tdMember/queryMember',
method: 'POST', method: 'POST',
data, data,
noToken: true
}); });
} }

@ -21,8 +21,8 @@ const question = defineStore({
getOrderQuestion(val) { getOrderQuestion(val) {
queryQuestion({ queryQuestion({
carTypeId: this.currentCartype, carTypeId: this.currentCartype,
subject: val, // subject: val,
// questionIdList:[10982,10983,10985,10986] questionIdList:[10982,10983,10985,10986]
}).then(res => { }).then(res => {
if (res.code == '0000') { if (res.code == '0000') {
this.orderQuestion = res.data this.orderQuestion = res.data

@ -132,14 +132,26 @@
}) })
}, },
toVip(){ toVip(){
if(storage.get('token')){
uni.navigateTo({ uni.navigateTo({
url:"/pages/index/videoVip" url:"/pages/index/videoVip?subject="+this.subject
}) })
}else{
uni.navigateTo({
url:'/pages/login/login'
})
}
}, },
toClass(){ toClass(){
if(storage.get('token')){
uni.navigateTo({ uni.navigateTo({
url:"/pages/questionBank/baseOperate" url:"/pages/questionBank/baseOperate"
}) })
}else{
uni.navigateTo({
url:'/pages/login/login'
})
}
}, },
toAnswer(title,val) { toAnswer(title,val) {
uni.navigateTo({ uni.navigateTo({
@ -147,9 +159,15 @@
}) })
}, },
toExams(){ toExams(){
if(storage.get('token')){
uni.navigateTo({ uni.navigateTo({
url:"/pages/questionBank/practiceExams?subject="+this.subject url:"/pages/questionBank/practiceExams?subject="+this.subject
}) })
}else{
uni.navigateTo({
url:'/pages/login/login'
})
}
}, },
toExclusive(){ toExclusive(){
uni.navigateTo({ uni.navigateTo({

@ -3,7 +3,7 @@
<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="../../../static/image/index/index_bg.jpg"></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">
<image style="width: 694rpx" mode="widthFix" src="../../../static/image/index/subject2_bg.png"></image> <image style="width: 694rpx" mode="widthFix" :src="subject=='2'?'../../../static/image/index/subject2_bg.png':'../../../static/image/index/subject3_bg.png'"></image>
</view> </view>
</view> </view>
<view class="p14lr" style="margin-top: -20px;"> <view class="p14lr" style="margin-top: -20px;">
@ -23,11 +23,19 @@
</view> </view>
</view> </view>
<view class="video_box mt10"> <view class="video_box mt10">
<text class="fs18 cor-000">驾驶方法</text> <view class="flex ai-c jc-sb">
<view class="text-center mt10" style="width: 200rpx;" @tap="toDetail"> <text class="fs18 cor-000">基础操作讲解</text>
<image style="width: 200rpx;height: 200rpx;margin-bottom: 5px;" src="../../../static/image/index/base_operate.png"></image> <view class="flex cor-666" @tap="toVideo">
<text class="fs16 cor-000">基础操作讲解</text> <text>全部</text>
<view class="fs14 cor-999 mt5">操作方法精讲</view> <u-icon color="#666" name="arrow-right" size="18"></u-icon>
</view>
</view>
<view class="flex p14lr p20tb bc-fff mt10" style="border-bottom: 1rpx solid #DDDCDC;;" v-for="(item,index) of operateList" :key="index" @tap="toDetail">
<image class="pic" src="../../static/image/index/index_bg.jpg"></image>
<view class="ml10">
<text class="fs16 cor-000 fw600">上车下车的方法</text>
<view class="fs14 mt5 cor-666">上车下车的方法</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -66,6 +74,7 @@ export default {
}) })
}, },
getVideoList(){ getVideoList(){
console.log(this.subject);
queryProjectList({ queryProjectList({
"carTypeId": storage.get('carType') || '1001', "carTypeId": storage.get('carType') || '1001',
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode, "driveType": this.diverTypeList[this.diverTypeIndex].configItemCode,
@ -133,4 +142,10 @@ export default {
background: linear-gradient(90deg, #11DF20 0%, #01B74F 100%); background: linear-gradient(90deg, #11DF20 0%, #01B74F 100%);
color:#fff color:#fff
} }
.pic{
width: 300rpx;
height: 169rpx;
background: #00B74F;
border-radius: 8rpx;
}
</style> </style>

@ -8,7 +8,7 @@
<Subject1 :subject="tIndex+1" :rightList="rightList" :wrongList="wrongList" /> <Subject1 :subject="tIndex+1" :rightList="rightList" :wrongList="wrongList" />
</template> </template>
<template v-else> <template v-else>
<subject2 :subject="tIndex+1" /> <subject2 :subject="tIndex+1" ref="subject2" />
</template> </template>
</view> </view>
</view> </view>
@ -54,6 +54,8 @@
this.getOrderQuestion('1') this.getOrderQuestion('1')
}else if(this.tIndex==3){ }else if(this.tIndex==3){
this.getOrderQuestion('4') this.getOrderQuestion('4')
}else{
this.$refs.subject2.getDiverType()
} }
}, },
} }

@ -14,12 +14,16 @@
</template> </template>
<script> <script>
import useUserStore from '@/jtools/store/user'
export default{ export default{
data(){ data(){
return{ return{
} }
}, },
onLoad(){
useUserStore().searchUserVip()
},
methods:{ methods:{
goBack(){ goBack(){
uni.switchTab({ uni.switchTab({

@ -51,16 +51,22 @@
export default { export default {
data(){ data(){
return{ return{
subject:'1',
loading:true,
nowPrice:168, nowPrice:168,
checkedId:0, checkedId:0,
priceList:[], priceList:[],
order:{ order:{
money:1, money:0.01,
description:'会员充值' description:'会员充值'
} }
} }
}, },
onLoad(){ onLoad(op){
if(op.subject){
this.subject=op.subject
}
this.loading=true
this.getVipList() this.getVipList()
this.getWXOpenId() this.getWXOpenId()
this.$set(this.order, 'userId', this.userInfo.userId); this.$set(this.order, 'userId', this.userInfo.userId);
@ -71,7 +77,10 @@
methods:{ methods:{
handlePay(){ handlePay(){
console.log(this.order); console.log(this.order);
if(this.loading){
this.loading=false
new Pay('wechat', this.order); new Pay('wechat', this.order);
}
}, },
getWXOpenId() { getWXOpenId() {
const that = this const that = this
@ -84,7 +93,7 @@
getVipList(){ getVipList(){
getVipList({ getVipList({
currentCartype: storage.get('carType') || '1001', currentCartype: storage.get('carType') || '1001',
subject:'1' subject:this.subject
}).then(resp=>{ }).then(resp=>{
this.priceList=resp.data this.priceList=resp.data
this.checkedId=this.priceList[0].memberId this.checkedId=this.priceList[0].memberId

@ -33,20 +33,24 @@
</view> </view>
<text class="ml5 fs16 fwb" style="color: #7E4012FF;">VIP会员</text> <text class="ml5 fs16 fwb" style="color: #7E4012FF;">VIP会员</text>
</view> </view>
<text v-if="vipOn.length" class="fs12" style="color: #7E4012FF;">{{expireTime}}到期</text> <text v-if="!isLogin || !vipOn.length" class="fs12" style="color: #7E4012FF;">您还不是VIP会员</text>
<text v-else-if="vipOn.length" class="fs12" style="color: #7E4012FF;">{{ expireTime }}到期</text>
</view> </view>
<view class="absolute flex ai-c jc-c" style="left: 0;top: 40px;right: 0;bottom: 0;"> <view class="absolute flex ai-c jc-c" style="left: 0;top: 40px;right: 0;bottom: 0;">
<view class="text-center"> <view v-if="!isLogin || !vipOn.length" class="text-center">
<view v-if="vipOn.length" class="fs18 fwb" style="color: #7E4012FF;">{{vipText}}</view> <view class="fs18 fwb" style="color: #7E4012FF;">开通VIP尊享以下权益</view>
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;"> <view class="fs15" style="color: #7E4012FF;">精选500题 / 真是模考 / 考前密卷</view>
{{ vipOn.length?'马上学习':'开通会员'}} <view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">立即开通</view>
</view> </view>
<view v-else-if="vipOn.length" class="text-center">
<view class="fs18 fwb" style="color: #7E4012FF;">{{ vipText }}</view>
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">马上学习</view>
</view> </view>
</view> </view>
</view> </view>
<view class="br8 bc-fff p15 z-index2"> <view v-if="isLogin" class="br8 bc-fff p15 z-index2">
<text class="fs16 cor-333">我的驾校</text> <text class="fs16 cor-333">我的驾校</text>
<view v-if="user.schoolId"> <view v-if="user?.schoolId">
<div class="mt12 flex ai-c jc-sb"> <div class="mt12 flex ai-c jc-sb">
<text class="fs18 cor-000 fwb">{{ user.schoolName }}</text> <text class="fs18 cor-000 fwb">{{ user.schoolName }}</text>
<u-button text="切换驾校" shape="circle" @click="handleChangeSchool"></u-button> <u-button text="切换驾校" shape="circle" @click="handleChangeSchool"></u-button>
@ -60,7 +64,8 @@
<text class="ml5 fs26 cor-333 fwb" style="line-height: 26px;">{{ user.schoolPhone }}</text> <text class="ml5 fs26 cor-333 fwb" style="line-height: 26px;">{{ user.schoolPhone }}</text>
</view> </view>
</view> </view>
<view v-else class="pt30 pb15"> <view v-else class="p15tb flex ai-c jc-sb">
<view class="fs20 cor-333 fwb">尚未绑定驾校</view>
<u-button text="绑定驾校" shape="circle" @click="handleChangeSchool"></u-button> <u-button text="绑定驾校" shape="circle" @click="handleChangeSchool"></u-button>
</view> </view>
</view> </view>
@ -138,15 +143,15 @@ export default {
methods: { methods: {
handleVip() { handleVip() {
if (this.isLogin) { if (this.isLogin) {
if(this.vipOn.length) { // if (this.vipOn.length) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/me/vip' url: '/pages/me/vip'
}) })
} else { // } else {
uni.navigateTo({ // uni.navigateTo({
url: '/pages/index/videoVip' // url: '/pages/index/videoVip'
}) // })
} // }
} else { } else {
this.toLogin() this.toLogin()
} }

@ -190,7 +190,7 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-popup :show="showVip" mode="bottom" :closeOnClickOverlay="true" :round="16" @close="showVip=false"> <!-- <u-popup :show="showVip" mode="bottom" :closeOnClickOverlay="true" :round="16" @close="showVip=false">
<view class="p14" style="z-index: 9;"> <view class="p14" style="z-index: 9;">
<view class="wp100 flex ai-c jc-sb"> <view class="wp100 flex ai-c jc-sb">
<text class="fs30 fw600 cor-000">VIP题库</text> <text class="fs30 fw600 cor-000">VIP题库</text>
@ -219,7 +219,7 @@
<image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image> <image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image>
</view> </view>
</view> </view>
</u-popup> </u-popup> -->
</view> </view>
</template> </template>
@ -333,16 +333,13 @@ export default {
this.topicIndex ++; this.topicIndex ++;
this.qIndex=this.topicIndex this.qIndex=this.topicIndex
setTimeout(()=>{ setTimeout(()=>{
console.log(12345);
this.renderSwiper(this.topicIndex); this.renderSwiper(this.topicIndex);
},1000) },1000)
} }
if(this.topicIndex<=this.questionList.length-1){ if(this.topicIndex===this.questionList.length-1){
this.qIndex=this.topicIndex this.qIndex=this.topicIndex+1
}else{
this.qIndex++
} }
if(this.qIndex>=this.questionList.length-1){ if(this.qIndex>this.questionList.length-1){
setTimeout(()=>{ setTimeout(()=>{
this.tipShow=true this.tipShow=true
},1000) },1000)
@ -405,7 +402,9 @@ export default {
}, },
//VIP //VIP
toVip(){ toVip(){
this.showVip=true uni.navigateTo({
url:"/pages/index/videoVip?subject="+this.subject
})
}, },
submitPaper(){ submitPaper(){
this.$refs.countDown_1.pause(); this.$refs.countDown_1.pause();
@ -565,9 +564,14 @@ export default {
this.questionList[this.topicIndex].optionList[index].chooseOption =`${this.questionList[this.topicIndex].optionList[index].chooseOption?this.questionList[this.topicIndex].optionList[index].chooseOption:''}${op}` this.questionList[this.topicIndex].optionList[index].chooseOption =`${this.questionList[this.topicIndex].optionList[index].chooseOption?this.questionList[this.topicIndex].optionList[index].chooseOption:''}${op}`
this.questionList[this.topicIndex].clickAnswer = `${this.questionList[this.topicIndex].optionList[index].clickAnswer?this.questionList[this.topicIndex].optionList[index].clickAnswer:''}${op}` this.questionList[this.topicIndex].clickAnswer = `${this.questionList[this.topicIndex].optionList[index].clickAnswer?this.questionList[this.topicIndex].optionList[index].clickAnswer:''}${op}`
}else{ }else{
//
if(this.questionList[this.topicIndex].type=='3'&&!this.questionList[this.topicIndex].clickAnswer.includes(op)){ if(this.questionList[this.topicIndex].type=='3'&&!this.questionList[this.topicIndex].clickAnswer.includes(op)){
this.questionList[this.topicIndex].optionList[index].chooseOption =`${this.questionList[this.topicIndex].optionList[index].chooseOption?this.questionList[this.topicIndex].optionList[index].chooseOption:''}${op}` this.questionList[this.topicIndex].optionList[index].chooseOption =`${this.questionList[this.topicIndex].optionList[index].chooseOption?this.questionList[this.topicIndex].optionList[index].chooseOption:''}${op}`
this.questionList[this.topicIndex].clickAnswer =`${this.questionList[this.topicIndex].clickAnswer}${op}` this.questionList[this.topicIndex].clickAnswer =`${this.questionList[this.topicIndex].clickAnswer}${op}`
}else if(this.questionList[this.topicIndex].type=='3'&&this.questionList[this.topicIndex].clickAnswer.includes(op)){
this.questionList[this.topicIndex].optionList[index].chooseOption =''
let reg2 = new RegExp(op); // 'g'"a"
this.questionList[this.topicIndex].clickAnswer = this.questionList[this.topicIndex].clickAnswer.replace(reg2,"");
} }
} }
if(this.tCurrent!==1&&this.questionList[this.topicIndex].type!='3'){ if(this.tCurrent!==1&&this.questionList[this.topicIndex].type!='3'){
@ -600,12 +604,10 @@ export default {
this.renderSwiper(this.topicIndex); this.renderSwiper(this.topicIndex);
},1000) },1000)
} }
if(this.topicIndex<=this.questionList.length-1){ if(this.topicIndex===this.questionList.length-1){
this.qIndex=this.topicIndex this.qIndex=this.topicIndex+1
}else{
this.qIndex++
} }
if(this.qIndex>=this.questionList.length-1){ if(this.qIndex>this.questionList.length-1){
setTimeout(()=>{ setTimeout(()=>{
this.tipShow=true this.tipShow=true
},1000) },1000)

@ -3,7 +3,8 @@
<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true"> <!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true">
</u-navbar> --> </u-navbar> -->
<j-navbar>{{navTitle}}</j-navbar> <j-navbar>{{navTitle}}</j-navbar>
<Question ref="question" :tabsList="tabsList" :isShowAll="isShowAll" :subject="subject" :navTitle="navTitle" @changeTab="changeTab"></Question> <Question ref="question" :tabsList="tabsList" :isShowAll="isShowAll" :subject="subject" :navTitle="navTitle"
@changeTab="changeTab"></Question>
</view> </view>
</template> </template>
@ -51,7 +52,7 @@
if (this.needVip === 'true') { if (this.needVip === 'true') {
if (this.token) { if (this.token) {
await this.searchUserVip() await this.searchUserVip()
const res=this.vipOnList.some(item=>item.subject==this.subject) const res = this.vipOnList.some(item => item.subjects == this.subject)
if (!res) { if (!res) {
this.questionArr = this.questionArr.slice(0, 3) this.questionArr = this.questionArr.slice(0, 3)
this.isShowAll = false this.isShowAll = false
@ -64,6 +65,12 @@
} }
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr)) this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
} else { } else {
if (!storage.get('token')) {
uni.navigateTo({
url: '/pages/login/login'
})
return
}
if (this.navTitle === '错题本') { if (this.navTitle === '错题本') {
param.questionIdList = storage.get(`wrongList_subject${this.subject}`) || [] param.questionIdList = storage.get(`wrongList_subject${this.subject}`) || []
} else if (this.navTitle === '收藏夹') { } else if (this.navTitle === '收藏夹') {

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Loading…
Cancel
Save