liyuliangjiazai hace 3 meses
padre
commit
a8872baf0c

+ 0 - 14
code/ajyApp/pages/device/deviceInfo/deviceInfo.nvue

@@ -336,7 +336,6 @@ export default {
 		return {
 			statusBarHeight: 44,
 			deviceId: '',
-			deviceCode: '',
 			deviceName: '',
 			rssi: '',
 			isShowDrawer2: false,
@@ -368,16 +367,8 @@ export default {
 		this.statusBarHeight = sysInfo.statusBarHeight || 44
 
 		this.deviceId = options.deviceId || ''
-		this.deviceCode = options.deviceCode || ''
 		this.deviceName = options.name || ''
 		this.rssi = options.rssi || ''
-		const currentDevice = uni.getStorageSync('current_device') || {}
-		if (currentDevice.deviceCode && !this.deviceCode) {
-			this.deviceCode = currentDevice.deviceCode
-		}
-		if (currentDevice.name && !this.deviceName) {
-			this.deviceName = currentDevice.name
-		}
 
 		// TODO: 后续接口确定后实现 - 下载穴位列表
 		// TODO: 后续接口确定后实现 - 下载专业模式推荐方案
@@ -405,14 +396,9 @@ export default {
 		},
 		/** 加载当前用户信息 */
 		loadCurrentUser() {
-			const currentDevice = uni.getStorageSync('current_device') || {}
 			const user = uni.getStorageSync('current_manage_user')
 			if (user && user.name) {
 				this.currentUserName = user.name
-			} else if (currentDevice.profile && currentDevice.profile.name) {
-				uni.setStorageSync('current_manage_user', currentDevice.profile)
-				uni.setStorageSync('current_manage_user_id', currentDevice.profile.profileId || currentDevice.profile.id)
-				this.currentUserName = currentDevice.profile.name
 			} else {
 				this.currentUserName = ''
 			}

+ 2 - 18
code/ajyApp/pages/my/info/info.nvue

@@ -116,7 +116,7 @@
 
 <script>
 import ayToast from '@/components/ay-toast/ay-toast.nvue'
-import { getProfile, uploadAvatar as uploadAvatarApi, updateProfile } from '@/utils/api/user.js'
+import { uploadAvatar as uploadAvatarApi, updateProfile } from '@/utils/api/user.js'
 
 export default {
 	components: {
@@ -146,23 +146,7 @@ export default {
 		this.loadUserInfo()
 	},
 	methods: {
-		async loadUserInfo() {
-			try {
-				const profile = await getProfile()
-				this.phone = profile.accountPhone || profile.phone || ''
-				this.nickname = profile.nickname || '用户'
-				this.appid = profile.appId || ''
-				this.avatar = profile.avatar || '/static/144x144.png'
-				uni.setStorageSync('phone', this.phone)
-				uni.setStorageSync('nickname', this.nickname)
-				uni.setStorageSync('appId', this.appid)
-				uni.setStorageSync('avatar', this.avatar)
-				uni.setStorageSync('current_manage_user', profile)
-				uni.setStorageSync('current_manage_user_id', profile.profileId || profile.id)
-				return
-			} catch (e) {
-				console.error('加载个人资料失败,使用本地缓存', e)
-			}
+		loadUserInfo() {
 			const phone = uni.getStorageSync('phone') || '138****8888'
 			const nickname = uni.getStorageSync('nickname') || '用户'
 			const appid = uni.getStorageSync('appId') || ''