Git Product home page Git Product logo

wepy-mall's Introduction

安装(更新) wepy 命令行工具。

yarn: yarn global add wepy-cli 
npm: npm i wepy-cli -g

安装依赖包

yarn / npm install

开发实时编译。

yarn  dev / npm run dev

生产压缩

yarn  build / npm run build //上传代码时,请先执行此命令,否则会提示包体积过大

开发使用说明(重要)

1、使用微信开发者工具-->添加项目,项目目录请选择dist目录。

2、微信开发者工具-->项目-->关闭ES6转ES5。 重要:漏掉此项会运行报错。

3、微信开发者工具-->项目-->关闭上传代码时样式自动补全。 重要:某些情况下漏掉此项也会运行报错。

4、微信开发者工具-->项目-->关闭代码压缩上传。 重要:开启后,会导致真机computed, props.sync 等等属性失效。

wepy开发文档地址

https://tencent.github.io/wepy/

小程序开发文档

http://mp.weixin.qq.com/debug/wxadoc/dev/

演示地址

打开微信扫一扫

目录结构

├── api
│   └── api.js              //接口
├── app.wpy                 //入口文件
├── components                  //组件
│   ├── address_add.wpy         //新增地址组件
│   ├── address_edit.wpy        //编辑地址组件
│   ├── address_list.wpy        //地址列表组件
│   ├── bomb_screen.wpy         //首页弹屏组件
│   ├── collection_list.wpy     //收藏列表组件
│   ├── comment_list.wpy        //评论列表组件
│   ├── common              //公共组件
│   │   ├── bottomLoadMore.wpy      //底部加载更多组件
│   │   ├── placeholder.wpy         //空列表显示组件
│   │   ├── timer.wpy               //倒计时组件
│   │   ├── wepy-area-picker.wpy    //省市区组件
│   │   ├── wepy-sign-time.wpy      //签到组件
│   │   └── wepy-swipe-delete.wpy   //左滑删除组件
│   ├── discover.wpy        //发现列表
│   ├── filterSlider.wpy    //筛选右侧栏组件
│   ├── filter_bar.wpy      //分类排序组件
│   ├── order_item.wpy      //订单列表组件
│   ├── points_detail.wpy   //列表组件
│   ├── points_rule.wpy     //列表组件
│   ├── rate.wpy            //评分组件
│   ├── search.wpy          //搜索组件
│   ├── shop_cart.wpy       //购物车组件
│   ├── shop_grid_list.wpy  //矩阵列表
│   ├── shop_item_list.wpy  //条形列表
│   └── tab.wpy             //选项卡组件
├── images                  //图片文件夹
├── pages                   //页面
│   ├── address.wpy         //地址
│   ├── classify.wpy        //分类
│   ├── collection.wpy      //收藏
│   ├── comfire_order.wpy   //确认订单
│   ├── comment.wpy         //评论列表
│   ├── comment_add.wpy     //添加评论
│   ├── exchange_goods.wpy  //换货
│   ├── filter.wpy          //筛选
│   ├── goods_detail.wpy    //商品详情
│   ├── home.wpy            //首页
│   ├── home_detail.wpy     //首页详情
│   ├── info.wpy            //我的
│   ├── logistics.wpy       //物流
│   ├── messages.wpy        //我的消息
│   ├── order.wpy           //订单列表
│   ├── order_detail.wpy    //订单详情
│   ├── pay_success.wpy     //支付结果
│   ├── points.wpy          //积分
│   ├── points_more.wpy     //更多积分
│   ├── points_rule.wpy     //积分规则
│   ├── register.wpy        //注册
│   ├── reorder.wpy         //--
│   ├── replenishment_goods.wpy //补货
│   ├── search.wpy          //搜索
│   ├── setting.wpy         //设置
│   ├── shop_cart.wpy       //购物车
│   ├── sign_in.wpy         //签到
│   ├── test.wpy            //---
│   └── wholesale.wpy       //现货批发
├── plugins                 //插件
│   └── wxParse             //富文本
│       ├── html2json.js
│       ├── htmlparser.js
│       ├── showdown.js
│       ├── wxDiscode.js
│       ├── wxParse.js
│       ├── wxParse.wxml
│       └── wxParse.wxss    
├── styles                  //样式
│   ├── base.less
│   ├── icon.less           // 图标文件
│   └── style.less
└── utils                   //工具类
    ├── constant.js             //常量
    ├── md5.js                  //md5
    ├── regions.js              //省市区数据
    ├── tip.js                  //提示弹框组件
    ├── util.js                 //工具
    └── wxRequest.js            //ajax请求

部分功能截图

说明

此小程序借助于wepy进行高度的组件封装,仅供学习参考。喜欢就动手点个star吧~^o^~

寻找有缘合作伙伴,可提供一切开发技术服务;(2021-05-20)

友情赞助

如果本项目对你有较大的帮助,可以对我打赏,否则不需要,随便放个二维码,看看有没有对我特别好的小伙伴 ~ 哈哈

wepy-mall's People

Contributors

codertonychan avatar dyq086 avatar lisniuse avatar stillsilly avatar toywei avatar xxchevi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wepy-mall's Issues

promise问题

qq 20180314154803

Possible Unhandled Promise Rejection: TypeError: (0 , _fetch2.default) is not a function

大佬 这个错误是缺少什么

问题列表

按你步骤上的解释跑不前啊
问题列表

  1. 安装提示没有less模块,需要手动重新安装一次less
  2. 开发者工具导入dist目录后报错
    thirdScriptError
    sdk uncaught third Error
    module "npm/wepy/lib/native.js" is not defined
    Error: module "npm/wepy/lib/native.js" is not defined

根本不能运行

npm install
wepy build后生成了dist文件夹
微信开发者工具打开这个文件夹后报了一堆错

Missing files: @/../utils/regions.js in /@userPath/wechat/wxYuHanStore/src/components/common/wepy-area-picker.wpy

系统环境:mac
npm 版本:5.6.0
执行 npm run build 后出现如下错误
[23:11:42] [压缩] JS : dist/utils/tip.js
[23:11:42] [写入] JS : dist/utils/tip.js
[23:11:42] [压缩] JS : dist/utils/util.js
[23:11:42] [写入] JS : dist/utils/util.js
[23:11:42] [压缩] JS : dist/utils/wxRequest.js
[23:11:42] [写入] JS : dist/utils/wxRequest.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy/lib/app.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy/lib/page.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy/lib/component.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy/lib/event.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy/lib/base.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy/lib/util.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy/lib/mixin.js
[23:11:42] [压缩] JS : dist/npm/wepy/lib/wepy.js
[23:11:42] [写入] JS : dist/npm/wepy/lib/wepy.js
[23:11:42] [拷贝] 依赖: dist/npm/wepy-async-function/global.js
[23:11:42] [拷贝] 依赖: dist/npm/promise-polyfill/promise.js
[23:11:42] [拷贝] 依赖: dist/npm/regenerator-runtime/runtime.js
[23:11:42] [压缩] JS : dist/npm/wepy-async-function/index.js
[23:11:42] [写入] JS : dist/npm/wepy-async-function/index.js
[Error] Missing files: @/../utils/regions.js in /UsersPath/wxYuHanStore/src/components/common/wepy-area-picker.wpy

本地运行报错~ Cannot read property 'Promise' of undefined TypeError: Cannot read property 'Promise' of undefined

Cannot read property 'Promise' of undefined 
 TypeError: Cannot read property 'Promise' of undefined
    at http://127.0.0.1:50218/appservice/npm/wepy-async-function/index.js:14:7
    at require (http://127.0.0.1:50218/appservice/__dev__/WAService.js:18:26712)
    at `
var g = require('./global.js');

if (!g.Promise) {
  // IOS 10.0.1 may cause IOS crash.
  g.Promise = require('./../promise-polyfill/promise.js');
}
if (!g.regeneratorRuntime) {
  g.regeneratorRuntime = require('./../regenerator-runtime/runtime.js');
}

node 版本8.5

npm run dev WARNING

[11:58:55] [写入] JS  : dist\components\tab.js
[WARNING] WARNING IN : src\components\address_add.wpy
[xmldom warning]        unclosed xml attribute
@#[line:undefined,col:undefined]
[WARNING] WARNING IN : src\components\address_add.wpy
[xmldom warning]        unclosed xml attribute
@#[line:undefined,col:undefined]
[WARNING] WARNING IN : src\components\address_add.wpy
[xmldom warning]        unclosed xml attribute
@#[line:undefined,col:undefined]
[WARNING] WARNING IN : src\components\address_edit.wpy
[xmldom warning]        unclosed xml attribute
@#[line:undefined,col:undefined]
[WARNING] WARNING IN : src\components\address_edit.wpy
[xmldom warning]        unclosed xml attribute
@#[line:undefined,col:undefined]
[WARNING] WARNING IN : src\components\address_edit.wpy
[xmldom warning]        unclosed xml attribute
@#[line:undefined,col:undefined]
[11:58:55] [写入] WXML: dist\pages\address.wxml

npm install 时报错

npm WARN [email protected] requires a peer of less@^3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.

audited 7066 packages in 4.426s
found 3 moderate severity vulnerabilities
run npm audit fix to fix them, or npm audit for details

你的后端如何获取

你好,看了你的商城感觉很精致,但是缺少后端程序,请问如何才可以获取你的后端

用户拒绝登陆后, 并未处理回调

用户拒绝登陆后, 并未处理回调

在调用wx.login()后, 如果用户拒绝, 是否应该在需要登陆的操作时, 再一次调用wx.login()进行, 信息的存储呢?

// app.wpy
if (res.code) {
}else {
// 是不是在这里在提示下登陆, 或者做一个全局方法, 一旦没有保存住信息, 等着需要信息的操作, 就让用户登陆一波.
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.