Commit a61f379e authored by xuwencheng's avatar xuwencheng

login

parent 1295e3eb
......@@ -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(),
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment