Showing
7 changed files
with
56 additions
and
43 deletions
@@ -151,6 +151,27 @@ Page(Object.assign({ | @@ -151,6 +151,27 @@ Page(Object.assign({ | ||
151 | 151 | ||
152 | yas = new Yas(app); // 实例化埋点 | 152 | yas = new Yas(app); // 实例化埋点 |
153 | yas.pageOpenReport(); | 153 | yas.pageOpenReport(); |
154 | + | ||
155 | + wx.showLoading({ | ||
156 | + title: '加载中...', | ||
157 | + mask: true, | ||
158 | + }); | ||
159 | + | ||
160 | + setTimeout(() => { | ||
161 | + app = app || getApp(); | ||
162 | + | ||
163 | + if (this.data.scene) { | ||
164 | + this.loadDataFromCode().then(() => { | ||
165 | + this.init().then(() => { | ||
166 | + this._showRepeat(); | ||
167 | + }); | ||
168 | + }); | ||
169 | + } else { | ||
170 | + this.init().then(() => { | ||
171 | + this._showRepeat(); | ||
172 | + }); | ||
173 | + } | ||
174 | + }, app ? 0 : 1000); | ||
154 | }, | 175 | }, |
155 | 176 | ||
156 | loadDataFromCode() { | 177 | loadDataFromCode() { |
@@ -169,17 +190,6 @@ Page(Object.assign({ | @@ -169,17 +190,6 @@ Page(Object.assign({ | ||
169 | }); | 190 | }); |
170 | }, | 191 | }, |
171 | onShow() { | 192 | onShow() { |
172 | - setTimeout(() => { | ||
173 | - app = app || getApp(); | ||
174 | - | ||
175 | - if (this.data.scene) { | ||
176 | - this.loadDataFromCode().then(() => { | ||
177 | - this.init(); | ||
178 | - }); | ||
179 | - } else { | ||
180 | - this.init(); | ||
181 | - } | ||
182 | - }, app ? 0 : 1000); | ||
183 | }, | 193 | }, |
184 | onShareAppMessage: function(res) { | 194 | onShareAppMessage: function(res) { |
185 | let params = { | 195 | let params = { |
@@ -371,19 +381,11 @@ Page(Object.assign({ | @@ -371,19 +381,11 @@ Page(Object.assign({ | ||
371 | showAssistList = true; | 381 | showAssistList = true; |
372 | } | 382 | } |
373 | 383 | ||
374 | - if (assistStatus === ASSIST_STATUS.ASSIST_ALREADY_ACTION) { | ||
375 | - this.setData({ | ||
376 | - assistStatus, | ||
377 | - assistSuccess: ASSIST_SUCCESS.REPEAT, | ||
378 | - modal: true | ||
379 | - }); | ||
380 | - } else { | ||
381 | this.setData({ | 384 | this.setData({ |
382 | avatarList: result.data.list || [], | 385 | avatarList: result.data.list || [], |
383 | assistStatus, | 386 | assistStatus, |
384 | showAssistList | 387 | showAssistList |
385 | }); | 388 | }); |
386 | - } | ||
387 | }); | 389 | }); |
388 | } else if (this.data.limitProductType === LIMIT_TYPE.QUEUE) { | 390 | } else if (this.data.limitProductType === LIMIT_TYPE.QUEUE) { |
389 | return detailModel.getAssistInfo(uid, this.data.limitProductCode).then(result => { | 391 | return detailModel.getAssistInfo(uid, this.data.limitProductCode).then(result => { |
@@ -424,17 +426,9 @@ Page(Object.assign({ | @@ -424,17 +426,9 @@ Page(Object.assign({ | ||
424 | queueStatus = QUEUE_STATUS.QUEUE_HELP; | 426 | queueStatus = QUEUE_STATUS.QUEUE_HELP; |
425 | } | 427 | } |
426 | 428 | ||
427 | - if (queueStatus === QUEUE_STATUS.QUEUE_HELP) { | ||
428 | - this.setData({ | ||
429 | - queueStatus, | ||
430 | - queueSuccess: QUEUE_SUCCESS.REPEAT, | ||
431 | - modal: true | ||
432 | - }); | ||
433 | - } else { | ||
434 | this.setData({ | 429 | this.setData({ |
435 | queueStatus | 430 | queueStatus |
436 | }); | 431 | }); |
437 | - } | ||
438 | 432 | ||
439 | }); | 433 | }); |
440 | } | 434 | } |
@@ -640,6 +634,11 @@ Page(Object.assign({ | @@ -640,6 +634,11 @@ Page(Object.assign({ | ||
640 | refreshText: '加载中...' | 634 | refreshText: '加载中...' |
641 | }); | 635 | }); |
642 | 636 | ||
637 | + wx.showLoading({ | ||
638 | + title: '加载中...', | ||
639 | + mask: true, | ||
640 | + }); | ||
641 | + | ||
643 | this.init().then(() => { | 642 | this.init().then(() => { |
644 | wx.stopPullDownRefresh(); | 643 | wx.stopPullDownRefresh(); |
645 | this.setData({ | 644 | this.setData({ |
@@ -658,11 +657,6 @@ Page(Object.assign({ | @@ -658,11 +657,6 @@ Page(Object.assign({ | ||
658 | }); | 657 | }); |
659 | }, | 658 | }, |
660 | init() { | 659 | init() { |
661 | - wx.showLoading({ | ||
662 | - title: '加载中...', | ||
663 | - mask: true, | ||
664 | - }); | ||
665 | - | ||
666 | return this.getUid().then(() => { | 660 | return this.getUid().then(() => { |
667 | return this.productInfo(); | 661 | return this.productInfo(); |
668 | }).then(() => { | 662 | }).then(() => { |
@@ -703,5 +697,20 @@ Page(Object.assign({ | @@ -703,5 +697,20 @@ Page(Object.assign({ | ||
703 | }); | 697 | }); |
704 | } | 698 | } |
705 | }); | 699 | }); |
700 | + }, | ||
701 | + _showRepeat() { | ||
702 | + if (this.data.queueStatus === QUEUE_STATUS.QUEUE_HELP) { | ||
703 | + this.setData({ | ||
704 | + queueSuccess: QUEUE_SUCCESS.REPEAT, | ||
705 | + modal: true | ||
706 | + }); | ||
707 | + } | ||
708 | + | ||
709 | + if (this.data.assistStatus === ASSIST_STATUS.ASSIST_ALREADY_ACTION) { | ||
710 | + this.setData({ | ||
711 | + assistSuccess: ASSIST_SUCCESS.REPEAT, | ||
712 | + modal: true | ||
713 | + }); | ||
714 | + } | ||
706 | } | 715 | } |
707 | }, Actionsheet)); | 716 | }, Actionsheet)); |
@@ -174,14 +174,15 @@ | @@ -174,14 +174,15 @@ | ||
174 | } | 174 | } |
175 | 175 | ||
176 | .modal-content .modal-title { | 176 | .modal-content .modal-title { |
177 | - margin-top: 120rpx; | 177 | + margin-top: 100rpx; |
178 | } | 178 | } |
179 | 179 | ||
180 | .modal-content .sub-title { | 180 | .modal-content .sub-title { |
181 | - font-size: 36rpx; | 181 | + font-size: 32rpx; |
182 | margin-bottom: 20rpx; | 182 | margin-bottom: 20rpx; |
183 | height: 50rpx; | 183 | height: 50rpx; |
184 | line-height: 50rpx; | 184 | line-height: 50rpx; |
185 | + font-weight: 600; | ||
185 | } | 186 | } |
186 | 187 | ||
187 | .modal-content .sub-title2 { | 188 | .modal-content .sub-title2 { |
@@ -204,8 +205,8 @@ | @@ -204,8 +205,8 @@ | ||
204 | height: 74rpx; | 205 | height: 74rpx; |
205 | line-height: 74rpx; | 206 | line-height: 74rpx; |
206 | background-color: #d0021b; | 207 | background-color: #d0021b; |
207 | - padding-left: 40rpx; | ||
208 | - padding-right: 40rpx; | 208 | + padding-left: 30rpx; |
209 | + padding-right: 30rpx; | ||
209 | border-radius: 40rpx; | 210 | border-radius: 40rpx; |
210 | color: white; | 211 | color: white; |
211 | } | 212 | } |
@@ -5,6 +5,7 @@ const screenHeight = app.globalData.systemInfo.screenHeight; | @@ -5,6 +5,7 @@ const screenHeight = app.globalData.systemInfo.screenHeight; | ||
5 | 5 | ||
6 | const scale = windowWidth / 375; | 6 | const scale = windowWidth / 375; |
7 | 7 | ||
8 | + | ||
8 | var Point = function(x, y) { | 9 | var Point = function(x, y) { |
9 | return { | 10 | return { |
10 | x: x, | 11 | x: x, |
@@ -142,12 +143,12 @@ Page({ | @@ -142,12 +143,12 @@ Page({ | ||
142 | } | 143 | } |
143 | }); | 144 | }); |
144 | 145 | ||
145 | - pCtx.drawImage('./images/share-logo@2x.png', 132 * scale, 455 * scale, 111 * scale, 20 * scale); | 146 | + pCtx.drawImage('./images/share-logo@2x.png', 132 * scale, 435 * scale, 111 * scale, 20 * scale); |
146 | 147 | ||
147 | wx.getImageInfo({ | 148 | wx.getImageInfo({ |
148 | src: this.data.product_qrCode, | 149 | src: this.data.product_qrCode, |
149 | success: function(res) { | 150 | success: function(res) { |
150 | - pCtx.drawImage(res.path, 129.5 * scale, 490.5 * scale, 116 * scale, 116 * scale); | 151 | + pCtx.drawImage(res.path, 129.5 * scale, 480.5 * scale, 120 * scale, 120 * scale); |
151 | pCtx.draw(true); | 152 | pCtx.draw(true); |
152 | } | 153 | } |
153 | }); | 154 | }); |
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | <view class="snapshoot-canvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px; background-color: white; margin-top: {{screenHeight}}px" > | 36 | <view class="snapshoot-canvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px; background-color: white; margin-top: {{screenHeight}}px" > |
37 | <canvas canvas-id="productDetailCanvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px;background-color: white"></canvas> | 37 | <canvas canvas-id="productDetailCanvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px;background-color: white"></canvas> |
38 | </view> | 38 | </view> |
39 | - <!-- <view class="snapshoot-canvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px; background-color: white; margin-top: {{-100}}px " > | 39 | +<!-- <view class="snapshoot-canvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px; background-color: white; margin-top: {{-100}}px " > |
40 | <canvas canvas-id="productDetailCanvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px;background-color: white"></canvas> | 40 | <canvas canvas-id="productDetailCanvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px;background-color: white"></canvas> |
41 | </view> --> | 41 | </view> --> |
42 | </view> | 42 | </view> |
@@ -89,11 +89,12 @@ | @@ -89,11 +89,12 @@ | ||
89 | width: 160rpx; | 89 | width: 160rpx; |
90 | height: 29rpx; | 90 | height: 29rpx; |
91 | margin-top: 21rpx; | 91 | margin-top: 21rpx; |
92 | + margin-bottom: 30rpx; | ||
92 | } | 93 | } |
93 | 94 | ||
94 | .snapshoot .shop-miniqr .shop-qrcode { | 95 | .snapshoot .shop-miniqr .shop-qrcode { |
95 | - width: 130rpx; | ||
96 | - height: 130rpx; | 96 | + width: 150rpx; |
97 | + height: 150rpx; | ||
97 | margin-top: 90rpx; | 98 | margin-top: 90rpx; |
98 | } | 99 | } |
99 | 100 | ||
@@ -101,12 +102,13 @@ | @@ -101,12 +102,13 @@ | ||
101 | width: 180rpx; | 102 | width: 180rpx; |
102 | height: 180rpx; | 103 | height: 180rpx; |
103 | margin-top: 21rpx; | 104 | margin-top: 21rpx; |
105 | + margin-bottom: 20rpx; | ||
104 | } | 106 | } |
105 | 107 | ||
106 | .snapshoot-container .snapshoot-save { | 108 | .snapshoot-container .snapshoot-save { |
107 | width: 260rpx; | 109 | width: 260rpx; |
108 | height: 88rpx; | 110 | height: 88rpx; |
109 | - background-color: red; | 111 | + background-color: #d0021b; |
110 | border-radius: 10rpx; | 112 | border-radius: 10rpx; |
111 | display: flex; | 113 | display: flex; |
112 | flex-direction: row; | 114 | flex-direction: row; |
-
Please register or login to post a comment