├── .DS_Store ├── .gitattributes ├── .gitignore ├── Duality.ttf ├── README.md ├── common ├── baseValidate.go ├── bet.go ├── captcha.go ├── checkCaptcha.go ├── encrypt.go ├── findNum.go ├── httpclient.go ├── ipConvert.go └── redis.go ├── controllers ├── .DS_Store ├── accountDetail.go ├── base.go ├── betList.go ├── dataInNotice.go ├── init.go ├── login.go ├── moneyIn.go ├── postBet.go ├── signup.go ├── trend.go └── ws.go ├── cp33 ├── cp33.exe ├── cp33.sql ├── dump.rdb ├── main.go ├── models ├── init.go └── model.go ├── router └── router.go ├── services ├── .DS_Store ├── lotto │ ├── bets.go │ ├── dataTimes.go │ ├── getWinAmount.go │ ├── lottery.go │ ├── openInfo.go │ ├── played.go │ ├── playedGroup.go │ └── trend.go ├── pingtais │ └── pingtais.go └── user │ ├── coin.go │ ├── coinLog.go │ ├── login.go │ ├── moneyIn.go │ └── signup.go └── templates ├── .DS_Store └── default ├── .DS_Store ├── bet ├── cqssc.html ├── pk10.html ├── tjssc.html └── xjssc.html ├── deposit └── index.html ├── help └── promotion.html ├── index.html ├── index ├── index.html ├── login.html └── register.html ├── mine ├── accountDetail.html ├── betDetail.html ├── betList.html └── index.html ├── trend └── index.html └── wap ├── .DS_Store └── statics ├── .DS_Store ├── css ├── .DS_Store ├── global.css └── jquery-ui.min.css ├── homeStyle2 ├── css │ └── index.css └── images │ ├── .DS_Store │ ├── index-img │ ├── 5.png │ ├── 51.png │ ├── 9.png │ ├── blank_01.png │ ├── gren.png │ ├── ilabandex_.png │ ├── index_goucai.png │ ├── index_heng.png │ ├── index_kefu.png │ ├── index_youhui.png │ ├── index_zoushi.png │ ├── login.png │ ├── logo_top_cai33.png │ ├── nav_01.png │ ├── nav_05.png │ ├── nav_1.png │ ├── nav_2.png │ ├── nav_3.png │ ├── nav_4.png │ ├── nav_5.png │ ├── pcdd.png │ └── zhuce.png │ └── wap_logo_cai33.png ├── images ├── .DS_Store ├── android_btn.png ├── back.png ├── betting │ ├── anjian_hong.png │ ├── shijian_bg.png │ ├── top_you_anniu_01.png │ ├── top_zhong_sanjiao.png │ ├── touzhu_close_02.png │ ├── touzhu_nav_01.png │ ├── touzhu_nav_02.png │ ├── touzhu_pic_18.png │ ├── touzhu_qian_bg.png │ ├── touzhu_tianjia_01.png │ ├── touzhu_tianjia_02.png │ ├── touzhus_anniu_bg.png │ ├── touzhus_anniu_ft.png │ ├── touzhus_anniu_top_01.png │ ├── yaoyiyao.png │ └── you_caidan_box.png ├── blank_01.png ├── cachelogo │ └── logo_top_cai33.png ├── cz_02.png ├── cz_img_03.png ├── cz_img_14.png ├── go_btn.png ├── gou_wancheng.png ├── goucai_hp_more.png ├── goucai_qiehua_07.png ├── help │ ├── .DS_Store │ ├── 1476cfab6359a45391932be70e1d7bbb.jpg │ ├── 1ed62f3433a00ce71f48705e856a4ea6.jpg │ ├── 92932a648f1de2b21d4290c6f25c5476.jpg │ ├── c45f3b525a19b9c02a3ed97ee34766c0.jpg │ ├── cf91d7473429150ab790e0dd7bf9464c.jpg │ ├── db4e1699b4e4ec19873111bd9c180ec7.jpg │ └── join-icon.png ├── icon │ ├── .DS_Store │ ├── 1.png │ ├── 12.png │ ├── 15.png │ ├── 18.png │ ├── 51.png │ ├── 52.png │ ├── 7.png │ ├── 9.png │ ├── logo_more.png │ └── pcdd.png ├── index_jiangzhang.png ├── index_pic_08.png ├── login │ ├── login_pass.png │ └── login_peo.png ├── login_pass.png ├── login_peo.png ├── logout.png ├── message │ ├── geren_cz_01.png │ ├── geren_tixian_01.png │ ├── geren_tou.png │ ├── geren_tubiao_04.png │ ├── geren_tubiao_06.png │ ├── geren_tubiao_13.png │ ├── geren_tubiao_24.png │ ├── geren_tubiao_26.png │ ├── geren_tubiao_30.png │ ├── touxiang_beijing.png │ └── wuxinxi.png ├── moshi_anniu_03.png ├── shuaxin_01.png ├── store_btn.png ├── top_zhong_sanjiao.png ├── tuodong_02_03.png ├── tuodong_03.png ├── wap_icon.png └── zoushi_you_anniu_03.png ├── js ├── bet.list.js ├── game │ ├── common.js │ ├── face.15.js │ ├── face.4.js │ ├── face.41.js │ ├── face.6.js │ ├── face.7.js │ ├── face.s3.js │ ├── game.4.js │ ├── game.7.js │ └── shake.js ├── index.js ├── iris-ws.js ├── iscro-lot.js ├── jquery-2.2.3.min.js ├── jquery-ui.min.js ├── jquery.min.js ├── lobby.js ├── ripemd160.js ├── sha3.js └── ui-slide.js └── promo ├── .DS_Store ├── a.jpg ├── b.jpg ├── c.jpg ├── d.jpg ├── e.jpg └── f.jpg /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=go 2 | *.go linguist-language=go 3 | *.html linguist-language=go 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cp33 2 | -------------------------------------------------------------------------------- /Duality.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/Duality.ttf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lottery 2 | 一个类似淘宝可无限开店...可无限开彩票平台的彩票系统 3 | 4 | go1.9以上版本、postgresql、redis 5 | 6 | 数据采集端在https://github.com/a7a2/cp33client 7 | 8 | todo: 9 | 10 | 充值系统独立做成一个第三方充值系统,欠前端 11 | 12 | 其他彩种(还差六合彩、十一选五、排列三、3D、快三) 13 | 14 | 站内短信系统 15 | 16 | 走势 17 | 18 | -----------分界线---------------------- 19 | 20 | 没有考虑到多服务器并发结算,失败! 21 | 22 | 如果要写得重写,可閱性太差了。。。 23 | 24 | 这个系统是参考别人前端完成的,所以包括很多如验证码都是基本一样的,验证码部分就能导致可深度学习破解。 25 | 26 | 从现在看这份代码的质量确实太差太差,但是不介意显露自己,能力、熟练度等大家一起工作就能看出,这个无什么,基本自学的。。。 27 | 28 | 29 | -----------分界线---------------------- 30 | 31 | 请把浏览器调到手机模式访问http://127.0.0.1:8080/index/register.html注册。 32 | -------------------------------------------------------------------------------- /common/baseValidate.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "cp33/models" 5 | "fmt" 6 | 7 | "github.com/kataras/iris" 8 | ) 9 | 10 | type BaseInfo struct { //基础信息 11 | Platform string `json:"platform"` 12 | Uuid string `json:"uuid"` 13 | } 14 | 15 | func (self BaseInfo) Check(ctx iris.Context) { 16 | err := ctx.ReadForm(&self) 17 | if err != nil { 18 | fmt.Println(err.Error()) 19 | ctx.JSON(models.Result{Code: 404, Message: "数据错误" + err.Error(), Data: nil}) 20 | return 21 | } 22 | if self.Platform == "" || self.Uuid == "" { 23 | ctx.JSON(models.Result{Code: 404, Message: "数据错误!", Data: nil}) 24 | return 25 | } 26 | return 27 | } 28 | -------------------------------------------------------------------------------- /common/bet.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "fmt" 5 | "math" 6 | "strconv" 7 | // "time" 8 | ) 9 | 10 | func Round(f float64) float64 { 11 | pow10_n := math.Pow10(3) 12 | return math.Trunc((f+0.5/pow10_n)*pow10_n) / pow10_n 13 | } 14 | 15 | func InArrayInt(j *int, betPos *[]int) bool { //检查某数字是否存在于[]int数组中 16 | for h := 0; h < len(*betPos); h++ { 17 | if *j == (*betPos)[h] { 18 | return true 19 | } 20 | } 21 | return false 22 | } 23 | 24 | func Combination(c, b int) int { 25 | var f64 float64 26 | if b == 0 || c == 0 { 27 | return 1 28 | } 29 | if b > c { 30 | return 0 31 | } 32 | if b > c/2 { 33 | b = c - b 34 | } 35 | var a float64 = 0 36 | for i := c; i >= (c - b + 1); i-- { 37 | f64, _ = strconv.ParseFloat(strconv.Itoa(i), 64) 38 | a += math.Log(f64) 39 | } 40 | for i := b; i >= 1; i-- { 41 | f64, _ = strconv.ParseFloat(strconv.Itoa(i), 64) 42 | a -= math.Log(f64) 43 | } 44 | a = math.Exp(a) 45 | 46 | s := fmt.Sprintf("%.0f", a) 47 | ii, _ := strconv.Atoi(s) 48 | return ii 49 | } 50 | -------------------------------------------------------------------------------- /common/captcha.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "image/color" 5 | "image/png" 6 | 7 | //"net/http" 8 | "cp33/models" 9 | 10 | "github.com/afocus/captcha" 11 | "github.com/kataras/iris" 12 | ) 13 | 14 | var cap *captcha.Captcha 15 | 16 | func StartCaptcha(ctx iris.Context) { 17 | cap = captcha.New() 18 | if err := cap.SetFont("Duality.ttf"); err != nil { 19 | panic(err.Error()) 20 | } 21 | 22 | /* 23 | //We can load font not only from localfile, but also from any []byte slice 24 | fontContenrs, err := ioutil.ReadFile("comic.ttf") 25 | if err != nil { 26 | panic(err.Error()) 27 | } 28 | 29 | err = cap.AddFontFromBytes(fontContenrs) 30 | if err != nil { 31 | panic(err.Error()) 32 | } 33 | */ 34 | 35 | cap.SetSize(80, 50) 36 | cap.SetDisturbance(captcha.MEDIUM) 37 | cap.SetFrontColor(color.RGBA{255, 255, 255, 255}) 38 | cap.SetBkgColor(color.RGBA{255, 0, 0, 255}, color.RGBA{0, 0, 255, 255}, color.RGBA{0, 153, 0, 255}) 39 | 40 | img, str := cap.Create(4, captcha.NUM) 41 | // var tempTimeInt64 int64 42 | 43 | // if time.Now().Unix()+300/1000 == time.Now().Unix()/1000 { 44 | // tempTimeInt64 = time.Now().Unix() / 1000 45 | // } else { 46 | // tempTimeInt64 = time.Now().Unix() + 300/1000 47 | // } 48 | models.MapCaptcha[ctx.RemoteAddr()] = str 49 | //ctx.Session().SetFlash(ctx.RemoteAddr(), str) 50 | ctx.ContentType("image/png") 51 | 52 | png.Encode(ctx.ResponseWriter(), img) 53 | //println(str) 54 | // http.ListenAndServe(":8085", nil) 55 | } 56 | -------------------------------------------------------------------------------- /common/checkCaptcha.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "cp33/models" 5 | "fmt" 6 | 7 | "github.com/kataras/iris" 8 | ) 9 | 10 | func CheckCaptcha(ctx iris.Context, s string) bool { //等待实现分布式验证码 有时间 11 | defer delete(models.MapCaptcha, ctx.RemoteAddr()) 12 | if !(models.MapCaptcha[ctx.RemoteAddr()] == s && s != "") { 13 | _, err := ctx.JSON(models.Result{Code: 403, Message: "验证码错误!", Data: nil}) 14 | if err != nil { 15 | fmt.Println(err.Error()) 16 | } 17 | return false 18 | } 19 | return true 20 | } 21 | -------------------------------------------------------------------------------- /common/encrypt.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "cp33/models" 5 | "strings" 6 | // "strings" 7 | // "crypto/cipher" 8 | "crypto/aes" 9 | "crypto/cipher" 10 | "crypto/md5" 11 | "crypto/rand" 12 | "encoding/base64" 13 | "encoding/hex" 14 | "fmt" 15 | "io" 16 | 17 | //"github.com/jameskeane/bcrypt" 18 | "github.com/pzduniak/argon2" 19 | // "golang.org/x/crypto/blowfish" 20 | ) 21 | 22 | func EncryptDb(platform, password *string) (strHash string) { //浏览器、客户端完成sha3->ripemd160的加密,入库前通过这里argon2加密一次 23 | salt := []byte(models.PwdKey + (*platform)) 24 | hashByte, err := argon2.Key([]byte(*password), salt, 3, 4, 16384, 32, argon2.Argon2i) 25 | if err != nil { 26 | fmt.Println(err) 27 | return 28 | } 29 | strHash = hex.EncodeToString(hashByte) 30 | return 31 | } 32 | 33 | //func EncryptClient(password []byte, platform string) (hash string) { //argon2加密到浏览器、客户端cookie 同时缓存在redis 34 | // salt := []byte(models.PwdKey + platform) 35 | // hashByte, err := argon2.Key(password, salt, 3, 4, 4096, 32, argon2.Argon2i) 36 | // if err != nil { 37 | // fmt.Println(err) 38 | // return 39 | // } 40 | // hash = hex.EncodeToString(hashByte) 41 | // fmt.Println("EncryptClient", ":", hash) 42 | // return 43 | 44 | //} 45 | 46 | func EncryptClient(plaintext []byte, platform string) string { //aes加密到浏览器、客户端cookie 同时缓存在redis 47 | strKey := md5Sum(models.PwdKey + platform) 48 | key := []byte(strKey) 49 | 50 | block, err := aes.NewCipher(key) 51 | if err != nil { 52 | panic(err.Error()) 53 | } 54 | 55 | // Never use more than 2^32 random nonces with a given key because of the risk of a repeat. 56 | nonce := make([]byte, 12) 57 | if _, err := io.ReadFull(rand.Reader, nonce); err != nil { 58 | panic(err.Error()) 59 | } 60 | 61 | aesgcm, err := cipher.NewGCM(block) 62 | if err != nil { 63 | panic(err.Error()) 64 | } 65 | 66 | ciphertext := aesgcm.Seal(nil, nonce, plaintext, nil) 67 | textStr := base64.StdEncoding.EncodeToString(ciphertext) 68 | //textStr = strings.Replace(textStr, "+", "%2B", -1) 69 | ivStr := base64.StdEncoding.EncodeToString(nonce) 70 | //rintln("EncryptClient:", textStr, " len(textStr):", len(textStr), "\nivStr:", ivStr) 71 | return textStr + ivStr 72 | } 73 | 74 | func DecryptClient(s, platform *string) string { 75 | *s = strings.Replace(*s, " ", "+", -1) 76 | *s = strings.Replace(*s, "%2B", "+", -1) 77 | 78 | //fmt.Println("DecryptClient:", len(s)) 79 | strKey := md5Sum(models.PwdKey + (*platform)) 80 | key := []byte(strKey) 81 | if len(*s) < 17 { 82 | return "1" 83 | } 84 | ciphertext, _ := base64.StdEncoding.DecodeString((*s)[:len(*s)-16]) 85 | nonce, _ := base64.StdEncoding.DecodeString((*s)[len(*s)-16:]) 86 | //fmt.Println("len(nonce):", len(nonce)) 87 | //fmt.Println("DecryptClient string:", s) 88 | block, err := aes.NewCipher(key) 89 | if err != nil { 90 | panic(err.Error()) 91 | } 92 | 93 | aesgcm, err := cipher.NewGCM(block) 94 | if err != nil { 95 | panic(err.Error()) 96 | } 97 | 98 | plaintext, err := aesgcm.Open(nil, nonce, ciphertext, nil) 99 | if err != nil { 100 | panic(err.Error()) 101 | } 102 | //fmt.Println("DecryptClient:", string(plaintext)) 103 | return string(plaintext) 104 | } 105 | 106 | func md5Sum(s string) (str string) { 107 | h := md5.New() 108 | h.Write([]byte(s)) 109 | str = hex.EncodeToString(h.Sum(nil)) 110 | return 111 | } 112 | -------------------------------------------------------------------------------- /common/findNum.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "math" 5 | ) 6 | 7 | //n 所求数字位置(个位 1,十位 2 依此类推) 8 | func FindNum(num, n int) int { 9 | power := int(math.Pow10(n)) 10 | return (num - num/power*power) * 10 / power 11 | } 12 | -------------------------------------------------------------------------------- /common/httpclient.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | func HttpClient4Pay(uri *string) *error { //充值信息提交到第三方支付系统 8 | client := &http.Client{} 9 | url := "http://127.0.0.1:8081/" //支付系统网址 10 | request, err := http.NewRequest("GET", url+(*uri), nil) 11 | request.Header.Set("Connection", "close") 12 | if err != nil { 13 | return &err 14 | } 15 | _, err = client.Do(request) 16 | return &err 17 | } 18 | -------------------------------------------------------------------------------- /common/ipConvert.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "net" 5 | "strconv" 6 | "strings" 7 | ) 8 | 9 | func Inet_ntoa(ipnr int64) net.IP { 10 | var bytes [4]byte 11 | bytes[0] = byte(ipnr & 0xFF) 12 | bytes[1] = byte((ipnr >> 8) & 0xFF) 13 | bytes[2] = byte((ipnr >> 16) & 0xFF) 14 | bytes[3] = byte((ipnr >> 24) & 0xFF) 15 | 16 | return net.IPv4(bytes[3], bytes[2], bytes[1], bytes[0]) 17 | } 18 | 19 | // Convert net.IP to int64 , http://www.outofmemory.cn 20 | func Inet_aton(ipnr net.IP) int64 { 21 | bits := strings.Split(ipnr.String(), ".") 22 | 23 | b0, _ := strconv.Atoi(bits[0]) 24 | b1, _ := strconv.Atoi(bits[1]) 25 | b2, _ := strconv.Atoi(bits[2]) 26 | b3, _ := strconv.Atoi(bits[3]) 27 | 28 | var sum int64 29 | 30 | sum += int64(b0) << 24 31 | sum += int64(b1) << 16 32 | sum += int64(b2) << 8 33 | sum += int64(b3) 34 | 35 | return sum 36 | } 37 | -------------------------------------------------------------------------------- /common/redis.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/go-redis/cache" 5 | "github.com/go-redis/redis" 6 | "github.com/vmihailenco/msgpack" 7 | ) 8 | 9 | var RedisClient *redis.Client 10 | var Codec *cache.Codec 11 | 12 | func init() { 13 | RedisClient = redis.NewClient(&redis.Options{ 14 | Addr: "localhost:6379", 15 | Password: "", // no password set 16 | DB: 0, // use default DB 17 | }) 18 | 19 | ring := redis.NewRing(&redis.RingOptions{ 20 | Addrs: map[string]string{ 21 | "server1": ":6379", 22 | }, 23 | }) 24 | 25 | Codec = &cache.Codec{ 26 | Redis: ring, 27 | 28 | Marshal: func(v interface{}) ([]byte, error) { 29 | return msgpack.Marshal(v) 30 | }, 31 | Unmarshal: func(b []byte, v interface{}) error { 32 | return msgpack.Unmarshal(b, v) 33 | }, 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /controllers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/controllers/.DS_Store -------------------------------------------------------------------------------- /controllers/accountDetail.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/models" 5 | "cp33/services/user" 6 | "fmt" 7 | 8 | "github.com/kataras/iris" 9 | ) 10 | 11 | func AccountDetail(ctx iris.Context) { 12 | b := Base{ctx} 13 | if b.CheckIsLogin() == false { 14 | ctx.JSON(models.Result{Code: 888, Message: "未登陆!", Data: nil}) 15 | return 16 | } 17 | 18 | var postAccountDetail models.PostAccountDetail 19 | var err error 20 | 21 | err = ctx.ReadForm(&postAccountDetail) 22 | if err != nil { 23 | fmt.Println(err.Error()) 24 | return 25 | } 26 | var result models.Result 27 | result = services.AccountDetail(&postAccountDetail, ctx.GetCookie("platform"), ctx.GetCookie("username")) 28 | ctx.JSON(&result) 29 | } 30 | -------------------------------------------------------------------------------- /controllers/base.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "cp33/services/pingtais" 7 | "cp33/services/user" 8 | "regexp" 9 | 10 | // "github.com/go-redis/redis" 11 | "github.com/kataras/iris" 12 | ) 13 | 14 | type Base struct { //基础信息 15 | iris.Context 16 | } 17 | 18 | func (self *Base) BaseCheck() bool { //检查用户名是否符合,平台是否存在 19 | username := self.Context.FormValue("username") 20 | if username != "" && regexp.MustCompile(`^(_)`).MatchString(username) == true { 21 | self.Context.JSON(models.Result{Code: 404, Message: "用户名不能以下划线_开头!", Data: nil}) 22 | return false 23 | } 24 | if len(username) > 16 { 25 | self.Context.JSON(models.Result{Code: 404, Message: "用户名太长!", Data: nil}) 26 | return false 27 | } 28 | 29 | platform := self.Context.FormValue("platform") 30 | if regexp.MustCompile(`([a-f\d]{8})(\-[a-f\d]{4}){3}(\-([a-f\d]{12}))`).MatchString(platform) == false { 31 | //self.Context.JSON(models.Result{Code: 404, Message: "没有找到该平台!", Data: nil}) 32 | //没有指定平台的直接跳到第一个默认的 33 | //self.Context.Redirect("/index/login.html?platform=ce45035d-317e-4831-afe1-05444d9b040a") 34 | return false 35 | } 36 | 37 | if common.RedisClient.HExists(platform+"_*", "enclientpasswd").Val() == true { 38 | return true 39 | } 40 | 41 | if *(servicesPingtais.GetPlatformId(&platform)) > 0 { 42 | return true 43 | } 44 | 45 | //不存在的平台跳转 46 | //self.Context.Redirect("/index/login.html?platform=ce45035d-317e-4831-afe1-05444d9b040a") 47 | //self.Context.JSON(result) 48 | return false 49 | } 50 | 51 | func (self *Base) CheckIsLogin() bool { 52 | cookieEnClientPassWd := self.Context.GetCookie("enclientpasswd") 53 | cookieUsername := self.Context.GetCookie("username") 54 | cookiePlatform := self.Context.GetCookie("platform") 55 | if cookiePlatform == "" || cookieUsername == "" || cookieEnClientPassWd == "" { 56 | //self.Context.Redirect("/index/login.html?platform=ce45035d-317e-4831-afe1-05444d9b040a") 57 | //result = models.Result{Code: 404, Message: err.Error(), Data: nil} 58 | return false 59 | } 60 | 61 | if common.RedisClient.HExists(cookiePlatform+"_"+cookieUsername, "enclientpasswd").Val() == true { 62 | //从redis验证 63 | redisCookieEnClientPassWd := common.RedisClient.HGet(cookiePlatform+"_"+cookieUsername, "enclientpasswd").Val() 64 | if redisCookieEnClientPassWd == cookieEnClientPassWd { 65 | //self.Context.JSON(models.Result{Code: 404, Message: "你已经是本站用户!", Data: nil}) 66 | return true 67 | } 68 | //解密验证 69 | if common.DecryptClient(&cookieEnClientPassWd, &cookiePlatform) == common.DecryptClient(&redisCookieEnClientPassWd, &cookiePlatform) { 70 | return true 71 | } 72 | } 73 | 74 | //从数据库验证 75 | lp := models.LoginPost{ 76 | Username: cookieUsername, 77 | Platform: cookiePlatform, 78 | Password: common.DecryptClient(&cookieEnClientPassWd, &cookiePlatform), 79 | } 80 | err, result := services.Login(&lp) 81 | if err == nil && result.Code == 200 { //成功 82 | return true 83 | } 84 | 85 | return false 86 | } 87 | 88 | func (self *Base) loginSucceed(l *models.LoginCookie) { 89 | common.RedisClient.HSet(l.Platform+"_"+l.Username, "enclientpasswd", l.Enclientpasswd) 90 | self.Context.RemoveCookie("username") 91 | self.Context.RemoveCookie("platform") 92 | self.Context.RemoveCookie("enclientpasswd") 93 | self.Context.Header("Set-Cookie", "username="+l.Username+"; Path=/; Expires=Wed, 14 Feb 2987 09:30:00 GMT; Max-Age=11604799") 94 | self.Context.Header("Set-Cookie", "platform="+l.Platform+"; Path=/; Expires=Wed, 14 Feb 2987 09:30:00 GMT; Max-Age=11604799") 95 | self.Context.Header("Set-Cookie", "enclientpasswd="+l.Enclientpasswd+"; Path=/; Expires=Wed, 14 Feb 2987 09:30:00 GMT; Max-Age=11604799") 96 | self.Context.JSON(models.Result{Code: 200, Message: "ok", Data: l}) 97 | } 98 | -------------------------------------------------------------------------------- /controllers/betList.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/models" 5 | "cp33/services/lotto" 6 | "fmt" 7 | 8 | "github.com/kataras/iris" 9 | ) 10 | 11 | func BetList(ctx iris.Context) { 12 | b := Base{ctx} 13 | if b.CheckIsLogin() == false { 14 | ctx.JSON(models.Result{Code: 503, Message: "未登陆!", Data: nil}) 15 | return 16 | } 17 | 18 | var bl models.AjaxBetList 19 | var err error 20 | 21 | err = ctx.ReadForm(&bl) 22 | if err != nil { 23 | fmt.Println(err.Error()) 24 | return 25 | } 26 | 27 | var result models.Result 28 | result = servicesLotto.BetList(&bl, ctx.GetCookie("platform"), ctx.GetCookie("username")) 29 | ctx.JSON(&result) 30 | } 31 | -------------------------------------------------------------------------------- /controllers/dataInNotice.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/models" 5 | "cp33/services/lotto" 6 | //"github.com/go-pg/pg" 7 | "github.com/kataras/iris" 8 | ) 9 | 10 | func DataInNotice(ctx iris.Context) { 11 | issue, _ := ctx.Params().GetInt("issue") 12 | gameId, _ := ctx.Params().GetInt("gameID") 13 | result := servicesLotto.OpenInfo(gameId) 14 | BroadcastSame(&models.WsConn, &gameId, "getOpenData", &result) 15 | //fmt.Println("DataInNotice gameId:", gameId, " issue:", issue) 16 | servicesLotto.EndLottery(gameId, issue, ctx.RemoteAddr()) 17 | 18 | } 19 | -------------------------------------------------------------------------------- /controllers/init.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/kataras/iris/websocket" 5 | ) 6 | 7 | var WsConn map[websocket.Connection]bool 8 | var ChanDbChange = make(chan int, 10) 9 | 10 | func init() { 11 | WsConn = make(map[websocket.Connection]bool) 12 | ChanDbChange <- 1 13 | getCacheViaDb() 14 | } 15 | 16 | func getCacheViaDb() { 17 | select { 18 | case <-ChanDbChange: 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /controllers/login.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "cp33/services/user" 7 | "fmt" 8 | "strconv" 9 | ) 10 | 11 | func (self *Base) Login() { 12 | if self.BaseCheck() == false { 13 | return 14 | } 15 | 16 | var s models.LoginPost 17 | var err error 18 | 19 | err = self.Context.ReadForm(&s) 20 | if err != nil { 21 | fmt.Println(err.Error()) 22 | return 23 | } 24 | 25 | //以后完善 每个ip登陆密码错误次数高于50次后要求验证码 26 | // if common.CheckCaptcha(self.Context, s.Captcha) == false { //验证码 27 | // return 28 | // } 29 | //fmt.Println("s.Password:", s.Password) 30 | //start...先从redis校验 31 | 32 | passwordDb := common.EncryptDb(&s.Platform, &s.Password) 33 | if passwordDb == "" { 34 | fmt.Println("passwordDb nil") 35 | return 36 | } 37 | 38 | // fmt.Println(common.RedisClient.HExists(s.Platform+"_"+s.Username, "enclientpasswd").Val()) 39 | 40 | var enClientPassWd string //存放在cookie 及 redis上 41 | if common.RedisClient.HExists(s.Platform+"_"+s.Username, "enclientpasswd").Val() == true { 42 | enClientPassWd = common.RedisClient.HGet(s.Platform+"_"+s.Username, "enclientpasswd").Val() //取存在redis的cookie密码 43 | //然后解密的 校验 加密的,原则上不需要用到数据库 44 | //fmt.Println(len(enClientPassWd), " ", enClientPassWd) 45 | deClientPassWd := common.DecryptClient(&enClientPassWd, &(s.Platform)) 46 | if deClientPassWd == passwordDb { 47 | outData := models.LoginCookie{Platform: s.Platform, Username: s.Username, Enclientpasswd: enClientPassWd} 48 | self.loginSucceed(&outData) 49 | fmt.Println(s.Username, " login via redis") 50 | return 51 | } 52 | } 53 | //end...先从redis校验 54 | 55 | //start...从数据库校验 56 | var result models.Result 57 | err, result = services.Login(&s) 58 | if err == nil && result.Code == 200 { //登陆成功 59 | enClientPassWd = common.EncryptClient([]byte(passwordDb), s.Platform) 60 | field := make(map[string]interface{}, 2) 61 | field["uid"] = strconv.Itoa(result.Data.(*models.Members).Uid) 62 | field["platformid"] = result.Data.(*models.Members).PlatformId 63 | if _, err = common.RedisClient.HMSet(s.Platform+"_"+s.Username, field).Result(); err != nil { 64 | fmt.Println(err.Error()) 65 | } 66 | loginCookie := models.LoginCookie{Platform: s.Platform, Username: s.Username, Enclientpasswd: enClientPassWd} 67 | self.loginSucceed(&loginCookie) 68 | fmt.Println(s.Username, " login db") 69 | return 70 | } 71 | self.Context.JSON(&result) 72 | //end...从数据库校验 73 | } 74 | -------------------------------------------------------------------------------- /controllers/moneyIn.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "cp33/services/user" 7 | "fmt" 8 | 9 | "github.com/kataras/iris" 10 | ) 11 | 12 | func MoneyInNotice(ctx iris.Context) { 13 | 14 | } 15 | 16 | func PostMoneyIn(ctx iris.Context) { //POST提交的充值请求 17 | b := Base{ctx} 18 | if b.CheckIsLogin() == false { 19 | ctx.JSON(models.Result{Code: 503, Message: "未登陆!", Data: nil}) 20 | return 21 | } 22 | 23 | var pmi models.PostMoneyIn 24 | var err error 25 | 26 | err = ctx.ReadForm(&pmi) 27 | if err != nil { 28 | fmt.Println(err.Error()) 29 | return 30 | } 31 | strPlatform := ctx.GetCookie("platform") 32 | username := ctx.GetCookie("username") 33 | uid := services.GetUidViaPlatformAndUsername(&strPlatform, &username) 34 | var result models.Result 35 | result = services.PostMoneyIn(uid, &pmi) 36 | fmt.Println(result) 37 | if result.Code != 200 { 38 | ctx.JSON(&result) 39 | return 40 | } 41 | uri := fmt.Sprintf("%s/%d/%s/%.3f", models.GateWayMoneyUrl, result.Data.(*models.MoneyIns).Channel, result.Data.(*models.MoneyIns).PayAccount, result.Data.(*models.MoneyIns).Money) 42 | fmt.Println(uri) 43 | common.HttpClient4Pay(&uri) 44 | ctx.JSON(&result) 45 | } 46 | -------------------------------------------------------------------------------- /controllers/signup.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/models" 5 | "cp33/services/user" 6 | "fmt" 7 | "strconv" 8 | 9 | "cp33/common" 10 | ) 11 | 12 | func (self *Base) Signup() { //post 注册 13 | var s models.SignupPost 14 | var err error 15 | err = self.Context.ReadForm(&s) 16 | if err != nil { 17 | fmt.Println(err.Error()) 18 | return 19 | } 20 | if common.CheckCaptcha(self.Context, s.Captcha) == false { //验证码 21 | return 22 | } 23 | 24 | if self.BaseCheck() == false { 25 | return 26 | } 27 | 28 | passwordDb := common.EncryptDb(&(s.Platform), &(s.Password)) 29 | s.Password = passwordDb 30 | var result models.Result 31 | _, result = services.Signup(&s, fmt.Sprintf("%s/%s", self.Context.RemoteAddr(), "32")) 32 | if result.Code == 200 { 33 | enClientPassWd := common.EncryptClient([]byte(passwordDb), s.Platform) 34 | field := make(map[string]interface{}, 2) 35 | field["uid"] = strconv.Itoa(result.Data.(*models.Members).Uid) 36 | field["platformid"] = result.Data.(*models.Members).PlatformId 37 | if _, err = common.RedisClient.HMSet(s.Platform+"_"+s.Username, field).Result(); err != nil { 38 | fmt.Println(err.Error()) 39 | } 40 | loginCookie := models.LoginCookie{Platform: s.Platform, Username: s.Username, Enclientpasswd: enClientPassWd} 41 | self.loginSucceed(&loginCookie) 42 | return 43 | } 44 | self.Context.JSON(result) 45 | 46 | } 47 | -------------------------------------------------------------------------------- /controllers/trend.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/models" 5 | "cp33/services/lotto" 6 | "fmt" 7 | 8 | "github.com/kataras/iris" 9 | ) 10 | 11 | func PostTrend(ctx iris.Context) { 12 | // b := Base{ctx} 13 | // if b.CheckIsLogin() == false { 14 | // ctx.JSON(models.Result{Code: 503, Message: "未登陆!", Data: nil}) 15 | // return 16 | // } 17 | 18 | var t models.Trend 19 | var err error 20 | 21 | err = ctx.ReadForm(&t) 22 | if err != nil { 23 | fmt.Println(err.Error()) 24 | return 25 | } 26 | 27 | var result models.Result 28 | result = servicesLotto.Trend(&t) 29 | ctx.JSON(&result) 30 | } 31 | -------------------------------------------------------------------------------- /controllers/ws.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "cp33/services/lotto" 7 | "cp33/services/user" 8 | "fmt" 9 | // "regexp" 10 | "strconv" 11 | 12 | "github.com/kataras/iris/websocket" 13 | ) 14 | 15 | func checkIsLogin(l *models.LoginCookie) bool { 16 | if (*l).Username == "" || (*l).Platform == "" { 17 | return false 18 | } 19 | passwdDb := common.DecryptClient(&(l.Enclientpasswd), &(l.Platform)) 20 | 21 | //从redis验证 22 | if common.RedisClient.HExists(l.Platform+"_"+l.Username, "enclientpasswd").Val() == true { 23 | redisEnclientpasswd := common.RedisClient.HGet(l.Platform+"_"+l.Username, "enclientpasswd").Val() 24 | //fmt.Println(redisEnclientpasswd) 25 | if redisEnclientpasswd == l.Enclientpasswd { 26 | return true 27 | } 28 | //解密验证 29 | //fmt.Println(l.Enclientpasswd, " ", redisEnclientpasswd, " ", l.Enclientpasswd) 30 | if common.DecryptClient(&redisEnclientpasswd, &(l.Platform)) == common.DecryptClient(&(l.Enclientpasswd), &(l.Platform)) { 31 | common.RedisClient.HSet(l.Platform+"_"+l.Username, "enclientpasswd", l.Enclientpasswd) 32 | return true 33 | } 34 | } 35 | 36 | //从数据库验证 37 | lp := models.LoginPost{ 38 | Platform: l.Platform, 39 | Username: l.Username, 40 | Password: passwdDb, 41 | } 42 | err, result := services.Login(&lp) 43 | if err == nil && result.Code == 200 { //成功 44 | common.RedisClient.HSet(l.Platform+"_"+l.Username, "enclientpasswd", l.Enclientpasswd) 45 | // fmt.Println(l.Username, "ws.go文件 checkIsLogin 从数据库验证 成功!") 46 | return true 47 | } 48 | 49 | return false 50 | } 51 | 52 | func WsMain(c websocket.Connection) { 53 | c.On("validate", func(message string) { 54 | //权限检查开始。。。start 55 | if c.GetValue(c.ID()) == nil { 56 | //arrayStr := regexp.MustCompile(`(platform=)([a-z0-9]{8})((\-[a-z0-9]{4}){3})(\-[a-z0-9]{12})(&username=)(.*)(&enclientpasswd=)(.*)`).FindStringSubmatch(message) 57 | l := models.LoginCookie{ 58 | Platform: c.Context().GetCookie("platform"), 59 | Username: c.Context().GetCookie("username"), 60 | Enclientpasswd: c.Context().GetCookie("enclientpasswd"), 61 | } 62 | if checkIsLogin(&l) == true { 63 | c.SetValue(c.ID(), l) //通过 64 | c.Emit("validate", "ok") //通过 65 | return 66 | } 67 | //fmt.Println("ws 未通过验证") 68 | c.Emit("validate", "no ok!") 69 | return 70 | } 71 | //权限检查结束。。。end 72 | //fmt.Println("ws 通过验证") 73 | c.Emit("validate", "ok") 74 | return 75 | }) 76 | 77 | c.On("balance", func(message string) { 78 | if c.GetValue(c.ID()) != nil { 79 | enclientpasswd := c.GetValue(c.ID()).(models.LoginCookie).Enclientpasswd 80 | platform := c.GetValue(c.ID()).(models.LoginCookie).Platform 81 | lp := models.LoginPost{ 82 | Platform: platform, 83 | Username: c.GetValue(c.ID()).(models.LoginCookie).Username, 84 | Password: common.DecryptClient(&enclientpasswd, &platform), 85 | } 86 | err, result := services.Login(&lp) 87 | if err == nil && result.Code == 200 { //成功 88 | c.Emit("balance", result.Data.(*models.Members).Coin) 89 | } else { 90 | fmt.Println(result) 91 | } 92 | } 93 | }) 94 | 95 | c.On("getOpenData", func(message string) { 96 | if c.GetValue(c.ID()) == nil { 97 | return 98 | } 99 | c.Leave(message) 100 | c.Join(message) 101 | intMessage, err := strconv.Atoi(message) 102 | if err != nil { 103 | return 104 | } 105 | result := servicesLotto.OpenInfo(intMessage) 106 | c.Emit("getOpenData", &result) 107 | }) 108 | 109 | c.On("logout", func(message string) { 110 | c.Context().RemoveCookie("username") 111 | c.Context().RemoveCookie("enClientPassWd") 112 | c.Context().RemoveCookie("platform") 113 | c.Disconnect() 114 | }) 115 | 116 | c.OnDisconnect(func() { 117 | models.WsMutex.Lock() 118 | delete(models.WsConn, c) 119 | models.WsMutex.Unlock() 120 | }) 121 | } 122 | 123 | func BroadcastSame(Conn *map[websocket.Connection]bool, room *int, gate string, m interface{}) { 124 | for c := range *Conn { 125 | c.To(string(*room)).Emit(gate, m) 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /cp33: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/cp33 -------------------------------------------------------------------------------- /cp33.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/cp33.exe -------------------------------------------------------------------------------- /cp33.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/cp33.sql -------------------------------------------------------------------------------- /dump.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/dump.rdb -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "cp33/models" 5 | _ "cp33/router" 6 | 7 | "github.com/kataras/iris" 8 | "github.com/kataras/iris/middleware/recover" 9 | ) 10 | 11 | func main() { 12 | models.App.Use(recover.New()) 13 | models.App.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed)) 14 | } 15 | -------------------------------------------------------------------------------- /models/init.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | "github.com/go-pg/pg" 8 | ) 9 | 10 | var ( 11 | Db *pg.DB 12 | ) 13 | 14 | func Database() *pg.DB { 15 | return Db 16 | } 17 | 18 | func createSchema(db *pg.DB) error { 19 | return nil 20 | } 21 | 22 | func dodb() { 23 | Db = pg.Connect(&pg.Options{ 24 | Network: "tcp", 25 | Addr: fmt.Sprintf("%s:%s", "127.0.0.1", "5432"), 26 | User: "postgres", 27 | Password: "postgres", 28 | Database: "cp33", 29 | DialTimeout: 3 * time.Second, 30 | ReadTimeout: 3 * time.Second, 31 | WriteTimeout: 3 * time.Second, 32 | PoolSize: 99, 33 | PoolTimeout: time.Second * 3, 34 | IdleTimeout: time.Second * 10, 35 | IdleCheckFrequency: time.Second * 10, 36 | }) 37 | 38 | err := createSchema(Db) 39 | if err != nil { 40 | fmt.Println(err.Error()) 41 | t, _ := time.ParseDuration("5s") 42 | time.Sleep(t) 43 | dodb() 44 | } 45 | } 46 | 47 | func init() { 48 | dodb() 49 | } 50 | -------------------------------------------------------------------------------- /router/router.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/controllers" 6 | "cp33/models" 7 | "cp33/services/lotto" 8 | "strconv" 9 | "sync" 10 | 11 | "github.com/kataras/iris" 12 | "github.com/kataras/iris/websocket" 13 | ) 14 | 15 | func init() { 16 | models.App = iris.New() 17 | models.App.RegisterView(iris.HTML("./templates/default", ".html").Reload(true)) 18 | models.App.StaticWeb("/wap/", "./templates/default/wap/") 19 | 20 | models.App.Get("/", func(ctx iris.Context) { ctx.View("index.html") }) //首页 21 | models.App.Get("/moneyInNotice", controllers.MoneyInNotice) //充值到账通知 接收第三方支付系统的到账通知 22 | models.App.Get("/dataInNotice/{gameID:int}/{issue:int}", controllers.DataInNotice) //采集入库后通知 存储过程太复杂 这个方法简单点,这里是开奖入口 23 | models.App.Get("/apiMyself/{gameID:int}", func(ctx iris.Context) { //给采集客户端使用的接口,用于统一期号等数据,输出最后一期等信息 24 | ctx.Params().Visit(func(name string, value string) { 25 | //ctx.Writef("%s = %s\n", name, value) 26 | gameID, err := strconv.Atoi(value) 27 | if err == nil { 28 | r := servicesLotto.OpenInfo(gameID) 29 | ctx.JSON(r.Data) 30 | } 31 | }) 32 | }) 33 | 34 | indexParty := models.App.Party("/index") 35 | indexParty.Post("/login.html", func(ctx iris.Context) { //提交登陆 36 | b := controllers.Base{ctx} 37 | b.Login() 38 | }) 39 | indexParty.Get("/captcha.html", common.StartCaptcha) //验证码 ...可使用还需要完善 40 | indexParty.Post("/ajaxRegister.html", func(ctx iris.Context) { //提交注册入口 41 | b := controllers.Base{ctx} 42 | b.Signup() 43 | }) 44 | indexParty.Get("/index.html", func(ctx iris.Context) { ctx.View("index/index.html") }) //内容首页导航 45 | indexParty.Get("/login.html", func(ctx iris.Context) { ctx.View("index/login.html") }) //登陆页面 46 | indexParty.Get("/register.html", func(ctx iris.Context) { ctx.View("index/register.html") }) //注册页面 47 | 48 | depositParty := models.App.Party("/deposit") //存款 49 | depositParty.Get("/index.html", func(ctx iris.Context) { ctx.View("deposit/index.html") }) //存款页面 50 | depositParty.Post("/ajaxPayMoney.html", controllers.PostMoneyIn) //post提交支付信息 51 | 52 | mineParty := models.App.Party("/mine") //我的 53 | mineParty.Get("/index.html", func(ctx iris.Context) { ctx.View("mine/index.html") }) //个人中心 54 | mineParty.Get("/betDetail.html", func(ctx iris.Context) { ctx.View("mine/betDetail.html") }) //投注记录详细 55 | mineParty.Get("/betList.html", func(ctx iris.Context) { ctx.View("mine/betList.html") }) //投注记录 56 | mineParty.Get("/accountDetail.html", func(ctx iris.Context) { ctx.View("mine/accountDetail.html") }) //账户明细 57 | mineParty.Post("/ajaxBetList.html", controllers.BetList) //提交查询投注记录入口 58 | mineParty.Post("/ajaxAccountDetail.html", controllers.AccountDetail) //提交查询账户明细入口 59 | 60 | doBetParty := models.App.Party("/doBet") //彩票投注相关 61 | doBetParty.Post("/ajaxBet.html", controllers.PostBet) //投注提交投注入口 62 | 63 | helpParty := models.App.Party("/help") //优惠信息 64 | helpParty.Get("/promotion.html", func(ctx iris.Context) { ctx.View("help/promotion.html") }) //优惠信息页面 65 | 66 | betParty := models.App.Party("/bet") //彩票信息展示及选号页面相关 67 | betParty.Get("/pk10.html", func(ctx iris.Context) { ctx.View("bet/pk10.html") }) //北京pk10投注页面 68 | betParty.Get("/tjssc.html", func(ctx iris.Context) { ctx.View("bet/tjssc.html") }) //天津时时彩投注页面 69 | betParty.Get("/cqssc.html", func(ctx iris.Context) { ctx.View("bet/cqssc.html") }) //重庆时时彩投注页面 70 | betParty.Get("/xjssc.html", func(ctx iris.Context) { ctx.View("bet/xjssc.html") }) //新疆时时彩投注页面 71 | 72 | trendParty := models.App.Party("/trend") //走势图 73 | trendParty.Get("/index.html", func(ctx iris.Context) { ctx.View("trend/index.html") }) //走势图展示页面 74 | trendParty.Post("/ajaxList.html", controllers.PostTrend) //走势图请求入口 75 | 76 | //-----------------我是sb的分界线----websocket start----------------------// 77 | //---------------主要用于推送开奖信息、投注时间、金额变动、短信消息等-----------// 78 | ws := websocket.New(websocket.Config{ 79 | // to enable binary messages (useful for protobuf): 80 | // BinaryMessages: true, 81 | }) 82 | var WsMutex = new(sync.Mutex) 83 | models.App.Get("my_endpoint", ws.Handler()) 84 | ws.OnConnection(func(c websocket.Connection) { 85 | WsMutex.Lock() 86 | models.WsConn[c] = true 87 | WsMutex.Unlock() 88 | controllers.WsMain(c) 89 | }) 90 | //-----------------我是sb的分界线----websocket end------------------------// 91 | } 92 | -------------------------------------------------------------------------------- /services/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/services/.DS_Store -------------------------------------------------------------------------------- /services/lotto/bets.go: -------------------------------------------------------------------------------- 1 | package servicesLotto 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "cp33/services/user" 7 | "fmt" 8 | 9 | "strconv" 10 | "strings" 11 | "time" 12 | 13 | "github.com/go-pg/pg" 14 | ) 15 | 16 | func BetMore(gameId, staticGamePeriod, more *int) *int { //追期 17 | var tmpGamePeriod int 18 | count := new(int) 19 | count = GetCountDataTimes(gameId) 20 | switch *gameId { 21 | case 1, 7: //新疆时时彩 22 | var tNow time.Time 23 | //var a int 24 | tNow = time.Now() 25 | tmpGamePeriod = *staticGamePeriod + *more 26 | tmpGamePeriod3 := common.FindNum(tmpGamePeriod, 1) + common.FindNum(tmpGamePeriod, 2)*10 + common.FindNum(tmpGamePeriod, 3)*100 27 | if tmpGamePeriod3 > (*count) { 28 | for i := 0; (*count) < tmpGamePeriod3; i++ { 29 | tmpGamePeriod3 -= (*count) 30 | tNow = tNow.Add(time.Hour * 24) 31 | } 32 | 33 | tmpTimeGamePeriod, _ := strconv.Atoi(tNow.Format("060102")) 34 | tmpTimeGamePeriod = tmpTimeGamePeriod * 1000 //如:170909*1000 35 | tmpGamePeriod = tmpTimeGamePeriod + tmpGamePeriod3 36 | } 37 | case 9: //pk10 38 | tmpGamePeriod = (*more) + (*staticGamePeriod) 39 | } 40 | return &tmpGamePeriod 41 | } 42 | 43 | func DoBets(us *[]models.Bets, uid *int, ip string) (result models.Result) { 44 | tx, err := models.Db.Begin() 45 | if err != nil { 46 | result = models.Result{Code: 500, Message: err.Error(), Data: nil} 47 | return 48 | } 49 | 50 | m := models.Members{} 51 | _, err = tx.QueryOne(&m, fmt.Sprintf("select coin from members where uid=%v limit 1 for update", *uid)) 52 | //err = tx.Model(&m).Where("uid=?", uid).Returning("coin").Select() 53 | if err != nil { 54 | fmt.Println("DoBets53:", err.Error()) 55 | tx.Rollback() 56 | result = models.Result{Code: 601, Message: "数据库错误!", Data: nil} 57 | return 58 | } 59 | 60 | coin := m.Coin - (*us)[0].Amount*float64((*us)[0].BetMore) 61 | if coin < 0 { 62 | tx.Rollback() 63 | result = models.Result{Code: 601, Message: "余额不足本次消费!", Data: nil} 64 | return 65 | } 66 | _, err = tx.Model(&m).Set("coin=?", strconv.FormatFloat(coin, 'f', 3, 64)).Where("uid=?", *uid).Update() 67 | if err != nil { 68 | fmt.Println("DoBets67:", err.Error()) 69 | tx.Rollback() 70 | result = models.Result{Code: 601, Message: "数据库错误!", Data: nil} 71 | return 72 | } 73 | 74 | var balance float64 75 | for i := 0; i < len(*us); i++ { 76 | err = tx.Insert(&(*us)[i]) 77 | if err != nil { 78 | fmt.Println("DoBets77:", err.Error()) 79 | tx.Rollback() 80 | result = models.Result{Code: 600, Message: "数据库错误!", Data: nil} 81 | return 82 | } 83 | balance = m.Coin - (*us)[i].BetMoney 84 | coinLog := models.CoinLog{ 85 | Uid: (*us)[i].Uid, 86 | Type: (*us)[i].GameId, 87 | OrderId: (*us)[i].Id, 88 | Coin: 0 - (*us)[i].BetMoney, 89 | FreezeCoin: 0.000, 90 | Balance: balance, 91 | LiqType: 6, 92 | ActionUid: 0, 93 | Ctime: (*us)[i].Ctime, 94 | ActionIp: ip, 95 | Info: fmt.Sprintf("%s%v", "购彩-", (*us)[i].GameName), 96 | } 97 | services.CoinLog(&coinLog, tx) //日志 98 | } 99 | 100 | err = tx.Commit() 101 | if err != nil { 102 | fmt.Println(err.Error()) 103 | result = models.Result{Code: 600, Message: "数据库错误!", Data: nil} 104 | return 105 | } 106 | 107 | result = models.Result{Code: 200, Message: "ok", Data: nil} 108 | return 109 | } 110 | 111 | func BetList(bl *models.AjaxBetList, platform, username string) (result models.Result) { 112 | //strSql := fmt.Sprintf("select id,amount,bet_count,bet_prize,bet_reward,ctime,is_win,sub_name,bet_code,play_id,game_id,win_amount,game_period,open_num,status,bet_pos,etime from bets where uid=%v ", services.GetUid(&platform, &username)) 113 | 114 | strSql := fmt.Sprintf("uid=%v and is_delete=false", *services.GetUidViaPlatformAndUsername(&platform, &username)) 115 | switch bl.OrderType { 116 | case 0: //0 全部 117 | break 118 | case 1: //1追号 119 | strSql = fmt.Sprintf(" %s%s", strSql, " and bet_next<>0") 120 | case 2: //中奖 121 | strSql = fmt.Sprintf(" %s%s", strSql, " and is_win=true") 122 | case 3: //3待开奖 123 | strSql = fmt.Sprintf(" %s%s", strSql, " and open_num=''") 124 | case 4: //4撤单 125 | strSql = fmt.Sprintf(" %s%s", strSql, " and status=2") 126 | } 127 | 128 | us := []models.Bets{} 129 | total, err := models.Db.Model(&us).Where(strSql).Limit(20).Offset((bl.PageIndex - 1) * 20).Order("id DESC").SelectAndCount() 130 | if err != nil { 131 | result = models.Result{Code: 500, Message: err.Error(), Data: nil} 132 | return 133 | } 134 | 135 | out := map[string]interface{}{"PageCount": total / 20, "Records": &us} 136 | result = models.Result{Code: 200, Message: "ok", Data: &out} 137 | return 138 | } 139 | 140 | type endBets struct { 141 | bets *[]models.Bets 142 | tx *pg.Tx 143 | strIp string //ip 144 | data string //开奖号码 145 | dataSplit []string //开奖号码split后 146 | etime time.Time 147 | } 148 | 149 | func EndLottery(gameId, period int, strIp string) { //结算 150 | var d *models.Data 151 | d = OpenData(gameId, 0, 1, period) 152 | if d == nil { 153 | fmt.Println("EndLottery 98") 154 | return 155 | } 156 | fmt.Println(d.Type, " ", d.Data, " ", d.Issue) 157 | 158 | var bets []models.Bets 159 | var err error 160 | tx, err := models.Db.Begin() 161 | if err != nil { 162 | fmt.Println("services EndLottery 108," + err.Error()) 163 | return 164 | } 165 | _, err = tx.Query(&bets, fmt.Sprintf("select \"id\",\"uid\",\"game_id\",\"bet_each_money\",\"bet_pos\",\"bet_prize\",\"bet_money\",\"play_id\",\"sub_id\",\"bet_code\",\"bet_more\",\"label\",\"ctime\",\"bet_win_stop\" from bets where game_id=%v and game_period=%v and open_num='' and is_delete=false and status=0 for update", gameId, period)) 166 | if err != nil || len(bets) == 0 { 167 | fmt.Println("没有投注单需要结算.services EndLottery 113 len(bets)=", len(bets)) 168 | tx.Rollback() 169 | return 170 | } 171 | etime, _ := time.ParseInLocation("2006-01-02 15:04:05", time.Now().Format("2006-01-02 15:04:05"), time.Local) //结算时间 172 | dataSplit := strings.Split(d.Data, " ") 173 | endBets := endBets{bets: &bets, tx: tx, strIp: strIp, dataSplit: dataSplit, data: d.Data, etime: etime} 174 | 175 | endBets.betClose1() 176 | 177 | _, err = tx.Model(&bets).Column("open_num", "status", "etime", "win_amount", "is_win").Update() 178 | if err != nil { 179 | fmt.Println("services EndLottery 215:" + err.Error()) 180 | tx.Rollback() 181 | return 182 | } 183 | 184 | err = tx.Commit() 185 | if err != nil { 186 | fmt.Println("services EndLottery 107" + err.Error()) 187 | return 188 | } 189 | return 190 | } 191 | 192 | func (endBets *endBets) betClose1() { 193 | var err error 194 | //var member models.Members 195 | var bet models.Bets 196 | var betRewardMoney float64 //返奖金额 197 | timeStart := time.Now() 198 | for i := 0; i < len(*endBets.bets); i++ { 199 | betRewardMoney = endBets.getWinAmount(&i) //获取中奖金额、返回返点金额 200 | fmt.Println(" 游戏编号:", (*endBets.bets)[i].SubId, (*endBets.bets)[i].GroupName, (*endBets.bets)[i].SubName, " 单号:", (*endBets.bets)[i].Id, " win:", (*endBets.bets)[i].WinAmount, "投注金额:", (*endBets.bets)[i].BetMoney) 201 | 202 | if betRewardMoney > 0 { //返点 203 | endBets.addMoney(&betRewardMoney, &i, 2, "返点") 204 | } 205 | (*endBets.bets)[i].IsWin = false 206 | (*endBets.bets)[i].OpenNum = endBets.data 207 | (*endBets.bets)[i].Status = 1 208 | (*endBets.bets)[i].Etime = endBets.etime 209 | if (*endBets.bets)[i].WinAmount > 0 { //赢了de 210 | (*endBets.bets)[i].IsWin = true 211 | endBets.addMoney(&(*endBets.bets)[i].WinAmount, &i, 5, "中奖") 212 | if (*endBets.bets)[i].BetWinStop == 1 && (*endBets.bets)[i].BetMore > 1 { //选了中奖后停止追号的 及 追了期的...要取消 213 | _, err = endBets.tx.Model(&bet).Set("status=2, etime=?", endBets.etime).Where("label=? and ctime=? and game_id=? and game_period>? and open_num='' and is_delete=false and status=0", (*endBets.bets)[i].Label, (*endBets.bets)[i].Ctime, (*endBets.bets)[i].GameId, (*endBets.bets)[i].GamePeriod).Update() 214 | if err != nil { 215 | fmt.Println(err.Error()) 216 | endBets.tx.Rollback() 217 | return 218 | } 219 | endBets.addMoney(&(*endBets.bets)[i].BetMoney, &i, 4, "撤单") 220 | } 221 | } 222 | 223 | } //完成len(bets) 224 | 225 | fmt.Println("endbets ok ,speed time:", time.Now().Sub(timeStart)) 226 | 227 | } 228 | 229 | func (endBets *endBets) addMoney(money *float64, i *int, liqType int, info string) { 230 | balance := services.CoinChangeByUid(&(*endBets.bets)[*i].Uid, money, endBets.tx) 231 | coinLog := models.CoinLog{ 232 | Uid: (*endBets.bets)[*i].Uid, 233 | Type: (*endBets.bets)[*i].GameId, 234 | OrderId: (*endBets.bets)[*i].Id, 235 | Coin: *money, 236 | FreezeCoin: 0.000, 237 | Balance: *balance, 238 | LiqType: liqType, 239 | ActionUid: 0, 240 | Ctime: endBets.etime, 241 | ActionIp: endBets.strIp, 242 | Info: fmt.Sprintf("%s%v", info, (*endBets.bets)[*i].Id), 243 | } 244 | services.CoinLog(&coinLog, endBets.tx) 245 | } 246 | -------------------------------------------------------------------------------- /services/lotto/dataTimes.go: -------------------------------------------------------------------------------- 1 | package servicesLotto 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "strconv" 7 | "time" 8 | 9 | "github.com/go-redis/cache" 10 | ) 11 | 12 | func GetCountDataTimes(t *int) *int { 13 | m := models.DataTime{} 14 | var c int 15 | err := common.Codec.Get("Count_"+strconv.Itoa(*t), &c) 16 | if err == nil { 17 | return &c 18 | } 19 | var n int 20 | n, err = models.Db.Model(&m).Where("type=?", *t).Count() 21 | if err == nil && n > 0 { 22 | common.Codec.Set(&cache.Item{ 23 | Key: "Count_" + strconv.Itoa(*t), 24 | Object: n, 25 | Expiration: time.Minute, 26 | }) 27 | } 28 | return &n 29 | } 30 | -------------------------------------------------------------------------------- /services/lotto/lottery.go: -------------------------------------------------------------------------------- 1 | package servicesLotto 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | // "fmt" 7 | "strconv" 8 | "time" 9 | 10 | "github.com/go-redis/cache" 11 | ) 12 | 13 | func GetLotteryViaGameId(gameId int) (err error, lotto models.Lottery) { 14 | strGameId := strconv.Itoa(gameId) 15 | err = common.Codec.Get("Db_lottery_id="+strGameId, &lotto) 16 | if err == nil { 17 | return 18 | } 19 | err = models.Db.Model(&lotto).Where("id=?", gameId).Limit(1).Select() 20 | if err == nil && lotto.Id > 0 { 21 | common.Codec.Set(&cache.Item{ 22 | Key: "Db_lottery_id=" + strGameId, 23 | Object: lotto, 24 | Expiration: time.Hour, 25 | }) 26 | } 27 | return 28 | } 29 | -------------------------------------------------------------------------------- /services/lotto/openInfo.go: -------------------------------------------------------------------------------- 1 | package servicesLotto 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "fmt" 7 | "math" 8 | "strconv" 9 | "time" 10 | 11 | "github.com/go-redis/cache" 12 | ) 13 | 14 | //t为type彩种 o为offset issue期号 15 | func OpenData(t, o, l, issue int) *models.Data { 16 | strt := strconv.Itoa(t) 17 | stro := strconv.Itoa(o) 18 | strl := strconv.Itoa(l) 19 | strIssue := strconv.Itoa(issue) 20 | var err error 21 | u := models.Data{} 22 | 23 | err = common.Codec.Get("OpenData,t="+strt+"o="+stro+"l="+strl+"issue="+strIssue, &u) 24 | if err == nil { 25 | return &u 26 | } 27 | 28 | if issue <= 0 { 29 | err = models.Db.Model(&u).Where("type=?", t).Order("issue DESC").Limit(l).Select() 30 | } else { 31 | err = models.Db.Model(&u).Where("type=? and issue=?", t, issue).Order("issue DESC").Limit(l).Offset(o).Select() 32 | } 33 | 34 | if err == nil && u.Id > 0 { //存在 成功 35 | common.Codec.Set(&cache.Item{ 36 | Key: "OpenData,t=" + strt + "o=" + stro + "l=" + strl + "issue=" + strIssue, 37 | Object: u, 38 | Expiration: time.Second, 39 | }) 40 | return &u 41 | } 42 | 43 | return nil 44 | } 45 | 46 | func OpenInfo(t int) *models.Result { // 上一期开奖信息及当前可购买期号 47 | var err error 48 | var result models.Result 49 | lastPeriod := 0 50 | lastOpen := "" //上一期开奖号码 51 | currentPeriod := 0 52 | 53 | var d *models.Data 54 | d = OpenData(t, -1, 1, -1) 55 | if d == nil { 56 | fmt.Println("OpenInfo 56") 57 | lastPeriod = 0 58 | } else { 59 | lastOpen = d.Data 60 | lastPeriod = d.Issue //数据库内有数据的期号为上一期数据 即有开奖数据的那期绝对不能投了 61 | } 62 | 63 | err, lotto := GetLotteryViaGameId(t) 64 | if err != nil { 65 | return &models.Result{Code: 404, Message: "系统错误", Data: nil} 66 | } 67 | var delaySecond int = lotto.DelaySecond //截止投注前n秒 68 | 69 | dt := models.DataTime{} 70 | sTime := time.Now().Add(time.Second * time.Duration(delaySecond)).Format("15:04:05") //数据库检索时间 71 | 72 | //使用时间推算当前期期号,以此为准 start 73 | err = models.Db.Model(&dt).Where("type=? and action_time>?", t, sTime).Order("action_no").Limit(1).Select() 74 | if !(err == nil && dt.Type >= 0) { 75 | return &models.Result{Code: 404, Message: "系统错误", Data: nil} 76 | } 77 | switch t { 78 | case 1, 7, 4: //重庆时时彩、西藏时时彩、天津时时彩 79 | tmpCurrentPeriod, _ := strconv.Atoi(time.Now().Format("060102")) 80 | tmpCurrentPeriod = tmpCurrentPeriod * 1000 81 | currentPeriod = tmpCurrentPeriod + dt.ActionNo 82 | case 9: //pk10 83 | startPeriod := 640250 //2017-09-17 09:07 84 | startTime, _ := time.ParseInLocation("2006-01-02 15:04:05", "2017-09-17 00:00:00", time.Local) 85 | strAddPeriod := strconv.FormatFloat(math.Trunc(time.Now().Sub(startTime).Hours()/24)*179, 'g', 7, 64) 86 | intAddPeriod, _ := strconv.Atoi(strAddPeriod) 87 | currentPeriod = startPeriod + intAddPeriod + dt.ActionNo - 1 88 | } 89 | //使用时间推算当前期期号,以此为准 end 90 | 91 | periodCount := GetCountDataTimes(&t) //每天有几期 92 | lastPeriod = currentPeriod - 1 93 | switch t { //防止上去出现000期 94 | case 1, 7, 4: //重庆时时彩、西藏时时彩、天津时时彩 95 | tempNum := common.FindNum(lastPeriod, 1) + common.FindNum(lastPeriod, 2)*10 + common.FindNum(lastPeriod, 3)*100 96 | if tempNum == 0 { 97 | tmpLastPeriod, _ := strconv.Atoi(time.Now().AddDate(0, 0, -1).Format("060102")) 98 | tmpLastPeriod = tmpLastPeriod * 1000 99 | lastPeriod = tmpLastPeriod + (*periodCount) 100 | } 101 | } 102 | 103 | var timeleft int64 //剩余投注时间 104 | var ttActionTime time.Time 105 | ttActionTime, err = time.ParseInLocation("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" "+dt.ActionTime, time.Local) 106 | if err != nil { 107 | timeleft = 100000000 108 | } 109 | timeleft = ttActionTime.Unix() - time.Now().Local().Unix() - int64(delaySecond) 110 | 111 | if d != nil && d.Issue != lastPeriod { //d.Issue为基于开奖数据得到的期号 lastPeriod基于时间推算得到的期号 以后者为准,这个if为了减少一个数据库请求 112 | d = OpenData(t, 0, 1, lastPeriod) 113 | if d == nil { 114 | lastOpen = "" 115 | } else { 116 | lastOpen = d.Data 117 | } 118 | } 119 | 120 | out := (models.OpenInfo{Last_period: lastPeriod, Last_open: lastOpen, Current_period: currentPeriod, Current_period_status: "截止", Timeleft: timeleft, Type: t}) 121 | result = models.Result{Code: 200, Message: "ok", Data: &out} 122 | 123 | return &result 124 | } 125 | -------------------------------------------------------------------------------- /services/lotto/played.go: -------------------------------------------------------------------------------- 1 | package servicesLotto 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "strconv" 7 | "time" 8 | 9 | "github.com/go-redis/cache" 10 | ) 11 | 12 | func Played(platformId, intPlayId, intSubId int) *models.Played { 13 | played := models.Played{} 14 | err := common.Codec.Get("Db_played_subid="+strconv.Itoa(intSubId)+"platformId="+strconv.Itoa(platformId), &played) 15 | if err == nil { 16 | return &played 17 | } 18 | err = models.Db.Model(&played).Where("group_id=? and platform_id=? and sub_id=?", intPlayId, platformId, intSubId).Limit(1).Select() 19 | if err == nil && played.Id > 0 { 20 | common.Codec.Set(&cache.Item{ 21 | Key: "Db_played_subid=" + strconv.Itoa(intSubId) + "platformId=" + strconv.Itoa(platformId), 22 | Object: played, 23 | Expiration: time.Hour, 24 | }) 25 | } 26 | return &played 27 | } 28 | -------------------------------------------------------------------------------- /services/lotto/playedGroup.go: -------------------------------------------------------------------------------- 1 | package servicesLotto 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | 7 | "strconv" 8 | "time" 9 | 10 | "github.com/go-redis/cache" 11 | ) 12 | 13 | func PlayedGroup(intPlayId int) *models.PlayedGroup { 14 | playedGroup := models.PlayedGroup{} 15 | err := common.Codec.Get("Db_playedgroup="+strconv.Itoa(intPlayId), &playedGroup) 16 | if err == nil { 17 | return &playedGroup 18 | } 19 | err = models.Db.Model(&playedGroup).Where("type=? and enable=true", intPlayId).Limit(1).Select() 20 | if err == nil && playedGroup.Id > 0 { 21 | common.Codec.Set(&cache.Item{ 22 | Key: "Db_playedgroup=" + strconv.Itoa(intPlayId), 23 | Object: playedGroup, 24 | Expiration: time.Hour, 25 | }) 26 | } 27 | return &playedGroup 28 | } 29 | -------------------------------------------------------------------------------- /services/lotto/trend.go: -------------------------------------------------------------------------------- 1 | package servicesLotto 2 | 3 | import ( 4 | "cp33/models" 5 | // "errors" 6 | // "fmt" 7 | // "strconv" 8 | // "time" 9 | ) 10 | 11 | func Trend(t *models.Trend) (result models.Result) { //未完成 12 | us := []models.Data{} 13 | err := models.Db.Model(&us).Where("type=", t.Gid).Order("issue DESC").Offset(t.Count).Limit(t.Count).Select() 14 | if err != nil { 15 | result = models.Result{Code: 500, Message: err.Error(), Data: nil} 16 | return 17 | } 18 | 19 | for i := 0; i < len(us); i++ { 20 | 21 | result = models.Result{Code: 200, Message: "ok", Data: &us} 22 | return 23 | } 24 | 25 | // err = models.Db.Model(&us).Where(strSql).Limit(20).Offset((bl.PageIndex - 1) * 20).Order("id DESC").Select() 26 | // if err != nil { 27 | // result = models.Result{Code: 500, Message: err.Error(), Data: nil} 28 | // return 29 | // } 30 | // out := map[string]interface{}{"PageCount": total / 20, "Records": &us} 31 | // result = models.Result{Code: 200, Message: "ok", Data: &out} 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /services/pingtais/pingtais.go: -------------------------------------------------------------------------------- 1 | package servicesPingtais 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "time" 7 | 8 | "github.com/go-redis/cache" 9 | ) 10 | 11 | func GetPlatformId(platform *string) *int { 12 | u := models.Pingtai{} 13 | var id int 14 | err := common.Codec.Get("GetPlatformId="+(*platform), &id) 15 | if err == nil { 16 | return &id 17 | } 18 | err = models.Db.Model(&u).Where("platform=?", *platform).Limit(1).Returning("uid").Select() 19 | if err == nil && u.Id >= 1 { //存在 20 | common.Codec.Set(&cache.Item{ 21 | Key: "GetPlatformId=" + (*platform), 22 | Object: u.Id, 23 | Expiration: time.Hour, 24 | }) 25 | return &u.Id 26 | } 27 | 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /services/user/coin.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "cp33/models" 5 | "fmt" 6 | 7 | "github.com/go-pg/pg" 8 | ) 9 | 10 | func CoinChangeByUid(uid *int, coin *float64, tx *pg.Tx) *float64 { 11 | var member models.Members 12 | _, err := tx.Model(&member).Set("coin=coin+?", coin).Where("uid=?", *uid).Returning("coin").Update() 13 | if err != nil { 14 | fmt.Println(err.Error()) 15 | tx.Rollback() 16 | z := float64(0.000) 17 | return &z 18 | } 19 | return &member.Coin 20 | } 21 | -------------------------------------------------------------------------------- /services/user/coinLog.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "cp33/models" 5 | 6 | "fmt" 7 | 8 | "github.com/go-pg/pg" 9 | ) 10 | 11 | func CoinLog(coinLog *models.CoinLog, tx *pg.Tx) { 12 | err := tx.Insert(coinLog) 13 | if err != nil { 14 | fmt.Println(err.Error()) 15 | tx.Rollback() 16 | return 17 | } 18 | } 19 | 20 | func AccountDetail(pAD *models.PostAccountDetail, platform, username string) (result models.Result) { 21 | strSql := fmt.Sprintf("uid=%v ", *GetUidViaPlatformAndUsername(&platform, &username)) 22 | 23 | switch pAD.DataType { 24 | case 0: //0 全部 25 | break 26 | default: 27 | strSql = fmt.Sprintf(" %s%s%v", strSql, " and liq_type=", pAD.DataType) 28 | } 29 | 30 | us := []models.CoinLog{} 31 | total, err := models.Db.Model(&us).Where(strSql).Limit(20).Offset((pAD.PageIndex - 1) * 20).Order("id DESC").SelectAndCount() 32 | if err != nil { 33 | result = models.Result{Code: 500, Message: err.Error(), Data: nil} 34 | return 35 | } 36 | 37 | out := map[string]interface{}{"RecordCount": len(us), "PageCount": total / 20, "Records": &us} 38 | result = models.Result{Code: 200, Message: "ok", Data: &out} 39 | return 40 | } 41 | -------------------------------------------------------------------------------- /services/user/login.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "cp33/common" 5 | "cp33/models" 6 | "cp33/services/pingtais" 7 | "errors" 8 | 9 | "time" 10 | 11 | "github.com/go-redis/cache" 12 | ) 13 | 14 | func Login(lp *models.LoginPost) (err error, result models.Result) { 15 | u := models.Members{} 16 | //fmt.Println((*lp).Platform) 17 | err = models.Db.Model(&u).Where("platform_id=? and username=? and password=?", *servicesPingtais.GetPlatformId(&(*lp).Platform), (*lp).Username, (*lp).Password).Limit(1).Select() 18 | 19 | if err == nil && u.Uid >= 0 { //存在 成功 20 | result = models.Result{Code: 200, Message: "ok", Data: &u} 21 | return 22 | } else if err != nil { 23 | result = models.Result{Code: 400, Message: err.Error(), Data: nil} 24 | return 25 | } else { 26 | err = errors.New("记录不存在!") 27 | result = models.Result{Code: 404, Message: "error!", Data: nil} 28 | return 29 | } 30 | 31 | return 32 | } 33 | 34 | func GetUidViaPlatformAndUsername(platform, username *string) *int { 35 | u := models.Members{} 36 | var uid int 37 | err := common.Codec.Get("GetUidViaPlatformAndUsername_"+(*platform)+"_"+(*username), &uid) 38 | if err == nil { 39 | return &uid 40 | } 41 | err = models.Db.Model(&u).Where("platform_id=? and username=?", *servicesPingtais.GetPlatformId(platform), username).Limit(1).Returning("uid").Select() 42 | if err == nil && u.Uid >= 0 { //存在 成功 43 | common.Codec.Set(&cache.Item{ 44 | Key: "GetUidViaPlatformAndUsername_" + (*platform) + "_" + (*username), 45 | Object: u.Uid, 46 | Expiration: time.Hour, 47 | }) 48 | return &(u.Uid) 49 | } 50 | 51 | return nil 52 | } 53 | 54 | func GetUidViaUuid(uuid *string) *int { 55 | u := models.Members{} 56 | var uid int 57 | err := common.Codec.Get("GetUidViaUuid_"+(*uuid), &uid) 58 | if err == nil { 59 | return &uid 60 | } 61 | err = models.Db.Model(&u).Where("uuid=?", *uuid).Limit(1).Returning("uid").Select() 62 | if err == nil && u.Uid >= 0 { //存在 成功 63 | common.Codec.Set(&cache.Item{ 64 | Key: "GetUidViaUuid_" + (*uuid), 65 | Object: u.Uid, 66 | Expiration: time.Hour, 67 | }) 68 | return &(u.Uid) 69 | } 70 | 71 | return nil 72 | } 73 | 74 | func GetParentIdViaUid(uid *int) *int { 75 | u := models.Members{} 76 | var parentId int 77 | err := common.Codec.Get("GetParentIdViaUid_"+string(*uid), &parentId) 78 | if err == nil { 79 | return &parentId 80 | } 81 | err = models.Db.Model(&u).Where("uid=?", *uid).Limit(1).Returning("uid").Select() 82 | if err == nil && u.Uid >= 0 { //存在 成功 83 | common.Codec.Set(&cache.Item{ 84 | Key: "GetParentIdViaUid_" + string(*uid), 85 | Object: u.ParentId, 86 | Expiration: time.Hour, 87 | }) 88 | return &(u.ParentId) 89 | } 90 | 91 | return nil 92 | } 93 | -------------------------------------------------------------------------------- /services/user/moneyIn.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "cp33/models" 5 | "fmt" 6 | // "fmt" 7 | 8 | "time" 9 | 10 | //"github.com/go-pg/pg" 11 | ) 12 | 13 | func PostMoneyIn(uid *int, pmi *models.PostMoneyIn) (result models.Result) { 14 | //之前提交的同1通道同金额的充值还未完成的10分钟内不可重复提交 15 | tD, _ := time.ParseInLocation("2006-01-02 15:04:05", time.Now().Add(-time.Minute*10).Format("2006-01-02 15:04:05"), time.Local) 16 | //tt, _ := time.Parse("2006-01-02 15:04:05", time.Now().Add(-time.Minute*10).Format("2006-01-02 15:04:05")) 17 | // fmt.Println(tt) 18 | var mi models.MoneyIns 19 | err := models.Db.Model(&mi).Where("is_delete=false and uid=? and channel=? and money=? and pay_account=? and success=false and ctime 0 { 27 | result = models.Result{Code: 501, Message: "你之前10分钟内提交的充值还未支付请勿再次提交!", Data: nil} 28 | return 29 | } 30 | 31 | ctime, _ := time.ParseInLocation("2006-01-02 15:04:05", time.Now().Format("2006-01-02 15:04:05"), time.Local) 32 | mi = models.MoneyIns{ 33 | Uid: *uid, 34 | Channel: (*pmi).Channel, 35 | Money: (*pmi).Money, 36 | PayAccount: (*pmi).PayAccount, 37 | IsDelete: false, 38 | Success: false, 39 | Ctime: ctime, 40 | } 41 | err = models.Db.Insert(&mi) 42 | if err != nil { 43 | result = models.Result{Code: 500, Message: err.Error(), Data: nil} 44 | return 45 | } 46 | //models.Db.Delete(&mi) 47 | result = models.Result{Code: 200, Message: "登陆你的支付宝进行支付", Data: &mi} 48 | return 49 | } 50 | -------------------------------------------------------------------------------- /services/user/signup.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "container/list" 5 | "cp33/models" 6 | "cp33/services/pingtais" 7 | "fmt" 8 | "time" 9 | 10 | "github.com/go-pg/pg" 11 | ) 12 | 13 | func Signup(s *models.SignupPost, ip string) (err error, result models.Result) { 14 | uOne := models.Members{} 15 | platformId := *servicesPingtais.GetPlatformId(&(*s).Platform) 16 | err = models.Db.Model(&uOne).Where("platform_id=? and username=?", platformId, (*s).Username).Limit(1).Select() 17 | if err == nil && uOne.Uid >= 0 { //账号存在 18 | result = models.Result{Code: 201, Message: fmt.Sprintf("账号'%s'已经存在!", (*s).Username), Data: nil} 19 | return 20 | } 21 | 22 | var parentId int 23 | var uid *int 24 | arrayParents := make([]int, 0) 25 | tmpParentId := GetUidViaUuid(&(*s).Uuid) 26 | 27 | if tmpParentId != nil { 28 | parentId = *tmpParentId 29 | l := list.New() 30 | l.PushBack(parentId) 31 | *uid = parentId 32 | uid = GetParentIdViaUid(uid) 33 | for uid != nil { 34 | l.PushBack(*uid) 35 | uid = GetParentIdViaUid(uid) 36 | } 37 | for l.Len() > 0 { 38 | i1 := l.Back() 39 | l.Remove(i1) 40 | value, ok := i1.Value.(int) 41 | if !ok { 42 | fmt.Println("It's not ok for type int") 43 | return 44 | } 45 | arrayParents = append(arrayParents, value) 46 | } 47 | } 48 | fmt.Println((*s).Password) 49 | // ce45035d-317e-4831-afe1-05444d9b040a 50 | u := models.Members{ 51 | PlatformId: platformId, 52 | Username: (*s).Username, 53 | Password: (*s).Password, 54 | ParentId: parentId, 55 | Parents: arrayParents, 56 | Type: 1, //会员 57 | RegIp: ip, 58 | RegTime: time.Now().Format("2006-01-02 15:04:05"), 59 | UpdateTime: time.Now().Format("2006-01-02 15:04:05"), 60 | } 61 | 62 | var tx *pg.Tx 63 | tx, err = models.Db.Begin() 64 | if err != nil { 65 | result = models.Result{Code: 500, Message: err.Error(), Data: nil} 66 | return 67 | } 68 | 69 | //var stmt *pg.Stmt 70 | err = tx.Insert(&u) 71 | if err != nil { 72 | fmt.Println("services Signup 72" + err.Error()) 73 | tx.Rollback() 74 | result = models.Result{Code: 600, Message: "数据库错误!", Data: &u} 75 | return 76 | } 77 | 78 | err = tx.Commit() 79 | if err != nil { 80 | fmt.Println("services Signup 80" + err.Error()) 81 | result = models.Result{Code: 600, Message: "数据库错误!", Data: &u} 82 | return 83 | } 84 | result = models.Result{Code: 200, Message: "ok,注册成功!", Data: &u} 85 | return 86 | } 87 | -------------------------------------------------------------------------------- /templates/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/.DS_Store -------------------------------------------------------------------------------- /templates/default/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/.DS_Store -------------------------------------------------------------------------------- /templates/default/help/promotion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 47 | 48 | 活动 49 | 50 |
51 |
52 |
53 | 54 |
55 |

活动

56 |
57 |
58 |
59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 优惠活动 67 | 68 | 96 | 97 | 98 |
99 |
100 | 101 |

充值赠送1%优惠活动

活动时间:2017-07-15

银行转账充值赠送1%优惠活动

102 |

下载手机APP

活动时间:2016-10-10

下载手机APP请访问633.cc

103 |

多样化彩种

活动时间:2016-08-08

彩票33彩种现已全部开放

104 |

注册即送8元彩金

活动时间:2016-08-08

下载手机APP注册会员送8元彩金

105 |

加入彩票33,天天添彩添财!

活动时间:2016-08-08

加入彩票33,天天添彩添财!

106 |

支付方式

活动时间:2016-08-08

支持支付宝,微信,银行转账,在线支付

107 |
108 | 109 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /templates/default/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 首页 9 | 38 | 39 | 40 | 41 |
42 | 45 |
46 |

温馨提示:WAP手机端直接点击链接按钮访问

47 | 48 |
推荐您使用手机APP购彩,请选择下载
49 |
50 |
51 |

版权所有:2009-2017©彩票

52 |
53 | 54 | 57 | 58 | 68 | 69 | 70 | 71 | 96 | 97 | 98 | 99 | 104 | 105 | 122 | -------------------------------------------------------------------------------- /templates/default/index/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 47 | 48 | 53 | 57 | 登录 注册 58 | 59 | 60 |
61 |
62 |
63 | 64 |
65 |

登录

66 |
67 |
68 | 69 |
70 | 81 |
在线客服忘记密码
82 | 83 | 84 | 85 |
86 | 87 | 88 | 89 | 90 | 91 | 116 | 117 | 120 | 121 | 131 | 132 | 133 | 134 | 135 | 160 | 161 | 162 | 163 | 164 | 321 | -------------------------------------------------------------------------------- /templates/default/index/register.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 46 | 47 | 52 | 62 | 67 | 注册账号 68 | 69 | 70 |
71 |
72 |
73 | 74 |
75 |

快速注册

76 |
77 |
78 |
79 |
80 | 99 |
100 |
101 | 《法律声明》 104 |
105 | 106 | 107 | 108 | 109 | 免费试玩 110 |
111 |
在线客服已有帐号,直接登录
112 |
1.用户帐号请输入4-16个英文字母或数字,不能用中文。
113 |
2.登录密码请输入6-12个英文字母或数字。
114 |
115 | 116 | 117 | 120 | 121 | 131 | 132 | 133 | 134 | 135 | 162 | 163 | 164 | 165 | 166 | 291 | -------------------------------------------------------------------------------- /templates/default/mine/accountDetail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 52 | 账户明细 53 | 54 | 55 |
56 |
57 |
58 | 59 |
60 |

61 |
62 |
全部类型
63 |
64 |

65 |
66 | 67 |
68 |
69 |
70 | 71 |
72 |
73 | 77 |
78 |
    79 | 83 |
84 | 85 |
86 |
87 |
88 | 89 | 90 | 107 | 108 | 109 | 110 | 111 | 136 | 137 | 140 | 141 | 151 | 152 | 153 | 154 | 179 | 180 | 181 | 182 | 183 | 189 | 190 | 201 | 202 | 207 | 208 | 214 | 215 | 220 | 221 | 307 | -------------------------------------------------------------------------------- /templates/default/wap/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/.DS_Store -------------------------------------------------------------------------------- /templates/default/wap/statics/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/.DS_Store -------------------------------------------------------------------------------- /templates/default/wap/statics/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/css/.DS_Store -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/css/index.css: -------------------------------------------------------------------------------- 1 | .header { background: #d91d36; width: 100%; height: 44px; overflow: hidden; position:fixed; z-index: 100; top: 0; left: 0; right: 0; } 2 | /*-- index cai33 --*/ 3 | .header #header-left { background: url(../images/index-img/gren.png) no-repeat; background-size:25px 23.5px; width:25px; height:23.5px; display: block; margin-top: 3px; } 4 | .header #header-left, .header #reveal-right { color: #fff; display: block; text-indent: -99999px; border: none; position: absolute; cursor: pointer; outline: none; } 5 | .header-title {background: url(../images/index-img/logo.png) no-repeat; width:80px; height:20px;background-size:80px 20px; display: inline-block; margin:7px auto; text-align: center; } 6 | .header-head{ background: url(../images/index-img/zhuce.png) no-repeat;line-height: 44px; width: 52px; height:35px; background-size: 42px 27px; position: absolute; right: 0; top: 8px; z-index: 9;} 7 | .header .login{ background: url(../images/index-img/login.png) no-repeat; line-height: 44px; width: 52px; height:35px; background-size: 42px 27px; margin-top: 1px; position: fixed; } 8 | .header-logo{line-height: 44px;padding:6px 12px;overflow: hidden;} 9 | .header-banner img { max-width: 100%; } 10 | .bulletin { height: 40px; line-height: 40px; border-bottom: 1px solid #ddd; position: relative; overflow: hidden; } 11 | .bulletin marquee { position:absolute; left: 35px; z-index: 9; width: 82%;white-space:nowrap;} 12 | 13 | .bull-text { width:95%; float: left; position: absolute; padding: 0 40px; box-sizing: border-box; font-size: 14px; white-space:nowrap; overflow: hidden; } 14 | .bull-ila { background: url(../images/index-img/ilabandex_.png) no-repeat; background-size: 15px 15px; width:15px; height: 15px; float: left; margin:12px 0 0 15px; } 15 | .bull-arrow { background: url(../../images/index_pic_08.png) no-repeat; background-size: 8px 12px; width:8px; height: 12px; float: right; margin:12px 15px 0 0; } 16 | 17 | .index-menu ul li { width: 25%; float: left; text-align: center; } 18 | .index-menu ul li a { display: block; border-right:1px solid #e8e8e8; } 19 | .index-menu ul li a:first-child { border-left: 0; } 20 | .index-menu ul li a:last-child { border-right: 0; } 21 | .index-menu ul li a img { max-width: 100%; } 22 | 23 | .hot-tit-img{ background: url(../images/index-img/index_heng.png) no-repeat;margin-top:14px;padding-left:8px; background-size: 2px 13px;width: 2px; height: 13px;display: block;float: left; } 24 | .hot-tit-text{color: #000;min-font-size:18px; } 25 | .hot-new-tit { line-height: 40px; padding-left: 10px;background: #fff;border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; } 26 | .hot-tit a { color: #000;min-font-size:18px;} 27 | .hot-tit a .bull-arrow { margin-left: 10px; } 28 | .null-bg{background: #f4f4f4;height: 10px;border-bottom: 1px solid#ddd;} 29 | .null-top{background: #f4f4f4;height: 10px;border-top: 1px solid#ddd;} 30 | .new-list-img{float: left;width: 44%;} 31 | .hot-list-text{float: left;width: 54%;margin-top: 13%;} 32 | .host-list-erect ul li:nth-child(odd) .hot-list-text { border-right:1px solid #ececec; } 33 | 34 | .list-text{font-size: 100%;color: #000;} 35 | .border-none{border-top: none;} 36 | .list-text-2{font-size: 80%;color: #666;;} 37 | .host-list-erect ul li .hot-icon { float: left; padding:13px;} 38 | .erect-right { float: left; margin-top: 13px; width: 75% } 39 | .erect-right .last-time { color:#eb2929; line-height: 24px; } 40 | .erect-right .hot-text { color: #000 } 41 | .host-list-erect{overflow: hidden;} 42 | .host-list-erect ul li { overflow: hidden;width: 50%;float: left; border-bottom: 1px solid #ddd; } 43 | .host-list-erect ul li a { display: block; overflow: hidden;} 44 | .host-list-erect ul li .hot-icon { float: left; padding:13px;} 45 | .host-list-erect ul li .hot-icon img { mx-width: 100% } 46 | /*.erect-right { float: left; margin-top: 13px; width: 75% }*/ 47 | /*.erect-right .last-time { color:#eb2929; line-height: 24px; }*/ 48 | /*.erect-right .hot-text { color: #000 }*/ 49 | 50 | 51 | .news-tit { padding: 10px;background: #f5f5f5;border-bottom:1px solid #e8e8e8;} 52 | .news-tit a{ max-width: 100%;color: #000;min-font-size:30px; } 53 | 54 | 55 | 56 | /*.hot-tit { line-height: 40px; padding-left: 10px;background: #f5f5f5;border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; }*/ 57 | /*.hot-tit a { color: #000;min-font-size:18px;}*/ 58 | /*.hot-tit a .bull-arrow { margin-left: 10px; }*/ 59 | 60 | .hot-lot { overflow: hidden;background: #fff; } 61 | .hot-lot ul li { width: 33.33%; float: left; text-align: center;} 62 | .hot-lot ul li a { display: block; font-size:95%; padding-bottom: 5px;cursor:pointer; color: #000;} 63 | .hot-lot ul li .hot-icon img { max-width: 100%; padding:10px 25px 0; box-sizing: border-box;} 64 | .hot-lot ul li a { border-bottom: 1px solid #dcdcdc; border-right: 1px solid #ececea;} 65 | 66 | 67 | /* æ·»åŠ iPad的两个尺寸 768å’Œ1024 字体大小 */ 68 | @media only screen and (min-width:768px ) { 69 | .header { height: 64px !important;} 70 | .header .login { background-size: 50px 30px !important; margin-top: 10px !important;} 71 | .header-head { background-size: 50px 30px !important; top: 18px; right: 10px;} 72 | .header-title { background-size: 120px 35px !important; width:120px !important; height: 35px !important; margin: 12px auto !important;} 73 | .list-text { 74 | font-size: 160%; 75 | } 76 | .hot-tit-text { 77 | font-size: 160% !important; 78 | } 79 | .list-text-2 { 80 | font-size: 120%; 81 | } 82 | .news-info ul li { 83 | line-height: 30px !important; 84 | font-size: 180%; 85 | } 86 | .lottery-list ul li a .hot-text { font-size: 160% !important;} 87 | .lottery-list ul li a .last-time { font-size: 120% !important;} 88 | .pol-icon { background-size: 15px 15px; width: 15px; height: 15px;} 89 | 90 | .bulletin marquee { 91 | font-size: 160%; 92 | } 93 | .host-list-erect ul li { 94 | width: 45% !important; 95 | padding-left: 5%; 96 | } 97 | .hot-new-tit { 98 | padding-left: 36px !important; 99 | } 100 | .scorllmain-content { 101 | padding-bottom: 102px !important; 102 | padding-top: 64px !important; 103 | } 104 | .hot-tit-img { 105 | margin-top: 10px; 106 | background-size: 2px 20px; 107 | height: 20px; 108 | } 109 | .bull-ila { 110 | background-size: 20px 20px; 111 | width: 20px; 112 | height: 20px; 113 | margin: 9px 0 0 15px !important; 114 | } 115 | .bull-arrow { 116 | background-size:12px 16px; 117 | width: 12px; 118 | height: 16px; 119 | margin: 9px 15px 0 0 !important; 120 | } 121 | } 122 | @media only screen and (min-width:1024px ) { 123 | .list-text { 124 | font-size: 160%; 125 | } 126 | .hot-tit-text { 127 | font-size: 160% !important; 128 | } 129 | .list-text-2 { 130 | font-size: 120%; 131 | } 132 | .news-info ul li { 133 | line-height: 30px !important; 134 | font-size: 180%; 135 | } 136 | .lottery-list ul li a .hot-text { font-size: 160% !important;} 137 | .lottery-list ul li a .last-time { font-size: 120% !important;} 138 | .pol-icon { background-size: 15px 15px; width: 15px; height: 15px;} 139 | 140 | .bulletin marquee { 141 | font-size: 160%; 142 | } 143 | .host-list-erect ul li { 144 | width: 45% !important; 145 | padding-left: 5%; 146 | } 147 | .hot-new-tit { 148 | padding-left: 36px !important; 149 | } 150 | .scorllmain-content { 151 | padding-bottom: 104px !important; 152 | } 153 | .hot-tit-img { 154 | margin-top: 10px; 155 | background-size: 2px 20px; 156 | height: 20px; 157 | } 158 | .bull-ila { 159 | background-size: 20px 20px; 160 | width: 20px; 161 | height: 20px; 162 | margin: 19px 0 0 15px !important; 163 | } 164 | .bull-arrow { 165 | background-size:12px 16px; 166 | width: 12px; 167 | height: 16px; 168 | margin: 19px 0 0 15px !important; 169 | } 170 | } -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/.DS_Store -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/5.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/51.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/9.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/blank_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/blank_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/gren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/gren.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/ilabandex_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/ilabandex_.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/index_goucai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/index_goucai.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/index_heng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/index_heng.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/index_kefu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/index_kefu.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/index_youhui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/index_youhui.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/index_zoushi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/index_zoushi.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/login.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/logo_top_cai33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/logo_top_cai33.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/nav_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/nav_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/nav_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/nav_05.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/nav_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/nav_1.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/nav_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/nav_2.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/nav_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/nav_3.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/nav_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/nav_4.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/nav_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/nav_5.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/pcdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/pcdd.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/index-img/zhuce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/index-img/zhuce.png -------------------------------------------------------------------------------- /templates/default/wap/statics/homeStyle2/images/wap_logo_cai33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/homeStyle2/images/wap_logo_cai33.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/.DS_Store -------------------------------------------------------------------------------- /templates/default/wap/statics/images/android_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/android_btn.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/back.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/anjian_hong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/anjian_hong.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/shijian_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/shijian_bg.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/top_you_anniu_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/top_you_anniu_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/top_zhong_sanjiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/top_zhong_sanjiao.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhu_close_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhu_close_02.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhu_nav_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhu_nav_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhu_nav_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhu_nav_02.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhu_pic_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhu_pic_18.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhu_qian_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhu_qian_bg.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhu_tianjia_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhu_tianjia_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhu_tianjia_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhu_tianjia_02.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhus_anniu_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhus_anniu_bg.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhus_anniu_ft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhus_anniu_ft.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/touzhus_anniu_top_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/touzhus_anniu_top_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/yaoyiyao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/yaoyiyao.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/betting/you_caidan_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/betting/you_caidan_box.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/blank_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/blank_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/cachelogo/logo_top_cai33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/cachelogo/logo_top_cai33.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/cz_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/cz_02.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/cz_img_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/cz_img_03.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/cz_img_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/cz_img_14.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/go_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/go_btn.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/gou_wancheng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/gou_wancheng.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/goucai_hp_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/goucai_hp_more.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/goucai_qiehua_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/goucai_qiehua_07.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/.DS_Store -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/1476cfab6359a45391932be70e1d7bbb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/1476cfab6359a45391932be70e1d7bbb.jpg -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/1ed62f3433a00ce71f48705e856a4ea6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/1ed62f3433a00ce71f48705e856a4ea6.jpg -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/92932a648f1de2b21d4290c6f25c5476.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/92932a648f1de2b21d4290c6f25c5476.jpg -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/c45f3b525a19b9c02a3ed97ee34766c0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/c45f3b525a19b9c02a3ed97ee34766c0.jpg -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/cf91d7473429150ab790e0dd7bf9464c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/cf91d7473429150ab790e0dd7bf9464c.jpg -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/db4e1699b4e4ec19873111bd9c180ec7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/db4e1699b4e4ec19873111bd9c180ec7.jpg -------------------------------------------------------------------------------- /templates/default/wap/statics/images/help/join-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/help/join-icon.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/.DS_Store -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/1.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/12.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/15.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/18.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/51.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/52.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/7.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/9.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/logo_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/logo_more.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/icon/pcdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/icon/pcdd.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/index_jiangzhang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/index_jiangzhang.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/index_pic_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/index_pic_08.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/login/login_pass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/login/login_pass.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/login/login_peo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/login/login_peo.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/login_pass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/login_pass.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/login_peo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/login_peo.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/logout.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_cz_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_cz_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tixian_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tixian_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tou.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tubiao_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tubiao_04.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tubiao_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tubiao_06.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tubiao_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tubiao_13.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tubiao_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tubiao_24.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tubiao_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tubiao_26.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/geren_tubiao_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/geren_tubiao_30.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/touxiang_beijing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/touxiang_beijing.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/message/wuxinxi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/message/wuxinxi.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/moshi_anniu_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/moshi_anniu_03.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/shuaxin_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/shuaxin_01.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/store_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/store_btn.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/top_zhong_sanjiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/top_zhong_sanjiao.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/tuodong_02_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/tuodong_02_03.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/tuodong_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/tuodong_03.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/wap_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/wap_icon.png -------------------------------------------------------------------------------- /templates/default/wap/statics/images/zoushi_you_anniu_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a7a2/cp33/89fab7c0065c155f2e411268fbc42720c8181d9a/templates/default/wap/statics/images/zoushi_you_anniu_03.png -------------------------------------------------------------------------------- /templates/default/wap/statics/js/game/face.15.js: -------------------------------------------------------------------------------- 1 | 2 | face = {'1095':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18','place':'0' 3 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'数投'}, 4 | '1096':{'no':'19|20','place':'0' 5 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'红投'}, 6 | '1097':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0' 7 | ,'codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'任选'}, 8 | '1098':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1' 9 | ,'codepos':2,'codenum':1,'codeonly':1,'codenum2':{0:1,1:0},'title':{0:'胆码',1:'拖码'}}, 10 | '1099':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0' 11 | ,'codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'连组'}, 12 | '1100':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1' 13 | ,'codepos':2,'codenum':{0:{0:1,1:1}},'codeonly':1,'codenum2':{0:1,1:0},'title':{0:'胆码',1:'拖码'}}, 14 | '1101':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1' 15 | ,'codepos':2,'codenum':1,'codeonly':0,'codenum2':0,'title':{0:'前位',1:'后位'}}, 16 | '1102':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0' 17 | ,'codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'任选'},//任选三 18 | '1103':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1' 19 | ,'codepos':2,'codenum':{0:{0:1,1:2}},'codeonly':1,'codenum2':{0:2,1:0},'title':{0:'胆码',1:'拖码'}}, 20 | '1104':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0' 21 | ,'codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'前组'}, 22 | '1105':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1' 23 | ,'codepos':2,'codenum':{0:{0:1,1:2}},'codeonly':1,'codenum2':{0:2,1:0},'title':{0:'胆码',1:'拖码'}}, 24 | '1106':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1|2' 25 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0,'title':{0:'第一位',1:'第二位',2:'第三位'}}, 26 | '1107':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0' 27 | ,'codepos':1,'codenum':4,'codeonly':0,'codenum2':0,'title':'任选'},//选四 28 | '1108':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1' 29 | ,'codepos':1,'codenum':{0:{0:1,1:3}},'codeonly':1,'codenum2':{0:3,1:0},'title':{0:'胆码',1:'拖码'}}, 30 | '1109':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0' 31 | ,'codepos':1,'codenum':5,'codeonly':0,'codenum2':0,'title':'任选'},//选五 32 | '1110':{'no':'01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20','place':'0|1' 33 | ,'codepos':2,'codenum':{0:{0:1,1:4}},'codeonly':1,'codenum2':{0:4,1:0},'title':{0:'胆码',1:'拖码'}} 34 | }; 35 | face15 = face; -------------------------------------------------------------------------------- /templates/default/wap/statics/js/game/face.4.js: -------------------------------------------------------------------------------- 1 | //no://号码内容;可数组 2 | //place:1//位置编号 3 | //codepos,//至少在1个位置上选号 4 | //codenum:2//2代表每位至少选2个号码;如果是数组,则每位上几个号码 5 | //codeonly:1,//1代表这个选号不能在其他位上再选 title投注行前面文字描述 pos 显示位置 6 | face = {107:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2|3|4' 7 | ,'codepos':5,'codenum':1,'codeonly':0,'codenum2':0}, 8 | 105:{'no':'0|1|2|3|4|5|6|7|8|9','place':'1|2|3|4' 9 | ,'codepos':4,'codenum':1,'codeonly':0,'codenum2':0}, 10 | 88:{'no':'0|1|2|3|4|5|6|7|8|9','place':'2|3|4' 11 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 12 | 54:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2' 13 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 14 | 97:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26' 15 | ,'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值'}, 16 | 63:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26' 17 | ,'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值'}, 18 | 99:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'包胆'}, 19 | 65:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'包胆'}, 20 | 92:{'no':'0|1|2|3|4|5|6|7|8|9','place':'2|3|4','codepos':3,'codenum':1,'codeonly':0,'codenum2':0,'title':'组和'}, 21 | 58:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2','codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 22 | 90:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27' 23 | ,'place':'0','codepos':1,'codenum':1,'codenum2':0,'title':'和值'}, 24 | 56:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27' 25 | ,'place':'0','codepos':1,'codenum':1,'codenum2':0,'title':'和值'}, 26 | 91:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'跨度'}, 27 | 57:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'跨度'}, 28 | 93:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'组三'}, 29 | 59:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'组三'}, 30 | 94:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'组六'}, 31 | 60:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'组六'}, 32 | 101:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值尾数'}, 33 | 67:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值尾数'}, 34 | 38:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 35 | 40:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18' 36 | ,'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值'}, 37 | 41:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'跨度'}, 38 | 46:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'组选'}, 39 | 48:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17' 40 | ,'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值'}, 41 | 49:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'包胆'}, 42 | 37:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2|3|4','codepos':0,'codenum':-1,'codeonly':0,'codenum2':0}, 43 | 113:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'不定位'}, 44 | 114:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'不定位'}, 45 | 115:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'不定位'}, 46 | 116:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'不定位'}, 47 | 117:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'不定位'}, 48 | 118:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'不定位'}, 49 | 244:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'不定位'}, 50 | 245:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'不定位'}, 51 | 119:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'不定位'}, 52 | 120:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'不定位'}, 53 | 121:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'不定位'}, 54 | 111:{'no':'大|小|单|双','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 55 | 112:{'no':'大|小|单|双','place':'0|1|2','codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 56 | 109:{'no':'大|小|单|双','place':'3|4','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 57 | 110:{'no':'大|小|单|双','place':'2|3|4','codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 58 | 122:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2|3|4','codepos':2,'codenum':0,'codeonly':0,'codenum2':0}, 59 | 124:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值','pos':'00011'}, 60 | 125:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'组选','pos':'00011'}, 61 | 127:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值','pos':'00011'}, 62 | 128:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2|3|4','codepos':3,'codenum':0,'codeonly':0,'codenum2':0}, 63 | 130:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27', 64 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值','pos':'00111'}, 65 | 131:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'组三','pos':'00111'}, 66 | 133:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'组六','pos':'00111'}, 67 | 137:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26', 68 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'和值','pos':'00111'}, 69 | 139:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2|3|4','codepos':4,'codenum':0,'codeonly':0,'codenum2':0}, 70 | 141:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':4,'codeonly':0,'codenum2':0,'title':'组选24','pos':'01111'}, 71 | 142:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1','codepos':2,'codenum':{0:{0:1,1:2}},'codeonly':0,'codenum2':0,'title':{0:'二重号',1:'单号'},'pos':'01111'}, 72 | 143:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'二重号','pos':'01111'}, 73 | 144:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0,'title':{0:'三重号',1:'单号'},'pos':'01111'}, 74 | 102:{'no':'豹子|顺子|对子','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'特殊号码',codetype:'text'}, 75 | 68:{'no':'豹子|顺子|对子','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'特殊号码',codetype:'text'} 76 | }; 77 | face4 = face; 78 | //后三直选和值 79 | var ccZXHZ = {0: 1, 1: 3, 2: 6, 3: 10, 4: 15, 5: 21, 6: 28, 7: 36, 8: 45, 9: 55, 10: 63, 11: 69, 12: 73, 13: 75, 14: 75, 15: 73, 16: 69, 17: 63, 18: 55, 19: 45, 20: 36, 21: 28, 22: 21, 23: 15, 24: 10, 25: 6, 26: 3, 27: 1}; 80 | //后三直选跨度 81 | var ccZXKD = {0: 10, 1: 54, 2: 96, 3: 126, 4: 144, 5: 150, 6: 144, 7: 126, 8: 96, 9: 54}; 82 | //后三组选和值 83 | var ccZUHZ = {1: 1, 2: 2, 3: 2, 4: 4, 5: 5, 6: 6, 7: 8, 8: 10, 9: 11, 10: 13, 11: 14, 12: 14, 13: 15, 14: 15, 15: 14, 16: 14, 17: 13, 18: 11, 19: 10, 20: 8, 21: 6, 22: 5, 23: 4, 24: 2, 25: 2, 26: 1}; 84 | //前二直选和值 85 | var ccQ2ZXHZ = {0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 9, 11: 8, 12: 7, 13: 6, 14: 5, 15: 4, 16: 3, 17: 2, 18: 1}; 86 | //前二直选跨度 87 | var ccQ2ZXKD = {0: 10, 1: 18, 2: 16, 3: 14, 4: 12, 5: 10, 6: 8, 7: 6, 8: 4, 9: 2}; 88 | //前二组选和值 89 | var ccQ2ZUHZ = {0: 0, 1: 1, 2: 1, 3: 2, 4: 2, 5: 3, 6: 3, 7: 4, 8: 4, 9: 5, 10: 4, 11: 4, 12: 3, 13: 3, 14: 2, 15: 2, 16: 1, 17: 1, 18: 0}; 90 | //任二直选和值 91 | var ccR2ZXHZ = {0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 9, 11: 8, 12: 7, 13: 6, 14: 5, 15: 4, 16: 3, 17: 2, 18: 1}; 92 | //任二组选和值 93 | var ccR2ZUHZ = {0: 0, 1: 1, 2: 1, 3: 2, 4: 2, 5: 3, 6: 3, 7: 4, 8: 4, 9: 5, 10: 4, 11: 4, 12: 3, 13: 3, 14: 2, 15: 2, 16: 1, 17: 1, 18: 0}; 94 | //任三直选和值 95 | var ccR3ZXHZ = {0: 1, 1: 3, 2: 6, 3: 10, 4: 15, 5: 21, 6: 28, 7: 36, 8: 45, 9: 55, 10: 63, 11: 69, 12: 73, 13: 75, 14: 75, 15: 73, 16: 69, 17: 63, 18: 55, 19: 45, 20: 36, 21: 28, 22: 21, 23: 15, 24: 10, 25: 6, 26: 3, 27: 1}; 96 | //任三组选和值 97 | var ccR3ZUHZ = {1: 1, 2: 2, 3: 2, 4: 4, 5: 5, 6: 6, 7: 8, 8: 10, 9: 11, 10: 13, 11: 14, 12: 14, 13: 15, 14: 15, 15: 14, 16: 14, 17: 13, 18: 11, 19: 10, 20: 8, 21: 6, 22: 5, 23: 4, 24: 2, 25: 2, 26: 1}; -------------------------------------------------------------------------------- /templates/default/wap/statics/js/game/face.41.js: -------------------------------------------------------------------------------- 1 | 2 | face = {41000:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27','place':'0' 3 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'特码'}, 4 | 41127:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':3,'title':'包三'}, 5 | 41201:{'no':'大|小|单|双|大单|小单|大双|小双|极大|极小','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'title':'混合','codetype':'text'}, 6 | 41301:{'no':'红波|绿波|蓝波','place':'0','codepos':1,'codenum':1,'codeonly':1,'codenum2':0,'title':'波色','codetype':'text'}, 7 | 41401:{'no':'豹子','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,'codetype':'text','title':'豹子'} 8 | }; 9 | face41 = face; 10 | 11 | hhspid = {'大':'41201','小':'41202','单':'41203','双':'41204','大单':'41205','小单':'41206','大双':'41207','小双':'41208','极大':'41209','极小':'41210'}; 12 | bsspid = {'红波':'41301','绿波':'41302','蓝波':'41303'}; 13 | 14 | function toFaceSpid (tmpSpid) { 15 | if (tmpSpid >= 41301 && tmpSpid <= 41303) {//波色 16 | return 41301; 17 | } else if (tmpSpid >= 41201 && tmpSpid <= 41210) {//混合 18 | return 41201; 19 | } else if (tmpSpid >= 41000 && tmpSpid <= 41027) {//特码 20 | return 41000; 21 | } 22 | return tmpSpid; 23 | } -------------------------------------------------------------------------------- /templates/default/wap/statics/js/game/face.6.js: -------------------------------------------------------------------------------- 1 | 2 | face = {18:{'no':'3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18','place':'0' 3 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'}, 4 | 145:{'no':'3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18','place':'0' 5 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'}, 6 | 161:{'no':'三同号通选','place':'0' 7 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'号码',codetype:'text'}, 8 | 162:{'no':'111|222|333|444|555|666','place':'0' 9 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'号码'}, 10 | 163:{'no':'1|2|3|4|5|6','place':'0' 11 | ,'codepos':1,'codenum':3,'codeonly':0,'codenum2':0,title:'标准'}, 12 | 164:{'no':'1|2|3|4|5|6','place':'0|1' 13 | ,'codepos':2,'codenum':{0:{0:1,1:2},1:{0:2,1:1}},'codeonly':1,'codenum2':{0:2,1:0},title:{0:'胆码',1:'拖码'}}, 14 | 165:{'no':'三连号通选','place':'0' 15 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'号码',codetype:'text'}, 16 | 166:{'no':'11|22|33|44|55|66','place':'0' 17 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'号码'}, 18 | 167:{'no':{0:'11|22|33|44|55|66',1:'1|2|3|4|5|6'},'place':'0|1' 19 | ,'codepos':2,'codenum':{0:{0:1,1:1}},'codeonly':1,'codenum2':0,title:{0:'同号',1:'不同号'}}, 20 | 168:{'no':'1|2|3|4|5|6','place':'0' 21 | ,'codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'标准'}, 22 | 169:{'no':'1|2|3|4|5|6','place':'0|1' 23 | ,'codepos':2,'codenum':{0:{0:1,1:1}},'codeonly':1,'codenum2':{0:1,1:0},title:{0:'胆码',1:'拖码'}} 24 | }; 25 | face6 = face; -------------------------------------------------------------------------------- /templates/default/wap/statics/js/game/face.7.js: -------------------------------------------------------------------------------- 1 | face = {170:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1|2' 2 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 3 | 176:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 4 | ,'codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'组选'}, 5 | 182:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 6 | ,'codepos':2,'codenum':{0:{0:1,1:2},1:{0:2,1:1}},'codeonly':1,'codenum2':{0:2,1:0},'title':{0:'胆码',1:'拖码'}}, 7 | 172:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'1|2|3' 8 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 9 | 178:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 10 | ,'codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'组选'}, 11 | 183:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 12 | ,'codepos':2,'codenum':{0:{0:1,1:2},1:{0:2,1:1}},'codeonly':1,'codenum2':{0:2,1:0},'title':{0:'胆码',1:'拖码'}}, 13 | 174:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'2|3|4' 14 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 15 | 180:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 16 | ,'codepos':1,'codenum':3,'codeonly':0,'codenum2':0,'title':'组选'}, 17 | 184:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 18 | ,'codepos':2,'codenum':{0:{0:1,1:2},1:{0:2,1:1}},'codeonly':1,'codenum2':{0:2,1:0},'title':{0:'胆码',1:'拖码'}}, 19 | 185:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 20 | ,'codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 21 | 189:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 22 | ,'codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'组选'}, 23 | 193:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 24 | ,'codepos':2,'codenum':1,'codeonly':1,'codenum2':{0:1,1:0},'title':{0:'胆码',1:'拖码'}}, 25 | 187:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'3|4' 26 | ,'codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 27 | 191:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 28 | ,'codepos':1,'codenum':2,'codeonly':0,'codenum2':0,'title':'组选'}, 29 | 194:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 30 | ,'codepos':2,'codenum':1,'codeonly':1,'codenum2':{0:1,1:0},'title':{0:'胆码',1:'拖码'}}, 31 | 195:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 32 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'前三位'}, 33 | 196:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 34 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'中三位'}, 35 | 197:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 36 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'后三位'}, 37 | 198:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1|2|3|4' 38 | ,'codepos':1,'codenum':-1,'codeonly':0,'codenum2':0}, 39 | 199:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 40 | ,'codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'一中一'}, 41 | 200:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 42 | ,'codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'二中二'}, 43 | 201:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 44 | ,'codepos':1,'codenum':3,'codeonly':0,'codenum2':0,title:'三中三'}, 45 | 202:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 46 | ,'codepos':1,'codenum':4,'codeonly':0,'codenum2':0,title:'四中四'}, 47 | 203:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 48 | ,'codepos':1,'codenum':5,'codeonly':0,'codenum2':0,title:'五中五'}, 49 | 204:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 50 | ,'codepos':1,'codenum':6,'codeonly':0,'codenum2':0,title:'六中五'}, 51 | 205:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 52 | ,'codepos':1,'codenum':7,'codeonly':0,'codenum2':0,title:'七中五'}, 53 | 206:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0' 54 | ,'codepos':1,'codenum':8,'codeonly':0,'codenum2':0,title:'八中五'}, 55 | 215:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 56 | ,'codepos':2,'codenum':{0:{0:1,1:1}},'codeonly':1,'codenum2':{0:1,1:0},'title':{0:'胆码',1:'拖码'}}, 57 | 216:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 58 | ,'codepos':2,'codenum':{0:{0:1,1:2}},'codeonly':1,'codenum2':{0:2,1:0},'title':{0:'胆码',1:'拖码'}}, 59 | 217:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 60 | ,'codepos':2,'codenum':{0:{0:1,1:3}},'codeonly':1,'codenum2':{0:3,1:0},'title':{0:'胆码',1:'拖码'}}, 61 | 218:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 62 | ,'codepos':2,'codenum':{0:{0:1,1:4}},'codeonly':1,'codenum2':{0:4,1:0},'title':{0:'胆码',1:'拖码'}}, 63 | 219:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 64 | ,'codepos':2,'codenum':{0:{0:1,1:5}},'codeonly':1,'codenum2':{0:5,1:0},'title':{0:'胆码',1:'拖码'}}, 65 | 220:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 66 | ,'codepos':2,'codenum':{0:{0:1,1:6}},'codeonly':1,'codenum2':{0:6,1:0},'title':{0:'胆码',1:'拖码'}}, 67 | 221:{'no':'01|02|03|04|05|06|07|08|09|10|11','place':'0|1' 68 | ,'codepos':2,'codenum':{0:{0:1,1:7}},'codeonly':1,'codenum2':{0:7,1:0},'title':{0:'胆码',1:'拖码'}}, 69 | 222:{'no':'01|02|03|04|05|06|07|08|09|10','place':'0' 70 | ,'codepos':1,'codenum':1,'codeonly':1,'codenum2':0}, 71 | 223:{'no':'01|02|03|04|05|06|07|08|09|10','place':'0|1' 72 | ,'codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 73 | 225:{'no':'01|02|03|04|05|06|07|08|09|10','place':'0|1|2' 74 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 75 | 227:{'no':'01|02|03|04|05|06|07|08|09|10','place':'0|1|2|3|4|5|6|7|8|9' 76 | ,'codepos':1,'codenum':-1,'codeonly':0,'codenum2':0,title:{0:'冠军',1:'亚军',2:'季军',3:'第四名',4:'第五名',5:'第六名',6:'第七名',7:'第八名',8:'第九名',9:'第十名'}} 77 | }; 78 | face7 = face; -------------------------------------------------------------------------------- /templates/default/wap/statics/js/game/face.s3.js: -------------------------------------------------------------------------------- 1 | 2 | face = {15:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2' 3 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 4 | 19:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27', 5 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//直选和值 6 | 21:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组三'},//组三复式 7 | 23:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':0,title:'组六'},//组六复式 8 | 25:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26', 9 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//组三和值 10 | 28:{'no':'3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24', 11 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//组三和值 12 | 7:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 13 | 11:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组选'}, 14 | 9:{'no':'0|1|2|3|4|5|6|7|8|9','place':'1|2','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 15 | 13:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组选'}, 16 | 1:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2','codepos':1,'codenum':-1,'codeonly':0,'codenum2':0}, 17 | 33:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'一码'}, 18 | 35:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'二码'}, 19 | 29:{'no':'大|小|单|双','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 20 | 31:{'no':'大|小|单|双','place':'1|2','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 21 | //体彩 22 | 16:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2' 23 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 24 | 20:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27', 25 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//直选和值 26 | 22:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组三'},//组三复式 27 | 24:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':0,title:'组六'},//组六复式 28 | 27:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26', 29 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//组三和值 30 | 26:{'no':'3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24', 31 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//组三和值 32 | 8:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 33 | 12:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组选'}, 34 | 10:{'no':'0|1|2|3|4|5|6|7|8|9','place':'1|2','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 35 | 14:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组选'}, 36 | 2:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2','codepos':1,'codenum':-1,'codeonly':0,'codenum2':0}, 37 | 34:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'一码'}, 38 | 36:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'二码'}, 39 | 30:{'no':'大|小|单|双','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 40 | 32:{'no':'大|小|单|双','place':'1|2','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 41 | //时时乐 42 | 233:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2' 43 | ,'codepos':3,'codenum':1,'codeonly':0,'codenum2':0}, 44 | 235:{'no':'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27', 45 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//直选和值 46 | 236:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组三'},//组三复式 47 | 237:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':3,'codeonly':0,'codenum2':0,title:'组六'},//组六复式 48 | 238:{'no':'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26', 49 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//组三和值 50 | 239:{'no':'3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24', 51 | 'place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'和值'},//组三和值 52 | 229:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 53 | 231:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组选'}, 54 | 230:{'no':'0|1|2|3|4|5|6|7|8|9','place':'1|2','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 55 | 232:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'组选'}, 56 | 228:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0|1|2','codepos':1,'codenum':-1,'codeonly':0,'codenum2':0}, 57 | 242:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':1,'codeonly':0,'codenum2':0,title:'一码'}, 58 | 243:{'no':'0|1|2|3|4|5|6|7|8|9','place':'0','codepos':1,'codenum':2,'codeonly':0,'codenum2':0,title:'二码'}, 59 | 240:{'no':'大|小|单|双','place':'0|1','codepos':2,'codenum':1,'codeonly':0,'codenum2':0}, 60 | 241:{'no':'大|小|单|双','place':'1|2','codepos':2,'codenum':1,'codeonly':0,'codenum2':0} 61 | }; 62 | faces3 = face; 63 | 64 | //福彩、体彩、时时乐玩法一样 65 | tcToFcSpid = {2:1,8:7,10:9,12:11,14:13,16:15,20:19,22:21,24:23,27:25,26:28,30:29,32:31,34:33,36:35}; 66 | sslToFcSpid = {228:1,229:7,230:9,231:11,232:13,233:15,235:19,236:21,237:23,238:25,239:28,240:29,241:31,242:33,243:35}; 67 | 68 | fcToTcSpid = {1:2,7:8,9:10,11:12,13:14,15:16,19:20,21:22,23:24,25:27,28:26,29:30,31:32,33:34,35:36}; 69 | fcToSslSpid = {1:228,7:229,9:230,11:231,13:232,15:233,19:235,21:236,23:237,25:238,28:239,29:240,31:241,33:242,35:243}; 70 | 71 | //和值玩法注数 72 | hzBetCount = new Array(); 73 | //hzBetCount[19] = {0: 1, 1: 3, 2: 6, 3: 10, 4: 15, 5: 21, 6: 28, 7: 36, 8: 45, 9: 55, 10: 63, 11: 69 74 | // , 12: 73, 13: 75, 14: 75, 15: 73, 16: 69, 17: 63, 18: 55, 19: 45, 20: 36, 21: 28, 22: 21, 23: 15 75 | // , 24: 10, 25: 6, 26: 3, 27: 1}; 76 | hzBetCount[19] = {0:{0:0,1:1},1:{0:1,1:3},2:{0:2,1:6},3:{0:3,1:10},4:{0:4,1:15},5:{0:5,1:21} 77 | ,6:{0:6,1:28},7:{0:7,1:36},8:{0:8,1:45},9:{0:9,1:55},10:{0:10,1:63},11:{0:11,1:69} 78 | ,12:{0:12,1:73},13:{0:13,1:75},14:{0:14,1:75},15:{0:15,1:73},16:{0:16,1:69},17:{0:17,1:63} 79 | ,18:{0:18,1:55},19:{0:19,1:45},20:{0:20,1:36},21:{0:21,1:28},22:{0:22,1:21},23:{0:23,1:15} 80 | ,24:{0:24,1:10},25:{0:25,1:6},26:{0:26,1:3},27:{0:27,1:1}}; 81 | //hzBetCount[25] = {1: 1, 2: 2, 3: 1, 4: 3, 5: 3, 6: 3, 7: 4, 8: 5, 9: 4, 10: 5, 11: 5, 12: 4 82 | // , 13: 5, 14: 5, 15: 4, 16: 5, 17: 5, 18: 4, 19: 5, 20: 4, 21: 3, 22: 3, 23: 3, 24: 1, 25: 2 83 | // , 26: 1}; 84 | hzBetCount[25] = {0:{0:1,1:1},1:{0:2,1:3},2:{0:3,1:1},3:{0:4,1:3},4:{0:5,1:3} 85 | ,5:{0:6,1:3},6:{0:7,1:4},7:{0:8,1:5},8:{0:9,1:4},9:{0:10,1:5},10:{0:11,1:5} 86 | ,11:{0:12,1:4},12:{0:13,1:5},13:{0:14,1:5},14:{0:15,1:4},15:{0:16,1:5},16:{0:17,1:5} 87 | ,17:{0:18,1:4},18:{0:19,1:5},19:{0:20,1:4},20:{0:21,1:3},21:{0:22,1:3},22:{0:23,1:3} 88 | ,23:{0:24,1:1},24:{0:25,1:2},25:{0:26,1:1}}; 89 | //hzBetCount[28] = {3: 1, 4: 1, 5: 2, 6: 3, 7: 4, 8: 5, 9: 7, 10: 8, 11: 9, 12: 10, 13: 10 90 | // , 14: 10, 15: 10, 16: 9, 17: 8, 18: 7, 19: 5, 20: 4, 21: 3, 22: 2, 23: 1, 24: 1}; 91 | hzBetCount[28] = {0:{0:3,1:1},1:{0:4,1:1},2:{0:5,1:2},3:{0:6,1:3},4:{0:7,1:4} 92 | ,5:{0:8,1:5},6:{0:9,1:7},7:{0:10,1:8},8:{0:11,1:9},9:{0:12,1:10},10:{0:13,1:10} 93 | ,11:{0:14,1:10},12:{0:15,1:10},13:{0:16,1:9},14:{0:17,1:8},15:{0:18,1:7},16:{0:19,1:5} 94 | ,17:{0:20,1:4},18:{0:21,1:3},19:{0:22,1:2},20:{0:23,1:1},21:{0:24,1:1}}; -------------------------------------------------------------------------------- /templates/default/wap/statics/js/game/shake.js: -------------------------------------------------------------------------------- 1 | 2 | $(function () { 3 | //定义预准备函数 4 | var imgs = new Array('', '', ''); 5 | //判断手机是否运动支持传感器 6 | if (window.DeviceMotionEvent) { 7 | var speed = 10;//定义默认加速度,达到这个速度才执行摇一摇 8 | //x,y 表示当前的左边 9 | //lastX,lastY 表示摇一摇后最后停留的坐标 10 | var x = y = z = lastX = lastY = lastZ = 0; 11 | //监听设备运动事件 12 | window.addEventListener('devicemotion', function () { 13 | var acceleration = event.accelerationIncludingGravity;//获取设备的加速度 14 | x = acceleration.x;//获取加速度的x轴,用于计算水平水平加速度 15 | y = acceleration.y;//获取加速度的y轴,用于计算垂直方向的加速度,同时计算正玄值 16 | 17 | //计算当前的加速度是否大于默认加速度 18 | if (Math.abs(x - lastX) > speed || Math.abs(y - lastY) > speed) { 19 | //摇一摇换logo 20 | doMobileShake(); 21 | } 22 | //重新记录最后一次值,作为下一次开始坐标 23 | lastX = x; 24 | lastY = y; 25 | }, false); 26 | } 27 | }); -------------------------------------------------------------------------------- /templates/default/wap/statics/js/index.js: -------------------------------------------------------------------------------- 1 | 2 | window.onresize = function() { 3 | var width = $('.header-banner').width(); 4 | var height = Math.floor(220*(width/640)); 5 | $('.header-banner img').css('height', height); 6 | $('.header-banner').css('height', height+3); 7 | } 8 | 9 | function setBannerTimer() { 10 | timerBanner = window.setInterval(function () { 11 | for (var i = 0; i < bannerObjs.length; i++) { 12 | if (bannerIndex == i) { 13 | $('img.banner').hide(); 14 | $(bannerObjs[i]).show(); 15 | } 16 | } 17 | bannerIndex = (bannerIndex == bannerObjs.length-1) ? 0: bannerIndex+1; 18 | }, 3000);//2000毫秒 19 | } 20 | 21 | $(function() { 22 | //绑定resize事件 23 | if( document.createEvent) { 24 | var event = document.createEvent ("HTMLEvents"); 25 | event.initEvent("resize", true, true); 26 | window.dispatchEvent(event); 27 | } else if(document.createEventObject) { 28 | window.fireEvent("onresize"); 29 | } 30 | getHorseLamp(); 31 | //banner切换 32 | bannerObjs = $('img.banner'); 33 | bannerIndex = 1; 34 | setBannerTimer(); 35 | }); 36 | 37 | $(function() { 38 | //循环轮播中奖排名 @ 2016-09-23 39 | (function pmCarousel(){ 40 | try { 41 | var length = 120; 42 | $("#win_list>div").css("height",length+"px"); 43 | if( $("#win_list ul").height() < length ) 44 | { 45 | //数据小于5行的时候不用循环轮播 46 | return; 47 | } 48 | var iCount = 0 ; 49 | function goPaly() 50 | { 51 | iCount++; 52 | if( iCount%6 > 0 ) 53 | { 54 | $("#win_list ul").css("top",0 - (iCount%6)*4); 55 | } 56 | else 57 | { 58 | var newTr = $("#win_list ul li:eq(0)"); 59 | $("#win_list ul").append("
  • "+newTr.html()+"
  • "); 60 | $("#win_list ul").css("top",0); 61 | $("#win_list ul li:eq(0)").remove(); 62 | iCount = 0; 63 | } 64 | } 65 | window.__sItl_1 = setInterval(goPaly,200); 66 | $("#prizeUser").bind("touchstart",function(){ 67 | clearInterval( window.__sItl_1); 68 | }); 69 | $("#prizeUser").bind("touchmove",function(){ 70 | clearInterval( window.__sItl_1); 71 | event.stopPropagation(); 72 | }); 73 | $("#prizeUser").bind("touchend",function(){ 74 | window.__sItl_1 = setInterval(goPaly,200); 75 | }); 76 | $("#prizeUser").bind("touchcancle",function(){ 77 | window.__sItl_1 = setInterval(goPaly,200); 78 | }); 79 | }catch (e){console.log(e);} 80 | })(); 81 | }); 82 | 83 | function getHorseLamp() { 84 | $.ajax({ 85 | url: '/index/ajaxHorseLamp.html', 86 | type: 'POST', 87 | dataType: 'json', 88 | data: { 89 | }, 90 | timeout: 3000, 91 | success: function (data) { 92 | if (data.Result == false) { 93 | return; 94 | } 95 | var txtHtml = ''; 96 | for (var i = 0; i < data.RecordCount; i++) { 97 | if (txtHtml != '') { 98 | txtHtml += ' '; 99 | } 100 | txtHtml += data.Records[i].sContent; 101 | } 102 | if (txtHtml == '') { 103 | txtHtml = '欢迎您的加入。'; 104 | } else { 105 | txtHtml = txtHtml.replace(/\|\\r|\\n/g, ' '); 106 | } 107 | if (txtHtml != '') { 108 | $('#horse').text(txtHtml); 109 | try{$("marquee").get(0).stop();$("marquee").get(0).start();}catch(e){} 110 | //horseInfo = txtHtml; 111 | } 112 | } 113 | }); 114 | } -------------------------------------------------------------------------------- /templates/default/wap/statics/js/iris-ws.js: -------------------------------------------------------------------------------- 1 | var websocketStringMessageType = 0; 2 | var websocketIntMessageType = 1; 3 | var websocketBoolMessageType = 2; 4 | var websocketJSONMessageType = 4; 5 | var websocketMessagePrefix = "iris-websocket-message:"; 6 | var websocketMessageSeparator = ";"; 7 | var websocketMessagePrefixLen = websocketMessagePrefix.length; 8 | var websocketMessageSeparatorLen = websocketMessageSeparator.length; 9 | var websocketMessagePrefixAndSepIdx = websocketMessagePrefixLen + websocketMessageSeparatorLen - 1; 10 | var websocketMessagePrefixIdx = websocketMessagePrefixLen - 1; 11 | var websocketMessageSeparatorIdx = websocketMessageSeparatorLen - 1; 12 | 13 | function getCookie(c_name) 14 | { 15 | if (document.cookie.length>0) 16 | { 17 | c_start=document.cookie.indexOf(c_name + "=") 18 | if (c_start!=-1) 19 | { 20 | c_start=c_start + c_name.length+1 21 | c_end=document.cookie.indexOf(";",c_start) 22 | if (c_end==-1) c_end=document.cookie.length 23 | return unescape(document.cookie.substring(c_start,c_end)) 24 | } 25 | } 26 | return "" 27 | } 28 | 29 | var username=getCookie("username"); 30 | var platform=getCookie("platform"); 31 | var enclientpasswd=getCookie("enclientpasswd"); 32 | 39 | var host = window.location.host; 40 | var uvData="platform="+platform+"&username="+username+"&enclientpasswd="+enclientpasswd; 41 | var Ws = (function () { 42 | // 43 | function Ws(endpoint, protocols) { 44 | var _this = this; 45 | // events listeners 46 | this.connectListeners = []; 47 | this.disconnectListeners = []; 48 | this.nativeMessageListeners = []; 49 | this.messageListeners = {}; 50 | if (!window["WebSocket"]) { 51 | return; 52 | } 53 | if (endpoint.indexOf("ws") == -1) { 54 | endpoint = "ws://" + endpoint; 55 | } 56 | if (protocols != null && protocols.length > 0) { 57 | this.conn = new WebSocket(endpoint, protocols); 58 | } 59 | else { 60 | this.conn = new WebSocket(endpoint); 61 | } 62 | this.conn.onopen = (function (evt) { 63 | _this.fireConnect(); 64 | _this.isReady = true; 65 | return null; 66 | }); 67 | this.conn.onclose = (function (evt) { 68 | _this.fireDisconnect(); 69 | return null; 70 | }); 71 | this.conn.onmessage = (function (evt) { 72 | _this.messageReceivedFromConn(evt); 73 | }); 74 | } 75 | //utils 76 | Ws.prototype.isNumber = function (obj) { 77 | return !isNaN(obj - 0) && obj !== null && obj !== "" && obj !== false; 78 | }; 79 | Ws.prototype.isString = function (obj) { 80 | return Object.prototype.toString.call(obj) == "[object String]"; 81 | }; 82 | Ws.prototype.isBoolean = function (obj) { 83 | return typeof obj === 'boolean' || 84 | (typeof obj === 'object' && typeof obj.valueOf() === 'boolean'); 85 | }; 86 | Ws.prototype.isJSON = function (obj) { 87 | return typeof obj === 'object'; 88 | }; 89 | // 90 | // messages 91 | Ws.prototype._msg = function (event, websocketMessageType, dataMessage) { 92 | return websocketMessagePrefix + event + websocketMessageSeparator + String(websocketMessageType) + websocketMessageSeparator + dataMessage; 93 | }; 94 | Ws.prototype.encodeMessage = function (event, data) { 95 | var m = ""; 96 | var t = 0; 97 | if (this.isNumber(data)) { 98 | t = websocketIntMessageType; 99 | m = data.toString(); 100 | } 101 | else if (this.isBoolean(data)) { 102 | t = websocketBoolMessageType; 103 | m = data.toString(); 104 | } 105 | else if (this.isString(data)) { 106 | t = websocketStringMessageType; 107 | m = data.toString(); 108 | } 109 | else if (this.isJSON(data)) { 110 | //propably json-object 111 | t = websocketJSONMessageType; 112 | m = JSON.stringify(data); 113 | } 114 | else { 115 | console.log("Invalid, javascript-side should contains an empty second parameter."); 116 | } 117 | return this._msg(event, t, m); 118 | }; 119 | Ws.prototype.decodeMessage = function (event, websocketMessage) { 120 | //iris-websocket-message;user;4;themarshaledstringfromajsonstruct 121 | var skipLen = websocketMessagePrefixLen + websocketMessageSeparatorLen + event.length + 2; 122 | if (websocketMessage.length < skipLen + 1) { 123 | return null; 124 | } 125 | var websocketMessageType = parseInt(websocketMessage.charAt(skipLen - 2)); 126 | var theMessage = websocketMessage.substring(skipLen, websocketMessage.length); 127 | if (websocketMessageType == websocketIntMessageType) { 128 | return parseInt(theMessage); 129 | } 130 | else if (websocketMessageType == websocketBoolMessageType) { 131 | return Boolean(theMessage); 132 | } 133 | else if (websocketMessageType == websocketStringMessageType) { 134 | return theMessage; 135 | } 136 | else if (websocketMessageType == websocketJSONMessageType) { 137 | return JSON.parse(theMessage); 138 | } 139 | else { 140 | return null; // invalid 141 | } 142 | }; 143 | Ws.prototype.getWebsocketCustomEvent = function (websocketMessage) { 144 | if (websocketMessage.length < websocketMessagePrefixAndSepIdx) { 145 | return ""; 146 | } 147 | var s = websocketMessage.substring(websocketMessagePrefixAndSepIdx, websocketMessage.length); 148 | var evt = s.substring(0, s.indexOf(websocketMessageSeparator)); 149 | return evt; 150 | }; 151 | Ws.prototype.getCustomMessage = function (event, websocketMessage) { 152 | var eventIdx = websocketMessage.indexOf(event + websocketMessageSeparator); 153 | var s = websocketMessage.substring(eventIdx + event.length + websocketMessageSeparator.length + 2, websocketMessage.length); 154 | return s; 155 | }; 156 | // 157 | // Ws Events 158 | // messageReceivedFromConn this is the func which decides 159 | // if it's a native websocket message or a custom qws message 160 | // if native message then calls the fireNativeMessage 161 | // else calls the fireMessage 162 | // 163 | // remember iris gives you the freedom of native websocket messages if you don't want to use this client side at all. 164 | Ws.prototype.messageReceivedFromConn = function (evt) { 165 | //check if qws message 166 | var message = evt.data; 167 | if (message.indexOf(websocketMessagePrefix) != -1) { 168 | var event_1 = this.getWebsocketCustomEvent(message); 169 | if (event_1 != "") { 170 | // it's a custom message 171 | this.fireMessage(event_1, this.getCustomMessage(event_1, message)); 172 | return; 173 | } 174 | } 175 | // it's a native websocket message 176 | this.fireNativeMessage(message); 177 | }; 178 | Ws.prototype.OnConnect = function (fn) { 179 | if (this.isReady) { 180 | fn(); 181 | } 182 | this.connectListeners.push(fn); 183 | }; 184 | Ws.prototype.fireConnect = function () { 185 | for (var i = 0; i < this.connectListeners.length; i++) { 186 | this.connectListeners[i](); 187 | } 188 | }; 189 | Ws.prototype.OnDisconnect = function (fn) { 190 | this.disconnectListeners.push(fn); 191 | }; 192 | Ws.prototype.fireDisconnect = function () { 193 | for (var i = 0; i < this.disconnectListeners.length; i++) { 194 | this.disconnectListeners[i](); 195 | } 196 | }; 197 | Ws.prototype.OnMessage = function (cb) { 198 | this.nativeMessageListeners.push(cb); 199 | }; 200 | Ws.prototype.fireNativeMessage = function (websocketMessage) { 201 | for (var i = 0; i < this.nativeMessageListeners.length; i++) { 202 | this.nativeMessageListeners[i](websocketMessage); 203 | } 204 | }; 205 | Ws.prototype.On = function (event, cb) { 206 | if (this.messageListeners[event] == null || this.messageListeners[event] == undefined) { 207 | this.messageListeners[event] = []; 208 | } 209 | this.messageListeners[event].push(cb); 210 | }; 211 | Ws.prototype.fireMessage = function (event, message) { 212 | for (var key in this.messageListeners) { 213 | if (this.messageListeners.hasOwnProperty(key)) { 214 | if (key == event) { 215 | for (var i = 0; i < this.messageListeners[key].length; i++) { 216 | this.messageListeners[key][i](message); 217 | } 218 | } 219 | } 220 | } 221 | }; 222 | // 223 | // Ws Actions 224 | Ws.prototype.Disconnect = function () { 225 | this.conn.close(); 226 | }; 227 | // EmitMessage sends a native websocket message 228 | Ws.prototype.EmitMessage = function (websocketMessage) { 229 | this.conn.send(websocketMessage); 230 | }; 231 | // Emit sends an iris-custom websocket message 232 | Ws.prototype.Emit = function (event, data) { 233 | var messageStr = this.encodeMessage(event, data); 234 | this.EmitMessage(messageStr); 235 | }; 236 | return Ws; 237 | }()); 238 | w = new Ws("ws://" + host + "/my_endpoint"); 239 | w.OnDisconnect(function () { 240 | setTimeout(function(){top.document.location.reload();},5000); 241 | }); -------------------------------------------------------------------------------- /templates/default/wap/statics/js/iscro-lot.js: -------------------------------------------------------------------------------- 1 | var myScroll; 2 | var myScroll2; 3 | function loaded () { 4 | try{ 5 | //myScroll = new IScroll('#wrapper_1', { mouseWheel: true,click: false }); 6 | }catch(e){ 7 | console.log(e); 8 | } 9 | 10 | // myScroll2 = new IScroll('#wrapper_2', { mouseWheel: true,click: true }); 11 | } 12 | //下面代码影响页面所有的点击事件 13 | isLogin = false; 14 | //弹窗 15 | $(function(){ 16 | //$('.ui-betting-title').click(function(){ 17 | $('.ui-betting-title').bind('touchend', function () { 18 | event.preventDefault(); 19 | if (location.href.indexOf('/mine/betList.html?onlyWin=1') > -1) { 20 | return; 21 | } 22 | if (location.href.indexOf('/bet/') > -1 && $('.beet-odds-tips').css('display') != 'none') { 23 | return; 24 | } 25 | $('.beet-tips').toggle(); 26 | $('.beet-rig').hide(); 27 | }); 28 | 29 | $('.bett-heads').click(function(){ 30 | $('.tips-bg').toggle(); 31 | }); 32 | 33 | $('.bett-head').click(function(){ 34 | $('.beet-tips').hide(); 35 | $('.beet-rig').toggle(); 36 | return false; 37 | }); 38 | 39 | $('.beet-tips').bind("click",function(){ 40 | //console.log($(this).css('display')); 41 | if($(this).css('display')!='none'){ 42 | event.stopPropagation(); 43 | } 44 | }); 45 | 46 | // click anywhere toggle off 47 | $(window).bind("load",function(){ 48 | $(document).on("click",function() { 49 | if($('.beet-rig').is(':visible')) { 50 | $('.beet-rig').toggle(); 51 | } 52 | else { 53 | $('.beet-rig').css('display','none'); 54 | } 55 | if($('.beet-tips').is(':visible')) { 56 | $('.beet-tips').toggle(); 57 | } 58 | else { 59 | $('.beet-tips').css('display','none'); 60 | } 61 | 62 | }); 63 | 64 | $('li.specific-cell-o>span').bind('touchend', function () { 65 | if($('.beet-rig').is(':visible')) { 66 | $('.beet-rig').toggle(); 67 | } 68 | else { 69 | $('.beet-rig').css('display','none'); 70 | } 71 | if($('.beet-tips').is(':visible')) { 72 | $('.beet-tips').toggle(); 73 | } 74 | else { 75 | $('.beet-tips').css('display','none'); 76 | } 77 | }); 78 | 79 | $('#wrapper_1').bind('touchend', function () { 80 | if($('.beet-rig').is(':visible')) { 81 | $('.beet-rig').toggle(); 82 | } 83 | else { 84 | $('.beet-rig').css('display','none'); 85 | } 86 | if($('.beet-tips').is(':visible')) { 87 | $('.beet-tips').toggle(); 88 | } 89 | else { 90 | $('.beet-tips').css('display','none'); 91 | } 92 | }); 93 | }); 94 | // end 95 | 96 | // scroll toggle off 97 | $(document).scroll(function() { 98 | if($('.beet-rig').is(':visible')) { 99 | $('.beet-rig').toggle(); 100 | } 101 | else { 102 | $('.beet-rig').css('display','none'); 103 | } 104 | if($('.beet-tips').is(':visible')) { 105 | $('.beet-tips').toggle(); 106 | } 107 | else { 108 | $('.beet-tips').css('display','none'); 109 | } 110 | }); 111 | // end 112 | 113 | // hide address bar 114 | window.addEventListener("load",function() { 115 | // Set a timeout... 116 | /*setTimeout(function(){ 117 | // Hide the address bar! 118 | window.scrollTo(0, 1); 119 | }, 0);*/ 120 | }); 121 | 122 | $('.bett-odd a').click(function(){ 123 | $('.bett-odd').toggleClass('bett-odd-r') 124 | }); 125 | timeOld = 0;//记录上次点击事件 126 | timeNew = 0;//判断是否恶意点击 127 | $('button#reveal-left, button#back_to_bet').click(function() { 128 | //$('button#reveal-left, button#back_to_bet').bind('touchend', function () { 129 | //event.preventDefault(); 130 | timeNew = new Date().getTime() + 0; 131 | if (timeNew - timeOld < 1000) { 132 | return; 133 | } 134 | timeOld = timeNew; 135 | var tmpCount = $('i#bet_time_count').text(); 136 | //先判断投注单数 137 | if (tmpCount != null && tmpCount != undefined && tmpCount != '' && tmpCount > 0) { 138 | msgConfirm("退出页面会清空购物篮里的注单, 是否退出?",function(){ 139 | sessionStorage.clear(); 140 | $('div.go-back').hide(); 141 | goBackOfBetPage(); 142 | }); 143 | return; 144 | } 145 | var tmpSelCount = $('span#bet_sel_count').text(); 146 | //从投注页返回上一页,时时彩 147 | if (!/\/index\/login.html/g.test(location.href) && (/\/bet\/[\w\d]*.html/g.test(location.href) || /\/bet\/[\w\d]*.html/g.test(location.href)) 148 | && location.href.indexOf('bet_url') == -1) { 149 | if (!$('#step_1').is(':visible')) { 150 | showStep(1); 151 | return; 152 | } 153 | var tmpSelCount = $('span#bet_sel_count').text(); 154 | //判断已选注数 155 | if (tmpSelCount != null && tmpSelCount != undefined && tmpSelCount != '' && tmpSelCount > 0) { 156 | msgConfirm("是否放弃所选的号码?",function(){ 157 | goBackOfBetPage(); 158 | }); 159 | }else{ 160 | goBackOfBetPage(); 161 | } 162 | return; 163 | } 164 | 165 | //检测是否登陆 166 | //走势返回到首页。如果上一页是充值结束,则进入首页 167 | if (location.href.indexOf('/mine/index.html') > -1 168 | //|| location.href.indexOf('/trend/index.html') > -1 169 | || document.referrer.indexOf('/index/registerOk.html') > -1) { 170 | location.href = '/'; 171 | return; 172 | } 173 | //充值后返回 174 | if (document.referrer.indexOf('/deposit/end.html') > -1 175 | || location.href.indexOf('/deposit/end.html') > -1 176 | || document.referrer.indexOf('/mine/withdrawOk.html') > -1 177 | || location.href.indexOf('/mine/withdrawOk.html') > -1) { 178 | location.href = '/mine/index.html'; 179 | return; 180 | } 181 | if (location.href.indexOf('/deposit/index.html') > -1){ 182 | history.go(-1); 183 | return; 184 | } 185 | if (location.href.indexOf('/deposit/index.html') > -1 186 | ||location.href.indexOf('/deposit/wechat.html') > -1 187 | ||location.href.indexOf('/deposit/alipay.html') > -1 188 | ||location.href.indexOf('/deposit/bank.html') > -1 ){ 189 | msgConfirm("您的支付未完成,是否放弃充值?",function(){ 190 | window.history.go(-1); 191 | return; 192 | }); 193 | return; 194 | } 195 | //个人中心、走势、充值提款页面,需要检测登陆 196 | if (document.referrer.indexOf('/mine/') > -1 197 | || document.referrer.indexOf('/trend/') > -1 198 | || document.referrer.indexOf('/deposit/') > -1 199 | || document.referrer.indexOf('/index/login.html') > -1) { 200 | //checkLogin(location.href,document.referrer); 201 | window.history.go(-1); 202 | return; 203 | } 204 | 205 | //红包 206 | if (location.href.indexOf('/luckymoney/index.html') > -1 207 | ||location.href.indexOf('/luckymoney/lshb.html') > -1 208 | ||location.href.indexOf('/luckymoney/ok.html') > -1) { 209 | location.href = '/luckymoney/qhb.html'; 210 | return; 211 | } 212 | 213 | //我的红包 214 | if (location.href.indexOf('/luckymoney/myList.html') > -1) { 215 | //console.log(document.referrer);return 216 | if($(this).attr('data-gotourl')){ 217 | console.log(decodeURIComponent($(this).attr('data-gotourl'))); 218 | location.href = decodeURIComponent($(this).attr('data-gotourl')); 219 | return; 220 | } 221 | } 222 | if(location.href.indexOf('/luckymoney/qhb') > -1){ 223 | location.href = '/lobby/index.html'; 224 | return; 225 | } 226 | if(location.href.indexOf('/lobby/index.html') > -1){ 227 | location.href = '/'; 228 | return; 229 | } 230 | window.history.go(-1); 231 | return; 232 | }); 233 | 234 | //清除投注session 235 | var nowGameId = $('#game_id').val(); 236 | if (/^[0-9]+$/.test(nowGameId) && nowGameId != sessionStorage.getItem('gameid')) { 237 | sessionStorage.clear(); 238 | } 239 | }); 240 | 241 | function reLogin(desc) { 242 | if (/未指定具体帐号|帐号不存在|该帐号需要验证|请重新登录|请重新登陆|请登录|请登陆/g.test(desc)) { 243 | location.href = '/index/login.html?clear=1&ref_url=' + location.href; 244 | return true; 245 | } 246 | } 247 | 248 | function goBackOfBetPage() { 249 | // if (document.referrer.indexOf('/index/login.html') > -1 && isLogin == true) { 250 | if (document.referrer.indexOf('/index/login.html') > -1 ) { 251 | location.href = '/mine/index.html'; 252 | } else if (document.referrer.indexOf('/mine/index.html') > -1 ) { 253 | location.href = '/mine/index.html'; 254 | } else{ 255 | history.go(-1); 256 | } 257 | } 258 | 259 | -------------------------------------------------------------------------------- /templates/default/wap/statics/js/lobby.js: -------------------------------------------------------------------------------- 1 | 2 | $(function() { 3 | //getLastResult(); 4 | getNextPeriod(); 5 | }); 6 | 7 | function getLastResult() { 8 | $.ajax({ 9 | url: '/draw/ajaxResultList.html', 10 | type: 'POST', 11 | dataType: 'json', 12 | data: { 13 | }, 14 | timeout: 30000, 15 | success: function (data) { 16 | if (data.Result == false) { 17 | msgAlert(data.Desc); 18 | reLogin(data.Desc); 19 | return; 20 | } 21 | if (!data.Result || data.RecordCount <= 0) { 22 | return; 23 | } 24 | var txtHtml = ''; 25 | for (var i = 0; i < data.RecordCount; i++) { 26 | var gid = data.Records[i].iGameId; 27 | if (nowIds.indexOf(','+gid+',') == -1) { 28 | continue; 29 | } 30 | var period = data.Records[i].sGamePeriod; 31 | var opennum = data.Records[i].sOpenNum; 32 | if (',41,42,'.indexOf(','+gid+',') > -1) { 33 | if (opennum != undefined && opennum != '') { 34 | opennum = opennum.split('|'); 35 | opennum = opennum[0]+' + '+opennum[1]+' + '+opennum[2]+' = '+opennum[3]; 36 | } else { 37 | opennum = '正在开奖'; 38 | } 39 | } else { 40 | opennum = (opennum == undefined || opennum == '') ? '正在开奖' : opennum.replace(/\|/g, ' '); 41 | } 42 | if('第'+period+'期' == $('span.last_period_'+gid).text()){ 43 | $('p.last_open_'+gid).text(opennum); 44 | } 45 | //$('span.last_period_'+gid).text('第'+period+'期'); 46 | //$('p.last_open_'+gid).text(opennum); 47 | } 48 | } 49 | }); 50 | } 51 | 52 | //获取下一期相关数据 53 | lefttimes = {1:'0',2:'0',3:'0',4:'0',5:'0',7:'0',9:'0', 54 | 10:'0',11:'0',12:'0',13:'0',14:'0',15:'0',16:'0',17:'0',18:'0',28:'0',41:'0',42:'0',51:'0',52:'0'}; 55 | isCanGetNext = true; 56 | function getNextPeriod(all) { 57 | if (!isCanGetNext) { 58 | return; 59 | } 60 | isCanGetNext = false; 61 | var param = ''; 62 | for (var k in lefttimes) { 63 | if (all != 1 && lefttimes[k] > 1) { 64 | continue; 65 | } 66 | if (param != '') { 67 | param += ','; 68 | } 69 | param += k; 70 | } 71 | $.ajax({ 72 | url: '/bet/ajaxNextPeriod.html', 73 | type: 'POST', 74 | dataType: 'json', 75 | data: { 76 | 'gid': param 77 | }, 78 | timeout: 30000, 79 | success: function (data) { 80 | if (data.Result == false) { 81 | if (data.Desc != undefined && data.Desc.trim() != '') { 82 | msgAlert(data.Desc); 83 | } 84 | reLogin(data.Desc); 85 | return; 86 | } 87 | if (data.Result == true && data.RecordCount > 0) { 88 | for (var j = 0; j < data.RecordCount; j++) { 89 | var gid = data.Records[j].iGameId; 90 | if (nowIds.indexOf(','+gid+',') == -1) { 91 | continue; 92 | } 93 | //$('div.erect-right-'+gid).data('time', data.Records[j].iCloseTime); 94 | if (data.Records[j].iStartTime > 0){ 95 | lefttimes[gid] = data.Records[j].iStartTime; 96 | $('p#hot_start_'+gid).css("visibility","visible"); 97 | $('span.last_period_'+gid).text('即将开盘...'); 98 | $('span.last_period_'+gid).addClass("start_period"); 99 | $('span.last_period_'+gid).addClass("last_per_iod_"+gid); 100 | $('span.last_per_iod_'+gid).removeClass('last_period_'+gid); 101 | $('span#period_show_status_'+gid).text("开盘"); 102 | }else{ 103 | lefttimes[gid] = data.Records[j].iCloseTime; 104 | $('p#hot_start_'+gid).css("visibility","hidden"); 105 | if ($('span.last_period_'+gid).length == 1){ 106 | $('span.last_period_'+gid).text('第'+data.Records[j].sGamePeriodPrior+'期'); 107 | }else{ 108 | $('span.last_per_iod_'+gid).removeClass("start_period"); 109 | $('span.last_per_iod_'+gid).addClass("last_period_"+gid); 110 | $("span.last_period_"+gid).removeClass('last_per_iod_'+gid); 111 | $('span.last_period_'+gid).text('第'+data.Records[j].sGamePeriodPrior+'期'); 112 | } 113 | $('span#period_show_status_'+gid).text("截止"); 114 | } 115 | $('span.period_show_'+gid).text(data.Records[j].sGamePeriod); 116 | //$('div.erect-right-'+gid+' span.period_show').text(data.Records[j].sGamePeriod); 117 | //上一期信息 118 | 119 | var lastnum = data.Records[j].sOpenNumPrior; 120 | if (',41,42,'.indexOf(','+gid+',') > -1) { 121 | if (lastnum != undefined && lastnum != '') { 122 | lastnum = lastnum.split('|'); 123 | lastnum = lastnum[0]+' + '+lastnum[1]+' + '+lastnum[2]+' = '+lastnum[3]; 124 | } else { 125 | lastnum = '正在开奖'; 126 | } 127 | } else { 128 | lastnum = (lastnum == undefined || lastnum == '') ? '正在开奖' : lastnum.replace(/\|/g, ' '); 129 | } 130 | if(data.Records[j].iStartTime > 0){ 131 | $('p.last_open_'+gid).html(" "); 132 | }else{ 133 | $('p.last_open_'+gid).text(lastnum); 134 | } 135 | } 136 | if (all != 1) { 137 | setLeaveTimer(); 138 | } 139 | } else { 140 | //alert('错误信息:' + data.Desc); 141 | } 142 | isCanGetNext = true; 143 | if (firstPage != 1) { 144 | loaded(); 145 | } 146 | //getLastResult(); 147 | } 148 | }); 149 | } 150 | 151 | runSec = 1;//定时器运行了多少秒 152 | objList = '';//时间显示jqery对象 153 | timeLeave = 0; //倒计时剩余时间 154 | localTime = 0;//最后一次倒计时的本机时间(毫秒) 155 | isTimerStarted = false;//是否启动了定时器 156 | function setLeaveTimer() { //启动定时,进行倒计时。 157 | if (isTimerStarted) { 158 | return; 159 | } 160 | isTimerStarted = true; 161 | function format(dateStr) { //格式化时间 162 | return new Date(dateStr.replace(/[\-\u4e00-\u9fa5]/g, "/")); 163 | } 164 | 165 | function fftime(n) { 166 | return Number(n) < 10 ? "" + 0 + Number(n) : Number(n); 167 | } 168 | 169 | function diff(t) { //根据时间差返回相隔时间 170 | return t > 0 ? { 171 | day: Math.floor(t / 86400), 172 | hour: Math.floor(t / 3600), 173 | minute: Math.floor(t % 3600 / 60), 174 | second: Math.floor(t % 60) 175 | } : { 176 | day: 0, 177 | hour: 0, 178 | minute: 0, 179 | second: 0 180 | }; 181 | } 182 | 183 | //timeLeave = 0//倒计时总秒数 184 | clearInterval(timerno);//删除定时器 185 | var timerno = window.setInterval(function () { 186 | if (firstPage != 1 && runSec < 271) { 187 | if (runSec%50 == 0) { 188 | getLastResult(); 189 | } 190 | runSec++; 191 | } 192 | var tmpLocalTime = new Date().getTime() + 0;//本机毫秒数 193 | if (localTime > 0 && (tmpLocalTime-localTime) > 3000) {//倒计时已不准确,重新获取倒计时 194 | getNextPeriod(1); 195 | } 196 | localTime = tmpLocalTime; 197 | //对所有倒计时遍历,重新赋值 198 | if (objList == undefined || objList == '') { 199 | objList = (firstPage == 1) ? $('div.hot-list-text') : $('div.erect-right'); 200 | } 201 | for (var i = 0; i < objList.length; i++) { 202 | //var tmpTimeLeave = $(objList[i]).data('time'); 203 | var tmpGid = $(objList[i]).data('gid'); 204 | if (nowIds.indexOf(','+tmpGid+',') == -1) { 205 | continue; 206 | } 207 | var tmpTimeLeave = lefttimes[tmpGid]; 208 | if (tmpTimeLeave > -1) { 209 | tmpTimeLeave--; 210 | } 211 | lefttimes[tmpGid] = tmpTimeLeave; 212 | if (isCanGetNext && tmpTimeLeave == 0) { 213 | getNextPeriod(); 214 | continue; 215 | } 216 | tmpTimeLeave = (tmpTimeLeave == undefined || tmpTimeLeave == '') ? 0 : tmpTimeLeave; 217 | var oDate = diff(tmpTimeLeave); 218 | var ahour = fftime(oDate.hour).toString().split(""); 219 | var aminute = fftime(oDate.minute).toString().split(""); 220 | var asecond = fftime(oDate.second).toString().split(""); 221 | var timeShow = ahour[0] + ahour[1] + ':' + aminute[0] + aminute[1] + ':' + asecond[0] + asecond[1]; 222 | //$(objList[i]).data('time', tmpTimeLeave); 223 | //lefttimes[tmpGid] = tmpTimeLeave; 224 | if (typeof(showLeaveTime) == "function") {//eval( 225 | showLeaveTime(tmpGid, timeShow); 226 | continue; 227 | } 228 | if (firstPage == 1 || gameShowType == 1) {//列表显示 229 | $('span.time_show_1_'+tmpGid).text(timeShow); 230 | //$('div.erect-right-'+tmpGid+' span.time_show').text(timeShow); 231 | } else {//宫格显示 232 | $('span.time_show_2_'+tmpGid).text(timeShow); 233 | } 234 | } 235 | }, 1000); 236 | } -------------------------------------------------------------------------------- /templates/default/wap/statics/js/sha3.js: -------------------------------------------------------------------------------- 1 | /* 2 | A JavaScript implementation of the SHA family of hashes, as 3 | defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding 4 | HMAC implementation as defined in FIPS PUB 198a 5 | 6 | Copyright Brian Turek 2008-2017 7 | Distributed under the BSD License 8 | See http://caligatio.github.com/jsSHA/ for more information 9 | 10 | Several functions taken from Paul Johnston 11 | */ 12 | 'use strict';(function(L){function u(d,b,h){var c=0,a=[],l=0,e,m,r,g,k,f,p,v,A=!1,n=[],u=[],w,z=!1,x=!1,t=-1;h=h||{};e=h.encoding||"UTF8";w=h.numRounds||1;if(w!==parseInt(w,10)||1>w)throw Error("numRounds must a integer >= 1");if(0===d.lastIndexOf("SHA3-",0)||0===d.lastIndexOf("SHAKE",0)){var C=6;f=B;v=function(c){var a=[],e;for(e=0;5>e;e+=1)a[e]=c[e].slice();return a};t=1;if("SHA3-224"===d)k=1152,g=224;else if("SHA3-256"===d)k=1088,g=256;else if("SHA3-384"===d)k=832,g=384;else if("SHA3-512"===d)k= 13 | 576,g=512;else if("SHAKE128"===d)k=1344,g=-1,C=31,x=!0;else if("SHAKE256"===d)k=1088,g=-1,C=31,x=!0;else throw Error("Chosen SHA variant is not supported");p=function(c,a,e,g,d){e=k;var b=C,m,l=[],f=e>>>5,h=0,r=a>>>5;for(m=0;m=e;m+=f)g=B(c.slice(m,m+f),g),a-=e;c=c.slice(m);for(a%=e;c.length>>3;c[m>>2]^=b<=d)break;l.push(c.a);h+=1;0===64*h%e&&B(null,g)}return l}}else throw Error("Chosen SHA variant is not supported"); 14 | r=D(b,e,t);m=y(d);this.setHMACKey=function(a,b,l){var h;if(!0===A)throw Error("HMAC key already set");if(!0===z)throw Error("Cannot set HMAC key after calling update");if(!0===x)throw Error("SHAKE is not supported for HMAC");e=(l||{}).encoding||"UTF8";b=D(b,e,t)(a);a=b.binLen;b=b.value;h=k>>>3;l=h/4-1;if(ha/8){for(;b.length<=l;)b.push(0);b[l]&=4294967040}for(a=0;a<=l;a+=1)n[a]=b[a]^909522486,u[a]=b[a]^1549556828;m=f(n,m); 15 | c=k;A=!0};this.update=function(e){var b,g,d,h=0,p=k>>>5;b=r(e,a,l);e=b.binLen;g=b.value;b=e>>>5;for(d=0;d>>5);l=e%k;z=!0};this.getHash=function(e,b){var h,f,r,k;if(!0===A)throw Error("Cannot call getHash after setting HMAC key");r=E(b);if(!0===x){if(-1===r.shakeLen)throw Error("shakeLen must be specified in options");g=r.shakeLen}switch(e){case "HEX":h=function(a){return F(a,g,t,r)};break;case "B64":h=function(a){return G(a,g,t,r)};break; 16 | case "BYTES":h=function(a){return H(a,g,t)};break;case "ARRAYBUFFER":try{f=new ArrayBuffer(0)}catch(q){throw Error("ARRAYBUFFER not supported by this environment");}h=function(a){return I(a,g,t)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER");}k=p(a.slice(),l,c,v(m),g);for(f=1;f>>24-g%32),k=p(k,g,0,y(d),g);return h(k)};this.getHMAC=function(e,b){var h,r,n,w;if(!1===A)throw Error("Cannot call getHMAC without first setting HMAC key"); 17 | n=E(b);switch(e){case "HEX":h=function(a){return F(a,g,t,n)};break;case "B64":h=function(a){return G(a,g,t,n)};break;case "BYTES":h=function(a){return H(a,g,t)};break;case "ARRAYBUFFER":try{h=new ArrayBuffer(0)}catch(M){throw Error("ARRAYBUFFER not supported by this environment");}h=function(a){return I(a,g,t)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER");}r=p(a.slice(),l,c,v(m),g);w=f(u,y(d));w=p(r,g,k,w,g);return h(w)}}function f(d,b){this.a=d;this.b=b}function F(d, 18 | b,h,c){var a="";b/=8;var l,e,m;m=-1===h?3:0;for(l=0;l>>2]>>>8*(m+l%4*h),a+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(e&15);return c.outputUpper?a.toUpperCase():a}function G(d,b,h,c){var a="",l=b/8,e,m,f,g;g=-1===h?3:0;for(e=0;e>>2]:0,f=e+2>>2]:0,f=(d[e>>>2]>>>8*(g+e%4*h)&255)<<16|(m>>>8*(g+(e+1)%4*h)&255)<<8|f>>>8*(g+(e+2)%4*h)&255,m=0;4>m;m+=1)8*e+6*m<=b?a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>> 19 | 6*(3-m)&63):a+=c.b64Pad;return a}function H(d,b,h){var c="";b/=8;var a,l,e;e=-1===h?3:0;for(a=0;a>>2]>>>8*(e+a%4*h)&255,c+=String.fromCharCode(l);return c}function I(d,b,h){b/=8;var c,a=new ArrayBuffer(b),l,e;e=new Uint8Array(a);l=-1===h?3:0;for(c=0;c>>2]>>>8*(l+c%4*h)&255;return a}function E(d){var b={outputUpper:!1,b64Pad:"=",shakeLen:-1};d=d||{};b.outputUpper=d.outputUpper||!1;!0===d.hasOwnProperty("b64Pad")&&(b.b64Pad=d.b64Pad);if(!0===d.hasOwnProperty("shakeLen")){if(0!== 20 | d.shakeLen%8)throw Error("shakeLen must be a multiple of 8");b.shakeLen=d.shakeLen}if("boolean"!==typeof b.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!==typeof b.b64Pad)throw Error("Invalid b64Pad formatting option");return b}function D(d,b,h){switch(b){case "UTF8":case "UTF16BE":case "UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE");}switch(d){case "HEX":d=function(c,a,b){var e=c.length,d,f,g,k,q,p;if(0!==e%2)throw Error("String of HEX type must be in byte increments"); 21 | a=a||[0];b=b||0;q=b>>>3;p=-1===h?3:0;for(d=0;d>>1)+q;for(g=k>>>2;a.length<=g;)a.push(0);a[g]|=f<<8*(p+k%4*h)}return{value:a,binLen:4*e+b}};break;case "TEXT":d=function(c,a,d){var e,m,f=0,g,k,q,p,v,n;a=a||[0];d=d||0;q=d>>>3;if("UTF8"===b)for(n=-1===h?3:0,g=0;ge?m.push(e):2048>e?(m.push(192|e>>>6),m.push(128|e&63)):55296>e||57344<=e?m.push(224| 22 | e>>>12,128|e>>>6&63,128|e&63):(g+=1,e=65536+((e&1023)<<10|c.charCodeAt(g)&1023),m.push(240|e>>>18,128|e>>>12&63,128|e>>>6&63,128|e&63)),k=0;k>>2;a.length<=p;)a.push(0);a[p]|=m[k]<<8*(n+v%4*h);f+=1}else if("UTF16BE"===b||"UTF16LE"===b)for(n=-1===h?2:0,m="UTF16LE"===b&&1!==h||"UTF16LE"!==b&&1===h,g=0;g>>8);v=f+q;for(p=v>>>2;a.length<=p;)a.push(0);a[p]|=e<<8*(n+v%4*h);f+=2}return{value:a,binLen:8*f+d}};break;case "B64":d= 23 | function(c,a,b){var e=0,d,f,g,k,q,p,n,u;if(-1===c.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");f=c.indexOf("=");c=c.replace(/\=/g,"");if(-1!==f&&f