2023-12-19

This commit is contained in:
2023-12-19 14:59:13 +08:00
parent e59ba641d0
commit 9127353be4
4 changed files with 22 additions and 10 deletions

View File

@@ -97,17 +97,16 @@
this.$router.push({
path: '/index'
})
this.loading = false
this.loading = true
// this.getUserInfo(response.data.loginId)
window.sessionStorage.setItem('tokenName', response.data.tokenName)
window.sessionStorage.setItem('tokenValue', response.data.tokenValue)
}
}).catch(() => {
this.loading = false
this.loading = true
})
this.loading = true
},
getUserInfo(id) {
getUserById(id).then((response) => {

View File

@@ -245,8 +245,8 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const index = this.formobj.goods.filter((item) => item.sid === sid)
const index = this.formobj.goods.findIndex((item) => item.goodsSid === sid)
console.log("index》》》》", index)
this.formobj.goods.splice(index, 1)
})
},
@@ -335,9 +335,11 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
this.submitdisabled = true
req.saveGiftBag(this.formobj)
.then(resp => {
if (resp.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
@@ -345,10 +347,13 @@
})
this.handleReturn('true')
} else {
this.submitdisabled = false
// 根据resp.code进行异常情况处理
}
})
.catch(() => {})
.catch(() => {
this.submitdisabled = false
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')

View File

@@ -155,9 +155,11 @@
<div
style="width: 100%;display: flex;flex-direction: row;justify-content: center;margin-top: 20px;">
<span
<!-- <span
style="background: #018AD2; color: #fff;padding: 5px 15px;border-radius: 5px;font-size: 16px;"
@click="saveOrUpdate">发行</span>
@click="saveOrUpdate">发行</span> -->
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">发行</el-button>
</div>
@@ -265,6 +267,7 @@
data() {
return {
viewState: 1,
submitdisabled:false,
page: {
total: 0, // 默认数据总数
current: 1, // 默认开始页面
@@ -497,9 +500,11 @@
},
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
this.submitdisabled = true
req.generateCard(this.formobj)
.then(resp => {
if (resp.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
@@ -507,10 +512,13 @@
})
this.handleReturn('true')
} else {
this.submitdisabled = false
// 根据resp.code进行异常情况处理
}
})
.catch(() => {})
.catch(() => {
this.submitdisabled = false
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')