Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 30e0d4fe
authored
Feb 17, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
员工注册拦截
1 parent
8ddbe0ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
11 deletions
src/components/Action.vue
src/components/Action.vue
View file @
30e0d4f
...
@@ -27,17 +27,22 @@
...
@@ -27,17 +27,22 @@
@touchend="touchend"
@touchend="touchend"
>
>
<template
v-if=
"detail.isStaffLoginLink"
>
<template
v-if=
"detail.isStaffLoginLink"
>
员工注册
<template
v-if=
"supportOpenLaunch"
>
<wx-open-launch-weapp
员工注册
class=
"mini"
<wx-open-launch-weapp
:path=
"path"
class=
"mini"
:username=
"miniprogramInfo.username"
:path=
"path"
:env-version=
"miniprogramInfo.envVersion"
:username=
"miniprogramInfo.username"
>
:env-version=
"miniprogramInfo.envVersion"
<script
type=
"text/wxtag-template"
>
>
<div
class=
"mini-btn"
>
点击跳转
</div>
<script
type=
"text/wxtag-template"
>
<div
class=
"mini-btn"
>
点击跳转
</div>
</script>
</script>
</wx-open-launch-weapp>
</wx-open-launch-weapp>
</
template
>
<
template
v-else
>
<div
@
click=
"errorToast"
>
员工注册
</div>
</
template
>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<template
v-if=
"detail.activityStatus == 1 && detail.buyFlag != 2"
>
预热下单
</
template
>
<template
v-if=
"detail.activityStatus == 1 && detail.buyFlag != 2"
>
预热下单
</
template
>
...
@@ -130,7 +135,8 @@ export default {
...
@@ -130,7 +135,8 @@ export default {
miniprogramInfo
:
{},
miniprogramInfo
:
{},
path
:
''
,
path
:
''
,
totalGoodsNumber
:
0
,
totalGoodsNumber
:
0
,
totalPrice
:
{}
totalPrice
:
{},
supportOpenLaunch
:
true
}
}
},
},
props
:
{
props
:
{
...
@@ -144,9 +150,40 @@ export default {
...
@@ -144,9 +150,40 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
const
userAgent
=
navigator
.
userAgent
,
wechat_version
=
userAgent
.
match
(
/MicroMessenger
\/([\d\.]
+
)
/i
)[
1
]
try
{
let
[
w_a
,
w_b
,
w_c
]
=
wechat_version
.
split
(
'.'
)
if
(
!
w_c
)
c
=
0
if
(
w_a
<
7
)
throw
false
if
(
w_a
==
7
&&
w_b
==
0
&&
w_c
<
12
)
throw
false
if
(
userAgent
.
includes
(
'iPhone'
)
||
userAgent
.
includes
(
'iPad'
))
{
let
[
phone_version
]
=
userAgent
.
match
(
/iPhone OS .*
?(?=
)
/
)
if
(
phone_version
)
{
let
[
a
,
b
]
=
phone_version
.
split
(
' '
).
at
(
-
1
).
split
(
'_'
)
if
(
!
b
)
b
=
0
if
(
a
<
10
)
throw
false
if
(
a
==
10
&&
b
<
3
)
throw
false
if
(
a
==
15
&&
w_a
==
8
&&
w_b
==
0
&&
w_c
<
8
)
throw
false
}
}
if
(
userAgent
.
includes
(
'Android'
))
{
let
[
phone_version
]
=
userAgent
.
match
(
/Android.*
?(?=
;
)
/
)
if
(
phone_version
)
{
let
[
a
]
=
phone_version
.
split
(
' '
).
at
(
-
1
).
split
(
'.'
)
if
(
a
<
5
)
throw
false
}
}
}
catch
(
error
)
{
this
.
supportOpenLaunch
=
error
}
this
.
iSMiniprogram
=
window
.
__wxjs_environment
===
'miniprogram'
this
.
iSMiniprogram
=
window
.
__wxjs_environment
===
'miniprogram'
},
},
methods
:
{
methods
:
{
errorToast
()
{
this
.
showToast
(
'当前系统或微信版本不支持该功能,请升级后再试。'
)
},
setTotalPrice
()
{
setTotalPrice
()
{
const
{
const
{
userSelectGoodsList
userSelectGoodsList
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment