|
@@ -145,6 +145,26 @@
|
|
|
init: qiepingInit
|
|
init: qiepingInit
|
|
|
} = useQiePing();
|
|
} = useQiePing();
|
|
|
|
|
|
|
|
|
|
+ function debounce(func, wait) {
|
|
|
|
|
+ let timeout;
|
|
|
|
|
+ return function (...args) {
|
|
|
|
|
+ const context = this;
|
|
|
|
|
+ clearTimeout(timeout);
|
|
|
|
|
+ timeout = setTimeout(() => {
|
|
|
|
|
+ func.apply(context, args);
|
|
|
|
|
+ }, wait);
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+ const handleBack = debounce(() => {
|
|
|
|
|
+ console.log('back')
|
|
|
|
|
+ const pages = getCurrentPages();
|
|
|
|
|
+ if (pages.length > 1) {
|
|
|
|
|
+ uni.navigateBack()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ history.back();
|
|
|
|
|
+ }
|
|
|
|
|
+ },1000)
|
|
|
|
|
+
|
|
|
onLoad((option) => {
|
|
onLoad((option) => {
|
|
|
data.ksId = option.ksId;
|
|
data.ksId = option.ksId;
|
|
|
data.zhuapai = option.zhuapai;
|
|
data.zhuapai = option.zhuapai;
|
|
@@ -507,14 +527,16 @@
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function handleBack () {
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /*function handleBack () {
|
|
|
const pages = getCurrentPages();
|
|
const pages = getCurrentPages();
|
|
|
if (pages.length > 1) {
|
|
if (pages.length > 1) {
|
|
|
uni.navigateBack()
|
|
uni.navigateBack()
|
|
|
} else {
|
|
} else {
|
|
|
history.back();
|
|
history.back();
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
|
|
function showAnswerCard() {
|
|
function showAnswerCard() {
|
|
|
popupRef.value.open('top')
|
|
popupRef.value.open('top')
|