默认提交
Showing
1 changed file
with
10 additions
and
6 deletions
| ... | @@ -94,9 +94,15 @@ Page({ | ... | @@ -94,9 +94,15 @@ Page({ |
| 94 | } | 94 | } |
| 95 | }, | 95 | }, |
| 96 | showAuth() { | 96 | showAuth() { |
| 97 | this.setData({ | 97 | let _this = this; |
| 98 | authorizeVisible: true | 98 | wx.login({ |
| 99 | }) | 99 | success: function (res) { |
| 100 | app.store.setItem('wxcode', res.code); | ||
| 101 | _this.setData({ | ||
| 102 | authorizeVisible: true | ||
| 103 | }) | ||
| 104 | } | ||
| 105 | }); | ||
| 100 | }, | 106 | }, |
| 101 | checkAuth() { | 107 | checkAuth() { |
| 102 | return new Promise((resolve, reject) => { | 108 | return new Promise((resolve, reject) => { |
| ... | @@ -124,9 +130,7 @@ Page({ | ... | @@ -124,9 +130,7 @@ Page({ |
| 124 | if (result) { | 130 | if (result) { |
| 125 | resolve(true); | 131 | resolve(true); |
| 126 | } else { | 132 | } else { |
| 127 | this.setData({ | 133 | this.showAuth(); |
| 128 | authorizeVisible: true | ||
| 129 | }); | ||
| 130 | } | 134 | } |
| 131 | }); | 135 | }); |
| 132 | }); | 136 | }); | ... | ... |
-
Please register or sign in to post a comment