提交 9ce10039 编写于 作者: X xiaoyucoding

feat: mp gyroscope

上级 464968de
import {
hasOwn
} from 'uni-shared'
export function setStorageSync (key, data) { export function setStorageSync (key, data) {
return my.setStorageSync({ return my.setStorageSync({
key, key,
...@@ -20,3 +24,15 @@ export function removeStorageSync (key) { ...@@ -20,3 +24,15 @@ export function removeStorageSync (key) {
key key
}) })
} }
export function startGyroscope (params) {
if (hasOwn(params, 'interval')) {
console.warn('支付宝小程序 startGyroscope暂不支持interval')
}
params.success && params.success({
errMsg: 'startGyroscope:ok'
})
params.complete && params.complete({
errMsg: 'startGyroscope:ok'
})
}
...@@ -299,6 +299,9 @@ const protocols = { // 需要做转换的 API 列表 ...@@ -299,6 +299,9 @@ const protocols = { // 需要做转换的 API 列表
args: { args: {
phoneNumber: 'number' phoneNumber: 'number'
} }
},
stopGyroscope: {
name: 'offGyroscopeChange'
} }
} }
......
...@@ -8,7 +8,7 @@ export function requestPayment (params) { ...@@ -8,7 +8,7 @@ export function requestPayment (params) {
} }
} }
if (parseError) { if (parseError) {
params.fail({ params.fail && params.fail({
errMsg: 'requestPayment:fail: 参数 orderInfo 数据结构不正确,参考:https://uniapp.dcloud.io/api/plugins/payment?id=orderinfo' errMsg: 'requestPayment:fail: 参数 orderInfo 数据结构不正确,参考:https://uniapp.dcloud.io/api/plugins/payment?id=orderinfo'
}) })
} else { } else {
......
...@@ -48,6 +48,16 @@ const protocols = { ...@@ -48,6 +48,16 @@ const protocols = {
onlyFromCamera: false, onlyFromCamera: false,
scanType: false scanType: false
} }
},
navigateToMiniProgram: {
name: 'navigateToSmartProgram',
args: {
appId: 'appKey',
envVersion: false
}
},
navigateBackMiniProgram: {
name: 'navigateBackSmartProgram'
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册