优化提交
This commit is contained in:
parent
9acbefedbe
commit
6e4f5cfce6
|
|
@ -6,7 +6,7 @@
|
|||
<!-- 详细信息 -->
|
||||
<info-list :item="info" isDetail @mark="handleMark" @comment="handleComment" @share="handleShare"
|
||||
@follow="handleFollow">
|
||||
<view class="text-30 my-20 text-gray-600">
|
||||
<view v-if="info.content" class="text-30 my-20 text-gray-600">
|
||||
<u-parse :content="info.content"></u-parse>
|
||||
</view>
|
||||
</info-list>
|
||||
|
|
|
|||
|
|
@ -106,13 +106,12 @@
|
|||
|
||||
},
|
||||
onLoad() {
|
||||
this.getUserInfo()
|
||||
// this.getUserInfo()
|
||||
this.getList()
|
||||
this.getBannerList()
|
||||
},
|
||||
onShow() {
|
||||
//查看是否填写意向调查表
|
||||
this.getTrainHas()
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
|
|
@ -148,7 +147,7 @@
|
|||
})
|
||||
},
|
||||
search() {
|
||||
this.queryParams.page=1
|
||||
this.queryParams.page = 1
|
||||
this.assetList = []
|
||||
this.getList()
|
||||
},
|
||||
|
|
@ -179,6 +178,7 @@
|
|||
this.tabIndex = e.detail.current
|
||||
},
|
||||
btntabs(item) {
|
||||
this.getTrainHas()
|
||||
this.queryParams.type = item.type
|
||||
this.queryParams.page = 1
|
||||
this.assetList = []
|
||||
|
|
@ -219,6 +219,7 @@
|
|||
assetInfo({
|
||||
id: item.asset_id
|
||||
}).then(Response => {
|
||||
uni.hideLoading()
|
||||
uni.downloadFile({
|
||||
url: Response.data.pdf_url,
|
||||
success: function(res) {
|
||||
|
|
|
|||
|
|
@ -695,6 +695,7 @@
|
|||
title: '提交成功',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.setStorageSync('token', res.data.token);
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home'
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
</zxVideo>
|
||||
</u-sticky>
|
||||
<view class="detail">
|
||||
<view class="title">
|
||||
<view v-if="info.asset_name" class="title">
|
||||
{{info.asset_name}}
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view v-if="info.digest" class="desc">
|
||||
{{info.digest}}
|
||||
</view>
|
||||
<view class="parse">
|
||||
<view v-if="info.content" class="parse">
|
||||
<u-parse :content="info.content"></u-parse>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -69,9 +69,15 @@ function codes() {
|
|||
title: '提示',
|
||||
content: '请先用户注册',
|
||||
success: function(res) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/mine/edit-info?type=register'
|
||||
});
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/mine/edit-info?type=register'
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,27 +49,28 @@ export const apiResquest = (params) => {
|
|||
success: (res) => {
|
||||
// 如果返回的 code 为 1,表示需要重新获取 token
|
||||
if (res.data.code == 1) {
|
||||
if (!isRefreshing) {
|
||||
isRefreshing = true; // 设置标志位
|
||||
wxCode.codes().then(newToken => {
|
||||
isRefreshing = false; // 请求完成,重置标志位
|
||||
// 更新所有等待中的请求的 token
|
||||
pendingRequests.forEach((req) => {
|
||||
req.resolve({ ...res.data, token: newToken });
|
||||
});
|
||||
pendingRequests = []; // 清空等待中的请求
|
||||
}).catch((err) => {
|
||||
isRefreshing = false; // 请求失败,重置标志位
|
||||
// 拒绝所有等待中的请求
|
||||
pendingRequests.forEach((req) => {
|
||||
req.reject(err);
|
||||
});
|
||||
pendingRequests = []; // 清空等待中的请求
|
||||
});
|
||||
// if (!isRefreshing) {
|
||||
// isRefreshing = true; // 设置标志位
|
||||
wxCode.codes()
|
||||
// .then(newToken => {
|
||||
// isRefreshing = false; // 请求完成,重置标志位
|
||||
// // 更新所有等待中的请求的 token
|
||||
// pendingRequests.forEach((req) => {
|
||||
// req.resolve({ ...res.data, token: newToken });
|
||||
// });
|
||||
// pendingRequests = []; // 清空等待中的请求
|
||||
// }).catch((err) => {
|
||||
// isRefreshing = false; // 请求失败,重置标志位
|
||||
// // 拒绝所有等待中的请求
|
||||
// pendingRequests.forEach((req) => {
|
||||
// req.reject(err);
|
||||
// });
|
||||
// pendingRequests = []; // 清空等待中的请求
|
||||
// });
|
||||
}
|
||||
// 如果正在刷新,加入等待中的请求
|
||||
return pendingRequests.push({ resolve, reject });
|
||||
}
|
||||
// return pendingRequests.push({ resolve, reject });
|
||||
// }
|
||||
|
||||
resolve(res.data); // 正常返回
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue