wxapp-market

小程序营销组件,Marketing components for WeChatApp

Stars
2.7K

wxapp-market

Marketing components for WeChatApp

1.

git clone [email protected]:o2team/wxapp-market.git

2.

  • (Big wheel) : /components/wheel/
  • (Scratch tickets) : /components/scratch/
  • (Slot machine) : /components/slotMachine/
  • (Fruit machine) : /components/fruitMachine/
  • (Grid card) : /components/card/
  • (Shake) : /components/shake/
  • (Gesture lock) : /components/lock/

3.

  • WXSS@import "../../components/wheel/wheel.wxss"

  • WXML<import src="../../components/wheel/wheel.wxml"/>

  • JSimport Wheel from "../../components/wheel/wheel.js"

  • JS

  new Wheel(this,{
    areaNumber: 8,   //
    speed: 16,       //
    awardNumer: 2,   //1
    mode: 1,         //12
    callback: (idx, award) => {
      //     
    }
  })

  • WXML<import src="../../components/scratch/scratch.wxml"/>

  • JSimport Scratch from "../../components/scratch/scratch.js"

  • JS

  new Scratch(this,{
    canvasWidth: 197,   //
    canvasHeight: 72,  //
    imageResource: "./images/placeholder.png", //
    r: 4, //
    awardTxt: '', //
    awardTxtColor: "#1AAD16", //
    awardTxtFontSize: "24px", //
    maskColor: "red",  //
    callback: () => {
      //
    }
  })

globalCompositeOperation = "destination-out" clearRect

  • WXSS@import "../../components/slotMachine/slotMachine.wxss"

  • WXML<import src="../../components/slotMachine/slotMachine.wxml"/>

  • JSimport SlotMachine from "../../components/slotMachine/slotMachine.js"

  • JS

  new SlotMachine(this,{
     height: 40,  //
     len: 10,     //
     transY1: 0,  //
     num1: 3,     //
     transY2: 0,  //
     num2: 0,     //
     transY3: 0,  //
     num3: 0,     //
     transY4: 0,  //
     num4: 1,     //
     speed: 24,   //
     callback: (idx, award) => {
      //     
    }
  })

  • WXSS@import "../../components/fruitMachine/fruitMachine.wxss"

  • WXML<import src="../../components/fruitMachine/fruitMachine.wxml"/>

  • JSimport FruitMachine from "../../components/fruitMachine/fruitMachine.js"

  • JS

  new FruitMachine(this,{
    len: 9, //
    ret: 9, //19   
    speed: 100,  // 
    callback: (idx, award) => {
      //     
    }
  })

  • WXSS@import "../../components/card/card.wxss"

  • WXML<import src="../../components/card/card.wxml"/>

  • JSimport Card from "../../components/card/card.js"

  • JS

  new Card(this,{
    data: [   //
      {isBack: false, isMove: false, award: ""},    
      {isBack: false, isMove: false, award: ""},
      {isBack: false, isMove: false, award: ""},
      {isBack: false, isMove: false, award: ""},
      {isBack: false, isMove: false, award: ""},
      {isBack: false, isMove: false, award: ""},
      {isBack: false, isMove: false, award: ""},
      {isBack: false, isMove: false, award: ""},
      {isBack: false, isMove: false, award: ""}
    ],
    callback: (idx, award) => {
      //     
    }
  })

  • WXSS@import "../../components/shake/shake.wxss"

  • WXML<import src="../../components/shake/shake.wxml"/>

  • JSimport Shake from "../../components/shake/shake.js"

  • JS

  new Shake(this,{
    shakeThreshold: 70, //
    callback: (idx, award) => {
      //     
    }
  })

  • WXSS@import "../../components/lock/lock.wxss"

  • WXML<import src="../../components/lock/lock.wxml"/>

  • JSimport Lock from "../../components/lock/lock.js"

  • JS

  new Lock(this,{
    canvasWidth: 300,   //canvas px
    canvasHeight: 300,  //canvas px 
    canvasId: "canvasLock", //canvasid
    drawColor: "#3985ff"  //
  })

  • 2017-09-18
  • 2017-09-17
  • 2017-09-16
  • 2017-09-16
  • 2017-09-02
  • 2017-08-29
  • 2017-08-27
  • create wx-market repository 2017-08-26

MIT

Issue PR wxapp-market

Related Projects