摘 要
随着“互联网+”的大潮兴起,平台型应用再受热捧。其中,微信小程序凭借其强大的用户基础及其应用时的便捷而深受欢迎。在此基础上,以小程序为载体的社群电商,将具有相同兴趣的社群成员组织在一起,推广与之需求高度匹配的产品或服务,轻松实现流量变现。因此,结合以上优势设计并实现基于PHP的在线商城,具有一定的研究意义和商业价值,符合我国互联网精准化营销和个性化服务的趋势。
本系统主要由微信小程序客户端、服务器、数据管理端构成,服务器采用 ThinkPHP5框架技术,客户端采用微信小程序的MINA框架,数据管理端采用 CMS框架。客户端的页面实现通过网络与服务器REST API接口通信获取 MySQL数据。本人重点参与网上购物系统客户端、服务器以及数据库的设计、开发、测试工作。 在系统的设计与实现过程中,对客户端的代码进行全局的MVC模式设计控制,采用template模板增加代码的复用性,并创建客户端用户的token管理机制进行用户身份验证与权限分级。本文重点阐述在线商城客户端的商品信息展示、商品分类、购物车、下单支付,个人信息管理及数据库设计六大模块的设计和实现过程。 采用了PHP作为后台开发语言,HTML+JS+CSS作为前端开发语言,遵守微信的开发规范,完成了在线商城的基本功能,系统运行流畅,可以正常使用。
关键词:电商;PHP;在线商城;购物
ABSTRACT
With the rise of "Internet ", platform-based applications are becoming more popular. Among them, WeChat Mini Program with its strong user base and its application when convenient and popular. On the basis of this, the community e-commerce with the small program as the carrier, will have the same interest community members to organize together, promotes the product or the service which is highly matched with its demand, realizes the flow realization easily. Therefore, combining the above advantages to design and realize the online mall based on PHP has certain research significance and commercial value, which is in line with the trend of precision marketing and personalized service in China's Internet.
The system is mainly composed of WeChat Mini Program client, server, data management end, the server adopts ThinkPHP5 framework technology, the client adopts the Minia framework of WeChat Mini Program, and the data management end adopts CMS framework. The client's page implementation acquires MySQL data by communicating with the server REST API interface through the network. I focus on the online shopping system client, server and database design, development, testing work. In the design and implementation of the system, the client code for the global MVC pattern design control, using templat e Template increases the reusability of the code, and creates the client user's token management mechanism for user authentication and permission grading. This paper focuses on the design and realization of the six modules of online shopping mall client's commodity information display, commodity classification, shopping cart, order payment, personal information management and database design. Using PHP as the background development language, HTML JSCSS as the front-end development language, following the development specifications of WeChat, completed the basic functions of the online mall, the system runs smoothly, can be used normally.
Keywords: E-commerce; PHP; Online Mall; Shopping