How JD E‑Wei Ticket System Was Built with Vue + Webpack: A Frontend Case Study

This article walks through the design, architecture, and implementation of JD's E‑Wei ticket‑handling platform, detailing the Vue single‑page application structure, component organization, routing, mock API usage, CORS handling, and deployment insights for front‑end engineers.

JD.com Experience Design Center
JD.com Experience Design Center
JD.com Experience Design Center
How JD E‑Wei Ticket System Was Built with Vue + Webpack: A Frontend Case Study

This article introduces JD's E‑Wei platform, a ticket‑handling system for operations engineers that centralizes computer, network, and software issue reporting and enables engineers to claim, resolve, transfer, return, or suspend tickets based on urgency.

Vue+Webpack Single‑Page Document Structure and Build Method

The project uses a Vue single‑page architecture with a clear directory layout under src, including component, css, image, view, plus entry files app.js, app.vue, index.html, and routing configuration router.js. The package.json defines standard metadata and dependencies for SCSS compilation, ES6 transpilation, Vue, Ajax, and CSS compatibility. Custom npm scripts npm run dev and npm run build start a development server and generate production files respectively.

Vue Single‑File Components

Vue single‑file components combine <template>, <script>, and <style> sections in a .vue file, allowing HTML, JavaScript, and CSS to be encapsulated together. This eliminates global component naming conflicts, provides syntax highlighting, and supports CSS preprocessing such as SCSS.

Vue‑router

The routing system is the core of the application. Components are mapped to paths in router.js, and navigation occurs via declarative <router-link> tags or programmatic router.push(...) calls. This enables seamless component switching without full page reloads.

<router-link :to="{ name: 'mydetail', params: { id: 1 } }">Detail</router-link>
router.push({ path: '/resolve', query: { eventNum: 123 } })

Interface and Data Issues

When back‑end APIs were unavailable, the team used a mock data tool to generate temporary endpoints, allowing front‑end development to continue. CORS issues during local testing were resolved with a Chrome extension, enabling cross‑origin requests. For POST requests, adding { emulateJSON: true } to the request headers ensured proper payload handling.

E‑Wei Platform Implementation Effect

The final system consists of a "Request Plaza" for viewing and claiming tickets, and a "My Events" section for managing assigned tickets, including resolution, return, suspension, and transfer. Path‑based navigation allows direct URL access to specific components. The front‑end was delivered with minimal back‑end changes, reducing integration effort and development cost.

Summary

Developing the JD E‑Wei platform provided a practical case of building a Vue.js + Webpack + Vue‑router single‑page application, covering component architecture, routing, mock API usage, CORS handling, and POST payload configuration. The experience reinforced the team's Vue expertise and demonstrated how a well‑structured front‑end can significantly improve operational efficiency.

VueWebpackSingle Page ApplicationMock APIVue-router
JD.com Experience Design Center
Written by

JD.com Experience Design Center

Professional, creative, passionate about design. The JD.com User Experience Design Department is committed to creating better e-commerce shopping experiences.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.