Convert Figma logo to code with AI

EastWorld logowechat-app-mall

微信小程序商城,微信小程序微店

20,232
6,560
20,232
1

Top Related Projects

19,639

又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端 + Vue用户移动端

NideShop:基于Node.js+MySQL开发的开源微信小程序商城(微信小程序)

微信小程序-移动端商城

1,552

:dog: 微信小程序-小商城前台(基于 WeUI.wxss、ES6 前端技术开发...)

Quick Overview

EastWorld/wechat-app-mall is an open-source WeChat Mini Program e-commerce solution. It provides a comprehensive set of features for building and managing an online store within the WeChat ecosystem, including product management, order processing, and user interactions.

Pros

  • Fully-featured e-commerce solution tailored for WeChat Mini Programs
  • Active community and regular updates
  • Extensive documentation and setup guides
  • Customizable and extendable codebase

Cons

  • Primarily focused on the Chinese market and WeChat ecosystem
  • May require significant customization for specific business needs
  • Learning curve for developers unfamiliar with WeChat Mini Program development
  • Dependency on WeChat's platform and policies

Code Examples

// Example of fetching product details
wx.request({
  url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shop/goods/detail',
  data: {
    id: that.data.id
  },
  success: function(res) {
    if (res.data.code == 0) {
      that.setData({
        goods: res.data.data
      });
    }
  }
})
// Example of adding a product to cart
wx.request({
  url: 'https://api.it120.cc/' + app.globalData.subDomain + '/shopping-cart/add',
  data: {
    token: wx.getStorageSync('token'),
    goodsId: this.data.goodsDetail.basicInfo.id,
    number: this.data.buyNumber
  },
  success: (res) => {
    if (res.data.code == 0) {
      wx.showToast({
        title: '加入购物车成功',
        icon: 'success',
        duration: 2000
      })
    } else {
      wx.showModal({
        title: '错误',
        content: res.data.msg,
        showCancel: false
      })
    }
  }
})
// Example of processing an order
wx.request({
  url: 'https://api.it120.cc/' + app.globalData.subDomain + '/order/create',
  method: 'POST',
  header: {
    'content-type': 'application/x-www-form-urlencoded'
  },
  data: {
    token: wx.getStorageSync('token'),
    goodsJsonStr: that.data.goodsJsonStr,
    remark: that.data.remark
  },
  success: (res) => {
    if (res.data.code != 0) {
      wx.showModal({
        title: '错误',
        content: res.data.msg,
        showCancel: false
      })
      return;
    }
    // Order created successfully
  }
})

Getting Started

  1. Clone the repository:

    git clone https://github.com/EastWorld/wechat-app-mall.git
    
  2. Set up the WeChat Developer Tools and import the project.

  3. Configure the config.js file with your API endpoints and credentials.

  4. Run the project in the WeChat Developer Tools simulator or deploy to your WeChat Mini Program account.

For detailed setup instructions, refer to the project's documentation on GitHub.

Competitor Comparisons

19,639

又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端 + Vue用户移动端

Pros of litemall

  • More comprehensive e-commerce solution, including both frontend and backend components
  • Supports multiple platforms: WeChat Mini Program, Web, and Mobile H5
  • Includes admin dashboard for easier management

Cons of litemall

  • More complex setup and configuration due to its comprehensive nature
  • Potentially steeper learning curve for developers new to the stack
  • May include unnecessary features for simpler e-commerce projects

Code Comparison

wechat-app-mall (WeChat Mini Program frontend):

Page({
  data: {
    goodsList: [],
    categories: []
  },
  onLoad: function() {
    this.getCategories();
    this.getGoodsList();
  }
})

litemall (Vue.js frontend):

export default {
  data() {
    return {
      goodsList: [],
      categories: []
    }
  },
  created() {
    this.getCategories();
    this.getGoodsList();
  }
}

Both projects use similar structures for managing product listings and categories. However, litemall uses Vue.js, which offers more flexibility for cross-platform development, while wechat-app-mall is specifically tailored for WeChat Mini Programs.

NideShop:基于Node.js+MySQL开发的开源微信小程序商城(微信小程序)

Pros of nideshop-mini-program

  • More comprehensive backend implementation with Node.js and MySQL
  • Includes a separate admin panel for managing the e-commerce platform
  • Better documentation and setup instructions for developers

Cons of nideshop-mini-program

  • Less frequent updates and maintenance compared to wechat-app-mall
  • Smaller community and fewer contributors
  • May require more setup and configuration due to its more complex architecture

Code Comparison

wechat-app-mall (App.js):

App({
  onLaunch: function () {
    const that = this;
    // 检测新版本
    const updateManager = wx.getUpdateManager();
    updateManager.onUpdateReady(function () {
      wx.showModal({
        title: '更新提示',
        content: '新版本已经准备好,是否重启应用?',
        success: function (res) {
          if (res.confirm) {
            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
            updateManager.applyUpdate();
          }
        }
      })
    })
    /**
     * 初次加载判断网络情况
     * 无网络状态下根据实际情况进行调整
     */
    wx.getNetworkType({
      success: function (res) {
        const networkType = res.networkType;
        if (networkType === 'none') {
          that.globalData.isConnected = false;
          wx.showToast({
            title: '当前无网络',
            icon: 'loading',
            duration: 2000
          })
        }
      }
    });
  },
  globalData: {
    isConnected: true
  }
})

nideshop-mini-program (app.js):

App({
  onLaunch: function () {
    //调用API从本地缓存中获取数据
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
  },
  getUserInfo: function (cb) {
    var that = this
    if (this.globalData.userInfo) {
      typeof cb == "function" && cb(this.globalData.userInfo)
    } else {
      //调用登录接口
      wx.login({
        success: function () {
          wx.getUserInfo({
            success: function (res) {
              that.globalData.userInfo = res.userInfo
              typeof cb == "function" && cb(that.globalData.userInfo)
            }
          })
        }
      })
    }
  },
  globalData: {
    userInfo: null
  }
})

微信小程序-移动端商城

Pros of wechat-weapp-mall

  • Simpler and more lightweight implementation
  • Easier to understand and modify for beginners
  • Focuses on core e-commerce functionality without extra features

Cons of wechat-weapp-mall

  • Less comprehensive feature set compared to wechat-app-mall
  • Fewer active contributors and updates
  • Limited documentation and support

Code Comparison

wechat-weapp-mall:

// app.js
App({
  onLaunch: function () {
    // Do something when launch
  },
  globalData: {
    userInfo: null
  }
})

wechat-app-mall:

// app.js
App({
  onLaunch: function () {
    const that = this;
    // 检测新版本
    const updateManager = wx.getUpdateManager()
    updateManager.onUpdateReady(function () {
      wx.showModal({
        title: '更新提示',
        content: '新版本已经准备好,是否重启应用?',
        success(res) {
          if (res.confirm) {
            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
            updateManager.applyUpdate()
          }
        }
      })
    })
    // ...
  },
  // ...
})

The code comparison shows that wechat-app-mall includes additional functionality for version updates, while wechat-weapp-mall has a simpler implementation. This reflects the overall difference in complexity and feature set between the two projects.

1,552

:dog: 微信小程序-小商城前台(基于 WeUI.wxss、ES6 前端技术开发...)

Pros of m-mall

  • More comprehensive UI components and layouts
  • Better organized codebase with clearer separation of concerns
  • Includes additional features like user authentication and order management

Cons of m-mall

  • Less frequently updated compared to wechat-app-mall
  • Smaller community and fewer contributors
  • May require more setup and configuration due to its complexity

Code Comparison

m-mall (App.js):

App({
  onLaunch() {
    this.getUserInfo()
    this.setSystemInfo()
  },
  getUserInfo() {
    // User authentication logic
  },
  setSystemInfo() {
    // Set system information
  }
})

wechat-app-mall (app.js):

App({
  onLaunch: function() {
    const that = this;
    // 展示本地存储能力
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    userInfo: null
  }
})

The m-mall code shows a more modular approach with separate methods for user info and system info, while wechat-app-mall combines these in the onLaunch function. m-mall's structure may be easier to maintain and extend, but wechat-app-mall's approach is more straightforward for simpler applications.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

微信小程序商城

微信小程序商城,微信小程序微店,长期维护版本,欢迎大家踊跃提交贡献代码;

使用说明和常见问题,可参阅下面的说明,如还有疑问,可访问工厂官网 https://www.it120.cc/ 寻求帮助!

新增直播带货支持,具体详见使用说明

今日头条/抖音小程序版本

本项目的今日头条/抖音小程序版本,请移步至下面的地址:

https://github.com/EastWorld/tt-app-mall

扫码体验

详细配置/使用教程

https://www.it120.cc/help/ikfe2k.html

遇到使用问题?

点击这里找答案,可用关键词搜索

其他优秀开源模板推荐

联系作者

微信好友QQ好友

本项目使用了下面的组件,在此鸣谢

底部ICON图标使用: https://www.iconfont.cn/collections/detail?spm=a313x.7781069.0.da5a778a4&cid=18904

如何升级到最新版

  • 小程序程序的修改和您后台的数据是独立的,所以不用担心您会丢失数据
  • 先把你开发工具下的现有版本程序备份
  • 下载最新版的程序,直接覆盖您本地的程序
  • 用开发工具修改域名 mall 为你自己的域名
  • 开发工具里面上传代码提交微信审核
  • 审核通过后,小程序后台去发布新版本即可
  • 用户无需重新扫码,关闭小程序重新打开就是新版本了