Git Product home page Git Product logo

redpack's People

Contributors

tkpromise avatar

Watchers

 avatar  avatar

redpack's Issues

优化建议

前端:
function start() {
if ( seconds <= 59) {
潜在bug,最好判断时分秒或者时间戳。

127行:
function check() {
getServerDate();
start();
}

check每一秒就调用一次,当满足了second<=59时会重复调用start,所以造成前端页面卡顿。

正确逻辑是,每秒取一次服务器时间,一旦时分秒/时间戳满足条件,就要清除循环。
执行下红包雨

后端:
99行

发送红包

cert = p12_to_pem('apiclient_cert')

不用每次都建cert,初始化flask时建一次就可以了,把变量留在内存里重复使用

73行:
with open('redpack.txt', 'a+') as f:
f.write(str(total_amount))
f.write('\n')
用python的logging,不是为了记录这次红包金额吗,应该把openid和红包金额log下来
这个文件操作会造成一定阻塞

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.