Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xsyx/cute-bridge-sdk

Package Overview
Dependencies
Maintainers
13
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xsyx/cute-bridge-sdk

H5页面与Flutter or 小程序桥接SDK

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
13
Weekly downloads
 
Created
Source

cute-bridge-sdk

H5页面与Flutter or 小程序桥接SDK

使用方式

引入 cnd 路径 http://xxxxxx.com/cute-bridge.js

new 出CuteBridge对象
let cute = new CuteBridge({
  //是否开启调试-显示VConsole
  debug: true
});

  • debug: true 是否开启调试 显示VConsole
跳转购物车
  cute.navigateCart();
跳转首页
  cute.navigateHome();
跳转商品详细
   cute.navigateDetail({
      prType: "CHOICE",
      spuSn: "20200701000145101546870",
      skuSn: "000546870",
      acId: "629426",
      prId: "513435",
    })
  • 转商品详细页,这些参数都是必填
获取购物车数据
  cute.getCartList().then(res=>{
      console.log("获取购物车数据", res)
  });
添加购物车
  cute.addCart({
      prType: "CHOICE",
      spuSn: "20200701000145101546870",
      skuSn: "000546870",
      acId: "629426",
      prId: "513435",
  }).then(res=>{
      console.log("添加购物车成功", res)
  }).catch(res=>{
      console.log("添加购物车失败", res)
  })
减少购物车
  cute.minusCart({
      prType: "CHOICE",
      spuSn: "20200701000145101546870",
      skuSn: "000546870",
      acId: "629426",
      prId: "513435",
  }).then(res=>{
      console.log("减少购物车成功", res)
  }).catch(res=>{
      console.log("减少购物车失败", res)
  })

FAQs

Package last updated on 09 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc