思考题 多次点击

This commit is contained in:
2024-12-11 09:50:07 +08:00
parent 23ca083403
commit d46a4e6b66
6 changed files with 382 additions and 284 deletions

387
App.vue
View File

@@ -1,220 +1,217 @@
<script> <script>
import { import { iap } from "@/utils/myIapCheck.js";
iap import store from "@/store/index.js";
} from "@/utils/myIapCheck.js"; import socket from "@/config/socket";
import store from "@/store/index.js"; // #ifdef H5
import socket from "@/config/socket"; import { h5Login } from "@/config/html5Utils";
// #ifdef H5 // #endif
import { // // #ifdef APP-PLUS
h5Login // import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
} from "@/config/html5Utils"; // // #endif
// #endif // #ifdef APP-PLUS
// // #ifdef APP-PLUS import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
// import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate'; // #endif
// // #endif import Vue from "vue";
// #ifdef APP-PLUS
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
// #endif
import Vue from "vue";
export default { export default {
data() { data() {
return { return {
platform: null, // 系统 platform: null, // 系统
}; };
}, },
onLaunch: function(e) { onLaunch: function (e) {
// 检测自动更新 setTimeout(updata(), 1600);
// #ifdef APP-PLUS
// updata();
// #endif
uni.getSystemInfo({ // 检测自动更新
success(res) { // #ifdef APP-PLUS
Vue.prototype.winWidth = res.screenWidth;
Vue.prototype.winHeight = res.screenHeight;
Vue.prototype.statusBarHeight = res.statusBarHeight;
},
});
//取出缓存数据 // #endif
store.commit("setCacheData");
// #ifdef MP-WEIXIN uni.getSystemInfo({
if (store.state.userInfo.token) { success(res) {
socket.init(); Vue.prototype.winWidth = res.screenWidth;
} Vue.prototype.winHeight = res.screenHeight;
// #endif Vue.prototype.statusBarHeight = res.statusBarHeight;
// #ifdef H5 },
console.log(store.state); });
if (store.state.userInfo.token) {
socket.init(); //取出缓存数据
} else { store.commit("setCacheData");
h5Login("force", () => { // #ifdef MP-WEIXIN
socket.init(); if (store.state.userInfo.token) {
}); socket.init();
} }
// #endif // #endif
// #ifdef APP-PLUS // #ifdef H5
if (store.state.userInfo.token) { console.log(store.state);
socket.init(); if (store.state.userInfo.token) {
} socket.init();
// 检测是否有未关闭苹果内购订单 } else {
iap.getChannels() h5Login("force", () => {
// #endif socket.init();
}, });
onShow: function(e) { }
// #ifdef MP-WEIXIN // #endif
//获取二维码携带的参数 // #ifdef APP-PLUS
let scene = decodeURIComponent(e.query.scene); if (store.state.userInfo.token) {
scene = scene.split("&"); socket.init();
let data = { }
//场景值 // 检测是否有未关闭苹果内购订单
scene: e.scene, iap.getChannels();
}; // #endif
scene.forEach((item) => { },
let arr = item.split("="); onShow: function (e) {
if (arr.length == 2) { // #ifdef MP-WEIXIN
data[arr[0]] = arr[1]; //获取二维码携带的参数
} let scene = decodeURIComponent(e.query.scene);
}); scene = scene.split("&");
store.commit("setChatScenesInfo", Object.assign(e.query, data)); let data = {
//小程序更新 //场景值
if (uni.getUpdateManager) { scene: e.scene,
const updateManager = uni.getUpdateManager(); };
updateManager.onCheckForUpdate(function(res) { scene.forEach((item) => {
// 请求完新版本信息的回调 let arr = item.split("=");
// console.log(res.hasUpdate); if (arr.length == 2) {
}); data[arr[0]] = arr[1];
updateManager.onUpdateReady(function(res) { }
uni.showModal({ });
title: "更新提示", store.commit("setChatScenesInfo", Object.assign(e.query, data));
content: "新版本已经准备好,是否重启应用?", //小程序更新
success(res) { if (uni.getUpdateManager) {
if (res.confirm) { const updateManager = uni.getUpdateManager();
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 updateManager.onCheckForUpdate(function (res) {
updateManager.applyUpdate(); // 请求完新版本信息的回调
} // console.log(res.hasUpdate);
}, });
}); updateManager.onUpdateReady(function (res) {
}); uni.showModal({
updateManager.onUpdateFailed(function(res) { title: "更新提示",
// 新的版本下载失败 content: "新版本已经准备好,是否重启应用?",
uni.showModal({ success(res) {
title: "已经有新版本了哟~", if (res.confirm) {
content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~", // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
showCancel: false, updateManager.applyUpdate();
}); }
}); },
} });
// #endif });
}, updateManager.onUpdateFailed(function (res) {
onHide: function() {}, // 新的版本下载失败
destroyed() { uni.showModal({
store.commit("setUserInfo", { title: "已经有新版本了哟~",
playFlag: true, content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~",
}); showCancel: false,
console.log("页面销毁"); });
}, });
methods: {}, }
}; // #endif
},
onHide: function () {},
destroyed() {
store.commit("setUserInfo", {
playFlag: true,
});
console.log("页面销毁");
},
methods: {},
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import "@/uni_modules/uview-ui/index.scss"; @import "@/uni_modules/uview-ui/index.scss";
@import "@/uni_modules/uni-scss/index.scss"; @import "@/uni_modules/uni-scss/index.scss";
/* uni.css - 通用组件、模板样式库可以当作一套ui库应用 */ /* uni.css - 通用组件、模板样式库可以当作一套ui库应用 */
@import "./common/uni.css"; @import "./common/uni.css";
@import "@/static/customicons.css"; @import "@/static/customicons.css";
@import "@/style/common.scss"; @import "@/style/common.scss";
@import "uview-ui/index.scss"; @import "uview-ui/index.scss";
@import "./style/input.scss";
@import "./style/table.scss";
page {
height: 100%;
background-color: #fff;
}
@import "./style/input.scss"; /* #ifdef H5 */
@import "./style/table.scss"; //修复H5底部导航挡住内容bug
uni-app {
height: auto;
}
page { .commonPage,
height: 100%; .commonPageBox {
background-color: #fff; height: calc(100vh - 50px);
} }
/*每个页面公共css */
@font-face {
font-family: "iconfont";
/* project id 1997429 */
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot");
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot?#iefix")
format("embedded-opentype"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff2")
format("woff2"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff") format("woff"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.ttf")
format("truetype"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.svg#iconfont")
format("svg");
}
.iconfont {
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
/* #ifdef H5 */ //修复H5输入框上下不居中bug
//修复H5底部导航挡住内容bug .uni-input-form {
uni-app { height: 100%;
height: auto; }
}
.commonPage, //去除地图上高德地图标识符
.commonPageBox { .amap-copyright {
height: calc(100vh - 50px); display: none !important;
}
} .amap-logo {
display: none !important;
}
/*每个页面公共css */ .amap-ui-control-zoom {
@font-face { width: 60upx !important;
font-family: "iconfont"; }
/* project id 1997429 */
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot");
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot?#iefix") format("embedded-opentype"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff2") format("woff2"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff") format("woff"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.ttf") format("truetype"),
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.svg#iconfont") format("svg");
}
.iconfont { .amap-ui-control-zoom > * {
font-family: "iconfont" !important; width: 60upx !important;
font-style: normal; height: 60upx !important;
-webkit-font-smoothing: antialiased; line-height: 60upx !important;
-webkit-text-stroke-width: 0.2px; }
-moz-osx-font-smoothing: grayscale;
}
//修复H5输入框上下不居中bug .amap-ui-control-theme-dark {
.uni-input-form { display: none !important;
height: 100%; }
}
//去除地图上高德地图标识符 //设置圆角
.amap-copyright { checkbox.round .wx-checkbox-input,
display: none !important; checkbox.round .uni-checkbox-input {
} border-radius: 100upx;
}
.amap-logo { //设置背景色
display: none !important; checkbox.checkedItem[checked] .wx-checkbox-input,
} checkbox.checkedItem .uni-checkbox-input-checked {
background-color: #e5a000 !important;
border-color: #e5a000 !important;
color: #ffffff !important;
}
.amap-ui-control-zoom { /* #endif */
width: 60upx !important;
}
.amap-ui-control-zoom>* {
width: 60upx !important;
height: 60upx !important;
line-height: 60upx !important;
}
.amap-ui-control-theme-dark {
display: none !important;
}
//设置圆角
checkbox.round .wx-checkbox-input,
checkbox.round .uni-checkbox-input {
border-radius: 100upx;
}
//设置背景色
checkbox.checkedItem[checked] .wx-checkbox-input,
checkbox.checkedItem .uni-checkbox-input-checked {
background-color: #e5a000 !important;
border-color: #e5a000 !important;
color: #ffffff !important;
}
/* #endif */
</style> </style>

View File

@@ -10,8 +10,8 @@
"sizes": "分辨率192x192", "sizes": "分辨率192x192",
"src": "图片路径" "src": "图片路径"
}], }],
"versionName": "1.0.36", "versionName": "1.0.39",
"versionCode": 1036, "versionCode": 1039,
"app-plus": { "app-plus": {
"nvueCompiler": "weex", "nvueCompiler": "weex",
"compatible": { "compatible": {

View File

@@ -1,5 +1,8 @@
<template> <template>
<view class="container commonPageBox commonDetailPage" style="background-color: #f6f7fb"> <view
class="container commonPageBox commonDetailPage"
style="background-color: #f6f7fb"
>
<!-- 公共组件-每个页面必须引入 --> <!-- 公共组件-每个页面必须引入 -->
<public-module></public-module> <public-module></public-module>
<z-nav-bar title="订单详情" bgColor="#258feb" fontColor="#fff"> </z-nav-bar> <z-nav-bar title="订单详情" bgColor="#258feb" fontColor="#fff"> </z-nav-bar>
@@ -166,23 +169,23 @@
<br clear="both" /> <br clear="both" />
</view> </view>
<view class="orderContent" v-if="orderContet.orderType == 'relearn'"> <view class="orderContent" v-if="orderContet.orderType == 'relearn'">
<image <image
src="/static/icon/fugou.png" src="/static/icon/fugou.png"
mode="aspectFill" mode="aspectFill"
style="width: 100rpx; height: 100rpx" style="width: 100rpx; height: 100rpx"
></image> ></image>
<view class="itemJian"> <view class="itemJian">
<view class="orderTitle" style="line-height: 100rpx"> <view class="orderTitle" style="line-height: 100rpx">
<text>{{ orderContet.remark }}</text> <text>{{ orderContet.remark }}</text>
</view> </view>
<view class="orderPrice"> <view class="orderPrice">
<text style="font-weight: bold"></text> <text style="font-weight: bold"></text>
</view> </view>
<br clear="both" /> <br clear="both" />
</view> </view>
<br clear="both" /> <br clear="both" />
</view> </view>
<view class="orderContent" v-if="orderContet.orderType == 'vip'"> <view class="orderContent" v-if="orderContet.orderType == 'vip'">
<image <image
src="/static/icon/vip.png" src="/static/icon/vip.png"
@@ -226,20 +229,27 @@
<span style="color: #666; margin-right: 10rpx; float: left" <span style="color: #666; margin-right: 10rpx; float: left"
>商品总价 : >商品总价 :
</span> </span>
<span>¥</span>{{ orderContet.orderMoney }}
<span v-if="orderContet.orderType == 'point'"
>¥ {{ orderContet.bookBuyConfigEntity.realMoney }}</span
>
<span v-else>¥ {{ orderContet.orderMoney }}</span>
</view> </view>
<view class="orderReal" v-if="orderContet.orderType == 'order'"> <view class="orderReal" v-if="orderContet.orderType == 'order'">
<span style="color: #666; margin-right: 10rpx; float: left" <span style="color: #666; margin-right: 10rpx; float: left"
>运费 : >运费 :
</span> </span>
<span>¥</span>{{ orderContet.shippingMoney }} <span>¥</span>{{ orderContet.shippingMoney }}
</view>
<view
class="orderReal"
v-if="orderContet.couponId && orderContet.couponId != null"
>
<span style="color: #666; margin-right: 10rpx; float: left"
>优惠券 :
</span>
<span>- ¥</span>{{ orderContet.couponAmount }}
</view> </view>
<view class="orderReal" v-if="orderContet.couponId && orderContet.couponId != null">
<span style="color: #666; margin-right: 10rpx; float: left"
>优惠券 :
</span>
<span>- ¥</span>{{ orderContet.couponAmount }}
</view>
<view class="orderReal" v-if="orderContet.orderType == 'order'"> <view class="orderReal" v-if="orderContet.orderType == 'order'">
<span style="color: #666; margin-right: 10rpx; float: left" <span style="color: #666; margin-right: 10rpx; float: left"
>积分 : >积分 :
@@ -260,6 +270,9 @@
<span style="color: #666; margin-right: 10rpx; float: left" <span style="color: #666; margin-right: 10rpx; float: left"
>实付款 : >实付款 :
</span> </span>
<b v-if="orderContet.orderType == 'point'" style="color: #dd3c0c"
>¥ {{ orderContet.bookBuyConfigEntity.realMoney }}</b
>
<b style="color: #dd3c0c" <b style="color: #dd3c0c"
><span>¥</span>{{ orderContet.realMoney }}</b ><span>¥</span>{{ orderContet.realMoney }}</b
> >
@@ -309,11 +322,14 @@
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span> <span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text> <text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
</view> --> </view> -->
</view> </view>
<view class="" style="text-align: center; width: 100%;"> <view class="" style="text-align: center; width: 100%">
<text @click="gotoWorkOrder" style="color: cadetblue; font-size: 26rpx;">订单有问题?去申诉</text> <text
</view> @click="gotoWorkOrder"
style="color: cadetblue; font-size: 26rpx"
>订单有问题?去申诉</text
>
</view>
</view> </view>
</view> </view>
<view class="goods_nav_box"> <view class="goods_nav_box">
@@ -331,8 +347,10 @@
> >
<text class="price" <text class="price"
>合计: >合计:
<text class="total" v-if="orderContet.orderType == 'point'">
<text class="total">¥{{ orderContet.realMoney }}</text> ¥ {{ orderContet.bookBuyConfigEntity.realMoney }}
</text>
<text class="total" v-else>¥{{ orderContet.realMoney }}</text>
</text> </text>
</view> </view>
</template> </template>
@@ -481,6 +499,68 @@ import { mapState } from "vuex";
export default { export default {
data() { data() {
return { return {
A: {
orderId: 15316,
orderSn: "20241209141541253186600376645070",
userId: 13487,
userName: null,
statusNum: null,
shippingUser: null,
userPhone: "18834844847",
province: null,
city: null,
district: null,
address: null,
come: 2,
paymentMethod: "3",
orderMoney: 39,
districtMoney: 0,
realMoney: 39,
shippingMoney: null,
shippingCompName: null,
shippingSn: null,
jfDeduction: 0,
createTime: "2024-12-09 14:15:41",
shippingTime: null,
orderStatus: "0",
successTime: null,
couponId: null,
couponName: null,
delFlag: 0,
products: null,
productList: null,
buyType: null,
orderType: "point",
expNo: null,
isSend: null,
vipBuyConfigId: 0,
addressId: null,
remark: null,
orderCode: null,
paymentDate: null,
productId: "21",
recordId: null,
timestamp: null,
user: null,
expressList: null,
addressModified: 0,
consigneeVo: null,
appName: null,
bookBuyConfigEntity: {
priceTypeId: 21,
type: "point",
qudao: "IOS",
realMoney: "45",
money: "39",
givejf: "0",
month: null,
description: "",
effective: 0,
startTime: null,
endTime: null,
},
vipBuyConfigEntity: null,
},
iconList: [ iconList: [
{ {
text: "联系客服", text: "联系客服",
@@ -562,11 +642,11 @@ export default {
}, },
methods: { methods: {
gotoWorkOrder(){ gotoWorkOrder() {
uni.navigateTo({ uni.navigateTo({
url:`/pages/user/workOrder?name=order` url: `/pages/user/workOrder?name=order`,
}) });
}, },
async goBuyJie(data) { async goBuyJie(data) {
console.log("index at line 532:", data); console.log("index at line 532:", data);
if (data.text == "继续付款") { if (data.text == "继续付款") {
@@ -911,28 +991,29 @@ export default {
orderTabCLi(e) { orderTabCLi(e) {
this.orderListTab = e; this.orderListTab = e;
}, },
async getCouponDetail(id){ async getCouponDetail(id) {
await this.$http await this.$http
.request({ .request({
url: "common/coupon/getCouponHistoryInfo", url: "common/coupon/getCouponHistoryInfo",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档 method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: { data: {
id id,
}, },
header: { header: {
//默认 无 说明:请求头 //默认 无 说明:请求头
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
}) })
.then(async (res) => { .then(async (res) => {
if(res.code != 0) return this.$commonJS.showToast(res.errMsg); if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
this.orderContet.couponAmount = res.couponHistory.couponEntity.couponAmount this.orderContet.couponAmount =
res.couponHistory.couponEntity.couponAmount;
}).catch(e => { })
console.log(e); .catch((e) => {
this.$commonJS.showToast(e.errMsg); console.log(e);
}) this.$commonJS.showToast(e.errMsg);
}, });
},
// 获取订单详情 // 获取订单详情
async getOrderList() { async getOrderList() {
console.log("this.orderType", this.orderType); console.log("this.orderType", this.orderType);
@@ -955,10 +1036,10 @@ export default {
this.orderContet = res.data.buyOrder; this.orderContet = res.data.buyOrder;
this.goodsList = res.data.productInfo; this.goodsList = res.data.productInfo;
this.consigneeShow = true; this.consigneeShow = true;
// 存在优惠券信息,就查询优惠券集体金额 // 存在优惠券信息,就查询优惠券集体金额
if(this.orderContet.couponId && this.orderContet.couponId != null){ if (this.orderContet.couponId && this.orderContet.couponId != null) {
await this.getCouponDetail(this.orderContet.couponId) await this.getCouponDetail(this.orderContet.couponId);
} }
if ( if (
this.orderContet.orderStatus == 2 && this.orderContet.orderStatus == 2 &&
this.sheetList.length > 0 && this.sheetList.length > 0 &&
@@ -980,7 +1061,10 @@ export default {
color: "#fff", color: "#fff",
}); });
} }
if (this.orderContet.orderStatus == 0 && this.orderContet.paymentMethod != 3) { if (
this.orderContet.orderStatus == 0 &&
this.orderContet.paymentMethod != 3
) {
this.customButton.push({ this.customButton.push({
width: "160rpx", width: "160rpx",
text: "继续付款", text: "继续付款",
@@ -1128,10 +1212,10 @@ export default {
// 苹果充值 // 苹果充值
console.log("苹果二次支付"); console.log("苹果二次支付");
uni.showModal({ uni.showModal({
content:'apple内购订单不支持继续支付请重新发起支付申请并完成支付', content: "apple内购订单不支持继续支付请重新发起支付申请并完成支付",
confirmText:'好的', confirmText: "好的",
showCancel:false showCancel: false,
}) });
} }
}, },
@@ -1140,19 +1224,18 @@ export default {
console.log("data at line 1277:订单详情参数", data); console.log("data at line 1277:订单详情参数", data);
if (data.delFlag == -1) { if (data.delFlag == -1) {
this.$commonJS.showToast("商品已下架"); this.$commonJS.showToast("商品已下架");
}else if(data.goodsType == '05'){ } else if (data.goodsType == "05") {
if(data.courseIds && data.courseIds.length > 0){ if (data.courseIds && data.courseIds.length > 0) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/course/courseDetail?id=${data.courseIds[0].courseId}`, url: `/pages/course/courseDetail?id=${data.courseIds[0].courseId}`,
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title: "课程数据出错", title: "课程数据出错",
icon: "none" icon: "none",
}); });
} }
} else {
} else {
uni.navigateTo({ uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id // url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/goods/index/index?navTitle=''&title=''&id=${id}`, url: `/pages/goods/index/index?navTitle=''&title=''&id=${id}`,

View File

@@ -219,12 +219,18 @@
font-weight: 700; font-weight: 700;
"> ">
<text style="font-size: 20rpx"></text> <text style="font-size: 20rpx"></text>
<text v-if="slotProps.row.orderType == 'point'">
{{ slotProps.row.bookBuyConfigEntity.realMoney }}
</text>
<text v-else>
{{ {{
slotProps.row.realMoney || slotProps.row.realMoney ||
slotProps.row.realMoney == 0 slotProps.row.realMoney == 0
? slotProps.row.realMoney ? slotProps.row.realMoney
: "" : ""
}} }}
</text>
</view> </view>
</view> </view>
</view> </view>

View File

@@ -281,7 +281,7 @@
}, },
// 存储本地播放时间 // 存储本地播放时间
recordTime(data) { recordTime(data) {
console.log('recordTime', data.time); // console.log('recordTime', data.time);
this.currentTime = data.time; this.currentTime = data.time;
var list = []; var list = [];

View File

@@ -150,7 +150,11 @@
</u-upload> </u-upload>
</view> </view>
</view> </view>
<view class="btn_box"><button @click="onSubmit"> </button></view>
<view class="btn_box">
<button @click="onSubmit" v-if="isClick"> </button>
<button v-else style="opacity: 0.6;"> </button>
</view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
@@ -187,6 +191,7 @@
}, },
data() { data() {
return { return {
isClick:true,
classList:[], // 进行中的小班 classList:[], // 进行中的小班
isInClass:false, // 是否加入了班级 isInClass:false, // 是否加入了班级
showEditBlank: false, showEditBlank: false,
@@ -349,6 +354,7 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
onShow() { onShow() {
this.isClick=true;
// #endif // #endif
this.getClassList() this.getClassList()
}, },
@@ -383,6 +389,7 @@
} }
// 赋值给编辑器 // 赋值给编辑器
this.onEditorReady() this.onEditorReady()
this.isClick=true
this.showEditBlank = true this.showEditBlank = true
}, },
gotoClass(item){ gotoClass(item){
@@ -499,7 +506,9 @@
} }
this.answerForm.display = e.detail.value this.answerForm.display = e.detail.value
}, },
async onSubmit() { async onSubmit() { if(!this.isClick){
return false
}
debounce(async () => { debounce(async () => {
let data = await this.getHtml(); let data = await this.getHtml();
var _data = data.html.replace(/<.*?>/g, "") var _data = data.html.replace(/<.*?>/g, "")
@@ -535,6 +544,7 @@
} }
console.log('提交的data', data1); console.log('提交的data', data1);
this.isClick=false;
$http.request({ $http.request({
url: _url, url: _url,
method: "POST", method: "POST",
@@ -550,6 +560,7 @@
}) })
this.fileList1 = [] this.fileList1 = []
setTimeout(() => { setTimeout(() => {
this.isClick=true;
this.getMyQuestAnswer(this.curriculumData.id) this.getMyQuestAnswer(this.curriculumData.id)
this.closePup() this.closePup()
// this.pPage = 0 // this.pPage = 0
@@ -558,6 +569,7 @@
// this.getZuoyeList() // this.getZuoyeList()
}, 200) }, 200)
}).catch(e => { }).catch(e => {
this.isClick=true;
uni.showToast({ uni.showToast({
title: '操作失败', title: '操作失败',
icon: 'error' icon: 'error'