diff --git a/App.vue b/App.vue index b031520..8eb6334 100644 --- a/App.vue +++ b/App.vue @@ -12,6 +12,6 @@ export default { } - + \ No newline at end of file diff --git a/common/color.css b/common/color.css new file mode 100644 index 0000000..cd03891 --- /dev/null +++ b/common/color.css @@ -0,0 +1,33 @@ +/* 常用颜色变量 */ +:root { + --text-color: #1a1a1a; + --primary-color: #007aff; + --success-color: #4cd964; + --warning-color: #ff9500; + --error-color: #ff3b30; + --text-primary: #333; + --text-secondary: #969696; + --text-tertiary: #999; + --bg-primary: #ffffff; + --bg-secondary: #f5f5f5; + --border-color: #D8D8D8; + --page-bg-color: #f0f3f8; + --footer-text-color: #CBCED3; +} + +/* 重置样式 */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +/* 基础样式 */ +page { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Arial, sans-serif; + font-size: 14px; + line-height: 1.5; + color: var(--text-color); + background-color: var(--page-bg-color); +} \ No newline at end of file diff --git a/common/main.css b/common/main.css index 955bdb1..dc7a312 100644 --- a/common/main.css +++ b/common/main.css @@ -1,22 +1,5 @@ /* 公共CSS文件 */ - -/* 重置样式 */ -* { - margin: 0; - padding: 0; - box-sizing: border-box; - /* color: var(--text-color); */ -} - -/* 基础样式 */ -body { - /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - "Helvetica Neue", Arial, sans-serif; */ - font-size: 14px; - line-height: 1.5; - color: var(--text-color); - background-color: var(--page-bg-color); -} +@import "./color.css"; .w100 { width: 100% @@ -26,23 +9,6 @@ body { height: 100%; } -/* 常用颜色变量 */ -:root { - --text-color: #1a1a1a; - --primary-color: #007aff; - --success-color: #4cd964; - --warning-color: #ff9500; - --error-color: #ff3b30; - --text-primary: #333; - --text-secondary: #969696; - --text-tertiary: #999; - --bg-primary: #ffffff; - --bg-secondary: #f5f5f5; - --border-color: #D8D8D8; - --page-bg-color: #f0f3f8; - --footer-text-color: #CBCED3; -} - /* 文本样式 */ .text-center { text-align: center; @@ -371,6 +337,16 @@ body { overflow: hidden; } +.over-scroll { + overflow: scroll; + + &::-webkit-scrollbar { + display: none; + width: 0; + height: 0; + } +} + /* 文本截断 */ .text-ellipsis { overflow: hidden; @@ -400,6 +376,11 @@ body { src: url("/static/font/WeChatSansStd-Medium.otf"); } +@font-face { + font-family: "wxNumberLight"; + src: url("/static/font/WeChatSansStd-Light.otf"); +} + .alipay-font { font-family: "alipayNumber"; } @@ -410,4 +391,8 @@ body { .wx-font-medium { font-family: "wxNumberMedium"; +} + +.wx-font-light { + font-family: "wxNumberLight"; } \ No newline at end of file diff --git a/common/specify-style.less b/common/specify-style.less index 2dcb29f..cd8ebf6 100644 --- a/common/specify-style.less +++ b/common/specify-style.less @@ -19,12 +19,18 @@ display: flex; align-items: center; justify-content: space-between; - margin-bottom: 50rpx; + margin-bottom: 32rpx; .title { font-size: 32rpx; font-weight: 500; color: var(--font-color); + + .text { + color: #AAAAAA; + font-size: 24rpx; + font-weight: 400; + } } .close-image { diff --git a/components/balance-list/balance-list.vue b/components/balance-list/balance-list.vue index fe410ec..26bb53d 100644 --- a/components/balance-list/balance-list.vue +++ b/components/balance-list/balance-list.vue @@ -2,30 +2,27 @@ + :class="{ 'flex-align-center': isBalance }" @click="onClick(item)" + @touchstart="handleTouchStart($event, item)" @touchmove="handleTouchMove" @touchend="handleTouchEnd"> - - {{ item.name }} + + {{ item.name }} - - {{ item.classification }} - - - {{ item.time }} - - + {{ item.classification }} + {{ item.time }} + :class="item.isAdd ? (isBalance ? 'add-color' : 'red-add-color') : 'minus-color', { 'line-height-51rpx': isBalance }"> {{ item.isAdd ? '+' : '-' }}{{ Number(item.money).toFixed(2) }} 已全额退款 - 余额 {{ - Number(item.balance).toFixed(2) - }} + 余额 {{ + Number(item.balance).toFixed(2) + }} @@ -53,15 +50,59 @@ const props = defineProps({ }) // 定义事件 -const emit = defineEmits(['onBill']) +const emit = defineEmits(['onBill', 'longPress']) const data = reactive({}) +let timer = null +let isLongPressTriggered = false +let touchStartX = 0 +let touchStartY = 0 + + +const handleTouchStart = (e, item) => { + isLongPressTriggered = false + if (e.touches && e.touches.length > 0) { + touchStartX = e.touches[0].clientX + touchStartY = e.touches[0].clientY + } + + timer = setTimeout(() => { + isLongPressTriggered = true + emit('longPress', { + event: e, + item + }) + }, 1500) +} + +const handleTouchMove = (e) => { + if (e.touches && e.touches.length > 0) { + const moveX = e.touches[0].clientX + const moveY = e.touches[0].clientY + // If moved significantly, cancel long press + if (Math.abs(moveX - touchStartX) > 10 || Math.abs(moveY - touchStartY) > 10) { + clearTimeout(timer) + } + } else { + clearTimeout(timer) + } +} + +const handleTouchEnd = () => { + clearTimeout(timer) +} + +const onClick = (item) => { + if (isLongPressTriggered) return + emit('onBill', item) +} + onMounted(() => { }) \ No newline at end of file diff --git a/manifest.json b/manifest.json index 76f4c8f..b3f860e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "alipay-emulator", - "appid" : "__UNI__B05EDBF", + "appid" : "__UNI__D535736", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", @@ -17,7 +17,9 @@ "delay" : 0 }, /* 模块配置 */ - "modules" : {}, + "modules" : { + "Camera" : {} + }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ @@ -46,7 +48,8 @@ }, /* SDK配置 */ "sdkConfigs" : {} - } + }, + "nvueLaunchMode" : "" }, /* 快应用特有相关 */ "quickapp" : {}, diff --git a/pages.json b/pages.json index e6506d2..0e6bfeb 100644 --- a/pages.json +++ b/pages.json @@ -5,7 +5,8 @@ "path": "pages/balance/index", "style": { "navigationBarTitleText": "余额页面", - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTextStyle": "white" } }, { @@ -35,6 +36,20 @@ "navigationBarTitleText": "热门图标", "navigationStyle": "custom" } + }, + { + "path": "pages/balance/fast-entrance-management/fast-entrance-management", + "style": { + "navigationBarTitleText": "快速入口页面", + "navigationStyle": "custom" + } + }, + { + "path": "pages/bill/bill-detail/bill-detail", + "style": { + "navigationBarTitleText": "账单详情页", + "navigationStyle": "custom" + } } ], "globalStyle": { diff --git a/pages/balance/fast-entrance-management/fast-entrance-management.vue b/pages/balance/fast-entrance-management/fast-entrance-management.vue new file mode 100644 index 0000000..ddff63b --- /dev/null +++ b/pages/balance/fast-entrance-management/fast-entrance-management.vue @@ -0,0 +1,271 @@ + + + + + + + diff --git a/pages/balance/index.vue b/pages/balance/index.vue index 361acf2..0acafea 100644 --- a/pages/balance/index.vue +++ b/pages/balance/index.vue @@ -30,7 +30,7 @@ 可用余额(元) - + {{ Number(balance).toFixed(2) }} @@ -48,9 +48,8 @@ - - + + {{ item.name }} @@ -64,7 +63,7 @@ - + @@ -74,6 +73,15 @@ + + + + + 编辑 + 删除 + + @@ -87,6 +95,7 @@ - +@import '/common/main.css'; - \ No newline at end of file diff --git a/pages/bill/add-bill/add-bill.vue b/pages/bill/add-bill/add-bill.vue index b318949..f3f1571 100644 --- a/pages/bill/add-bill/add-bill.vue +++ b/pages/bill/add-bill/add-bill.vue @@ -3,7 +3,7 @@ - + {{ item.type }} @@ -12,7 +12,7 @@ - + @@ -52,26 +52,29 @@ + + + 余额 + + + + {{ billData.balance }} + + + + + + + + \ No newline at end of file diff --git a/pages/bill/bill-list/bill-list.vue b/pages/bill/bill-list/bill-list.vue index 986ec7d..e94597c 100644 --- a/pages/bill/bill-list/bill-list.vue +++ b/pages/bill/bill-list/bill-list.vue @@ -88,12 +88,20 @@ - + + + + + + 编辑 + 删除 + +