ll
liukangdong
2025-01-24 e597d2905326e907f4ff5ad3665b882239b6fb11
h5/pages/login.vue
@@ -45,14 +45,20 @@
            form: {
               phone: '',
               code: ''
            },
            },
            ywinfo: {},
            downTime: 0,
            code: ''
         }
      },
      onLoad(option) {
         console.log('onLoad');
         // https://zhcg.fnwtzx.com/#/pages/login?type=0&ywid=ywid
         // https://zhcg.fnwtzx.com/#/pages/login?type=0&ywid=ywid
         const ywinfo = uni.getStorageSync('ywinfo') || {}
         if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
            this.ywinfo = ywinfo
            uni.setStorageSync('ywinfo', {})
         }
         if (option.ywid || option.ywid == 0) {
            uni.setStorageSync('ywinfo', {
               type: option.type,
@@ -84,11 +90,10 @@
                     getUserInfo().then(ress => {
                        that.$store.commit('setUserInfo', ress.data)
                     })
                     const ywinfo = uni.getStorageSync('ywinfo') || {}
                     const ywinfo = this.ywinfo
                     if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
                        getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
                           if(res.data && res.data.id){
                              uni.setStorageSync('ywinfo', {})
                              uni.redirectTo({
                                 url: "/pages/polling/point?id=" + res.data.id
                              })
@@ -141,12 +146,11 @@
                  this.showToast('登录成功')
                  getUserInfo().then(ress => {
                     this.setUserInfo(ress.data)
                     const ywinfo = uni.getStorageSync('ywinfo') || {}
                     const ywinfo = this.ywinfo
                     if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
                     getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
                        getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
                           if(res.data && res.data.id){
                              uni.setStorageSync('ywinfo', {})
                              uni.redirectTo({
                                 url: "/pages/polling/point?id=" + res.data.id
                              })