聊天室url修正
This commit is contained in:
@@ -39,44 +39,6 @@
|
||||
// 检查并选择模式
|
||||
checkModeSelection() {
|
||||
const mode = uni.getStorageSync('userMode')
|
||||
if (!mode) {
|
||||
this.showModeSelector()
|
||||
}
|
||||
},
|
||||
// 显示模式选择器
|
||||
showModeSelector() {
|
||||
uni.showActionSheet({
|
||||
itemList: ['员工模式 (17857100375)', '访客模式 (17857100377)'],
|
||||
success: (res) => {
|
||||
let wechatId = ''
|
||||
let userMode = ''
|
||||
let phone = ''
|
||||
if (res.tapIndex === 0) {
|
||||
wechatId = '17857100375'
|
||||
phone = '17857100375'
|
||||
userMode = 'staff'
|
||||
} else {
|
||||
wechatId = '17857100377'
|
||||
phone = '17857100377'
|
||||
userMode = 'guest'
|
||||
}
|
||||
// 存储选择
|
||||
uni.setStorageSync('userMode', userMode)
|
||||
uni.setStorageSync('wechatId', wechatId)
|
||||
uni.setStorageSync('phone', phone)
|
||||
console.log('已选择模式:', userMode, 'wechatId:', wechatId)
|
||||
uni.showToast({
|
||||
title: userMode === 'staff' ? '员工模式' : '访客模式',
|
||||
icon: 'success'
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
// 用户取消,默认使用访客模式
|
||||
uni.setStorageSync('userMode', 'guest')
|
||||
uni.setStorageSync('wechatId', '17857100377')
|
||||
console.log('默认使用访客模式')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user