import Vnmf from '../../index' declare module '../../index' { namespace setPageInfo { interface Option { /** Page Title */ title: string /** Page Key */ keywords: string /** Page Description Information */ description: string /** Original release time(Year-Month-Day Hour:min:sec With Precursor Zero) */ releaseDate?: string /** Articles(Contents)Title(Can not delete folder: %s: No such folder、Video-type presentation,The title of the article requires accurate identification main information points current;At least.6One word.,You can't do it in English.。) */ articleTitle?: string /** Imageline Address,Use the cover display after information stream,Up to3Chang.,Monochrome Max2M;Recommended Size of Cover Map:High>=210px & Kwan>=375px;Minimum Size:High>=146px & Kwan>=218px。When there's a lot of pictures.,Use arrays */ image?: string | Array /** Video Info,Multiple Videos,Use arrays */ video?: Video /** Browse Information */ visit?: Visit /** Give me some credit.,The page can be empty if it is not counted */ likes?: string /** Comments,The page can be empty if it is not counted */ comments?: string /** Collection,The page can be empty if it is not counted */ collects?: string /** Share,The page can be empty if it is not counted */ shares?: string /** Concern,The page can be empty if it is not counted */ followers?: string /** Interface calls a successful echo function */ success?: () => any /** Interface call failed echo function */ fail?: (err: any) => any /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: () => any } type Video = { /** Video Address */ url: string /** Video duration(in seconds) */ duration: string /** Video Cover Map */ image: string } type Visit = { /** Page views(Do not weigh users) */ pv?: string /** Page clicks(We'll rewrite the user.) */ uv?: string /** Length of stay per user the page,In seconds。 */ sessionDuration?: string } } interface VnmfStatic { /** * A 100-degree smart applet can access search and search. App,setPageInfo Responsible for setting up various page base information applets,Including title、Keywords、Page Description and Picture Information、Video Info, etc.。Developer sets complete page base information for smart applets,Helps smart applets to be more effectively displayed and distributed in search engines information streams。 * @supported swan * @example * ```tsx * Vnmf.setPageInfo({ * title: 'A red bag for the sun's abreath.,Achilles.60The New Year's Card.、600Zhang Qi's waiting for you.!-A hundred centimeters, I guess.', * keywords: '100 degrees,A hundred centimeters, I guess.,Good luck, China Year.,60,Sun-won.,Night's Eve.', * description: 'A red bag for the sun's abreath.,Love...Yesterday's 100 degrees.APPIt's the New Year's Eve.,It's all out.2Billions of cash, red bags.、Ham151A million hand cash prizes and...240A red flag sedan.,Who's the good luck wall?,Let's share it.!Surprise on the upgrade.~The red-packed walls immediately shine a screenshot of the red-bag money.,We'll draw it.660Good luck wall.', * articleTitle: 'A red bag for the sun's abreath.,Achilles.60The New Year's Card.、600Zhang Qi's waiting for you.!', * releaseDate: '2019-01-02 12:01:30', * image: [ * 'https://c.hiphotos.baidu.com/forum/w%3D480/sign=73c62dda83b1cb133e693d1bed5456da/f33725109313b07e8dee163d02d7912396dd8cfe.jpg', * 'https://hiphotos.baidu.com/fex/%70%69%63/item/43a7d933c895d143e7b745607ef082025baf07ab.jpg' * ], * video: [{ * url: 'https://www.baidu.com/mx/v12.mp4', * duration: '100', * image: 'https://smartprogram.baidu.com/docs/img/image-scaleToFill.png' * }], * visit: { * pv: '1000', * uv: '100', * sessionDuration: '130' * }, * likes: '75', * comments: '13', * collects: '23', * shares: '8', * followers: '35', * success: res => { * console.log('setPageInfo success'); * }, * fail: err => { * console.log('setPageInfo fail', err); * } * }) * ``` * @see https://smartprogram.baidu.com/docs/develop/api/open/swan-setPageInfo/ */ setPageInfo(option: setPageInfo.Option): void } }