Top Related Projects
微信小程序商城,微信小程序微店
又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端 + Vue用户移动端
🔥 🎉新蜂商城前后端分离版本-后端API源码
:dog: 微信小程序-小商城前台(基于 WeUI.wxss、ES6 前端技术开发...)
NideShop:基于Node.js+MySQL开发的开源微信小程序商城(微信小程序)
Quick Overview
This project is a WeChat Mini Program e-commerce mall template. It provides a basic structure and functionality for creating a shopping application within the WeChat ecosystem, including product listings, shopping cart, and user management features.
Pros
- Ready-to-use template for WeChat Mini Program e-commerce applications
- Includes essential features like product browsing, cart management, and user authentication
- Follows WeChat Mini Program development standards and best practices
- Provides a foundation for customization and further development
Cons
- Limited documentation and comments in the code, which may make it challenging for new developers to understand and modify
- Lacks advanced e-commerce features such as payment integration or order management
- May require significant customization to fit specific business needs
- The project hasn't been updated recently, potentially missing out on newer WeChat Mini Program capabilities
Code Examples
- Product listing page:
Page({
data: {
goods: [],
categories: [],
activeCategoryId: 0,
},
onLoad: function () {
this.getCategories();
this.getGoodsList(0);
},
getCategories: function () {
var that = this;
wx.request({
url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shop/goods/category/all',
success: function (res) {
var categories = [{ id: 0, name: "All" }];
if (res.data.code == 0) {
for (var i = 0; i < res.data.data.length; i++) {
categories.push(res.data.data[i]);
}
}
that.setData({
categories: categories,
activeCategoryId: 0
});
that.getGoodsList(0);
}
})
},
})
- Add to cart functionality:
addShopCar: function () {
var that = this;
if (this.data.goodsDetail.properties && !this.data.canSubmit) {
if (!this.data.canSubmit) {
wx.showModal({
title: 'Please select the specification',
content: '',
showCancel: false
})
}
return;
}
if (this.data.buyNumber < 1) {
wx.showModal({
title: 'Please select the purchase quantity',
content: '',
showCancel: false
})
return;
}
// Add to cart API call
wx.request({
url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shop/goods/kanjia/join',
data: {
kjid: that.data.kjId,
token: wx.getStorageSync('token')
},
success: function (res) {
if (res.data.code == 0) {
wx.showToast({
title: 'Added to cart',
icon: 'success',
duration: 2000
})
} else {
wx.showModal({
title: 'Failed to add to cart',
content: res.data.msg,
showCancel: false
})
}
}
})
},
Getting Started
-
Clone the repository:
git clone https://github.com/liuxuanqiang/wechat-weapp-mall.git
-
Open the project in WeChat Developer Tools.
-
Configure your WeChat Mini Program AppID in the project settings.
-
Modify the API endpoints in the code to point to your backend server.
-
Customize the UI and functionality as needed for your specific e-commerce requirements.
-
Test the application in the WeChat Developer Tools simulator or on a real device.
Competitor Comparisons
微信小程序商城,微信小程序微店
Pros of wechat-app-mall
- More active development with frequent updates and contributions
- Comprehensive documentation and setup instructions
- Larger community support and user base
Cons of wechat-app-mall
- More complex codebase, potentially harder for beginners to understand
- Heavier reliance on external dependencies and services
Code Comparison
wechat-app-mall:
async addFav(e) {
const goodsId = e.currentTarget.dataset.goodsId
const res = await WXAPI.goodsFavPut(goodsId)
if (res.code == 0) {
wx.showToast({
title: '收藏成功',
icon: 'success'
})
}
}
wechat-weapp-mall:
addToFav: function(e) {
var goodsId = e.currentTarget.dataset.goodsid;
wx.request({
url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shop/goods/fav/add',
data: {
token: app.globalData.token,
goodsId: goodsId
},
success: function(res) {
if (res.data.code == 0) {
wx.showToast({
title: '收藏成功',
icon: 'success',
duration: 2000
})
}
}
})
}
The code comparison shows that wechat-app-mall uses async/await for better readability and error handling, while wechat-weapp-mall uses a more traditional callback approach. wechat-app-mall also utilizes a separate API module (WXAPI) for making requests, which promotes better code organization and reusability.
又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端 + Vue用户移动端
Pros of litemall
- More comprehensive e-commerce solution with backend, admin panel, and multiple frontends
- Utilizes Spring Boot for a robust and scalable backend architecture
- Includes detailed documentation and deployment guides
Cons of litemall
- Higher complexity and steeper learning curve due to its full-stack nature
- Requires more resources to set up and maintain compared to the frontend-only wechat-weapp-mall
Code Comparison
litemall (Java backend):
@RestController
@RequestMapping("/wx/goods")
public class WxGoodsController {
@GetMapping("/list")
public Object list(Integer categoryId, String keyword, Boolean isNew, Boolean isHot) {
// Implementation
}
}
wechat-weapp-mall (JavaScript frontend):
Page({
getGoodsList: function() {
var that = this;
wx.request({
url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shop/goods/list',
success: function(res) {
// Handle response
}
})
}
})
The code comparison shows that litemall uses a Spring Boot backend with RESTful endpoints, while wechat-weapp-mall focuses on frontend implementation using the WeChat Mini Program framework. litemall's approach allows for more complex business logic and better separation of concerns, but wechat-weapp-mall's simplicity may be advantageous for smaller projects or rapid prototyping.
🔥 🎉新蜂商城前后端分离版本-后端API源码
Pros of newbee-mall-api
- More comprehensive backend functionality with a full Java Spring Boot API
- Better suited for larger-scale e-commerce applications
- Includes advanced features like order management and user authentication
Cons of newbee-mall-api
- More complex setup and deployment compared to the lightweight wechat-weapp-mall
- Requires additional backend infrastructure and database management
- May be overkill for simple WeChat mini-program projects
Code Comparison
newbee-mall-api (Java):
@PostMapping("/login")
@ApiOperation(value = "登录接口", notes = "返回token")
public Result<String> login(@RequestBody @Valid AdminLoginParam adminLoginParam) {
String loginResult = newBeeMallAdminService.login(adminLoginParam.getUserName(), adminLoginParam.getPasswordMd5());
log.info("login api,adminName={},loginResult={}", adminLoginParam.getUserName(), loginResult);
if (StringUtils.isEmpty(loginResult)) {
return ResultGenerator.genFailResult("登录失败");
}
return ResultGenerator.genSuccessResult(loginResult);
}
wechat-weapp-mall (JavaScript):
Page({
data: {
goods: [],
scrollTop: 0
},
onLoad: function () {
var that = this
wx.request({
url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shop/goods/list',
data: {
categoryId: 0
},
success: function(res) {
that.setData({
goods: res.data.data
});
}
})
}
})
The code comparison shows that newbee-mall-api uses a more structured backend approach with Java Spring Boot, while wechat-weapp-mall focuses on frontend WeChat mini-program development with JavaScript.
:dog: 微信小程序-小商城前台(基于 WeUI.wxss、ES6 前端技术开发...)
Pros of m-mall
- More comprehensive backend implementation with Node.js and MongoDB
- Includes user authentication and order management features
- Better organized codebase with clear separation of concerns
Cons of m-mall
- More complex setup due to additional backend requirements
- Less focused on WeChat Mini Program specifics
- Potentially steeper learning curve for beginners
Code Comparison
m-mall (app.js):
App({
onLaunch() {
this.getUserInfo()
this.setSystemInfo()
},
getUserInfo() {
// User authentication logic
},
setSystemInfo() {
// Set system information
}
})
wechat-weapp-mall (app.js):
App({
onLaunch: function () {
console.log('App Launch')
},
onShow: function () {
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
}
})
The m-mall example shows a more feature-rich implementation with user authentication and system information setup, while wechat-weapp-mall provides a simpler structure focused on basic WeChat Mini Program lifecycle events.
NideShop:基于Node.js+MySQL开发的开源微信小程序商城(微信小程序)
Pros of nideshop-mini-program
- More comprehensive e-commerce features, including order management and user authentication
- Better organized codebase with clear separation of concerns
- Includes a backend API implementation, providing a full-stack solution
Cons of nideshop-mini-program
- Higher complexity, which may be overwhelming for beginners
- Requires more setup and configuration due to its full-stack nature
- Less focused on UI/UX aspects compared to wechat-weapp-mall
Code Comparison
nideshop-mini-program (API request):
wx.request({
url: api.CartList,
method: 'GET',
header: {
'X-Nideshop-Token': wx.getStorageSync('token')
},
success: function(res) {
// Handle response
}
});
wechat-weapp-mall (API request):
wx.request({
url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shop/goods/category/all',
success: function(res) {
// Handle response
}
});
The code comparison shows that nideshop-mini-program uses a more structured approach with a separate API module and includes authentication headers, while wechat-weapp-mall uses a simpler, direct API call without additional headers.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
微信å°ç¨åºå®ç°ç§»å¨ç«¯åå
项ç®è¯´æï¼
微信å°ç¨åºï¼å®ç°ä¸ä¸ªç§»å¨ç«¯åå
[æ°æ®æ¥æºï¼ç¯çå°éï¼å¾®ä¿¡å ¬ä¼å·ï¼ç¯çå°éï¼ï¼ç¹æ¤æè°¢]
ç®å½ç»æï¼
- images â 忾项ç®å¾ç
- pages â 忾项ç®é¡µé¢ç¸å ³æä»¶
- style â åæ¾ç¬ç«wxssæ ·å¼æä»¶ï¼å¯importå¼å ¥
- utils â åæ¾utilsæä»¶ï¼å¯requireå¼å ¥
é¡¹ç®æªå¾:





å¼åç¯å¢ï¼
微信webå¼åè å·¥å · v0.9.092300
项ç®å°åï¼
Top Related Projects
微信小程序商城,微信小程序微店
又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端 + Vue用户移动端
🔥 🎉新蜂商城前后端分离版本-后端API源码
:dog: 微信小程序-小商城前台(基于 WeUI.wxss、ES6 前端技术开发...)
NideShop:基于Node.js+MySQL开发的开源微信小程序商城(微信小程序)
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot