MrShi
2025-01-24 803033cc4e734ac9eb3062f215b654b4ae9d02c4
h5/pages/login.vue
@@ -46,6 +46,7 @@
               phone: '',
               code: ''
            },
            ywinfo: {},
            downTime: 0,
            code: ''
         }
@@ -53,6 +54,11 @@
      onLoad(option) {
         console.log('onLoad');
         // 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
                              })