Authored by 邱骏

Merge branch 'develop' of http://git.yoho.cn/fe/yoho-limited-sell-miniapp into develop

@@ -163,7 +163,9 @@ Page(Object.assign({ @@ -163,7 +163,9 @@ Page(Object.assign({
163 }; 163 };
164 } else if (res.from === 'button') { 164 } else if (res.from === 'button') {
165 // 用户点击分享按钮 165 // 用户点击分享按钮
  166 +
166 console.log(`/pages/product/detail/detail?limitProductCode=${this.data.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}`); 167 console.log(`/pages/product/detail/detail?limitProductCode=${this.data.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}`);
  168 +
167 return { 169 return {
168 title: params.TITLE, // 分享标题 170 title: params.TITLE, // 分享标题
169 desc: params.DESC, // 分享描述 171 desc: params.DESC, // 分享描述
@@ -269,12 +271,12 @@ Page(Object.assign({ @@ -269,12 +271,12 @@ Page(Object.assign({
269 } 271 }
270 272
271 this.setData({ 273 this.setData({
272 - productSkn: res.data.productSkn,  
273 - productName: res.data.productName,  
274 - price: res.data.price,  
275 - saleTime: res.data.saleTime,  
276 - reminderNum: res.data.reminderNum,  
277 - limitProductType: res.data.limitProductType, 274 + productSkn: res.data.productSkn ? res.data.productSkn : '',
  275 + productName: res.data.productName ? res.data.productName : '',
  276 + price: res.data.price ? res.data.price : '即将开售',
  277 + saleTime: res.data.saleTime ? res.data.saleTime : '',
  278 + reminderNum: res.data.reminderNum ? res.data.reminderNum : 0,
  279 + limitProductType: res.data.limitProductType ? res.data.limitProductType : 4,
278 showStatus: res.data.showStatus ? res.data.showStatus : 0, 280 showStatus: res.data.showStatus ? res.data.showStatus : 0,
279 assisLimit: res.data.helpLimit ? res.data.helpLimit : 0, 281 assisLimit: res.data.helpLimit ? res.data.helpLimit : 0,
280 queueType: res.data.queueType ? res.data.queueType : QUEUE_TYPE.READY, 282 queueType: res.data.queueType ? res.data.queueType : QUEUE_TYPE.READY,
@@ -298,7 +300,7 @@ Page(Object.assign({ @@ -298,7 +300,7 @@ Page(Object.assign({
298 300
299 let assisStatus = ASSIS_STATUS.SHARE; 301 let assisStatus = ASSIS_STATUS.SHARE;
300 302
301 - if (this.data.assisLimit === result.data.list.length) { 303 + if (result.data.list && this.data.assisLimit === result.data.list.length) {
302 assisStatus = ASSIS_STATUS.ASSIS_FULL; 304 assisStatus = ASSIS_STATUS.ASSIS_FULL;
303 } else { 305 } else {
304 // 不是发起者 306 // 不是发起者
@@ -395,8 +397,8 @@ Page(Object.assign({ @@ -395,8 +397,8 @@ Page(Object.assign({
395 detailModel.addAssist({ 397 detailModel.addAssist({
396 userId: this.data.originUid, 398 userId: this.data.originUid,
397 helpUserId: app.getUnionID(), 399 helpUserId: app.getUnionID(),
398 - helpUserName: userInfo.nickName,  
399 - helpUserImgUrl: userInfo.avatarUrl, 400 + helpUserName: userInfo.nickName ? userInfo.nickName : '',
  401 + helpUserImgUrl: userInfo.avatarUrl ? userInfo.avatarUrl : '',
400 limitProductCode: this.data.limitProductCode 402 limitProductCode: this.data.limitProductCode
401 }).then(result => { 403 }).then(result => {
402 if (result.code === 200) { 404 if (result.code === 200) {
@@ -460,6 +462,9 @@ Page(Object.assign({ @@ -460,6 +462,9 @@ Page(Object.assign({
460 buyNow() { 462 buyNow() {
461 router.goUrl(`miniapp.yohobuy.com/pages/goodsDetail/goodsDetail?app=yohobuy&productSkn=${this.data.productSkn}`); 463 router.goUrl(`miniapp.yohobuy.com/pages/goodsDetail/goodsDetail?app=yohobuy&productSkn=${this.data.productSkn}`);
462 }, 464 },
  465 + goHelp() {
  466 + router.go('webview', {url: ''});
  467 + },
463 goList() { 468 goList() {
464 router.go('home'); 469 router.go('home');
465 }, 470 },
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <block wx:if="{{saleTime}}"> 14 <block wx:if="{{saleTime}}">
15 <view class="text-time">{{saleTime}}发售</view> 15 <view class="text-time">{{saleTime}}发售</view>
16 </block> 16 </block>
17 - <block> 17 + <block wx:else>
18 <view class="text-time">发售时间待定</view> 18 <view class="text-time">发售时间待定</view>
19 </block> 19 </block>
20 </view> 20 </view>
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
23 <view class="detail-btn" bindtap="buyNow">查看商品详情</view> 23 <view class="detail-btn" bindtap="buyNow">查看商品详情</view>
24 </view> 24 </view>
25 <view class="line"></view> 25 <view class="line"></view>
  26 +<image class="banner-image" bindtap="goList" src="../../../static/images/banner.png"></image>
26 <view class="detail-container"> 27 <view class="detail-container">
27 <view class="goodsInfo"> 28 <view class="goodsInfo">
28 <view wx:for="{{productDesc}}"> 29 <view wx:for="{{productDesc}}">
@@ -46,7 +47,7 @@ @@ -46,7 +47,7 @@
46 <form bindsubmit="assisShare" report-submit='true'> 47 <form bindsubmit="assisShare" report-submit='true'>
47 <view class="bottom1-action"> 48 <view class="bottom1-action">
48 <button class="action-btn" formType="submit">邀请好友助力获取限购码</button> 49 <button class="action-btn" formType="submit">邀请好友助力获取限购码</button>
49 - <view class="help">?</view> 50 + <view class="help" bindtap="goHelp">?</view>
50 </view> 51 </view>
51 </form> 52 </form>
52 </action-bar> 53 </action-bar>
@@ -88,7 +89,7 @@ @@ -88,7 +89,7 @@
88 <action-bar wx:elif="{{assisStatus === 4}}"> 89 <action-bar wx:elif="{{assisStatus === 4}}">
89 <view class="bottom1-action"> 90 <view class="bottom1-action">
90 <view class="action-btn">已助力</view> 91 <view class="action-btn">已助力</view>
91 - <view class="help">?</view> 92 + <view class="help" bindtap="goHelp">?</view>
92 </view> 93 </view>
93 </action-bar> 94 </action-bar>
94 95
@@ -290,7 +291,7 @@ @@ -290,7 +291,7 @@
290 <action-bar> 291 <action-bar>
291 <view class="bottom1-action"> 292 <view class="bottom1-action">
292 <view class="action-btn">已助力</view> 293 <view class="action-btn">已助力</view>
293 - <view class="help">?</view> 294 + <view class="help" bindtap="goHelp">?</view>
294 </view> 295 </view>
295 </action-bar> 296 </action-bar>
296 </block> 297 </block>
@@ -151,6 +151,9 @@ @@ -151,6 +151,9 @@
151 font-size: 28rpx; 151 font-size: 28rpx;
152 background-color: #d0021b; 152 background-color: #d0021b;
153 right: 30rpx; 153 right: 30rpx;
  154 + top:50%;
  155 + transform:translateY(-50%);
  156 +
154 } 157 }
155 158
156 .top-assis-action { 159 .top-assis-action {
@@ -254,3 +257,8 @@ @@ -254,3 +257,8 @@
254 border-radius: 40rpx; 257 border-radius: 40rpx;
255 color: white; 258 color: white;
256 } 259 }
  260 +
  261 +.banner-image {
  262 + width: 100%;
  263 + height: 290rpx;
  264 +}
@@ -157,7 +157,7 @@ Page({ @@ -157,7 +157,7 @@ Page({
157 pCtx.setTextAlign('center'); 157 pCtx.setTextAlign('center');
158 pCtx.setFontSize(11); 158 pCtx.setFontSize(11);
159 pCtx.fillText('长按扫码查看详情', 187.5 * scale, 632.5 * scale); 159 pCtx.fillText('长按扫码查看详情', 187.5 * scale, 632.5 * scale);
160 - pCtx.drawImage('./images/snapshoot_tip_ic@2x.png', 87 * scale, 645.5 * scale, 9 * scale, 9 * scale); 160 + pCtx.drawImage('./images/snapshoot_tip_ic@2x.png', 80 * scale, 645.5 * scale, 9 * scale, 9 * scale);
161 pCtx.setFillStyle('#b0b0b0'); 161 pCtx.setFillStyle('#b0b0b0');
162 pCtx.setFontSize(9); 162 pCtx.setFontSize(9);
163 pCtx.fillText('或者在各大应用市场搜索 Yoho!Buy有货 下载App', 187.5 * scale, 652.5 * scale); 163 pCtx.fillText('或者在各大应用市场搜索 Yoho!Buy有货 下载App', 187.5 * scale, 652.5 * scale);
@@ -7,5 +7,6 @@ export default { @@ -7,5 +7,6 @@ export default {
7 snapShare: {path: '/pages/snapshootShare/snapshootShare'}, 7 snapShare: {path: '/pages/snapshootShare/snapshootShare'},
8 prizeUserList: {path: '/pages/queue/prizeUserList'}, 8 prizeUserList: {path: '/pages/queue/prizeUserList'},
9 myList: {path: '/pages/queue/myList'}, 9 myList: {path: '/pages/queue/myList'},
10 - queueIndex: {path: '/pages/queue/index'} 10 + queueIndex: {path: '/pages/queue/index'},
  11 + webview: {path: '/pages/webview/webview'}
11 }; 12 };