Skip to content

Commit

Permalink
Merge pull request #71 from akaili/update-getUnlimited-parament
Browse files Browse the repository at this point in the history
获取小程序码时,参数有新增
  • Loading branch information
Javen205 authored Apr 21, 2024
2 parents 4bbb8fd + 189e47c commit e6eec0e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/miniprogram/src/MiniProgramApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,18 @@ export class MiniProgramApi {
* @param autoColor
* @param lineColor
* @param isHyaline
* @param checkPath
* @param envVersion
*/
public static async getUnlimited(
scene: string,
page: string,
width: number = 430,
autoColor: boolean = false,
lineColor: object = { r: 0, g: 0, b: 0 },
isHyaline: boolean = false
isHyaline: boolean = false,
checkPath: boolean = true,
envVersion: MiniProgramEnvVersion
) {
let accessToken = await AccessTokenApi.getAccessToken()
let url = util.format(this.getUnlimitedUrl, (<AccessToken>accessToken).getAccessToken)
Expand All @@ -260,7 +264,9 @@ export class MiniProgramApi {
width: width,
auto_color: autoColor,
line_color: lineColor,
is_hyaline: isHyaline
is_hyaline: isHyaline,
check_path: checkPath,
env_version: envVersion
}),
{
headers: { 'Content-type': 'application/json' },
Expand Down Expand Up @@ -435,3 +441,6 @@ export enum MiniProgramMediaType {
VOICE = 1,
IMG = 2
}


type MiniProgramEnvVersion = 'release' | 'trial' | 'develop'

0 comments on commit e6eec0e

Please sign in to comment.