| | |
| | | code: code || this.code
|
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | console.log('res', res);
|
| | | // console.log('res', res);
|
| | | that.$store.commit('setOpenId', res.data.openid)
|
| | | if (res.data.token && res.data.token != '') {
|
| | | that.$store.commit('setToken', res.data.token)
|
| | |
| | | })
|
| | | 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.redirectTo({ |
| | | url: "/pages/polling/point?id=" + res.data.id |
| | | })
|
| | | } else {
|
| | | uni.redirectTo({
|
| | | url: "/pages/polling/empty?message=" + res.message
|
| | | }) |
| | | } |
| | | })
|
| | |
| | | this.setUserInfo(ress.data) |
| | | const ywinfo = this.ywinfo |
| | | if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) { |
| | | getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => { |
| | | getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => { |
| | | // getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
|
| | | getRecordByUserPoint({
|
| | | pointCode: ywinfo.ywid
|
| | | }).then(res => {
|
| | | if(res.data && res.data.id){ |
| | | uni.redirectTo({ |
| | | url: "/pages/polling/point?id=" + res.data.id |
| | | }) |
| | | } else {
|
| | | uni.redirectTo({
|
| | | url: "/pages/polling/empty?message=" + res.message
|
| | | })
|
| | | } |
| | | }) |
| | | }) |
| | | // })
|
| | | } else { |
| | | uni.redirectTo({ |
| | | url: "/pages/index" |