Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
Hiven 2023-08-15 14:52:04 +08:00
commit e8f7bda7b2
39 changed files with 27 additions and 54 deletions

View File

@ -12,8 +12,6 @@ const (
WEBSOCKET_REQUEST_RESUME_LAST_CONNECT = "WEBSOCKET_REQUEST_RESUME_LAST_CONNECT" WEBSOCKET_REQUEST_RESUME_LAST_CONNECT = "WEBSOCKET_REQUEST_RESUME_LAST_CONNECT"
//请求恢复为上次连接的标识错误 //请求恢复为上次连接的标识错误
WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR = "WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR" WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR = "WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR"
//请求恢复为上次连接的标识成功
WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_SUCCESS = "WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_SUCCESS"
//渲染前数据组装 //渲染前数据组装
WEBSOCKET_RENDER_IMAGE_ASSEMBLE = "WEBSOCKET_RENDER_IMAGE_ASSEMBLE" WEBSOCKET_RENDER_IMAGE_ASSEMBLE = "WEBSOCKET_RENDER_IMAGE_ASSEMBLE"
//图片渲染 //图片渲染

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/utils/auth" "fusenapi/utils/auth"
@ -23,7 +22,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
})) }))
defer server.Stop() defer server.Stop()

View File

@ -1,6 +1,7 @@
Name: assistant Name: assistant
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9950 Port: 9950
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/backend/internal/config" "fusenapi/server/backend/internal/config"
"fusenapi/server/backend/internal/handler" "fusenapi/server/backend/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: backend Name: backend
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9901 Port: 9901
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen_backend_2023 AccessSecret: fusen_backend_2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/utils/auth" "fusenapi/utils/auth"
@ -23,7 +22,7 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
})) }))
defer server.Stop() defer server.Stop()

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/canteen/internal/config" "fusenapi/server/canteen/internal/config"
"fusenapi/server/canteen/internal/handler" "fusenapi/server/canteen/internal/handler"
@ -23,8 +22,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: canteen Name: canteen
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9902 Port: 9902
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -8,7 +8,6 @@ import (
svc2 "fusenapi/server/data-transfer/internal/svc" svc2 "fusenapi/server/data-transfer/internal/svc"
"fusenapi/utils/auth" "fusenapi/utils/auth"
"net/http" "net/http"
"time"
"github.com/zeromicro/go-zero/core/conf" "github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest" "github.com/zeromicro/go-zero/rest"
@ -21,7 +20,6 @@ func main() {
var c config2.Config var c config2.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: data-transfer Name: data-transfer
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9903 Port: 9903
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -1,6 +1,7 @@
Name: home-user-auth Name: home-user-auth
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9904 Port: 9904
Timeout: 15000 #服务超时时间
MainAddress: "http://localhost:9900" MainAddress: "http://localhost:9900"
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/home-user-auth/internal/config" "fusenapi/server/home-user-auth/internal/config"
"fusenapi/server/home-user-auth/internal/handler" "fusenapi/server/home-user-auth/internal/handler"
@ -23,7 +22,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,7 +1,7 @@
Name: inventory Name: inventory
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9905 Port: 9905
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/inventory/internal/config" "fusenapi/server/inventory/internal/config"
"fusenapi/server/inventory/internal/handler" "fusenapi/server/inventory/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: map-library Name: map-library
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9906 Port: 9906
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/map-library/internal/config" "fusenapi/server/map-library/internal/config"
"fusenapi/server/map-library/internal/handler" "fusenapi/server/map-library/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: orders Name: orders
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9907 Port: 9907
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/orders/internal/config" "fusenapi/server/orders/internal/config"
"fusenapi/server/orders/internal/handler" "fusenapi/server/orders/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: pay Name: pay
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9915 Port: 9915
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/utils/auth" "fusenapi/utils/auth"
@ -23,7 +22,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
})) }))
defer server.Stop() defer server.Stop()

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/product-model/internal/config" "fusenapi/server/product-model/internal/config"
"fusenapi/server/product-model/internal/handler" "fusenapi/server/product-model/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: product-template-tag Name: product-template-tag
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9917 Port: 9917
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/utils/auth" "fusenapi/utils/auth"
@ -23,7 +22,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
})) }))
defer server.Stop() defer server.Stop()

View File

@ -1,6 +1,7 @@
Name: product-template Name: product-template
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9910 Port: 9910
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/product-template/internal/config" "fusenapi/server/product-template/internal/config"
"fusenapi/server/product-template/internal/handler" "fusenapi/server/product-template/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: product Name: product
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9908 Port: 9908
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/product/internal/config" "fusenapi/server/product/internal/config"
"fusenapi/server/product/internal/handler" "fusenapi/server/product/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: render Name: render
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9919 Port: 9919
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -7,7 +7,6 @@ import (
"fusenapi/constants" "fusenapi/constants"
"fusenapi/server/render/consumer" "fusenapi/server/render/consumer"
"net/http" "net/http"
"time"
"fusenapi/utils/auth" "fusenapi/utils/auth"
@ -26,7 +25,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
})) }))
defer server.Stop() defer server.Stop()

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/utils/auth" "fusenapi/utils/auth"
@ -23,7 +22,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
})) }))
defer server.Stop() defer server.Stop()

View File

@ -1,6 +1,7 @@
Name: shopping-cart-confirmation Name: shopping-cart-confirmation
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9911 Port: 9911
Timeout: 15000 #服务超时时间
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/shopping-cart-confirmation/internal/config" "fusenapi/server/shopping-cart-confirmation/internal/config"
"fusenapi/server/shopping-cart-confirmation/internal/handler" "fusenapi/server/shopping-cart-confirmation/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: upload Name: upload
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9912 Port: 9912
Timeout: 15000 #服务超时时间
SourceMysql: "fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest" SourceMysql: "fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest"
Env: "test" Env: "test"
Auth: Auth:

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/upload/internal/config" "fusenapi/server/upload/internal/config"
"fusenapi/server/upload/internal/handler" "fusenapi/server/upload/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -1,6 +1,7 @@
Name: webset Name: webset
Host: 0.0.0.0 Host: 0.0.0.0
Port: 9913 Port: 9913
Timeout: 15000 #服务超时时间
SourceMysql: "fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest" SourceMysql: "fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest"
Auth: Auth:
AccessSecret: fusen2023 AccessSecret: fusen2023

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"net/http" "net/http"
"time"
"fusenapi/server/webset/internal/config" "fusenapi/server/webset/internal/config"
"fusenapi/server/webset/internal/handler" "fusenapi/server/webset/internal/handler"
@ -22,7 +21,6 @@ func main() {
var c config.Config var c config.Config
conf.MustLoad(*configFile, &c) conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) { server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@ -59,7 +59,6 @@ func (w *wsConnectItem) renderImage(data []byte) {
renderImageData.RenderData.Logo = "https://s3.us-west-1.amazonaws.com/storage.fusenpack.com/f5ccd11365099fa47a6316b1cd639f6dd6064dcd2d37c8d2fcd0a322160b33cc" renderImageData.RenderData.Logo = "https://s3.us-west-1.amazonaws.com/storage.fusenpack.com/f5ccd11365099fa47a6316b1cd639f6dd6064dcd2d37c8d2fcd0a322160b33cc"
} else { } else {
renderImageData.RenderData.Logo = *userMaterial.ResourceUrl renderImageData.RenderData.Logo = *userMaterial.ResourceUrl
renderImageData.RenderData.UserMaterialId = userMaterial.Id
} }
//用户id赋值 //用户id赋值
renderImageData.RenderData.UserId = w.userId renderImageData.RenderData.UserId = w.userId

View File

@ -21,7 +21,7 @@ func (w *wsConnectItem) resumeLateConnect(data []byte) {
} }
//重新绑定 //重新绑定
w.uniqueId = clientId w.uniqueId = clientId
rsp := w.respondDataFormat(constants.WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_SUCCESS, clientId) rsp := w.respondDataFormat(constants.WEBSOCKET_CONNECT_SUCCESS, clientId)
w.sendToOutChan(rsp) w.sendToOutChan(rsp)
return return
} }

View File

@ -12,16 +12,15 @@ type RenderImageReqMsg struct {
RenderData RenderData `json:"render_data"` RenderData RenderData `json:"render_data"`
} }
type RenderData struct { type RenderData struct {
TemplateTag string `json:"template_tag"` //模板标签 TemplateTag string `json:"template_tag"` //模板标签(必须)
ProductId int64 `json:"product_id"` //产品id ProductId int64 `json:"product_id"` //产品id(必须)
UserMaterialId int64 `json:"user_material_id"` //用户素材id Website string `json:"website"` //网站(可选)
Logo string `json:"logo"` //log资源地址(websocket连接建立再赋值) Slogan string `json:"slogan"` //slogan(可选)
Website string `json:"website"` //网站 Address string `json:"address"` //地址(可选)
Slogan string `json:"slogan"` //slogan Phone string `json:"phone"` //电话(可选)
Address string `json:"address"` //地址 UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值)
Phone string `json:"phone"` //电话 GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值)
UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值) Logo string `json:"logo"` //log资源地址(websocket连接建立再赋值)
GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值)
} }
// websocket发送渲染完的数据 // websocket发送渲染完的数据