工单信息修正、小程序登录修正
This commit is contained in:
@@ -164,9 +164,9 @@
|
||||
// 开发环境:使用mock数据
|
||||
if (isMockMode.value) {
|
||||
userInfo.value = {
|
||||
wechatId: '17857100377',
|
||||
wechatId: '17857100378',
|
||||
username: '访客用户',
|
||||
phone: '17857100377',
|
||||
phone: '17857100378',
|
||||
userId: ''
|
||||
}
|
||||
await doIdentify()
|
||||
@@ -176,12 +176,12 @@
|
||||
// 切换mock用户(开发调试用)
|
||||
function switchMockUser() {
|
||||
uni.showActionSheet({
|
||||
itemList: ['员工 (17857100375)', '访客 (17857100377)'],
|
||||
itemList: ['员工 (17857100375)', '访客 (17857100378)'],
|
||||
success: (res) => {
|
||||
if (res.tapIndex === 0) {
|
||||
userInfo.value = { wechatId: '17857100375', username: '员工用户', phone: '17857100375', userId: '' }
|
||||
} else {
|
||||
userInfo.value = { wechatId: '17857100377', username: '访客用户', phone: '17857100377', userId: '' }
|
||||
userInfo.value = { wechatId: '17857100378', username: '访客用户', phone: '17857100378', userId: '' }
|
||||
}
|
||||
doIdentify()
|
||||
}
|
||||
@@ -190,6 +190,12 @@
|
||||
|
||||
// 调用identify接口
|
||||
async function doIdentify() {
|
||||
// 先清空本地存储的登录信息,确保重新识别身份
|
||||
uni.removeStorageSync('token')
|
||||
uni.removeStorageSync('userInfo')
|
||||
uni.removeStorageSync('loginDomain')
|
||||
uni.removeStorageSync('wechatId')
|
||||
|
||||
uni.showLoading({ title: '登录中...' })
|
||||
try {
|
||||
const res = await guestAPI.identify({
|
||||
|
||||
Reference in New Issue
Block a user