Browse Source

金币退款重复点击

youhua/chongzhi
ZhangYong 2 months ago
parent
commit
eeae43fcb1
  1. 4
      .env.development
  2. 7
      src/views/refund/gold/addCoinRefund.vue

4
.env.development

@ -1,4 +1,4 @@
VITE_API_BASE='https://hwjb.homilychart.com/dev/admin'
# VITE_API_BASE='https://hwjb.homilychart.com/dev/admin'
# 测试环境 # 测试环境
# VITE_API_BASE='http://54.255.212.181:10704/' # VITE_API_BASE='http://54.255.212.181:10704/'
# 正式环境 # 正式环境
@ -11,6 +11,6 @@ VITE_UPLOAD_URL=http://39.101.133.168:8828/hljw/api/aws/upload
# zhangyong # zhangyong
# VITE_API_BASE='http://192.168.3.83:8081/' # VITE_API_BASE='http://192.168.3.83:8081/'
# 本地 # 本地
# VITE_API_BASE='http://localhost:8081/'
VITE_API_BASE='http://localhost:8081/'
# sunjiabei # sunjiabei
# VITE_API_BASE='http://192.168.0.113:8081/' # VITE_API_BASE='http://192.168.0.113:8081/'

7
src/views/refund/gold/addCoinRefund.vue

@ -81,12 +81,13 @@ const add = async function () {
taskGold: (Number(addRefund.value.taskGold) || 0) * 100, taskGold: (Number(addRefund.value.taskGold) || 0) * 100,
sumGold: (Number(addRefund.value.sumGold) || 0) * 100 sumGold: (Number(addRefund.value.sumGold) || 0) * 100
} }
addDisabled.value = true
// POST // POST
const result = await API({ const result = await API({
url: '/refund/add', url: '/refund/add',
data: processedRefund data: processedRefund
}) })
addDisabled.value = false
if (result.code === 0) { if (result.code === 0) {
ElMessage.error(result.msg) ElMessage.error(result.msg)
return return
@ -100,6 +101,8 @@ const add = async function () {
// //
} }
} }
//
const addDisabled = ref(false)
// 退 // 退
const addBefore = () => { const addBefore = () => {
@ -499,7 +502,7 @@ onMounted(async function () {
</div> </div>
<el-button type="success" @click="cancel()" style="margin-left: 200px">重置</el-button> <el-button type="success" @click="cancel()" style="margin-left: 200px">重置</el-button>
<el-button type="primary" @click="addBefore"> 提交</el-button>
<el-button type="primary" :disabled="addDisabled" @click="addBefore"> 提交</el-button>
</el-form> </el-form>
<!-- 客户信息栏 --> <!-- 客户信息栏 -->

Loading…
Cancel
Save