From 49abbc764b8fc7101666fe38d2bb841f2fa25af7 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Thu, 24 Aug 2023 15:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +-- .env.production | 4 +-- src/App.vue | 4 +-- src/jtools/api/question.js | 20 +++++++------- src/jtools/api/vip.js | 5 ++-- src/pages/me/index.vue | 53 +++++++++++++++++++++----------------- 6 files changed, 48 insertions(+), 42 deletions(-) diff --git a/.env.development b/.env.development index 5b6f2bd..7440985 100644 --- a/.env.development +++ b/.env.development @@ -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' diff --git a/.env.production b/.env.production index 7f92d8e..a1f8f88 100644 --- a/.env.production +++ b/.env.production @@ -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' diff --git a/src/App.vue b/src/App.vue index 430980b..e6fa5e0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,8 +4,8 @@ import useQuestionStore from '@/jtools/store/question' //引入store export default { onLaunch: function () { useUserStore().queryVipList() - if(useUserStore().isLogin) { - useQuestionStore().getOrderQuestion('1') + useQuestionStore().getOrderQuestion('1') + if (useUserStore().isLogin) { useUserStore().getUserInfo() useUserStore().searchUserVip() } diff --git a/src/jtools/api/question.js b/src/jtools/api/question.js index e521426..e41c896 100644 --- a/src/jtools/api/question.js +++ b/src/jtools/api/question.js @@ -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,15 +37,15 @@ export function testTotal(data) { return request({ url: 'driver-api/tdQuestionTest/testTotal', method: 'POST', - data, + data }); } //获取配置 -export function querySysConfigList(carTypeId,configKey) { +export function querySysConfigList(carTypeId, configKey) { return request({ - url: 'driver-api/tdSysConfigList/querySysConfigList?configKey='+configKey+'&carTypeId='+carTypeId, - method: 'GET', + url: 'driver-api/tdSysConfigList/querySysConfigList?configKey=' + configKey + '&carTypeId=' + carTypeId, + method: 'GET' }); } @@ -53,7 +53,7 @@ export function querySysConfigList(carTypeId,configKey) { export function queryProjectList(data) { return request({ url: 'driver-api/tdTestProject/queryProjectList', - method: 'POST', - data, + method: 'POST', + data }); } diff --git a/src/jtools/api/vip.js b/src/jtools/api/vip.js index 1df6e42..a792fcf 100644 --- a/src/jtools/api/vip.js +++ b/src/jtools/api/vip.js @@ -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 }); -} \ No newline at end of file +} diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue index 3929e32..6313138 100644 --- a/src/pages/me/index.vue +++ b/src/pages/me/index.vue @@ -7,7 +7,7 @@ - {{ user.userName }}{{user.userId}} + {{ user.userName }}{{ user.userId }} 陪您学车 第{{ user.days }}天 @@ -33,22 +33,26 @@ VIP会员 - {{expireTime}}到期 + 您还不是VIP会员 + {{ expireTime }}到期 - - {{vipText}} - - {{ vipOn.length?'马上学习':'开通会员'}} - + + 开通VIP尊享以下权益 + 精选500题 / 真是模考 / 考前密卷 + 立即开通 + + + {{ vipText }} + 马上学习 - + 我的驾校 - +
- {{user.schoolName}} + {{ user.schoolName }}
@@ -57,10 +61,11 @@ 客服热线
- {{user.schoolPhone}} + {{ user.schoolPhone }}
- + + 尚未绑定驾校 @@ -104,27 +109,27 @@ export default { return useUserStore().vipOnList }, expireTime() { - if(this.vipOn.length) { + if (this.vipOn.length) { const t = this.vipOn.reduce((pre, cur) => { - if(Date.parse(pre) > Date.parse(cur.endDate)) { + if (Date.parse(pre) > Date.parse(cur.endDate)) { return cur.endDate } return pre }, '2099-12-31') return t.split(' ')[0] - }else { + } else { return '' } }, vipText() { - if(this.vipOn.length) { + if (this.vipOn.length) { const t = this.vipOn.reduce((pre, cur) => { - return [...pre, ...cur.subjects.split(',').map(it =>['','一','二','三','四'][it])] + return [...pre, ...cur.subjects.split(',').map(it => ['', '一', '二', '三', '四'][it])] }, []) let val = Array.from(new Set(t)) - val = val.length == 4 ? val.join('')+'全部':val.join('') + val = val.length == 4 ? val.join('') + '全部' : val.join('') return `尊享科目${val}付费权益` - }else { + } else { return '' } } @@ -137,8 +142,8 @@ export default { }, methods: { handleVip() { - if(this.isLogin) { - if(this.vipOn.length) { + if (this.isLogin) { + if (this.vipOn.length) { uni.navigateTo({ url: '/pages/me/vip' }) @@ -157,7 +162,7 @@ export default { }) }, handleChangeSchool() { - if(this.isLogin) { + if (this.isLogin) { uni.navigateTo({ url: '/pages/me/school' }) @@ -166,7 +171,7 @@ export default { } }, handleInfo() { - if(this.isLogin) { + if (this.isLogin) { uni.navigateTo({ url: '/pages/me/info' }) @@ -175,7 +180,7 @@ export default { } }, handleTJ() { - if(this.isLogin) { + if (this.isLogin) { uni.navigateTo({ url: '/pages/me/tijian' })