@tarojs/taro-h5
Advanced tools
Comparing version 0.0.31 to 0.0.32
{ | ||
"name": "@tarojs/taro-h5", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"description": "Taro h5 framework", | ||
@@ -28,4 +28,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@tarojs/taro": "0.0.31" | ||
"@tarojs/taro": "0.0.32", | ||
"jsonp-retry": "^1.0.3" | ||
} | ||
} |
@@ -57,4 +57,3 @@ function setStorage (options = {}) { | ||
if (typeof key !== 'string') throw new Error(`getStorageSync:fail parameter error: parameter should be String instead of ${typeof key}`) | ||
let res | ||
res = wx.getStorageSync(key) | ||
let res = JSON.parse(localStorage.getItem(key)) | ||
@@ -61,0 +60,0 @@ // 只返回使用 Taro.setStorage API 存储的数据 |
@@ -0,1 +1,3 @@ | ||
import jsonpRetry from 'jsonp-retry' | ||
import { createSelectorQuery } from './api/createSelectorQuery' | ||
@@ -14,2 +16,16 @@ import * as storage from './api/storage' | ||
const params = {} | ||
const res = {} | ||
if (options.jsonp) { | ||
params.params = options.data | ||
params.cache = options.cache | ||
if (typeof options.jsonp === 'string') { | ||
params.name = options.jsonp | ||
} | ||
return jsonpRetry(url, params) | ||
.then(data => { | ||
res.statusCode = 200 | ||
res.data = data | ||
return res | ||
}) | ||
} | ||
params.body = options.data | ||
@@ -21,3 +37,2 @@ params.headers = options.header | ||
params.cache = options.cache | ||
const res = {} | ||
return fetch(url, params) | ||
@@ -24,0 +39,0 @@ .then(response => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
814638
10321
3
+ Addedjsonp-retry@^1.0.3
+ Added@tarojs/taro@0.0.32(transitive)
+ Addedjsonp-retry@1.0.3(transitive)
+ Addedobject-assign@4.1.1(transitive)
- Removed@tarojs/taro@0.0.31(transitive)
Updated@tarojs/taro@0.0.32