Commit 2e604188 by 胡悦

fix: 统一业务状态描述并添加输入限制

- 将"完成"和"未完成"状态描述统一改为"成交"和"战败"
- 为登录账号输入框添加maxlength="20"限制
- 注释掉PathUtils中可能导致问题的本地缓存读取逻辑
1 parent c9317ec9
...@@ -119,13 +119,13 @@ export default { ...@@ -119,13 +119,13 @@ export default {
{ {
icon: 'success', icon: 'success',
text: '结果完美,成交了', text: '结果完美,成交了',
status: "完成" status: "成交"
}, },
{ {
icon: 'error', icon: 'error',
text: '仍需努力,战败了', text: '仍需努力,战败了',
status: "未完成" status: "战败"
} }
], ],
errorTip: false, errorTip: false,
......
...@@ -373,7 +373,7 @@ export default { ...@@ -373,7 +373,7 @@ export default {
pageNum, pageNum,
pageSize, pageSize,
// reviewFlag, // reviewFlag,
result: orderFinishFlag === 1 ? '完成' : '未完成', result: orderFinishFlag === 1 ? '成交' : '战败',
// bussinessType: sceneType == 0 ? 1 : 2, // bussinessType: sceneType == 0 ? 1 : 2,
}) || {} }) || {}
...@@ -381,7 +381,7 @@ export default { ...@@ -381,7 +381,7 @@ export default {
const sortedRecords = this.sortByTime(records) const sortedRecords = this.sortByTime(records)
sortedRecords.forEach(e => { sortedRecords.forEach(e => {
e.duration = e.durationStr || this.formatSeconds(new Date(e.endTime).getTime() - new Date(e.startTime).getTime()) e.duration = e.durationStr || this.formatSeconds(new Date(e.endTime).getTime() - new Date(e.startTime).getTime())
e.orderFinishFlag = e.result === '完成' ? 1 : 0 e.orderFinishFlag = e.result === '成交' ? 1 : 0
}) })
// 4. 更新缓存 (仅第一页) // 4. 更新缓存 (仅第一页)
......
<template> <template>
<view class="choose-box"> <view class="choose-box">
<template v-for="(i, index) in list"> <template v-for="(i, index) in list">
<view :class="['choose-item', `${i.status == value ? (i.status == '完成' || i.status == 1 ? 'success' : 'error') : ''}`]" :key="index" @click="chooseResult(i.status)"> <view :class="['choose-item', `${i.status == value ? (i.status == '成交' || i.status == 1 ? 'success' : 'error') : ''}`]" :key="index" @click="chooseResult(i.status)">
<view :class="['sprite-icon', `icon-face-${i.status == value ? `${i.icon}-active` : i.icon}`]"></view> <view :class="['sprite-icon', `icon-face-${i.status == value ? `${i.icon}-active` : i.icon}`]"></view>
{{ i.text }} {{ i.text }}
</view> </view>
......
...@@ -18,12 +18,12 @@ export default { ...@@ -18,12 +18,12 @@ export default {
{ {
icon: 'success', icon: 'success',
text: '结果完美,成交了', text: '结果完美,成交了',
status: "完成" status: "成交"
}, },
{ {
icon: 'error', icon: 'error',
text: '仍需努力,战败了', text: '仍需努力,战败了',
status: "未完成" status: "战败"
} }
] ]
}, },
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
type="text" type="text"
:value="username" :value="username"
placeholder="请输入账号" placeholder="请输入账号"
maxlength="20"
@blur="inputUsername" @blur="inputUsername"
:key="dateKey.username" :key="dateKey.username"
auto-blur auto-blur
......
...@@ -54,13 +54,13 @@ class PathUtils { ...@@ -54,13 +54,13 @@ class PathUtils {
} }
// 2. 尝试读取持久化缓存 // 2. 尝试读取持久化缓存
const storageCache = uni.getStorageSync(this.ROOT_PATH_CACHE_KEY); // const storageCache = uni.getStorageSync(this.ROOT_PATH_CACHE_KEY);
if (storageCache) { // if (storageCache) {
uni.$logger?.local?.info(`[PathUtils] 命中本地缓存,根路径: ${storageCache}`); // uni.$logger?.local?.info(`[PathUtils] 命中本地缓存,根路径: ${storageCache}`);
// 同步到内存缓存 // // 同步到内存缓存
this.CACHED_ROOT_PATH = storageCache; // this.CACHED_ROOT_PATH = storageCache;
return Promise.resolve(this.CACHED_ROOT_PATH); // return Promise.resolve(this.CACHED_ROOT_PATH);
} // }
// 3. 无缓存,请求原生文件系统API // 3. 无缓存,请求原生文件系统API
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!