dev
This commit is contained in:
		
							parent
							
								
									1bd68b7efd
								
							
						
					
					
						commit
						b8f8a7bfda
					
				| 
						 | 
				
			
			@ -1,12 +1,15 @@
 | 
			
		|||
 | 
			
		||||
import request from "../../request";
 | 
			
		||||
import { AxiosPromise } from "axios";
 | 
			
		||||
import { ByPosRequest,ByPosReply } from "./types";
 | 
			
		||||
 | 
			
		||||
// 通过广告位获取广告信息
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 // 通过广告位获取广告信息 
 | 
			
		||||
export function ByPos(data: ByPosRequest): AxiosPromise<ByPosReply> {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: "/ads.Fetch.ByPos",
 | 
			
		||||
    method: "post",
 | 
			
		||||
    data: data,
 | 
			
		||||
  });
 | 
			
		||||
    return request({
 | 
			
		||||
      url: "/ads.Fetch.ByPos",
 | 
			
		||||
      method: "post",
 | 
			
		||||
      data: data,
 | 
			
		||||
});
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,16 +1,20 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
export interface ByPosRequest {
 | 
			
		||||
    key?: string; // ping码
 | 
			
		||||
    key?: string; 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export interface ByPosReply {
 | 
			
		||||
    data?: AdsItem[];// 状态码
 | 
			
		||||
    data?: AdsItem[]; 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export interface AdsItem {
 | 
			
		||||
    id?: number; 
 | 
			
		||||
    title?: string;//广告名称
 | 
			
		||||
    content?: string;//广告内容
 | 
			
		||||
    number?: number;//广告类型 1.文本 2.图片 3.视频
 | 
			
		||||
    title?: string;  // 广告名称 
 | 
			
		||||
    content?: string;  // 广告内容 
 | 
			
		||||
    type?: number;  // 广告类型 1.文本 2.图片 3.视频 
 | 
			
		||||
    toUrl?: string; 
 | 
			
		||||
    created?: string; 
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,11 +1,25 @@
 | 
			
		|||
 | 
			
		||||
import request from "../../request";
 | 
			
		||||
import { AxiosPromise } from "axios";
 | 
			
		||||
import { Crc,StatusReply } from "./types";
 | 
			
		||||
import { Crc,StatusReply,CheckForUpdatesRequest,CheckForUpdatesReply } from "./types";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 //  HELLO 
 | 
			
		||||
export function Hello(data: Crc): AxiosPromise<StatusReply> {
 | 
			
		||||
    return request({
 | 
			
		||||
      url: "/initialize.Check.Hello",
 | 
			
		||||
      method: "post",
 | 
			
		||||
      data: data,
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 //  检查更新 
 | 
			
		||||
export function Updates(data: CheckForUpdatesRequest): AxiosPromise<CheckForUpdatesReply> {
 | 
			
		||||
    return request({
 | 
			
		||||
      url: "/initialize.Check.Updates",
 | 
			
		||||
      method: "post",
 | 
			
		||||
      data: data,
 | 
			
		||||
});
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
 | 
			
		||||
import request from "../../request";
 | 
			
		||||
import { AxiosPromise } from "axios";
 | 
			
		||||
import { ConfigureRequest,ConfigureReply,Empty,AreasReply,TagsReply } from "./types";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 //  获取应用的相关配置信息 
 | 
			
		||||
export function Configure(data: ConfigureRequest): AxiosPromise<ConfigureReply> {
 | 
			
		||||
    return request({
 | 
			
		||||
      url: "/initialize.Data.Configure",
 | 
			
		||||
      method: "post",
 | 
			
		||||
      data: data,
 | 
			
		||||
});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 //  系统区域数据 
 | 
			
		||||
export function Areas(data: Empty): AxiosPromise<AreasReply> {
 | 
			
		||||
    return request({
 | 
			
		||||
      url: "/initialize.Data.Areas",
 | 
			
		||||
      method: "post",
 | 
			
		||||
      data: data,
 | 
			
		||||
});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 //  系统标签数据 
 | 
			
		||||
export function Tags(data: Empty): AxiosPromise<TagsReply> {
 | 
			
		||||
    return request({
 | 
			
		||||
      url: "/initialize.Data.Tags",
 | 
			
		||||
      method: "post",
 | 
			
		||||
      data: data,
 | 
			
		||||
});
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +23,9 @@ func main() {
 | 
			
		|||
	srvPaths := getSubDirs(protoPath)
 | 
			
		||||
	fmt.Println("Root:", protoPath, srvPaths, "JS Out:", jsPath)
 | 
			
		||||
 | 
			
		||||
	parseProtos(protoPath, srvPaths[1])
 | 
			
		||||
	for _, v := range srvPaths {
 | 
			
		||||
		parseProtos(protoPath, v)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -68,7 +70,7 @@ func parseProtos(root, dir string) {
 | 
			
		|||
 | 
			
		||||
			if len(descs[0].GetServices()) > 0 {
 | 
			
		||||
				for _, srvItem := range descs[0].GetServices() {
 | 
			
		||||
					writeSrvs(dir, tsPath, srvItem.GetName(), *srvItem.GetSourceInfo().TrailingComments, srvItem.GetMethods())
 | 
			
		||||
					writeSrvs(dir, tsPath, srvItem.GetName(), srvItem.GetSourceInfo().GetLeadingComments(), srvItem.GetMethods())
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue