From ded28b62fbe651ffcb9d83e4f4dbc85944d93ffc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=84=86=E7=9A=AE=E9=B8=AD?= <1003092440@qq.com>
Date: Sun, 17 Sep 2023 23:49:42 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 4 +--
src/App.vue | 2 +-
src/jtools/pay/index.js | 3 +-
src/pages/index/index.vue | 2 +-
src/pages/index/videoVip.vue | 33 +++++++++++++-------
src/pages/me/index.vue | 10 ++++--
src/pages/me/info.vue | 4 +--
src/pages/questionBank/exclusiveExercise.vue | 13 +++++++-
8 files changed, 48 insertions(+), 23 deletions(-)
diff --git a/.env.development b/.env.development
index 22201b8..52702e2 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,6 @@ 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'
\ No newline at end of file
+VITE_WEB_BASE_URL = 'https://jwl.ahduima.com'
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 44caa81..cc47636 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,13 +4,13 @@ import useQuestionStore from '@/jtools/store/question' //引入store
export default {
onLaunch: function () {
useUserStore().queryVipList()
- useQuestionStore().getAllQuestion()
if(useUserStore().isLogin) {
useUserStore().getUserInfo()
useUserStore().searchUserVip()
}
},
onShow: function () {
+ useQuestionStore().getAllQuestion()
console.log('App Show')
},
onHide: function () {
diff --git a/src/jtools/pay/index.js b/src/jtools/pay/index.js
index b326e73..e392b7e 100644
--- a/src/jtools/pay/index.js
+++ b/src/jtools/pay/index.js
@@ -64,7 +64,8 @@ export default class JtoolsPay {
"description": this.order.description,
"money": this.order.money,
"outTradeNo": this.order.outTradeNo,
- "userId": this.order.userId
+ "userId": this.order.userId,
+ "tradeType":'1'
}
if (uni.getStorageSync('openId')) {
params.openId = uni.getStorageSync('openId');
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 647b361..9984b63 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -66,7 +66,7 @@
this.show=false
},
computed: {
- ...mapState(useQuestionStore, ["loading_subject4", "loading_subject1","curSubject"]), //映射函数,取出tagslist
+ ...mapState(useQuestionStore, ["loading_subject4", "loading_subject1","curSubject","orderQuestion_subject1","orderQuestion_subject4"]), //映射函数,取出tagslist
getLoading() {
return this.loading_subject4 && this.loading_subject1
}
diff --git a/src/pages/index/videoVip.vue b/src/pages/index/videoVip.vue
index b503a63..7013ce1 100644
--- a/src/pages/index/videoVip.vue
+++ b/src/pages/index/videoVip.vue
@@ -60,7 +60,7 @@
-
+
@@ -86,6 +86,7 @@
export default {
data(){
return{
+ picUrl:'',
titleNum:500,
subject:'1',
loading:true,
@@ -106,12 +107,19 @@
this.getVipList()
this.getWXOpenId()
this.getTitle()
+ this.getPic()
this.$set(this.order, 'userId', this.userInfo.userId);
},
computed: {
...mapState(useUserStore, ["userInfo"])
},
methods:{
+ getPic(){
+ const currentCartype = storage.get('carType') || '1001'
+ querySysConfig(currentCartype, 'VipDescImageUrl').then(res => {
+ this.picUrl = JSON.parse(res.data.configJson).url
+ })
+ },
getTitle(){
const carId=storage.get('carType') || '1001'
querySysConfig(carId,'SimplifyQuestionNum').then(resp=>{
@@ -142,16 +150,18 @@
carTypeId: storage.get('carType') || '1001',
subject:this.subject
}).then(resp=>{
- this.priceList=resp.data
- this.checkedId=this.priceList[0].memberId
- this.order.outTradeNo=this.priceList[0].memberId
- this.order.money=this.priceList[0].price
- this.nowPrice=this.priceList[0].price
- this.priceList.forEach(item=>{
- if(item.subjects.length>1){
- item.all=true
- }
- })
+ if(resp.code==='0000'){
+ this.priceList=resp.data
+ this.checkedId=this.priceList[0].memberId
+ this.order.outTradeNo=this.priceList[0].memberId
+ this.order.money=this.priceList[0].price
+ this.nowPrice=this.priceList[0].price
+ this.priceList.forEach(item=>{
+ if(item.subjects.length>1){
+ item.all=true
+ }
+ })
+ }
})
},
checkPrice(val,price){
@@ -175,7 +185,6 @@
padding: 14px;
}
.checked_item{
- width: 228rpx;
background: #FFF0E5;
border: 4px solid #FF6E02;
}
diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue
index a2c0d1d..7e674d4 100644
--- a/src/pages/me/index.vue
+++ b/src/pages/me/index.vue
@@ -189,9 +189,13 @@ export default {
},
handleTJ() {
if (this.isLogin) {
- uni.navigateTo({
- url: '/pages/me/tijian'
- })
+ // uni.navigateTo({
+ // url: '/pages/me/tijian'
+ // })
+ uni.showToast({
+ title:'敬请期待',
+ icon:'none'
+ })
} else {
this.toLogin()
}
diff --git a/src/pages/me/info.vue b/src/pages/me/info.vue
index 4aecdae..e220123 100644
--- a/src/pages/me/info.vue
+++ b/src/pages/me/info.vue
@@ -15,7 +15,7 @@
-
+
diff --git a/src/pages/questionBank/exclusiveExercise.vue b/src/pages/questionBank/exclusiveExercise.vue
index 0032297..34fdc31 100644
--- a/src/pages/questionBank/exclusiveExercise.vue
+++ b/src/pages/questionBank/exclusiveExercise.vue
@@ -15,7 +15,7 @@
章节练习
- 共5章
+ 共{{chapterNum}}章
@@ -67,6 +67,7 @@
export default {
data() {
return {
+ chapterNum:0,
errorIcon,
newRulesIcon,
neverWriteIcon,
@@ -111,6 +112,7 @@
}
this.getExamPoint()
this.getQuestionNum()
+ this.getChapterList()
},
computed: {
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "version"]), //映射函数,取出tagslist
@@ -120,6 +122,15 @@
},
methods: {
...mapActions(useQuestionStore, ['getAllQuestion']),
+ getChapterList(){
+ const carTypeId=storage.get('carType') || '1001'
+ const key=this.subject=='1'?'ChapterOfSubjectOne':'ChapterOfSubjectFour'
+ querySysConfigList(carTypeId,'ChapterOfSubjectOne').then(resp=>{
+ if(resp.code==='0000'&&resp.data){
+ this.chapterNum=resp.data.length
+ }
+ })
+ },
getQuestionNum() {
querySpecialNum({
carTypeId: storage.get('carType') || '1001',
--
2.38.1.windows.1