跳转登陆页bug

This commit is contained in:
@fawn-nine
2024-10-16 15:16:51 +08:00
parent 18e1cc0c83
commit 3cb0b4c990
4 changed files with 26 additions and 9 deletions

View File

@@ -6,9 +6,9 @@ if (process.env.NODE_ENV === 'development') {
// socketUrl = "ws://localhost:6001/"; // socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/"; // baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 // baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
baseUrl = "https://api.nuttyreading.com/"; // 线上正式 // baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥 // baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/"; // baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/"; // baseUrl = "http://192.168.110.110:9200/pb/";

View File

@@ -40,7 +40,7 @@ let $http = new request({
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
// 'project_token': base.projectToken, //项目token可删除 // 'project_token': base.projectToken, //项目token可删除
}, },
// timeout:'360000' timeout:'15000' // 15秒
}); });
// 添加获取七牛云token的方法 // 添加获取七牛云token的方法

View File

@@ -3,7 +3,7 @@
<!-- 公共组件-每个页面必须引入 --> <!-- 公共组件-每个页面必须引入 -->
<public-module></public-module> <public-module></public-module>
<!-- <z-nav-bar :title="pageTitle ? pageTitle : '课程详情'"> --> <!-- <z-nav-bar :title="pageTitle ? pageTitle : '课程详情'"> -->
<z-nav-bar title="课程介绍"></z-nav-bar> <z-nav-bar title="课程介绍"></z-nav-bar>
<view class="contentBox commonPageContentBox" > <view class="contentBox commonPageContentBox" >
<u-alert v-if="goBuyTitle && isAndorid" style=" <u-alert v-if="goBuyTitle && isAndorid" style="
background: linear-gradient(90deg, #258feb 0%, #00e1ec 100%); background: linear-gradient(90deg, #258feb 0%, #00e1ec 100%);
@@ -1247,7 +1247,7 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/course/myCourseLearn?id=${this.course.id}`, url: `/pages/course/myCourseLearn?id=${this.course.id}`,
}); });
}, },
async getData(id) { async getData(id) {
this.courseList = []; this.courseList = [];
// console.log("at line 1167:", "调用了几次"); // console.log("at line 1167:", "调用了几次");
@@ -1260,7 +1260,7 @@
data: { data: {
id: id, id: id,
}, },
header: { header: {
//默认 无 说明:请求头 //默认 无 说明:请求头
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
@@ -1335,6 +1335,13 @@
}) })
.catch((e) => { .catch((e) => {
console.log(e, "获取目录数据报错"); console.log(e, "获取目录数据报错");
// if(e.statusCode == 0){
// uni.showToast({
// title:'获取课程信息失败,请稍后尝试',
// icon:'none',
// duration: 5000
// })
// }
}); });
}, },
goBuy() { goBuy() {

View File

@@ -36,9 +36,19 @@ export const dispatchRequest = function(requestInfo) {
errMsg: "请求超时,请重新尝试", errMsg: "请求超时,请重新尝试",
statusCode: 0, statusCode: 0,
}); });
uni.navigateTo({ console.log('requestInfo.url',requestInfo.url);
url: "/pages/user/login" if(!requestInfo.url.includes('sociology/course/saveCoursePosition')){
}); uni.showToast({
title:'请求超时,请重新尝试',
icon:'none',
duration: 5000
})
}
// console.log('');
// uni.navigateTo({
// url: "/pages/user/login"
// });
} else { } else {
reject(err); reject(err);
} }