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