V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
uutoto

vLang,微信开发框架.

  •  
  •   uutoto · May 27, 2015 · 3112 views
    This topic created in 3990 days ago, the information mentioned may be changed or developed.

    vLang的主要特点是将微信抽象为一个个的菜单, 根据我个人的使用经验, 这样开发效率会更高,

    下面是只有一个菜单的简单例子:
    '''python
    class MainMenu(Menu):
    def action(self):
    num0 = yield "请输入因数1:" #用户输入将保存在num0里.
    num1 = yield "请输入因数2:"
    num2 = float(num0) * float(num1)
    yield "计算结果:\n {0} x {1} = {2}".format(num0,num1,num2)
    '''
    vLang是支持多级菜单的.
    更详细文档的请传送至:https://github.com/uutoto/vlang

    由于要期末考试 , 把目前能稳定使用的版本放github了,还不能支持多媒体消息.不过框架已经像个样了.
    暑假会继续开发, 望提供宝贵建议.

    realityone
        1
    realityone  
       May 27, 2015
    思路好棒。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3275 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 11:24 · PVG 19:24 · LAX 04:24 · JFK 07:24
    ♥ Do have faith in what you're doing.