130 Commits

Author SHA1 Message Date
duanshuwen
8792c6f837 feat(login api): add clientId to OauthTokenRequest 2026-06-15 11:17:55 +08:00
duanshuwen
0613c16942 fix(login): add clientId to mobile login request 2026-06-15 11:16:10 +08:00
DEV_DSW
3ae31fbbee style: fix MoreService template and margin styles 2026-06-08 14:01:30 +08:00
DEV_DSW
9571ad919e fix(api): update sendCode endpoint and format code
correct the API path for sendCode and reformat function signatures for better readability
2026-06-08 11:04:11 +08:00
DEV_DSW
9b33bffdca refactor: improve TypeScript type safety across codebase
Add global pinia type declaration for the custom unistorage option.
Add typed interfaces for all Pinia stores and enforce type safety on state and actions.
Add strict type annotations to all utility classes and helper functions.
Fix API response typing in the quick booking list page.
Remove unused iconsMap import in RefundPopup component.
Update package build scripts and add missing terser dependency.
Clean up outdated auto-generated component type definitions.
2026-06-04 13:36:32 +08:00
DEV_DSW
354232b444 refactor: overhaul auth system, routing, and navigation flows
This commit overhauls several core parts of the codebase:
- Replace legacy localStorage token storage with secure cookie-based authentication with automatic token refresh logic
- Rewrite checkToken and goLogin hooks to support redirect targets and proper async error handling
- Update all component navigation flows to use the updated auth checks and correct redirect behavior
- Refactor router configuration to support both client-side and server-side rendering via conditional history usage
- Remove unused speech recognition constant file and stale component registration for RecordingWaveBtn
- Add unit tests for navigation utilities and auth token handling
- Fix login post-success redirect logic and add login success event emissions
- Overhaul HTTP request handling to include automatic auth token injection and retry on unauthorized errors
2026-06-04 11:07:30 +08:00
DEV_DSW
b71097155e Merge branch 'master' of https://git.nianxx.cn/duanshuwen/nianxx-h5 2026-06-04 09:30:53 +08:00
DEV_DSW
9ec50cf0ce refactor(navigation): fix phone login country code and refactor nav hooks
Extract shared navigation functions (goHome, goLogin, goBack) into a new useNavigator hook that uses vue-router. Remove the deprecated useGoHome.ts file. Update useGoLogin.ts to import the new navigation utilities, clean up unused code, and fix the checkToken function to correctly read from localStorage. Fix missing country dial code in phone login request parameters.
2026-06-04 09:30:52 +08:00
duanshuwen
0f28cdcb48 build: add staging/prod scripts and env type definitions
update the default build script to use production mode
define TypeScript types for all supported Vite environment variables
2026-06-03 21:34:32 +08:00
duanshuwen
d352fac2f1 feat(i18n): add full multi-language support for app modules
Add new i18n modules for booking, goods, order, and service features across en-US, zh-CN, th-TH locales
Extend existing quick module translations with new card, date, and page title strings
Replace all hardcoded static text in UI components with vue-i18n translation hooks
Update the main i18n registry and login page language switching to support the new translations
2026-06-03 21:03:04 +08:00
DEV_DSW
db499933e5 style(login): adjust code field and button layout
add custom class to the verification code input field, update scoped styles to align elements and standardize sizing and padding for a consistent polished appearance
2026-06-02 17:18:31 +08:00
DEV_DSW
ebd7c2bf2a refactor: remove unused clientId from oauth token requests
remove clientId field from OauthTokenRequest interface and all oauthToken call sites,
as it is no longer required for the API requests.
2026-06-02 17:01:43 +08:00
DEV_DSW
4ef1113c2c feat(login): implement mobile SMS login flow
Add utility function for form URL encoded data serialization, update the oauthToken API to use proper form data and basic authentication, add sendCode API for sending mobile verification codes, and rewrite the phone login flow with input validation and correct OAuth parameters.
2026-06-02 16:55:53 +08:00
DEV_DSW
0c94c8f798 style(find-tabs): adjust spacing and label styles
Add a spacer div after the last tab to add consistent right padding, remove redundant px-1 padding from tab labels, and clean up excess whitespace in class attributes.
2026-06-02 16:00:04 +08:00
DEV_DSW
a024fccab7 style(chat-quick-access): update quick access item text color 2026-06-02 15:17:10 +08:00
DEV_DSW
63470f279c refactor(i18n): simplify locale resolution and clean up code
Simplify the locale resolution logic in the request utility by directly using stored locale with default fallback, remove the unused getNavigatorLanguages function, and streamline the initial locale setup in the i18n entrypoint while persisting the default locale when no stored locale is present.
2026-06-02 15:02:09 +08:00
DEV_DSW
e617e303d4 docs: update project docs and add git commit message guidelines
- add .trae/rules/git-commit-message.md with official commit rules
- update AGENTS.md to add Chinese commit message requirement
- overhaul README.md: update tech stack, directory structure, env vars, routing, i18n and request lib docs
2026-06-02 11:42:01 +08:00
DEV_DSW
1c0ea86e69 refactor(booking): move DetailPopup to local components and update styles
remove the global DetailPopup SCSS style file, update the component import path in the booking page, and rewrite the component using Tailwind CSS classes.
2026-06-02 11:25:10 +08:00
DEV_DSW
41075ae674 feat(login): add globe icon to language switcher
add lucide-vue globe component import and reorder useRouter import
2026-06-02 11:01:09 +08:00
DEV_DSW
72fdf509c9 style(components): update van-icon names from arrow-right to arrow
standardize the arrow icon used across the application by replacing the arrow-right icon name with the generic arrow variant in all affected component templates
2026-06-02 10:47:25 +08:00
DEV_DSW
fdd7f215f5 refactor(DrawerSection): inline standalone MineSetting component
delete the separate MineSetting component file and move all its template and logic directly into the parent DrawerSection component, maintaining existing functionality.
2026-06-02 10:42:41 +08:00
DEV_DSW
10fc7a44ed feat(drawer): add language switcher and update UI
Adjust drawer width from 280px to 300px for better layout.
Remove outdated avatar and nickname display sections.
Add i18n language switching support for zh-CN, en-US and th-TH locales.
Clean up unused user info mock data.
2026-06-02 10:35:13 +08:00
DEV_DSW
3031a7fd3b feat(login): add country flags to login country picker
Update the country selection UI to show national flags alongside country names and dial codes. Add a helper function to fetch flag images from flagcdn using country ISO2 codes. Restyle the country picker popup for better layout, and remove the unused selectedCountryDisplay computed property.
2026-06-02 10:13:36 +08:00
DEV_DSW
fe32095c67 feat(login): add language switcher and refine page layout
add language switcher with Chinese, English and Thai options at login page bottom
integrate i18n locale switching functionality
restructure login page container for better content centering
adjust van-cell styles to remove side padding and full-width border
2026-06-02 09:59:05 +08:00
duanshuwen
3398bc2644 chore(staging): update env endpoints and client id
replace old staging API and socket URLs with new ones, update client ID from 12 to 6 and comment out prior config values
2026-06-01 22:04:25 +08:00
duanshuwen
a8ae315e9f feat(login): add phone and Google login page with i18n
Add complete login flow with phone verification and country picker.
Add login-related translations for en-US, zh-CN and th-TH locales.
Add country calling codes constants and selection utility function.
Register Vant UI component type definitions for TypeScript.
Update development environment authentication token.
2026-06-01 21:57:12 +08:00
duanshuwen
b30158b7d9 refactor(discovery): use vue router instead of uni nav
also reorder imports for better organization, clean up commented legacy code, fix comment formatting from triple slash to double slash, and remove unused getLocation logic
2026-06-01 20:10:02 +08:00
DEV_DSW
933a272228 feat: add new card components and fix chat list code issues
- add three new Vue card components: AddCarCard, DetailCardComponent, SurveyQuestionnaire
- remove unused RecordingWaveBtn component
- fix component naming and import paths in ChatMainList
- correct `notitceConent` variable typo to `noticeContent`
- reorganize imports for better code maintainability
2026-06-01 15:26:36 +08:00
DEV_DSW
273ca5567a feat(chat): add feedback submission component
- add new Feedback component for home chat page
- update import path in ChatMainList component
- add required volume icon asset
- implement form validation, submission and success state handling
2026-06-01 15:11:41 +08:00
DEV_DSW
896cbec8d2 feat(order&service): add order and service ticket management features
- Restructure page file structure for order and service modules
- Update router configurations to match new correct file paths
- Add complete reusable component set for order display, detail viewing, payment, voucher verification and status tracking
- Add necessary SCSS styles and image assets for the new pages
- Refactor legacy order and service page implementations to modern component-based architecture
2026-06-01 15:05:41 +08:00
DEV_DSW
1060ed67c3 style(RecommendPostsList): refine component layout and styling
- replace root div with semantic section element
- adjust container classes for proper flex layout, horizontal scrolling, and consistent spacing
- add shrink-0 to post items to prevent width shrinking
- add object-cover to cover images to maintain aspect ratio
- fix Tailwind left percentage syntax
- update development environment VITE_TOKEN value
2026-06-01 14:42:19 +08:00
DEV_DSW
37c3b135f7 refactor(chat-markdown): switch markdown renderer to vue3-markdown-it
update wrapper class to w-full and remove outdated scoped styles
2026-06-01 11:50:17 +08:00
DEV_DSW
b906058cdc feat: add service order component
- add CreateServiceOrder component and associated icon assets
- create reusable resolveChatSocketUrl utility with comprehensive test cases
- update development env config to use production websocket endpoint
- fix ChatCardAi layout by replacing inline-block with flex-1 class
- refactor ChatMainList websocket initialization to use the new socket utility
- switch to using environment variable for access token instead of getAccessToken
- correct relative import path for CreateServiceOrder in ChatMainList
2026-06-01 11:44:56 +08:00
DEV_DSW
861ebf4fd7 build(deps): add socket.io-client dependency 2026-06-01 10:49:58 +08:00
DEV_DSW
7a044e6716 chore: update dev token and refactor ChatMainList
update development token in .env.development
clean up imports in ChatMainList component, merge api imports
switch event listeners to use emitter utility and enable SEND_MESSAGE_COMMAND_TYPE handler
remove outdated commented onReady code block
2026-06-01 10:45:36 +08:00
DEV_DSW
1307c53c0b style(ai-tab-switch): add flex centering and z-index to tab label container
adjust the container to properly align tab text and set correct stacking order
2026-06-01 10:33:09 +08:00
duanshuwen
a077768584 refactor: remove unused discoveryCover image import 2026-05-31 22:09:55 +08:00
duanshuwen
e3f8e94547 feat: add dynamic nav, fix album preview and store types
add dynamic TopNavBar to goods page that updates styling based on scroll position
fix album page preview logic, replace uni preview with vant showImagePreview and correct typos
add TypeScript type annotation to picture store action
clean up album page layout and fix invalid img tag
use computed album list from picture store
2026-05-31 22:06:11 +08:00
duanshuwen
6c353163df refactor: clean up components, fix date label font size
- Delete unused local image asset and unused GoodInfo SCSS stylesheet
- Replace legacy border utility classes with modern Tailwind border-t syntax
- Fix incorrect 100px font size on date selector input labels, update to 10px
- Refactor LocationCard to use Lucide Phone/Navigation icons instead of VanIcons, improve button styling
- Overhaul ImageSwiper component: add proper refs, improve scroll logic, replace VanIcons with Lucide icons, clean up redundant code
- Update goods detail and quick booking pages to properly use Pinia selected date store, add date data normalization
- Fix scrollbar styles and linear gradient syntax in goods detail page
- Update development environment auth token for local development
2026-05-31 21:05:22 +08:00
duanshuwen
83279ca9bd feat(quick-page, components): add pagination and pull refresh, refine UI and component logic
- add @lucide/vue dependency and replace van-icon with CalendarDays icon
- refactor TopNavBar to use vue-router back navigation instead of uni API
- update Card component styles for better visual appearance
- fix touch event formatting in CardSwiper and switch tap to click events
- major refactor of Calendar component: implement v-model:show, add exposed open/close methods, improve date handling logic
- add TypeScript types and update vant component declarations
- add pull-to-refresh and pagination support to quick booking page
2026-05-31 19:46:36 +08:00
duanshuwen
5064d7b444 feat(router,auth,components): implement token check and refactor navigation and UI
implement proper token validation in checkToken hook that redirects to login when no token exists
replace uni.navigateTo with vue-router's push for unified page navigation
update route names to camelCase (order_list → orderList) for consistent naming
refactor quick booking page: add named route usage, remove unused z-paging, swap uni-icons to van-icon, fix inline styles
update development environment token for testing
2026-05-31 17:47:18 +08:00
duanshuwen
567776f975 fix(scroll): improve scroll and touch event handling across components
- modify Discovery component's overflow settings and scroll wrapper classes
- fix CardSwiper touch event logic: remove unnecessary touchmove prevention, add proper event propagation and conditional default handling
- restructure ChatMainList to use a unified scroll container for both discovery and chat tabs, add scroll reference, refine scroll calculation and implement smooth scroll to bottom
- fix missing newline at end of CardSwiper script file
2026-05-29 23:40:13 +08:00
duanshuwen
ce1dac077e chore(chat-input-area): remove voice input support
Remove all voice input related UI elements, speech recognition logic, and external RecordingWaveBtn dependency from the chat input area, simplifying the component to only support text input.
2026-05-29 23:20:35 +08:00
duanshuwen
a94f2ee1df refactor: improve home page components and nav
Replace uni-app navigation with vue router in MoreService, update route paths
Refactor FindTabs scroll logic, remove unused imports and legacy code
Fix tab indicator image swap and switch from tap to click event
Adjust UI icons, padding and popup background across components
Remove unnecessary wrapper around FindTabs in Discovery component
2026-05-29 23:00:31 +08:00
duanshuwen
9b0f45f379 refactor: use global event bus for drawer trigger, polish UI components
- Replace local component emit chain with global event emitter for drawer visibility control
- Update drawer component styling: set fixed width, fix header layout and title text
- Replace uni-icons with van-icons in MineSetting component
- Adjust ChatTopNavBar: use settings icon, update button size and position
- Clean up unused event handlers and scoped styles in home page
2026-05-29 22:24:40 +08:00
duanshuwen
6ed407889a refactor(Calender): migrate styling to tailwind, remove old assets
remove deprecated SCSS style sheet and chinese holiday image, rewrite all component styles using tailwind utility classes, add helper functions for dynamic styling and price formatting
2026-05-29 21:44:44 +08:00
duanshuwen
6fefcd3512 refactor(TopNavBar): replace SCSS with utility classes
remove the unused src/components/TopNavBar/styles/index.scss file, strip the component's style import, and update class bindings to use conditional inline utilities instead of legacy modifier classes
2026-05-29 21:42:33 +08:00
duanshuwen
29cb6ecbb9 style: refine ui styles across multiple components
- update padding, shadow and border radius for QuickBookingCalender
- adjust badge blur and rounded style for GeneratorPhotoComponent
- refactor FooterSection to use inline tailwind classes and remove redundant scoped styles
- convert rpx units to px for MineSetting component styling
2026-05-29 21:39:21 +08:00
duanshuwen
71aa343efb refactor: replace uni.showToast calls with shared toast
consolidates repeated toast display logic into a centralized utility, reducing code duplication and standardizing toast behavior across the codebase
2026-05-29 21:35:10 +08:00
duanshuwen
656c592da2 refactor(components): replace uni.$emit with event emitter
update Feedback and CreateServiceOrder components to use the imported @/utils/events emitter instead of global uni.$emit, reducing reliance on global properties for better maintainability and consistency
2026-05-29 21:24:16 +08:00