Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
24621eae
Commit
24621eae
authored
Jun 11, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b0bf25a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
382 additions
and
337 deletions
+382
-337
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+13
-336
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+368
-1
Startup.cs
Mall.WebApi/Startup.cs
+1
-0
No files found.
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
24621eae
...
...
@@ -66,15 +66,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
private
readonly
UserModule
userModule
=
new
UserModule
();
/// <summary>
/// 小程序基础配置
/// </summary>
private
readonly
MallBaseModule
mallBaseModule
=
new
MallBaseModule
();
/// <summary>
/// 用户积分
/// </summary>
private
readonly
IntegralModule
integralModule
=
new
IntegralModule
();
/// <summary>
/// 小程序页面处理类
...
...
@@ -109,11 +101,17 @@ namespace Mall.WebApi.Controllers.MallBase
miniProgram
=
programModule
.
GetMiniProgramModule
(
new
Model
.
Extend
.
User
.
RB_MiniProgram_Extend
()
{
MiniAppId
=
MiniAppId
},
isGetHomeData
:
true
,
isGetNav
:
1
);
}
int
page_id
=
parms
.
GetInt
(
"page_id"
);
//首页数据
var
homePage
=
new
object
();
//底部导航
var
navbar
=
new
object
();
//基础配置
var
setting
=
new
object
();
//分销基础信息
var
share_setting
=
new
object
();
//分销设置
var
share_setting_custom
=
new
object
();
//商品分类样式
var
cat_style
=
new
object
();
//授权页面
var
auth_page
=
new
object
();
...
...
@@ -339,328 +337,12 @@ namespace Mall.WebApi.Controllers.MallBase
};
}
}
#
region
基本设置
//基础配置 Add By:W 2020年6月1号
var
mallBaseModel
=
mallBaseModule
.
GetListRepository
(
new
RB_MallBase_Extend
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
if
(
mallBaseModel
==
null
)
{
mallBaseModel
=
new
RB_MallBase_Extend
();
}
//获取物流配置
var
logisticsRules
=
mallBaseModule
.
GetLogisticsList
(
new
RB_Logistics
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
if
(
logisticsRules
==
null
)
{
logisticsRules
=
new
RB_Logistics
();
}
//用户积分
var
integralModel
=
integralModule
.
GetIntegralSettingsList
(
new
RB_Integral_Settings
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
if
(
integralModel
==
null
)
{
integralModel
=
new
RB_Integral_Settings
();
}
List
<
string
>
payment_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
PayWay
))
{
foreach
(
var
item
in
mallBaseModel
.
PayWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
payment_type
.
Add
(
"online_pay"
);
break
;
case
"2"
:
payment_type
.
Add
(
"huodao"
);
break
;
case
"3"
:
payment_type
.
Add
(
"balance"
);
break
;
default
:
break
;
}
}
}
List
<
string
>
send_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
DeliverWay
))
{
foreach
(
var
item
in
mallBaseModel
.
DeliverWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
send_type
.
Add
(
"express"
);
break
;
case
"2"
:
send_type
.
Add
(
"offline"
);
break
;
case
"3"
:
send_type
.
Add
(
"city"
);
break
;
default
:
break
;
}
}
}
List
<
string
>
good_negotiable
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
ConsultWay
))
{
foreach
(
var
item
in
mallBaseModel
.
ConsultWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
good_negotiable
.
Add
(
"contact"
);
break
;
case
"2"
:
good_negotiable
.
Add
(
"contact_tel"
);
break
;
case
"3"
:
good_negotiable
.
Add
(
"contact_web"
);
break
;
default
:
break
;
}
}
}
setting
=
new
{
contact_tel
=
mallBaseModel
?.
ContactNumber
,
over_time
=
mallBaseModel
?.
CancelTime
,
delivery_time
=
mallBaseModel
?.
AutoReceiving
,
after_sale_time
=
mallBaseModel
?.
AfterTime
,
payment_type
=
payment_type
.
ToArray
(),
//支付方式
send_type
=
send_type
.
ToArray
(),
//发货方式
kdniao_mch_id
=
logisticsRules
?.
ExpressBirdID
,
//快递鸟配置
kdniao_api_key
=
logisticsRules
?.
ExpressBirdAPIKey
,
member_integral
=
integralModel
?.
IntegralNum
,
member_integral_rule
=
integralModel
?.
Explain
,
good_negotiable
=
good_negotiable
.
ToArray
(),
//商品面议联系方式
mobile_verify
=
""
,
is_small_app
=
mallBaseModel
?.
TurnMini
,
small_app_id
=
mallBaseModel
?.
MinAppId
,
small_app_url
=
mallBaseModel
?.
MinUrl
,
small_app_pic
=
mallBaseModel
?.
TurnMiniIco
,
is_customer_services
=
mallBaseModel
?.
OnlineService
,
customer_services_pic
=
mallBaseModel
?.
OnlineServiceIco
,
is_dial
=
mallBaseModel
?.
OneCall
,
dial_pic
=
mallBaseModel
?.
OneCallIco
,
is_web_service
=
mallBaseModel
?.
ServiceOutLink
,
web_service_url
=
mallBaseModel
?.
OuterServiceLink
,
web_service_pic
=
mallBaseModel
?.
ServiceOutLinkIco
,
is_quick_navigation
=
mallBaseModel
?.
SuspendBtn
,
quick_navigation_style
=
mallBaseModel
?.
SuspendStyle
,
quick_navigation_opened_pic
=
mallBaseModel
?.
UnfoldIco
,
quick_navigation_closed_pic
=
mallBaseModel
?.
PackUpIco
,
is_show_stock
=
""
,
is_use_stock
=
""
,
sell_out_pic
=
""
,
sell_out_other_pic
=
""
,
is_common_user_member_price
=
mallBaseModel
?.
DetailsMemberPrice
,
is_member_user_member_price
=
mallBaseModel
?.
DetailsVipMemberPrice
,
is_share_price
=
mallBaseModel
?.
DetailsSharePrice
,
is_purchase_frame
=
mallBaseModel
?.
BuySwitch
,
purchase_num
=
mallBaseModel
?.
CarouselOrder
,
is_comment
=
mallBaseModel
?.
DetailsComment
,
is_sales
=
mallBaseModel
?.
DetailsBuyNum
,
is_mobile_auth
=
mallBaseModel
?.
OtherIndexMoblie
,
is_official_account
=
mallBaseModel
?.
OtherTencent
,
is_manual_mobile_auth
=
mallBaseModel
?.
OtherManualMobile
,
is_icon_members_grade
=
mallBaseModel
?.
OtherMemerLevel
,
is_goods_video
=
mallBaseModel
?.
DetailsVideo
,
is_quick_map
=
mallBaseModel
?.
ShortcutNavigation
,
quick_map_pic
=
mallBaseModel
?.
ShortcutNavigationIco
,
quick_map_address
=
mallBaseModel
?.
Address
,
longitude
=
mallBaseModel
?.
LongAndLat
.
Split
(
","
)[
0
],
latitude
=
mallBaseModel
?.
LongAndLat
.
Split
(
","
)[
1
],
is_quick_home
=
mallBaseModel
?.
BackTopNavigation
,
quick_home_pic
=
mallBaseModel
?.
BackTopNavigationIco
,
logo
=
""
,
share_title
=
mallBaseModel
?.
MinShareTitle
,
share_pic
=
mallBaseModel
?.
MinShareIco
,
is_add_app
=
mallBaseModel
?.
MinSwitch
,
add_app_bg_color
=
mallBaseModel
?.
MinBackColor
,
add_app_bg_transparency
=
mallBaseModel
?.
MinBackClarity
,
add_app_bg_radius
=
mallBaseModel
?.
MinBackCircularBead
,
add_app_text
=
mallBaseModel
?.
MinTips
,
add_app_text_color
=
mallBaseModel
?.
MinTipsColor
,
add_app_icon_color_type
=
mallBaseModel
?.
MinIcoColor
,
is_close
=
""
,
business_time_type
=
""
,
business_time_custom_type
=
""
,
business_time_type_day
=
""
,
business_time_type_week
=
""
,
auto_business
=
""
,
auto_business_time
=
""
,
is_icon_super_vip
=
""
,
is_show_normal_vip
=
""
,
is_show_super_vip
=
""
,
is_required_position
=
mallBaseModel
?.
OtherMustAddress
,
is_share_tip
=
mallBaseModel
?.
OtherApplyShare
,
is_show_cart
=
mallBaseModel
?.
ListShopCar
,
is_show_sales_num
=
mallBaseModel
?.
ListBuyCount
,
is_show_goods_name
=
mallBaseModel
?.
ListName
,
is_underline_price
=
mallBaseModel
?.
DetailsLineationPrice
,
is_express
=
mallBaseModel
?.
DeatilsExpress
,
is_not_share_show
=
mallBaseModel
?.
OtherNoShare
,
is_show_cart_fly
=
mallBaseModel
?.
CarSuspendBtn
,
is_show_score_top
=
mallBaseModel
?.
BackTopBtn
,
express_select_type
=
logisticsRules
?.
LogisticsType
,
//待会儿处理
express_aliapy_code
=
logisticsRules
?.
AliyunAppCode
,
is_quick_customize
=
mallBaseModel
?.
Custom
,
quick_customize_pic
=
mallBaseModel
?.
TurnIco
,
quick_customize_open_type
=
""
,
quick_customize_params
=
""
,
quick_customize_link_url
=
mallBaseModel
?.
TurnLink
,
quick_customize_new_params
=
""
,
theme_color
=
""
,
latitude_longitude
=
mallBaseModel
?.
LongAndLat
};
#
endregion
#
region
分销基础信息
var
distributorBasics
=
userModule
.
GetDistributorBasicsInfo
((
miniProgram
.
TenantId
??
0
).
ToString
(),
miniProgram
.
MallBaseId
);
if
(!
string
.
IsNullOrEmpty
(
distributorBasics
.
WithdrawWay
))
{
distributorBasics
.
WithdrawWayList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
distributorBasics
.
WithdrawWay
);
}
List
<
string
>
pay_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
distributorBasics
.
WithdrawWay
))
{
foreach
(
var
item
in
distributorBasics
.
WithdrawWayList
)
{
switch
(
item
)
{
case
1
:
pay_type
.
Add
(
"auto"
);
break
;
case
2
:
pay_type
.
Add
(
"wechat"
);
break
;
case
3
:
pay_type
.
Add
(
"alipay"
);
break
;
case
4
:
pay_type
.
Add
(
"bank"
);
break
;
case
5
:
pay_type
.
Add
(
"balance"
);
break
;
default
:
break
;
}
}
}
share_setting
=
new
{
level
=
distributorBasics
?.
DistributorTier
,
is_rebate
=
distributorBasics
?.
InPurchasing
,
price_type
=
distributorBasics
?.
DistributorCommissionType
,
first
=
distributorBasics
?.
OneCommission
,
second
=
distributorBasics
?.
TwoCommission
,
third
=
distributorBasics
?.
ThreeCommission
,
share_condition
=
""
,
condition
=
distributorBasics
?.
ReferralsCondition
??
0
,
auto_share_val
=
""
,
share_goods_status
=
""
,
share_goods_warehouse_id
=
""
,
pay_type
=
pay_type
.
ToArray
(),
cash_max_day
=
distributorBasics
?.
DailyWithdrawalLimit
,
min_money
=
distributorBasics
?.
MinimumWithdrawalLimit
,
cash_service_charge
=
distributorBasics
?.
WithdrawFee
,
agree
=
distributorBasics
?.
ApplicationProtocol
,
content
=
distributorBasics
?.
UserNotes
,
pic_url_apply
=
""
,
pic_url_status
=
distributorBasics
?.
BackgroundImage
,
pic_url_home_head
=
distributorBasics
?.
IndexImage
,
become_condition
=
""
,
cat_list
=
""
,
is_show_share_level
=
""
,
};
#
endregion
#
region
share_setting_custom
var
distributorCustom
=
userModule
.
GetDistributorCustomInfo
((
miniProgram
.
TenantId
??
0
).
ToString
(),
miniProgram
.
MallBaseId
);
var
share_setting_custom
=
new
{
menus
=
new
{
money
=
new
{
name
=
distributorCustom
?.
DistributionCommissionName
,
icon
=
distributorCustom
?.
DistributionCommissionImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
order
=
new
{
name
=
distributorCustom
?.
DistributionOrderName
,
icon
=
distributorCustom
?.
DistributionOrderImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
cash
=
new
{
name
=
distributorCustom
?.
WithdrawDetialsName
,
icon
=
distributorCustom
?.
WithdrawDetialsImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
team
=
new
{
name
=
distributorCustom
?.
MyTeamName
,
icon
=
distributorCustom
?.
MyTeamImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
qrcode
=
new
{
name
=
distributorCustom
?.
PromoteQRCodeName
,
icon
=
distributorCustom
?.
PromoteQRCodeImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
},
words
=
new
{
can_be_presented
=
new
{
name
=
distributorCustom
?.
CommissionForWithdrawalName
,
defaultStr
=
"可提现佣金"
},
already_presented
=
new
{
name
=
distributorCustom
?.
CommissionWithdrawnName
,
defaultStr
=
"已提现佣金"
},
parent_name
=
new
{
name
=
distributorCustom
?.
ReferrerName
,
defaultStr
=
"推荐人"
},
pending_money
=
new
{
name
=
distributorCustom
?.
CommissionTobePaidName
,
defaultStr
=
"待打款佣金"
},
cash
=
new
{
name
=
distributorCustom
?.
WithdrawDepositName
,
defaultStr
=
"提现"
},
user_instructions
=
new
{
name
=
distributorCustom
?.
UserNotesName
,
defaultStr
=
"用户须知"
},
apply_cash
=
new
{
name
=
distributorCustom
?.
IWantToWithdrawName
,
defaultStr
=
"我要提现"
},
cash_type
=
new
{
name
=
distributorCustom
?.
WithdrawalWayName
,
defaultStr
=
"提现方式"
},
cash_money
=
new
{
name
=
distributorCustom
?.
WithdrawalAmountName
,
defaultStr
=
"提现金额"
},
order_money_un
=
new
{
name
=
distributorCustom
?.
OutstandingCommissionName
,
defaultStr
=
"未结算佣金"
},
share_name
=
new
{
name
=
distributorCustom
?.
DistributorName
,
defaultStr
=
"分销商"
},
one_share
=
new
{
name
=
distributorCustom
?.
OneDistributionName
,
defaultStr
=
"一级分销名称"
},
second_share
=
new
{
name
=
distributorCustom
?.
TwoDistributionName
,
defaultStr
=
"二级分销名称"
},
three_share
=
new
{
name
=
distributorCustom
?.
ThreeDistributionName
,
defaultStr
=
"三级分销名称"
},
},
apply
=
new
{
share_apply
=
new
{
name
=
distributorCustom
?.
DistributionApplication
,
defaultStr
=
"分销申请"
},
share_apply_pact
=
new
{
name
=
distributorCustom
?.
ApplicationAgreement
,
defaultStr
=
"分销申请协议"
},
apply_btn_color
=
distributorCustom
?.
ButtonTextColor
,
apply_btn_background
=
distributorCustom
?.
ButtonColor
,
apply_btn_title
=
distributorCustom
?.
ButtonText
,
apply_btn_round
=
distributorCustom
?.
ButtonFilletPX
,
apply_head_pic
=
distributorCustom
?.
HeadImage
,
apply_end_pic
=
distributorCustom
?.
BottomImage
},
};
#
endregion
//基础配置
setting
=
MallHelper
.
GetBasicSetting
(
miniProgram
);
//分销基础信息
share_setting
=
MallHelper
.
GetDistributorBasicsInfo
(
miniProgram
);
//分销商设置
share_setting_custom
=
MallHelper
.
GetDistributorCustomInfo
(
miniProgram
);
#
region
商品分类样式
var
productCategoryStyle
=
productModule
.
GetProductCategoryStyleInfo
(
miniProgram
.
TenantId
??
0
,
miniProgram
.
MallBaseId
);
...
...
@@ -689,6 +371,7 @@ namespace Mall.WebApi.Controllers.MallBase
user_info
,
setting
,
share_setting
,
share_setting_custom
,
cat_style
,
auth_page
,
//授权页面
bar_title
=
miniPageList
?.
Select
(
qitem
=>
new
{
name
=
qitem
.
PageName
,
value
=
qitem
.
PageUrl
,
new_name
=
qitem
.
SelfPageName
}),
//导航标题
...
...
@@ -696,11 +379,6 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
Success
(
data
:
objResult
);
}
/// <summary>
/// 用户中心
/// </summary>
...
...
@@ -827,7 +505,6 @@ namespace Mall.WebApi.Controllers.MallBase
//是否禁用
is_disable
=
miniProgram
.
Status
},
//配置信息
config
,
//用户信息
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
24621eae
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Model.Entity.BaseSetUp
;
using
Mall.Model.Entity.MarketingCenter
;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Model.Extend.User
;
using
Mall.Module.BaseSetUp
;
using
Mall.Module.MarketingCenter
;
using
Mall.Module.Product
;
using
Mall.Module.User
;
using
Newtonsoft.Json
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -34,6 +40,21 @@ namespace Mall.WebApi.Controllers
/// </summary>
private
static
Module
.
User
.
MiniProgramModule
programModule
=
new
Module
.
User
.
MiniProgramModule
();
/// <summary>
/// 小程序基础配置
/// </summary>
private
static
MallBaseModule
mallBaseModule
=
new
MallBaseModule
();
/// <summary>
/// 用户积分
/// </summary>
private
static
IntegralModule
integralModule
=
new
IntegralModule
();
/// <summary>
/// 用户处理类
/// </summary>
private
static
UserModule
userModule
=
new
UserModule
();
/// <summary>
/// 解析插件数据为对象
...
...
@@ -1479,5 +1500,351 @@ namespace Mall.WebApi.Controllers
};
return
tempObj
;
}
/// <summary>
/// 基本设置
/// </summary>
/// <param name="miniProgram"></param>
/// <returns></returns>
public
static
object
GetBasicSetting
(
RB_MiniProgram_Extend
miniProgram
)
{
#
region
基本设置
//基础配置 Add By:W 2020年6月1号
var
mallBaseModel
=
mallBaseModule
.
GetListRepository
(
new
RB_MallBase_Extend
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
if
(
mallBaseModel
==
null
)
{
mallBaseModel
=
new
RB_MallBase_Extend
();
}
//获取物流配置
var
logisticsRules
=
mallBaseModule
.
GetLogisticsList
(
new
RB_Logistics
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
if
(
logisticsRules
==
null
)
{
logisticsRules
=
new
RB_Logistics
();
}
//用户积分
var
integralModel
=
integralModule
.
GetIntegralSettingsList
(
new
RB_Integral_Settings
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
if
(
integralModel
==
null
)
{
integralModel
=
new
RB_Integral_Settings
();
}
List
<
string
>
payment_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
PayWay
))
{
foreach
(
var
item
in
mallBaseModel
.
PayWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
payment_type
.
Add
(
"online_pay"
);
break
;
case
"2"
:
payment_type
.
Add
(
"huodao"
);
break
;
case
"3"
:
payment_type
.
Add
(
"balance"
);
break
;
default
:
break
;
}
}
}
List
<
string
>
send_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
DeliverWay
))
{
foreach
(
var
item
in
mallBaseModel
.
DeliverWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
send_type
.
Add
(
"express"
);
break
;
case
"2"
:
send_type
.
Add
(
"offline"
);
break
;
case
"3"
:
send_type
.
Add
(
"city"
);
break
;
default
:
break
;
}
}
}
List
<
string
>
good_negotiable
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
ConsultWay
))
{
foreach
(
var
item
in
mallBaseModel
.
ConsultWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
good_negotiable
.
Add
(
"contact"
);
break
;
case
"2"
:
good_negotiable
.
Add
(
"contact_tel"
);
break
;
case
"3"
:
good_negotiable
.
Add
(
"contact_web"
);
break
;
default
:
break
;
}
}
}
var
setting
=
new
{
contact_tel
=
mallBaseModel
?.
ContactNumber
,
over_time
=
mallBaseModel
?.
CancelTime
,
delivery_time
=
mallBaseModel
?.
AutoReceiving
,
after_sale_time
=
mallBaseModel
?.
AfterTime
,
payment_type
=
payment_type
.
ToArray
(),
//支付方式
send_type
=
send_type
.
ToArray
(),
//发货方式
kdniao_mch_id
=
logisticsRules
?.
ExpressBirdID
,
//快递鸟配置
kdniao_api_key
=
logisticsRules
?.
ExpressBirdAPIKey
,
member_integral
=
integralModel
?.
IntegralNum
,
member_integral_rule
=
integralModel
?.
Explain
,
good_negotiable
=
good_negotiable
.
ToArray
(),
//商品面议联系方式
mobile_verify
=
""
,
is_small_app
=
mallBaseModel
?.
TurnMini
,
small_app_id
=
mallBaseModel
?.
MinAppId
,
small_app_url
=
mallBaseModel
?.
MinUrl
,
small_app_pic
=
mallBaseModel
?.
TurnMiniIco
,
is_customer_services
=
mallBaseModel
?.
OnlineService
,
customer_services_pic
=
mallBaseModel
?.
OnlineServiceIco
,
is_dial
=
mallBaseModel
?.
OneCall
,
dial_pic
=
mallBaseModel
?.
OneCallIco
,
is_web_service
=
mallBaseModel
?.
ServiceOutLink
,
web_service_url
=
mallBaseModel
?.
OuterServiceLink
,
web_service_pic
=
mallBaseModel
?.
ServiceOutLinkIco
,
is_quick_navigation
=
mallBaseModel
?.
SuspendBtn
,
quick_navigation_style
=
mallBaseModel
?.
SuspendStyle
,
quick_navigation_opened_pic
=
mallBaseModel
?.
UnfoldIco
,
quick_navigation_closed_pic
=
mallBaseModel
?.
PackUpIco
,
is_show_stock
=
""
,
is_use_stock
=
""
,
sell_out_pic
=
""
,
sell_out_other_pic
=
""
,
is_common_user_member_price
=
mallBaseModel
?.
DetailsMemberPrice
,
is_member_user_member_price
=
mallBaseModel
?.
DetailsVipMemberPrice
,
is_share_price
=
mallBaseModel
?.
DetailsSharePrice
,
is_purchase_frame
=
mallBaseModel
?.
BuySwitch
,
purchase_num
=
mallBaseModel
?.
CarouselOrder
,
is_comment
=
mallBaseModel
?.
DetailsComment
,
is_sales
=
mallBaseModel
?.
DetailsBuyNum
,
is_mobile_auth
=
mallBaseModel
?.
OtherIndexMoblie
,
is_official_account
=
mallBaseModel
?.
OtherTencent
,
is_manual_mobile_auth
=
mallBaseModel
?.
OtherManualMobile
,
is_icon_members_grade
=
mallBaseModel
?.
OtherMemerLevel
,
is_goods_video
=
mallBaseModel
?.
DetailsVideo
,
is_quick_map
=
mallBaseModel
?.
ShortcutNavigation
,
quick_map_pic
=
mallBaseModel
?.
ShortcutNavigationIco
,
quick_map_address
=
mallBaseModel
?.
Address
,
longitude
=
mallBaseModel
?.
LongAndLat
.
Split
(
","
)[
0
],
latitude
=
mallBaseModel
?.
LongAndLat
.
Split
(
","
)[
1
],
is_quick_home
=
mallBaseModel
?.
BackTopNavigation
,
quick_home_pic
=
mallBaseModel
?.
BackTopNavigationIco
,
logo
=
""
,
share_title
=
mallBaseModel
?.
MinShareTitle
,
share_pic
=
mallBaseModel
?.
MinShareIco
,
is_add_app
=
mallBaseModel
?.
MinSwitch
,
add_app_bg_color
=
mallBaseModel
?.
MinBackColor
,
add_app_bg_transparency
=
mallBaseModel
?.
MinBackClarity
,
add_app_bg_radius
=
mallBaseModel
?.
MinBackCircularBead
,
add_app_text
=
mallBaseModel
?.
MinTips
,
add_app_text_color
=
mallBaseModel
?.
MinTipsColor
,
add_app_icon_color_type
=
mallBaseModel
?.
MinIcoColor
,
is_close
=
""
,
business_time_type
=
""
,
business_time_custom_type
=
""
,
business_time_type_day
=
""
,
business_time_type_week
=
""
,
auto_business
=
""
,
auto_business_time
=
""
,
is_icon_super_vip
=
""
,
is_show_normal_vip
=
""
,
is_show_super_vip
=
""
,
is_required_position
=
mallBaseModel
?.
OtherMustAddress
,
is_share_tip
=
mallBaseModel
?.
OtherApplyShare
,
is_show_cart
=
mallBaseModel
?.
ListShopCar
,
is_show_sales_num
=
mallBaseModel
?.
ListBuyCount
,
is_show_goods_name
=
mallBaseModel
?.
ListName
,
is_underline_price
=
mallBaseModel
?.
DetailsLineationPrice
,
is_express
=
mallBaseModel
?.
DeatilsExpress
,
is_not_share_show
=
mallBaseModel
?.
OtherNoShare
,
is_show_cart_fly
=
mallBaseModel
?.
CarSuspendBtn
,
is_show_score_top
=
mallBaseModel
?.
BackTopBtn
,
express_select_type
=
logisticsRules
?.
LogisticsType
,
//待会儿处理
express_aliapy_code
=
logisticsRules
?.
AliyunAppCode
,
is_quick_customize
=
mallBaseModel
?.
Custom
,
quick_customize_pic
=
mallBaseModel
?.
TurnIco
,
quick_customize_open_type
=
""
,
quick_customize_params
=
""
,
quick_customize_link_url
=
mallBaseModel
?.
TurnLink
,
quick_customize_new_params
=
""
,
theme_color
=
""
,
latitude_longitude
=
mallBaseModel
?.
LongAndLat
};
#
endregion
return
setting
;
}
/// <summary>
/// 分销基础信息
/// </summary>
/// <returns></returns>
public
static
object
GetDistributorBasicsInfo
(
RB_MiniProgram_Extend
miniProgram
)
{
#
region
分销基础信息
var
distributorBasics
=
userModule
.
GetDistributorBasicsInfo
((
miniProgram
.
TenantId
??
0
).
ToString
(),
miniProgram
.
MallBaseId
);
if
(!
string
.
IsNullOrEmpty
(
distributorBasics
.
WithdrawWay
))
{
distributorBasics
.
WithdrawWayList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
distributorBasics
.
WithdrawWay
);
}
List
<
string
>
pay_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
distributorBasics
.
WithdrawWay
))
{
foreach
(
var
item
in
distributorBasics
.
WithdrawWayList
)
{
switch
(
item
)
{
case
1
:
pay_type
.
Add
(
"auto"
);
break
;
case
2
:
pay_type
.
Add
(
"wechat"
);
break
;
case
3
:
pay_type
.
Add
(
"alipay"
);
break
;
case
4
:
pay_type
.
Add
(
"bank"
);
break
;
case
5
:
pay_type
.
Add
(
"balance"
);
break
;
default
:
break
;
}
}
}
var
share_setting
=
new
{
level
=
distributorBasics
?.
DistributorTier
,
is_rebate
=
distributorBasics
?.
InPurchasing
,
price_type
=
distributorBasics
?.
DistributorCommissionType
,
first
=
distributorBasics
?.
OneCommission
,
second
=
distributorBasics
?.
TwoCommission
,
third
=
distributorBasics
?.
ThreeCommission
,
share_condition
=
""
,
condition
=
distributorBasics
?.
ReferralsCondition
??
0
,
auto_share_val
=
""
,
share_goods_status
=
""
,
share_goods_warehouse_id
=
""
,
pay_type
=
pay_type
.
ToArray
(),
cash_max_day
=
distributorBasics
?.
DailyWithdrawalLimit
,
min_money
=
distributorBasics
?.
MinimumWithdrawalLimit
,
cash_service_charge
=
distributorBasics
?.
WithdrawFee
,
agree
=
distributorBasics
?.
ApplicationProtocol
,
content
=
distributorBasics
?.
UserNotes
,
pic_url_apply
=
""
,
pic_url_status
=
distributorBasics
?.
BackgroundImage
,
pic_url_home_head
=
distributorBasics
?.
IndexImage
,
become_condition
=
""
,
cat_list
=
""
,
is_show_share_level
=
""
,
};
#
endregion
return
share_setting
;
}
/// <summary>
/// 分销设置
/// </summary>
/// <param name="miniProgram"></param>
/// <returns></returns>
public
static
object
GetDistributorCustomInfo
(
RB_MiniProgram_Extend
miniProgram
)
{
#
region
share_setting_custom
var
distributorCustom
=
userModule
.
GetDistributorCustomInfo
((
miniProgram
.
TenantId
??
0
).
ToString
(),
miniProgram
.
MallBaseId
);
var
share_setting_custom
=
new
{
menus
=
new
{
money
=
new
{
name
=
distributorCustom
?.
DistributionCommissionName
,
icon
=
distributorCustom
?.
DistributionCommissionImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
order
=
new
{
name
=
distributorCustom
?.
DistributionOrderName
,
icon
=
distributorCustom
?.
DistributionOrderImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
cash
=
new
{
name
=
distributorCustom
?.
WithdrawDetialsName
,
icon
=
distributorCustom
?.
WithdrawDetialsImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
team
=
new
{
name
=
distributorCustom
?.
MyTeamName
,
icon
=
distributorCustom
?.
MyTeamImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
qrcode
=
new
{
name
=
distributorCustom
?.
PromoteQRCodeName
,
icon
=
distributorCustom
?.
PromoteQRCodeImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
},
words
=
new
{
can_be_presented
=
new
{
name
=
distributorCustom
?.
CommissionForWithdrawalName
,
defaultStr
=
"可提现佣金"
},
already_presented
=
new
{
name
=
distributorCustom
?.
CommissionWithdrawnName
,
defaultStr
=
"已提现佣金"
},
parent_name
=
new
{
name
=
distributorCustom
?.
ReferrerName
,
defaultStr
=
"推荐人"
},
pending_money
=
new
{
name
=
distributorCustom
?.
CommissionTobePaidName
,
defaultStr
=
"待打款佣金"
},
cash
=
new
{
name
=
distributorCustom
?.
WithdrawDepositName
,
defaultStr
=
"提现"
},
user_instructions
=
new
{
name
=
distributorCustom
?.
UserNotesName
,
defaultStr
=
"用户须知"
},
apply_cash
=
new
{
name
=
distributorCustom
?.
IWantToWithdrawName
,
defaultStr
=
"我要提现"
},
cash_type
=
new
{
name
=
distributorCustom
?.
WithdrawalWayName
,
defaultStr
=
"提现方式"
},
cash_money
=
new
{
name
=
distributorCustom
?.
WithdrawalAmountName
,
defaultStr
=
"提现金额"
},
order_money_un
=
new
{
name
=
distributorCustom
?.
OutstandingCommissionName
,
defaultStr
=
"未结算佣金"
},
share_name
=
new
{
name
=
distributorCustom
?.
DistributorName
,
defaultStr
=
"分销商"
},
one_share
=
new
{
name
=
distributorCustom
?.
OneDistributionName
,
defaultStr
=
"一级分销名称"
},
second_share
=
new
{
name
=
distributorCustom
?.
TwoDistributionName
,
defaultStr
=
"二级分销名称"
},
three_share
=
new
{
name
=
distributorCustom
?.
ThreeDistributionName
,
defaultStr
=
"三级分销名称"
},
},
apply
=
new
{
share_apply
=
new
{
name
=
distributorCustom
?.
DistributionApplication
,
defaultStr
=
"分销申请"
},
share_apply_pact
=
new
{
name
=
distributorCustom
?.
ApplicationAgreement
,
defaultStr
=
"分销申请协议"
},
apply_btn_color
=
distributorCustom
?.
ButtonTextColor
,
apply_btn_background
=
distributorCustom
?.
ButtonColor
,
apply_btn_title
=
distributorCustom
?.
ButtonText
,
apply_btn_round
=
distributorCustom
?.
ButtonFilletPX
,
apply_head_pic
=
distributorCustom
?.
HeadImage
,
apply_end_pic
=
distributorCustom
?.
BottomImage
},
};
#
endregion
return
share_setting_custom
;
}
}
}
Mall.WebApi/Startup.cs
View file @
24621eae
...
...
@@ -49,6 +49,7 @@ namespace Mall.WebApi
"http://localhost:8082"
,
"http://127.0.0.1:50512"
,
"http://127.0.0.1:20224"
,
"http://127.0.0.1:28221"
,
"http://www.test.com:8080"
,
"http://www.test.com:8081"
,
"http://yx.oytour.com"
,
...
...
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