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