Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mongo-ui
Commits
e742c6fd
Commit
e742c6fd
authored
Sep 23, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 获取distinctId
parent
9c8ab939
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
16 deletions
+23
-16
GoodAction.vue
src/components/GoodAction.vue
+3
-3
utils.js
src/service/utils.js
+16
-9
CustomerService.vue
src/views/Policy/Detail/modules/CustomerService.vue
+2
-2
PolicyItem.vue
src/views/Policy/modules/PolicyItem.vue
+2
-2
No files found.
src/components/GoodAction.vue
View file @
e742c6fd
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
*/
*/
const
LEFT_BTN_CLICK_EVENT
=
"
leftClick
"
;
const
LEFT_BTN_CLICK_EVENT
=
"
leftClick
"
;
const
RIGHT_BTN_CLICK_EVENT
=
"
click
"
;
const
RIGHT_BTN_CLICK_EVENT
=
"
click
"
;
import
settings
from
"
@/api/setting
s
"
;
import
{
onKeyboardStateChange
,
getSobot
}
from
"
@/service/util
s
"
;
import
{
onKeyboardStateChange
}
from
"
@/service/utils
"
;
export
default
{
export
default
{
name
:
"
GoodAction
"
,
name
:
"
GoodAction
"
,
props
:
{
props
:
{
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
methods
:
{
methods
:
{
leftClick
()
{
leftClick
()
{
this
.
$emit
(
LEFT_BTN_CLICK_EVENT
,
{});
this
.
$emit
(
LEFT_BTN_CLICK_EVENT
,
{});
window
.
location
.
href
=
settings
.
sobot
;
window
.
location
.
href
=
getSobot
()
;
},
},
rightClick
()
{
rightClick
()
{
// TODO
// TODO
...
...
src/service/utils.js
View file @
e742c6fd
import
{
isAndroid
,
isIOS
}
from
"
./validation
"
;
import
sa
from
"
sa-sdk-javascript
"
;
import
sa
from
"
sa-sdk-javascript
"
;
import
uuidv1
from
"
uuid/v1
"
;
import
{
isAndroid
,
isIOS
}
from
"
./validation
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
settings
from
"
@/api/settings
"
;
/**
/**
* 替换邮箱字符
* 替换邮箱字符
...
@@ -324,15 +324,17 @@ export function isValidDate(date) {
...
@@ -324,15 +324,17 @@ export function isValidDate(date) {
// 神策注册公共属性
// 神策注册公共属性
export
function
registerSa
()
{
export
function
registerSa
()
{
// 获取uuid表示设备唯一标识
const
saObj
=
{
platformType
:
"
H5
"
};
let
uuid_unloggin
=
localStorage
.
get
(
"
uuid_unloggin
"
);
if
(
!
uuid_unloggin
)
{
// 获取distinctId
uuid_unloggin
=
uuidv1
();
sa
.
quick
(
"
isReady
"
,
function
()
{
localStorage
.
set
(
"
uuid_unloggin
"
,
uuid_unloggin
);
const
distinctId
=
sa
.
quick
(
"
getAnonymousID
"
);
}
localStorage
.
set
(
"
distinctId
"
,
distinctId
);
const
saObj
=
{
platformType
:
"
H5
"
,
uuid_unloggin
};
});
// 添加公共属性
// 添加公共属性
sa
.
registerPage
(
saObj
);
sa
.
registerPage
(
saObj
);
// 登陆埋点
loginSa
();
loginSa
();
}
}
...
@@ -342,3 +344,8 @@ export function loginSa(uuid = localStorage.get("uuid")) {
...
@@ -342,3 +344,8 @@ export function loginSa(uuid = localStorage.get("uuid")) {
localStorage
.
set
(
"
uuid
"
,
uuid
);
localStorage
.
set
(
"
uuid
"
,
uuid
);
sa
.
login
(
uuid
);
sa
.
login
(
uuid
);
}
}
export
function
getSobot
()
{
const
distinctId
=
localStorage
.
get
(
"
distinctId
"
);
return
distinctId
?
`
${
settings
.
sobot
}
&partnerid=
${
distinctId
}
`
:
settings
.
sobot
;
}
src/views/Policy/Detail/modules/CustomerService.vue
View file @
e742c6fd
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
settings
from
"
@/api/setting
s
"
;
import
{
getSobot
}
from
"
@/service/util
s
"
;
export
default
{
export
default
{
name
:
"
CustomerService
"
,
name
:
"
CustomerService
"
,
...
@@ -23,7 +23,7 @@ export default {
...
@@ -23,7 +23,7 @@ export default {
if
(
type
===
"
home
"
)
{
if
(
type
===
"
home
"
)
{
this
.
$router
.
push
(
"
/home
"
);
this
.
$router
.
push
(
"
/home
"
);
}
else
{
}
else
{
window
.
location
.
href
=
settings
.
sobot
;
window
.
location
.
href
=
getSobot
()
;
}
}
}
}
}
}
...
...
src/views/Policy/modules/PolicyItem.vue
View file @
e742c6fd
...
@@ -77,10 +77,10 @@ import { some } from "lodash-es";
...
@@ -77,10 +77,10 @@ import { some } from "lodash-es";
import
GOODS_LIST
from
"
@/api/goodsList.mock
"
;
import
GOODS_LIST
from
"
@/api/goodsList.mock
"
;
import
{
getPolicyList
}
from
"
@/api/policy
"
;
import
{
getPolicyList
}
from
"
@/api/policy
"
;
import
{
getLink
}
from
"
@/api/product
"
;
import
{
getLink
}
from
"
@/api/product
"
;
import
settings
from
"
@/api/settings
"
;
import
policyStatusMixin
from
"
../mixin/policyStatus.mixin
"
;
import
policyStatusMixin
from
"
../mixin/policyStatus.mixin
"
;
import
detailPayMixin
from
"
@/views/Goods/Detail/modules/detailPay.mixin
"
;
import
detailPayMixin
from
"
@/views/Goods/Detail/modules/detailPay.mixin
"
;
import
electronicInsurance
from
"
../mixin/electronicInsurance.mixin
"
;
import
electronicInsurance
from
"
../mixin/electronicInsurance.mixin
"
;
import
{
getSobot
}
from
"
@/service/utils
"
;
// SELF(1, "本人"),
// SELF(1, "本人"),
// PARENT(2, "父母"),
// PARENT(2, "父母"),
...
@@ -152,7 +152,7 @@ export default {
...
@@ -152,7 +152,7 @@ export default {
};
};
this
.
goPay
();
this
.
goPay
();
}
else
if
(
text
===
"
联系客服
"
)
{
}
else
if
(
text
===
"
联系客服
"
)
{
window
.
location
.
href
=
settings
.
sobot
;
window
.
location
.
href
=
getSobot
()
;
}
}
},
},
goDetail
(
orderNo
)
{
goDetail
(
orderNo
)
{
...
...
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