Authored by 陈峰

Merge branch 'release/6.9.2' into 'master'

Release/6.9.2

返回app功能

See merge request !13
... ... @@ -32,6 +32,7 @@ App({
thirdSession: '',
udid: '',
unionType: '',
currentScene: 1001,
systemInfo: {}
},
reportData: {
... ... @@ -61,11 +62,17 @@ 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
verify.gen(); // 此处返回是是 Promise,需要调用接口的业务,最好在 then 里边执行
let scene = options ? options.scene : '';
this.globalData.currentScene = scene;
// wx.getLocation({}); // 获取位置信息
wx.checkSession().then(() => { // 微信登录未过期
this.getWechatThirdSession();
... ...
... ... @@ -148,12 +148,18 @@ Page(Object.assign({
scene = query.scene;
}
let currentScene = app.globalData.currentScene;
let isGoApp = (currentScene == 1036 || currentScene == 1069) ? true : false;
let appParameter = `http://m.yohobuy.com?openby:yohobuy={\"action\":\"go.limitpurchase\",\"params\":{\"lp\":\"${limitProductCode}\"}}`;
this.setData({
limitProductCode,
originUid,
originUnionID,
uid,
scene
scene,
isGoApp,
appParameter
});
yas = new Yas(app); // 实例化埋点
... ... @@ -745,6 +751,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 = {};
... ...
... ... @@ -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
... ...
... ... @@ -259,3 +259,23 @@
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
... ...