feat: 暴露Result类
This commit is contained in:
parent
ecf1a15b9e
commit
be7d126efa
@ -1,6 +1,8 @@
|
||||
// const plugin = requirePlugin('starCloud')
|
||||
const plugin = requirePlugin('starCloud')
|
||||
Page({
|
||||
onLoad() {
|
||||
console.log(plugin.Result.Fail.code)
|
||||
console.log(new plugin.Result(0,{},'111'))
|
||||
// plugin.initStarCloud({
|
||||
// clientId: 'clientId',
|
||||
// clientSecret: 'clientSecret',
|
||||
|
||||
@ -1 +1 @@
|
||||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/vendor.js"),t=require("./starCloud/starCloud.js"),r=e.createPinia();function o(){return t.useStarCloudStore(r)}module.exports={initStarCloud(e){o().initStarCloud(e)},async register(){const e=o();return await e.register()},logout:async e=>o().logout(e),async selectLock(e){const t=o();return await t.selectLock(e)},async openDoor(e){const t=o();return await t.openDoor(e)},async getOfflinePassword(e){const t=o();return await t.getOfflinePassword(e)},async customPassword(e){const t=o();return await t.customPassword(e)},async searchDevice(e){const t=o();return await t.searchDevice(e)},async stopSearchDevice(){const e=o();return await e.stopSearchDevice()},async bindDevice(e){const t=o();return await t.bindDevice(e)},async removeBadLock(e){const t=o();return await t.removeBadLock(e)},async deleteLock(e){const t=o();return await t.deleteLock(e)},async updateAdminPassword(e){const t=o();return await t.updateAdminPassword(e)},async syncOpenDoorRecord(e){const t=o();return await t.syncAllOpenRecord(e)},async getServerTime(){const e=o();return await e.getServerTimestamp()}},exports.getStarCloudStore=o;
|
||||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/vendor.js"),t=require("./starCloud/starCloud.js"),r=require("./starCloud/basic.js"),s=e.createPinia();function a(){return t.useStarCloudStore(s)}module.exports={Result:r.Result,initStarCloud(e){a().initStarCloud(e)},async register(){const e=a();return await e.register()},logout:async e=>a().logout(e),async selectLock(e){const t=a();return await t.selectLock(e)},async openDoor(e){const t=a();return await t.openDoor(e)},async getOfflinePassword(e){const t=a();return await t.getOfflinePassword(e)},async customPassword(e){const t=a();return await t.customPassword(e)},async searchDevice(e){const t=a();return await t.searchDevice(e)},async stopSearchDevice(){const e=a();return await e.stopSearchDevice()},async bindDevice(e){const t=a();return await t.bindDevice(e)},async removeBadLock(e){const t=a();return await t.removeBadLock(e)},async deleteLock(e){const t=a();return await t.deleteLock(e)},async updateAdminPassword(e){const t=a();return await t.updateAdminPassword(e)},async syncOpenDoorRecord(e){const t=a();return await t.syncAllOpenRecord(e)},async getServerTime(){const e=a();return await e.getServerTimestamp()}},exports.getStarCloudStore=a;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { createPinia } from 'pinia'
|
||||
import { useStarCloudStore } from './starCloud/starCloud'
|
||||
import { Result } from './starCloud/basic'
|
||||
|
||||
const pinia = createPinia()
|
||||
|
||||
@ -8,6 +9,7 @@ export function getStarCloudStore() {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
Result,
|
||||
/**
|
||||
* 初始化星云
|
||||
* @param params
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user