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_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_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';
export function queryQuestion(data) {
return request({
url: 'driver-api/tdQuestion/queryQuestion',
method: 'POST',
data,
noToken: true
});
}
@ -13,7 +13,7 @@ export function questionCategory(data) {
return request({
url: 'driver-api/tdQuestion/questionCategory',
method: 'POST',
data,
data
});
}
@ -21,7 +21,7 @@ export function getTestQuestion(data) {
return request({
url: 'driver-api/tdQuestion/getTestQuestion',
method: 'POST',
data,
data
});
}
@ -29,7 +29,7 @@ export function submitTest(data) {
return request({
url: 'driver-api/tdQuestionTest/testSubmit',
method: 'POST',
data,
data
});
}
@ -37,7 +37,7 @@ export function testTotal(data) {
return request({
url: 'driver-api/tdQuestionTest/testTotal',
method: 'POST',
data,
data
});
}
@ -45,7 +45,7 @@ export function testTotal(data) {
export function querySysConfigList(carTypeId, configKey) {
return request({
url: 'driver-api/tdSysConfigList/querySysConfigList?configKey=' + configKey + '&carTypeId=' + carTypeId,
method: 'GET',
method: 'GET'
});
}
@ -54,6 +54,6 @@ export function queryProjectList(data) {
return request({
url: 'driver-api/tdTestProject/queryProjectList',
method: 'POST',
data,
data
});
}

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

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

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

@ -3,7 +3,7 @@
<view class="box-nav">
<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">
<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 class="p14lr" style="margin-top: -20px;">
@ -23,11 +23,19 @@
</view>
</view>
<view class="video_box mt10">
<text class="fs18 cor-000">驾驶方法</text>
<view class="text-center mt10" style="width: 200rpx;" @tap="toDetail">
<image style="width: 200rpx;height: 200rpx;margin-bottom: 5px;" src="../../../static/image/index/base_operate.png"></image>
<text class="fs16 cor-000">基础操作讲解</text>
<view class="fs14 cor-999 mt5">操作方法精讲</view>
<view class="flex ai-c jc-sb">
<text class="fs18 cor-000">基础操作讲解</text>
<view class="flex cor-666" @tap="toVideo">
<text>全部</text>
<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>
@ -66,6 +74,7 @@ export default {
})
},
getVideoList(){
console.log(this.subject);
queryProjectList({
"carTypeId": storage.get('carType') || '1001',
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode,
@ -133,4 +142,10 @@ export default {
background: linear-gradient(90deg, #11DF20 0%, #01B74F 100%);
color:#fff
}
.pic{
width: 300rpx;
height: 169rpx;
background: #00B74F;
border-radius: 8rpx;
}
</style>

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

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

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

@ -33,20 +33,24 @@
</view>
<text class="ml5 fs16 fwb" style="color: #7E4012FF;">VIP会员</text>
</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 class="absolute flex ai-c jc-c" style="left: 0;top: 40px;right: 0;bottom: 0;">
<view class="text-center">
<view v-if="vipOn.length" class="fs18 fwb" style="color: #7E4012FF;">{{vipText}}</view>
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">
{{ vipOn.length?'马上学习':'开通会员'}}
<view v-if="!isLogin || !vipOn.length" class="text-center">
<view class="fs18 fwb" style="color: #7E4012FF;">开通VIP尊享以下权益</view>
<view class="fs15" style="color: #7E4012FF;">精选500题 / 真是模考 / 考前密卷</view>
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">立即开通</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 class="br8 bc-fff p15 z-index2">
<view v-if="isLogin" class="br8 bc-fff p15 z-index2">
<text class="fs16 cor-333">我的驾校</text>
<view v-if="user.schoolId">
<view v-if="user?.schoolId">
<div class="mt12 flex ai-c jc-sb">
<text class="fs18 cor-000 fwb">{{ user.schoolName }}</text>
<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>
</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>
</view>
</view>
@ -138,15 +143,15 @@ export default {
methods: {
handleVip() {
if (this.isLogin) {
if(this.vipOn.length) {
// if (this.vipOn.length) {
uni.navigateTo({
url: '/pages/me/vip'
})
} else {
uni.navigateTo({
url: '/pages/index/videoVip'
})
}
// } else {
// uni.navigateTo({
// url: '/pages/index/videoVip'
// })
// }
} else {
this.toLogin()
}

@ -190,7 +190,7 @@
</view>
</view>
</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="wp100 flex ai-c jc-sb">
<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>
</view>
</view>
</u-popup>
</u-popup> -->
</view>
</template>
@ -333,16 +333,13 @@ export default {
this.topicIndex ++;
this.qIndex=this.topicIndex
setTimeout(()=>{
console.log(12345);
this.renderSwiper(this.topicIndex);
},1000)
}
if(this.topicIndex<=this.questionList.length-1){
this.qIndex=this.topicIndex
}else{
this.qIndex++
if(this.topicIndex===this.questionList.length-1){
this.qIndex=this.topicIndex+1
}
if(this.qIndex>=this.questionList.length-1){
if(this.qIndex>this.questionList.length-1){
setTimeout(()=>{
this.tipShow=true
},1000)
@ -405,7 +402,9 @@ export default {
},
//VIP
toVip(){
this.showVip=true
uni.navigateTo({
url:"/pages/index/videoVip?subject="+this.subject
})
},
submitPaper(){
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].clickAnswer = `${this.questionList[this.topicIndex].optionList[index].clickAnswer?this.questionList[this.topicIndex].optionList[index].clickAnswer:''}${op}`
}else{
//
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].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'){
@ -600,12 +604,10 @@ export default {
this.renderSwiper(this.topicIndex);
},1000)
}
if(this.topicIndex<=this.questionList.length-1){
this.qIndex=this.topicIndex
}else{
this.qIndex++
if(this.topicIndex===this.questionList.length-1){
this.qIndex=this.topicIndex+1
}
if(this.qIndex>=this.questionList.length-1){
if(this.qIndex>this.questionList.length-1){
setTimeout(()=>{
this.tipShow=true
},1000)

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Loading…
Cancel
Save