npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

baoqu-vue-utils-mobile

v0.0.53

Published

移动端utils

Downloads

7

Readme

Build Setup


入口mainjs中引用
import { router, urlUtils, cache, createPersistedState, NetworkAccessor, Network, SecurityType } from fengqu-vue-utils-mobile

cache


  |---cacheInit
  |---getDeviceId
  |---getToken
  |---getUserInfo
  |---getAppId
  |---getCsrfToken
  |---isLogin
  |---clear
get对应的都有set方法
......

filter


  |---badge (badge)
  |---currency (price, needSymbol = false, needPoint = false, denominator = 100.0)
  |---imageFormat (url, width, height, cut = 1)
  第一个参数不传默认使用对象
  ......

msg


  |---toast (message, position = 'center', duration = 3000)
  |---loading
    |---show
    |---hide
  对象已已注册到全局
  Vue.$toast(message, position = 'center', duration = 3000)
  Vue.$loading.show()
  Vue.$loading.hide()

router

  import { router } from 'fengqu-vue-utils-mobile'
  Vue.use(router, routerConfig)
  routerConfig为当前页面配置的路由规则,例
  routerConfig = {
    wowIndex: {
      path: '/pages/index/index',
      needLogin: false,
      type: 'mini',
      inTab: true
    },
    seat: {
      path: '/pages/shop/shopScanningList/index',
      type: 'mini',
      needLogin: false
    }
  }

scan


  对象已已注册到全局
  Vue.prototype.$scan({
    getBarcode, 此处是条码.默认接受条码code,不可传
    getIceStoreId, 此处调用冰柜开门接口,默认接受storeid,如方法不传将直接跳转冰柜首页
    getBoxStoreId, 此处调用盒子开门接口,默认接受storeid,如方法不传将直接跳转盒子首页,并接受参数storeid, type
    closeBoxStoreId, 此处调用盒子关门接口,默认接受storeid,如方法不传将直接跳转盒子首页, 并接受参数storeid, type
    AddItemsForStore, 此处调用盒子加车接口,接受参数[{ itemId, num: 1 }],如不传将不加车
    boxScanJoin, 此处调用盒子加车成功回调接口,如不传将加车成功并跳转盒子首页带参数storeid
    mScanJoin,此处调用冰柜加车成功回调接口,如不传将加车成功并跳转商圈首页
  })

storage


  对象已已注册到全局
  Object  = {
    key: value,
    expiresDays: 2(过期天数)
  }
  Vue.$storage.setStorage(Object)
  Vue.$storage.getStorage('key')
  Vue.$storage.removeStorage('key')

urlUtils


|---getURL (path, params) 返回完整带参url
|---getURLPathKey (url) 通过url返回当前url在路由中的key,必须符合业务配置的域名规则才可获取
|---getParams (url) 通过url返回当前url的参数,包括非?的参数,必须符合业务配置的域名规则才可获取

createPersistedState


  import { createPersistedState } from fengqu-vue-utils-mobile
  vue 缓存
  vuex-store中使用
  plugins: [createPersistedState]

Network

NetworkAccessor
使用方法
let network = new WowShopcart_AddItemsForStore(params)
return NetworkAccessor.sendRequest(network)
Network  请求默认参数
SecurityType  加密类型
......

后续更新中。。。。。