微信開發自定義選單陣列結構

2022-08-12 23:09:28 字數 2456 閱讀 2153

備用:

//

----------------------------------1------------------------------------

$menu['button']['0']['name'] = '積分';

$menu['button']['0']['sub_button']['0']['type'] = 'view';

$menu['button']['0']['sub_button']['0']['name'] = '積分**';

$menu['button']['0']['sub_button']['0']['url'] = '';

$menu['button']['0']['sub_button']['1']['type'] = 'view';

$menu['button']['0']['sub_button']['1']['name'] = '微**';

$menu['button']['0']['sub_button']['1']['url'] = '';

$menu['button']['0']['sub_button']['2']['type'] = 'view';

$menu['button']['0']['sub_button']['2']['name'] = '優品專區';

$menu['button']['0']['sub_button']['2']['url'] = '';

//----------------------------------2------------------------------------

$menu['button']['1']['name'] = '活動內容';

$menu['button']['1']['sub_button']['0']['type'] = 'view';

$menu['button']['1']['sub_button']['0']['name'] = '最新活動';

$menu['button']['1']['sub_button']['0']['url'] = '';

$menu['button']['1']['sub_button']['1']['type'] = 'view';

$menu['button']['1']['sub_button']['1']['name'] = '分享有禮';

$menu['button']['1']['sub_button']['1']['url'] = '';

$menu['button']['1']['sub_button']['2']['type'] = 'view';

$menu['button']['1']['sub_button']['2']['url'] = '';

$menu['button']['1']['sub_button']['3']['type'] = 'view';

$menu['button']['1']['sub_button']['3']['name'] = '秒殺專區';

$menu['button']['1']['sub_button']['3']['url'] = '';

//------------------------------------3-------------------------------------

$menu['button']['2']['name'] = '積分管理';

$menu['button']['2']['sub_button']['0']['type'] = 'view';

$menu['button']['2']['sub_button']['0']['name'] = '積分查詢';

$menu['button']['2']['sub_button']['0']['url'] = 'admin/index';

$menu['button']['2']['sub_button']['1']['type'] = 'view';

$menu['button']['2']['sub_button']['1']['name'] = '訂單查詢';

$menu['button']['2']['sub_button']['1']['url'] = '';

$menu['button']['2']['sub_button']['2']['type'] = 'view';

$menu['button']['2']['sub_button']['2']['name'] = '購物車';

$menu['button']['2']['sub_button']['2']['url'] = '';

$menu['button']['2']['sub_button']['3']['type'] = 'view';

$menu['button']['2']['sub_button']['3']['name'] = '積分規則';

$menu['button']['2']['sub_button']['3']['url'] = '';

微信開發 自定義選單

一 定義幾個實體類 public class accesstoken public void settoken string token public int getexpirein public void setexpirein int expirein public class button p...

微信開發 自定義選單查詢 返碼亂碼

獲取自定義選單查詢返回的結果有亂碼 解決方法 string posturl 設定提交的相關引數 提交方式 request.method get 編碼格式 最後結果就沒亂碼了,流解碼的時候要用utf8 streamreader stream new streamreader respone.getre...

微信開發(二)自定義選單

概述 目前自定義選單最多包括3個一級選單,每個一級選單最多包含5個二級選單。一級選單最多4個漢字,二級選單最多7個漢字,多出來的部分將會以 代替。結果 步驟 1.呼叫介面獲得通訊token 2.呼叫介面建立自定義選單 3.響應自定義選單操作 實現 1.呼叫介面獲得通訊token 其次伺服器上建立ph...