Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
程默
mayi-mp-shop
Commits
1ec207fb
Commit
1ec207fb
authored
Jul 14, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册兼容
parent
6d523aff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
6 deletions
+42
-6
src/pages/index/index.vue
+30
-6
src/pages/login/index.vue
+12
-0
No files found.
src/pages/index/index.vue
View file @
1ec207fb
...
@@ -87,6 +87,12 @@ export default {
...
@@ -87,6 +87,12 @@ export default {
}
}
this
.
page
=
""
;
this
.
page
=
""
;
this
.
params
=
""
;
this
.
params
=
""
;
if
(
options
.
tTShareEnv
){
wx
.
setStorage
({
key
:
"tTShareEnv"
,
data
:
options
.
tTShareEnv
,
});
}
}
else
if
(
options
.
from
&&
options
.
from
==
"h5login"
)
{
}
else
if
(
options
.
from
&&
options
.
from
==
"h5login"
)
{
//来自h5登录
//来自h5登录
let
params
=
JSON
.
parse
(
options
.
params
);
let
params
=
JSON
.
parse
(
options
.
params
);
...
@@ -355,10 +361,6 @@ export default {
...
@@ -355,10 +361,6 @@ export default {
console
.
log
(
"卸载----------------"
,
this
.
options
);
console
.
log
(
"卸载----------------"
,
this
.
options
);
},
},
onShareAppMessage
(
res
)
{
onShareAppMessage
(
res
)
{
// 抖音展示拍视频功能
if
(
MINI_ENV
==
'tt'
){
}
console
.
log
(
res
)
console
.
log
(
res
)
console
.
log
(
console
.
log
(
this
.
shareShopName
,
this
.
shareShopName
,
...
@@ -397,9 +399,29 @@ export default {
...
@@ -397,9 +399,29 @@ export default {
console
.
log
(
this
.
shareUrl
,
"index12"
);
console
.
log
(
this
.
shareUrl
,
"index12"
);
console
.
log
(
`/pages/index/main?share=
${
encodeURIComponent
(
this
.
shareUrl
)}
`
,
'测试直播分享相关'
)
console
.
log
(
`/pages/index/main?share=
${
encodeURIComponent
(
this
.
shareUrl
)}
`
,
'测试直播分享相关'
)
return
{
let
sharePath
=
`/pages/index/main?share=
${
encodeURIComponent
(
this
.
shareUrl
)}
`
;
// 默认是当前页面
// 抖音分享类型 默认分享、拍抖音、分享二维码
let
tTShareEnv
=
''
;
if
(
MINI_ENV
==
'tt'
){
// 抖音
switch
(
res
.
channel
)
{
case
'video'
:
tTShareEnv
=
'video'
;
break
;
case
'qrcode'
:
tTShareEnv
=
'qrcode'
;
break
;
default
:
tTShareEnv
=
'share'
;
break
;
}
sharePath
=
`/pages/index/main?share=
${
encodeURIComponent
(
this
.
shareUrl
)}
&tTShareEnv=
${
tTShareEnv
}
`
;
// 默认是当前页面
}
else
{
// 微信
}
let
shareParam
=
{
title
:
this
.
shareShopName
,
// 默认是小程序的名称
title
:
this
.
shareShopName
,
// 默认是小程序的名称
path
:
`/pages/index/main?share=
${
encodeURIComponent
(
this
.
shareUrl
)}
`
,
// 默认是当前页面
path
:
sharePath
,
imageUrl
:
this
.
shareLogoUrl
,
imageUrl
:
this
.
shareLogoUrl
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// 转发成功之后的回调
// 转发成功之后的回调
...
@@ -420,6 +442,8 @@ export default {
...
@@ -420,6 +442,8 @@ export default {
// 转发结束之后的回调(转发成不成功都会执行)
// 转发结束之后的回调(转发成不成功都会执行)
}
}
};
};
console
.
log
(
shareParam
,
'-------------------------shareParam-----439'
)
return
shareParam
;
}
}
};
};
</
script
>
</
script
>
...
...
src/pages/login/index.vue
View file @
1ec207fb
...
@@ -394,6 +394,17 @@ export default {
...
@@ -394,6 +394,17 @@ export default {
query
.
iv
=
this
.
ttData
.
iv
;
query
.
iv
=
this
.
ttData
.
iv
;
query
.
encryptedData
=
this
.
ttData
.
encryptedData
;
query
.
encryptedData
=
this
.
ttData
.
encryptedData
;
query
.
sessionKey
=
this
.
session_key
;
query
.
sessionKey
=
this
.
session_key
;
// registeredType (integer, optional)
// 注册来源(1:自主注册,2:视频导流注册)
query
.
registeredType
=
1
;
let
tTShareEnv
=
wx
.
getStorageSync
(
"tTShareEnv"
);
if
(
tTShareEnv
&&
tTShareEnv
==
'video'
){
query
.
registeredType
=
2
;
}
else
if
(
tTShareEnv
&&
tTShareEnv
==
'qrcode'
){
query
.
registeredType
=
3
;
}
else
if
(
tTShareEnv
&&
tTShareEnv
==
'share'
){
query
.
registeredType
=
4
;
}
}
}
if
(
this
.
$store
.
state
.
spokesmanGroupId
!=
""
)
{
if
(
this
.
$store
.
state
.
spokesmanGroupId
!=
""
)
{
query
.
spokesmanRelId
=
this
.
$store
.
state
.
spokesmanRelId
;
query
.
spokesmanRelId
=
this
.
$store
.
state
.
spokesmanRelId
;
...
@@ -405,6 +416,7 @@ export default {
...
@@ -405,6 +416,7 @@ export default {
login
login
.
bindUser
(
query
,
MINI_ENV
)
.
bindUser
(
query
,
MINI_ENV
)
.
then
(
res
=>
{
.
then
(
res
=>
{
wx
.
removeStorageSync
(
"tTShareEnv"
);
wx
.
hideLoading
();
wx
.
hideLoading
();
//绑定成功
//绑定成功
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
...
...
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