bug修复
This commit is contained in:
parent
1f5274a76b
commit
d94bc88efc
105
api/login.js
105
api/login.js
@ -1,75 +1,76 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 微信登录授权
|
||||
export function wxLogin(code, encryptedIv, encryptedData) {
|
||||
const data = {
|
||||
code,
|
||||
encryptedIv,
|
||||
encryptedData
|
||||
}
|
||||
return request({
|
||||
'url': '/wxLogin',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
export function wxLogin(code, encryptedIv, encryptedData, inviteId) {
|
||||
const data = {
|
||||
code,
|
||||
encryptedIv,
|
||||
encryptedData,
|
||||
inviteId
|
||||
}
|
||||
return request({
|
||||
'url': '/wxLogin',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
}
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
'url': '/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
'url': '/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
url: '/register',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/register',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
'url': '/getInfo',
|
||||
'method': 'get'
|
||||
})
|
||||
return request({
|
||||
'url': '/getInfo',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
'url': '/logout',
|
||||
'method': 'post'
|
||||
})
|
||||
return request({
|
||||
'url': '/logout',
|
||||
'method': 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
'url': '/captchaImage',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
return request({
|
||||
'url': '/captchaImage',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
}
|
@ -159,6 +159,9 @@
|
||||
},
|
||||
//向后端发起登录请求
|
||||
sendWxLoginFormToLocalService() {
|
||||
if (uni.getStorageSync("inviteId")) {
|
||||
this.wxLoginForm.inviteId = uni.getStorageSync("inviteId")
|
||||
}
|
||||
this.$store.dispatch('WxLogin', this.wxLoginForm).then(() => {
|
||||
this.$modal.closeLoading()
|
||||
this.loginSuccess()
|
||||
|
@ -253,6 +253,9 @@
|
||||
import html2canvas from 'html2canvas';
|
||||
import shareImages from '@/components/hj-placard/shareImages.vue'
|
||||
import constant from '@/utils/constant';
|
||||
import {
|
||||
getInfo
|
||||
} from '@/api/login.js'
|
||||
import {
|
||||
changeUserType,
|
||||
getUserType,
|
||||
@ -352,7 +355,8 @@
|
||||
shareImage: '/static/bg.jpg', // 背景图片
|
||||
qrSize: 100, // 二维码大小
|
||||
qrUrl: 'https://ext.dcloud.net.cn/plugin?id=5747', // 生成二维码的链接
|
||||
type: 'common'
|
||||
type: 'common',
|
||||
isXs: '0'
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
@ -369,7 +373,6 @@
|
||||
if (params.type) {
|
||||
this.type = params.type
|
||||
}
|
||||
console.log(params, 336);
|
||||
this.noticeId = params.id
|
||||
if (params.noticeId && !this.noticeId) {
|
||||
this.noticeId = params.noticeId
|
||||
@ -379,17 +382,27 @@
|
||||
this.navigatePath = "/pages/index"
|
||||
}
|
||||
|
||||
if (params.inviteId) {
|
||||
uni.setStorageSync("inviteId", params.inviteId)
|
||||
}
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.$refs.popupNew.open('center')
|
||||
console.log(366);
|
||||
if (null != getJSONData(constant.userInfo)) {
|
||||
this.userInfo = getJSONData(constant.userInfo)
|
||||
}
|
||||
this.getRole()
|
||||
this.getDetail()
|
||||
this.viewNotice()
|
||||
},
|
||||
methods: {
|
||||
getRole() {
|
||||
getInfo().then(res => {
|
||||
if (res.roles.indexOf('xsry') > -1) {
|
||||
this.isXs = '1'
|
||||
}
|
||||
})
|
||||
},
|
||||
copyUrl(url) {
|
||||
uni.setClipboardData({
|
||||
data: url,
|
||||
|
@ -24,6 +24,7 @@
|
||||
initVueI18n
|
||||
} from '@dcloudio/uni-i18n'
|
||||
import messages from '../uni-popup/i18n/index.js'
|
||||
|
||||
const {
|
||||
t
|
||||
} = initVueI18n(messages)
|
||||
@ -57,22 +58,7 @@
|
||||
text: '举报',
|
||||
icon: '/static/detail/jubao.png',
|
||||
name: 'jb'
|
||||
},
|
||||
// {
|
||||
// text: '新浪',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
|
||||
// name: 'sina'
|
||||
// },
|
||||
// {
|
||||
// text: '百度',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
|
||||
// name: 'copy'
|
||||
// },
|
||||
// {
|
||||
// text: '其他',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
|
||||
// name: 'more'
|
||||
// }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -93,6 +79,7 @@
|
||||
if (res.from === 'button') { // 来自页面内分享按钮
|
||||
console.log(res.target)
|
||||
}
|
||||
console.log(82);
|
||||
return {
|
||||
title: '【' + this.noticeDetail.platformName + '】' + this.noticeDetail.title,
|
||||
path: '/pages/notice/detail?id=' + this.noticeDetail.id
|
||||
|
Loading…
Reference in New Issue
Block a user