Merge branch 'release/6.9.2' into 'master'
Release/6.9.2 返回app功能 See merge request !14
Showing
5 changed files
with
50 additions
and
3 deletions
@@ -52,11 +52,13 @@ Page(Object.assign({ | @@ -52,11 +52,13 @@ Page(Object.assign({ | ||
52 | * 页面的初始数据 | 52 | * 页面的初始数据 |
53 | */ | 53 | */ |
54 | data: { | 54 | data: { |
55 | + isGoApp: false, | ||
55 | tabIdx: '', | 56 | tabIdx: '', |
56 | showAuth: false, | 57 | showAuth: false, |
57 | actPrizeId: '', | 58 | actPrizeId: '', |
58 | shareUid: 0, | 59 | shareUid: 0, |
59 | scene: '', | 60 | scene: '', |
61 | + appParameter: '', | ||
60 | myPrizeCount: 0, | 62 | myPrizeCount: 0, |
61 | product: {}, | 63 | product: {}, |
62 | avatars: [], | 64 | avatars: [], |
@@ -111,6 +113,10 @@ Page(Object.assign({ | @@ -111,6 +113,10 @@ Page(Object.assign({ | ||
111 | 113 | ||
112 | let data = {}; | 114 | let data = {}; |
113 | 115 | ||
116 | + let currentScene = app.globalData.currentScene; | ||
117 | + let isGoApp = (currentScene == 1036 || currentScene == 1069) ? true : false; | ||
118 | + data.isGoApp = isGoApp; | ||
119 | + | ||
114 | if (options.shareUid) { | 120 | if (options.shareUid) { |
115 | data.shareUid = options.shareUid; | 121 | data.shareUid = options.shareUid; |
116 | } | 122 | } |
@@ -123,13 +129,15 @@ Page(Object.assign({ | @@ -123,13 +129,15 @@ Page(Object.assign({ | ||
123 | data.actPrizeId = options.actPrizeId; | 129 | data.actPrizeId = options.actPrizeId; |
124 | } | 130 | } |
125 | 131 | ||
132 | + let appParameter = `https://m.yohobuy.com?openby:yohobuy={"action":"go.h5","params":{"param":{},"url":"https://m.yohobuy.com/activity/yoluck/${data.actPrizeId}.html"}}`; | ||
133 | + data.appParameter = appParameter; | ||
126 | 134 | ||
127 | if (options.scene && options.scene.length === 32) { | 135 | if (options.scene && options.scene.length === 32) { |
128 | data.scene = options.scene; | 136 | data.scene = options.scene; |
129 | } | 137 | } |
130 | 138 | ||
131 | this.setData(data); | 139 | this.setData(data); |
132 | - | 140 | + |
133 | new app.WeToast(); | 141 | new app.WeToast(); |
134 | 142 | ||
135 | this._getDetailBanner(); | 143 | this._getDetailBanner(); |
@@ -588,6 +596,13 @@ Page(Object.assign({ | @@ -588,6 +596,13 @@ Page(Object.assign({ | ||
588 | }) | 596 | }) |
589 | } | 597 | } |
590 | }, | 598 | }, |
599 | + launchAppError: function (e) { | ||
600 | + wx.showToast({ | ||
601 | + title: '打开失败!您可能未安装Yoho!Buy官方APP,请下载后再尝试。', | ||
602 | + icon: 'none', | ||
603 | + duration: 3000 | ||
604 | + }) | ||
605 | + }, | ||
591 | //跳转到登录页面 | 606 | //跳转到登录页面 |
592 | loginAndRegisterTapped(needBind) { | 607 | loginAndRegisterTapped(needBind) { |
593 | let that = this; | 608 | let that = this; |
@@ -95,3 +95,7 @@ | @@ -95,3 +95,7 @@ | ||
95 | bindgetphonenumber="getPhoneNumber" bindgetuserinfo='getUserInfo'>授权登录 | 95 | bindgetphonenumber="getPhoneNumber" bindgetuserinfo='getUserInfo'>授权登录 |
96 | </button> | 96 | </button> |
97 | </zero-alert> | 97 | </zero-alert> |
98 | + | ||
99 | +<button wx:if="{{isGoApp}}" class="appBtn" bindtap='goApp' type="default" hover-class="none" open-type="launchApp" app-parameter="{{appParameter}}" binderror="launchAppError"> | ||
100 | + <image class="appImg" src="./images/back2App@3x.png"></image> | ||
101 | +</button> |
@@ -207,4 +207,24 @@ | @@ -207,4 +207,24 @@ | ||
207 | top:112rpx; | 207 | top:112rpx; |
208 | z-index:10; | 208 | z-index:10; |
209 | left:82rpx; | 209 | left:82rpx; |
210 | -} | ||
210 | +} | ||
211 | + | ||
212 | +.appBtn { | ||
213 | + position: fixed; | ||
214 | + width: 80rpx; | ||
215 | + height: 160rpx; | ||
216 | + right: 50rpx; | ||
217 | + bottom: 148rpx; | ||
218 | + padding: 0; | ||
219 | + align-self: center; | ||
220 | + background-color: transparent !important; | ||
221 | + z-index: 99; | ||
222 | +} | ||
223 | +.appBtn::after { | ||
224 | + border: none; | ||
225 | +} | ||
226 | + | ||
227 | +.appBtn .appImg { | ||
228 | + width: 80rpx; | ||
229 | + height: 160rpx; | ||
230 | +} |
pages/zeroSell/images/back2App@3x.png
0 → 100644
17.7 KB
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | "list": [] | 31 | "list": [] |
32 | }, | 32 | }, |
33 | "miniprogram": { | 33 | "miniprogram": { |
34 | - "current": 5, | 34 | + "current": 6, |
35 | "list": [ | 35 | "list": [ |
36 | { | 36 | { |
37 | "id": 0, | 37 | "id": 0, |
@@ -73,6 +73,14 @@ | @@ -73,6 +73,14 @@ | ||
73 | "name": "YOLUCK DETAIL", | 73 | "name": "YOLUCK DETAIL", |
74 | "pathName": "pages/zeroSell/detail", | 74 | "pathName": "pages/zeroSell/detail", |
75 | "query": "actPrizeId=41" | 75 | "query": "actPrizeId=41" |
76 | + }, | ||
77 | + { | ||
78 | + "id": 6, | ||
79 | + "name": "1036", | ||
80 | + "pathName": "pages/zeroSell/detail", | ||
81 | + "query": "actPrizeId=62&fromPageParam=1&tabIdx=1", | ||
82 | + "scene": 1036, | ||
83 | + "referrerInfo": {} | ||
76 | } | 84 | } |
77 | ] | 85 | ] |
78 | } | 86 | } |
-
Please register or login to post a comment