fix: include system origin in rocket config requests
This commit is contained in:
parent
d028ed7b90
commit
2856f3488a
@ -200,6 +200,7 @@
|
||||
|
||||
<script>
|
||||
import { listRocketConfigs, updateRocketConfig } from '@/api/rocket-config'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
const createEmptyReward = () => ({
|
||||
type: 'GOLD',
|
||||
@ -254,6 +255,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissionsFirstSysOrigin']),
|
||||
rewardTypes() {
|
||||
return [
|
||||
{ value: 'GOLD', label: this.$t('pages.rocketConfig.types.gold') },
|
||||
@ -264,12 +266,16 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!this.permissionsFirstSysOrigin) {
|
||||
return
|
||||
}
|
||||
this.loadConfigs()
|
||||
},
|
||||
methods: {
|
||||
loadConfigs() {
|
||||
this.listLoading = true
|
||||
listRocketConfigs().then(response => {
|
||||
// AppExtCommand 要求携带当前账号有权限的系统来源,否则后端无法构造 reqSysOrigin。
|
||||
listRocketConfigs({ sysOrigin: this.permissionsFirstSysOrigin.value }).then(response => {
|
||||
this.configList = response.body || []
|
||||
}).finally(() => {
|
||||
this.listLoading = false
|
||||
@ -334,6 +340,8 @@ export default {
|
||||
// 仅提交服务端当前真正生效的配置,未使用字段继续保留数据库原值。
|
||||
const payload = {
|
||||
id: this.form.id,
|
||||
// 更新接口同样继承 AppExtCommand,保存时必须携带系统来源。
|
||||
sysOrigin: this.permissionsFirstSysOrigin.value,
|
||||
maxEnergy: this.form.maxEnergy,
|
||||
status: this.form.status,
|
||||
rewardConfig: this.form.rewardConfig.map(item => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user