开源微信商城小程序源码和商城小程序开发

  近年来,越来越多的人选择在移动端购物,这使得移动端购物系统的功能需求和性能复杂度越来越高。传统的购物APP不足以应对购物系统的频繁变化。因此,迫切需要一种灵活、高效、快捷的移动购物系统。开源微信商城小程序源码就是在这样的背景下诞生的。微信小程序具有免安装、占用内存小、成本低、易扩展等特点。随着网络信息的不断增长,数据过载问题推动了个性化推荐技术的发展。本文在文献研究和实践研究的基础上,设计了一个基于个性化推荐的微信商城小程序源码。

  部分源码展示:app.js
  
  演示:xcxyms.top

const jsonApi = require('utils/jsonapi-datastore/dist/jsonapi-datastore.js')
require('utils/polyfill.js')

App({
  onLaunch: function () {
    var that = this
    this.store = new(jsonApi.JsonApiDataStore)
    this.jsonModel = jsonApi.JsonApiDataStoreModel
    this.globalData.code = wx.getStorageSync('code')

    this.getUserInfo(function() {
      that.postEncryptedData(function(res){
        that.globalData.wechatUserType = res.data.wechat_user_type
      })
    })
    this.request({
      url: `${that.globalData.API_URL}/manage_features`,
      success: function(res) { that.globalData.featureManager = res.data }
    })
  },

  getUserInfo: function (cb) {
    var that = this
    if(this.globalData.userInfo){
      typeof cb == "function" && cb(this.globalData.userInfo)
    }else{
      wx.login({
        success: function (res) {
          if (res.code) {
            that.globalData.code = res.code
            wx.setStorageSync('code', res.code)
            wx.getUserInfo({
              success: function (res) {
                that.globalData.encrypted = {encryptedData: res.
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值