123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- # -*- coding: utf-8 -*-
- # !/usr/bin/env python
- import sys
- from base import init_env, setup_logger, get_logger
- init_env(interactive = True)
- if len(sys.argv) < 2:
- logger = get_logger(__name__)
- else:
- logger = setup_logger(filename = sys.argv[1], namespace = __name__)
- from apps.web.core.models import WechatAuthApp
- from apps.web.core.bridge.wechat import WechatClientProxy
- appId = 'wxf5425406cad19690'
- secret = '133107adb7015e6bac5474fcd9dd98cc'
- grzx = {
- 'type': 'view',
- 'name': u'个人中心',
- 'url': "http://www.washpayer.com/user/moniUserAccess?moniAppId=%s&redirect=%s" % (appId,'gerenzhongxin')
- }
- dangqianfuwu = {
- 'type': 'view',
- 'name': u'当前服务',
- 'url': "http://www.washpayer.com/user/moniUserAccess?moniAppId=%s&redirect=%s" % (appId,'dangqianfuwu')
- }
-
- changjianwenti = {
- 'type': 'view',
- 'name': u'常见问题',
- 'url': "http://www.washpayer.com/user/moniUserAccess?moniAppId=%s&redirect=%s" % (appId,'changjianwenti')
- }
- baogaolaoban = {
- 'type': 'view',
- 'name': u'报告老板',
- 'url': "http://www.washpayer.com/user/moniUserAccess?moniAppId=%s&redirect=%s" % (appId,'baogaolaoban')
- }
- qitawenti = {
- 'type': 'view',
- 'name': u'其他问题',
- 'url': "http://www.washpayer.com/user/moniUserAccess?moniAppId=%s&redirect=%s" % (appId,'baogaolaoban')
- }
- zbsb = {
- 'type': 'view',
- 'name': u'周边设备',
- 'url': "http://www.washpayer.com/user/moniUserAccess?moniAppId=%s&redirect=%s" % (appId,'zhoubianshebei')
- }
- toushushouli = {
- 'type': 'view',
- 'name': u'投诉受理',
- 'url': "http://www.washpayer.com/user/moniUserAccess?moniAppId=%s&redirect=%s" % (appId,'toushushouli')
- }
- menu = {
- "button":
- [
-
- {
- "name": u"服务&投诉",
- "sub_button": [dangqianfuwu,changjianwenti,baogaolaoban,toushushouli]
- },
- {
- "type": "scancode_push",
- "name": u"扫一扫",
- "key": "rselfmenu_0_1",
- "sub_button": []
- },
- grzx
- ]
- }
- app = WechatAuthApp(appid = appId,secret = secret)
- proxy = WechatClientProxy(app)
- print proxy.client.menu.create(menu)
|