Awesome Open Source
Awesome Open Source

 Logo

Taro2 +

issue

  • Taro2 +

Taro2

Taro``Taro +

  • CMS

CMS

  1. =
  2. =
  3. =
  4. =
  5. =

 config                              # 
 cloud                               # 
 dist                                # 
 node_modules                        # 
 package.json                        # 
 src                                 # 
    service                         # cssimageconfig
    common                          # cssimageconfig
    components                      # 
    store                           # redux
|    pages                           # 
|   |    Index                       # index
|   |   |    index.jsx               # index
|   |   |    index.scss              # index
|   |   |    index.config.js         # indexpage.json
    util                            # (util.jsglobalData.js)
    app.jsx                         # 
    app.scss                        # 
    index.html                      # 
 static                              # (CDN)
 README.md                           # 

clone

clone``project.config.json``appid

src/service/config``DBIDID`

  • wedding_invite

  • wedding_msgs

  • wedding_photos

  • wedding_video

static/db

  • yarn
yarn
 yarn dev:weapp
 yarn build:weapp
  • npm
 npm install
 npm run dev:weapp
 npm run build:weapp

Taro

...

CMS

CMS

CMS

CMS

CMS Web

CMS

static/schema

CMS

CMS

.

1.

2.Taro2 + Redux

Taro2

Taro React/Vue/Nerv ///// QQ /H5

Taro2``Taro3``Taro2

TaroDemo

3.TaroUI

Taro2UI

TaroUI

DBID

serviceCURD

JSON``MongoDb

JSON JSON JSON

API

const db = Taro.cloud.database({
    env: 'DBID'
});

collection

db.collection('wedding_msgs')
   .orderBy('createTime', 'desc') // 
   .skip(current * 10)
   .limit(pageSize)
   .get()

service/cloud/index.jsexport

Tips

cloud/functions.js``msgSecCheck security.msgSecCheck

/**
 * @Description: 
*/
// 
const cloud = require('wx-server-sdk');

cloud.init();

// 
exports.main = async function (event, context) {
    console.log(event);
    let opts = {
        content: event.content || ''
    };
    let fun = cloud.openapi.security.msgSecCheck(opts);

    return fun.then(res => {
        return res;
    }).catch(err => {
        return err;
    });
};

    // 
    Taro.cloud.callFunction({
      name: 'msgCheck',
      data: { content: data.userMsg },
    }).then(res => {
      if (res && res.result && res.result.errCode === 0) {
          Taro.showLoading({
              title: '...',
              mask: true
          });
          // 
          cloud.add('wedding_msgs', data).then(msgRes => {
              resolve(msgRes);
          }, (err) => {
              console.log(err);
              reject(err);
          });
      } else {
          reject(res.result);
      }
    }).catch(err => {
      console.log(err);
      reject(err);
    });

ToDos

  • [x] ...
  • [x] ...

Taro + Taro + Antd + koa2 + MongoDb

Taro + Antd + koa2 + MongoDb

Taro3

  • redux

  • selectComponent

const barrageComp = this.selectComponent('.barrage') Taro.createRef();

iforguo

iforguo


Issues wxiforguo


GitHubStar

issue

Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,161,366
Redux (29,344
Content Management System (13,995
Ant Design (8,427
Koa (4,618
Wechat (4,275
Wechat Mini Program (417
Weui (270
Taro (208
Wedding Invitation (19