Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
82df6b7c
Commit
82df6b7c
authored
Dec 17, 2019
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成的分享码不一致问题解决
parent
ff98b8a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/app/common/life-common.service.ts
+0
-2
src/app/my/mk-material-detail/mk-material-detail.component.ts
+4
-1
No files found.
src/app/common/life-common.service.ts
View file @
82df6b7c
import
{
Injectable
}
from
'@angular/core'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
Meta
,
Title
}
from
'@angular/platform-browser'
;
import
*
as
uuid
from
'uuid'
;
@
Injectable
({
providedIn
:
'root'
})
...
...
@@ -48,7 +47,6 @@ export class LifeCommonService {
*/
generateShareCode
(
jsonParams
?:
any
)
{
const
shareCode
=
{
shareCode
:
uuid
.
v4
(),
shareType
:
'1'
,
os
:
this
.
checkOs
(),
channel
:
'0'
,
...
...
src/app/my/mk-material-detail/mk-material-detail.component.ts
View file @
82df6b7c
...
...
@@ -4,6 +4,7 @@ import {environment} from '../../../environments/environment';
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
MyService
}
from
'../my.service'
;
declare
var
QRCode
:
any
;
import
*
as
uuid
from
'uuid'
;
@
Component
({
selector
:
'ydlife-mk-material-detail'
,
templateUrl
:
'./mk-material-detail.component.html'
,
...
...
@@ -24,11 +25,13 @@ export class MkMaterialDetailComponent implements OnInit {
this
.
materialItemId
=
this
.
activateRoute
.
snapshot
.
paramMap
.
get
(
'itemId'
);
this
.
lifeCustomerInfo
=
localStorage
.
getItem
(
'lifeCustomerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
:
null
;
// 分享信息
const
shareCodeUuid
=
uuid
.
v4
();
this
.
shareInfo
=
{
...
this
.
lifeCommonService
.
generateShareCode
(),
shareCode
:
shareCodeUuid
,
customerId
:
this
.
lifeCustomerInfo
.
customerId
,
productId
:
this
.
materialItemId
,
url
:
`
${
environment
.
ORIGINNAME
}
/life/
${
this
.
materialItemId
}
?shareCode=
${
this
.
lifeCommonService
.
generateShareCode
().
shareCode
}
`
url
:
`
${
environment
.
ORIGINNAME
}
/life/
${
this
.
materialItemId
}
?shareCode=
${
shareCodeUuid
}
`
};
// 发送请求保存分享码
this
.
shareCallBack
();
...
...
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