同步协议代码
This commit is contained in:
parent
0c3cf4b7a1
commit
f10707b45d
52
package-lock.json
generated
52
package-lock.json
generated
@ -16,7 +16,9 @@
|
|||||||
"protobufjs": "^6.11.3",
|
"protobufjs": "^6.11.3",
|
||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"vue": "^3.2.13",
|
"vue": "^3.2.13",
|
||||||
|
"vue-json-editor": "^1.4.3",
|
||||||
"vue-router": "^4.0.3",
|
"vue-router": "^4.0.3",
|
||||||
|
"vue3-json-editor": "^1.1.5",
|
||||||
"vuetify": "npm:@vuetify/nightly@next",
|
"vuetify": "npm:@vuetify/nightly@next",
|
||||||
"vuex": "^4.0.0",
|
"vuex": "^4.0.0",
|
||||||
"vuex-persistedstate": "^4.1.0",
|
"vuex-persistedstate": "^4.1.0",
|
||||||
@ -11645,6 +11647,23 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-json-editor": {
|
||||||
|
"version": "1.4.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-json-editor/-/vue-json-editor-1.4.3.tgz",
|
||||||
|
"integrity": "sha512-st9HdXBgCnyEmmfWrZQiKzp4KuYXzmYVUNDn5h6Fa18MrrGS1amnyUFyv7hQFsNBDW27B7BKkdGOqszYT1srAg==",
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "^2.2.6"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 4.0.0",
|
||||||
|
"npm": ">= 3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/vue-json-editor/node_modules/vue": {
|
||||||
|
"version": "2.6.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
|
||||||
|
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
|
||||||
|
},
|
||||||
"node_modules/vue-loader": {
|
"node_modules/vue-loader": {
|
||||||
"version": "17.0.0",
|
"version": "17.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.0.0.tgz",
|
||||||
@ -11791,6 +11810,15 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/vue3-json-editor": {
|
||||||
|
"version": "1.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue3-json-editor/-/vue3-json-editor-1.1.5.tgz",
|
||||||
|
"integrity": "sha512-p+hbl5SdMifA9brPt9TsG2HYB7Xy7xy98b61zcIusVpwhGtS5a0IwWPKM7BXcj9poIdc/bPs4AFchQOHIBq++w==",
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": "^3.21.1",
|
||||||
|
"vue": "^3.2.31"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vuetify": {
|
"node_modules/vuetify": {
|
||||||
"name": "@vuetify/nightly",
|
"name": "@vuetify/nightly",
|
||||||
"version": "3.0.0-next-20220621.0",
|
"version": "3.0.0-next-20220621.0",
|
||||||
@ -20694,6 +20722,21 @@
|
|||||||
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"vue-json-editor": {
|
||||||
|
"version": "1.4.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-json-editor/-/vue-json-editor-1.4.3.tgz",
|
||||||
|
"integrity": "sha512-st9HdXBgCnyEmmfWrZQiKzp4KuYXzmYVUNDn5h6Fa18MrrGS1amnyUFyv7hQFsNBDW27B7BKkdGOqszYT1srAg==",
|
||||||
|
"requires": {
|
||||||
|
"vue": "^2.2.6"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vue": {
|
||||||
|
"version": "2.6.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
|
||||||
|
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"vue-loader": {
|
"vue-loader": {
|
||||||
"version": "17.0.0",
|
"version": "17.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.0.0.tgz",
|
||||||
@ -20799,6 +20842,15 @@
|
|||||||
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"vue3-json-editor": {
|
||||||
|
"version": "1.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue3-json-editor/-/vue3-json-editor-1.1.5.tgz",
|
||||||
|
"integrity": "sha512-p+hbl5SdMifA9brPt9TsG2HYB7Xy7xy98b61zcIusVpwhGtS5a0IwWPKM7BXcj9poIdc/bPs4AFchQOHIBq++w==",
|
||||||
|
"requires": {
|
||||||
|
"core-js": "^3.21.1",
|
||||||
|
"vue": "^3.2.31"
|
||||||
|
}
|
||||||
|
},
|
||||||
"vuetify": {
|
"vuetify": {
|
||||||
"version": "npm:@vuetify/nightly@3.0.0-next-20220621.0",
|
"version": "npm:@vuetify/nightly@3.0.0-next-20220621.0",
|
||||||
"resolved": "https://registry.npmmirror.com/@vuetify/nightly/-/nightly-3.0.0-next-20220621.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@vuetify/nightly/-/nightly-3.0.0-next-20220621.0.tgz",
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
"protobufjs": "^6.11.3",
|
"protobufjs": "^6.11.3",
|
||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"vue": "^3.2.13",
|
"vue": "^3.2.13",
|
||||||
|
"vue-json-editor": "^1.4.3",
|
||||||
"vue-router": "^4.0.3",
|
"vue-router": "^4.0.3",
|
||||||
|
"vue3-json-editor": "^1.1.5",
|
||||||
"vuetify": "npm:@vuetify/nightly@next",
|
"vuetify": "npm:@vuetify/nightly@next",
|
||||||
"vuex": "^4.0.0",
|
"vuex": "^4.0.0",
|
||||||
"vuex-persistedstate": "^4.1.0",
|
"vuex-persistedstate": "^4.1.0",
|
||||||
|
748
src/pb/proto.js
748
src/pb/proto.js
@ -364,7 +364,13 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
EquipmentEquipResp: {
|
EquipmentEquipResp: {
|
||||||
fields: {}
|
fields: {
|
||||||
|
Equipments: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "DB_Equipment",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
EquipmentUpgradeReq: {
|
EquipmentUpgradeReq: {
|
||||||
fields: {
|
fields: {
|
||||||
@ -375,7 +381,17 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
EquipmentUpgradeResp: {
|
EquipmentUpgradeResp: {
|
||||||
fields: {}
|
fields: {
|
||||||
|
IsSucc: {
|
||||||
|
type: "bool",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
Equipment: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "DB_Equipment",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
DBFriend: {
|
DBFriend: {
|
||||||
fields: {
|
fields: {
|
||||||
@ -658,373 +674,371 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pb: {
|
SkillData: {
|
||||||
nested: {
|
fields: {
|
||||||
SkillData: {
|
skillID: {
|
||||||
fields: {
|
type: "int32",
|
||||||
skillID: {
|
id: 1
|
||||||
type: "int32",
|
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
skillLv: {
|
|
||||||
type: "int32",
|
|
||||||
id: 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
DBHero: {
|
skillLv: {
|
||||||
fields: {
|
type: "int32",
|
||||||
id: {
|
id: 2
|
||||||
type: "string",
|
}
|
||||||
id: 1
|
}
|
||||||
},
|
},
|
||||||
uid: {
|
DBHero: {
|
||||||
type: "string",
|
fields: {
|
||||||
id: 2
|
id: {
|
||||||
},
|
type: "string",
|
||||||
heroID: {
|
id: 1
|
||||||
type: "int32",
|
|
||||||
id: 3
|
|
||||||
},
|
|
||||||
star: {
|
|
||||||
type: "int32",
|
|
||||||
id: 4
|
|
||||||
},
|
|
||||||
lv: {
|
|
||||||
type: "int32",
|
|
||||||
id: 5
|
|
||||||
},
|
|
||||||
exp: {
|
|
||||||
type: "int32",
|
|
||||||
id: 6
|
|
||||||
},
|
|
||||||
juexingLv: {
|
|
||||||
type: "int32",
|
|
||||||
id: 7
|
|
||||||
},
|
|
||||||
captainSkill: {
|
|
||||||
type: "int32",
|
|
||||||
id: 8
|
|
||||||
},
|
|
||||||
normalSkill: {
|
|
||||||
rule: "repeated",
|
|
||||||
type: "SkillData",
|
|
||||||
id: 9
|
|
||||||
},
|
|
||||||
property: {
|
|
||||||
keyType: "int32",
|
|
||||||
type: "int32",
|
|
||||||
id: 10
|
|
||||||
},
|
|
||||||
addProperty: {
|
|
||||||
keyType: "int32",
|
|
||||||
type: "int32",
|
|
||||||
id: 11
|
|
||||||
},
|
|
||||||
formation: {
|
|
||||||
type: "int32",
|
|
||||||
id: 12
|
|
||||||
},
|
|
||||||
cardType: {
|
|
||||||
type: "int32",
|
|
||||||
id: 13
|
|
||||||
},
|
|
||||||
curSkin: {
|
|
||||||
type: "int32",
|
|
||||||
id: 14
|
|
||||||
},
|
|
||||||
skins: {
|
|
||||||
rule: "repeated",
|
|
||||||
type: "int32",
|
|
||||||
id: 15
|
|
||||||
},
|
|
||||||
block: {
|
|
||||||
type: "bool",
|
|
||||||
id: 16
|
|
||||||
},
|
|
||||||
equipID: {
|
|
||||||
rule: "repeated",
|
|
||||||
type: "string",
|
|
||||||
id: 17
|
|
||||||
},
|
|
||||||
resonateNum: {
|
|
||||||
type: "int32",
|
|
||||||
id: 18
|
|
||||||
},
|
|
||||||
distributionResonate: {
|
|
||||||
type: "int32",
|
|
||||||
id: 19
|
|
||||||
},
|
|
||||||
energy: {
|
|
||||||
keyType: "int32",
|
|
||||||
type: "int32",
|
|
||||||
id: 20
|
|
||||||
},
|
|
||||||
sameCount: {
|
|
||||||
type: "int32",
|
|
||||||
id: 21
|
|
||||||
},
|
|
||||||
suiteId: {
|
|
||||||
type: "int32",
|
|
||||||
id: 22
|
|
||||||
},
|
|
||||||
suiteExtId: {
|
|
||||||
type: "int32",
|
|
||||||
id: 23
|
|
||||||
},
|
|
||||||
isOverlying: {
|
|
||||||
type: "bool",
|
|
||||||
id: 24
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroInfoReq: {
|
uid: {
|
||||||
fields: {
|
type: "string",
|
||||||
heroId: {
|
id: 2
|
||||||
type: "string",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroInfoRsp: {
|
heroID: {
|
||||||
fields: {
|
type: "int32",
|
||||||
base: {
|
id: 3
|
||||||
type: "DBHero",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroListReq: {
|
star: {
|
||||||
fields: {}
|
type: "int32",
|
||||||
|
id: 4
|
||||||
},
|
},
|
||||||
HeroListRsp: {
|
lv: {
|
||||||
fields: {
|
type: "int32",
|
||||||
list: {
|
id: 5
|
||||||
rule: "repeated",
|
|
||||||
type: "DBHero",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ItemData: {
|
exp: {
|
||||||
fields: {
|
type: "int32",
|
||||||
itemId: {
|
id: 6
|
||||||
type: "int32",
|
|
||||||
id: 2
|
|
||||||
},
|
|
||||||
amount: {
|
|
||||||
type: "int32",
|
|
||||||
id: 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroStrengthenUplvReq: {
|
juexingLv: {
|
||||||
fields: {
|
type: "int32",
|
||||||
heroObjID: {
|
id: 7
|
||||||
type: "string",
|
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
expCardID: {
|
|
||||||
type: "string",
|
|
||||||
id: 2
|
|
||||||
},
|
|
||||||
amount: {
|
|
||||||
type: "int32",
|
|
||||||
id: 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroStrengthenUplvResp: {
|
captainSkill: {
|
||||||
fields: {
|
type: "int32",
|
||||||
hero: {
|
id: 8
|
||||||
type: "DBHero",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
CostCardData: {
|
normalSkill: {
|
||||||
fields: {
|
rule: "repeated",
|
||||||
costCardObj: {
|
type: "SkillData",
|
||||||
type: "string",
|
id: 9
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
amount: {
|
|
||||||
type: "int32",
|
|
||||||
id: 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroStrengthenUpStarReq: {
|
property: {
|
||||||
fields: {
|
keyType: "string",
|
||||||
heroObjID: {
|
type: "int32",
|
||||||
type: "string",
|
id: 10
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
hero: {
|
|
||||||
rule: "repeated",
|
|
||||||
type: "CostCardData",
|
|
||||||
id: 2
|
|
||||||
},
|
|
||||||
heroRace: {
|
|
||||||
rule: "repeated",
|
|
||||||
type: "CostCardData",
|
|
||||||
id: 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroStrengthenUpStarResp: {
|
addProperty: {
|
||||||
fields: {
|
keyType: "string",
|
||||||
hero: {
|
type: "int32",
|
||||||
type: "DBHero",
|
id: 11
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroStrengthenUpSkillReq: {
|
formation: {
|
||||||
fields: {
|
type: "int32",
|
||||||
heroObjID: {
|
id: 12
|
||||||
type: "string",
|
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
costCardObj: {
|
|
||||||
type: "string",
|
|
||||||
id: 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroStrengthenUpSkillResp: {
|
cardType: {
|
||||||
fields: {
|
type: "int32",
|
||||||
hero: {
|
id: 13
|
||||||
type: "DBHero",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroResonanceReq: {
|
curSkin: {
|
||||||
fields: {
|
type: "int32",
|
||||||
heroObjID: {
|
id: 14
|
||||||
type: "string",
|
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
costObjID: {
|
|
||||||
type: "string",
|
|
||||||
id: 2
|
|
||||||
},
|
|
||||||
amount: {
|
|
||||||
type: "int32",
|
|
||||||
id: 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroResonanceResp: {
|
skins: {
|
||||||
fields: {
|
rule: "repeated",
|
||||||
hero: {
|
type: "int32",
|
||||||
type: "DBHero",
|
id: 15
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
energy: {
|
|
||||||
type: "int32",
|
|
||||||
id: 2
|
|
||||||
},
|
|
||||||
upStarCard: {
|
|
||||||
type: "DBHero",
|
|
||||||
id: 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroResonanceResetReq: {
|
block: {
|
||||||
fields: {
|
type: "bool",
|
||||||
heroObjID: {
|
id: 16
|
||||||
type: "string",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroResonanceResetResp: {
|
equipID: {
|
||||||
fields: {
|
rule: "repeated",
|
||||||
hero: {
|
type: "string",
|
||||||
type: "DBHero",
|
id: 17
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
energy: {
|
|
||||||
type: "int32",
|
|
||||||
id: 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroResonanceUseEnergyReq: {
|
resonateNum: {
|
||||||
fields: {
|
type: "int32",
|
||||||
heroObjID: {
|
id: 18
|
||||||
type: "string",
|
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
useEnergy: {
|
|
||||||
type: "int32",
|
|
||||||
id: 2
|
|
||||||
},
|
|
||||||
useType: {
|
|
||||||
type: "int32",
|
|
||||||
id: 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroResonanceUseEnergyResp: {
|
distributionResonate: {
|
||||||
fields: {
|
type: "int32",
|
||||||
hero: {
|
id: 19
|
||||||
type: "DBHero",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroJuexingReq: {
|
energy: {
|
||||||
fields: {
|
keyType: "int32",
|
||||||
heroObjID: {
|
type: "int32",
|
||||||
type: "string",
|
id: 20
|
||||||
id: 1
|
|
||||||
},
|
|
||||||
costItmes: {
|
|
||||||
type: "ItemData",
|
|
||||||
id: 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroJuexingResp: {
|
sameCount: {
|
||||||
fields: {
|
type: "int32",
|
||||||
hero: {
|
id: 21
|
||||||
type: "DBHero",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroChoukaReq: {
|
suiteId: {
|
||||||
fields: {}
|
type: "int32",
|
||||||
|
id: 22
|
||||||
},
|
},
|
||||||
HeroChoukaResp: {
|
suiteExtId: {
|
||||||
fields: {
|
type: "int32",
|
||||||
heroes: {
|
id: 23
|
||||||
rule: "repeated",
|
|
||||||
type: "DBHero",
|
|
||||||
id: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
HeroProperty: {
|
isOverlying: {
|
||||||
fields: {
|
type: "bool",
|
||||||
heroId: {
|
id: 24
|
||||||
type: "string",
|
}
|
||||||
id: 1
|
}
|
||||||
},
|
},
|
||||||
property: {
|
HeroInfoReq: {
|
||||||
keyType: "int32",
|
fields: {
|
||||||
type: "int32",
|
heroId: {
|
||||||
id: 2
|
type: "string",
|
||||||
},
|
id: 1
|
||||||
addProperty: {
|
}
|
||||||
keyType: "int32",
|
}
|
||||||
type: "int32",
|
},
|
||||||
id: 3
|
HeroInfoRsp: {
|
||||||
}
|
fields: {
|
||||||
}
|
base: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroListReq: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
|
HeroListRsp: {
|
||||||
|
fields: {
|
||||||
|
list: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ItemData: {
|
||||||
|
fields: {
|
||||||
|
itemId: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
amount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroStrengthenUplvReq: {
|
||||||
|
fields: {
|
||||||
|
heroObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
expCardID: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
amount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroStrengthenUplvResp: {
|
||||||
|
fields: {
|
||||||
|
hero: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CostCardData: {
|
||||||
|
fields: {
|
||||||
|
costCardObj: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
amount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroStrengthenUpStarReq: {
|
||||||
|
fields: {
|
||||||
|
heroObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
hero: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "CostCardData",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
heroRace: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "CostCardData",
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroStrengthenUpStarResp: {
|
||||||
|
fields: {
|
||||||
|
hero: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroStrengthenUpSkillReq: {
|
||||||
|
fields: {
|
||||||
|
heroObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
costCardObj: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroStrengthenUpSkillResp: {
|
||||||
|
fields: {
|
||||||
|
hero: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroResonanceReq: {
|
||||||
|
fields: {
|
||||||
|
heroObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
costObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
amount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroResonanceResp: {
|
||||||
|
fields: {
|
||||||
|
hero: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
energy: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
upStarCard: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroResonanceResetReq: {
|
||||||
|
fields: {
|
||||||
|
heroObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroResonanceResetResp: {
|
||||||
|
fields: {
|
||||||
|
hero: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
energy: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroResonanceUseEnergyReq: {
|
||||||
|
fields: {
|
||||||
|
heroObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
useEnergy: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
useType: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroResonanceUseEnergyResp: {
|
||||||
|
fields: {
|
||||||
|
hero: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroAwakenReq: {
|
||||||
|
fields: {
|
||||||
|
heroObjID: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroAwakenResp: {
|
||||||
|
fields: {
|
||||||
|
hero: {
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroChoukaReq: {
|
||||||
|
fields: {
|
||||||
|
heroIds: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "int32",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroChoukaResp: {
|
||||||
|
fields: {
|
||||||
|
heroes: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "DBHero",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HeroProperty: {
|
||||||
|
fields: {
|
||||||
|
heroId: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
property: {
|
||||||
|
keyType: "string",
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
addProperty: {
|
||||||
|
keyType: "string",
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1038,28 +1052,28 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
type: "string",
|
type: "string",
|
||||||
id: 2
|
id: 2
|
||||||
},
|
},
|
||||||
isEmpty: {
|
|
||||||
type: "bool",
|
|
||||||
id: 3
|
|
||||||
},
|
|
||||||
itemId: {
|
itemId: {
|
||||||
type: "int32",
|
type: "int32",
|
||||||
id: 4
|
id: 3
|
||||||
},
|
},
|
||||||
amount: {
|
amount: {
|
||||||
type: "uint32",
|
type: "uint32",
|
||||||
id: 5
|
id: 4
|
||||||
},
|
},
|
||||||
cTime: {
|
cTime: {
|
||||||
type: "int64",
|
type: "int64",
|
||||||
id: 6
|
id: 5
|
||||||
},
|
},
|
||||||
eTime: {
|
eTime: {
|
||||||
type: "int64",
|
type: "int64",
|
||||||
id: 7
|
id: 6
|
||||||
},
|
},
|
||||||
isNewItem: {
|
isNewItem: {
|
||||||
type: "bool",
|
type: "bool",
|
||||||
|
id: 7
|
||||||
|
},
|
||||||
|
lastopt: {
|
||||||
|
type: "int64",
|
||||||
id: 8
|
id: 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1330,6 +1344,10 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
exp: {
|
exp: {
|
||||||
type: "int32",
|
type: "int32",
|
||||||
id: 14
|
id: 14
|
||||||
|
},
|
||||||
|
created: {
|
||||||
|
type: "bool",
|
||||||
|
id: 15
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1395,6 +1413,30 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
},
|
},
|
||||||
UserCreateRsp: {
|
UserCreateRsp: {
|
||||||
fields: {}
|
fields: {}
|
||||||
|
},
|
||||||
|
UserAddResReq: {
|
||||||
|
fields: {
|
||||||
|
resType: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
count: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
UserAddResResp: {
|
||||||
|
fields: {
|
||||||
|
resType: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
count: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,31 +3,31 @@ option go_package = ".;pb";
|
|||||||
import "equipment_db.proto";
|
import "equipment_db.proto";
|
||||||
|
|
||||||
//获取装备列表请求
|
//获取装备列表请求
|
||||||
message EquipmentGetListReq {
|
message EquipmentGetListReq {}
|
||||||
|
|
||||||
}
|
|
||||||
//获取装备列表请求 回应
|
//获取装备列表请求 回应
|
||||||
message EquipmentGetListResp {
|
message EquipmentGetListResp {
|
||||||
repeated DB_Equipment Equipments = 1; //装备列表
|
repeated DB_Equipment Equipments = 1; //装备列表
|
||||||
}
|
}
|
||||||
|
|
||||||
//装备挂在到英雄上
|
//装备挂在到英雄上
|
||||||
message EquipmentEquipReq{
|
message EquipmentEquipReq {
|
||||||
string HeroCardId = 1; //英雄卡Id
|
string HeroCardId = 1; //英雄卡Id
|
||||||
repeated string EquipmentId = 2; //装备Id 固定长度的数组 0-5 对应的装备栏
|
repeated string EquipmentId = 2; //装备Id 固定长度的数组 0-5 对应的装备栏
|
||||||
}
|
}
|
||||||
|
|
||||||
//装备挂在到英雄上 回应
|
//装备挂在到英雄上 回应
|
||||||
message EquipmentEquipResp{
|
message EquipmentEquipResp {
|
||||||
|
repeated DB_Equipment Equipments = 1; //挂在装备列表
|
||||||
}
|
}
|
||||||
|
|
||||||
//装备升级
|
//装备升级
|
||||||
message EquipmentUpgradeReq{
|
message EquipmentUpgradeReq {
|
||||||
string EquipmentId = 1; //装备Id
|
string EquipmentId = 1; //装备Id
|
||||||
}
|
}
|
||||||
|
|
||||||
//装备升级 回应
|
//装备升级 回应
|
||||||
message EquipmentUpgradeResp{
|
message EquipmentUpgradeResp {
|
||||||
|
bool IsSucc = 1;
|
||||||
|
repeated DB_Equipment Equipment =
|
||||||
|
2; //由于装备可以叠加 升级后会创建一个新的装备出来 所以可能影响两个装备
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
package pb;
|
|
||||||
|
|
||||||
message SkillData {
|
message SkillData {
|
||||||
int32 skillID = 1;
|
int32 skillID = 1;
|
||||||
@ -17,8 +16,8 @@ message DBHero {
|
|||||||
int32 juexingLv = 7; //@go_tags(`bson:"juexingLv"`) 觉醒等级
|
int32 juexingLv = 7; //@go_tags(`bson:"juexingLv"`) 觉醒等级
|
||||||
int32 captainSkill = 8; //@go_tags(`bson:"captainSkill"`) 队长技能
|
int32 captainSkill = 8; //@go_tags(`bson:"captainSkill"`) 队长技能
|
||||||
repeated SkillData normalSkill = 9; //@go_tags(`bson:"normalSkill"`) 普通技能
|
repeated SkillData normalSkill = 9; //@go_tags(`bson:"normalSkill"`) 普通技能
|
||||||
map<int32, int32> property = 10; // 属性相关
|
map<string, int32> property = 10; // 属性相关
|
||||||
map<int32, int32> addProperty =
|
map<string, int32> addProperty =
|
||||||
11; //@go_tags(`bson:"addProperty"`) 附加属性相关
|
11; //@go_tags(`bson:"addProperty"`) 附加属性相关
|
||||||
int32 formation = 12; // 阵型类型
|
int32 formation = 12; // 阵型类型
|
||||||
int32 cardType =
|
int32 cardType =
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
package pb;
|
|
||||||
import "hero_db.proto";
|
import "hero_db.proto";
|
||||||
|
|
||||||
//英雄基础信息
|
//英雄基础信息
|
||||||
@ -66,7 +65,7 @@ message HeroStrengthenUpSkillResp {
|
|||||||
message HeroResonanceReq {
|
message HeroResonanceReq {
|
||||||
string heroObjID = 1; // 英雄对象ID
|
string heroObjID = 1; // 英雄对象ID
|
||||||
string costObjID = 2; // 消耗对象
|
string costObjID = 2; // 消耗对象
|
||||||
int32 amount = 3;// 消耗的数量
|
int32 amount = 3; // 消耗的数量
|
||||||
}
|
}
|
||||||
|
|
||||||
message HeroResonanceResp {
|
message HeroResonanceResp {
|
||||||
@ -97,24 +96,23 @@ message HeroResonanceUseEnergyResp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 觉醒
|
// 觉醒
|
||||||
message HeroJuexingReq {
|
message HeroAwakenReq {
|
||||||
string heroObjID = 1; // 英雄对象ID
|
string heroObjID = 1; // 英雄对象ID
|
||||||
ItemData costItmes = 2; // 觉醒消耗待定
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 觉醒返回
|
// 觉醒返回
|
||||||
message HeroJuexingResp {
|
message HeroAwakenResp {
|
||||||
DBHero hero = 1; // 英雄对象
|
DBHero hero = 1; // 英雄对象
|
||||||
}
|
}
|
||||||
|
|
||||||
//抽卡
|
//抽卡
|
||||||
message HeroChoukaReq {}
|
message HeroChoukaReq { repeated int32 heroIds = 1; }
|
||||||
|
|
||||||
message HeroChoukaResp { repeated DBHero heroes = 1; }
|
message HeroChoukaResp { repeated DBHero heroes = 1; }
|
||||||
|
|
||||||
//英雄属性推送
|
//英雄属性推送
|
||||||
message HeroProperty {
|
message HeroProperty {
|
||||||
string heroId = 1; //英雄唯一ID
|
string heroId = 1; //英雄唯一ID
|
||||||
map<int32, int32> property = 2; //基础属性
|
map<string, int32> property = 2; //基础属性
|
||||||
map<int32, int32> addProperty = 3; //附加属性
|
map<string, int32> addProperty = 3; //附加属性
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ option go_package = ".;pb";
|
|||||||
message DB_UserItemData {
|
message DB_UserItemData {
|
||||||
string gridId = 1; //@go_tags(`bson:"_id"`) 背包格子Id
|
string gridId = 1; //@go_tags(`bson:"_id"`) 背包格子Id
|
||||||
string uId = 2; //@go_tags(`bson:"uid"`) 用户id
|
string uId = 2; //@go_tags(`bson:"uid"`) 用户id
|
||||||
bool isEmpty = 3; //@go_tags(`bson:"isEmpty"`) 是否是空格子
|
int32 itemId = 3; //@go_tags(`bson:"itemId"`) 存放物品的Id
|
||||||
int32 itemId = 4; //@go_tags(`bson:"itemId"`) 存放物品的Id
|
uint32 amount = 4; //@go_tags(`bson:"amount"`) 存放物品的数量
|
||||||
uint32 amount = 5; //@go_tags(`bson:"amount"`) 存放物品的数量
|
int64 cTime = 5; //@go_tags(`bson:"cTime"`) 物品获取时间
|
||||||
int64 cTime = 6; //@go_tags(`bson:"cTime"`) 物品获取时间
|
int64 eTime = 6; //@go_tags(`bson:"eTime"`) 物品过期时间
|
||||||
int64 eTime = 7; //@go_tags(`bson:"eTime"`) 物品过期时间
|
bool isNewItem = 7; //@go_tags(`bson:"isNewItem"`) 是否是新的
|
||||||
bool isNewItem = 8; //@go_tags(`bson:"isNewItem"`) 是否是新的
|
int64 lastopt = 8; //@go_tags(`bson:"lastopt"`) 最后操作时间
|
||||||
}
|
}
|
||||||
|
@ -4,34 +4,30 @@ import "items_db.proto";
|
|||||||
|
|
||||||
//查询用户背包请求
|
//查询用户背包请求
|
||||||
message ItemsGetlistReq {
|
message ItemsGetlistReq {
|
||||||
int32 IType = 1; //道具类型
|
int32 IType = 1; //道具类型
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询用户背包请求 回应
|
//查询用户背包请求 回应
|
||||||
message ItemsGetlistResp {
|
message ItemsGetlistResp {
|
||||||
repeated DB_UserItemData Grids = 1; //用户背包列表
|
repeated DB_UserItemData Grids = 1; //用户背包列表
|
||||||
}
|
}
|
||||||
|
|
||||||
//使用物品请求
|
//使用物品请求
|
||||||
message ItemsUseItemReq {
|
message ItemsUseItemReq {
|
||||||
int32 GridId = 1; //格子Id
|
int32 GridId = 1; //格子Id
|
||||||
int32 ItemId = 2; //物品Id
|
int32 ItemId = 2; //物品Id
|
||||||
uint32 Amount = 3; //使用数量
|
uint32 Amount = 3; //使用数量
|
||||||
}
|
}
|
||||||
|
|
||||||
//使用物品请求 回应
|
//使用物品请求 回应
|
||||||
message ItemsUseItemResp {
|
message ItemsUseItemResp {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//出售道具请求sailitem
|
//出售道具请求sailitem
|
||||||
message ItemsSellItemReq {
|
message ItemsSellItemReq {
|
||||||
int32 GridId = 1; //格子Id
|
int32 GridId = 1; //格子Id
|
||||||
int32 ItemId = 2; //物品Id
|
int32 ItemId = 2; //物品Id
|
||||||
uint32 Amount = 3; //使用数量
|
uint32 Amount = 3; //使用数量
|
||||||
}
|
}
|
||||||
|
|
||||||
//出售道具请求 回应
|
//出售道具请求 回应
|
||||||
message ItemsSellItemResp {
|
message ItemsSellItemResp {}
|
||||||
|
|
||||||
}
|
|
@ -2,38 +2,22 @@ syntax = "proto3";
|
|||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
import "mail_db.proto";
|
import "mail_db.proto";
|
||||||
|
|
||||||
message MailGetListReq {
|
message MailGetListReq {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询邮件信息
|
// 查询邮件信息
|
||||||
message MailGetListResp {
|
message MailGetListResp { repeated DBMailData Mails = 1; }
|
||||||
repeated DBMailData Mails = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查看邮件
|
// 查看邮件
|
||||||
message MailReadMailReq {
|
message MailReadMailReq { string ObjID = 1; }
|
||||||
string ObjID = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message MailReadMailResp {
|
message MailReadMailResp { DBMailData Mail = 1; }
|
||||||
DBMailData Mail = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 领取附件
|
// 领取附件
|
||||||
message MailGetUserMailAttachmentReq {
|
message MailGetUserMailAttachmentReq { string ObjID = 1; }
|
||||||
string ObjID = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message MailGetUserMailAttachmentResp {
|
message MailGetUserMailAttachmentResp { DBMailData Mail = 1; }
|
||||||
DBMailData Mail = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除某个邮件
|
// 删除某个邮件
|
||||||
message MailDelMailReq {
|
message MailDelMailReq { string ObjID = 1; }
|
||||||
string ObjID = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message MailDelMailResp {
|
message MailDelMailResp { repeated DBMailData Mail = 1; }
|
||||||
repeated DBMailData Mail = 1;
|
|
||||||
}
|
|
||||||
|
@ -2,12 +2,11 @@ syntax = "proto3";
|
|||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
import "errorcode.proto";
|
import "errorcode.proto";
|
||||||
|
|
||||||
//统一错误码返回
|
//统一错误码推送
|
||||||
message NotifyErrorNotifyPush {
|
message NotifyErrorNotifyPush {
|
||||||
string ReqMainType = 1; // 请求协议模块 模块名 例如:user 对应项目中 user的模块
|
string ReqMainType =1; // 请求协议模块 模块名 例如:user 对应项目中 user的模块
|
||||||
string ReqSubType = 2; // 请求协议函数 例如:login 对应项目中 user的模块中
|
string ReqSubType = 2; // 请求协议函数 例如:login 对应项目中 user的模块中 api_login 的处理函数
|
||||||
// api_login 的处理函数
|
ErrorCode Code = 3; // 执行返回错误码 对应 errorcode.proto 枚举
|
||||||
ErrorCode Code = 3; // 执行返回错误码 对应 errorcode.proto 枚举
|
string Message = 4; // 错误消息
|
||||||
string Message = 4; // 错误消息
|
string Data = 6; // 错误数据
|
||||||
string Data = 6; // 错误数据
|
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,5 @@ message DBUser {
|
|||||||
int32 avatar = 12; //@go_tags(`bson:"avatar"`) 头像
|
int32 avatar = 12; //@go_tags(`bson:"avatar"`) 头像
|
||||||
int32 gold = 13; //@go_tags(`bson:"gold"`) 金币
|
int32 gold = 13; //@go_tags(`bson:"gold"`) 金币
|
||||||
int32 exp = 14; //@go_tags(`bson:"exp"`) 经验
|
int32 exp = 14; //@go_tags(`bson:"exp"`) 经验
|
||||||
|
bool created = 15; //@go_tags(`bson:"created"`) 创角
|
||||||
}
|
}
|
@ -28,4 +28,15 @@ message UserCreateReq {
|
|||||||
string NickName = 1; //昵称
|
string NickName = 1; //昵称
|
||||||
}
|
}
|
||||||
|
|
||||||
message UserCreateRsp {}
|
message UserCreateRsp {}
|
||||||
|
|
||||||
|
//添加用户资源
|
||||||
|
message UserAddResReq {
|
||||||
|
string resType = 1; //资源类型
|
||||||
|
int32 count = 2; //资源数量
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserAddResResp {
|
||||||
|
string resType = 1; //资源类型
|
||||||
|
int32 count = 2; //资源数量
|
||||||
|
}
|
||||||
|
@ -56,14 +56,30 @@
|
|||||||
<v-col v-for="item in reqproto"
|
<v-col v-for="item in reqproto"
|
||||||
:key="item.FieldName"
|
:key="item.FieldName"
|
||||||
cols="4">
|
cols="4">
|
||||||
<v-text-field color="tertiary"
|
|
||||||
v-model="item.FieldValue"
|
<v-card>
|
||||||
:label="item.FieldName"
|
<v-card-title>{{item.FieldName}}</v-card-title>
|
||||||
:type="item.FieldType"
|
<v-card-text>
|
||||||
:hint="item.FieldType"
|
<v-text-field v-if="item.FieldType != 'Object'"
|
||||||
:disabled="!isconnect"
|
color="tertiary"
|
||||||
outlined
|
v-model="item.FieldValue"
|
||||||
clearable></v-text-field>
|
:label="item.FieldName"
|
||||||
|
:type="item.FieldType"
|
||||||
|
:hint="item.FieldType"
|
||||||
|
:disabled="!isconnect"
|
||||||
|
outlined
|
||||||
|
clearable></v-text-field>
|
||||||
|
<Vue3JsonEditor v-else
|
||||||
|
v-model="item.FieldValue"
|
||||||
|
@json-change="(v)=>{item.FieldValue = v}"
|
||||||
|
:showBtns="false"
|
||||||
|
:mode="'code'"
|
||||||
|
lang="zh"
|
||||||
|
:expandedOnStart="false"></Vue3JsonEditor>
|
||||||
|
</v-card-text>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row class="mt-5">
|
<v-row class="mt-5">
|
||||||
@ -145,11 +161,12 @@ import md5 from 'js-md5'
|
|||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import proto from '@/pb/proto'
|
import proto from '@/pb/proto'
|
||||||
import { socket } from '@/utils/socket'
|
import { socket } from '@/utils/socket'
|
||||||
|
import { Vue3JsonEditor } from 'vue3-json-editor'
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Protocol',
|
name: 'Protocol',
|
||||||
components: {},
|
components: { Vue3JsonEditor },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ws_url: 'ws://localhost:7891/gateway',
|
ws_url: 'ws://localhost:7891/gateway',
|
||||||
@ -168,6 +185,7 @@ export default defineComponent({
|
|||||||
logs: [],
|
logs: [],
|
||||||
isshow: true,
|
isshow: true,
|
||||||
showdata: { name: 'liwei1dao', aog: 123 },
|
showdata: { name: 'liwei1dao', aog: 123 },
|
||||||
|
resultInfo: { li: 123 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
@ -183,8 +201,8 @@ export default defineComponent({
|
|||||||
])
|
])
|
||||||
for (const v of Object.keys(proto)) {
|
for (const v of Object.keys(proto)) {
|
||||||
for (const v1 of proto_models) {
|
for (const v1 of proto_models) {
|
||||||
|
// console.log('protoName', v)
|
||||||
let protoName = v.toLowerCase()
|
let protoName = v.toLowerCase()
|
||||||
// console.log('protoName', protoName)
|
|
||||||
//找到模块的消息对象
|
//找到模块的消息对象
|
||||||
let index = protoName.indexOf(v1.mainType)
|
let index = protoName.indexOf(v1.mainType)
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
@ -208,7 +226,7 @@ export default defineComponent({
|
|||||||
subType: sub,
|
subType: sub,
|
||||||
reqproto: proto[v],
|
reqproto: proto[v],
|
||||||
})
|
})
|
||||||
console.log(sub + 'Req')
|
// console.log(sub + 'Req')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (respindex != -1) {
|
if (respindex != -1) {
|
||||||
@ -229,7 +247,7 @@ export default defineComponent({
|
|||||||
subType: sub,
|
subType: sub,
|
||||||
respproto: proto[v],
|
respproto: proto[v],
|
||||||
})
|
})
|
||||||
console.log(sub + 'Resp')
|
// console.log(sub + 'Resp')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pushindex != -1) {
|
if (pushindex != -1) {
|
||||||
@ -250,7 +268,7 @@ export default defineComponent({
|
|||||||
subType: sub,
|
subType: sub,
|
||||||
pushproto: proto[v],
|
pushproto: proto[v],
|
||||||
})
|
})
|
||||||
console.log(sub + 'Resp')
|
// console.log(sub + 'Resp')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,11 +318,11 @@ export default defineComponent({
|
|||||||
this.reqproto = []
|
this.reqproto = []
|
||||||
},
|
},
|
||||||
subSelectUpdate(v) {
|
subSelectUpdate(v) {
|
||||||
console.log(v)
|
|
||||||
this.reqproto = []
|
this.reqproto = []
|
||||||
let keys = Object.keys(this.subSelect.reqproto.fields)
|
let keys = Object.keys(this.subSelect.reqproto.fields)
|
||||||
for (const v of keys) {
|
for (const v of keys) {
|
||||||
let ftype = this.subSelect.reqproto.fields[v].type
|
let ftype = this.subSelect.reqproto.fields[v].type
|
||||||
|
console.log('ftype', ftype)
|
||||||
let fvalue = null
|
let fvalue = null
|
||||||
switch (this.subSelect.reqproto.fields[v].type) {
|
switch (this.subSelect.reqproto.fields[v].type) {
|
||||||
case 'int32':
|
case 'int32':
|
||||||
@ -316,9 +334,14 @@ export default defineComponent({
|
|||||||
ftype = 'number'
|
ftype = 'number'
|
||||||
fvalue = 0
|
fvalue = 0
|
||||||
break
|
break
|
||||||
default:
|
case 'string':
|
||||||
ftype = 'text'
|
ftype = 'text'
|
||||||
fvalue = ''
|
fvalue = ''
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
ftype = 'Object'
|
||||||
|
fvalue = {}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
this.reqproto.push({
|
this.reqproto.push({
|
||||||
@ -372,11 +395,19 @@ export default defineComponent({
|
|||||||
.decode(message.data.value)
|
.decode(message.data.value)
|
||||||
messageobj = proto.lookup(v1.pushName).toObject(protoobj)
|
messageobj = proto.lookup(v1.pushName).toObject(protoobj)
|
||||||
}
|
}
|
||||||
this.pushlog(
|
if (v1.pushName && v1.pushName == 'NotifyErrorNotifyPush') {
|
||||||
'success',
|
this.pushlog(
|
||||||
`收到回应消息: ${mainType}-${subType}-resp`,
|
'error',
|
||||||
messageobj
|
`错误信息通知: ${mainType}-${subType}-resp`,
|
||||||
)
|
messageobj
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
this.pushlog(
|
||||||
|
'success',
|
||||||
|
`收到回应消息: ${mainType}-${subType}-resp`,
|
||||||
|
messageobj
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,6 +480,10 @@ export default defineComponent({
|
|||||||
isshow: false,
|
isshow: false,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onJsonChange(value) {
|
||||||
|
console.log('value:', value)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user