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
c3c0742c
Commit
c3c0742c
authored
Jun 29, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
f88c9060
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
3 deletions
+100
-3
RB_Live_House_Extend.cs
Mall.Model/Extend/AppletWeChat/RB_Live_House_Extend.cs
+34
-0
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+39
-1
PublishController.cs
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
+24
-2
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+3
-0
No files found.
Mall.Model/Extend/AppletWeChat/RB_Live_House_Extend.cs
View file @
c3c0742c
...
...
@@ -23,4 +23,38 @@ namespace Mall.Model.Extend.AppletWeChat
/// </summary>
public
string
total
{
get
;
set
;
}
}
/// <summary>
/// 回放结果
/// </summary>
public
class
PlayBack
{
public
List
<
LiveReplay
>
live_replay
{
get
;
set
;
}
public
string
errcode
{
get
;
set
;
}
public
int
total
{
get
;
set
;
}
public
string
errmsg
{
get
;
set
;
}
}
public
class
LiveReplay
{
/// <summary>
/// 回放视频url过期时间
/// </summary>
public
string
expire_time
{
get
;
set
;
}
/// <summary>
/// 回放视频创建时间
/// </summary>
public
string
create_time
{
get
;
set
;
}
/// <summary>
/// 回放视频链接
/// </summary>
public
string
media_url
{
get
;
set
;
}
}
}
Mall.Module.User/MiniProgramModule.cs
View file @
c3c0742c
...
...
@@ -1744,7 +1744,6 @@ namespace Mall.Module.User
/// <returns></returns>
public
bool
GetLiveInfo
(
RB_MiniProgram_Extend
model
)
{
string
token
=
WeiXinReidsCache
.
Get
(
model
.
MiniAppId
);
if
(
string
.
IsNullOrEmpty
(
token
))
{
...
...
@@ -1786,7 +1785,46 @@ namespace Mall.Module.User
}
public
Model
.
Extend
.
AppletWeChat
.
PlayBack
GetLiveReplayInfo
(
RB_MiniProgram_Extend
model
,
int
room_id
)
{
string
token
=
WeiXinReidsCache
.
Get
(
model
.
MiniAppId
);
if
(
string
.
IsNullOrEmpty
(
token
))
{
token
=
Mall
.
Common
.
Pay
.
WeChatPat
.
TokenHelper
.
GetLXYToken
(
token
,
model
.
MiniAppId
,
model
.
MiniAppSecret
);
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
WeiXinReidsCache
.
Set
(
model
.
MiniAppId
,
token
));
}
if
(
string
.
IsNullOrEmpty
(
token
))
{
return
new
Model
.
Extend
.
AppletWeChat
.
PlayBack
();
}
string
wenXinResult
=
string
.
Empty
;
if
(!
string
.
IsNullOrWhiteSpace
(
token
))
{
string
Url
=
" http://api.weixin.qq.com/wxa/business/getliveinfo?access_token="
+
token
;
var
postdata
=
new
{
action
=
"get_replay"
,
room_id
=
room_id
,
start
=
0
,
limit
=
100
};
wenXinResult
=
HttpHelper
.
HttpPost
(
Url
,
JsonHelper
.
Serialize
(
postdata
),
""
);
var
newLiveHouse
=
JsonConvert
.
DeserializeObject
<
Model
.
Extend
.
AppletWeChat
.
PlayBack
>(
wenXinResult
);
//JObject jo = (JObject)JsonConvert.DeserializeObject(wenXinResult);
//int errcode = Convert.ToInt32(jo["errcode"].ToString());
if
(
newLiveHouse
.
errcode
==
"0"
)
{
return
newLiveHouse
;
}
else
{
LogHelper
.
Write
(
string
.
Format
(
"GetLiveInfo:wenXinResult:{0}"
,
wenXinResult
));
}
}
return
new
Model
.
Extend
.
AppletWeChat
.
PlayBack
();
}
/// <summary>
/// 获取直播房间
...
...
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
View file @
c3c0742c
...
...
@@ -41,7 +41,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
string
jsonpath
=
projectUrl
+
"/miniProject/project.config.json"
;
string
jsonbasePath
=
projectUrl
+
"/project.configbase.json"
;
var
model
=
appletWeChatModule
.
GetTenantListModule
(
query
).
FirstOrDefault
();
if
(
System
.
IO
.
File
.
Exists
(
path
)&&
System
.
IO
.
File
.
Exists
(
jsonpath
))
if
(
System
.
IO
.
File
.
Exists
(
path
)
&&
System
.
IO
.
File
.
Exists
(
jsonpath
))
{
try
{
...
...
@@ -168,7 +168,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
int
version
=
Convert
.
ToInt32
(
model
.
Version
.
Replace
(
"."
,
""
));
version
+=
1
;
model
.
Version
=
version
.
ToString
().
Substring
(
0
,
version
.
ToString
().
Length
-
3
)
+
"."
+
version
.
ToString
().
Substring
(
version
.
ToString
().
Length
-
3
,
1
)
+
"."
+
version
.
ToString
().
Substring
(
version
.
ToString
().
Length
-
2
,
2
);
model
.
Version
=
version
.
ToString
().
Substring
(
0
,
version
.
ToString
().
Length
-
3
)
+
"."
+
version
.
ToString
().
Substring
(
version
.
ToString
().
Length
-
3
,
1
)
+
"."
+
version
.
ToString
().
Substring
(
version
.
ToString
().
Length
-
2
,
2
);
string
URL
=
$"http://127.0.0.1:
{
developerKitsPort
}
/v2/upload?project=
{
Mall
.
Common
.
Plugin
.
StringHelper
.
UrlEncode
(
projectUrl
+
"/miniProject"
)}
&version=V
{
model
.
Version
}
&desc=微信开发者工具HTTP上传&appid=
{
model
.
MiniAppId
}
"
;
string
result
=
Mall
.
Common
.
Plugin
.
HttpHelper
.
HttpGet
(
URL
,
Encoding
.
UTF8
,
""
);
...
...
@@ -467,6 +467,28 @@ namespace Mall.WebApi.Controllers.AppletWeChat
}
/// <summary>
/// 获取直播房间回放信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetLiveReplayInfo
()
{
var
parmsInfo
=
RequestParm
;
JObject
parmsJob
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
roomId
=
parmsJob
.
GetInt
(
"roomId"
);
var
appletWeChatModel
=
appletWeChatModule
.
GetTenantListModule
(
new
RB_MiniProgram_Extend
{
TenantId
=
Convert
.
ToInt32
(
parmsInfo
.
uid
),
MallBaseId
=
parmsInfo
.
MallBaseId
}).
FirstOrDefault
();
var
model
=
appletWeChatModule
.
GetLiveReplayInfo
(
appletWeChatModel
,
roomId
);
if
(
model
.
errcode
==
"0"
)
{
return
ApiResult
.
Success
(
""
,
model
);
}
else
{
return
ApiResult
.
Failed
();
}
}
[
HttpPost
]
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
c3c0742c
...
...
@@ -79,6 +79,9 @@ namespace Mall.WebApi.Controllers.MallBase
PaymentWayName
=
x
.
PaymentWay
.
GetEnumName
(),
DetailList
=
x
.
DetailList
.
Select
(
y
=>
new
{
y
.
FreightCostMoney
,
y
.
FreightMoney
,
y
.
CostMoney
,
y
.
Id
,
y
.
CoverImage
,
y
.
CoverImagePath
,
...
...
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