diff --git a/components/call-log/list/list.vue b/components/call-log/list/list.vue index a0992c4..18b9541 100644 --- a/components/call-log/list/list.vue +++ b/components/call-log/list/list.vue @@ -3,9 +3,10 @@ - + - + {{ getAvatarText(item.name) }} @@ -30,7 +31,7 @@ - + @@ -133,7 +134,7 @@ 运营商 - @@ -148,14 +149,14 @@ 卡几 - 状态 - + 电话备注 @@ -163,8 +164,8 @@ 头像类型 - + 头像 @@ -216,7 +217,7 @@ 运营商 * - @@ -227,12 +228,12 @@ 状态 * - + 卡几 - @@ -249,8 +250,8 @@ 头像类型 - + 头像 @@ -304,8 +305,12 @@ import { onUnload } from "@dcloudio/uni-app"; - import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue'; - + import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue'; import { + useStore + } from '@/store/index.js' + const { + setCallDetail + } = useStore() const props = defineProps({ isHuise: { type: Boolean, @@ -690,7 +695,13 @@ text: '文字头像' } ]); - + + const goDetail = (value,index) => { + setCallDetail(value) + uni.navigateTo({ + url:'/pages/call-log/detail/callDetail?type='+props.type+'&index='+index + }) + }; // 获取卡几文本 const getKjText = (value) => { return value || '请选择'; @@ -795,7 +806,7 @@ editForm.kj = item.kj || '1'; editForm.address = item.address || ''; editForm.time = item.time || ''; - editForm.status = item.status ||0; + editForm.status = item.status || 0; editForm.notes = item.notes || ''; showEditModal.value = true; }; @@ -1093,7 +1104,7 @@ // 移除字符串中可能存在的空格 const cleanStr = str.replace(/\s+/g, ''); - if (cleanStr.length <= 3) { + if (cleanStr.length !=11) { return cleanStr; } @@ -1121,61 +1132,61 @@ } function choose() { - uni.chooseImage({ - count: 1, - sourceType: [ 'album' , 'camera'], - maxDuration: 30, - camera: 'back', - success(res) { - let tempFilePath = res.tempFiles[0].path - // 保存图片到本地 - uni.saveFile({ - tempFilePath: tempFilePath, - success: function(ress) { - // 使用本地保存的路径 - const localPath = ress.savedFilePath; - if (showEditModal.value) { - editForm.avatar = localPath; - } else if (showAddModal.value) { - addForm.avatar = localPath; + uni.chooseImage({ + count: 1, + sourceType: ['album', 'camera'], + maxDuration: 30, + camera: 'back', + success(res) { + let tempFilePath = res.tempFiles[0].path + // 保存图片到本地 + uni.saveFile({ + tempFilePath: tempFilePath, + success: function(ress) { + // 使用本地保存的路径 + const localPath = ress.savedFilePath; + if (showEditModal.value) { + editForm.avatar = localPath; + } else if (showAddModal.value) { + addForm.avatar = localPath; + } + // 显示成功提示 + uni.showToast({ + title: '图片保存成功', + icon: 'success' + }); + }, + fail: function(err) { + console.log('保存文件失败:', err); + // 如果保存失败,使用临时路径 + if (showEditModal.value) { + editForm.avatar = tempFilePath; + } else if (showAddModal.value) { + addForm.avatar = tempFilePath; + } + uni.showToast({ + title: '图片保存失败,使用临时路径', + icon: 'none' + }); } - // 显示成功提示 - uni.showToast({ - title: '图片保存成功', - icon: 'success' - }); - }, - fail: function(err) { - console.log('保存文件失败:', err); - // 如果保存失败,使用临时路径 - if (showEditModal.value) { - editForm.avatar = tempFilePath; - } else if (showAddModal.value) { - addForm.avatar = tempFilePath; - } - uni.showToast({ - title: '图片保存失败,使用临时路径', - icon: 'none' - }); - } - }); - }, - fail(err) { - console.log('选择图片失败:', err); - uni.showToast({ - title: '选择图片失败', - icon: 'none' - }); - } - }) -} + }); + }, + fail(err) { + console.log('选择图片失败:', err); + uni.showToast({ + title: '选择图片失败', + icon: 'none' + }); + } + }) + } // 获取头像文字 const getAvatarText = (name) => { if (!name) return ''; // 获取字符串长度(考虑中文字符) const length = name.length; - + if (length === 2) { // 两个字:返回全部 return name; @@ -1429,7 +1440,8 @@ padding: 24rpx 32rpx 24rpx 0; height: 100%; box-sizing: border-box; - box-shadow: 0 -0.3px 0 0 #C2C2C2; + box-shadow: 0 -0.3px 0 0 #C2C2C2; + .left-box { .title { font-weight: 400; @@ -1528,10 +1540,11 @@ } .call-list-oppo { - .kj{ + .kj { width: 20rpx !important; height: 24rpx !important; } + .item { padding: 32rpx 36rpx 0 36rpx !important; justify-content: space-between; @@ -1543,7 +1556,7 @@ padding-bottom: 36rpx; height: 100%; box-sizing: border-box; - box-shadow: 0 0.3px 0 0 #C2C2C2; + box-shadow: 0 0.3px 0 0 #C2C2C2; .title { font-weight: 400; @@ -1603,7 +1616,7 @@ padding-bottom: 32rpx; height: 100%; box-sizing: border-box; - box-shadow: 0 0.3px 0 0 #C2C2C2; + box-shadow: 0 0.3px 0 0 #C2C2C2; .title { font-weight: 400; @@ -1645,10 +1658,11 @@ } .call-list-huawei { - .kj{ + .kj { width: 18rpx !important; height: 22rpx !important; } + .item { padding: 24rpx 32rpx 0 32rpx !important; justify-content: space-between; @@ -1660,7 +1674,7 @@ padding-bottom: 24rpx; height: 100%; box-sizing: border-box; - box-shadow: 0 0.3px 0 0 #C2C2C2; + box-shadow: 0 0.3px 0 0 #C2C2C2; .title { font-weight: 400; @@ -1757,7 +1771,8 @@ font-size: 28rpx; color: #666; margin-bottom: 16rpx; - text{ + + text { color: red; } } @@ -1772,18 +1787,22 @@ box-sizing: border-box; color: #1A1A1A; } - .form-select{ + + .form-select { width: 364rpx !important; flex: none; } + .form-avatar-container { display: flex; align-items: center; } - .suiji{ + + .suiji { width: 50rpx; height: 50rpx; } + .form-avatar { width: 80px; height: 80px; @@ -1828,9 +1847,11 @@ font-weight: bold; background: linear-gradient(180deg, #A1A8B8 0%, #878B94 100%); } -.text-avatar-18{ - font-size: 36rpx !important; -} + + .text-avatar-18 { + font-size: 36rpx !important; + } + .form-input-time { line-height: 40px; } diff --git a/components/call-log/tabbar/tabbar.vue b/components/call-log/tabbar/tabbar.vue index f6b4474..0b9045a 100644 --- a/components/call-log/tabbar/tabbar.vue +++ b/components/call-log/tabbar/tabbar.vue @@ -6,10 +6,7 @@ - - - {{item}} - + @@ -86,10 +83,7 @@ + \ No newline at end of file diff --git a/static/image/call/detail/huaweiAvatar.png b/static/image/call/detail/huaweiAvatar.png new file mode 100644 index 0000000..3f97f17 Binary files /dev/null and b/static/image/call/detail/huaweiAvatar.png differ diff --git a/static/image/call/detail/huaweiBack.png b/static/image/call/detail/huaweiBack.png new file mode 100644 index 0000000..f32ec23 Binary files /dev/null and b/static/image/call/detail/huaweiBack.png differ diff --git a/static/image/call/detail/huaweiIcon1.png b/static/image/call/detail/huaweiIcon1.png new file mode 100644 index 0000000..5ed18c1 Binary files /dev/null and b/static/image/call/detail/huaweiIcon1.png differ diff --git a/static/image/call/detail/huaweiIcon10.png b/static/image/call/detail/huaweiIcon10.png new file mode 100644 index 0000000..c99fa22 Binary files /dev/null and b/static/image/call/detail/huaweiIcon10.png differ diff --git a/static/image/call/detail/huaweiIcon11.png b/static/image/call/detail/huaweiIcon11.png new file mode 100644 index 0000000..a78e9bc Binary files /dev/null and b/static/image/call/detail/huaweiIcon11.png differ diff --git a/static/image/call/detail/huaweiIcon2.png b/static/image/call/detail/huaweiIcon2.png new file mode 100644 index 0000000..e98dcb6 Binary files /dev/null and b/static/image/call/detail/huaweiIcon2.png differ diff --git a/static/image/call/detail/huaweiIcon3.png b/static/image/call/detail/huaweiIcon3.png new file mode 100644 index 0000000..4c14e5d Binary files /dev/null and b/static/image/call/detail/huaweiIcon3.png differ diff --git a/static/image/call/detail/huaweiIcon4.png b/static/image/call/detail/huaweiIcon4.png new file mode 100644 index 0000000..b382b75 Binary files /dev/null and b/static/image/call/detail/huaweiIcon4.png differ diff --git a/static/image/call/detail/huaweiIcon5.png b/static/image/call/detail/huaweiIcon5.png new file mode 100644 index 0000000..67f5c97 Binary files /dev/null and b/static/image/call/detail/huaweiIcon5.png differ diff --git a/static/image/call/detail/huaweiIcon6.png b/static/image/call/detail/huaweiIcon6.png new file mode 100644 index 0000000..48c9888 Binary files /dev/null and b/static/image/call/detail/huaweiIcon6.png differ diff --git a/static/image/call/detail/huaweiIcon7.png b/static/image/call/detail/huaweiIcon7.png new file mode 100644 index 0000000..020e347 Binary files /dev/null and b/static/image/call/detail/huaweiIcon7.png differ diff --git a/static/image/call/detail/huaweiIcon8.png b/static/image/call/detail/huaweiIcon8.png new file mode 100644 index 0000000..8e9da89 Binary files /dev/null and b/static/image/call/detail/huaweiIcon8.png differ diff --git a/static/image/call/detail/huaweiIcon9.png b/static/image/call/detail/huaweiIcon9.png new file mode 100644 index 0000000..74217b2 Binary files /dev/null and b/static/image/call/detail/huaweiIcon9.png differ diff --git a/static/image/call/detail/iosBack.png b/static/image/call/detail/iosBack.png new file mode 100644 index 0000000..b1be9e4 Binary files /dev/null and b/static/image/call/detail/iosBack.png differ diff --git a/static/image/call/detail/iosIcon1.png b/static/image/call/detail/iosIcon1.png new file mode 100644 index 0000000..0fe4e2c Binary files /dev/null and b/static/image/call/detail/iosIcon1.png differ diff --git a/static/image/call/detail/iosIcon2.png b/static/image/call/detail/iosIcon2.png new file mode 100644 index 0000000..2f9c75e Binary files /dev/null and b/static/image/call/detail/iosIcon2.png differ diff --git a/static/image/call/detail/iosIcon3.png b/static/image/call/detail/iosIcon3.png new file mode 100644 index 0000000..8393a2f Binary files /dev/null and b/static/image/call/detail/iosIcon3.png differ diff --git a/static/image/call/detail/iosIcon4.png b/static/image/call/detail/iosIcon4.png new file mode 100644 index 0000000..a1a3068 Binary files /dev/null and b/static/image/call/detail/iosIcon4.png differ diff --git a/static/image/call/detail/oppoAvatar.png b/static/image/call/detail/oppoAvatar.png new file mode 100644 index 0000000..a3fcd8d Binary files /dev/null and b/static/image/call/detail/oppoAvatar.png differ diff --git a/static/image/call/detail/oppoBC.png b/static/image/call/detail/oppoBC.png new file mode 100644 index 0000000..47641e1 Binary files /dev/null and b/static/image/call/detail/oppoBC.png differ diff --git a/static/image/call/detail/oppoBack.png b/static/image/call/detail/oppoBack.png new file mode 100644 index 0000000..4a91f3f Binary files /dev/null and b/static/image/call/detail/oppoBack.png differ diff --git a/static/image/call/detail/oppoGD.png b/static/image/call/detail/oppoGD.png new file mode 100644 index 0000000..aa0a3c8 Binary files /dev/null and b/static/image/call/detail/oppoGD.png differ diff --git a/static/image/call/detail/oppoIcon1.png b/static/image/call/detail/oppoIcon1.png new file mode 100644 index 0000000..1b6f0a4 Binary files /dev/null and b/static/image/call/detail/oppoIcon1.png differ diff --git a/static/image/call/detail/oppoIcon2.png b/static/image/call/detail/oppoIcon2.png new file mode 100644 index 0000000..c7b342c Binary files /dev/null and b/static/image/call/detail/oppoIcon2.png differ diff --git a/static/image/call/detail/oppoIcon3.png b/static/image/call/detail/oppoIcon3.png new file mode 100644 index 0000000..641d1d3 Binary files /dev/null and b/static/image/call/detail/oppoIcon3.png differ diff --git a/static/image/call/detail/oppoIcon4.png b/static/image/call/detail/oppoIcon4.png new file mode 100644 index 0000000..1dce841 Binary files /dev/null and b/static/image/call/detail/oppoIcon4.png differ diff --git a/static/image/call/detail/oppoIcon5.png b/static/image/call/detail/oppoIcon5.png new file mode 100644 index 0000000..876c667 Binary files /dev/null and b/static/image/call/detail/oppoIcon5.png differ diff --git a/static/image/call/detail/oppoIcon6.png b/static/image/call/detail/oppoIcon6.png new file mode 100644 index 0000000..7fc57f0 Binary files /dev/null and b/static/image/call/detail/oppoIcon6.png differ diff --git a/static/image/call/detail/oppoIcon7.png b/static/image/call/detail/oppoIcon7.png new file mode 100644 index 0000000..05c222d Binary files /dev/null and b/static/image/call/detail/oppoIcon7.png differ diff --git a/static/image/call/detail/oppoIcon8.png b/static/image/call/detail/oppoIcon8.png new file mode 100644 index 0000000..81c6fcf Binary files /dev/null and b/static/image/call/detail/oppoIcon8.png differ diff --git a/static/image/call/detail/oppoIcon9.png b/static/image/call/detail/oppoIcon9.png new file mode 100644 index 0000000..fb6b583 Binary files /dev/null and b/static/image/call/detail/oppoIcon9.png differ diff --git a/static/image/call/detail/oppoK1.png b/static/image/call/detail/oppoK1.png new file mode 100644 index 0000000..1732158 Binary files /dev/null and b/static/image/call/detail/oppoK1.png differ diff --git a/static/image/call/detail/oppoK2.png b/static/image/call/detail/oppoK2.png new file mode 100644 index 0000000..7157cc9 Binary files /dev/null and b/static/image/call/detail/oppoK2.png differ diff --git a/static/image/call/detail/oppoLD.png b/static/image/call/detail/oppoLD.png new file mode 100644 index 0000000..b099ded Binary files /dev/null and b/static/image/call/detail/oppoLD.png differ diff --git a/static/image/call/detail/oppoWJ.png b/static/image/call/detail/oppoWJ.png new file mode 100644 index 0000000..4850022 Binary files /dev/null and b/static/image/call/detail/oppoWJ.png differ diff --git a/static/image/call/detail/vivoAvatar.png b/static/image/call/detail/vivoAvatar.png new file mode 100644 index 0000000..508c97d Binary files /dev/null and b/static/image/call/detail/vivoAvatar.png differ diff --git a/static/image/call/detail/vivoBack.png b/static/image/call/detail/vivoBack.png new file mode 100644 index 0000000..ff900d6 Binary files /dev/null and b/static/image/call/detail/vivoBack.png differ diff --git a/static/image/call/detail/vivoIcon1.png b/static/image/call/detail/vivoIcon1.png new file mode 100644 index 0000000..ffa006a Binary files /dev/null and b/static/image/call/detail/vivoIcon1.png differ diff --git a/static/image/call/detail/vivoIcon2.png b/static/image/call/detail/vivoIcon2.png new file mode 100644 index 0000000..00c08d6 Binary files /dev/null and b/static/image/call/detail/vivoIcon2.png differ diff --git a/static/image/call/detail/vivoIcon3.png b/static/image/call/detail/vivoIcon3.png new file mode 100644 index 0000000..0ee3c7c Binary files /dev/null and b/static/image/call/detail/vivoIcon3.png differ diff --git a/static/image/call/detail/xiaomiAvatar.png b/static/image/call/detail/xiaomiAvatar.png new file mode 100644 index 0000000..c2508e6 Binary files /dev/null and b/static/image/call/detail/xiaomiAvatar.png differ diff --git a/static/image/call/detail/xiaomiBack.png b/static/image/call/detail/xiaomiBack.png new file mode 100644 index 0000000..4a91f3f Binary files /dev/null and b/static/image/call/detail/xiaomiBack.png differ diff --git a/static/image/call/detail/xiaomiIcon1.png b/static/image/call/detail/xiaomiIcon1.png new file mode 100644 index 0000000..aa832ed Binary files /dev/null and b/static/image/call/detail/xiaomiIcon1.png differ diff --git a/static/image/call/detail/xiaomiIcon2.png b/static/image/call/detail/xiaomiIcon2.png new file mode 100644 index 0000000..6e53a62 Binary files /dev/null and b/static/image/call/detail/xiaomiIcon2.png differ diff --git a/static/image/call/detail/xiaomiIcon3.png b/static/image/call/detail/xiaomiIcon3.png new file mode 100644 index 0000000..6cec44c Binary files /dev/null and b/static/image/call/detail/xiaomiIcon3.png differ diff --git a/static/image/call/detail/xiaomiIcon4.png b/static/image/call/detail/xiaomiIcon4.png new file mode 100644 index 0000000..ce2a222 Binary files /dev/null and b/static/image/call/detail/xiaomiIcon4.png differ diff --git a/static/image/call/detail/xiaomiIcon5.png b/static/image/call/detail/xiaomiIcon5.png new file mode 100644 index 0000000..08928cf Binary files /dev/null and b/static/image/call/detail/xiaomiIcon5.png differ diff --git a/static/image/call/detail/xiaomiIconback.png b/static/image/call/detail/xiaomiIconback.png new file mode 100644 index 0000000..1be9915 Binary files /dev/null and b/static/image/call/detail/xiaomiIconback.png differ diff --git a/static/image/watermarkBG.png b/static/image/watermarkBG.png index 9955479..fc830a3 100644 Binary files a/static/image/watermarkBG.png and b/static/image/watermarkBG.png differ diff --git a/store/index.js b/store/index.js index b254c61..6a1da0e 100644 --- a/store/index.js +++ b/store/index.js @@ -1,108 +1,127 @@ -import { reactive, ref, watch } from 'vue'; -import { storage } from '../utils/storage'; +import { + reactive, + ref, + watch +} from 'vue'; +import { + storage +} from '../utils/storage'; // 防抖函数 const debounce = (fn, delay = 300) => { - let timer = null - return function (...args) { - if (timer) clearTimeout(timer) - timer = setTimeout(() => { - fn.apply(this, args) - }, delay) - } + let timer = null + return function(...args) { + if (timer) clearTimeout(timer) + timer = setTimeout(() => { + fn.apply(this, args) + }, delay) + } } // 定义应用的全局状态 export const store = reactive({ - // 用户信息 - userInfo: storage.get('userInfo') || null, + // 用户信息 + userInfo: storage.get('userInfo') || null, - // 应用设置 - settings: storage.get('settings') || { - theme: 'light', - language: 'zh-CN', - notifications: true - }, + // 应用设置 + settings: storage.get('settings') || { + theme: 'light', + language: 'zh-CN', + notifications: true + }, - // 系统信息(从缓存读取,避免重复调用) - systemInfo: uni.getStorageSync('systemInfo') || { - statusBarHeight: 0, - windowHeight: 0, - windowWidth: 0, - platform: '' - }, + // 系统信息(从缓存读取,避免重复调用) + systemInfo: uni.getStorageSync('systemInfo') || { + statusBarHeight: 0, + windowHeight: 0, + windowWidth: 0, + platform: '' + }, - // 账单列表 - billList: JSON.parse(JSON.stringify(storage.get('bill_list') || [])), + // 账单列表 + billList: JSON.parse(JSON.stringify(storage.get('bill_list') || [])), + callInfo: {} }); // 定义操作方法 export const useStore = () => { - // 账单相关操作 - const addBill = (bill) => { - store.billList.unshift(bill); - return bill; - }; + // 账单相关操作 + const addBill = (bill) => { + store.billList.unshift(bill); + return bill; + }; - const updateBill = (id, updates) => { - const index = store.billList.findIndex(bill => bill.id === id); - if (index !== -1) { - store.billList[index] = { ...store.billList[index], ...updates }; - return store.billList[index]; - } - return null; - }; + const updateBill = (id, updates) => { + const index = store.billList.findIndex(bill => bill.id === id); + if (index !== -1) { + store.billList[index] = { + ...store.billList[index], + ...updates + }; + return store.billList[index]; + } + return null; + }; - const deleteBill = (id) => { - const index = store.billList.findIndex(bill => bill.id === id); - if (index !== -1) { - store.billList.splice(index, 1); - return true; - } - return false; - }; + const deleteBill = (id) => { + const index = store.billList.findIndex(bill => bill.id === id); + if (index !== -1) { + store.billList.splice(index, 1); + return true; + } + return false; + }; - const getBillList = () => { - return JSON.parse(JSON.stringify(store.billList)) - } - - return { - store, - addBill, - updateBill, - deleteBill, - getBillList - }; + const getBillList = () => { + return JSON.parse(JSON.stringify(store.billList)) + } + const getCallDetail = () => { + return JSON.parse(JSON.stringify(store.callInfo)) + } + const setCallDetail = (info) => { + return store.callInfo = info + }; + return { + store, + addBill, + updateBill, + deleteBill, + getBillList, + setCallDetail, + getCallDetail + }; }; // 优化后的监听:使用防抖减少存储频率 const debouncedSaveSettings = debounce((newValue) => { - storage.set('settings', newValue) + storage.set('settings', newValue) }, 500) watch( - () => store.userInfo, - (newValue) => storage.set('userInfo', newValue), - { deep: true } + () => store.userInfo, + (newValue) => storage.set('userInfo', newValue), { + deep: true + } ); watch( - () => store.settings, - (newValue) => debouncedSaveSettings(newValue), - { deep: true } + () => store.settings, + (newValue) => debouncedSaveSettings(newValue), { + deep: true + } ); // 监听billList改变自动保存 watch( - () => store.billList, - (newValue) => { - console.log("store.billList changed, saving...") - storage.set('bill_list', newValue) - }, - { deep: true } -); - + () => store.billList, + (newValue) => { + console.log("store.billList changed, saving...") + storage.set('bill_list', newValue) + }, { + deep: true + } +); \ No newline at end of file