fix(mobile): recover direct channels after network failure

This commit is contained in:
key
2026-07-29 02:31:19 +08:00
parent 376a7c4b84
commit dc20b92061
6 changed files with 66 additions and 9 deletions
+7
View File
@@ -19,6 +19,13 @@ test('员工端直通车包含固定五通道、业务匿名和本人回复闭
assert.match(page, /匿名提交/);
assert.match(page, /正式回复/);
assert.match(page, /requestId/);
assert.match(page, /v-else-if="channelsFailed"/);
assert.match(page, /重新加载直达对象/);
assert.match(page, /@click="loadChannels"/);
assert.match(page, /const channelsLoading = ref\(false\)/);
assert.match(page, /const channelsFailed = ref\(false\)/);
assert.match(page, /const loadChannels = async \(\) => \{[\s\S]*if \(channelsLoading\.value\) return;[\s\S]*channelsFailed\.value = false;[\s\S]*await listDirectChannels\(\)[\s\S]*catch \{[\s\S]*form\.channelCode = '';[\s\S]*channelsFailed\.value = true;[\s\S]*finally \{[\s\S]*channelsLoading\.value = false;/);
assert.match(page, /const canSubmit = computed\(\(\) =>[\s\S]*!channelsLoading\.value[\s\S]*!channelsFailed\.value/);
assert.match(broadcast, /openDirect/);
assert.ok(pages.includes('pages/user/direct/index'));
});