Browse Source

Merge remote-tracking branch 'origin/2024鹅状元' into 2024鹅状元

wangguoyu 6 tháng trước cách đây
mục cha
commit
a283f7a329

+ 12 - 0
api/catalogue.js

@@ -0,0 +1,12 @@
+import request from '@/utils/request'
+export function getCatalogue(data = {}) {
+	return request({
+		url: "/common/zhangjie/list",
+		headers: {
+			isToken: true
+		},
+		method: 'post',
+		data,
+		timeout: 20000
+	})
+}

+ 12 - 0
api/unitTest.js

@@ -0,0 +1,12 @@
+import request from '@/utils/request'
+export function getExamData(data = {}) {
+	return request({
+		url: "/common/zhangjie/list",
+		headers: {
+			isToken: true
+		},
+		method: 'post',
+		data,
+		timeout: 20000
+	})
+}

+ 0 - 6
common/styles/global/components.scss

@@ -47,9 +47,3 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
     background-color: rgb(248, 248, 248);color: rgb(0, 0, 0);box-sizing: border-box;
 	display: flex;align-items: center;justify-content: center;overflow: hidden;z-index: 998;
   }
-
-
-.uni-tabbar{
-	@include ezy-no-repeat-contain(bottom);
-	background-image: url("@/static/images/tabbar/tabbar-bg.png");
-}

+ 8 - 0
common/styles/index.scss

@@ -3,3 +3,11 @@
 
 // 页面样式
 @import '/common/styles/global/pages.scss';
+
+
+.uni-tabbar{
+	@include ezy-no-repeat-cover(top);padding: 0 60rpx;box-sizing: border-box;
+	background-image: url("@/static/images/tabbar/tabbar-bg.png");
+	.uni-tabbar-border{height: 0;}
+	.uni-tabbar__icon{margin: 0 0 64rpx;}
+}

+ 9 - 16
components/catalogue/useCatalogue.js

@@ -6,8 +6,10 @@ import {
 import {
 	onLoad
 } from '@dcloudio/uni-app'
-import request from "@/utils/request.js"
-import {catchError} from "@/utils/common.js"
+import {
+	catchError
+} from "@/utils/common.js"
+import * as httpCatalogue from "@/api/catalogue.js"
 
 export function useCatalogue() {
 	const data = reactive({
@@ -25,19 +27,11 @@ export function useCatalogue() {
 	})
 
 
-	function httpGetCatalogue() {
-		return request({
-			url: "/common/zhangjie/list",
-			method: "POST",
-			data: {
-				nianji: +data.nianji,
-				xueqi: +data.xueqi
-			}
-		})
-	}
-
 	async function getCatalogue() {
-		return await catchError(httpGetCatalogue());
+		return await catchError(httpCatalogue.getCatalogue({
+			nianji: +data.nianji,
+			xueqi: +data.xueqi
+		}));
 	}
 
 	return {
@@ -46,5 +40,4 @@ export function useCatalogue() {
 		// 获取章节数据
 		getCatalogue
 	}
-}
-
+}

+ 3 - 4
pages.json

@@ -49,21 +49,20 @@
 		}
 	],
 	"tabBar": {
-		"height": "150rpx",
+		"height": "90rpx",
 		"iconWidth": "134rpx",
 		"spacing": "0px",
 		"backgroundColor": "transparent",
-		"borderStyle": "transparent",
 		"list": [{
 			"pagePath": "pages/study/index",
 			"iconPath": "static/images/tabbar/unselect/plan-sj.png",
 			"selectedIconPath": "static/images/tabbar/select/plan-sj.png"
 		}, {
-			"pagePath": "pages/study/catalogue",
+			"pagePath": "pages/study/index",
 			"iconPath": "static/images/tabbar/unselect/develop-sj.png",
 			"selectedIconPath": "static/images/tabbar/select/develop-sj.png"
 		}, {
-			"pagePath": "pages/study/catalogue",
+			"pagePath": "pages/study/index",
 			"iconPath": "static/images/tabbar/unselect/partner-sj.png",
 			"selectedIconPath": "static/images/tabbar/select/partner-sj.png"
 		}, {

+ 1 - 1
pages/login/index.vue

@@ -7,7 +7,7 @@
 				    <view class="phone-input-box">
 						<view class="phone-prefix">+86</view>
 						<input class="phone-input" type="text" v-model="data.phoneNumber" placeholder="请输入手机号" 
-						maxlength="11" :value="data.phoneNumber" @input="clearTelInput" />
+						maxlength="11" @input="clearTelInput" />
 						<view class="close-btn" v-if="data.clearTelIcon" @click="clearTel"></view>
 				    </view>
 					<!-- 协议勾选框和按钮 -->

+ 1 - 1
pages/login/login.vue

@@ -6,7 +6,7 @@
 				<view class="phone-prefix">验证码已发送至:{{data.phoneNumber}}</view>
 				<view class="phone-input-box">
 					<input class="phone-input" type="text" v-model="data.yzmNumber" placeholder="请输入验证码" 
-					maxlength="6" :value="data.yzmNumber" @input="clearYzmInput" />
+					maxlength="6" @input="clearYzmInput" />
 					<view class="close-btn" v-if="data.clearYzmIcon" @click="clearYzm"></view>
 				</view>
 				<view class="yzm-btn-disabled" @click="loginBtn" :class="data.yzmStatus"></view>

+ 5 - 14
pages/unitTest/useUnit.js

@@ -13,19 +13,7 @@ import {
 	catchError,
 	toast
 } from "@/utils/common.js"
-import request from "@/utils/request.js"
-
-// 获取单元测试数据
-function httpGetExamData() {
-	return request({
-		url: "/common/zhangjie/list",
-		method: "POST",
-		data: {
-			nianji: 1,
-			xueqi: 1
-		}
-	})
-}
+import * as httpUnit from "@/api/unitTest.js"
 
 function useJifen() {
 	const data = reactive({
@@ -94,7 +82,10 @@ export function useExam(dom) {
 
 	// 初始化页面数据
 	async function initPage() {
-		const [err, data] = await catchError(httpGetExamData());
+		const [err, data] = await catchError(httpUnit.getExamData({
+			nianji: 1,
+			xueqi: 1
+		}));
 		if (err) {
 			toast("单元测试数据获取异常");
 			return;