|
@@ -99,10 +99,8 @@ const pages = ref({
|
|
|
total: null,
|
|
|
})
|
|
|
async function getList(type) {
|
|
|
- console.log("TCL: getList -> type", type)
|
|
|
try {
|
|
|
|
|
|
- console.log(data.value.length, pages.value.total);
|
|
|
if (type === 'top') {
|
|
|
data.value = [];
|
|
|
pages.value.total = 0;
|
|
@@ -116,9 +114,9 @@ async function getList(type) {
|
|
|
return;
|
|
|
}
|
|
|
} else {
|
|
|
- uni.showLoading({
|
|
|
- title: '数据加载中...',
|
|
|
- })
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: '数据加载中...',
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
|
|
@@ -152,7 +150,7 @@ async function getList(type) {
|
|
|
}
|
|
|
}, 500)
|
|
|
|
|
|
- type !== 'bottom' && uni.hideLoading()
|
|
|
+ // type !== 'bottom' && uni.hideLoading()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -162,6 +160,7 @@ async function getList(type) {
|
|
|
* 3:开始或结束服务
|
|
|
*/
|
|
|
function btnClick(row, type) {
|
|
|
+ uni.setStorageSync('tabKey', tabKey.value);//存储当前tab的下标
|
|
|
if (type === 1) {
|
|
|
uni.navigateTo({
|
|
|
url: `/pages_classify/pages/order/index?secondOrderId=${row.secondOrderId}`,
|
|
@@ -197,7 +196,11 @@ onShow(() => {
|
|
|
const initIndex = userType === 1 ? 2 : 1;//默认选中待服务
|
|
|
|
|
|
const params = getApp().globalData.switchTabParams || {}
|
|
|
- tabKey.value = params.tabKey || initIndex;
|
|
|
+
|
|
|
+ const storage_tabKey = uni.getStorageSync('tabKey'); //读取本地存储
|
|
|
+
|
|
|
+ tabKey.value = params.tabKey || storage_tabKey || initIndex;//优先显示外部传入的tabKey,其次存储在本地的tabKey,最后默认选中待服务
|
|
|
+
|
|
|
onChange(column.value[tabKey.value])
|
|
|
// 使用后建议清除参数,避免重复读取
|
|
|
getApp().globalData.switchTabParams = null
|
|
@@ -224,7 +227,7 @@ onShow(() => {
|
|
|
left: 0px;
|
|
|
right: 0px;
|
|
|
background: rgba(245, 245, 245, 1);
|
|
|
- padding-bottom: 150rpx;
|
|
|
+ padding-bottom: 190rpx;
|
|
|
}
|
|
|
}
|
|
|
</style>
|