Authored by huangyCode

错误页面

@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 "pages/zeroSell/detail", 4 "pages/zeroSell/detail",
5 "pages/zeroSell/snapshootShare", 5 "pages/zeroSell/snapshootShare",
6 "pages/zeroSell/h5Page", 6 "pages/zeroSell/h5Page",
  7 + "pages/zeroSell/error",
7 "pages/bindPhoneNumber/bindPhoneNumber", 8 "pages/bindPhoneNumber/bindPhoneNumber",
8 "pages/choosecountry/choosecountry", 9 "pages/choosecountry/choosecountry",
9 "login/login-page/login-page" 10 "login/login-page/login-page"
@@ -133,11 +133,9 @@ function request(method = 'GET') { @@ -133,11 +133,9 @@ function request(method = 'GET') {
133 let code = statusCode; 133 let code = statusCode;
134 let message = res.errMsg ? res.errMsg : ''; 134 let message = res.errMsg ? res.errMsg : '';
135 if(statusCode === 503) { 135 if(statusCode === 503) {
136 - wx.showToast({  
137 - title: '目前参与人数过多请下拉刷新',  
138 - icon: 'none',  
139 - duration: 2000  
140 - }); 136 + wx.navigateTo({
  137 + url: '/pages/zeroSell/error'
  138 + })
141 } 139 }
142 reject({ code, message }); 140 reject({ code, message });
143 } 141 }
@@ -145,13 +143,6 @@ function request(method = 'GET') { @@ -145,13 +143,6 @@ function request(method = 'GET') {
145 fail: function (err) { 143 fail: function (err) {
146 let code = err.code ? err.code : 800; 144 let code = err.code ? err.code : 800;
147 let message = err.message ? err.message : ''; 145 let message = err.message ? err.message : '';
148 - if(code === 503) {  
149 - wx.showToast({  
150 - title: '目前参与人数过多请下拉刷新',  
151 - icon: 'none',  
152 - duration: 2000  
153 - });  
154 - }  
155 reject({code, message}); 146 reject({code, message});
156 } 147 }
157 }); 148 });
@@ -224,11 +215,9 @@ function request(method = 'GET') { @@ -224,11 +215,9 @@ function request(method = 'GET') {
224 let code = statusCode; 215 let code = statusCode;
225 let message = res.errMsg ? res.errMsg : ''; 216 let message = res.errMsg ? res.errMsg : '';
226 if(statusCode === 503) { 217 if(statusCode === 503) {
227 - wx.showToast({  
228 - title: '目前参与人数过多请下拉刷新',  
229 - icon: 'none',  
230 - duration: 2000  
231 - }); 218 + wx.navigateTo({
  219 + url: '/pages/zeroSell/error'
  220 + })
232 } 221 }
233 reject({ code, message }); 222 reject({ code, message });
234 } 223 }
@@ -236,13 +225,6 @@ function request(method = 'GET') { @@ -236,13 +225,6 @@ function request(method = 'GET') {
236 fail: function (err) { 225 fail: function (err) {
237 let code = err.code ? err.code : 800; 226 let code = err.code ? err.code : 800;
238 let message = err.message ? err.message : ''; 227 let message = err.message ? err.message : '';
239 - if(code === 503){  
240 - wx.showToast({  
241 - title: '目前参与人数过多请下拉刷新',  
242 - icon: 'none',  
243 - duration: 2000  
244 - });  
245 - }  
246 reject({ code, message }); 228 reject({ code, message });
247 } 229 }
248 }); 230 });
@@ -62,7 +62,6 @@ Page(Object.assign({ @@ -62,7 +62,6 @@ Page(Object.assign({
62 */ 62 */
63 data: { 63 data: {
64 tabIdx: '', 64 tabIdx: '',
65 - show: false,  
66 showAuth: false, 65 showAuth: false,
67 actPrizeId: '', 66 actPrizeId: '',
68 shareUid: 0, 67 shareUid: 0,
@@ -358,7 +357,6 @@ Page(Object.assign({ @@ -358,7 +357,6 @@ Page(Object.assign({
358 357
359 myPrizeCount: r1.code === 200 ? r1.data.myCodeNum : 0, 358 myPrizeCount: r1.code === 200 ? r1.data.myCodeNum : 0,
360 participantCount, 359 participantCount,
361 - show: true,  
362 snapData, 360 snapData,
363 notice: JSON.parse(product.notice || '{}'), 361 notice: JSON.parse(product.notice || '{}'),
364 lottery: JSON.parse(product.lottery_info || '{}') 362 lottery: JSON.parse(product.lottery_info || '{}')
1 -<block wx:if="{{show}}"> 1 +<view class="header {{shareFlag || 'mt-header'}}">
2 2
3 - <view class="header {{shareFlag || 'mt-header'}}" >  
4 -  
5 - <product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header>  
6 - </view>  
7 - <block wx:if="{{false}}">  
8 - <counter count="{{participantCount}}" num="{{product.limit}}" status="{{product.status}}"></counter>  
9 - <prize-progress step="{{step}}"></prize-progress>  
10 - </block>  
11 - <view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}">  
12 - <view class="open-shadow"></view>  
13 - <view class="code-list" animation="{{animation}}">  
14 - <view class="code-list-item-container">  
15 - <view class="code-list-item"><view class="content"></view></view>  
16 - <view class="code-list-item" wx:for="{{codeList}}" wx:if="{{index < 3}}" wx:key="{{index}}">  
17 - <view class="content">  
18 - <image class="thumb" mode="widthFix" src="{{item.user_thumb}}"></image>  
19 - <view class="text">  
20 - <view>我的</view>  
21 - <view>抽奖码</view>  
22 - </view>  
23 - <view class="my-code">{{item.prize_code}}</view> 3 + <product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header>
  4 +</view>
  5 +<block wx:if="{{false}}">
  6 + <counter count="{{participantCount}}" num="{{product.limit}}" status="{{product.status}}"></counter>
  7 + <prize-progress step="{{step}}"></prize-progress>
  8 +</block>
  9 +<view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}">
  10 + <view class="open-shadow"></view>
  11 + <view class="code-list" animation="{{animation}}">
  12 + <view class="code-list-item-container">
  13 + <view class="code-list-item">
  14 + <view class="content"></view>
  15 + </view>
  16 + <view class="code-list-item" wx:for="{{codeList}}" wx:if="{{index < 3}}" wx:key="{{index}}">
  17 + <view class="content">
  18 + <image class="thumb" mode="widthFix" src="{{item.user_thumb}}"></image>
  19 + <view class="text">
  20 + <view>我的</view>
  21 + <view>抽奖码</view>
24 </view> 22 </view>
25 - <image class="shadow" src="https://img11.static.yhbimg.com/yhb-img01/2018/12/27/19/0140fa3243af949068d2aabeedb0ea0666.png" mode="widthFix" wx:if="{{index == 2 && codeList.length>3 }}"></image> 23 + <view class="my-code">{{item.prize_code}}</view>
26 </view> 24 </view>
27 - <image src="./images/down.png" bindtap="goList" data-index="3" mode="widthFix" class="down" wx:if="{{codeList.length>3}}"></image> 25 + <image class="shadow"
  26 + src="https://img11.static.yhbimg.com/yhb-img01/2018/12/27/19/0140fa3243af949068d2aabeedb0ea0666.png"
  27 + mode="widthFix" wx:if="{{index == 2 && codeList.length>3 }}"></image>
28 </view> 28 </view>
  29 + <image src="./images/down.png" bindtap="goList" data-index="3" mode="widthFix" class="down"
  30 + wx:if="{{codeList.length>3}}"></image>
29 </view> 31 </view>
30 </view> 32 </view>
31 - <view class="help">  
32 - <help></help>  
33 - </view>  
34 - <desc list="{{product.content}}" bind:tapUrl="_jumpBanner" bannerSrc="{{bannerSrc}}" bannerUrl="{{bannerUrl}}"></desc>  
35 -  
36 - <view class="line"></view>  
37 -  
38 - <more wx:if="{{recommends.length > 0}}">  
39 - <block wx:for="{{recommends}}" wx:key="{{index}}">  
40 - <view class="product-item">  
41 - <product-item product="{{item}}" tab-idx="{{tabIdx - 1}}"></product-item>  
42 - </view>  
43 - </block>  
44 - </more> 33 +</view>
  34 +<view class="help">
  35 + <help></help>
  36 +</view>
  37 +<desc list="{{product.content}}" bind:tapUrl="_jumpBanner" bannerSrc="{{bannerSrc}}" bannerUrl="{{bannerUrl}}"></desc>
45 38
46 - <view class="fellow-bar" wx:if="{{product.status && !shareFlag}}">  
47 - <fellow-bar notice="{{notice}}"></fellow-bar>  
48 - </view>  
49 - <group-recommend groupRecommendList="{{groupList}}" bindgoToGroupMiniApp="goToGroupMiniApp">  
50 - </group-recommend> 39 +<view class="line"></view>
51 40
52 - <view class="action-bar">  
53 - <action-bar wx:if="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}"  
54 - act-prize-id="{{actPrizeId}}" bindgetcode="changeActionStatus" bindshare="share"  
55 - copyText="{{lottery.miniappCopy}}" text="{{lottery.miniappTip}}"  
56 - bindgaincodesuccess="reportSuccess" type="{{lottery.miniappType}}"  
57 - ></action-bar> 41 +<more wx:if="{{recommends.length > 0}}">
  42 + <block wx:for="{{recommends}}" wx:key="{{index}}">
  43 + <view class="product-item">
  44 + <product-item product="{{item}}" tab-idx="{{tabIdx - 1}}"></product-item>
  45 + </view>
  46 + </block>
  47 +</more>
58 48
59 - <block wx:else>  
60 - <view class="action-bar2">  
61 - <view class="action-item action-list" bindtap="goList">  
62 - <image class="action-image" src="./images/list_icon@2x.png"></image>  
63 - </view> 49 +<view class="fellow-bar" wx:if="{{product.status && !shareFlag}}">
  50 + <fellow-bar notice="{{notice}}"></fellow-bar>
  51 +</view>
  52 +<group-recommend groupRecommendList="{{groupList}}" bindgoToGroupMiniApp="goToGroupMiniApp">
  53 +</group-recommend>
64 54
65 - <block wx:if="{{product.status === 2}}">  
66 - <button class="action-item confirm" bindtap="goLogin">0元参加抽奖</button>  
67 - </block> 55 +<view class="action-bar">
  56 + <action-bar wx:if="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}"
  57 + act-prize-id="{{actPrizeId}}" bindgetcode="changeActionStatus" bindshare="share"
  58 + copyText="{{lottery.miniappCopy}}" text="{{lottery.miniappTip}}"
  59 + bindgaincodesuccess="reportSuccess" type="{{lottery.miniappType}}"
  60 + ></action-bar>
68 61
69 - <block wx:else>  
70 - <view class="action-item over">活动已结束</view>  
71 - </block> 62 + <block wx:else>
  63 + <view class="action-bar2">
  64 + <view class="action-item action-list" bindtap="goList">
  65 + <image class="action-image" src="./images/list_icon@2x.png"></image>
72 </view> 66 </view>
73 - </block>  
74 - </view>  
75 - <view class="foot"></view>  
76 67
77 -</block> 68 + <block wx:if="{{product.status === 2}}">
  69 + <button class="action-item confirm" bindtap="goLogin">0元参加抽奖</button>
  70 + </block>
  71 +
  72 + <block wx:else>
  73 + <view class="action-item over">活动已结束</view>
  74 + </block>
  75 + </view>
  76 + </block>
  77 +</view>
  78 +<view class="foot"></view>
78 79
79 <import src="../../vendors/zanui/actionsheet/index.wxml"/> 80 <import src="../../vendors/zanui/actionsheet/index.wxml"/>
80 <template is="zan-actionsheet" data="{{...actionsheet}}"/> 81 <template is="zan-actionsheet" data="{{...actionsheet}}"/>
  1 +Page({
  2 + data: {
  3 +
  4 + },
  5 + onLoad: function () {
  6 +
  7 + },
  8 + back: function () {
  9 + wx.navigateBack({
  10 + delta: 1
  11 + })
  12 + }
  13 +})
  1 +{
  2 + "navigationBarTitleText": "YO!LUCK"
  3 +}
  1 +<view class="offline-box">
  2 + <image class="offline-bg" src="https://cdn.yoho.cn/miniapp/yoluck/404.png" mode="aspectFit"></image>
  3 + <view class="slogan">目前参与人数过多请点击刷新</view>
  4 + <view class="refresh" bindtap="back">刷新点击</view>
  5 +</view>
  1 +.offline-box {
  2 + font-size: 32rpx;
  3 + width: 100%;
  4 + position: fixed;
  5 + top: 50%;
  6 + text-align: center;
  7 + transform: translateY(-50%);
  8 +}
  9 +
  10 +.offline-bg {
  11 + height: 200px;
  12 + width: 200px;
  13 +}
  14 +
  15 +.slogan {
  16 + margin-top: 80rpx;
  17 +}
  18 +
  19 +.refresh {
  20 + margin-left: 50%;
  21 + transform: translate(-50%);
  22 + width: 240rpx;
  23 + margin-top: 40rpx;
  24 + padding: 20rpx;
  25 + border-radius: 4rpx;
  26 + background-color: #444;
  27 + color: #fff;
  28 +}
@@ -34,7 +34,7 @@ Page(Object.assign({ @@ -34,7 +34,7 @@ Page(Object.assign({
34 }, { 34 }, {
35 page: 1, 35 page: 1,
36 products: [] 36 products: []
37 - },{ 37 + }, {
38 page: 1, 38 page: 1,
39 products: [] 39 products: []
40 }], 40 }],
@@ -71,12 +71,12 @@ Page(Object.assign({ @@ -71,12 +71,12 @@ Page(Object.assign({
71 openType: 'share', 71 openType: 'share',
72 image_src: '../../images/share_wechat@2x.png', 72 image_src: '../../images/share_wechat@2x.png',
73 }, 73 },
74 - {  
75 - name: '生成海报分享',  
76 - className: 'action-class',  
77 - loading: false,  
78 - image_src: '../../images/share_wxpeng@2x.png'  
79 - }] 74 + {
  75 + name: '生成海报分享',
  76 + className: 'action-class',
  77 + loading: false,
  78 + image_src: '../../images/share_wxpeng@2x.png'
  79 + }]
80 }, 80 },
81 }, 81 },
82 82
@@ -101,12 +101,9 @@ Page(Object.assign({ @@ -101,12 +101,9 @@ Page(Object.assign({
101 this.setData({ 101 this.setData({
102 tabIndex: Number(options.tabIndex) 102 tabIndex: Number(options.tabIndex)
103 }) 103 })
104 - this._init(options.tabIndex);  
105 - } else {  
106 - this._init();  
107 } 104 }
108 new app.WeToast(); 105 new app.WeToast();
109 - if(options && (Number(options.reload) !== 0)) { 106 + if (options && (Number(options.reload) !== 0)) {
110 this._getResouceCode() 107 this._getResouceCode()
111 } 108 }
112 this._getBottomBanner(); 109 this._getBottomBanner();
@@ -115,6 +112,11 @@ Page(Object.assign({ @@ -115,6 +112,11 @@ Page(Object.assign({
115 112
116 onShow() { 113 onShow() {
117 let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0; 114 let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
  115 + if (this.data.tabIndex) {
  116 + this._init(this.data.tabIndex);
  117 + } else {
  118 + this._init();
  119 + }
118 120
119 this.setData({ 121 this.setData({
120 hasUnionID: app.globalData.WXUnion_ID !== null && app.globalData.WXUnion_ID !== '' && app.globalData.WXUnion_ID !== undefined ? true : false, 122 hasUnionID: app.globalData.WXUnion_ID !== null && app.globalData.WXUnion_ID !== '' && app.globalData.WXUnion_ID !== undefined ? true : false,
@@ -144,10 +146,10 @@ Page(Object.assign({ @@ -144,10 +146,10 @@ Page(Object.assign({
144 let page = this.data.list[tabIndex].page; 146 let page = this.data.list[tabIndex].page;
145 let pageKey = `list[${tabIndex}].page`; 147 let pageKey = `list[${tabIndex}].page`;
146 let productsKey = `list[${tabIndex}].products` 148 let productsKey = `list[${tabIndex}].products`
147 - 149 +
148 this._getPage(page).then((list) => { 150 this._getPage(page).then((list) => {
149 let oldList = this.data.list[tabIndex].products; 151 let oldList = this.data.list[tabIndex].products;
150 - 152 +
151 if (list.length > 0) { 153 if (list.length > 0) {
152 this.setData({ 154 this.setData({
153 [productsKey]: oldList.concat(list), 155 [productsKey]: oldList.concat(list),
@@ -213,7 +215,7 @@ Page(Object.assign({ @@ -213,7 +215,7 @@ Page(Object.assign({
213 215
214 _getUser() { 216 _getUser() {
215 const userInfo = app.getUserInfo(); 217 const userInfo = app.getUserInfo();
216 - 218 +
217 if (app.isLogin() && (!userInfo || !userInfo.nickName)) { 219 if (app.isLogin() && (!userInfo || !userInfo.nickName)) {
218 return this.service.getUserProfile({uid: app.getUid()}).then(json => { 220 return this.service.getUserProfile({uid: app.getUid()}).then(json => {
219 if (json && json.code && json.code === 200) { 221 if (json && json.code && json.code === 200) {
@@ -229,28 +231,28 @@ Page(Object.assign({ @@ -229,28 +231,28 @@ Page(Object.assign({
229 231
230 _getResouceCode() { 232 _getResouceCode() {
231 this.commonService.getResourceCode('194ffd46254d6ad20e6c538bea4d89d7') 233 this.commonService.getResourceCode('194ffd46254d6ad20e6c538bea4d89d7')
232 - .then(data => {  
233 - this.setData({  
234 - dialogSrc: formatImageUrl(data.src, 340 * app.globalData.systemInfo.pixelRatio, 340 * app.globalData.systemInfo.pixelRatio, 2),  
235 - dialogUrl: data.url 234 + .then(data => {
  235 + this.setData({
  236 + dialogSrc: formatImageUrl(data.src, 340 * app.globalData.systemInfo.pixelRatio, 340 * app.globalData.systemInfo.pixelRatio, 2),
  237 + dialogUrl: data.url
  238 + })
  239 + this.dialog.showDialog();
236 }) 240 })
237 - this.dialog.showDialog();  
238 - })  
239 - .catch(error => {  
240 - })  
241 - 241 + .catch(error => {
  242 + })
  243 +
242 }, 244 },
243 _getBottomBanner() { 245 _getBottomBanner() {
244 this.commonService.getResourceCode('5a2203f5656fbc9788bd8af70f2823d3') 246 this.commonService.getResourceCode('5a2203f5656fbc9788bd8af70f2823d3')
245 - .then(data => {  
246 - // console.log(data)  
247 - this.setData({  
248 - bannerSrc: formatImageUrl(data.src, 750, 234, 2),  
249 - bannerUrl: data.url 247 + .then(data => {
  248 + // console.log(data)
  249 + this.setData({
  250 + bannerSrc: formatImageUrl(data.src, 750, 234, 2),
  251 + bannerUrl: data.url
  252 + })
  253 + })
  254 + .catch(error => {
250 }) 255 })
251 - })  
252 - .catch(error => {  
253 - })  
254 }, 256 },
255 257
256 _getProceedingData() { 258 _getProceedingData() {
@@ -273,7 +275,7 @@ Page(Object.assign({ @@ -273,7 +275,7 @@ Page(Object.assign({
273 }, 275 },
274 276
275 _getReleaseData(my_page) { 277 _getReleaseData(my_page) {
276 - if (!this.data.isLogin) { 278 + if (!this.data.isLogin) {
277 return; 279 return;
278 } 280 }
279 let type = 1; 281 let type = 1;
@@ -309,7 +311,7 @@ Page(Object.assign({ @@ -309,7 +311,7 @@ Page(Object.assign({
309 let oldData = my_zero_list[type].data; 311 let oldData = my_zero_list[type].data;
310 let key = `my_zero_list[${type}].data`; 312 let key = `my_zero_list[${type}].data`;
311 let keyPage = `my_zero_list[${type}].page`; 313 let keyPage = `my_zero_list[${type}].page`;
312 - this.service.getMyList({ type, page }).then(res => { 314 + this.service.getMyList({type, page}).then(res => {
313 let data = [] 315 let data = []
314 if (res && res.code === 200) { 316 if (res && res.code === 200) {
315 data = res.data; 317 data = res.data;
@@ -331,7 +333,7 @@ Page(Object.assign({ @@ -331,7 +333,7 @@ Page(Object.assign({
331 return; 333 return;
332 } 334 }
333 jumpByUrl(this.data.bannerUrl); 335 jumpByUrl(this.data.bannerUrl);
334 - 336 +
335 }, 337 },
336 338
337 onTabChange({detail}) { 339 onTabChange({detail}) {
@@ -347,10 +349,10 @@ Page(Object.assign({ @@ -347,10 +349,10 @@ Page(Object.assign({
347 this._init(); 349 this._init();
348 }, 350 },
349 351
350 - getUserInfo: function(e) { 352 + getUserInfo: function (e) {
351 var that = this; 353 var that = this;
352 if (e.detail.errMsg === 'getUserInfo:ok') { 354 if (e.detail.errMsg === 'getUserInfo:ok') {
353 - decodeUnionId(app.getWechatThirdSession(), e, function(response) { 355 + decodeUnionId(app.getWechatThirdSession(), e, function (response) {
354 if (response.isHaveUnionID) { 356 if (response.isHaveUnionID) {
355 that.setData({ 357 that.setData({
356 hasUnionID: true, 358 hasUnionID: true,
@@ -358,27 +360,28 @@ Page(Object.assign({ @@ -358,27 +360,28 @@ Page(Object.assign({
358 } 360 }
359 }); 361 });
360 } else { 362 } else {
361 - openAuthorizeSettings(function(response) { 363 + openAuthorizeSettings(function (response) {
362 if (response.isHaveUnionID) { 364 if (response.isHaveUnionID) {
363 that.setData({ 365 that.setData({
364 hasUnionID: true, 366 hasUnionID: true,
365 }) 367 })
366 - }; 368 + }
  369 + ;
367 }); 370 });
368 } 371 }
369 }, 372 },
370 373
371 - getPhoneNumber: function(e) { 374 + getPhoneNumber: function (e) {
372 var that = this; 375 var that = this;
373 if (e.detail.errMsg === 'getPhoneNumber:ok') { 376 if (e.detail.errMsg === 'getPhoneNumber:ok') {
374 - decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '', function(result) { 377 + decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '', function (result) {
375 // console.log('!!!!result',result) 378 // console.log('!!!!result',result)
376 if (result.code != 200) { 379 if (result.code != 200) {
377 that.wetoast.toast({ 380 that.wetoast.toast({
378 title: result.message, 381 title: result.message,
379 titleClassName: 'wetoast-title', 382 titleClassName: 'wetoast-title',
380 duration: 1000, 383 duration: 1000,
381 - success: function() { 384 + success: function () {
382 that.loginAndRegisterTapped() 385 that.loginAndRegisterTapped()
383 }.bind(that) 386 }.bind(that)
384 }); 387 });
@@ -386,7 +389,7 @@ Page(Object.assign({ @@ -386,7 +389,7 @@ Page(Object.assign({
386 if (result.is_register) { 389 if (result.is_register) {
387 that.showZanToast({ 390 that.showZanToast({
388 title: '欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收', 391 title: '欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收',
389 - success: function() { 392 + success: function () {
390 let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0; 393 let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
391 that.setData({ 394 that.setData({
392 uid, 395 uid,
@@ -427,13 +430,13 @@ Page(Object.assign({ @@ -427,13 +430,13 @@ Page(Object.assign({
427 content: '检测到您未打开微信用户信息授权,开启后即可进行登录', 430 content: '检测到您未打开微信用户信息授权,开启后即可进行登录',
428 confirmText: "去开启", 431 confirmText: "去开启",
429 confirmColor: "#000000", 432 confirmColor: "#000000",
430 - success: function(res) { 433 + success: function (res) {
431 if (res.confirm) { 434 if (res.confirm) {
432 wx.openSetting({ 435 wx.openSetting({
433 success: (res) => { 436 success: (res) => {
434 // console.log(res.authSetting["scope.userInfo"]) 437 // console.log(res.authSetting["scope.userInfo"])
435 if (res.authSetting["scope.userInfo"] !== null && res.authSetting["scope.userInfo"] !== undefined && res.authSetting["scope.userInfo"] === true) { 438 if (res.authSetting["scope.userInfo"] !== null && res.authSetting["scope.userInfo"] !== undefined && res.authSetting["scope.userInfo"] === true) {
436 - getUnionID(app.getWechatThirdSession(), function(response) { 439 + getUnionID(app.getWechatThirdSession(), function (response) {
437 // console.log(response) 440 // console.log(response)
438 }) 441 })
439 } 442 }
@@ -450,7 +453,7 @@ Page(Object.assign({ @@ -450,7 +453,7 @@ Page(Object.assign({
450 wx.navigateTo({ 453 wx.navigateTo({
451 url: '/pages/bindPhoneNumber/bindPhoneNumber' 454 url: '/pages/bindPhoneNumber/bindPhoneNumber'
452 }); 455 });
453 - } 456 + }
454 } 457 }
455 }) 458 })
456 } else { 459 } else {
@@ -465,18 +468,18 @@ Page(Object.assign({ @@ -465,18 +468,18 @@ Page(Object.assign({
465 let union_id = wx.getStorageSync('union_id'); 468 let union_id = wx.getStorageSync('union_id');
466 let res = await getSettingPromise(); 469 let res = await getSettingPromise();
467 470
468 - if (res.authSetting["scope.userInfo"] !== null &&  
469 - res.authSetting["scope.userInfo"] !== undefined &&  
470 - res.authSetting["scope.userInfo"] === true) {  
471 - if (union_id) {  
472 - this.setData({  
473 - openType: 'none-open-type',  
474 - })  
475 - } else {  
476 - this.setData({  
477 - openType: 'getUserInfo'  
478 - })  
479 - } 471 + if (res.authSetting["scope.userInfo"] !== null &&
  472 + res.authSetting["scope.userInfo"] !== undefined &&
  473 + res.authSetting["scope.userInfo"] === true) {
  474 + if (union_id) {
  475 + this.setData({
  476 + openType: 'none-open-type',
  477 + })
  478 + } else {
  479 + this.setData({
  480 + openType: 'getUserInfo'
  481 + })
  482 + }
480 } else { 483 } else {
481 this.setData({ 484 this.setData({
482 openType: 'getUserInfo' 485 openType: 'getUserInfo'
@@ -485,7 +488,7 @@ Page(Object.assign({ @@ -485,7 +488,7 @@ Page(Object.assign({
485 }, 488 },
486 489
487 loginChangeStatus(params) { 490 loginChangeStatus(params) {
488 - let { openType } = params; 491 + let {openType} = params;
489 this.setData({ 492 this.setData({
490 openType 493 openType
491 }) 494 })
@@ -513,20 +516,20 @@ Page(Object.assign({ @@ -513,20 +516,20 @@ Page(Object.assign({
513 }); 516 });
514 }, 517 },
515 518
516 - share({ detail }) { 519 + share({detail}) {
517 this.setData({ 520 this.setData({
518 'actionsheet.show': true, 521 'actionsheet.show': true,
519 'shareProduct': detail 522 'shareProduct': detail
520 }) 523 })
521 }, 524 },
522 525
523 - handleZanActionsheetCancel({ componentId }) { 526 + handleZanActionsheetCancel({componentId}) {
524 this.setData({ 527 this.setData({
525 'actionsheet.show': false 528 'actionsheet.show': false
526 }) 529 })
527 }, 530 },
528 531
529 - handleZanActionsheetClick({ componentId, index }) { 532 + handleZanActionsheetClick({componentId, index}) {
530 this.setData({ 533 this.setData({
531 'actionsheet.show': false 534 'actionsheet.show': false
532 }); 535 });
@@ -545,7 +548,8 @@ Page(Object.assign({ @@ -545,7 +548,8 @@ Page(Object.assign({
545 product_qrCode: qrcode 548 product_qrCode: qrcode
546 }); 549 });
547 } 550 }
548 - }; 551 + }
  552 + ;
549 }, 553 },
550 onShareAppMessage(res) { 554 onShareAppMessage(res) {
551 let params = { 555 let params = {