1.Overview
If mini program of the third party demands jump to mini program of QR Key to obtain keys and unlock, the developer can transfer parameters required.
2.Parameter Description
Developers of mini program use components of <navigator> to link to QR Key. Please refer to the API of official mini program to see the instruction.API-navigator
app-id:wxbe18a842c8d14445(You need this app-id to jump to mini program of QR Key.)
3.Parameter Description
Required parameters Explanation
accountSid The Account SID for the Lock Cabinet Developer Account
time Current time.Format:20190506172901
communityNo QR Master community
cardNo Please refer to Generate cards
sig Request signature,sig=md5(accountSid=xx&time=xx&communityNo=xx&cardNo=xx&authToken=xx)
4.Sample
1. If you want to get a single key obtained by cardNo, please refer to the following code:
<!--index.wxml-->
<view class="container">
    <view>
      <navigator target="miniProgram" open-type="navigate" app-id="wxbe18a842c8d14445" path="pages/externalLink/externalLink?accountSid={{accountSid}}&time={{time}}&communityNo={{communityNo}}&cardNo={{cardNo}}&sig={{sig}}">Jump to the unlock page</navigator>
    </view>
</view>
<!--index.wxss-->
.container{
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.container button{
    margin-top: 10px;
    padding: 5px 10px;
}
.container navigator{
    background-color: #79b637;
    color: #fff;
    padding:10px;
    border-radius: 10px;
}
<!--index.js-->
Page({
    data: {
        accountSid: QR Master Account,
        time: Now time,
        communityNo: QR Master community,
        cardNo: Get from Generate cards API,
    }
})
<!--app.js-->
<!--Please add app-id wxbe18a842c8d14445 to the array 'navigateToMiniProgramAppIdList'-->
{
    "pages": [
        "pages/index/index"
    ],
    "navigateToMiniProgramAppIdList": [
        "wxbe18a842c8d14445"
    ],
    "window": {
        "backgroundTextStyle": "light",
        "navigationBarBackgroundColor": "#fff",
        "navigationBarTitleText": "测试Demo",
        "navigationBarTextStyle": "black"
    },
}
2. If you want to get list of keys under an account, please refer to the following code and jump to the keys list page:
<!--index.wxml-->
<view class="container">
    <view>
      <navigator target="miniProgram" open-type="navigate" app-id="wxbe18a842c8d14445" path="pages/index/index">Jump to the keys list page</navigator>
    </view>
</view>
<!--index.wxss-->
.container{
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.container button{
    margin-top: 10px;
    padding: 5px 10px;
}
.container navigator{
    background-color: #79b637;
    color: #fff;
    padding:10px;
    border-radius: 10px;
}
<!--app.js-->
<!--Please add app-id wxbe18a842c8d14445 to the array 'navigateToMiniProgramAppIdList'-->
{
    "pages": [
        "pages/index/index"
    ],
    "navigateToMiniProgramAppIdList": [
        "wxbe18a842c8d14445"
    ],
    "window": {
        "backgroundTextStyle": "light",
        "navigationBarBackgroundColor": "#fff",
        "navigationBarTitleText": "测试Demo",
        "navigationBarTextStyle": "black"
    },
}