Browse Source

新增活动防止多次点击重复调用

Hongxilin
hongxilin 5 months ago
parent
commit
3f4d2ab566
  1. 2
      vue/gold-system/README.md
  2. 1
      vue/gold-system/package-lock.json
  3. 1
      vue/gold-system/package.json
  4. 4
      vue/gold-system/src/views/managerecharge/activity.vue

2
vue/gold-system/README.md

@ -27,3 +27,5 @@ npm install mathjs 安装mathjs组件,解决数据计算问题
npm install xlsx 安装xlsx组件,解决excel文件读取问题 npm install xlsx 安装xlsx组件,解决excel文件读取问题
npm install vue-json-excel 安装导出 excel 组件 npm install vue-json-excel 安装导出 excel 组件
npm install lodash 安装lodash组件,解决数据处理问题

1
vue/gold-system/package-lock.json

@ -12,6 +12,7 @@
"axios": "^1.7.8", "axios": "^1.7.8",
"echarts": "^5.5.1", "echarts": "^5.5.1",
"element-plus": "^2.8.8", "element-plus": "^2.8.8",
"lodash": "^4.17.21",
"mathjs": "^14.0.1", "mathjs": "^14.0.1",
"moment": "^2.30.1", "moment": "^2.30.1",
"vue": "^3.5.12", "vue": "^3.5.12",

1
vue/gold-system/package.json

@ -14,6 +14,7 @@
"axios": "^1.7.8", "axios": "^1.7.8",
"echarts": "^5.5.1", "echarts": "^5.5.1",
"element-plus": "^2.8.8", "element-plus": "^2.8.8",
"lodash": "^4.17.21",
"mathjs": "^14.0.1", "mathjs": "^14.0.1",
"moment": "^2.30.1", "moment": "^2.30.1",
"vue": "^3.5.12", "vue": "^3.5.12",

4
vue/gold-system/src/views/managerecharge/activity.vue

@ -5,6 +5,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
import axios from "axios"; import axios from "axios";
import moment from "moment"; import moment from "moment";
import API from "../../api/index.js"; import API from "../../api/index.js";
import _ from 'lodash';
// //
const adminData = ref({}); const adminData = ref({});
@ -165,6 +166,7 @@ const add = async function () {
} }
}); });
}; };
const throttledAdd = _.throttle(add, 5000);
// ========================================================= // =========================================================
// //
const del = function (row) { const del = function (row) {
@ -510,7 +512,7 @@ onMounted(async function () {
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="closeAddActivityVisible">取消</el-button> <el-button @click="closeAddActivityVisible">取消</el-button>
<el-button type="primary" @click="add()"> 提交 </el-button>
<el-button type="primary" @click="throttledAdd()"> 提交 </el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>

Loading…
Cancel
Save