//index.js
//获取应用实例
var app = getApp()
var wxSortPickerView = require('../../wxSortPickerView/wxSortPickerView.js');
Page({
data: {
//页面设置
winWidth: 0,
winHeight: 0,
//tab切换
currentTab: 0,
scrollTop: 0,
scrollHeight: 0,
nationInfo: null, //全国彩的开奖信息
highInfo: null, //高频彩的开奖信息
areaInfo: null, //地方彩的开奖信息
isHidden: false, //加载
nationIds: ['4', '5', '17'], //全国彩的彩种信息
nationNames: ['福彩3D', '排列三', '排列五'],
nationCode: null, //全国彩的开奖结果
nationCodeLen: null, //全国彩结果的长度
nationNamesArr: null, //全国彩采种名
nationDay: null, //全国彩星期
nationDate: null, //全国彩日期
nationTag: null,
highIds: ['1', '3', '6', '7', '9', '10', '11', '13', '14', '15', '20', '21', '23', '24', '27', '42', '43'], //高频彩采种Id
highNames: [{ '1': '重庆时时彩' },
{ '3': '天津时时彩' },
{ '6': '江西11选5' },
{ '7': '新疆时时彩' },
{ '9': '广东11选5' },
{ '10': '山东11选5' },
{ '11': '天津快乐十分' },
{ '13': '湖南快乐十分' },
{ '14': '上海时时乐' },
{ '15': '北京快乐8' },
{ '20': '安徽11选5' },
{ '21': '重庆快乐十分' },
{ '23': '江苏快3' },
{ '24': '安徽快3' },
{ '27': '北京PK拾' },
{ '42': '北京快三' },
{ '43': '广西快三' }], //高频彩彩种名
areaIds: ['1', '3', '6', '7', '9', '10', '11', '12', '13', '14', '15', '20', '21', '22', '23', '24', '27', '42', '43'], //地方彩采种Id
areaNames: [{ '1': '重庆时时彩' },
{ '3': '天津时时彩' },
{ '6': '江西11选5' },
{ '7': '新疆时时彩' },
{ '9': '广东11选5' },
{ '10': '山东11选5' },
{ '11': '天津快乐十分' },
{ '12': '广东快乐十分' },
{ '13': '湖南快乐十分' },
{ '14': '上海时时乐' },
{ '15': '北京快乐8' },
{ '20': '安徽11选5' },
{ '21': '重庆快乐十分' },
{ '22': '上海11选5' },
{ '23': '江苏快3' },
{ '24': '安徽快3' },
{ '27': '北京PK拾' },
{ '42': '北京快三' },
{ '43': '广西快三' }], //地方彩彩种名
//全国彩的标签
nationTags: [{ 4: '每日 21:15 开奖' },
{ 5: '每日 20:30开奖' },
{ 17: '每日 20:30开奖' }],
//高频彩的标签
highTag: [{ 1: '10:00-22:00 10分钟1期,22:00-2:00 5分钟1期' },
{ 3: '每日08:58-22:58 10分钟1期' },
{ 6: '每日9:00-23:00 10分钟一期' },
{ 7: '每日9:00-22:00 10分钟1期' },
{ 9: '每日9:00-23:00 10分钟一期' },
{ 10: '每日9:00-23:00 10分钟一期' },
{ 11: '每日08:55-22:55 10分钟1期' },
{ 13: '每日09:00-23:30 10分钟1期' },
{ 14: '每日10:30-22:00 30分钟1期' },
{ 15: '每日09:05-23:55 5分钟1期' },
{ 20: '每日9:00-23:00 10分钟一期' },
{ 21: '每日10:00-02:00 10分钟1期' },
{ 23: '每日08:40-22:10 10分钟1期' },
{ 24: '每日08:40-22:00 10分钟1期' },
{ 27: '每日09:05-23:55 5分钟1期' },
{ 42: '每日08:40-22:10 10分钟1期' },
{ 43: '每日09:30-20:30 10分钟1期' },
],
//地方彩
areaTag: [{ 1: '10:00-22:00 10分钟1期,22:00-2:00 5分钟1期' },
{ 3: '每日08:58-22:58 10分钟1期' },
{ 6: '每日9:00-23:00 10分钟一期' },
{ 7: '每日9:00-22:00 10分钟1期' },
{ 9: '每日9:00-23:00 10分钟一期' },
{ 10: '每日9:00-23:00 10分钟一期' },
{ 11: '每日08:55-22:55 10分钟1期' },
{ 12: '每日09:00-23:00 10分钟1期' },
{ 13: '每日09:00-23:30 10分钟1期' },
{ 14: '每日10:30-22:00 30分钟1期' },
{ 15: '每日09:05-23:55 5分钟1期' },
{ 20: '每日9:00-23:00 10分钟一期' },
{ 21: '每日10:00-02:00 10分钟1期' },
{ 22: '每日9:00-23:00 10分钟一期' },
{ 23: '每日08:40-22:10 10分钟1期' },
{ 24: '每日08:40-22:00 10分钟1期' },
{ 27: '每日09:05-23:55 5分钟1期' },
{ 42: '每日08:40-22:10 10分钟1期' },
{ 43: '每日09:30-20:30 10分钟1期' },
],
},
upper: function (e) {
console.log('下拉了...');
console.log(e)
},
lower: function (e) {
console.log(e)
},
scroll: function (e) {
console.log(e)
},
onLoad: function () {
console.log('onLoad');
var that = this;
wx.request({
url: 'https://api.168cpt.com/index.php/Home/index/test/?command=lottery/get_lottery_last_result&lottery_ids=1,3,6,7,9,10,11,13,14,15,20,21,23,24,27,42,43&flag=result', //调用高频彩的接口
header: {
'content-type': 'application/json'
},
success: function (res) {
//console.log(res.data.data);
//拼接数组
var highInfos = res.data.data;
for (var i = 0; i < that.data.highIds.length; i++) {
//拼接地方
var area = that.data.highNames[i][highInfos[that.data.highIds[i]][0].lottery_id];
highInfos[that.data.highIds[i]][0]['area'] = area;
var province = area.substr(0, 2);
//console.log("省会"+province);
if (province == '黑龙') {
province += '江';
} else if (province == '内蒙') {
province += '古';
}
highInfos[that.data.highIds[i]][0]['province'] = province;
// console.log(area);
//拼接开奖号码
var nums = highInfos[that.data.highIds[i]][0].nums.split(',');
highInfos[that.data.highIds[i]][0]['codes'] = nums;
//console.log(nums);
//处理时间(日期)
var dateStr = highInfos[that.data.highIds[i]][0].expect_time;
// console.log("时间:"+timeStr);
var parnter = /(\d{2})(\d{2})/;
var formatStr = dateStr.substr(4, 4);
var formatedDate2 = formatStr.replace(parnter, '$1-$2');
highInfos[that.data.highIds[i]][0]['date'] = formatedDate2;
//处理时间(周几)
var parnter2 = /(\d{4})(\d{2})(\d{2})/;
var formatStr2 = dateStr.substr(0, 8);
var formatedDate = formatStr2.replace(parnter2, '$1/$2/$3');
var day = new Date(formatedDate).getDay();
var weekArray = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六")
var week = weekArray[new Date(formatedDate).getDay()]
highInfos[that.data.highIds[i]][0]['week'] = week;
//拼接长度
var len = nums.length;
highInfos[that.data.highIds[i]][0]['len'] = len;
//全国彩的标签
var highTag = that.data.highTag[i][highInfos[that.data.highIds[i]][0].lottery_id];
highInfos[that.data.highIds[i]][0]['tag'] = highTag;
//数据的添加
}
wxSortPickerView.init(res.data.data, that.data.highIds, that);
that.setData({
highInfo: res.data.data,
isHidden: true,
});
}
})
//获得系统信息
wx.getSystemInfo({
success: function (res) {
that.setData({
winWidth: res.windowWidth,
winHeight: res.windowHeight,
});
}
});
},
//滑动切换tab
bindChange: function (e) {
var that = this;
// console.log('tab' + e.detail.current);
if (e.detail.current == 1) {
//全国彩
wx.request({
url: 'https://api.168cpt.com/index.php/Home/index/test/?command=lottery/get_lottery_last_result&lottery_ids=4,5,17', //调用全国彩的接口
header: {
没有合适的资源?快使用搜索试试~ 我知道了~
基于JAVA开发的小程序彩票类的
共71个文件
png:52个
js:6个
wxss:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 180 浏览量
2024-03-27
10:53:13
上传
评论
收藏 366KB ZIP 举报
温馨提示
基于JAVA开发的小程序彩票类的
资源推荐
资源详情
资源评论
收起资源包目录
基于JAVA开发的小程序彩票类的.zip (71个子文件)
基于JAVA开发的小程序彩票类的
pages
index
index.wxml 3KB
index.js 16KB
index.json 2B
index.wxss 5KB
nationResult
nationResult.wxml 821B
nationResult.json 2B
nationResult.js 2KB
nationResult.wxss 1KB
result
result.wxss 1KB
result.wxml 4KB
result.js 5KB
result.json 37B
app.json 472B
app.js 725B
image
pk9.png 3KB
yellow.png 2KB
fm19.png 7KB
fm11.png 6KB
pk5.png 3KB
fm5.png 6KB
green.png 2KB
red1.png 2KB
pk6.png 3KB
fm13.png 7KB
pk4.png 3KB
pk1.png 3KB
dice_1.png 3KB
fm2.png 7KB
dice_4.png 5KB
15.png 13KB
pk10.png 3KB
blue.png 4KB
1.png 16KB
dice_2.png 4KB
fm1.png 7KB
fm20.png 7KB
fm8.png 6KB
23.png 14KB
11.png 15KB
pk8.png 3KB
fm18.png 6KB
fm14.png 7KB
6.png 12KB
27.png 22KB
fm4.png 6KB
fm3.png 7KB
pk7.png 3KB
fm6.png 6KB
dice_6.png 6KB
5.png 12KB
4.png 10KB
8.png 12KB
pk3.png 3KB
fm10.png 7KB
17.png 12KB
dice_5.png 5KB
fm9.png 7KB
pk2.png 3KB
fm12.png 7KB
red.png 2KB
fm17.png 7KB
fm16.png 7KB
icon.png 1KB
fm7.png 6KB
dice_3.png 4KB
fm15.png 6KB
utils
util.js 506B
app.wxss 194B
wxSortPickerView
wxSortPickerView.wxml 7KB
wxSortPickerView.wxss 6KB
wxSortPickerView.js 4KB
共 71 条
- 1
资源评论
依然风yrlf
- 粉丝: 785
- 资源: 1349
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- pta题库答案c语言之排序4统计工龄.zip
- pta题库答案c语言之树结构7堆中的路径.zip
- pta题库答案c语言之树结构3TreeTraversalsAgain.zip
- pta题库答案c语言之树结构2ListLeaves.zip
- pta题库答案c语言之树结构1树的同构.zip
- 基于C++实现民航飞行与地图简易管理系统可执行程序+说明+详细注释.zip
- pta题库答案c语言之复杂度1最大子列和问题.zip
- 三维装箱问题(Three-Dimensional Bin Packing Problem,3D-BPP)是一个经典的组合优化问题
- 以下是一些关于Linux线程同步的基本概念和方法.txt
- 以下是一个简化的示例,它使用pygame库来模拟烟花动画的框架.txt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功