| | |
| | | <u-button @click="submit">登录</u-button> |
| | | </view> |
| | | </view> |
| | | <ws-wx-privacy id="privacy-popup" enableAutoProtocol></ws-wx-privacy> |
| | | </view> |
| | | </template> |
| | | <script> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | titlePrivacy: '用户隐私保护提示', |
| | | labelStyle: { |
| | | color: '#fff' |
| | | }, |
| | |
| | | uni.hideHomeButton() |
| | | }, |
| | | methods: { |
| | | doRequire() { |
| | | uni.requirePrivacyAuthorize({ |
| | | success: () => { |
| | | console.log('同意') |
| | | // 用户同意授权 |
| | | // 继续小程序逻辑 |
| | | this.getlogin() |
| | | }, |
| | | fail: () => { |
| | | console.log('拒绝') |
| | | }, // 用户拒绝授权 |
| | | complete: () => {} |
| | | }) |
| | | }, |
| | | submit() { |
| | | this.$refs.uForm.validate().then(res => { |
| | | this.getlogin() |
| | | this.doRequire() |
| | | }).catch(errors => {}) |
| | | }, |
| | | //登录 |