0.0.51 • Published 7 years ago

fengqu-vue-utils-mobile v0.0.51

Weekly downloads
1
License
ISC
Repository
gitlab
Last release
7 years ago

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  加密类型
......

后续更新中。。。。。

0.0.51

7 years ago

0.0.50

7 years ago

0.0.49

7 years ago

0.0.48

7 years ago

0.0.47

7 years ago

0.0.46

7 years ago

0.0.45

7 years ago

0.0.44

7 years ago

0.0.43

7 years ago

0.0.42

7 years ago

0.0.41

7 years ago

0.0.40

7 years ago

0.0.39

7 years ago

0.0.38

7 years ago

0.0.37

7 years ago

0.0.36

7 years ago

0.0.35

7 years ago

0.0.34

7 years ago

0.0.33

7 years ago

0.0.32

7 years ago

0.0.31

7 years ago

0.0.30

7 years ago

0.0.29

7 years ago

0.0.28

7 years ago

0.0.27

7 years ago

0.0.26

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago