Browse Source

fix: 移除隐私弹窗直接调用并优化登录逻辑

移除直接调用隐私弹窗的代码,改为调用handleAgreePrivacy方法
优化登录接口参数,添加shareId参数
master
前端-胡立永 3 weeks ago
parent
commit
6587464abf
1 changed files with 12 additions and 4 deletions
  1. +12
    -4
      pages/index/index.vue

+ 12
- 4
pages/index/index.vue View File

@ -105,7 +105,7 @@
return;
}
this.$refs.privacyPopup.open()
// this.$refs.privacyPopup.open()
// uni.showLoading({
// title: '...'
// });
@ -118,6 +118,8 @@
// url: '/pages/index/index'
// });
// }, 1500);
this.handleAgreePrivacy()
},
handleCancel() {
//
@ -173,14 +175,20 @@
// ...
let self = this
let data = {
code: res.code
}
if (uni.getStorageSync('shareId')) {
data.shareId = uni.getStorageSync('shareId')
}
wx.login({
success(res) {
// console.log(res.code,'code')
if (res.code) {
self.$api('wxLogin', {
code: res.code
}, res => {
self.$api('wxLogin', data, res => {
console.log(res, 'login')
if (res.code == 200) {
uni.hideLoading();


Loading…
Cancel
Save