klren0312 / ironinfoweapp Goto Github PK
View Code? Open in Web Editor NEW(请仔细阅读每个项目文件夹下的README) 钢材信息小程序服务已暂停, 后续可能改为云函数
License: MIT License
(请仔细阅读每个项目文件夹下的README) 钢材信息小程序服务已暂停, 后续可能改为云函数
License: MIT License
上报用户的搜索记录:
后期整合进定时服务
const cheerio = require('cheerio')
const tableParser = require('cheerio-tableparser')
const rp = require('request-promise')
const url = 'http://hq.zgw.com/hefei/jiancai/2343364.html'
rp({
uri: url
}).then(body => {
const $ = cheerio.load(body)
const priceCol = spiderTable($, false)[4]
priceCol.shift()
const pricesFormat = priceCol.map(v => $(v).data().type)
const otherData = spiderTable($, true)
const nameCol = otherData[0]
const sizeCol = otherData[1]
nameCol.shift()
sizeCol.shift()
const ironArr = []
for (let i = 0, len = nameCol.length; i < len; i++) {
ironArr.push({
name: nameCol[i],
size: sizeCol[i],
price: pricesFormat[i]
})
}
console.log(ironArr)
})
function spiderTable ($, hasHtml) {
tableParser($)
return $('body > div.wrap > div.cslm_tit > div.hq_con > div.fl.lm_left > div > div.lm_m > div.lm_mt > div.article > table').parsetable(false, false, hasHtml)
}
看看新闻 看看钢材
后端定
我试了一下搜索 铜陵 铜陵钢材 没有找到这个小程序
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were 2 commits.
🛠️ fix: 修改IP归属地查询接口 淘宝的经常500 by klren0312
🛠️ fix: #39, 添加sequelize-cli同步数据库命令和创建用户命令 by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there were 2 stagazers.
⭐ Twany
⭐ luhix
You all are the stars! 🌟
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
服务端初始化没有配置用户名密码, 创建用户接口带有权限无法调用, 导致项目无法使用
Is your feature request related to a problem? Please describe.
官方新规范: https://developers.weixin.qq.com/community/operate/doc/000640bb8441b82900e89f48351401?scene=0
Describe the solution you'd like
不强制登录了, 查看钢材详情, 文章详情, 搜索时跳登录授权
手机查看日志很不方便
Describe the bug
登录报错, 图表报错
To Reproduce
提取api后没进行测试
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there was 1 commit.
🛠️ Update EggJSDevelop.md 文档显示格式修正 by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there were 2 stagazers.
⭐ PrideMe
⭐ renzehui
You all are the stars! 🌟
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
卡片删除按钮错位
管理后台添加换肤功能
从当前的炫酷切换成白色版, 方便视察
用户数据采集
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
防止重复操作
Describe the bug
重新登录
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week 2 issues were created.
Of these, 1 issues have been closed and 1 issues are still open.
💚 #39 服务端初始化没有配置用户名密码, by klren0312
❤️ #40 PC端管理后台报错 Error: Loading chunk chunk-c09d450e failed., by klren0312
🔈 #40 PC端管理后台报错 Error: Loading chunk chunk-c09d450e failed., by klren0312
It received 3 comments.
Last week, no pull requests were created, updated or merged.
Last week there were 4 commits.
🛠️ fix: #34, 钢材搜索添加语音识别 by klren0312
🛠️ fix: #40, 删除天气组件, 解决报错问题 by klren0312
🛠️ delete old project by klren0312
🛠️ fix: #32, 管理后台手机端 by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there were 4 stagazers.
⭐ arthur5987
⭐ 15116446660
⭐ ltian7
⭐ z00285034
You all are the stars! 🌟
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were 2 stagazers.
⭐ yoruponder
⭐ omvmo
You all are the stars! 🌟
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
把退出登录按钮放在首页左上角
const puppeteer = require('puppeteer')
const path = require('path')
puppeteer.launch({
headless: true,
args: [ // 禁用一些功能
'--no-sandbox', // 沙盒模式
'--disable-setuid-sandbox', // uid沙盒
'--disable-dev-shm-usage', // 创建临时文件共享内存
'--disable-accelerated-2d-canvas', // canvas渲染
'--disable-gpu' // GPU硬件加速
],
ignoreDefaultArgs: ["--enable-automation"]
}).then(async browser => {
const page = await browser.newPage()
page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36')
await page.goto('http://hq.zgw.com/huizong/jiancai.html')
sleep(2000)
const time = await page.$eval('.lm_list > ul:nth-child(2) > li:nth-child(1) > span', a => a.innerHTML)
console.log(getToday())
if (time === getToday()) {
const url = await page.$eval('.fl.lm_left >.lm_list > ul:nth-child(2) > li:nth-child(1) > a', a => a.href)
await page.goto(url)
sleep(2000)
let clip = await page.evaluate(() => {
let {
x,
y,
width,
height
} = document.querySelector('.neirong > table').getBoundingClientRect()
return {
x,
y,
width,
height
}
})
const title = await page.$eval('body > div.wrap > div.cslm_tit > div.hq_con > div.fl.lm_left > div > div.lm_m > div.lm_mt > div.time', a => {
return a.innerHTML
})
const date = title.match(/\d+-\d+-\d+/)
await page.screenshot({
path: `${date}.png`,
clip: clip
})
save(path.resolve(`${date}.png`), `${date}`)
}
await browser.close()
}).then(() => {
}).catch(e => {
console.log(e)
})
/**
* 获取今日日期字符串
*/
function getToday () {
const month = new Date().getMonth() + 1
const day = new Date().getDate()
let today = ''
if (month < 10) {
today += `0${month}`
} else {
today += month + ''
}
if (day < 10) {
today += `-0${day}`
} else {
today += `-${day}`
}
return today
}
/**
* 延时
* @param {Number} time
*/
function sleep(time) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(), time)
})
}
/**
* 上传截图
* @param {String} path 文件路径
* @param {String} name 文件名称
*/
function save (path, name) {
const qiniu = require('qiniu')
const accessKey = ''
const secretKey = ''
const mac = new qiniu.auth.digest.Mac(accessKey, secretKey)
const options = {
scope: 'zzestlgc',
returnBody: '{"key":"$(key)","hash":"$(etag)","fsize":$(fsize),"bucket":"$(bucket)","name":"$(x:name)"}'
}
const putPolicy = new qiniu.rs.PutPolicy(options)
const uploadToken=putPolicy.uploadToken(mac)
const config = new qiniu.conf.Config()
// 空间对应的机房
config.zone = qiniu.zone.Zone_z2
const formUploader = new qiniu.form_up.FormUploader(config)
const putExtra = new qiniu.form_up.PutExtra()
const key = name
formUploader.putFile(uploadToken, key, path, putExtra, (err, body, info) => {
if (err) throw err
if (info.statusCode === 200) {
console.log(body)
} else {
console.log(info.statusCode)
console.log(body)
}
})
}
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were 2 commits.
🛠️ fix: #17 结束把 by klren0312
🛠️ doc: api文档 by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there were 2 stagazers.
⭐ ynwshy
⭐ shenyin2017
You all are the stars! 🌟
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were 2 commits.
🛠️ 管理后台地址 by klren0312
🛠️ 更新管理后台地址 by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week 2 issues were created.
Of these, 1 issues have been closed and 1 issues are still open.
❤️ #22 管理后台相关接口错误, by klren0312
Last week, no pull requests were created, updated or merged.
Last week there were 4 commits.
🛠️ fix: #22 首页图表错误 by klren0312
🛠️ fix: #22 登录接口错误 by klren0312
🛠️ 文章时间改为创建时间, 修复热门钢材swiper高度错误问题, 用户访问小程序计数 by klren0312
🛠️ UI修改, 首页热门钢材添加右滑个人关注钢材(采用历史搜索) by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there was 1 commit.
🛠️ fix: 文章启用禁用问题修复 by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there was 1 stargazer.
⭐ greatbakebake
You are the star! 🌟
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
PUT http://localhost:7001/api/v1/user
Here's the Weekly Digest for klren0312/ironInfoWeapp:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there was 1 commit.
🛠️ 添加electon端 by klren0312
Last week there was 1 contributor.
👤 klren0312
Last week there was 1 stargazer.
⭐ yzh979
You are the star! 🌟
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository klren0312/ironInfoWeapp to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
重新申请中
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.