Browse Source

Merge remote-tracking branch 'origin/2025鹅状元数学' into 2025鹅状元数学

wangxy 1 month ago
parent
commit
97e484e871

+ 8 - 4
common/styles/global/components.scss

@@ -471,7 +471,11 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 }
 
 // 遮盖层
-.shop-mask{
-		position: absolute;top: 0;left: 0;right: 0;bottom: 0;background-color: azure;
-		color: #333;z-index: 999;display: flex;align-items: center;justify-content: center;
-	}
+.ezy-mask-box{
+	position: absolute;top: 0;left: 0;right: 0;bottom: 0;background-color: azure;
+	color: #333;z-index: 999;display: flex;align-items: center;justify-content: center;
+}
+
+// 没有更多
+.ezy-no-more{color: rgb(119, 119, 119);font-size: 28rpx;text-align: center;}
+	

+ 1 - 0
pages/chanpinXuanze/components/shuxueList.vue

@@ -2,6 +2,7 @@
 	<view class="sx-card-list" v-if="list.length">
     <template  v-for="{chanpin,value:item} in list">
      <cp1 v-if="chanpin == 'tujiemuti'" :item="item" :key="item.chanpinId"></cp1>
+	 <view class="ezy-no-more">没有更多</view>
 <!--      <cp2 v-if="chanpin == 'tujiemuti333'" :item="item" :key="item.chanpinId"></cp2>-->
     </template>
 

+ 1 - 0
pages/chanpinXuanze/cp1/banben.vue

@@ -19,6 +19,7 @@
           </view>
           <view class="item-play-btn"></view>
         </ezyActiveVue>
+		<view class="ezy-no-more">没有更多</view>
       </template>
       <template v-else>
         <view class="shiti-frame-box">

+ 6 - 5
pages/chanpinZiliao/shuxue/jstxInfo.vue

@@ -58,7 +58,7 @@ function handleBack() {
 		url: '/pages/chanpinZiliao/index'
 	})
 }
-			
+
 // jisuantexun Info data
 function getJisuanInfo() {
   jisuanInfo({ziliaoId:data.id}).then(res => {
@@ -89,7 +89,7 @@ function cardBtn(bbItem) {
 	jstxDownRef.value.handleShow();
 }
 
-// 弹窗确认	
+// 弹窗确认
 function jstxDialogConfirm() {
 	uni.showLoading({ title: '正在生成试题...' });
 	jisuanPdf({
@@ -98,9 +98,10 @@ function jstxDialogConfirm() {
 		const url = res1.data;
 		if (!url) {
 			uni.showToast({ title: '未获取到文件地址', icon: 'none' });
+			uni.hideLoading();
 			return;
 		}
-		
+
 		uni.downloadFile({
 		  url,
 		  success: function (res) {
@@ -121,11 +122,11 @@ function jstxDialogConfirm() {
 		  }
 		});
 	}).catch(err => {
-		uni.showToast({ title: '生成失败,请稍后重试', icon: 'none' });
+		uni.showToast({ title: err.data.msg || '生成失败,请稍后重试', icon: 'none' });
 		uni.hideLoading();
 	});
 }
-	
+
 onLoad((options) => {
 	data.id = options.ziliaoId;
 	getJisuanInfo()

+ 6 - 6
pages/chanpinZiliao/shuxue/sxList.vue

@@ -3,12 +3,12 @@
 	    <template  v-for="{chanpin,content:item} in list">
 			<jstxCard v-if="chanpin == 'jisuantexun'" :item="item" :key="item.ziliaoId"></jstxCard>
 	    </template>
-	
-		</view>
-		<view class="ezy-no-sj" v-else>
-			<icon></icon>
-			<text>暂无数据</text>
-		</view>
+		<view class="ezy-no-more">没有更多</view>
+	</view>
+	<view class="ezy-no-sj" v-else>
+		<icon></icon>
+		<text>暂无数据</text>
+	</view>
 </template>
 
 <script setup>

+ 7 - 6
utils/request.js

@@ -92,15 +92,16 @@ const request = config => {
 				resolve(res)
 			})
 			.catch(error => {
+				console.log('error', error);
+				let message = ''
 				let {
-					message
+					errMsg
 				} = error
-				if (message === 'Network Error') {
-					message = '后端接口连接异常'
-				} else if (message.includes('timeout')) {
+				console.log('error', error);
+				if (errMsg.includes('timeout')) {
 					message = '系统接口请求超时'
-				} else if (message.includes('Request failed with status code')) {
-					message = '系统接口' + message.substr(message.length - 3) + '异常'
+				} else {
+					message = '网络连接异常,请检查网络后重试'
 				}
 				toast(message)
 				reject(error)