bug修复

This commit is contained in:
13405411873 2025-06-06 16:20:11 +08:00
parent 1f5274a76b
commit d94bc88efc
4 changed files with 78 additions and 74 deletions

View File

@ -1,75 +1,76 @@
import request from '@/utils/request' import request from '@/utils/request'
// 微信登录授权 // 微信登录授权
export function wxLogin(code, encryptedIv, encryptedData) { export function wxLogin(code, encryptedIv, encryptedData, inviteId) {
const data = { const data = {
code, code,
encryptedIv, encryptedIv,
encryptedData encryptedData,
} inviteId
return request({ }
'url': '/wxLogin', return request({
headers: { 'url': '/wxLogin',
isToken: false headers: {
}, isToken: false
'method': 'post', },
'data': data 'method': 'post',
}) 'data': data
})
} }
// 登录方法 // 登录方法
export function login(username, password, code, uuid) { export function login(username, password, code, uuid) {
const data = { const data = {
username, username,
password, password,
code, code,
uuid uuid
} }
return request({ return request({
'url': '/login', 'url': '/login',
headers: { headers: {
isToken: false isToken: false
}, },
'method': 'post', 'method': 'post',
'data': data 'data': data
}) })
} }
// 注册方法 // 注册方法
export function register(data) { export function register(data) {
return request({ return request({
url: '/register', url: '/register',
headers: { headers: {
isToken: false isToken: false
}, },
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 获取用户详细信息 // 获取用户详细信息
export function getInfo() { export function getInfo() {
return request({ return request({
'url': '/getInfo', 'url': '/getInfo',
'method': 'get' 'method': 'get'
}) })
} }
// 退出方法 // 退出方法
export function logout() { export function logout() {
return request({ return request({
'url': '/logout', 'url': '/logout',
'method': 'post' 'method': 'post'
}) })
} }
// 获取验证码 // 获取验证码
export function getCodeImg() { export function getCodeImg() {
return request({ return request({
'url': '/captchaImage', 'url': '/captchaImage',
headers: { headers: {
isToken: false isToken: false
}, },
method: 'get', method: 'get',
timeout: 20000 timeout: 20000
}) })
} }

View File

@ -159,6 +159,9 @@
}, },
// //
sendWxLoginFormToLocalService() { sendWxLoginFormToLocalService() {
if (uni.getStorageSync("inviteId")) {
this.wxLoginForm.inviteId = uni.getStorageSync("inviteId")
}
this.$store.dispatch('WxLogin', this.wxLoginForm).then(() => { this.$store.dispatch('WxLogin', this.wxLoginForm).then(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
this.loginSuccess() this.loginSuccess()

View File

@ -253,6 +253,9 @@
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
import shareImages from '@/components/hj-placard/shareImages.vue' import shareImages from '@/components/hj-placard/shareImages.vue'
import constant from '@/utils/constant'; import constant from '@/utils/constant';
import {
getInfo
} from '@/api/login.js'
import { import {
changeUserType, changeUserType,
getUserType, getUserType,
@ -352,7 +355,8 @@
shareImage: '/static/bg.jpg', // shareImage: '/static/bg.jpg', //
qrSize: 100, // qrSize: 100, //
qrUrl: 'https://ext.dcloud.net.cn/plugin?id=5747', // qrUrl: 'https://ext.dcloud.net.cn/plugin?id=5747', //
type: 'common' type: 'common',
isXs: '0'
} }
}, },
onReady() { onReady() {
@ -369,7 +373,6 @@
if (params.type) { if (params.type) {
this.type = params.type this.type = params.type
} }
console.log(params, 336);
this.noticeId = params.id this.noticeId = params.id
if (params.noticeId && !this.noticeId) { if (params.noticeId && !this.noticeId) {
this.noticeId = params.noticeId this.noticeId = params.noticeId
@ -379,17 +382,27 @@
this.navigatePath = "/pages/index" this.navigatePath = "/pages/index"
} }
if (params.inviteId) {
uni.setStorageSync("inviteId", params.inviteId)
}
}, },
onShow() { onShow() {
this.$refs.popupNew.open('center')
console.log(366);
if (null != getJSONData(constant.userInfo)) { if (null != getJSONData(constant.userInfo)) {
this.userInfo = getJSONData(constant.userInfo) this.userInfo = getJSONData(constant.userInfo)
} }
this.getRole()
this.getDetail() this.getDetail()
this.viewNotice() this.viewNotice()
}, },
methods: { methods: {
getRole() {
getInfo().then(res => {
if (res.roles.indexOf('xsry') > -1) {
this.isXs = '1'
}
})
},
copyUrl(url) { copyUrl(url) {
uni.setClipboardData({ uni.setClipboardData({
data: url, data: url,
@ -1117,4 +1130,4 @@
padding: 20rpx 0; padding: 20rpx 0;
} }
} }
</style> </style>

View File

@ -24,6 +24,7 @@
initVueI18n initVueI18n
} from '@dcloudio/uni-i18n' } from '@dcloudio/uni-i18n'
import messages from '../uni-popup/i18n/index.js' import messages from '../uni-popup/i18n/index.js'
const { const {
t t
} = initVueI18n(messages) } = initVueI18n(messages)
@ -57,22 +58,7 @@
text: '举报', text: '举报',
icon: '/static/detail/jubao.png', icon: '/static/detail/jubao.png',
name: 'jb' 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') { // if (res.from === 'button') { //
console.log(res.target) console.log(res.target)
} }
console.log(82);
return { return {
title: '【' + this.noticeDetail.platformName + '】' + this.noticeDetail.title, title: '【' + this.noticeDetail.platformName + '】' + this.noticeDetail.title,
path: '/pages/notice/detail?id=' + this.noticeDetail.id path: '/pages/notice/detail?id=' + this.noticeDetail.id