Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
model-entity
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rust common
model-entity
Commits
a61f379e
Commit
a61f379e
authored
Oct 16, 2024
by
xuwencheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login
parent
1295e3eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
mod.rs
src/login/mod.rs
+19
-2
No files found.
src/login/mod.rs
View file @
a61f379e
...
...
@@ -6,8 +6,12 @@ pub struct LoginInfo {
pub
group_id
:
i64
,
// 店铺id
pub
seller_id
:
i64
,
// 店铺名
pub
seller_name
:
Option
<
String
>
,
// 门店id
pub
store_id
:
i64
,
// 门店名
pub
store_name
:
Option
<
String
>
,
// 店铺类型
pub
brand_type
:
i32
,
// token
...
...
@@ -26,8 +30,12 @@ pub struct StoreInfo {
pub
group_id
:
i64
,
// 店铺id
pub
seller_id
:
i64
,
// 店铺名
pub
seller_name
:
Option
<
String
>
,
// 门店id
pub
store_id
:
i64
,
// 门店名
pub
store_name
:
Option
<
String
>
,
// 店铺类型
pub
brand_type
:
i32
,
}
...
...
@@ -42,11 +50,20 @@ impl StoreInfo {
}
pub
fn
login_info
(
&
self
,
token
:
impl
AsRef
<
str
>
)
->
LoginInfo
{
let
StoreInfo
{
group_id
,
seller_id
,
store_id
,
brand_type
}
=
*
self
;
let
StoreInfo
{
group_id
,
seller_id
,
seller_name
,
store_id
,
store_name
,
brand_type
,
}
=
self
.clone
();
LoginInfo
{
group_id
,
seller_id
,
seller_name
,
store_id
,
store_name
,
brand_type
,
token
:
token
.as_ref
()
.to_string
(),
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment