Authored by 肖亚东

3054:app分享小程序返回APP

... ... @@ -52,6 +52,7 @@ Page(Object.assign({
* 页面的初始数据
*/
data: {
isGoApp: false,
tabIdx: '',
showAuth: false,
actPrizeId: '',
... ... @@ -111,6 +112,10 @@ Page(Object.assign({
let data = {};
let currentScene = app.globalData.currentScene;
let isGoApp = (currentScene == 1036 || currentScene == 1069) ? true : false;
data.isGoApp = isGoApp;
if (options.shareUid) {
data.shareUid = options.shareUid;
}
... ... @@ -588,6 +593,13 @@ Page(Object.assign({
})
}
},
launchAppError: function (e) {
wx.showToast({
title: '打开失败!您可能未安装Yoho!Buy官方APP,请下载后再尝试。',
icon: 'none',
duration: 3000
})
},
//跳转到登录页面
loginAndRegisterTapped(needBind) {
let that = this;
... ...
... ... @@ -95,3 +95,7 @@
bindgetphonenumber="getPhoneNumber" bindgetuserinfo='getUserInfo'>授权登录
</button>
</zero-alert>
<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="./images/back2App@3x.png"></image>
</button>
\ No newline at end of file
... ...
... ... @@ -207,4 +207,24 @@
top:112rpx;
z-index:10;
left:82rpx;
}
\ No newline at end of file
}
.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;
}
... ...
... ... @@ -31,7 +31,7 @@
"list": []
},
"miniprogram": {
"current": 5,
"current": 6,
"list": [
{
"id": 0,
... ... @@ -73,6 +73,14 @@
"name": "YOLUCK DETAIL",
"pathName": "pages/zeroSell/detail",
"query": "actPrizeId=41"
},
{
"id": 6,
"name": "1036",
"pathName": "pages/zeroSell/detail",
"query": "actPrizeId=62&fromPageParam=1&tabIdx=1",
"scene": 1036,
"referrerInfo": {}
}
]
}
... ...