| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- import { log ,Node} from "cc";
- import SdkInterface from "./SdkInterface";
- export enum RecorderState{
- START,
- PAUSE,
- STOP,
- }
- export default class BaseSdk implements SdkInterface {
- getWindowInfo() {
-
- }
- openSetting(res){
- }
- showLoading(res?: any) {
- // throw new Error("Method not implemented.");
- }
- hideLoading(res?: any) {
- // throw new Error("Method not implemented.");
- }
- getUserInfo(cb: any, node?: Node, btnCb?: any) {
- // throw new Error("Method not implemented.");
- }
- showRankList(param: any) {
-
- }
- setImRankData(param: any){
- }
-
- getScope(str) {
- return undefined
- };
- // scope:any
- authorize(str?: any) {
- // throw new Error("Method not implemented.");
- }
- posMessge(messge?){
-
- }
- getMenuButtonBoundingClientRect() {
-
- }
-
- protected _recordState:RecorderState = RecorderState.STOP
- get recordState(){
- return this._recordState
- }
- recorderResume() {
-
- }
- recorderPause() {
-
- }
- vibrateShort(param: any) {
- log("BaseSdk vibrateShort");
- }
- setOpenScore(score: number): void {
-
- }
- getOpenRank(): void {
-
- }
- /**
- * 初始化
- * @param callback 初始化成功后回调
- * @param target 监听对象
- */
- public init(callback: Function, target: Object): void {
- log("BaseSdk init");
- }
- /**
- * 登录
- * @param callback 登录成功后回调
- * @param target 监听对象
- */
- public login(callback: Function, target: Object): void {
- log("BaseSdk login");
- }
- /**
- * 登出
- */
- public logout(): void {
- log("BaseSdk logout");
- }
- /**
- * 退出
- */
- public exit(): void {
- log("BaseSdk exit");
- }
- /**
- * 切换账号
- */
- public switchLogin(): void {
- log("BaseSdk switchLogin");
- }
- /**
- * 数据上报
- * @param param 参数
- */
- public report(...param: any[]): void {
- log("BaseSdk report");
- }
- /**
- * 数据上报
- * @param param 参数
- */
- public pay(...param: any[]): void {
- log("BaseSdk pay");
- }
- /**
- * 播放广告
- */
- createRewardAd(): void {
- }
- /**
- * 播放广告
- */
- playRewardAd(callback: Function, target: any): void {
-
- callback.call(target,true);
- // UIAlert.show_sure_cancel("",(sure)=>{
- // callback.call(target, sure);
- // },this);
- }
- /**
- * 显示banner广告
- */
- showBannerAd(show: boolean): void {
- }
- /**
- * 显示插屏广告
- */
- showInterstitialAd(): void { }
- /**
- * 显示自定义广告
- */
- showCustomAd(show, top?, left?): void { }
- /**
- * 主动拉起转发(小程序)
- */
- shareAppMessage(title: string, imageUrlId: string, imageUrl: string, query: any = null, shareCallback: any = null): void {
- if (shareCallback) {
- shareCallback();
- }
- }
- recorderStart(duration:number=30):void{
-
- }
-
- recorderStop():void{
-
- }
- shareRecord(title: string ,desc:string,path:string,topics:string[]): void {
-
- }
- public goToSidebar():void{
-
- }
- public checkHasSidebar():boolean{
- return true;
- }
- public checkFromSidebar():boolean{
- return true;
- }
- }
|