Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-limited-sell-miniapp
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
肖亚东
6 years ago
Commit
1cec4a677cd1b6837c089af7697c1d2dbaeb3beb
1 parent
e164f58b
3054:app分享小程序返回APP
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
1 deletions
app/app.js
app/pages/product/detail/detail.js
app/pages/product/detail/detail.wxml
app/pages/product/detail/detail.wxss
app/static/images/back2App@3x.png
app/app.js
View file @
1cec4a6
...
...
@@ -32,6 +32,7 @@ App({
thirdSession
:
''
,
udid
:
''
,
unionType
:
''
,
currentScene
:
1001
,
systemInfo
:
{}
},
reportData
:
{
...
...
@@ -61,6 +62,9 @@ App({
this
.
globalData
.
sid
=
MD5
(
timestamp
);
yas
=
new
Yas
(
this
);
yas
.
report
(
'YB_LAUNCH_APP'
);
let
scene
=
options
?
options
.
scene
:
''
;
this
.
globalData
.
currentScene
=
scene
;
},
onShow
:
function
(
options
)
{
udid
.
get
();
// 生成 UDID
...
...
app/pages/product/detail/detail.js
View file @
1cec4a6
...
...
@@ -140,6 +140,8 @@ Page(Object.assign({
let
limitProductCode
=
query
.
limitProductCode
?
query
.
limitProductCode
:
''
;
let
originUid
=
parseInt
(
query
.
originUid
?
query
.
originUid
:
'0'
,
10
);
let
originUnionID
=
query
.
originUnionID
?
query
.
originUnionID
:
''
;
let
currentScene
=
app
.
globalData
.
currentScene
;
let
isGoApp
=
(
currentScene
==
1036
||
currentScene
==
1069
)
?
true
:
false
;
let
uid
=
app
.
getUid
();
let
scene
=
''
;
...
...
@@ -153,7 +155,8 @@ Page(Object.assign({
originUid
,
originUnionID
,
uid
,
scene
scene
,
isGoApp
});
yas
=
new
Yas
(
app
);
// 实例化埋点
...
...
@@ -745,6 +748,18 @@ Page(Object.assign({
error
:
false
});
},
goApp
:
function
(
e
)
{
},
launchAppError
:
function
(
e
)
{
wx
.
showToast
({
title
:
'打开失败!您可能未安装Yoho!Buy官方APP,请下载后再尝试。'
,
icon
:
'none'
,
duration
:
3000
})
},
goLogin
(
login
=
1
)
{
let
data
=
{};
...
...
app/pages/product/detail/detail.wxml
View file @
1cec4a6
...
...
@@ -488,4 +488,8 @@
</yoho-alert>
</block>
<button wx:if="{{isGoApp}}" class="appBtn" bindtap='goApp' type="default" hover-class="none" open-type="launchApp" app-parameter="{{appParameter}}" binderror="launchAppError">
<image class="appImg" src="../../../static/images/back2App@3x.png"></image>
</button>
<template is="zan-actionsheet" data="{{...actionSheet}}" />
\ No newline at end of file
...
...
app/pages/product/detail/detail.wxss
View file @
1cec4a6
...
...
@@ -258,4 +258,24 @@
.modal-content .btn-info {
padding: 0 0;
width: 200rpx;
}
.appBtn {
position: fixed;
width: 80rpx;
height: 160rpx;
right: 50rpx;
bottom: 148rpx;
padding: 0;
align-self: center;
background-color: transparent !important;
z-index: 99;
}
.appBtn::after {
border: none;
}
.appBtn .appImg {
width: 80rpx;
height: 160rpx;
}
\ No newline at end of file
...
...
app/static/images/back2App@3x.png
0 → 100644
View file @
1cec4a6
17.7 KB
Please
register
or
login
to post a comment