|
|
@@ -94,7 +94,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="uts">
|
|
|
- import { ref, onShow, onMounted } from 'vue'
|
|
|
+ import { ref, onMounted } from 'vue'
|
|
|
+ import { onLoad, onShow } from '@dcloudio/uni-app';
|
|
|
import { getProductSalseList, signReceiveAll } from '../../api/out/index'
|
|
|
import { getUserInfo } from '../../utils/storage'
|
|
|
|
|
|
@@ -305,18 +306,24 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- // 初始化
|
|
|
- onMounted(() => {
|
|
|
+ // 初始化用户信息
|
|
|
+ const initUserInfo = () => {
|
|
|
const userInfo = getUserInfo()
|
|
|
if (userInfo != null) {
|
|
|
- const userId = userInfo['userId']
|
|
|
+ const userId = userInfo['userId'] || userInfo['user_id'] || userInfo['userid'] || userInfo['userName']
|
|
|
currentUserId = userId != null ? userId.toString() : ''
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ // 初始化
|
|
|
+ onMounted(() => {
|
|
|
+ initUserInfo()
|
|
|
loadData(true)
|
|
|
})
|
|
|
|
|
|
// 页面显示时刷新列表
|
|
|
onShow(() => {
|
|
|
+ initUserInfo()
|
|
|
loadData(true)
|
|
|
})
|
|
|
</script>
|