上传proto js pb
This commit is contained in:
parent
fb10ce614f
commit
d3f34de5b8
2121
comm_pb.js
Normal file
2121
comm_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
55
errorcode_pb.js
Normal file
55
errorcode_pb.js
Normal file
@ -0,0 +1,55 @@
|
||||
// source: errorcode.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
||||
|
||||
goog.exportSymbol('proto.ErrorCode', null, global);
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.ErrorCode = {
|
||||
SUCCESS: 0,
|
||||
NOFINDSERVICE: 10,
|
||||
NOFINDSERVICEHANDLEFUNC: 11,
|
||||
RPCFUNCEXECUTIONERROR: 12,
|
||||
CACHEREADERROR: 13,
|
||||
SQLEXECUTIONERROR: 14,
|
||||
REQPARAMETERERROR: 15,
|
||||
SIGNERROR: 16,
|
||||
INSUFFICIENTPERMISSIONS: 17,
|
||||
NOLOGIN: 18,
|
||||
USERSESSIONNOBEING: 19,
|
||||
STATEINVALID: 20,
|
||||
DBERROR: 21,
|
||||
SYSTEMERROR: 22,
|
||||
EXCEPTION: 100,
|
||||
SECKEYINVALID: 1000,
|
||||
SECKEY: 1001,
|
||||
BINDUSER: 1002,
|
||||
FRIENDNOTSELF: 1100,
|
||||
FRIENDSELFMAX: 1101,
|
||||
FRIENDTARGETMAX: 1102,
|
||||
FRIENDSELFNODATA: 1103,
|
||||
FRIENDTARGETNODATA: 1104,
|
||||
FRIENDYET: 1105,
|
||||
FRIENDAPPLYYET: 1106,
|
||||
FRIENDSELFBLACKYET: 1107,
|
||||
FRIENDTARGETBLACKYET: 1108,
|
||||
FRIENDAPPLYERROR: 1109,
|
||||
FRIENDBLACKMAX: 1110,
|
||||
FRIENDSEARCHNAMEEMPTY: 1111
|
||||
};
|
||||
|
||||
goog.object.extend(exports, proto);
|
3131
package-lock.json
generated
3131
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "hello-world",
|
||||
"name": "vue_dreamfactory",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@ -8,17 +8,29 @@
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdi/font": "5.9.55",
|
||||
"core-js": "^3.8.3",
|
||||
"vue": "^3.2.13"
|
||||
"protobufjs": "^6.11.3",
|
||||
"roboto-fontface": "*",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.0.3",
|
||||
"vuetify": "npm:@vuetify/nightly@next",
|
||||
"vuex": "^4.0.0",
|
||||
"vuex-persistedstate": "^4.1.0",
|
||||
"webfontloader": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3"
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"vue-cli-plugin-vuetify": "~2.5.1",
|
||||
"webpack-plugin-vuetify": "^2.0.0-alpha.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
17
pb.bat
Normal file
17
pb.bat
Normal file
@ -0,0 +1,17 @@
|
||||
@echo off
|
||||
|
||||
set PROJECT_ROOT=.\
|
||||
|
||||
set PROJECT_ROOT=.
|
||||
|
||||
set SRC=%PROJECT_ROOT%\src\pb\proto
|
||||
set TAR=%PROJECT_ROOT%\src\pb\js
|
||||
|
||||
protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\*.proto
|
||||
protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\notify\*.proto
|
||||
protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\user\*.proto
|
||||
protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\friend\*.proto
|
||||
protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\pack\*.proto
|
||||
protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\mail\*.proto
|
||||
|
||||
pause
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
26
src/App.vue
26
src/App.vue
@ -1,26 +1,18 @@
|
||||
<template>
|
||||
<img alt="Vue logo" src="./assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<v-app>
|
||||
<v-main>
|
||||
<router-view/>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
|
||||
data: () => ({
|
||||
//
|
||||
}),
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
||||
|
1
src/assets/logo.svg
Normal file
1
src/assets/logo.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.5 100"><defs><style>.cls-1{fill:#1697f6;}.cls-2{fill:#7bc6ff;}.cls-3{fill:#1867c0;}.cls-4{fill:#aeddff;}</style></defs><title>Artboard 46</title><polyline class="cls-1" points="43.75 0 23.31 0 43.75 48.32"/><polygon class="cls-2" points="43.75 62.5 43.75 100 0 14.58 22.92 14.58 43.75 62.5"/><polyline class="cls-3" points="43.75 0 64.19 0 43.75 48.32"/><polygon class="cls-4" points="64.58 14.58 87.5 14.58 43.75 100 43.75 62.5 64.58 14.58"/></svg>
|
After Width: | Height: | Size: 539 B |
@ -1,58 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
78
src/components/navigation/index.vue
Normal file
78
src/components/navigation/index.vue
Normal file
@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<v-list density="compact"
|
||||
nav>
|
||||
<template v-for="(child,i) in routes">
|
||||
<template v-if="child.children && child.children.length > 1">
|
||||
<v-list-item :key="i"
|
||||
:prepend-icon="child.meta.icon"
|
||||
:title="child.meta.title"
|
||||
:value="i"
|
||||
@click="navigationfold(i)">
|
||||
</v-list-item>
|
||||
<template v-if="child.meta.isopen">
|
||||
<template v-for="(c,n) in child.children"
|
||||
:key="n">
|
||||
<v-list-item class="ml-2"
|
||||
:prepend-icon="c.meta.icon"
|
||||
:title="c.meta.title"
|
||||
:value="child.path +'/'+c.path">
|
||||
</v-list-item>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-list-item :key="i"
|
||||
:prepend-icon="child.meta.icon"
|
||||
:title="child.meta.title"
|
||||
:value="child.path"
|
||||
:to="child.path">
|
||||
</v-list-item>
|
||||
</template>
|
||||
</template>
|
||||
</v-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Navigation',
|
||||
props: {
|
||||
routes: {
|
||||
type: Array,
|
||||
default: function () {
|
||||
return [
|
||||
{
|
||||
path: '/',
|
||||
meta: {
|
||||
title: 'Console',
|
||||
icon: 'mdi-console',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'pro',
|
||||
meta: { title: 'ProjjectInfo', icon: 'mdi-card-text' },
|
||||
},
|
||||
{
|
||||
path: 'host',
|
||||
meta: { title: 'HostInfo', icon: 'mdi-laptop' },
|
||||
},
|
||||
{
|
||||
path: 'cluster',
|
||||
meta: { title: 'ClusterInfo', icon: 'mdi-server-network' },
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
navigationfold(v) {
|
||||
this.routes[v].meta.isopen = !this.routes[v].meta.isopen
|
||||
console.log(this.routes)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
56
src/layout/deflayout.vue
Normal file
56
src/layout/deflayout.vue
Normal file
@ -0,0 +1,56 @@
|
||||
<template>
|
||||
|
||||
<v-app>
|
||||
<v-navigation-drawer expand-on-hover
|
||||
rail
|
||||
rail-width="65"
|
||||
class="bg-deep-purple"
|
||||
theme="dark"
|
||||
permanent>
|
||||
<v-list-item prepend-avatar="https://randomuser.me/api/portraits/men/85.jpg"
|
||||
:title="appname">
|
||||
<template v-slot:append>
|
||||
<v-btn variant="text"
|
||||
icon="mdi-chevron-left">
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<navigation :routes="routes"></navigation>
|
||||
<template v-slot:append>
|
||||
<v-list density="compact"
|
||||
nav>
|
||||
<v-list-item prepend-icon="mdi-home-city"
|
||||
title="登出"
|
||||
value="home">
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</template>
|
||||
</v-navigation-drawer>
|
||||
<v-main>
|
||||
<v-container fluid>
|
||||
<router-view></router-view>
|
||||
</v-container>
|
||||
</v-main>
|
||||
|
||||
<v-footer app>
|
||||
</v-footer>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navigation from '@/components/navigation/'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'DefLayout',
|
||||
components: {
|
||||
navigation,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['appname', 'routes']),
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
12
src/main.js
12
src/main.js
@ -1,4 +1,14 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import vuetify from './plugins/vuetify/vuetify'
|
||||
import { loadFonts } from './plugins/vuetify/webfontloader'
|
||||
|
||||
createApp(App).mount('#app')
|
||||
loadFonts()
|
||||
|
||||
createApp(App)
|
||||
.use(router)
|
||||
.use(store)
|
||||
.use(vuetify)
|
||||
.mount('#app')
|
||||
|
2121
src/pb/js/comm_pb.js
Normal file
2121
src/pb/js/comm_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
55
src/pb/js/errorcode_pb.js
Normal file
55
src/pb/js/errorcode_pb.js
Normal file
@ -0,0 +1,55 @@
|
||||
// source: errorcode.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
||||
|
||||
goog.exportSymbol('proto.ErrorCode', null, global);
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.ErrorCode = {
|
||||
SUCCESS: 0,
|
||||
NOFINDSERVICE: 10,
|
||||
NOFINDSERVICEHANDLEFUNC: 11,
|
||||
RPCFUNCEXECUTIONERROR: 12,
|
||||
CACHEREADERROR: 13,
|
||||
SQLEXECUTIONERROR: 14,
|
||||
REQPARAMETERERROR: 15,
|
||||
SIGNERROR: 16,
|
||||
INSUFFICIENTPERMISSIONS: 17,
|
||||
NOLOGIN: 18,
|
||||
USERSESSIONNOBEING: 19,
|
||||
STATEINVALID: 20,
|
||||
DBERROR: 21,
|
||||
SYSTEMERROR: 22,
|
||||
EXCEPTION: 100,
|
||||
SECKEYINVALID: 1000,
|
||||
SECKEY: 1001,
|
||||
BINDUSER: 1002,
|
||||
FRIENDNOTSELF: 1100,
|
||||
FRIENDSELFMAX: 1101,
|
||||
FRIENDTARGETMAX: 1102,
|
||||
FRIENDSELFNODATA: 1103,
|
||||
FRIENDTARGETNODATA: 1104,
|
||||
FRIENDYET: 1105,
|
||||
FRIENDAPPLYYET: 1106,
|
||||
FRIENDSELFBLACKYET: 1107,
|
||||
FRIENDTARGETBLACKYET: 1108,
|
||||
FRIENDAPPLYERROR: 1109,
|
||||
FRIENDBLACKMAX: 1110,
|
||||
FRIENDSEARCHNAMEEMPTY: 1111
|
||||
};
|
||||
|
||||
goog.object.extend(exports, proto);
|
324
src/pb/js/friend/friend_db_pb.js
Normal file
324
src/pb/js/friend/friend_db_pb.js
Normal file
@ -0,0 +1,324 @@
|
||||
// source: friend/friend_db.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
||||
|
||||
goog.exportSymbol('proto.DB_FriendData', null, global);
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.DB_FriendData = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.DB_FriendData.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.DB_FriendData, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.DB_FriendData.displayName = 'proto.DB_FriendData';
|
||||
}
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.DB_FriendData.repeatedFields_ = [2,3,4];
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.DB_FriendData.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.DB_FriendData.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.DB_FriendData} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_FriendData.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
uid: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
friendidsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
|
||||
applyidsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
|
||||
blackidsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.DB_FriendData}
|
||||
*/
|
||||
proto.DB_FriendData.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.DB_FriendData;
|
||||
return proto.DB_FriendData.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.DB_FriendData} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.DB_FriendData}
|
||||
*/
|
||||
proto.DB_FriendData.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setUid(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addFriendids(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addApplyids(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addBlackids(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.DB_FriendData.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.DB_FriendData.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.DB_FriendData} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_FriendData.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getUid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getFriendidsList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getApplyidsList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
3,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getBlackidsList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
4,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string uId = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_FriendData.prototype.getUid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.setUid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string friendIds = 2;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.DB_FriendData.prototype.getFriendidsList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.setFriendidsList = function(value) {
|
||||
return jspb.Message.setField(this, 2, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.addFriendids = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.clearFriendidsList = function() {
|
||||
return this.setFriendidsList([]);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string applyIds = 3;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.DB_FriendData.prototype.getApplyidsList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.setApplyidsList = function(value) {
|
||||
return jspb.Message.setField(this, 3, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.addApplyids = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.clearApplyidsList = function() {
|
||||
return this.setApplyidsList([]);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string blackIds = 4;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.DB_FriendData.prototype.getBlackidsList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.setBlackidsList = function(value) {
|
||||
return jspb.Message.setField(this, 4, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.addBlackids = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.DB_FriendData} returns this
|
||||
*/
|
||||
proto.DB_FriendData.prototype.clearBlackidsList = function() {
|
||||
return this.setBlackidsList([]);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto);
|
4588
src/pb/js/friend/friend_msg_pb.js
Normal file
4588
src/pb/js/friend/friend_msg_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
622
src/pb/js/mail/mail_db_pb.js
Normal file
622
src/pb/js/mail/mail_db_pb.js
Normal file
@ -0,0 +1,622 @@
|
||||
// source: mail/mail_db.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
||||
|
||||
goog.exportSymbol('proto.DB_MailData', null, global);
|
||||
goog.exportSymbol('proto.MailAttachment', null, global);
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.MailAttachment = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.MailAttachment, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.MailAttachment.displayName = 'proto.MailAttachment';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.DB_MailData = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.DB_MailData.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.DB_MailData, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.DB_MailData.displayName = 'proto.DB_MailData';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.MailAttachment.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.MailAttachment.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.MailAttachment} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.MailAttachment.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
itemid: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
||||
itemcount: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.MailAttachment}
|
||||
*/
|
||||
proto.MailAttachment.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.MailAttachment;
|
||||
return proto.MailAttachment.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.MailAttachment} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.MailAttachment}
|
||||
*/
|
||||
proto.MailAttachment.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
msg.setItemid(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
msg.setItemcount(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.MailAttachment.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.MailAttachment.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.MailAttachment} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.MailAttachment.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getItemid();
|
||||
if (f !== 0) {
|
||||
writer.writeUint32(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getItemcount();
|
||||
if (f !== 0) {
|
||||
writer.writeUint32(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional uint32 ItemId = 1;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.MailAttachment.prototype.getItemid = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.MailAttachment} returns this
|
||||
*/
|
||||
proto.MailAttachment.prototype.setItemid = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional uint32 ItemCount = 2;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.MailAttachment.prototype.getItemcount = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.MailAttachment} returns this
|
||||
*/
|
||||
proto.MailAttachment.prototype.setItemcount = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.DB_MailData.repeatedFields_ = [9];
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.DB_MailData.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.DB_MailData.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.DB_MailData} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_MailData.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
objid: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
uid: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
title: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
||||
contex: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
||||
createtime: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
||||
duetime: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
||||
check: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
|
||||
reward: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
|
||||
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
||||
proto.MailAttachment.toObject, includeInstance)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.DB_MailData}
|
||||
*/
|
||||
proto.DB_MailData.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.DB_MailData;
|
||||
return proto.DB_MailData.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.DB_MailData} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.DB_MailData}
|
||||
*/
|
||||
proto.DB_MailData.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setObjid(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setUid(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setTitle(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setContex(value);
|
||||
break;
|
||||
case 5:
|
||||
var value = /** @type {number} */ (reader.readUint64());
|
||||
msg.setCreatetime(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = /** @type {number} */ (reader.readUint64());
|
||||
msg.setDuetime(value);
|
||||
break;
|
||||
case 7:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setCheck(value);
|
||||
break;
|
||||
case 8:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setReward(value);
|
||||
break;
|
||||
case 9:
|
||||
var value = new proto.MailAttachment;
|
||||
reader.readMessage(value,proto.MailAttachment.deserializeBinaryFromReader);
|
||||
msg.addItems(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.DB_MailData.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.DB_MailData.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.DB_MailData} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_MailData.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getObjid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getUid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getTitle();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
3,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getContex();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
4,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getCreatetime();
|
||||
if (f !== 0) {
|
||||
writer.writeUint64(
|
||||
5,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getDuetime();
|
||||
if (f !== 0) {
|
||||
writer.writeUint64(
|
||||
6,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getCheck();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
7,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getReward();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
8,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getItemsList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedMessage(
|
||||
9,
|
||||
f,
|
||||
proto.MailAttachment.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string ObjId = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getObjid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setObjid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string Uid = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getUid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setUid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string Title = 3;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getTitle = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setTitle = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 3, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string Contex = 4;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getContex = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setContex = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 4, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional uint64 CreateTime = 5;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getCreatetime = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setCreatetime = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 5, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional uint64 DueTime = 6;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getDuetime = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setDuetime = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 6, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool Check = 7;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getCheck = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setCheck = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 7, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool Reward = 8;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getReward = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setReward = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 8, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated MailAttachment Items = 9;
|
||||
* @return {!Array<!proto.MailAttachment>}
|
||||
*/
|
||||
proto.DB_MailData.prototype.getItemsList = function() {
|
||||
return /** @type{!Array<!proto.MailAttachment>} */ (
|
||||
jspb.Message.getRepeatedWrapperField(this, proto.MailAttachment, 9));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<!proto.MailAttachment>} value
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.setItemsList = function(value) {
|
||||
return jspb.Message.setRepeatedWrapperField(this, 9, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.MailAttachment=} opt_value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.MailAttachment}
|
||||
*/
|
||||
proto.DB_MailData.prototype.addItems = function(opt_value, opt_index) {
|
||||
return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.MailAttachment, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.DB_MailData} returns this
|
||||
*/
|
||||
proto.DB_MailData.prototype.clearItemsList = function() {
|
||||
return this.setItemsList([]);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto);
|
1309
src/pb/js/mail/mail_msg_pb.js
Normal file
1309
src/pb/js/mail/mail_msg_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
292
src/pb/js/notify/notify_msg_pb.js
Normal file
292
src/pb/js/notify/notify_msg_pb.js
Normal file
@ -0,0 +1,292 @@
|
||||
// source: notify/notify_msg.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
||||
|
||||
var errorcode_pb = require('../errorcode_pb.js');
|
||||
goog.object.extend(proto, errorcode_pb);
|
||||
goog.exportSymbol('proto.ErrorNotify', null, global);
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.ErrorNotify = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.ErrorNotify, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.ErrorNotify.displayName = 'proto.ErrorNotify';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.ErrorNotify.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.ErrorNotify.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.ErrorNotify} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.ErrorNotify.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
reqmaintype: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
reqsubtype: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
code: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
||||
message: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
||||
data: jspb.Message.getFieldWithDefault(msg, 6, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.ErrorNotify}
|
||||
*/
|
||||
proto.ErrorNotify.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.ErrorNotify;
|
||||
return proto.ErrorNotify.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.ErrorNotify} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.ErrorNotify}
|
||||
*/
|
||||
proto.ErrorNotify.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setReqmaintype(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setReqsubtype(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = /** @type {!proto.ErrorCode} */ (reader.readEnum());
|
||||
msg.setCode(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setMessage(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setData(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.ErrorNotify.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.ErrorNotify.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.ErrorNotify} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.ErrorNotify.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getReqmaintype();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getReqsubtype();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getCode();
|
||||
if (f !== 0.0) {
|
||||
writer.writeEnum(
|
||||
3,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getMessage();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
4,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getData();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
6,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string ReqMainType = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.ErrorNotify.prototype.getReqmaintype = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.ErrorNotify} returns this
|
||||
*/
|
||||
proto.ErrorNotify.prototype.setReqmaintype = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string ReqSubType = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.ErrorNotify.prototype.getReqsubtype = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.ErrorNotify} returns this
|
||||
*/
|
||||
proto.ErrorNotify.prototype.setReqsubtype = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional ErrorCode Code = 3;
|
||||
* @return {!proto.ErrorCode}
|
||||
*/
|
||||
proto.ErrorNotify.prototype.getCode = function() {
|
||||
return /** @type {!proto.ErrorCode} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.ErrorCode} value
|
||||
* @return {!proto.ErrorNotify} returns this
|
||||
*/
|
||||
proto.ErrorNotify.prototype.setCode = function(value) {
|
||||
return jspb.Message.setProto3EnumField(this, 3, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string Message = 4;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.ErrorNotify.prototype.getMessage = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.ErrorNotify} returns this
|
||||
*/
|
||||
proto.ErrorNotify.prototype.setMessage = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 4, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string Data = 6;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.ErrorNotify.prototype.getData = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.ErrorNotify} returns this
|
||||
*/
|
||||
proto.ErrorNotify.prototype.setData = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 6, value);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto);
|
380
src/pb/js/pack/pack_db_pb.js
Normal file
380
src/pb/js/pack/pack_db_pb.js
Normal file
@ -0,0 +1,380 @@
|
||||
// source: pack/pack_db.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
||||
|
||||
goog.exportSymbol('proto.DB_UserItemData', null, global);
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.DB_UserItemData = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.DB_UserItemData, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.DB_UserItemData.displayName = 'proto.DB_UserItemData';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.DB_UserItemData.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.DB_UserItemData} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_UserItemData.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
gridid: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
uid: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
isempty: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
||||
itemid: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
||||
amount: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
||||
ctime: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
||||
etime: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
||||
isnewitem: jspb.Message.getBooleanFieldWithDefault(msg, 8, false)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.DB_UserItemData}
|
||||
*/
|
||||
proto.DB_UserItemData.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.DB_UserItemData;
|
||||
return proto.DB_UserItemData.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.DB_UserItemData} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.DB_UserItemData}
|
||||
*/
|
||||
proto.DB_UserItemData.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setGridid(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setUid(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setIsempty(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = /** @type {number} */ (reader.readInt32());
|
||||
msg.setItemid(value);
|
||||
break;
|
||||
case 5:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
msg.setAmount(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = /** @type {number} */ (reader.readInt64());
|
||||
msg.setCtime(value);
|
||||
break;
|
||||
case 7:
|
||||
var value = /** @type {number} */ (reader.readInt64());
|
||||
msg.setEtime(value);
|
||||
break;
|
||||
case 8:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setIsnewitem(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.DB_UserItemData.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.DB_UserItemData} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_UserItemData.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getGridid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getUid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getIsempty();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
3,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getItemid();
|
||||
if (f !== 0) {
|
||||
writer.writeInt32(
|
||||
4,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getAmount();
|
||||
if (f !== 0) {
|
||||
writer.writeUint32(
|
||||
5,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getCtime();
|
||||
if (f !== 0) {
|
||||
writer.writeInt64(
|
||||
6,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getEtime();
|
||||
if (f !== 0) {
|
||||
writer.writeInt64(
|
||||
7,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getIsnewitem();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
8,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string gridId = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getGridid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setGridid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string uId = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getUid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setUid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool isEmpty = 3;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getIsempty = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setIsempty = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 3, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int32 itemId = 4;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getItemid = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setItemid = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 4, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional uint32 amount = 5;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getAmount = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setAmount = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 5, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int64 cTime = 6;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getCtime = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setCtime = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 6, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int64 eTime = 7;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getEtime = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setEtime = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 7, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool isNewItem = 8;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.getIsnewitem = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.DB_UserItemData} returns this
|
||||
*/
|
||||
proto.DB_UserItemData.prototype.setIsnewitem = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 8, value);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto);
|
1024
src/pb/js/pack/pack_msg_pb.js
Normal file
1024
src/pb/js/pack/pack_msg_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
712
src/pb/js/user/user_db_pb.js
Normal file
712
src/pb/js/user/user_db_pb.js
Normal file
@ -0,0 +1,712 @@
|
||||
// source: user/user_db.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
||||
|
||||
goog.exportSymbol('proto.Cache_UserData', null, global);
|
||||
goog.exportSymbol('proto.DB_UserData', null, global);
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.Cache_UserData = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.Cache_UserData, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.Cache_UserData.displayName = 'proto.Cache_UserData';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.DB_UserData = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.DB_UserData, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.DB_UserData.displayName = 'proto.DB_UserData';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.Cache_UserData.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.Cache_UserData.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.Cache_UserData} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.Cache_UserData.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
uid: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
sessionid: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
gatewayserviceid: jspb.Message.getFieldWithDefault(msg, 3, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.Cache_UserData}
|
||||
*/
|
||||
proto.Cache_UserData.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.Cache_UserData;
|
||||
return proto.Cache_UserData.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.Cache_UserData} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.Cache_UserData}
|
||||
*/
|
||||
proto.Cache_UserData.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setUid(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setSessionid(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setGatewayserviceid(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.Cache_UserData.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.Cache_UserData.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.Cache_UserData} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.Cache_UserData.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getUid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getSessionid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getGatewayserviceid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
3,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string uid = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.Cache_UserData.prototype.getUid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.Cache_UserData} returns this
|
||||
*/
|
||||
proto.Cache_UserData.prototype.setUid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string SessionId = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.Cache_UserData.prototype.getSessionid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.Cache_UserData} returns this
|
||||
*/
|
||||
proto.Cache_UserData.prototype.setSessionid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string GatewayServiceId = 3;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.Cache_UserData.prototype.getGatewayserviceid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.Cache_UserData} returns this
|
||||
*/
|
||||
proto.Cache_UserData.prototype.setGatewayserviceid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 3, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.DB_UserData.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.DB_UserData.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.DB_UserData} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_UserData.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
uid: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
uuid: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
||||
binduid: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
||||
name: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
||||
sid: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
||||
createip: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
||||
lastloginip: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
ctime: jspb.Message.getFieldWithDefault(msg, 9, 0),
|
||||
logintime: jspb.Message.getFieldWithDefault(msg, 10, 0),
|
||||
friendpoint: jspb.Message.getFieldWithDefault(msg, 11, 0),
|
||||
avatar: jspb.Message.getFieldWithDefault(msg, 12, 0)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.DB_UserData}
|
||||
*/
|
||||
proto.DB_UserData.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.DB_UserData;
|
||||
return proto.DB_UserData.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.DB_UserData} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.DB_UserData}
|
||||
*/
|
||||
proto.DB_UserData.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setId(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setUid(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setUuid(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setBinduid(value);
|
||||
break;
|
||||
case 5:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setName(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = /** @type {number} */ (reader.readInt32());
|
||||
msg.setSid(value);
|
||||
break;
|
||||
case 7:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setCreateip(value);
|
||||
break;
|
||||
case 8:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setLastloginip(value);
|
||||
break;
|
||||
case 9:
|
||||
var value = /** @type {number} */ (reader.readInt64());
|
||||
msg.setCtime(value);
|
||||
break;
|
||||
case 10:
|
||||
var value = /** @type {number} */ (reader.readInt64());
|
||||
msg.setLogintime(value);
|
||||
break;
|
||||
case 11:
|
||||
var value = /** @type {number} */ (reader.readInt32());
|
||||
msg.setFriendpoint(value);
|
||||
break;
|
||||
case 12:
|
||||
var value = /** @type {number} */ (reader.readInt32());
|
||||
msg.setAvatar(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.DB_UserData.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.DB_UserData.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.DB_UserData} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.DB_UserData.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getId();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getUid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getUuid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
3,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getBinduid();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
4,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getName();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
5,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getSid();
|
||||
if (f !== 0) {
|
||||
writer.writeInt32(
|
||||
6,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getCreateip();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
7,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getLastloginip();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
8,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getCtime();
|
||||
if (f !== 0) {
|
||||
writer.writeInt64(
|
||||
9,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getLogintime();
|
||||
if (f !== 0) {
|
||||
writer.writeInt64(
|
||||
10,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getFriendpoint();
|
||||
if (f !== 0) {
|
||||
writer.writeInt32(
|
||||
11,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getAvatar();
|
||||
if (f !== 0) {
|
||||
writer.writeInt32(
|
||||
12,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string id = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getId = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setId = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string uid = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getUid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setUid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string uuid = 3;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getUuid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setUuid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 3, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string binduid = 4;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getBinduid = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setBinduid = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 4, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string name = 5;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getName = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setName = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 5, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int32 sid = 6;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getSid = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setSid = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 6, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string createip = 7;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getCreateip = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setCreateip = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 7, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string lastloginip = 8;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getLastloginip = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setLastloginip = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 8, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int64 ctime = 9;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getCtime = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setCtime = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 9, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int64 logintime = 10;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getLogintime = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setLogintime = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 10, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int32 friendPoint = 11;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getFriendpoint = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setFriendpoint = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 11, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional int32 avatar = 12;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.DB_UserData.prototype.getAvatar = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} value
|
||||
* @return {!proto.DB_UserData} returns this
|
||||
*/
|
||||
proto.DB_UserData.prototype.setAvatar = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 12, value);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto);
|
1189
src/pb/js/user/user_msg_pb.js
Normal file
1189
src/pb/js/user/user_msg_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
65
src/pb/proto/comm.proto
Normal file
65
src/pb/proto/comm.proto
Normal file
@ -0,0 +1,65 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "errorcode.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
//用户消息流结构
|
||||
message UserMessage {
|
||||
string MainType = 1; //用户消息处理 模块名 例如:user 对应项目中 user的模块
|
||||
string SubType = 2; //用户消息处理函数名 例如:login 对应项目中 user的模块中
|
||||
// api_login 的处理函数
|
||||
google.protobuf.Any data = 3;
|
||||
string sec = 4; //密文
|
||||
}
|
||||
|
||||
//代理用户转发消息结构
|
||||
message AgentMessage {
|
||||
string Ip = 1;
|
||||
string UserSessionId = 2;
|
||||
string UserId = 3;
|
||||
string GatewayServiceId = 4;
|
||||
string Method = 5;
|
||||
google.protobuf.Any Message = 6;
|
||||
}
|
||||
|
||||
// RPC 服务固定回复结构
|
||||
message RPCMessageReply {
|
||||
ErrorCode Code = 1;
|
||||
string Message = 2;
|
||||
string Data = 3;
|
||||
}
|
||||
|
||||
//用户代理绑定Uid请求
|
||||
message AgentBuildReq {
|
||||
string UserSessionId = 1;
|
||||
string UserId = 2;
|
||||
string WorkerId = 3;
|
||||
}
|
||||
//用户代理解绑请求
|
||||
message AgentUnBuildReq { string UserSessionId = 1; }
|
||||
|
||||
//向用户代理发送消息请求
|
||||
message AgentSendMessageReq {
|
||||
string UserSessionId = 1;
|
||||
string MainType = 2;
|
||||
string SubType = 3;
|
||||
google.protobuf.Any Data = 4;
|
||||
}
|
||||
|
||||
//发送批量消息
|
||||
message BatchMessageReq {
|
||||
repeated string UserSessionIds = 1;
|
||||
string MainType = 2;
|
||||
string SubType = 3;
|
||||
google.protobuf.Any Data = 4;
|
||||
}
|
||||
|
||||
//发送广播消息
|
||||
message BroadCastMessageReq {
|
||||
string MainType = 1; //服务名
|
||||
string SubType = 2;
|
||||
google.protobuf.Any Data = 3;
|
||||
}
|
||||
|
||||
//关闭用户代理
|
||||
message AgentCloseeReq { string UserSessionId = 1; }
|
39
src/pb/proto/errorcode.proto
Normal file
39
src/pb/proto/errorcode.proto
Normal file
@ -0,0 +1,39 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
enum ErrorCode {
|
||||
Success = 0; //成功
|
||||
NoFindService = 10; //没有找到远程服务器
|
||||
NoFindServiceHandleFunc = 11; //远程服务器未找到执行方法
|
||||
RpcFuncExecutionError = 12; // Rpc方法执行错误
|
||||
CacheReadError = 13; //缓存读取失败
|
||||
SqlExecutionError = 14; //数据库执行错误
|
||||
ReqParameterError = 15; //请求参数错误
|
||||
SignError = 16; //签名错误
|
||||
InsufficientPermissions = 17; //权限不足
|
||||
NoLogin = 18; //未登录
|
||||
UserSessionNobeing = 19; //用户不存在
|
||||
StateInvalid = 20; //无效状态
|
||||
DBError = 21; //数据库操作失败
|
||||
SystemError = 22; //通用错误
|
||||
Exception = 100; //程序执行异常
|
||||
|
||||
// user
|
||||
SecKeyInvalid = 1000; //秘钥无效
|
||||
SecKey = 1001; //秘钥格式错误
|
||||
BindUser = 1002; //用户绑定错误
|
||||
|
||||
// friend
|
||||
FriendNotSelf = 1100; //不能是自己
|
||||
FriendSelfMax = 1101; //超出好友最大数量
|
||||
FriendTargetMax = 1102; //超出目标好友最大数量
|
||||
FriendSelfNoData = 1103; //无好友记录
|
||||
FriendTargetNoData = 1104; //无目标好友记录
|
||||
FriendYet = 1105; //已是好友
|
||||
FriendApplyYet = 1106; //已申请该好友
|
||||
FriendSelfBlackYet = 1107; //已在自己黑名单中
|
||||
FriendTargetBlackYet = 1108; //已在对方的黑名单中
|
||||
FriendApplyError = 1109; //申请失败
|
||||
FriendBlackMax = 1110; //黑名单最大数量
|
||||
FriendSearchNameEmpty = 1111; //查询昵称为空
|
||||
}
|
9
src/pb/proto/friend/friend_db.proto
Normal file
9
src/pb/proto/friend/friend_db.proto
Normal file
@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message DB_FriendData {
|
||||
string uId = 1; //@go_tags(`bson:"uId"`) 用户ID
|
||||
repeated string friendIds = 2; //@go_tags(`bson:"friendIds"`) 好友ID
|
||||
repeated string applyIds = 3; //@go_tags(`bson:"applyIds"`) 申请用户ID
|
||||
repeated string blackIds = 4; //@go_tags(`bson:"blackIds"`) 黑名单ID
|
||||
}
|
108
src/pb/proto/friend/friend_msg.proto
Normal file
108
src/pb/proto/friend/friend_msg.proto
Normal file
@ -0,0 +1,108 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message FriendBase {
|
||||
string userId = 1; // ID
|
||||
string NickName = 2; //昵称
|
||||
int32 level = 3; //等级
|
||||
int32 avatar = 4; //头像
|
||||
int64 strength = 5; //战力
|
||||
int32 serverId = 6; //服务编号
|
||||
int64 offlineTime = 7; //最近一次下线时间 0在线
|
||||
}
|
||||
|
||||
//好友列表
|
||||
message Friend_List_Req {}
|
||||
|
||||
message Friend_List_Rsp { repeated FriendBase list = 1; }
|
||||
|
||||
//申请好友
|
||||
message Friend_Apply_Req {
|
||||
string friendId = 1; //好友ID
|
||||
}
|
||||
message Friend_Apply_Rsp {
|
||||
string userId = 1; //用户ID
|
||||
string friendId = 2; //好友ID
|
||||
}
|
||||
|
||||
//删除好友
|
||||
message Friend_Del_Req {
|
||||
string friendId = 1; //好友ID
|
||||
}
|
||||
|
||||
message Friend_Del_Rsp {
|
||||
string friendId = 1; //好友ID
|
||||
string userId = 2; //用户ID
|
||||
}
|
||||
|
||||
//同意
|
||||
message Friend_Agree_Req {
|
||||
repeated string friendIds = 1; //被同意的用户
|
||||
}
|
||||
message Friend_Agree_Rsp {
|
||||
int32 Num = 1; //操作的数量
|
||||
}
|
||||
|
||||
//拒绝
|
||||
message Friend_Refuse_Req {
|
||||
repeated string friendIds = 1; //被拒绝的用户
|
||||
}
|
||||
message Friend_Refuse_Rsp {
|
||||
int32 Num = 1; //操作的数量
|
||||
}
|
||||
|
||||
//好友申请列表
|
||||
message Friend_ApplyList_Req {}
|
||||
message Friend_ApplyList_Rsp { repeated FriendBase list = 1; }
|
||||
|
||||
//好友搜索
|
||||
message Friend_Search_Req {
|
||||
string nickName = 1; //好友昵称
|
||||
}
|
||||
|
||||
message Friend_Search_Rsp { FriendBase friend = 1; }
|
||||
|
||||
//黑名单
|
||||
message Friend_BlackList_Req {}
|
||||
|
||||
message Friend_BlackList_Rsp { repeated FriendBase friends = 1; }
|
||||
|
||||
//添加黑名单
|
||||
message Friend_BlackAdd_Req { string friendId = 1; }
|
||||
|
||||
message Friend_BlackAdd_Rsp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
|
||||
//删除黑名单
|
||||
message Friend_DelBlack_Req { string friendId = 1; }
|
||||
|
||||
message Friend_DelBlack_Rsp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
|
||||
//接收
|
||||
message Friend_Receive_Req { string friendId = 1; }
|
||||
|
||||
message Friend_Receive_Rsp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
|
||||
//赠送
|
||||
message Friend_Give_Req { string friendId = 1; }
|
||||
|
||||
message Friend_Give_Rsp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
|
||||
//好友数量
|
||||
message Friend_Total_Req { string friendId = 1; }
|
||||
|
||||
message Friend_Total_Rsp {
|
||||
string friendId = 1;
|
||||
int32 total = 2; //好友数量
|
||||
}
|
158
src/pb/proto/google/protobuf/any.proto
Normal file
158
src/pb/proto/google/protobuf/any.proto
Normal file
@ -0,0 +1,158 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
option go_package = "google.golang.org/protobuf/types/known/anypb";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "AnyProto";
|
||||
option java_multiple_files = true;
|
||||
option objc_class_prefix = "GPB";
|
||||
|
||||
// `Any` contains an arbitrary serialized protocol buffer message along with a
|
||||
// URL that describes the type of the serialized message.
|
||||
//
|
||||
// Protobuf library provides support to pack/unpack Any values in the form
|
||||
// of utility functions or additional generated methods of the Any type.
|
||||
//
|
||||
// Example 1: Pack and unpack a message in C++.
|
||||
//
|
||||
// Foo foo = ...;
|
||||
// Any any;
|
||||
// any.PackFrom(foo);
|
||||
// ...
|
||||
// if (any.UnpackTo(&foo)) {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// Example 2: Pack and unpack a message in Java.
|
||||
//
|
||||
// Foo foo = ...;
|
||||
// Any any = Any.pack(foo);
|
||||
// ...
|
||||
// if (any.is(Foo.class)) {
|
||||
// foo = any.unpack(Foo.class);
|
||||
// }
|
||||
//
|
||||
// Example 3: Pack and unpack a message in Python.
|
||||
//
|
||||
// foo = Foo(...)
|
||||
// any = Any()
|
||||
// any.Pack(foo)
|
||||
// ...
|
||||
// if any.Is(Foo.DESCRIPTOR):
|
||||
// any.Unpack(foo)
|
||||
// ...
|
||||
//
|
||||
// Example 4: Pack and unpack a message in Go
|
||||
//
|
||||
// foo := &pb.Foo{...}
|
||||
// any, err := anypb.New(foo)
|
||||
// if err != nil {
|
||||
// ...
|
||||
// }
|
||||
// ...
|
||||
// foo := &pb.Foo{}
|
||||
// if err := any.UnmarshalTo(foo); err != nil {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// The pack methods provided by protobuf library will by default use
|
||||
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
||||
// methods only use the fully qualified type name after the last '/'
|
||||
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
||||
// name "y.z".
|
||||
//
|
||||
//
|
||||
// JSON
|
||||
//
|
||||
// The JSON representation of an `Any` value uses the regular
|
||||
// representation of the deserialized, embedded message, with an
|
||||
// additional field `@type` which contains the type URL. Example:
|
||||
//
|
||||
// package google.profile;
|
||||
// message Person {
|
||||
// string first_name = 1;
|
||||
// string last_name = 2;
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.profile.Person",
|
||||
// "firstName": <string>,
|
||||
// "lastName": <string>
|
||||
// }
|
||||
//
|
||||
// If the embedded message type is well-known and has a custom JSON
|
||||
// representation, that representation will be embedded adding a field
|
||||
// `value` which holds the custom JSON in addition to the `@type`
|
||||
// field. Example (for message [google.protobuf.Duration][]):
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.protobuf.Duration",
|
||||
// "value": "1.212s"
|
||||
// }
|
||||
//
|
||||
message Any {
|
||||
// A URL/resource name that uniquely identifies the type of the serialized
|
||||
// protocol buffer message. This string must contain at least
|
||||
// one "/" character. The last segment of the URL's path must represent
|
||||
// the fully qualified name of the type (as in
|
||||
// `path/google.protobuf.Duration`). The name should be in a canonical form
|
||||
// (e.g., leading "." is not accepted).
|
||||
//
|
||||
// In practice, teams usually precompile into the binary all types that they
|
||||
// expect it to use in the context of Any. However, for URLs which use the
|
||||
// scheme `http`, `https`, or no scheme, one can optionally set up a type
|
||||
// server that maps type URLs to message definitions as follows:
|
||||
//
|
||||
// * If no scheme is provided, `https` is assumed.
|
||||
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
||||
// value in binary format, or produce an error.
|
||||
// * Applications are allowed to cache lookup results based on the
|
||||
// URL, or have them precompiled into a binary to avoid any
|
||||
// lookup. Therefore, binary compatibility needs to be preserved
|
||||
// on changes to types. (Use versioned type names to manage
|
||||
// breaking changes.)
|
||||
//
|
||||
// Note: this functionality is not currently available in the official
|
||||
// protobuf release, and it is not used for type URLs beginning with
|
||||
// type.googleapis.com.
|
||||
//
|
||||
// Schemes other than `http`, `https` (or the empty scheme) might be
|
||||
// used with implementation specific semantics.
|
||||
//
|
||||
string type_url = 1;
|
||||
|
||||
// Must be a valid serialized protocol buffer of the above specified type.
|
||||
bytes value = 2;
|
||||
}
|
24
src/pb/proto/mail/mail_db.proto
Normal file
24
src/pb/proto/mail/mail_db.proto
Normal file
@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
// message Cache_mailData {
|
||||
// string UserID = 1;
|
||||
// repeated DB_MailData MailData = 2;
|
||||
// }
|
||||
|
||||
message MailAttachment { // 附件
|
||||
uint32 ItemId = 1; // 道具iD
|
||||
uint32 ItemCount = 2; // 数量
|
||||
}
|
||||
|
||||
message DB_MailData {
|
||||
string ObjId = 1; // @go_tags(`bson:"_id"`) ID
|
||||
string Uid = 2;
|
||||
string Title = 3; // 邮件标题
|
||||
string Contex = 4; // 邮件内容
|
||||
uint64 CreateTime = 5; // 发送时间
|
||||
uint64 DueTime = 6; // 过期时间
|
||||
bool Check = 7; // 是否查看
|
||||
bool Reward = 8; // 附件领取状态
|
||||
repeated MailAttachment Items = 9; // 附件
|
||||
}
|
39
src/pb/proto/mail/mail_msg.proto
Normal file
39
src/pb/proto/mail/mail_msg.proto
Normal file
@ -0,0 +1,39 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "mail/mail_db.proto";
|
||||
|
||||
message Mail_GetList_Req {
|
||||
|
||||
}
|
||||
|
||||
// 查询邮件信息
|
||||
message Mail_GetList_Resp {
|
||||
repeated DB_MailData Mails = 1;
|
||||
}
|
||||
|
||||
// 查看邮件
|
||||
message Mail_ReadMail_Req {
|
||||
string ObjID = 1;
|
||||
}
|
||||
|
||||
message Mail_ReadMail_Resp {
|
||||
DB_MailData Mail = 1;
|
||||
}
|
||||
|
||||
// 领取附件
|
||||
message Mail_GetUserMailAttachment_Req {
|
||||
string ObjID = 1;
|
||||
}
|
||||
|
||||
message Mail_GetUserMailAttachment_Resp {
|
||||
DB_MailData Mail = 1;
|
||||
}
|
||||
|
||||
// 删除某个邮件
|
||||
message Mail_DelMail_Req {
|
||||
string ObjID = 1;
|
||||
}
|
||||
|
||||
message Mail_DelMail_Resp {
|
||||
repeated DB_MailData Mail = 1;
|
||||
}
|
12
src/pb/proto/notify/notify_msg.proto
Normal file
12
src/pb/proto/notify/notify_msg.proto
Normal file
@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "errorcode.proto";
|
||||
|
||||
//统一错误码返回
|
||||
message ErrorNotify {
|
||||
string ReqMainType =1; // 请求协议模块 模块名 例如:user 对应项目中 user的模块
|
||||
string ReqSubType = 2; // 请求协议函数 例如:login 对应项目中 user的模块中 api_login 的处理函数
|
||||
ErrorCode Code = 3; // 执行返回错误码 对应 errorcode.proto 枚举
|
||||
string Message = 4; // 错误消息
|
||||
string Data = 6; // 错误数据
|
||||
}
|
15
src/pb/proto/pack/pack_db.proto
Normal file
15
src/pb/proto/pack/pack_db.proto
Normal file
@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
|
||||
//背包格子
|
||||
message DB_UserItemData {
|
||||
string gridId = 1; //@go_tags(`bson:"_id"`) 背包格子Id
|
||||
string uId = 2; //@go_tags(`bson:"uid"`) 用户id
|
||||
bool isEmpty = 3; //@go_tags(`bson:"isEmpty"`) 是否是空格子
|
||||
int32 itemId = 4; //@go_tags(`bson:"itemId"`) 存放物品的Id
|
||||
uint32 amount = 5; //@go_tags(`bson:"amount"`) 存放物品的数量
|
||||
int64 cTime = 6; //@go_tags(`bson:"cTime"`) 物品获取时间
|
||||
int64 eTime = 7; //@go_tags(`bson:"eTime"`) 物品过期时间
|
||||
bool isNewItem = 8; //@go_tags(`bson:"isNewItem"`) 是否是新的
|
||||
}
|
37
src/pb/proto/pack/pack_msg.proto
Normal file
37
src/pb/proto/pack/pack_msg.proto
Normal file
@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "pack/pack_db.proto";
|
||||
|
||||
//查询用户背包请求
|
||||
message Pack_Getlist_Req {
|
||||
int32 IType = 1; //道具类型
|
||||
}
|
||||
|
||||
//查询用户背包请求 回应
|
||||
message Pack_Getlist_Resp {
|
||||
repeated DB_UserItemData Grids = 1; //用户背包列表
|
||||
}
|
||||
|
||||
//使用物品请求
|
||||
message Pack_UseItem_Req {
|
||||
int32 GridId = 1; //格子Id
|
||||
int32 ItemId = 2; //物品Id
|
||||
uint32 Amount = 3; //使用数量
|
||||
}
|
||||
|
||||
//使用物品请求 回应
|
||||
message Pack_UseItem_Resp {
|
||||
|
||||
}
|
||||
|
||||
//出售道具请求sailitem
|
||||
message Pack_SellItem_Req {
|
||||
int32 GridId = 1; //格子Id
|
||||
int32 ItemId = 2; //物品Id
|
||||
uint32 Amount = 3; //使用数量
|
||||
}
|
||||
|
||||
//出售道具请求 回应
|
||||
message Pack_SellItem_Resp {
|
||||
|
||||
}
|
24
src/pb/proto/user/user_db.proto
Normal file
24
src/pb/proto/user/user_db.proto
Normal file
@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message Cache_UserData {
|
||||
string uid = 1;
|
||||
string SessionId = 2;
|
||||
string GatewayServiceId = 3;
|
||||
// DB_UserData UserData = 4; //@go_tags(`json:",inline"`)
|
||||
}
|
||||
|
||||
message DB_UserData {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
string uuid = 3; //@go_tags(`bson:"uuid"`) 玩家唯一uuid
|
||||
string binduid = 4; //@go_tags(`bson:"binduid"`) 玩家账号
|
||||
string name = 5; //@go_tags(`bson:"name"`) 玩家名
|
||||
int32 sid = 6; //@go_tags(`bson:"sid"`) 区服id
|
||||
string createip = 7; //@go_tags(`bson:"createip"`) 创建账号时的ip
|
||||
string lastloginip = 8; //@go_tags(`bson:"lastloginip"`) 最后一次登录时的ip
|
||||
int64 ctime = 9; //@go_tags(`bson:"ctime"`) 玩家创号时间戳
|
||||
int64 logintime = 10; //@go_tags(`bson:"logintime"`) 最后一次登录时间
|
||||
int32 friendPoint = 11; //@go_tags(`bson:"friendPoint"`) 友情点
|
||||
int32 avatar = 12; //@go_tags(`bson:"avatar"`) 头像
|
||||
}
|
31
src/pb/proto/user/user_msg.proto
Normal file
31
src/pb/proto/user/user_msg.proto
Normal file
@ -0,0 +1,31 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "errorcode.proto";
|
||||
import "user/user_db.proto";
|
||||
|
||||
//用户登录
|
||||
message UserLoginReq {
|
||||
string account = 1; //账号
|
||||
int32 sid = 2; //区服编号
|
||||
}
|
||||
|
||||
message UserLoginResp { DB_UserData data = 1; }
|
||||
|
||||
message UserRegisterReq {
|
||||
string account = 1;
|
||||
int32 sid = 2;
|
||||
}
|
||||
|
||||
message UserRegisterRsp {
|
||||
ErrorCode Code = 1;
|
||||
string account = 2;
|
||||
}
|
||||
|
||||
message UserLoadRsp { Cache_UserData data = 1; }
|
||||
|
||||
//创角
|
||||
message UserCreateReq {
|
||||
string NickName = 1; //昵称
|
||||
}
|
||||
|
||||
message UserCreateRsp {}
|
17
src/plugins/vuetify/vuetify.js
Normal file
17
src/plugins/vuetify/vuetify.js
Normal file
@ -0,0 +1,17 @@
|
||||
// Styles
|
||||
import '@mdi/font/css/materialdesignicons.css'
|
||||
import { aliases, mdi } from 'vuetify/iconsets/mdi'
|
||||
import 'vuetify/styles'
|
||||
|
||||
// Vuetify
|
||||
import { createVuetify } from 'vuetify'
|
||||
|
||||
export default createVuetify({
|
||||
icons: {
|
||||
defaultSet: 'mdi',
|
||||
aliases,
|
||||
sets: {
|
||||
mdi,
|
||||
}
|
||||
},
|
||||
})
|
15
src/plugins/vuetify/webfontloader.js
Normal file
15
src/plugins/vuetify/webfontloader.js
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* plugins/webfontloader.js
|
||||
*
|
||||
* webfontloader documentation: https://github.com/typekit/webfontloader
|
||||
*/
|
||||
|
||||
export async function loadFonts () {
|
||||
const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
|
||||
|
||||
webFontLoader.load({
|
||||
google: {
|
||||
families: ['Roboto:100,300,400,500,700,900&display=swap'],
|
||||
},
|
||||
})
|
||||
}
|
58
src/router/index.js
Normal file
58
src/router/index.js
Normal file
@ -0,0 +1,58 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import layout from '@/layout/deflayout.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'index',
|
||||
redirect: '/index',
|
||||
component: layout,
|
||||
meta: { title: '欢迎页', icon: 'mdi-home' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/Index.vue'),
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/protocol',
|
||||
name: 'Protocol',
|
||||
redirect: '/protocol/index',
|
||||
component: layout,
|
||||
meta: { title: '协议测试', icon: 'mdi-protocol' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/protocol/Index.vue'),
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
export function getroutes () {
|
||||
var rs = []
|
||||
for (const route of routes) {
|
||||
var temproute = { path: route.path, component: route.component, meta: route.meta }
|
||||
temproute.children = null
|
||||
if (route.children && route.children.length > 0) {
|
||||
temproute.children = []
|
||||
for (const child of route.children) {
|
||||
var tempchild = { path: child.path, component: child.component, meta: child.meta }
|
||||
temproute.children.push(tempchild)
|
||||
}
|
||||
}
|
||||
rs.push(temproute)
|
||||
}
|
||||
return rs
|
||||
}
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes
|
||||
})
|
||||
|
||||
|
||||
|
||||
export default router
|
5
src/store/getters.js
Normal file
5
src/store/getters.js
Normal file
@ -0,0 +1,5 @@
|
||||
const getters = {
|
||||
appname: state => state.app.appname,
|
||||
routes: state => state.app.routes,
|
||||
}
|
||||
export default getters
|
18
src/store/index.js
Normal file
18
src/store/index.js
Normal file
@ -0,0 +1,18 @@
|
||||
// 这里跟vue2有点区别,vue2中是直接导入vue,然后通过vue.use(xxx)
|
||||
import { createStore } from 'vuex'
|
||||
import getters from './getters'
|
||||
|
||||
//因为我把模块拆分了,但是我又不想每次都导入,就通过这个自动导入modules目录下的模块
|
||||
const modulesFiles = require.context('./modules', true, /\.js$/);
|
||||
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
|
||||
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
|
||||
const value = modulesFiles(modulePath)
|
||||
modules[moduleName] = value.default
|
||||
return modules
|
||||
}, {})
|
||||
|
||||
// 调用createStore
|
||||
export default createStore({
|
||||
getters,
|
||||
modules
|
||||
})
|
21
src/store/modules/app.js
Normal file
21
src/store/modules/app.js
Normal file
@ -0,0 +1,21 @@
|
||||
import { getroutes } from '@/router'
|
||||
|
||||
const state = {
|
||||
appname: "乐谷游戏-梦工厂",
|
||||
routes: getroutes(),
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
|
||||
}
|
||||
|
||||
const actions = {
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
228
src/utils/socket.js
Normal file
228
src/utils/socket.js
Normal file
@ -0,0 +1,228 @@
|
||||
// 在Vue中使用,不需要可以去除以下引用
|
||||
import Vue from 'vue'
|
||||
import storage from 'store'
|
||||
|
||||
// 导出socket对象
|
||||
export {
|
||||
socket
|
||||
}
|
||||
|
||||
// socket主要对象
|
||||
var socket = {
|
||||
websock: null,
|
||||
// 固定的WebSocket地址:此处是从env文件中读取socket地址,可以自行从其他config文件中读取或直接写死
|
||||
// 如需使用动态WebSocket地址,请自行作ajax通讯后扩展
|
||||
ws_url: process.env.VUE_APP_API_SOCKET_URL,
|
||||
// 开启标识
|
||||
socket_open: false,
|
||||
// 心跳timer
|
||||
hearbeat_timer: null,
|
||||
// 心跳发送频率
|
||||
hearbeat_interval: 5000,
|
||||
|
||||
// 是否自动重连
|
||||
is_reonnect: true,
|
||||
// 重连次数
|
||||
reconnect_count: 3,
|
||||
// 已发起重连次数
|
||||
reconnect_current: 1,
|
||||
// 重连timer
|
||||
reconnect_timer: null,
|
||||
// 重连频率
|
||||
reconnect_interval: 3000,
|
||||
|
||||
/**
|
||||
* 初始化连接
|
||||
*/
|
||||
init: () => {
|
||||
if (!("WebSocket" in window)) {
|
||||
console.log('浏览器不支持WebSocket')
|
||||
return null
|
||||
}
|
||||
|
||||
// 已经创建过连接不再重复创建
|
||||
if (socket.websock) {
|
||||
return socket.websock
|
||||
}
|
||||
|
||||
socket.websock = new WebSocket(socket.ws_url)
|
||||
socket.websock.onmessage = function (e) {
|
||||
socket.receive(e)
|
||||
}
|
||||
|
||||
// 关闭连接
|
||||
socket.websock.onclose = function (e) {
|
||||
console.log('连接已断开')
|
||||
console.log('connection closed (' + e.code + ')')
|
||||
clearInterval(socket.hearbeat_interval)
|
||||
socket.socket_open = false
|
||||
|
||||
// 需要重新连接
|
||||
if (socket.is_reonnect) {
|
||||
socket.reconnect_timer = setTimeout(() => {
|
||||
// 超过重连次数
|
||||
if (socket.reconnect_current > socket.reconnect_count) {
|
||||
clearTimeout(socket.reconnect_timer)
|
||||
return
|
||||
}
|
||||
|
||||
// 记录重连次数
|
||||
socket.reconnect_current++
|
||||
socket.reconnect()
|
||||
}, socket.reconnect_interval)
|
||||
}
|
||||
}
|
||||
|
||||
// 连接成功
|
||||
socket.websock.onopen = function () {
|
||||
console.log('连接成功')
|
||||
socket.socket_open = true
|
||||
socket.is_reonnect = true
|
||||
// 开启心跳
|
||||
socket.heartbeat()
|
||||
}
|
||||
|
||||
// 连接发生错误
|
||||
socket.websock.onerror = function () {
|
||||
console.log('WebSocket连接发生错误')
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 发送消息
|
||||
* @param {*} data 发送数据
|
||||
* @param {*} callback 发送后的自定义回调函数
|
||||
*/
|
||||
send: (data, callback = null) => {
|
||||
// 开启状态直接发送
|
||||
if (socket.websock.readyState === socket.websock.OPEN) {
|
||||
socket.websock.send(JSON.stringify(data))
|
||||
|
||||
if (callback) {
|
||||
callback()
|
||||
}
|
||||
|
||||
// 正在开启状态,则等待1s后重新调用
|
||||
} else if (socket.websock.readyState === socket.websock.CONNECTING) {
|
||||
setTimeout(function () {
|
||||
socket.send(data, callback)
|
||||
}, 1000)
|
||||
|
||||
// 未开启,则等待1s后重新调用
|
||||
} else {
|
||||
socket.init()
|
||||
setTimeout(function () {
|
||||
socket.send(data, callback)
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 接收消息
|
||||
* @param {*} message 接收到的消息
|
||||
*/
|
||||
receive: (message) => {
|
||||
var params = JSON.parse(message.data)
|
||||
|
||||
if (params.kind != 0) {
|
||||
console.log('收到服务器内容:', message.data)
|
||||
}
|
||||
|
||||
if (params == undefined) {
|
||||
console.log("收到服务器空内容")
|
||||
return false
|
||||
}
|
||||
|
||||
// 以下是接收消息后的业务处理,仅供参考
|
||||
|
||||
// 被服务器强制断开
|
||||
if (params.kind != undefined && params.kind == 110) {
|
||||
socket.socket_open = false
|
||||
socket.is_reonnect = true
|
||||
|
||||
// 被服务器踢掉
|
||||
} else if (params.kind == 99) {
|
||||
socket.socket_open = true
|
||||
socket.is_reonnect = false
|
||||
console.log("被挤下线 不做处理")
|
||||
return false
|
||||
} else if (params.kind == 'order_new') {
|
||||
console.log('有新的订单通知')
|
||||
var time = Date.parse(new Date()) / 1000
|
||||
params.timestamp = parseInt(params.timestamp)
|
||||
|
||||
console.log(time - params.timestamp)
|
||||
|
||||
// 测试环境不限制推送时间
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
// 小于半小时push和播放 大于半小时并且小于3天只push 大于3天不处理
|
||||
if ((time - params.timestamp) > 3600 * 24 * 3) {
|
||||
console.log('超过三天')
|
||||
return false
|
||||
}
|
||||
|
||||
if ((time - params.timestamp) > 30 * 60 && (time - params.timestamp) < 3600 * 24 * 3) {
|
||||
console.log('超过半小时')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// uniapp中可以使用$on和$emit来实现对应的业务处理
|
||||
|
||||
} else if (params.kind == 'refund_created') {
|
||||
console.log('有新的退款订单')
|
||||
|
||||
}
|
||||
|
||||
if (params.kind == 'order_new' || params.kind == 'refund_created') {
|
||||
console.log('订单列表刷新')
|
||||
|
||||
}
|
||||
|
||||
// 自行扩展其他业务处理...
|
||||
},
|
||||
|
||||
/**
|
||||
* 心跳
|
||||
*/
|
||||
heartbeat: () => {
|
||||
console.log('socket', 'ping')
|
||||
if (socket.hearbeat_timer) {
|
||||
clearInterval(socket.hearbeat_timer)
|
||||
}
|
||||
|
||||
socket.hearbeat_timer = setInterval(() => {
|
||||
const token = storage.get('Access-Token')
|
||||
var data = {
|
||||
kind: 0, //请求类型 kind 0 心跳包
|
||||
shop_id: Vue.prototype.$shop_id(false), //如果是商家 传当前店铺ID 否则可不传
|
||||
'API-Token': token, //用户的token
|
||||
'API-Source': 'MERCHANT', // MERCHANT 商家 CUSTOMER 顾客
|
||||
}
|
||||
socket.send(data)
|
||||
}, socket.hearbeat_interval)
|
||||
},
|
||||
|
||||
/**
|
||||
* 主动关闭连接
|
||||
*/
|
||||
close: () => {
|
||||
console.log('主动断开连接')
|
||||
clearInterval(socket.hearbeat_timer)
|
||||
socket.is_reonnect = false
|
||||
socket.websock.close()
|
||||
},
|
||||
|
||||
/**
|
||||
* 重新连接
|
||||
*/
|
||||
reconnect: () => {
|
||||
console.log('发起重新连接', socket.reconnect_current)
|
||||
|
||||
if (socket.websock && socket.socket_open) {
|
||||
socket.websock.close()
|
||||
}
|
||||
|
||||
socket.init()
|
||||
},
|
||||
}
|
13
src/views/Index.vue
Normal file
13
src/views/Index.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<v-container>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'IndexView',
|
||||
components: {},
|
||||
})
|
||||
</script>
|
16
src/views/protocol/Index.vue
Normal file
16
src/views/protocol/Index.vue
Normal file
@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-card-title>
|
||||
协议测试
|
||||
</v-card-title>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Protocol',
|
||||
components: {},
|
||||
})
|
||||
</script>
|
@ -1,4 +1,10 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
lintOnSave: false,
|
||||
transpileDependencies: true,
|
||||
pluginOptions: {
|
||||
vuetify: {
|
||||
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vuetify-loader
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user